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
on click method for ad time picker
public void pickAdTime(View view) { DialogFragment newFragment = new AdTimePicker(); newFragment.show(getFragmentManager(), "adTimePicker"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n Calendar mcurrentTime = Calendar.getInstance();\n int hour = mcurrentTime.get(Calendar.HOUR_OF_DAY);\n int minute = mcurrentTime.get(Calendar.MINUTE);\n TimePickerDialog mTimePicker;\n ...
[ "0.7705621", "0.7542435", "0.7535049", "0.7534141", "0.74997413", "0.74929154", "0.749278", "0.7487032", "0.7486313", "0.7479423", "0.74635565", "0.7455061", "0.7454692", "0.7443256", "0.7439336", "0.7437858", "0.74333674", "0.74304074", "0.7427913", "0.74235713", "0.742262",...
0.72674996
61
configure URL button on click method
public void configureURL(View view) { //get url from edit text urlString = urlText.getText().toString(); if((urlString.contains("https://") && urlString.length()>8) || (urlString.contains("http://") && urlString.length()>7)) { PreferenceManager.getDefaultSharedPreferences(getApplicationContext()).edit().putString("urlString_"+alarmID, urlString).apply(); //determine if from configureURLButton or searchButton (require different actions) boolean fromConfigureURLButton; if(view.getTag().toString().equals("configure")) { fromConfigureURLButton = true; } else { fromConfigureURLButton = false; } Intent intent = new Intent(getApplicationContext(), WebAlarmActivity.class); intent.putExtra("urlString", urlString); intent.putExtra("fromConfigureURLButton", fromConfigureURLButton); intent.putExtra("alarmID", alarmID); startActivity(intent); } else { Toast.makeText(getApplicationContext(), "Your URL is malformed!", Toast.LENGTH_SHORT).show(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setClickURL(java.lang.String clickURL);", "@Override\r\n public void onClick(View v){\n RequestUrl(\"led1\");\r\n }", "@Override\r\n public void onClick(View v){\n RequestUrl(\"led2\");\r\n }", "@Override\n public void ...
[ "0.72180563", "0.7090105", "0.7041567", "0.7006227", "0.6860167", "0.6762353", "0.6698303", "0.6696673", "0.6636413", "0.6495535", "0.6478689", "0.64661026", "0.6463523", "0.6375077", "0.6345324", "0.6344879", "0.63312536", "0.6318026", "0.6315787", "0.6315211", "0.6315021", ...
0.6385765
13
when press back, go to list activity
@Override public void onBackPressed() { Intent startMain = new Intent(this, ListActivity.class); startActivity(startMain); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onBackPressed() {\n\n\t\tnavigatetoAppointmentsListingScreen(\"false\");\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tif (isLstVisible) { lst.setVisibility(View.INVISIBLE); isLstVisible = false; }\n\t\telse finish();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsu...
[ "0.78408265", "0.7818637", "0.77411985", "0.76946616", "0.768277", "0.7603297", "0.7506109", "0.7490129", "0.74842715", "0.74817586", "0.74778306", "0.7398204", "0.7398204", "0.73949987", "0.73341", "0.73060495", "0.7297767", "0.72643894", "0.7263301", "0.7244102", "0.7242387...
0.8490024
0
Initializes a new TransformInputStream which is to transform the packets received from a specific (network) socket.
protected TransformInputStream(T socket) { super(socket); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void init() throws IOException {\n m_sock = new Socket(InetAddress.getByAddress(m_address), VIDEO_TO_PC_PORT);\n m_sock.setSoTimeout(READ_TIMEOUT_MS);\n m_sockistream = m_sock.getInputStream();\n m_daistream = new DataInputStream(m_sockistream);\n m_initialized = true;\n }", "private void...
[ "0.6240236", "0.6144193", "0.6109066", "0.60752326", "0.6017049", "0.5966036", "0.59401006", "0.59013975", "0.58028424", "0.5742734", "0.5732023", "0.5695058", "0.5629408", "0.5627551", "0.56030357", "0.55923975", "0.5503977", "0.54845315", "0.546701", "0.54576665", "0.544878...
0.7525695
0
Gets the PacketTransformer which is used to reversetransform packets.
public PacketTransformer getTransformer() { return transformer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final Transformation getTransformation() {\n\t\treturn transform;\n\t}", "public static com.tangosol.net.security.IdentityTransformer getIdentityTransformer()\n {\n return __s_IdentityTransformer;\n }", "public Transform getTransform(){\n switch (this){\n case prom...
[ "0.59110844", "0.57028997", "0.5673605", "0.55213434", "0.5430251", "0.541063", "0.5289848", "0.527069", "0.52256566", "0.51910585", "0.51410985", "0.5102854", "0.50719094", "0.50657004", "0.5050622", "0.5014278", "0.4988617", "0.4987796", "0.4969699", "0.4962189", "0.4956759...
0.7597597
0
Sets the PacketTransformer which is to be used to reversetransform packets. Set to null to disable transformation.
public void setTransformer(PacketTransformer transformer) { this.transformer = transformer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PacketTransformer getTransformer()\n {\n return transformer;\n }", "public static Transformer nopTransformer() {\n return NOP_TRANSFORMER;\n }", "protected static void setIdentityTransformer(com.tangosol.net.security.IdentityTransformer transformer)\n {\n __s_Identit...
[ "0.5776673", "0.5429672", "0.5283893", "0.52068", "0.5163115", "0.5116359", "0.5083727", "0.50619745", "0.5021305", "0.49602243", "0.4801677", "0.46921408", "0.4636669", "0.4632162", "0.46246907", "0.4614409", "0.4607074", "0.45559958", "0.45519114", "0.45519114", "0.44722256...
0.6687546
0
obtiene una extructura de tipo Map> con todos los parametros de configuracion del sistema.
Map<Long, Map<String, Parametro>> getParametrosConfigMap();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Map<String, String> getParameters();", "Map<String, String[]> getParameterMap();", "public Map getParameters();", "Map<String, Object> getParameters();", "Map<String, Object> getParameters();", "public static Map<String, String> getParameters() {\r\n return null;\r\n }", "protected Map<String...
[ "0.7000807", "0.6894054", "0.6876894", "0.6850068", "0.6850068", "0.6829174", "0.67181253", "0.66955", "0.66955", "0.66955", "0.65510035", "0.6526491", "0.65232927", "0.65155363", "0.6498471", "0.6462993", "0.64177793", "0.6359433", "0.63436717", "0.63358283", "0.63358283", ...
0.78425467
0
Getters & Setters Visita
public String getEmpresa() { return empresa; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getTipoAtaque(){return tipoAtaque;}", "@Override // Métodos que fazem a anulação\n\tpublic void getBonificação() {\n\t\t\n\t}", "public String getValor()\n/* 17: */ {\n/* 18:27 */ return this.valor;\n/* 19: */ }", "public void setNombre(String nombre) {this.nombre = nombre;}", "@Over...
[ "0.62982506", "0.62739486", "0.61059433", "0.608961", "0.60813326", "0.60787773", "0.60725355", "0.60709447", "0.6060125", "0.6054209", "0.60531884", "0.6050813", "0.6033882", "0.6027601", "0.6022055", "0.60144204", "0.6013196", "0.6009776", "0.59927446", "0.59914434", "0.598...
0.0
-1
List of ospfilter (ONLY FOR 2 DAYS, 7 Days,)
@RequestMapping(value="/ospfilter/{type}",method=RequestMethod.GET) public List<Map<String, String>> ospDetails(@PathVariable String type) { return ospServiceServiceImpl.ospDetails(type); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isFilterByDate();", "public List<RefineriesFilter> getRefineriesFilter();", "List<Condition> composeFilterConditions(F filter);", "public ArrayList<CampusEvent> eventListFilter (ArrayList<CampusEvent> campusEvents, Filters filter) {\n ArrayList<CampusEvent> newList = new ArrayList<CampusEvent>...
[ "0.5974312", "0.5923693", "0.5877121", "0.58521956", "0.5678428", "0.56061673", "0.5596698", "0.5487701", "0.5485599", "0.5455703", "0.54511225", "0.54476696", "0.5411474", "0.5394756", "0.53917164", "0.5371468", "0.5356831", "0.5355065", "0.5338314", "0.53364396", "0.5323018...
0.0
-1
Drop User Table if exist
@Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { db.execSQL(DROP_USER_TABLE); db.execSQL(SQL_DELETE_ENTRIES); // Create tables again onCreate(db); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void dropUsersTable() {\n\n Session session = sessionFactory.openSession();\n Transaction tx = session.beginTransaction();\n session.createSQLQuery(\"DROP TABLE IF EXISTS Users\").executeUpdate();\n tx.commit();\n session.close();\n\n }", "@Override\n\t...
[ "0.80555433", "0.76483446", "0.7420146", "0.73900676", "0.73900676", "0.73900676", "0.73900676", "0.73675084", "0.7364191", "0.72577447", "0.7235674", "0.72275424", "0.71386224", "0.6977631", "0.6803981", "0.6795635", "0.67952263", "0.6753142", "0.67139167", "0.6712199", "0.6...
0.0
-1
This method is to create user record
public void addUser(user user) { SQLiteDatabase db = this.getWritableDatabase(); ContentValues values = new ContentValues(); values.put(COLUMN_USER_NAME, user.getName()); values.put(COLUMN_USER_EMAIL, user.getEmail()); values.put(COLUMN_USER_PASSWORD, user.getPassword()); // Inserting Row db.insert(TABLE_NAME, null, values); db.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createUser(User user) {\n\n\t}", "public void createUser() {\r\n\t\tif(validateUser()) {\r\n\t\t\t\r\n\t\t\tcdb=new Connectiondb();\r\n\t\t\tcon=cdb.createConnection();\r\n\t\t\ttry {\r\n\t\t\t\tps=con.prepareStatement(\"INSERT INTO t_user (nom,prenom,userName,pass,tel,type,status) values(?,?,?,?,?,?...
[ "0.7792709", "0.76817775", "0.76684445", "0.7643108", "0.75113225", "0.743572", "0.7404015", "0.73931324", "0.7374611", "0.7356148", "0.73531413", "0.7317474", "0.72922105", "0.72748387", "0.7246161", "0.72251266", "0.71738505", "0.7128755", "0.712772", "0.7108712", "0.709967...
0.0
-1
This method is to fetch all user and return the list of user records
public List<user> getAllUser() { // array of columns to fetch String[] columns = { COLUMN_USER_ID, COLUMN_USER_EMAIL, COLUMN_USER_NAME, COLUMN_USER_PASSWORD }; // sorting orders String sortOrder = COLUMN_USER_NAME + " ASC"; List<user> userList = new ArrayList<user>(); SQLiteDatabase db = this.getReadableDatabase(); // query the user table /** * Here query function is used to fetch records from user table this function works like we use sql query. * SQL query equivalent to this query function is * SELECT user_id,user_name,user_email,user_password FROM user ORDER BY user_name; */ Cursor cursor = db.query(TABLE_NAME, //Table to query columns, //columns to return null, //columns for the WHERE clause null, //The values for the WHERE clause null, //group the rows null, //filter by row groups sortOrder); //The sort order // Traversing through all rows and adding to list if (cursor.moveToFirst()) { do { user user = new user(); user.setId(Integer.parseInt(cursor.getString(cursor.getColumnIndex(COLUMN_USER_ID)))); user.setName(cursor.getString(cursor.getColumnIndex(COLUMN_USER_NAME))); user.setEmail(cursor.getString(cursor.getColumnIndex(COLUMN_USER_EMAIL))); user.setPassword(cursor.getString(cursor.getColumnIndex(COLUMN_USER_PASSWORD))); // Adding user record to list userList.add(user); } while (cursor.moveToNext()); } cursor.close(); db.close(); // return user list return userList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<User> allUserRecords() {\n\t\tSystem.out.println(\"Calling getAllUserRecords() Method To Fetch Users Record\");\t\n\t\tList<User> userList = userDAO.listUser();\n\t\treturn userList;\n\t}", "@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new...
[ "0.84724087", "0.8189616", "0.8132186", "0.8075823", "0.8062744", "0.80583805", "0.80563366", "0.8024122", "0.7999926", "0.79963773", "0.7993604", "0.7981954", "0.7974452", "0.79724455", "0.79540247", "0.7932884", "0.7932884", "0.78973603", "0.78800356", "0.78775585", "0.7872...
0.7598609
70
This method to update user record
public void updateUser(user user) { SQLiteDatabase db = this.getWritableDatabase(); ContentValues values = new ContentValues(); values.put(COLUMN_USER_NAME, user.getName()); values.put(COLUMN_USER_EMAIL, user.getEmail()); values.put(COLUMN_USER_PASSWORD, user.getPassword()); // updating row db.update(TABLE_NAME, values, COLUMN_USER_ID + " = ?", new String[]{String.valueOf(user.getId())}); db.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateUserDetails() {\n\t\tSystem.out.println(\"Calling updateUserDetails() Method To Update User Record\");\n\t\tuserDAO.updateUser(user);\n\t}", "public void updateUser(User user) {\n\t\t\r\n\t}", "public boolean update(User u);", "public String updateUser(){\n\t\tusersservice.update(usersId, u...
[ "0.79761034", "0.79423773", "0.7799762", "0.77794814", "0.77692974", "0.7760493", "0.7750683", "0.77350944", "0.7728486", "0.7726437", "0.7693553", "0.7680269", "0.7638895", "0.7638895", "0.76247716", "0.7606842", "0.75975144", "0.7533773", "0.7531023", "0.7531023", "0.753102...
0.0
-1
This method is to delete user record
public void deleteUser(user user) { SQLiteDatabase db = this.getWritableDatabase(); // delete user record by id db.delete(TABLE_NAME, COLUMN_USER_ID + " = ?", new String[]{String.valueOf(user.getId())}); db.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deleteUserRecord() {\n\t\tSystem.out.println(\"Calling deleteUserRecord() Method To Delete User Record\");\n\t\tuserDAO.deleteUser(user);\n\t}", "@Override\n\tpublic void deleteUser(user theUser) {\n\t\t\n\t}", "@Override\n\tpublic void deleteUser(User user)\n\t{\n\n\t}", "@Override\n\tpublic voi...
[ "0.866978", "0.8105142", "0.8044499", "0.79602176", "0.79517645", "0.79279566", "0.79199713", "0.7876117", "0.78730345", "0.78451747", "0.7841078", "0.7822135", "0.7799567", "0.7781182", "0.7779804", "0.7777004", "0.7742497", "0.7741002", "0.7741002", "0.7732526", "0.7726074"...
0.7619007
36
This method to check user exist or not
public boolean checkUser(String email) { // array of columns to fetch String[] columns = { COLUMN_USER_ID }; SQLiteDatabase db = this.getReadableDatabase(); // selection criteria String selection = COLUMN_USER_EMAIL + " = ?"; // selection argument String[] selectionArgs = {email}; // query user table with condition /** * Here query function is used to fetch records from user table this function works like we use sql query. * SQL query equivalent to this query function is * SELECT user_id FROM user WHERE user_email = 'jack@androidtutorialshub.com'; */ Cursor cursor = db.query(TABLE_NAME, //Table to query columns, //columns to return selection, //columns for the WHERE clause selectionArgs, //The values for the WHERE clause null, //group the rows null, //filter by row groups null); //The sort order int cursorCount = cursor.getCount(); cursor.close(); db.close(); if (cursorCount > 0) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean IsUserExist(){\n SignupUser user =roomDB.dao().GetUserData(et_user.getText().toString());\n if(user!=null){\n if(!user.getEmail().isEmpty()){\n Toast.makeText(this, \"User is already registered!\", Toast.LENGTH_SHORT).show();\n return true;\n ...
[ "0.8109315", "0.807779", "0.7857591", "0.7857591", "0.7857591", "0.7857591", "0.7857591", "0.7857591", "0.7857591", "0.78422797", "0.7814909", "0.7686945", "0.7680346", "0.76445246", "0.7563711", "0.7553823", "0.75531965", "0.7527435", "0.75215006", "0.75181186", "0.749873", ...
0.0
-1
This method to check user exist or not
public boolean checkUser(String email, String password) { // array of columns to fetch String[] columns = { COLUMN_USER_ID }; SQLiteDatabase db = this.getReadableDatabase(); // selection criteria String selection = COLUMN_USER_EMAIL + " = ?" + " AND " + COLUMN_USER_PASSWORD + " = ?"; // selection arguments String[] selectionArgs = {email, password}; // query user table with conditions /** * Here query function is used to fetch records from user table this function works like we use sql query. * SQL query equivalent to this query function is * SELECT user_id FROM user WHERE user_email = 'jack@androidtutorialshub.com' AND user_password = 'qwerty'; */ Cursor cursor = db.query(TABLE_NAME, //Table to query columns, //columns to return selection, //columns for the WHERE clause selectionArgs, //The values for the WHERE clause null, //group the rows null, //filter by row groups null); //The sort order int cursorCount = cursor.getCount(); cursor.close(); db.close(); if (cursorCount > 0) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean IsUserExist(){\n SignupUser user =roomDB.dao().GetUserData(et_user.getText().toString());\n if(user!=null){\n if(!user.getEmail().isEmpty()){\n Toast.makeText(this, \"User is already registered!\", Toast.LENGTH_SHORT).show();\n return true;\n ...
[ "0.8109315", "0.807779", "0.7857591", "0.7857591", "0.7857591", "0.7857591", "0.7857591", "0.7857591", "0.7857591", "0.78422797", "0.7814909", "0.7686945", "0.7680346", "0.76445246", "0.7563711", "0.7553823", "0.75531965", "0.7527435", "0.75215006", "0.75181186", "0.749873", ...
0.0
-1
array of columns to fetch
public List<Diary> getAlldiary(String user_e) { String[] columns = { FeedEntry.COLUMN_NAME_USER, FeedEntry.COLUMN_NAME_TITLE, FeedEntry.COLUMN_NAME_DETAIL, FeedEntry.COLUMN_NAME_DATE, FeedEntry.COLUMN_NAME_COVER }; String selection = FeedEntry.COLUMN_NAME_USER + " = ?"; String[] v_columns = { user_e }; List<Diary> diaryList = new ArrayList<Diary>(); SQLiteDatabase db = this.getReadableDatabase(); // query the user table /** * Here query function is used to fetch records from user table this function works like we use sql query. * SQL query equivalent to this query function is * SELECT user_id,user_name,user_email,user_password FROM user ORDER BY user_name; */ Cursor cursor = db.query(FeedEntry.TABLE_NAME, //Table to query columns, //columns to return selection, //columns for the WHERE clause v_columns, //The values for the WHERE clause null, //group the rows null, //filter by row groups null); //The sort order // Traversing through all rows and adding to list if (cursor.moveToFirst()) { do { Diary user = new Diary( cursor.getString(cursor.getColumnIndex(FeedEntry.COLUMN_NAME_USER)), cursor.getString(cursor.getColumnIndex(FeedEntry.COLUMN_NAME_DATE)), cursor.getString(cursor.getColumnIndex(FeedEntry.COLUMN_NAME_TITLE)), cursor.getString(cursor.getColumnIndex(FeedEntry.COLUMN_NAME_DETAIL)), cursor.getString(cursor.getColumnIndex(FeedEntry.COLUMN_NAME_COVER)) ); // Adding diary record to list diaryList.add(user); } while (cursor.moveToNext()); } cursor.close(); db.close(); // return user list return diaryList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Column> getQueryColumns();", "List<String> getColumns();", "private String[] getColumns(String[] properties) {\r\n String[] dst = new String[properties.length];\r\n int i = 0;\r\n for (String string : properties) {\r\n dst[i++] = getProjectionColumn(string);\r\n }\r\...
[ "0.71844953", "0.7125301", "0.6969409", "0.69576776", "0.6948778", "0.69049126", "0.6824205", "0.67036366", "0.6587281", "0.65199846", "0.65017647", "0.6429154", "0.64229435", "0.63846666", "0.63778526", "0.63638633", "0.63598806", "0.6326261", "0.6299836", "0.6295686", "0.62...
0.0
-1
Checking is the specified tile holds a piece.
public boolean hasPieces() { return !(pieces.isEmpty()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean hasPiece()\r\n\t{\r\n\t\treturn piece != null;\r\n\t}", "public boolean hasTile(Tile a_tile){\n for(int i = 0; i < playerHand.size(); i++){\n if(playerHand.get(i).getLeft() == a_tile.getLeft() && playerHand.get(i).getRight() == a_tile.getRight()){\n return true;\n ...
[ "0.7161532", "0.71608675", "0.7014101", "0.69178176", "0.6882489", "0.68488073", "0.6841079", "0.6812826", "0.6777265", "0.67658865", "0.6720876", "0.67172194", "0.6716262", "0.6702416", "0.667639", "0.666427", "0.6651997", "0.66471744", "0.6645651", "0.6634616", "0.6605418",...
0.615458
53
Initialize the Tile object with background graphic and coordinates. Also sets methods for moving and placing pieces on tiles.
public Tile(GameLogic logic, PieceService pieceservice, int x, int y) { this.x = x; this.y = y; this.pieces = new ArrayList<>(); setWidth(TakApp.TILE_SIZE); setHeight(TakApp.TILE_SIZE); relocate(x * TakApp.TILE_SIZE, y * TakApp.TILE_SIZE); Image tilebg = new Image(getClass().getResourceAsStream("/images/tile.jpg")); ImagePattern imagePattern = new ImagePattern(tilebg); setFill(imagePattern); if (this.hasPieces() == false) { setOnMousePressed(e -> { String pieceColor = logic.checkTurn(); Piece piece = pieceservice.makePiece(logic, pieceColor, x, y); if (piece != null) { pieceservice.setPiece(piece, x, y); this.pieces.add(piece); } }); } else if (this.hasPieces() == true) { setOnMousePressed(e -> { this.oldX = this.getXcoordinate(); this.oldY = this.getYcoordinate(); }); setOnMouseDragged(e -> { relocate(e.getSceneX(), e.getSceneY()); }); setOnMouseReleased(e -> { double mouseX = e.getSceneX(); double mouseY = e.getSceneY(); int newX = (int) Math.floor(mouseX / 100.0); int newY = (int) Math.floor(mouseY / 100.0); boolean validMove = logic.isValidMove(oldX, oldY, newX, newY); if (validMove) { pieceservice.removePiece(this.pieces.get(this.pieces.size() - 1), oldX, oldY); pieceservice.setPiece(this.pieces.get(this.pieces.size() - 1), newX, newY); } else { pieceservice.setPiece(this.pieces.get(this.pieces.size() - 1), oldX, oldY); } }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected Tile() {\n super();\n }", "public void initTiles() {\n\t\ttileList.add(new Go());\n\n\t\t// Brown properties\n\t\tProperty mediterranean = new Property(\"Mediterranean\");\n\t\tProperty balticAve = new Property(\"Baltic Avenue\");\n\n\t\t// Light blue properties\n\t\tProperty orientalAve = ne...
[ "0.679614", "0.67684335", "0.67269826", "0.66313887", "0.6623664", "0.66144735", "0.6557624", "0.65293646", "0.6483788", "0.64770526", "0.64769685", "0.64436847", "0.64360625", "0.6412685", "0.64022475", "0.63877547", "0.6383077", "0.63828635", "0.63803583", "0.6321033", "0.6...
0.66001034
6
/static UndoManager undoMgr=new UndoManager(); Creates a new instance of OpenSimDB
private OpenSimDB() { instance = this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private UndoManager() {\n undoList = new LinkedHashMap<RefactoringSession, LinkedList<UndoItem>>();\n redoList = new LinkedHashMap<RefactoringSession, LinkedList<UndoItem>>();\n descriptionMap = new IdentityHashMap<LinkedList, String>();\n }", "public UndoController() {\r\n \t}", "publi...
[ "0.7027463", "0.6216606", "0.6065993", "0.57245684", "0.55715513", "0.55311453", "0.5475336", "0.5384501", "0.5383313", "0.5377078", "0.53636986", "0.5342385", "0.5303416", "0.5302368", "0.5259311", "0.5238936", "0.52242184", "0.520128", "0.5200707", "0.51833725", "0.51705796...
0.5980573
3
The setChanged() protected method must overridden to make it public
public synchronized void setChanged() { super.setChanged(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final synchronized void setChanged() {\n\t\tsuper.setChanged ();\n }", "@Override\n\tpublic void setChanged() {\n\t\tthis.changed = true;\n\t}", "protected synchronized void setChanged() {\n changed = true;\n }", "@Override\n public void onChanged() {\n }", "@Override\n ...
[ "0.84787136", "0.82405746", "0.8229703", "0.77813286", "0.7477878", "0.7408405", "0.73707604", "0.73686236", "0.73659384", "0.72633904", "0.711253", "0.7110799", "0.7092726", "0.70811033", "0.7069362", "0.70284635", "0.7004449", "0.6967443", "0.69472426", "0.69168955", "0.689...
0.8697517
0
/ addModel adds a model to the OpenSimDB. Would throw an exception if initSystem throws
public void addModel(Model aModel) throws IOException { addModel(aModel, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addModel(Model aModel, OpenSimContext context) throws IOException {\n OpenSimContext dContext = context==null?new OpenSimContext(aModel.initSystem(), aModel):context;\n models.add(aModel);\n mapModelsToContexts.put(aModel, dContext);\n SingleModelGuiElements newModelGuiEleme...
[ "0.7579798", "0.69301784", "0.6858331", "0.6421642", "0.6265923", "0.6096005", "0.6037361", "0.6024325", "0.60011387", "0.59549564", "0.59302306", "0.5794209", "0.56772274", "0.56487167", "0.5635935", "0.56277585", "0.55850774", "0.55801064", "0.55438805", "0.55270696", "0.55...
0.7032417
1
setupGroups(aModel); // initSystem could throw exception
public void addModel(Model aModel, OpenSimContext context) throws IOException { OpenSimContext dContext = context==null?new OpenSimContext(aModel.initSystem(), aModel):context; models.add(aModel); mapModelsToContexts.put(aModel, dContext); SingleModelGuiElements newModelGuiElements = new SingleModelGuiElements(aModel); mapModelsToGuiElements.put(aModel, newModelGuiElements); setChanged(); ModelEvent evnt = new ModelEvent(aModel, ModelEvent.Operation.Open); notifyObservers(evnt); setCurrentModel(aModel, false); //ExplorerTopComponent.addFinalEdit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testGroupInitializer() throws Exception {\n }", "@PostConstruct\n\tprivate void InitGroups() {\n\t\tList<Group> groups = identityService.createGroupQuery().groupIdIn(\"READER\", \"BETAREADER\").list();\n\n\t\tif (groups.isEmpty()) {\n\n\t\t\tGroup reader = identityService.newGroup(\"READER\");\n\t\...
[ "0.64963186", "0.6097364", "0.60769016", "0.6067368", "0.59806705", "0.59680915", "0.59680915", "0.5959035", "0.5949937", "0.59470737", "0.5920496", "0.5874956", "0.58508056", "0.582448", "0.582448", "0.58172095", "0.58082837", "0.5767766", "0.57325417", "0.5700228", "0.56944...
0.0
-1
Number of models currently loaded.
public int getNumModels() { return models.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int size() {\n return models.size();\n }", "public long getModelCount() throws StorageIOException {\n try {\n return this.databaseHelper.getDao(ModelDB.class).countOf();\n } catch (SQLException e) {\n throw new StorageIOException(\"Failed to get models' count\", e);...
[ "0.78277063", "0.730931", "0.7215195", "0.68394876", "0.67094404", "0.64984846", "0.64588875", "0.6456787", "0.63681036", "0.63383406", "0.63212496", "0.6317657", "0.6315336", "0.6304929", "0.6293023", "0.6277863", "0.6238216", "0.6229791", "0.62236285", "0.62168074", "0.6200...
0.80977625
0
removes old model and adds new model, but also transfers over some display properties currently used by scale tool, which can't rescale in place so it creates a new model to replace the old one Swap context objects as well
public void replaceModel(Model oldModel, Model newModel, OpenSimContext newContext) { OpenSimContext swap=null; if(oldModel!=null) { removeModel(oldModel); } if(newModel!=null) { try { addModel(newModel, newContext); } catch (IOException ex) { ErrorDialog.displayExceptionDialog(ex); } //mapModelsToContexts.put(newModel, newContext); /* SingleModelVisuals rep = ViewDB.getInstance().getModelVisuals(newModel); if(offset!=null) { ViewDB.getInstance().setModelVisualsTransform(rep, offset); ViewDB.getInstance().setObjectOpacity(newModel, opacity); }*/ } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void updateModel() {\n updateModel(false);\n }", "private void recreateModel() {\n items = null;\n didItCountAlready = false;\n }", "public void revise()\n {\n super.revise();\n\n String nm = model.get(\"name\", \"Init\");\n String newnm = revisePatchName(...
[ "0.61001694", "0.60418636", "0.59014654", "0.5898265", "0.5838871", "0.57920194", "0.57821435", "0.5708341", "0.5708335", "0.56829554", "0.5669143", "0.5616885", "0.55776054", "0.55401844", "0.547539", "0.5458318", "0.54467744", "0.543986", "0.54355395", "0.54173106", "0.5372...
0.6295424
0
Set the current model to the new one and fire an event for the change.
public void setCurrentModel(final Model aCurrentModel, boolean allowUndo) { final Model saveCurrentModel = currentModel; currentModel = aCurrentModel; Vector<OpenSimObject> objs = new Vector<OpenSimObject>(1); objs.add(aCurrentModel); ObjectSetCurrentEvent evnt = new ObjectSetCurrentEvent(this, aCurrentModel, objs); setChanged(); //ModelEvent evnt = new ModelEvent(aCurrentModel, ModelEvent.Operation.SetCurrent); notifyObservers(evnt); objs.clear(); if (allowUndo){ ExplorerTopComponent.addUndoableEdit(new AbstractUndoableEdit() { public void undo() throws CannotUndoException { super.undo(); setCurrentModel(saveCurrentModel, false); } public void redo() throws CannotRedoException { super.redo(); setCurrentModel(aCurrentModel, true); } public boolean canUndo() { return true; } public boolean canRedo() { return true; } @Override public String getRedoPresentationName() { return "Redo Change Current Model"; } @Override public String getUndoPresentationName() { return "Undo Change Current Model"; } }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setModelToChanged() {\n\t\tsetChanged();\r\n\t\tnotifyObservers();\r\n\t}", "void onModelChange();", "protected void modelChanged() {\n // create a view hierarchy\n ViewFactory f = rootView.getViewFactory();\n Document doc = editor.getDocument();\n Element elem = doc.ge...
[ "0.8125214", "0.70756316", "0.7003216", "0.6822307", "0.6754423", "0.6641935", "0.66052556", "0.6598733", "0.6594401", "0.6593583", "0.6569775", "0.6554758", "0.6538006", "0.6503231", "0.64961505", "0.64666617", "0.645097", "0.6394607", "0.63919026", "0.63449234", "0.63439375...
0.58904207
55
Get current model (as indicated by bold name in the explorer view) if none then the function returns null It's an error condition if this function returns null while the explorer view is nonempty
public Model getCurrentModel() { return currentModel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object getModel() {\n\t\treturn null;\n\t}", "public String getModel()\n\t{\n\t\treturn null;\n\t}", "public Object getModel();", "@Override\r\n\tpublic Object getModel() {\n\t\treturn null;\r\n\t}", "public String getModel();", "public static Model getSelectedModel() {\n\t\tString path = SELECTED...
[ "0.67930996", "0.66615254", "0.65323275", "0.64590406", "0.644636", "0.64301914", "0.6365524", "0.6360662", "0.6360662", "0.6334644", "0.6320711", "0.62225616", "0.62083304", "0.62083304", "0.62083304", "0.61688787", "0.61647195", "0.6161836", "0.6135336", "0.6123614", "0.612...
0.6331511
10
hasModel checks if the passed in model is already loaded.
public boolean hasModel(Model aModel) { for(int i=0; i<models.size(); i++){ if (models.get(i).equals(aModel)) return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasModel();", "boolean hasModel();", "public boolean hasModel() {\n if (this.model == null) {\n throw new NullPointerException(\"Model not set.\");\n }\n return true;\n }", "public boolean hasModel() {\n return false;\r\n }", "public boolean modelPresent() ...
[ "0.80109674", "0.80109674", "0.76452196", "0.7392104", "0.7049404", "0.6421111", "0.63844293", "0.6257305", "0.6130644", "0.60424644", "0.5862546", "0.5736296", "0.5736056", "0.5719027", "0.5704388", "0.5677845", "0.5658117", "0.5647659", "0.56255317", "0.55301964", "0.551992...
0.74685645
3
Common place to validate new object names to make sure They start with a an alphanumeric contain any combinaton of letters, numbers, _, ., but no special chars.
static public boolean validateName(String proposedName, boolean allowSpace) { Pattern p; if (allowSpace) p = Pattern.compile("[A-Z][A-Z0-9_. -]*", Pattern.CASE_INSENSITIVE); else p = Pattern.compile("[A-Z][A-Z0-9_.-]*", Pattern.CASE_INSENSITIVE); return (p.matcher(proposedName).matches()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isNameValid(String name) {\n\n }", "public boolean nameValidation(String username){\n return !(username.isEmpty() || !username.matches(\"[a-zA-Z0-9_-]+\"));\n }", "private boolean isValidName(String name)\n {\n String reg = \"^[a-zA-Z]+$\";\n return name.matches(re...
[ "0.69218695", "0.6787618", "0.67733616", "0.66933143", "0.65889835", "0.65405834", "0.6524832", "0.64469117", "0.64407396", "0.6438847", "0.64307505", "0.6427528", "0.64148474", "0.63941926", "0.6375235", "0.63656557", "0.6323346", "0.6316541", "0.63049036", "0.63014907", "0....
0.6244067
23
This method loads actual models specified in the passed in OpenSimDBDescriptor
public void rebuild(OpenSimDBDescriptor descriptor) { ArrayList<String> files = descriptor.getFileNames(); Model saveCurrentModel=null; for(int i=0; i<files.size(); i++){ String nextFilename = files.get(i); File nextFile = new File(nextFilename); if (nextFile.exists()){ String absolutePath = nextFile.getAbsolutePath(); try { // Display original model ((FileOpenOsimModelAction) FileOpenOsimModelAction.findObject( (Class)Class.forName("org.opensim.view.FileOpenOsimModelAction"), true)).loadModel(absolutePath, true); } catch (ClassNotFoundException ex) { ex.printStackTrace(); } catch (IOException ex) { DialogDisplayer.getDefault().notify( new NotifyDescriptor.Message("Error opening model file "+absolutePath)); }; if (i==descriptor.getCurrentModelIndex()){ saveCurrentModel=OpenSimDB.getInstance().getCurrentModel(); } } } if (saveCurrentModel!=null) setCurrentModel(saveCurrentModel, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized static void loadModels() throws SchemaProviderException {\n if (logger.isDebugEnabled()) {\n logger.debug(\"Loading OXM Models\");\n }\n\n for (SchemaVersion oxmVersion : translator.getSchemaVersions().getVersions()) {\n DynamicJAXBContext jaxbContext ...
[ "0.54304177", "0.53814465", "0.5273237", "0.52666956", "0.5257362", "0.5219699", "0.5204151", "0.51998734", "0.5125925", "0.50526756", "0.5050625", "0.50151604", "0.49928153", "0.4964519", "0.49604183", "0.49519467", "0.49284592", "0.48815894", "0.48712695", "0.48459983", "0....
0.6198956
0
/ Get the context = SimTK::State holder for the passed in model
public OpenSimContext getContext(Model model) { OpenSimContext dContext = mapModelsToContexts.get(model); if(dContext==null) return createContext(model, false); return (dContext); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public State getState() { return model.getState(); }", "public S getCurrentState();", "StateT getState();", "public GameState getGameStateModel() {\n return this.gameStateModel;\n }", "public static int\ngetLightModel(SoState state) \n{ \n\t SoLazyElement elem = getInstance(state);\n\t return...
[ "0.6639926", "0.6549087", "0.61613023", "0.5972188", "0.5941198", "0.59195954", "0.5911545", "0.5891988", "0.5890759", "0.5825639", "0.58142245", "0.577362", "0.577362", "0.577362", "0.577362", "0.57558066", "0.5746234", "0.56740826", "0.56526005", "0.5600403", "0.55886626", ...
0.6442887
2
Create a context to associate with the passed in model and add it to the global map.
public OpenSimContext createContext(Model aModel, boolean force) { OpenSimContext context = mapModelsToContexts.get(aModel); if (context ==null || force){ OpenSimContext newContext; try { newContext = new OpenSimContext(aModel.initSystem(), aModel); } catch (IOException ex) { ErrorDialog.displayExceptionDialog(ex); return null; } mapModelsToContexts.put(aModel, newContext); context = newContext; } return context; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void addUserContext(Map<String, Object> model) {\r\n\t\tUser user = new User();\r\n\t\tuser.setUsername(SecurityContextHolder.getContext().getAuthentication().getName());\r\n\t\tmodel.put(\"user\", user);\r\n\t}", "@Override\n\tpublic Context prepareModel(XDust dust, RenderChain chain, Context cont...
[ "0.6545432", "0.61671996", "0.57962704", "0.57759315", "0.57551354", "0.57406956", "0.56981134", "0.56253606", "0.5583051", "0.55555177", "0.54358566", "0.5382079", "0.5355325", "0.528656", "0.52814174", "0.52814174", "0.5267671", "0.526548", "0.5246297", "0.5210854", "0.5187...
0.6443045
1
Get gui elements for passed in model
public SingleModelGuiElements getModelGuiElements(Model aModel) { return mapModelsToGuiElements.get(aModel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object getModel();", "public Object getGuiObject();", "protected JPanel getModelPane() {\n JPanel result = new JPanel(new BorderLayout());\n ButtonGroup radios = new ButtonGroup();\n JPanel radioPanel = new JPanel();\n radioPanel.setLayout(new BoxLayout(radioPanel, BoxLayout.Y_AXIS));\n r...
[ "0.6167172", "0.61143523", "0.6085858", "0.60074604", "0.5994583", "0.5994583", "0.5994583", "0.59143573", "0.5896701", "0.58932984", "0.5870181", "0.5864789", "0.58146554", "0.5804531", "0.5804082", "0.5731552", "0.56751984", "0.56715876", "0.56206155", "0.56122893", "0.5571...
0.74740255
0
/ access modifiers changed from: protected
@Override // com.meizu.cloud.pushsdk.handler.p750a.C6687c /* renamed from: a */ public void mo42871a(MessageV3 messageV3, AbstractC6735c cVar) { if (cVar != null) { cVar.mo43104b(messageV3); mo42876b().mo42416b(mo42881c(), MzPushMessage.fromMessageV3(messageV3)); } }
{ "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
@Override // com.meizu.cloud.pushsdk.handler.p750a.C6687c /* renamed from: c */ public void mo42880b(MessageV3 messageV3) { C6777d.m40835b(mo42881c(), messageV3.getUploadDataPackageName(), messageV3.getDeviceId(), messageV3.getTaskId(), messageV3.getSeqId(), messageV3.getPushTimestamp(), messageV3.getDelayedReportMillis()); }
{ "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
@Override // com.meizu.cloud.pushsdk.handler.p750a.C6687c /* renamed from: d */ public void mo42883c(MessageV3 messageV3) { C6777d.m40828a(mo42881c(), messageV3.getUploadDataPackageName(), messageV3.getDeviceId(), messageV3.getTaskId(), messageV3.getSeqId(), messageV3.getPushTimestamp(), messageV3.getDelayedReportMillis()); }
{ "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
@Override // com.meizu.cloud.pushsdk.handler.p750a.C6687c /* renamed from: l */ public MessageV3 mo42868a(Intent intent) { MPushMessage mPushMessage = (MPushMessage) intent.getSerializableExtra(PushConstants.MZ_PUSH_PRIVATE_MESSAGE); return MessageV3.parse(mo42886e(intent), mo42877b(intent), mPushMessage.getTaskId(), mPushMessage); }
{ "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.73744047", "0.7040692", "0.692117", "0.69076973", "0.6844561", "0.68277687", "0.68048066", "0.6581614", "0.653803", "0.6500888", "0.64905626", "0.64905626", "0.6471316", "0.64376974", "0.64308083", "0.64308083", "0.642771", "0.6424499", "0.6419003", "0.64083034", "0.640539...
0.0
-1
Getter for ArrayList sequence.
ArrayList<Integer> getSequence() { return sequence; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList<Sequence> getSequenceList() {\n\t\treturn (ArrayList<Sequence>) sequences.clone();\n\t}", "public ArrayList<T> getAsList(){\r\n return arrayList;\r\n }", "public ArrayList getList() {\n \t\treturn list;\n \t}", "public abstract ArrayList<Integer>...
[ "0.7311274", "0.6868686", "0.6688399", "0.6329377", "0.6315792", "0.6177561", "0.6151261", "0.61241895", "0.60973287", "0.60721326", "0.6071459", "0.60214543", "0.5995965", "0.5954121", "0.595007", "0.58984554", "0.58746195", "0.58638597", "0.5860523", "0.58574855", "0.585733...
0.774999
0
Check if the user has made an error in the input of the sequence
boolean checkError() { Iterator<Integer> seq = sequence.iterator(); Iterator<Integer> in = input.iterator(); while (seq.hasNext() && in.hasNext()) { int a = seq.next(); int b = in.next(); if (a != b) { attempts++; return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean checkForWrongInput(){\n if(this.studentCode.getText().isEmpty())\n return true;\n //Check for length\n if(this.studentCode.getText().length() != 3)\n return true;\n //Check for invalid characters\n for(char c: this.studentCode.getText().toCha...
[ "0.6573091", "0.65607804", "0.65353096", "0.6464509", "0.64599633", "0.64378136", "0.64210343", "0.6417111", "0.63786185", "0.63760674", "0.63726425", "0.6364851", "0.635425", "0.62803155", "0.62313783", "0.6184292", "0.61790967", "0.6120591", "0.6100106", "0.607691", "0.6055...
0.73409426
0
Check if the user has won
boolean checkWin() { Iterator<Integer> seq = sequence.iterator(); Iterator<Integer> in = input.iterator(); while (seq.hasNext() && in.hasNext()) { seq.next(); in.next(); if (!seq.hasNext() && !in.hasNext()) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean checkForWin(){\n\t\t\n\t\tPlayer p = Game.getCurrPlayer();\n\t\t// if player made it to win area, player won\n\t\tif(p.won()){\n\t\t\tGame.gameWon = true;\n\t\t\tthis.network.sendWin();\n\t\t\treturn true;\n\t\t}\n\t\t// if player is the last player on the board, player won\n\t\tif(numPlayers == 1 &...
[ "0.7633371", "0.7393082", "0.7382032", "0.73322445", "0.7302629", "0.7278821", "0.7257874", "0.72492397", "0.72468704", "0.7211396", "0.7200699", "0.7192122", "0.7156309", "0.71546125", "0.71515465", "0.71510994", "0.7148361", "0.71411896", "0.7132758", "0.70943534", "0.70910...
0.0
-1
Method to update the user info.
ManageUserResponse updateUser(UserUpdateRequest user, Long userId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk updateUser\");\r\n\t}", "public void updateUserDetails() {\n\t\tSystem.out.println(\"Calling updateUserDetails() Method To Update User Record\");\n\t\tuserDAO.updateUser(user);\n\t}", "@Override\n\tpublic void updateUser(UserInfo ui) {\n\n\...
[ "0.778285", "0.77313215", "0.76914567", "0.75619096", "0.7555209", "0.75261307", "0.7479354", "0.7465086", "0.74551916", "0.7437823", "0.74336255", "0.7375387", "0.73432183", "0.73153156", "0.7305853", "0.72574306", "0.7252388", "0.7242462", "0.7237151", "0.7234857", "0.72348...
0.6449479
92
Compile the code using the Lava compiler, execute the code and return the output
public static String compileAndRun(String code) throws Exception { return run(LavaCompiler.compile(code)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T execute() {\n return GraalCompiler.compile(this);\n }", "private static void compileAndRun(String fileName, String code) {\n\n if(verboseCompiling) println(\"Deleting old temp files...\", warning);\n new File(fileName + \".java\").delete();\n new File(fileName + \"...
[ "0.6850367", "0.65904516", "0.65240043", "0.64722455", "0.6366433", "0.6365691", "0.6284032", "0.62275195", "0.6050799", "0.6003698", "0.597407", "0.59189916", "0.5877601", "0.5865632", "0.5861501", "0.5777998", "0.5746916", "0.5733209", "0.5687163", "0.56568146", "0.56563187...
0.73877305
0
Run a Lava Compilation
public static String run(Compilation compilation) throws Exception { for (String code : compilation.jFiles) { ClassFile classFile = new ClassFile(); classFile.getClassName(); classFile.readJasmin(new StringReader(code), "", false); Path outputPath = tempDir.resolve(classFile.getClassName() + ".class"); try (OutputStream output = Files.newOutputStream(outputPath)) { classFile.write(output); } } return runJavaClass(tempDir, JasminTemplate.MAIN_CLASS_NAME); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String compileAndRun(String code) throws Exception {\n\t\treturn run(LavaCompiler.compile(code));\n\t}", "public static void main(String[] args) {\n File file = new File(\"./src/testcode.c\");\n \n Compiler compiler = new Compiler(file);\n compiler.compile();\n }", "privat...
[ "0.627768", "0.6061934", "0.5802118", "0.5780006", "0.5683104", "0.55988306", "0.5502085", "0.5499619", "0.5499209", "0.54748744", "0.5436369", "0.5411441", "0.5383753", "0.5378936", "0.53331393", "0.53276336", "0.52759665", "0.5265008", "0.5250337", "0.5246942", "0.5235767",...
0.0
-1
Execute a '.class' file and return the output
public static String runJavaClass(Path dir, String className) throws IOException { Process process = Runtime.getRuntime().exec(new String[] { "java", "-cp", dir.toString(), className }); try (InputStream in = process.getInputStream()) { Scanner scanner = new Scanner(in); scanner.useDelimiter("\\A"); String result = scanner.hasNext() ? scanner.next() : ""; scanner.close(); return result; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JPClass getParsedClass(File f) throws Exception;", "private static void processClass(File file_name, final Histogram class_use, final Histogram method_use) {\n try {\n final InputStream object_stream=new FileInputStream(file_name);\n MethodCallEnumerator.analyzeClass(object_stream,class_use,m...
[ "0.6261667", "0.62341875", "0.6194332", "0.60884595", "0.6012382", "0.5959299", "0.5956613", "0.59317017", "0.5854129", "0.5823195", "0.57812494", "0.5731365", "0.57227254", "0.56646955", "0.56587857", "0.56315", "0.5628235", "0.5606547", "0.55756253", "0.55745494", "0.557258...
0.62757015
0
Byte[] rawHtml = transporter.send(new HtmlRequest(url)); return new Html(rawHtml);
public Html downloadHtml(String url){ HtmlRequest htmlRequest = new HtmlRequest(url); Byte[] rawHtml = transporter.send(htmlRequest.getAddress(), htmlRequest.getContext().getBytes()); return new Html(rawHtml); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public HTML getHtml() {\n return new HTML(url, body);\n }", "String renderHTML();", "public String getHTML() throws Exception {\n\t\t// create object to store html source text as it is being collected\n\t\tStringBuilder html = new StringBuilder();\n\t\t// open connection to given url\n\t\tURL url = n...
[ "0.7068405", "0.66495186", "0.650615", "0.6380286", "0.635128", "0.6348424", "0.62575054", "0.6058234", "0.6014036", "0.60092777", "0.59635806", "0.5909518", "0.5866989", "0.5851634", "0.5826804", "0.5817992", "0.5745536", "0.57155365", "0.57146984", "0.569443", "0.56262493",...
0.7117852
0
Job has exceeded retry attempts or shouldReRunOnThrowable() has decided to cancel.
@Override protected void onCancel(@CancelReason int cancelReason, @Nullable Throwable throwable) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected RetryConstraint shouldReRunOnThrowable(@NonNull Throwable throwable, int runCount, int maxRunCount) {\n return RetryConstraint.CANCEL;\n }", "@Override\n\t\tpublic boolean isRetry() { return false; }", "@Override\r\n\tpublic void jobFailed(Job failedJob, Job retry) {\n\t\tget...
[ "0.71963245", "0.619233", "0.6156959", "0.6151319", "0.6130715", "0.59979653", "0.5971644", "0.5964502", "0.5935099", "0.59236825", "0.5912186", "0.5910525", "0.59075147", "0.58630323", "0.5861215", "0.579296", "0.57815725", "0.5781075", "0.574415", "0.57114047", "0.5694849",...
0.0
-1
make the abstract methods
@Override public String getName() { if (amount > 1) { return amount + " Nickles"; } else { return amount + " Nickle"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract void method();", "@Override\n\tvoid methodabstract() {\n\t\t\n\t}", "@Override\n\tvoid methodAbstractAndSubclassIsAbstract() {\n\t\t\n\t}", "public void setupAbstract() {\n \r\n }", "public abstract void afvuren();", "@Override\n public void matiz() {\n System.out.println(\"New ...
[ "0.74972975", "0.7442675", "0.72259176", "0.7217626", "0.72107893", "0.71309584", "0.7059801", "0.7046268", "0.6965242", "0.68610287", "0.68587077", "0.684335", "0.6816949", "0.6790778", "0.6772651", "0.67645293", "0.6739057", "0.6729312", "0.6714725", "0.6712775", "0.6673239...
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { try { v6= inflater.inflate(R.layout.fragment_grom, container, false); recycler_groom=(RecyclerView)v6.findViewById(R.id.recycler_groom); }catch (Exception e) { } initData(); return v6; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup...
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.66251...
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.6862...
0.0
-1
A private constructor for the singleton design pattern.
private BubbleGravityBehaviour() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Singleton()\n\t\t{\n\t\t}", "private Singleton() {\n\t}", "private Singleton(){}", "private Singleton() { }", "private SingletonObject() {\n\n\t}", "private Singleton(){\n }", "private SingletonSample() {}", "private SingletonSigar(){}", "private Singleton() {\n if (instance != nu...
[ "0.8715998", "0.86476284", "0.8617816", "0.8610076", "0.84046286", "0.8236047", "0.8070266", "0.79931676", "0.79572606", "0.7889647", "0.7871956", "0.78313124", "0.7778092", "0.77406126", "0.7665781", "0.7638128", "0.75846606", "0.75745136", "0.7497876", "0.74850416", "0.7485...
0.0
-1
Returns the instance for the behaviour.
public static BubbleGravityBehaviour getInstance() { return INSTANCE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public org.omg.uml.behavioralelements.commonbehavior.Instance getInstance();", "Behavior getBehavior();", "public Logic getBehaviorTarget ()\n {\n return _behavior.getCurrentTarget();\n }", "public eBehavior getBehavior() {\n return behavior;\n }", "@Override\r\n\tpublic CMObject new...
[ "0.7132575", "0.6993322", "0.647352", "0.64611155", "0.6281869", "0.6257447", "0.62455535", "0.61816657", "0.6084547", "0.6051422", "0.5896773", "0.58859074", "0.579858", "0.5797848", "0.5794445", "0.5794445", "0.5757905", "0.5716242", "0.567084", "0.56616175", "0.5660641", ...
0.6450203
4
Provides the gravity behaviour for bubbles. As bubbles are not affected by gravity, it just returns the existing motion.
public void apply(Mover mover, CollisionComputer cc) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public float getGravity()\n {\n return gravity;\n }", "public Vector3 getGravity() {\n if (!isSupported())\n throw new UnsupportedOperationException(\"Gravity sensor not supported\");\n if (!isAvailable())\n throw new IllegalStateException(\"Gravity reading not ...
[ "0.70823556", "0.67827374", "0.6567245", "0.65402436", "0.6501717", "0.6344685", "0.61789805", "0.60402143", "0.585729", "0.5849453", "0.57422763", "0.57198083", "0.56506073", "0.562788", "0.5617574", "0.5616637", "0.56077915", "0.5577916", "0.55714124", "0.55282164", "0.5461...
0.0
-1
Explanation Inplace calculate the prefix XOR of input A. For each query [i, j], if i == 0, query result = A[j] if i != 0, query result = A[i 1] ^ A[j] Complexity Time O(N) O(1) extra space O(Q) for output
public int[] xorQueries(int[] A, int[][] queries) { int[] res = new int[queries.length], q; for (int i = 1; i < A.length; ++i) A[i] ^= A[i - 1]; for (int i = 0; i < queries.length; ++i) { q = queries[i]; res[i] = q[0] > 0 ? A[q[0] - 1] ^ A[q[1]] : A[q[1]]; } return res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int xorOperation(int n, int start) {\n\t\tint num = start;\n\t\tint ans = start;\n\t\tfor (int i = 1; i < n; i++) {\n\t\t\tnum = start + 2*i;\n\t\t\tans = ans^num;\n\t\t}\n\t\treturn ans;\n\t}", "static void findRepeating(int A[]) {\n int xor = 0;\n for (int i = 0; i < A.length; i++...
[ "0.6246851", "0.60140413", "0.5826614", "0.5800845", "0.5688873", "0.56875014", "0.5666193", "0.5653126", "0.5651183", "0.5640895", "0.5637091", "0.56225085", "0.5605396", "0.5593523", "0.5498118", "0.54976654", "0.5459265", "0.5433978", "0.5428117", "0.54215103", "0.5407927"...
0.64435947
0
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_tab2, container, false); //find webView layout //find id button1 = view.findViewById(R.id.buttonId1); button2 = view.findViewById(R.id.buttonId2); button3 = view.findViewById(R.id.buttonId3); button4 = view.findViewById(R.id.buttonId4); button5 = view.findViewById(R.id.buttonId5); button6 = view.findViewById(R.id.buttonId6); button7 = view.findViewById(R.id.buttonId7); button8 = view.findViewById(R.id.buttonId8); button1.setOnClickListener(this); button2.setOnClickListener(this); button3.setOnClickListener(this); button4.setOnClickListener(this); button5.setOnClickListener(this); button6.setOnClickListener(this); button7.setOnClickListener(this); button8.setOnClickListener(this); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup...
[ "0.6740675", "0.6725193", "0.67224836", "0.6699259", "0.6691596", "0.668896", "0.6687658", "0.66861755", "0.667755", "0.66756433", "0.6667425", "0.66667783", "0.6665166", "0.66614723", "0.66549766", "0.665031", "0.6643759", "0.6639389", "0.66378653", "0.66345453", "0.6626348"...
0.0
-1
endregion region Private Methods
private void initUI(ActivityUserListBinding binding) { userHolder = (UserParameterHolder) getIntent().getSerializableExtra(Constants.USER_PARAM_HOLDER_KEY); // Toolbar if(userHolder.return_types.equals("follower")) { initToolbar(binding.toolbar, getString(R.string.user_follower_list_toolbar_name)); }else { initToolbar(binding.toolbar, getString(R.string.user_following_list_toolbar_name)); } // setup Fragment setupFragment(new UserListFragment()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void co...
[ "0.65270585", "0.6388565", "0.62739754", "0.6255089", "0.6251729", "0.6216305", "0.6199533", "0.61808753", "0.6116142", "0.6116142", "0.6053167", "0.6046995", "0.60004693", "0.59820765", "0.5960422", "0.5960422", "0.59574", "0.5925643", "0.59235185", "0.5919939", "0.59197676"...
0.0
-1
The main entry point... your program starts here
public static void main(String[] args) throws java.io.IOException { char inChar = ' '; // Student data String accounts[][] = { {"Rachel", "500.1", "451.45", "2"}, {"Ross", "293.23", "120.45", "7"}, {"Monica", "423.3", "400.3", "4"}, {"Chandler", "628.4", "282.67", "3"}, {"Phoebe", "345.25", "84.4", "1"}, {"Joey", "123.4", "345.3", "8"}, {"Robin", "523.6", "500.45", "3"}, {"Lily", "264.43", "323.45", "6"}, {"Marshall", "523.3", "290.3", "7"}, {"Ted", "328.4", "584.6", "3"}, {"Barney", "545.35", "233.4", "5"}, {"Spongebob","673.4", "666.3", "9"} }; // Read student data ArrayList<Student> stuList = new ArrayList<>(); for(int i = 0; i < accounts.length; i++) { Student stu = new Student(accounts[i][0], Double.valueOf(accounts[i][1]), Double.valueOf(accounts[i][2]), Integer.valueOf(accounts[i][3])); stuList.add(stu); } // // test-Print // System.out.println("****Print Student Info****"); // // for(Student stu : stuList) { // stu.show(); // } // Construct an ArrayList to read commands ArrayList<Character> comList = new ArrayList<>(); do { System.out.println("*****Enter choice 'c' to get the number of students in each grade level, then press <enter>*****"); System.out.println("*****Enter choice 'p' to get the 2D-map of the stops, then press <enter>*****"); System.out.println("*****Enter choice 'h' to get the last three commands(when commands are more than three), then press <enter>*****"); System.out.println("*****Enter choice 'q' to quit, then press <enter>*****"); inChar = (char) System.in.read(); // Read '\r' and '\n' and do nothing System.in.read(); System.in.read(); // Read commands comList.add(inChar); // React to input and take appropriate action switch (inChar) { // Calculate how many students are in each grade level and list the results case 'c': System.out.println("*****Calculate Student Info****"); int count_elementery = 0; int count_middle = 0; for(Student stu : stuList) { if ( stu.getGrade() >= 1 && stu.getGrade() <= 6) count_elementery++; else if (stu.getGrade() >= 7 && stu.getGrade() <= 9) count_middle++; } System.out.println("Number of students in Elementery Grade Level(1-6): " + count_elementery); System.out.println("Number of students in Middle Grade Level(7-9): " + count_middle); break; // Print a region map (2D) that shows where a bus would need to stop for student pick-up/drop-off. // Allow custom map displays by grade level (i.e. Elementary (1-6), Middle (7-8), or All). case 'p': System.out.println("****Print 2D Region Map****"); //Generate 2D-Map SwingUtilities.invokeLater(() -> { // ScatterPlot obj = new ScatterPlot(stuList); // obj.myplot(); ScatterPlot2 obj = new ScatterPlot2(stuList); obj.main(); obj.setSize(800, 400); obj.setLocationRelativeTo(null); // obj.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); }); break; // Print a history of the last three commands case 'h': System.out.println("****Print Command History*****"); System.out.println("Last Three Command History:"+ comList.get(comList.size()-2) + "," + comList.get(comList.size()-3) + "," + comList.get(comList.size()-4)); break; } } // Exit on quit while (inChar != 'q'); System.out.println("Quiting..."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main() {\n \n }", "public static void main()\n\t{\n\t}", "public static void main (String []args){\n }", "public static void main(String[]args) {\n\t\n\t\t\n\n}", "public static void main(){\n\t}", "public static void main(String[] args) {\n \n \n \n\t}", "publi...
[ "0.7852616", "0.77244306", "0.7689179", "0.7655419", "0.76532686", "0.76419336", "0.76225054", "0.7614188", "0.76087534", "0.76087534", "0.7597549", "0.7562496", "0.7562496", "0.7556103", "0.7554594", "0.7545742", "0.7520332", "0.7520332", "0.75178415", "0.7511442", "0.750934...
0.0
-1
NOTE: The following input values will be used for testing your solution.
public static void main(String[] args) { System.out.println(nonRepeating("abcab")); // should return 'c' System.out.println(nonRepeating("abab")); // should return null System.out.println(nonRepeating("aabbbc")); // should return 'c' System.out.println(nonRepeating("aabbdbc")); // should return 'd' }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void solution() {\n\t\t\n\t}", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "public static void main(String[] args) {\n Random rand = new Random(47);\n int i, j, k;\n // Choose Value from 1 t0 100\n j = rand.nextInt(100) + 1;\n pr...
[ "0.6080465", "0.587108", "0.58327943", "0.57671106", "0.5751493", "0.574261", "0.56744576", "0.564408", "0.5630122", "0.5628605", "0.56180316", "0.5608336", "0.56032133", "0.5592197", "0.5568777", "0.55612934", "0.5560857", "0.55532104", "0.5544653", "0.5524433", "0.55243534"...
0.0
-1
Implement your solution below.
public static Character nonRepeating(String s) { Map<Character, Integer> charCount = new HashMap<>(); for (int i = 0; i < s.length(); i++) { char c = s.charAt(i); if (charCount.containsKey(c)) { charCount.put(c, charCount.get(c) + 1); } else { charCount.put(c, 1); } } for (int i = 0; i < s.length(); i++) { char c = s.charAt(i); if (charCount.get(c) == 1) { return c; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void solution() {\n\t\t\n\t}", "@Override\r\n\tpublic void solve() {\n\t\t\r\n\t}", "private void generateSolution() {\n\t\t// TODO\n\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n public void computeSatisfaction() {\n\n }", "@Override\r\n\tpublic void anularFact()...
[ "0.6768142", "0.6282288", "0.62196845", "0.61990964", "0.60912627", "0.6011783", "0.5985179", "0.5936904", "0.58896285", "0.5867924", "0.5858776", "0.58347464", "0.58206606", "0.5800501", "0.57240075", "0.572284", "0.5718453", "0.57143205", "0.57134277", "0.5706609", "0.57014...
0.0
-1
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof Owner)) { return false; } Owner other = (Owner) object; if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void se...
[ "0.6893012", "0.6836114", "0.67019653", "0.66372806", "0.66372806", "0.65897155", "0.65749645", "0.65749645", "0.65715593", "0.65715593", "0.65715593", "0.65715593", "0.65715593", "0.65715593", "0.6557948", "0.6557948", "0.65415126", "0.65214056", "0.65128523", "0.6484641", "...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { }
{ "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
113 use dfs recursive
public List<List<Integer>> pathSum(TreeNode root, int sum) { if(root==null) return res; dfs(root, sum, new ArrayList<Integer>()); return res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void dfs(){\n // start from the index 0\n for (int vertex=0; vertex<v; vertex++){\n // check visited or not\n if (visited[vertex]==false){\n Explore(vertex);\n }\n }\n }", "@Override\n public void dfs() {\n\n }", "public void dfs (St...
[ "0.72431463", "0.705093", "0.6852191", "0.6771606", "0.6740965", "0.6728702", "0.6693006", "0.6662907", "0.66604024", "0.66506356", "0.66316736", "0.6571372", "0.65510374", "0.65175444", "0.6512816", "0.6492601", "0.64302105", "0.64253694", "0.6417105", "0.6352658", "0.633843...
0.0
-1
isMoment = 1 ??????
public static String getUrl(int id,int type,int isMoment) { return SnsConstants.URL_GUANWANG+"?id="+id+"&type="+type+"&isMoment="+isMoment; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isLastMoment() {\n return isLastMoment;\n }", "private Moment() {}", "boolean hasInstant();", "double angMomentum();", "boolean hasDesiredTime();", "boolean isSetValuePeriod();", "boolean hasDuration();", "public boolean isPM() {\n\tif (end != null)\n\t return end....
[ "0.64703053", "0.6342975", "0.57966125", "0.5666652", "0.5614856", "0.56019443", "0.5593805", "0.5482443", "0.547135", "0.5469606", "0.5469606", "0.5469606", "0.54422015", "0.54422015", "0.54274124", "0.53197825", "0.5319119", "0.5312219", "0.5306146", "0.5278175", "0.5275777...
0.0
-1
Create repositories (group, remote, hosted) when trackingId is present. Otherwise create normal remote repository with specified name.
private ProxyCreationResult createRepo( String trackingId, URL url, String name ) throws IndyDataException { UrlInfo info = new UrlInfo( url.toExternalForm() ); UserPass up = UserPass.parse( ApplicationHeader.authorization, httpRequest, url.getAuthority() ); String baseUrl = getBaseUrl( url ); logger.debug( ">>>> Create repo: trackingId=" + trackingId + ", name=" + name ); ProxyCreationResult result = repoCreator.create( trackingId, name, baseUrl, info, up, LoggerFactory.getLogger( repoCreator.getClass() ) ); ChangeSummary changeSummary = new ChangeSummary( ChangeSummary.SYSTEM_USER, "Creating HTTProx proxy for: " + info.getUrl() ); RemoteRepository remote = result.getRemote(); if ( remote != null ) { storeManager.storeArtifactStore( remote, changeSummary, false, true, new EventMetadata() ); } HostedRepository hosted = result.getHosted(); if ( hosted != null ) { storeManager.storeArtifactStore( hosted, changeSummary, false, true, new EventMetadata() ); } Group group = result.getGroup(); if ( group != null ) { storeManager.storeArtifactStore( group, changeSummary, false, true, new EventMetadata() ); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void createRepository(String projectKey, String repoName, String parentProjectKey) throws VersionControlException;", "private void createNewRepository() {\n\t\tRepositoryConfiguration conf = repositorySettingsJPanel\n\t\t\t\t.getRepositoryConfiguration();\n\n\t\t/*\n\t\t * if (RepositoryType.HTTP.equals(conf.get...
[ "0.57747084", "0.57658935", "0.57013375", "0.5591081", "0.5320543", "0.5236211", "0.5209307", "0.5209136", "0.5182589", "0.51496845", "0.50989157", "0.5092753", "0.5059765", "0.50171936", "0.49687457", "0.49472332", "0.4908848", "0.49082914", "0.48698884", "0.48614517", "0.48...
0.659127
0
if repo with this name already exists, we need to use a different name
private String getRemoteRepositoryName( URL url ) throws IndyDataException { final String name = repoCreator.formatId( url.getHost(), getPort( url ), 0, null, StoreType.remote ); logger.debug( "Looking for remote repo starts with name: {}", name ); AbstractProxyRepositoryCreator abstractProxyRepositoryCreator = null; if ( repoCreator instanceof AbstractProxyRepositoryCreator ) { abstractProxyRepositoryCreator = (AbstractProxyRepositoryCreator) repoCreator; } if ( abstractProxyRepositoryCreator == null ) { return name; } Predicate<ArtifactStore> filter = abstractProxyRepositoryCreator.getNameFilter( name ); List<String> l = storeManager.query() .packageType( GENERIC_PKG_KEY ) .storeType( RemoteRepository.class ) .stream( filter ) .map( repository -> repository.getName() ) .collect( Collectors.toList() ); if ( l.isEmpty() ) { return name; } return abstractProxyRepositoryCreator.getNextName( l ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testOnlyOneRepoPerName() throws IOException, DuplicateRepoNameException, RepositoryNotFoundException {\n ConfigDatabase.instance().addRepo(testRepo1);\n assert testRepo1.getName().equals(testRepo1a.getName()); // conflicting names\n try {\n ConfigDatabase.inst...
[ "0.71016437", "0.6160195", "0.6097628", "0.5810618", "0.57731444", "0.57449955", "0.561171", "0.5576092", "0.55696696", "0.5568342", "0.5513823", "0.5501869", "0.543646", "0.5432003", "0.5367245", "0.53447795", "0.5257555", "0.5212242", "0.52078986", "0.5184106", "0.51643914"...
0.5654731
6
/ By default, OpenGL enables features that improve quality but reduce performance. One might want to tweak that especially on software renderer.
public void onSurfaceCreated(GL10 gl, EGLConfig config) { gl.glDisable(GL10.GL_DITHER); /* * Some one-time OpenGL initialization can be made here * probably based on features of this particular context */ gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_FASTEST); float ratio = (float) width / height; gl.glMatrixMode(GL10.GL_PROJECTION); gl.glLoadIdentity(); gl.glFrustumf(-ratio, ratio, -1, 1, 1, 10); if (mTranslucentBackground) { gl.glClearColor(0,0,0,0); } else { gl.glClearColor(0.07f, 0.639f, 0.7f, 1f); } gl.glMatrixMode(GL10.GL_MODELVIEW); gl.glEnable(GL10.GL_CULL_FACE); gl.glShadeModel(GL10.GL_FLAT); gl.glLineWidth(2f); //lighting // Define the ambient component of the first light gl.glEnable(GL10.GL_LIGHTING); gl.glEnable(GL10.GL_LIGHT0); gl.glEnable(GL10.GL_LIGHT1); gl.glEnable(GL10.GL_LIGHT2); float lightColor[] = {0.07f, 0.639f, 0.7f, 1f}; FloatBuffer light0Ambient = FloatBuffer.wrap(lightColor); float light1PositionVector[] = {1f, 0f, 0f, 0f}; FloatBuffer light1Position = FloatBuffer.wrap(light1PositionVector); float light2PositionVector[] = {-1f, 0f, 0f, 0f}; FloatBuffer light2Position = FloatBuffer.wrap(light2PositionVector); gl.glLightfv(GL10.GL_LIGHT1, GL10.GL_AMBIENT, light0Ambient); gl.glLightfv(GL10.GL_LIGHT1, GL10.GL_POSITION, light1Position); gl.glLightfv(GL10.GL_LIGHT2, GL10.GL_AMBIENT, light0Ambient); gl.glLightfv(GL10.GL_LIGHT2, GL10.GL_POSITION, light2Position); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void initGL() {\n glClearColor(152/255f, 175/255f, 199/255f, 0.0f);\n glMatrixMode(GL_PROJECTION);\n glLoadIdentity();\n GLU.gluPerspective(100.0f, (float)displayMode.getWidth()/(float)\n displayMode.getHeight(), 0.1f, 500);\n glMatrixMode(GL_MODELVI...
[ "0.7378095", "0.70807177", "0.70044065", "0.6975589", "0.6931261", "0.6799115", "0.67849773", "0.6773322", "0.6655905", "0.6516455", "0.64759916", "0.6419983", "0.63810796", "0.6341802", "0.62704617", "0.6253199", "0.6221465", "0.62156415", "0.6174242", "0.6140702", "0.612864...
0.6344838
13
Created by akash on 3/10/16.
public interface interfaceA extends LocationListener, SensorEventListener { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void interr() {\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n\tpubl...
[ "0.5872181", "0.58406717", "0.5765962", "0.570486", "0.56805634", "0.5675857", "0.5663815", "0.5660753", "0.5645679", "0.5631607", "0.5631607", "0.5631607", "0.5631607", "0.5631607", "0.5607304", "0.5607304", "0.55913264", "0.55854535", "0.55833155", "0.55769575", "0.5576871"...
0.0
-1
Constructor, sets m_file to a File handle on fname
public BiomartAccess(String fname) { m_file = new File(fname); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public FileReceiver(String filename) {\r\n _fileName = filename;\r\n }", "public File(String fileName) {\n\t\tthis(new java.io.File(fileName));\n\t}", "public ObjReader(String filename){\n file = filename;\n }", "public File() {\n\t\tthis.name = \"\";\n\t\tthis.data = \"\";\n\t\tthis.crea...
[ "0.7447958", "0.7390277", "0.7058465", "0.7031052", "0.6877609", "0.68630004", "0.6852197", "0.68412006", "0.6837662", "0.68367773", "0.6812295", "0.67814255", "0.67691463", "0.67505366", "0.67377794", "0.6639462", "0.6623912", "0.65846586", "0.65779203", "0.65771884", "0.655...
0.78336537
0
Executes the BioMart query in xmlMessage that counts the number of records satisfying query. Returns this count of records. This is used for the progress download.
public int executeCountQuery(String xmlMessage) throws IOException { URL biomartServer = new URL(SZBIOMARTURL); URLConnection conn = biomartServer.openConnection(); // use POST method conn.setDoOutput(true); OutputStreamWriter osw = new OutputStreamWriter(conn.getOutputStream()); osw.write("query=" + URLEncoder.encode(xmlMessage, "UTF-8")); osw.flush(); // read the response into a file BufferedReader brresponse = new BufferedReader(new InputStreamReader(conn.getInputStream())); String ln; ln = brresponse.readLine(); brresponse.close(); osw.close(); int numlines; try { numlines = Integer.parseInt(ln); } catch (NumberFormatException nfex) { throw new IllegalArgumentException("Count query did not return a number, instead returned "+ln); } if (numlines < 1) { throw new IllegalArgumentException("Count query returned "+numlines+" records. The number of "+ "records must be positive!"); } return numlines; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int query() {\n return totalcount;\n }", "public int query() {\n return count;\n }", "public long countRecords();", "public int getTotalMessageCount(){\n Query query = new Query(\"Message\");\n Query query2 = new Query(\"Question\");\n PreparedQuery results = datastore.prepare(q...
[ "0.7237387", "0.71075577", "0.6840442", "0.67879915", "0.677189", "0.677189", "0.669332", "0.66518146", "0.65849835", "0.6516508", "0.65022373", "0.65009075", "0.6470696", "0.6448994", "0.6448994", "0.6442599", "0.6435526", "0.6431022", "0.641986", "0.6406557", "0.63932544", ...
0.7552596
0
ExecuteQuery. xmlMessage is the string containing the BioMart query to execute. bos is the the output stream where the results of xmlMessage is written Updates npercentdone[nstatusfield] after obtaining lock on lockpd
public void executeQuery(BufferedOutputStream bos, String xmlMessage, int[] npercentdone,int nstatusfield, Object lockpd) throws IOException { URL biomartServer = new URL(SZBIOMARTURL); URLConnection conn = biomartServer.openConnection(); // use POST method conn.setDoOutput(true); OutputStreamWriter osw = new OutputStreamWriter(conn.getOutputStream()); osw.write("query=" + URLEncoder.encode(xmlMessage, "UTF-8")); osw.flush(); // read the response into a file BufferedReader brresponse = new BufferedReader(new InputStreamReader(conn.getInputStream())); String ln; int nlastpercentdone = 0; int nleft = nsingleset; String szeol = System.getProperty("line.separator"); while ((ln = brresponse.readLine()) != null) { String lnend = ln+szeol; if (lnend.startsWith("Query ERROR")) { //not going to bail just because cannot get locations System.out.println("Gene Location Download Error: "+lnend); } byte[] lnb = lnend.getBytes(); bos.write(lnb,0,lnb.length); if (nleft > 0) { //the actual number of lines can be greater than the number of records //we will not count these extra lines nleft--; nline++; } synchronized (lockpd) { int nval = (int) (100*nline/(double) numrecs); if (nval <= 99) { //we don't want to display 100, because we are not really done npercentdone[nstatusfield] =nval; if ((nlastpercentdone != npercentdone[nstatusfield])) { //only notify interface if percentage has changed nlastpercentdone = npercentdone[nstatusfield]; lockpd.notifyAll(); } } } } brresponse.close(); osw.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void executeQuery() {\n }", "public int executeCountQuery(String xmlMessage) throws IOException \n {\n URL biomartServer = new URL(SZBIOMARTURL);\n URLConnection conn = biomartServer.openConnection();\n\t\n // use POST method\n conn.setDoOutput(true);\n OutputStreamWriter os...
[ "0.5439683", "0.5357028", "0.533879", "0.5210095", "0.5172911", "0.5146493", "0.51435953", "0.5120599", "0.5025151", "0.50173366", "0.50170153", "0.5005651", "0.49836048", "0.49812454", "0.4977901", "0.49771", "0.49708375", "0.4949924", "0.4928318", "0.49242553", "0.49233112"...
0.73937166
0
///////////////////////////////////////////////////////////////////////// Gets a HashSet of valid attributes for the gene location
public HashSet getValidAttributes(String szdataset) throws IOException { HashSet hs = new HashSet(); String xmlMessage; String szMetaQuery ="?virtualSchema=default&type=attributes&dataset="+szdataset; URL biomartServer = new URL(SZBIOMARTURL+szMetaQuery); URLConnection conn = biomartServer.openConnection(); // use POST method BufferedReader brresponse = new BufferedReader(new InputStreamReader(conn.getInputStream())); String szLine; while ((szLine = brresponse.readLine())!=null) { StringTokenizer st = new StringTokenizer(szLine,"\t"); if (st.hasMoreTokens()) { String szattribute = st.nextToken(); hs.add(szattribute); } } brresponse.close(); return hs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public HashSet<String> getUsefulAttributes() {\n\t\t \n\t\tHashSet<String> attr = new HashSet<>();\n\t\tQuery firstQ = this.rset.get(1); // get first query on rewriting set 'rset'.\n\t\t\n\t\tGrouping gPart = firstQ.getQueryTriple()._1();\n\t attr.addAll(gPart.getUsefulAttributes());\n\t \n\t Measuring mP...
[ "0.6800372", "0.67176086", "0.6394203", "0.61206865", "0.6066592", "0.5999814", "0.599219", "0.59565353", "0.594432", "0.58729035", "0.5850958", "0.58471626", "0.57826763", "0.57629985", "0.5748398", "0.57368726", "0.57350636", "0.5714989", "0.5712109", "0.5687345", "0.568734...
0.6220061
3
Species is the name of the species to download the locations for. Updates npercentdone[nstatusfield] with status, first gets lock on lockpd
public void updateGeneFile(String species,String szoutfile,int[] npercentdone,int nstatusfield, Object lockpd) throws IOException { // try opening the configuration file BufferedReader brspecies = new BufferedReader(new FileReader(m_file)); // read line by line and try to find the species String ln = ""; String[] fields = null; boolean bfound = false; while ((!bfound)&&((ln = brspecies.readLine()) != null)) { fields = ln.split(","); String[] szIDpre = fields[0].split("_"); // is this the right species? if (szIDpre[0].equalsIgnoreCase(species)) { bfound = true; } } // close the file brspecies.close(); if (!bfound) { //species was not found throw an errir throw new IllegalArgumentException("The species provided - " + species + " - is not found in "+m_file); } if (fields.length < 2) { throw new IllegalArgumentException("Line "+ln+" in "+m_file+" only has one entry, no delimiting ',' found"); } String xmlMessagePre, //The initial part of the message needed for both xmlMessagePost, //The part of the message immediately after the query params //These are the non-alias attributes xmlMessageEnding, //The last part of the message needed xmlMessageCount1, //Specifies query params where count=1 //meaning just a count of numrecords satisfying query is returned xmlMessageCountEmpty; //Specifies query params where count is empty meaning //the query actually returns the records // construct the xml message for the request xmlMessagePre = "<?xml version = \"1.0\" encoding = \"UTF-8\"?>"; xmlMessagePre += "<!DOCTYPE Query>"; xmlMessageCount1 = "<Query virtualSchemaName = \"default\" uniqueRows = \"1\" count = \"1\" softwareVersion = \"0.6\" >"; xmlMessageCountEmpty = "<Query virtualSchemaName = \"default\" uniqueRows = \"1\" count = \"\" softwareVersion = \"0.6\" >"; xmlMessagePost = "<Dataset name = \"" + fields[0] + "\" interface = \"default\" >"; xmlMessagePost += "<Attribute name = \"chromosome_name\" />"; xmlMessagePost += "<Attribute name = \"start_position\" />"; xmlMessagePost += "<Attribute name = \"end_position\" />"; xmlMessagePost += "<Attribute name = \"strand\" />"; xmlMessagePost += "<Attribute name = \"ensembl_gene_id\" />"; xmlMessageEnding = "</Dataset>"; xmlMessageEnding += "</Query>"; String xmlMessageCount = xmlMessagePre + xmlMessageCount1 + xmlMessagePost + xmlMessageEnding; nsingleset = executeCountQuery(xmlMessageCount); // output file writer BufferedOutputStream bos = new BufferedOutputStream(new GZIPOutputStream(new FileOutputStream(szoutfile))); //write in the species name in the first line of the file //writes the species field to the file String szeol = System.getProperty("line.separator"); String szspecieseol = fields[1] + szeol; byte[] lnb = szspecieseol.getBytes(); bos.write(lnb,0,lnb.length); String xmlMessage = xmlMessagePre + xmlMessageCountEmpty + xmlMessagePost; // messages can contain at most 3 alias attributes // if we have more than that, need too break // up into several requests boolean run_last = true; nline = 0; //we haven't read any lines yet String query; HashSet hsvalidAttributes = getValidAttributes(fields[0]); // add in species-specific gene ids if (fields.length > 2) { String[] aliases = fields[2].split(":"); numrecs = nsingleset*((int) Math.ceil(aliases.length/(double)NMAXATTR)); query = xmlMessage; for (int i = 0; i < aliases.length; i++) { if (hsvalidAttributes.contains(aliases[i])) { query += "<Attribute name = \"" + aliases[i] + "\" />"; // a query is being constructed. It might // need to be run through the last request run_last = true; if (i % NMAXATTR == (NMAXATTR-1)) { //last alias attribute of the query, going to execute it query += xmlMessageEnding; // close the xml doc executeQuery(bos, query,npercentdone,nstatusfield,lockpd); // reset query for reuse query = xmlMessage; // all attributes so far have been processed // no need to run the last request run_last = false; } } } } else { query = xmlMessage; } // last request. Picks up everything not processed by loop above. // including if the loop above wasn't executed at all because // there were no extra aliases to query. if (run_last) { query += xmlMessageEnding; executeQuery(bos, query,npercentdone,nstatusfield,lockpd); } // close the xml doc bos.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void\n\tcheck99PercentBug()\n\t{\n\n\t\tif ( mainloop_loop_count % MAINLOOP_SIXTY_SECOND_INTERVAL == 0 ) {\n\n\t\t\tlong\tnow = SystemTime.getCurrentTime();\n\n\t\t\tfor ( int i=0;i<pePieces.length;i++){\n\n\t\t\t\tPEPiece\tpe_piece = pePieces[ i ];\n\n\t\t\t\tif ( pe_piece != null ){\n\n\t\t\t\t\tDiskMana...
[ "0.53152514", "0.5240702", "0.51726115", "0.51671845", "0.5156841", "0.5128174", "0.5120854", "0.50697756", "0.5015259", "0.49898925", "0.49325222", "0.47913498", "0.47862276", "0.47727284", "0.4770786", "0.47344387", "0.4710829", "0.46891463", "0.46739614", "0.4664619", "0.4...
0.55612034
0
This method defines a way of getting the current weather conditions for a given coordinate.
public abstract WeatherData getCurrentWeather(LocationCoordinate _location) throws Exception;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void getWeather(String city, String units);", "@GetMapping(\"/weather/current\")\n public Location getCurrentWeather(@RequestParam(value = \"city\", required = false) final String city, @RequestParam(value = \"country\", required = false) final String country, @RequestParam(value = \"lon\", required = ...
[ "0.60750115", "0.5894625", "0.5789861", "0.5764242", "0.5747412", "0.57180727", "0.56975526", "0.567478", "0.5496671", "0.5467048", "0.53828365", "0.5362221", "0.5334541", "0.5284719", "0.5268215", "0.5265438", "0.524225", "0.5209371", "0.5201199", "0.5188813", "0.51567477", ...
0.623382
0
This method defines a way got getting the daily weather forecast conditions for a given coordinate.
public abstract WeatherData[] getDailyWeatherForecast(LocationCoordinate _location) throws Exception;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract WeatherData[] getHourlyWeatherForecast(LocationCoordinate _location) throws Exception;", "private static void getWeatherDataForInputValues(BigDecimal lat, BigDecimal lon) throws RemoteException{\n\t\t\n\t\tCalendar time = new GregorianCalendar();\t\t\t\t// Pass this as a GregorianCalendar for th...
[ "0.63722724", "0.6057269", "0.60296744", "0.5778082", "0.5527695", "0.54936033", "0.5490559", "0.54859775", "0.54753196", "0.546534", "0.54472995", "0.5342098", "0.5310028", "0.5307954", "0.5245625", "0.52390766", "0.5226616", "0.5189817", "0.51778316", "0.5176953", "0.517062...
0.7002869
0
This method defines a way of getting the hourly weather forecast conditions for a given coordinate.
public abstract WeatherData[] getHourlyWeatherForecast(LocationCoordinate _location) throws Exception;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract WeatherData[] getDailyWeatherForecast(LocationCoordinate _location) throws Exception;", "public abstract WeatherData getCurrentWeather(LocationCoordinate _location) throws Exception;", "@Override\n\tpublic String getHourlyWeatherData(String city, String country) throws IOException {\n\t\t\n\t\t...
[ "0.6325478", "0.57907045", "0.5565308", "0.5435895", "0.54276663", "0.53921247", "0.53891265", "0.53751147", "0.5371733", "0.5314582", "0.5305638", "0.52903014", "0.5290045", "0.52559435", "0.5248497", "0.5210306", "0.52071464", "0.51117754", "0.5107469", "0.50737566", "0.506...
0.7056682
0
Takes the item code and assigns a String value according to the type name.
ItemType(String itemCode) { code = itemCode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ItemType(String code) {\n this.code = code;\n }", "ItemType(String code) {\n this.code = code;\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic void put(int typecode, String value) {\r\n\t\tdefaults.put( new Integer(typecode), value );\r\n\t}", "public void put(int typeCode, String value) {\n\t\td...
[ "0.73800373", "0.73800373", "0.679248", "0.6631405", "0.6554892", "0.6431378", "0.60576123", "0.5990002", "0.58789724", "0.5829449", "0.57807535", "0.57634264", "0.5718033", "0.5715836", "0.5697801", "0.5696597", "0.56938195", "0.5687047", "0.56591266", "0.5625799", "0.562579...
0.7488397
0
replace the node as the next, which is very smart :) however, it's bloody slow.
public void deleteNode(ListNode node) { node.val = node.next.val; node.next = node.next.next; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Node setNextNode(Node node);", "public void setNext(Node<E> next) { this.next = next; }", "public void setNext(Node n) { next = n; }", "public void setNext(DNode newNext) { next = newNext; }", "public void setNextNode(Node<T> next) {\n itsNext = next;\n }", "public void setNext(N...
[ "0.78883415", "0.74440813", "0.7421473", "0.73009145", "0.71842957", "0.7063635", "0.7062256", "0.70427847", "0.7036158", "0.70129424", "0.70110285", "0.70048445", "0.6969508", "0.6964685", "0.69584626", "0.6940348", "0.693265", "0.68760324", "0.68739754", "0.68637323", "0.68...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { LinkedList<Q7e> employee = new LinkedList<Q7e>(); employee.add(new Q7e("Dell","Engineering",40)); employee.add(new Q7e("Jane","Management",35)); Collections.sort(employee); for(Q7e x : employee) { System.out.println(x); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
/CallShowSetVideoProtocol callShowSetVideoProtocol; UpCallShowSetVideoData upCallShowSetVideoData;
private void setVideo(){ /* if(detailsBean==null){ showToast("没有获取到信息"); return; } UserManager.getInstance().setDetailsBean(detailsBean); upCallShowSetVideoData = new UpCallShowSetVideoData(); upCallShowSetVideoData.smobile = Preferences.getString(Preferences.UserMobile,null); upCallShowSetVideoData.iringid = detailsBean.iringid; if (callShowSetVideoProtocol == null) { callShowSetVideoProtocol = new CallShowSetVideoProtocol(null, upCallShowSetVideoData, handler); callShowSetVideoProtocol.showWaitDialog(); } callShowSetVideoProtocol.stratDownloadThread(null, ServiceUri.Spcl, upCallShowSetVideoData, handler,true);*/ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void startVideoCall() {\n if (!EMClient.getInstance().isConnected())\n Toast.makeText(ChatDetailsActivity.this, R.string.not_connect_to_server, Toast.LENGTH_SHORT).show();\n else {\n startActivity(new Intent(ChatDetailsActivity.this, VideoCallActivity.class).putExtra(\...
[ "0.66157794", "0.61970925", "0.61487514", "0.6088574", "0.6065898", "0.60593057", "0.60545", "0.60409456", "0.60400486", "0.60067296", "0.59028167", "0.58791846", "0.5875489", "0.5875473", "0.58741564", "0.5859121", "0.58480453", "0.58404", "0.5806685", "0.5804457", "0.578574...
0.77203727
0
this method calls the twilio api to send sms to users
public String sendSms(String receiverMobNumber, String actualMessage) { String ack = "failed"; String sid = ExternalProperties.getAppConfig("sms.auth.sid"); String decryptedSid = AES.decrypt(sid); String token = ExternalProperties.getAppConfig("sms.auth.token"); String decryptedToken = AES.decrypt(token); Twilio.init(decryptedSid, decryptedToken); String formattedMessage = "Dear Customer,\n" + actualMessage; Message twilioMessage = null; String senderNumber = ExternalProperties.getAppConfig("sms.sender.number"); twilioMessage = Message.creator(new PhoneNumber(receiverMobNumber), // to new PhoneNumber(senderNumber), // from formattedMessage).create(); if (twilioMessage != null && null != twilioMessage.getSid()) ack = "ReceivedByTwilio"; return ack; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SendSMSResponse sendSMSProcess(SendSMSRequest smsRequest) throws Exception;", "public void sendSms() {\n\n }", "void requestSendSMSCode(Context context,String phone);", "@Override\n public void sendSms(String smsBody) {\n }", "public java.lang.String sendSMS(java.lang.String accessCode, java.lang.Stri...
[ "0.75879985", "0.7406161", "0.6965352", "0.68259984", "0.67904896", "0.6769133", "0.6751193", "0.6743582", "0.67432034", "0.67243725", "0.66391766", "0.6538997", "0.653233", "0.65259933", "0.6443084", "0.64365375", "0.6422887", "0.63886875", "0.6339056", "0.63288975", "0.6288...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { Members_Inner_class a = new Members_Inner_class(); Members_Inner_class.Inner obj = a.new Inner();//Members obj.msg(); }
{ "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
long fixedDelay = getFixedDelayComponentNanos(timeout, unit); long randMod = getRandomDelayModulusNanos(timeout, unit);
public boolean transferMoney(Account fromAcct, Account toAcct, DollarAmount amount, long timeout, TimeUnit unit) throws DollarAmount.InsufficientFundsException, InterruptedException { long stopTime = System.nanoTime() + unit.toNanos(timeout); for (; ; ) { if (fromAcct.lock.tryLock()) { try { if (toAcct.lock.tryLock()) { try { if (fromAcct.getBalance().compareTo(amount) < 0) { throw new DollarAmount.InsufficientFundsException(); } else { fromAcct.debit(amount); toAcct.credit(amount); return true; } } finally { toAcct.lock.unlock(); } } } finally { fromAcct.lock.unlock(); } } if (System.nanoTime() > stopTime) return false; // TimeUnit.NANOSECONDS.sleep(fixedDelay + rnd.nextLong() % randMod); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getDelay();", "public double getDelay();", "long getInitialDelayInSeconds();", "private void changeDelay() {\n delay = ((int) (Math.random() * 10000) + 1000) / MAX_FRAMES;\n }", "public static void randomDelay() {\n\n Random random = new Random();\n int delay = 500 + ran...
[ "0.7037306", "0.68387073", "0.6730982", "0.66528946", "0.650288", "0.64582163", "0.63528764", "0.6333456", "0.6299099", "0.6265326", "0.6226698", "0.6180986", "0.61597735", "0.6094301", "0.6044113", "0.6039049", "0.59824485", "0.5968935", "0.5962792", "0.5954478", "0.5941531"...
0.0
-1
/Cover the concept of Inheritance using constructor and Inheritance using Method Overriding
public static void main(String args[]) { InheritanceUsingConstrChild child=new InheritanceUsingConstrChild(); child.display(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ConStructorInheritance(){\r\n\t\t\r\n\t\tSystem.out.println(\"Parent Class Constructor\");\r\n\t\t\r\n\t\t\r\n\t}", "Inheritance createInheritance();", "protected Animal() {\t\r\n\t}", "_ExtendsNotAbstract() {\n super(\"s\"); // needs this if not default ctor;\n }", "Base1()\r\n\t{\r\n\t\t...
[ "0.7186282", "0.70980686", "0.66109985", "0.64565575", "0.63878334", "0.63734674", "0.6257726", "0.6228441", "0.62130404", "0.61823285", "0.6180804", "0.61560774", "0.6143492", "0.61000395", "0.60939753", "0.6046036", "0.6025775", "0.60201323", "0.60126", "0.5985356", "0.5962...
0.0
-1
Returns the Paint object this renderer uses for drawing highlight indicators.
public Paint getPaintHighlight() { return mHighlightPaint; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Paint getPaint() {\n return mPaint;\n }", "public Paint getPaint()\r\n\t{\r\n\t\treturn _g2.getPaint();\r\n\t}", "public Paint getPaint() {\n return paint;\n }", "Shape getHighlightShape();", "public Painter getPainter()\n/* */ {\n/* 113 */ return this.painter;\...
[ "0.66284037", "0.6607929", "0.66024023", "0.6511628", "0.6489654", "0.63783115", "0.6163262", "0.61030847", "0.6075627", "0.60704315", "0.60555106", "0.6019328", "0.6003425", "0.59156626", "0.58868223", "0.5820639", "0.57156706", "0.57136124", "0.56824875", "0.56669706", "0.5...
0.7637198
0
Returns the Paint object used for rendering.
public Paint getPaintRender() { return mRenderPaint; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Paint getPaint() {\n return mPaint;\n }", "public Paint getPaint() {\n return paint;\n }", "public Paint getPaint()\r\n\t{\r\n\t\treturn _g2.getPaint();\r\n\t}", "@Override\n public Paint getPaint() {\n if (illegal()){\n Paint temp = new Paint(super.get...
[ "0.7617022", "0.7569715", "0.7437127", "0.6884111", "0.6499319", "0.64691263", "0.62456167", "0.6102692", "0.5995833", "0.59666246", "0.5908288", "0.58734745", "0.58725595", "0.58485407", "0.5706731", "0.5685949", "0.5676435", "0.5573267", "0.55467117", "0.5535918", "0.553528...
0.74309784
3
still without memory management
public Path insidePath(float startAngle, float sweepAngle, float radius){ Path path = new Path(); //FPoint startPoint = sliceStartPoit(startAngle, radius); //path.moveTo(startPoint.x, startPoint.y); FPoint center = mChart.getCenterOfCircleBox(); RectF rect = new RectF(); rect.set(center.x - radius, center.y - radius, center.x + radius, center.y + radius); path.arcTo(rect, startAngle, sweepAngle); path.close(); return path; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "StackManipulation cached();", "protected java.util.List x (java.lang.String r19){\n /*\n r18 = this;\n r0 = r18;\n r2 = r0.K;\n r0 = r19;\n r2 = r2.getAllSortStackTraces(r0);\n r2 = (java.util.List) r2;\n ...
[ "0.54520375", "0.5442649", "0.5325575", "0.5300844", "0.5257499", "0.5253955", "0.5237158", "0.5235677", "0.5229169", "0.5198539", "0.5163469", "0.5126427", "0.5121691", "0.511925", "0.51005566", "0.50985897", "0.50948405", "0.50589645", "0.5049344", "0.50330096", "0.50263685...
0.0
-1
Create job with given argument.
private VisorPortableCollectMetadataJob(Long lastUpdate) { super(lastUpdate); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "JobResponse create();", "@Override\n\tpublic PdiJobWrapper createJob(String jobFile, String[] args) {\n\t\ttry {\n\t\t\tLOGGER.info(\"Creating job based upon \" + jobFile);\n\t\t\tJobMeta jobMeta = new JobMeta(this.getLogWriter(), jobFile, null, null);\n\t\t\tJob job = new Job(this.getLogWriter(), this.getStepLo...
[ "0.6856663", "0.6730894", "0.666986", "0.64441156", "0.6228099", "0.617468", "0.6170687", "0.6151155", "0.6093322", "0.59966135", "0.5992709", "0.5957167", "0.5933924", "0.5933924", "0.59184384", "0.59121007", "0.59016985", "0.5887618", "0.58843654", "0.58829343", "0.5850708"...
0.0
-1
Multiply two colors by each other. Treats 0xff as 1.0. Yourself came up with the algorithm, I'm sure it makes sense to someone
public int colorMult(int x, int y) { int res = 0; for (int octet = 0; octet < 3; ++octet) { res |= (((x & 0xff) * (y & 0xff)) / 0xff) << (octet << 3); x >>= 8; y >>= 8; } return res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int mixSigColor(int c1, int c2, int ratio) {//0~100\r\n return 0xff & (((c2 * ratio) + (c1 * (100 - ratio))) / 100);\r\n }", "private static int mixColors(float t, byte r1, byte g1, byte b1, byte a1, byte r2, byte g2, byte b2, byte a2) {\n final int r = lerp(t, r1, r2);\n f...
[ "0.7032716", "0.6754499", "0.63465613", "0.6211575", "0.6179101", "0.6082806", "0.60792506", "0.60284114", "0.59882027", "0.5872322", "0.5858049", "0.58530027", "0.5843057", "0.5732864", "0.5721188", "0.5705787", "0.57021844", "0.56729794", "0.5664708", "0.5657963", "0.563485...
0.7092947
0
Check if a render is necessary, and if so, do one.
private void tryARender() { if (Minecraft.theMinecraft.thePlayer == null) return; try { if (MinimapConfig.getInstance().isEnabled() && map.isDirty(Minecraft.theMinecraft.thePlayer.posX, Minecraft.theMinecraft.thePlayer.posZ)) { mapCalc(); map.timer = 1; } } catch (RuntimeException e) { throw e; } finally { map.timer++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract boolean isRenderRedirectAfterDispatch();", "public boolean isReadyToRender() {\n return mHasSwapChain;\n }", "public abstract boolean isRenderRedirect();", "public boolean isRender()\r\n/* 284: */ {\r\n/* 285:307 */ if (this.tipoReporte.ordinal() == 1) {\r\n/* 286:308 */ ...
[ "0.62552714", "0.6155259", "0.59209985", "0.58129054", "0.57642466", "0.57311624", "0.5721363", "0.5718536", "0.5588053", "0.5566144", "0.55644894", "0.54504937", "0.5425642", "0.5419135", "0.53915995", "0.53890216", "0.5270776", "0.52351487", "0.52211165", "0.5215279", "0.52...
0.0
-1
the run() to implement runnable the main function of the other thread. when threading is disabled, this simply idles and the actual work is done in onRenderTick().
public void run() { while (true) { try { if (Minecraft.theMinecraft != null && Minecraft.theMinecraft.theWorld != null) { //can not multithread in SP if (!Minecraft.theMinecraft.theWorld.isRemote){ Thread.sleep(1000); } else { tryARender(); } } Thread.sleep(100); } catch (Exception e) { e.printStackTrace(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void run() {\n\t\t\n\t\t\n\t\twhile (running) {\n\t\t\tupdate();\n\t\t\ttry {\n\t\t\t\tthread.sleep(1);\n\t\t\t} catch (InterruptedException e) {\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\trender();\n\t\t}\n\t\t\n\t}", "public void run(){\n //logic to execute in a thread ...
[ "0.72225463", "0.71183604", "0.6975212", "0.6953414", "0.69325024", "0.6929681", "0.69154876", "0.6915286", "0.6910739", "0.68994105", "0.68843555", "0.6841076", "0.6840096", "0.6837316", "0.6836835", "0.6830212", "0.682668", "0.682668", "0.682668", "0.682668", "0.682668", ...
0.0
-1
Called each tick of the render.
void onRenderTick() { if (zCalc == null || !zCalc.isAlive()) { zCalc = new Thread(this); zCalc.start(); } if (Minecraft.theMinecraft != null && Minecraft.theMinecraft.theWorld != null) { if (!Minecraft.theMinecraft.theWorld.isRemote){ tryARender(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void tick() {\n\t\trenderer.render(this);\n\t}", "public void onRenderTick() {\n updateLang();\n updateRenderEngine();\n }", "public final void calledDuringRender() {\n calledEveryFrame();\n numFrames++;\n }", "@Override\n\tpublic void render(float deltaT...
[ "0.83008415", "0.7945685", "0.79348207", "0.744025", "0.72597426", "0.71707916", "0.71469206", "0.7119619", "0.71147573", "0.71115774", "0.70843935", "0.7081382", "0.70740396", "0.7037303", "0.70242053", "0.7000185", "0.69678557", "0.69578886", "0.6951511", "0.6944905", "0.69...
0.64138323
96
This constructor inits state, but does not start the thread.
public MapCalculator(ZanMinimap minimap) { map = minimap.map; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ImageThread() {\n\t}", "public ThreadState(KThread thread) \n {\n this.thread = thread;\n setPriority(priorityDefault);\n }", "private ThreadUtil() {\n \n }", "protected void initialize() {\n \tthis.running= false...
[ "0.67689914", "0.66909444", "0.6646242", "0.6613907", "0.6555319", "0.65507466", "0.65195143", "0.6518641", "0.65180165", "0.6509808", "0.6488413", "0.6487231", "0.6472074", "0.6363015", "0.6266172", "0.6235961", "0.6224247", "0.61586463", "0.6145384", "0.6134115", "0.6128109...
0.0
-1
Start up the other thread. The thread may return early at this point, as there might not be a Minecraft instance available yet. if that occurs, the thread will be restarted by the keepalive in onRenderTick().
public void start() { zCalc.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void start() {\n // EFFECTS: starts a new thread from this instance.\n (new Thread(instance)).start();\n }", "void onRenderTick() {\n \t\tif (zCalc == null || !zCalc.isAlive()) {\n \t\t\tzCalc = new Thread(this);\n \t\t\tzCalc.start();\n \t\t}\n \t\tif (Minecraft.theMinecraft != null && Minecraft.t...
[ "0.6483913", "0.6397103", "0.6377729", "0.63560355", "0.63356686", "0.6213914", "0.6139363", "0.613097", "0.61171085", "0.6080935", "0.60724807", "0.6068294", "0.6067886", "0.605011", "0.60498583", "0.60346866", "0.6022667", "0.5982767", "0.59435886", "0.59435886", "0.5936677...
0.0
-1
Top Menu event handling
public void theGameMenuClicked() { System.out.println("THE GAME (you just lost it)"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onMenuNew() {\n handleMenuOpen(null);\n }", "@Override\r\npublic void menuSelected(MenuEvent arg0) {\n\t\r\n}", "@Override\n public void menuSelected(MenuEvent e) {\n \n }", "public void menuItemClicked( Menu2DEvent e );", "@Override\n\tpublic void menuSelected(MenuEvent ...
[ "0.71405435", "0.71401507", "0.70632756", "0.6974554", "0.68933505", "0.68550956", "0.6657451", "0.66324896", "0.6585744", "0.6562877", "0.6557576", "0.65506256", "0.64267814", "0.64102966", "0.6404893", "0.6370399", "0.6362467", "0.6346057", "0.6335668", "0.63345915", "0.632...
0.0
-1
Top Menu event end
public void closeOptions() { PopupManager.closePopup(n, optionsPopup); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void exitMenu(){\n }", "public void onMenuNew() {\n handleMenuOpen(null);\n }", "public void exitToMenu()\n {\n exitToMenuFlag = true;\n }", "@Override\n\t\tpublic void closeMenu() {\n\t\t}", "@Override\r\npublic void menuDeselected(MenuEvent arg0) {\n\t\r\n}", "public vo...
[ "0.69919854", "0.69900656", "0.68556887", "0.6787083", "0.67624253", "0.6733088", "0.66991484", "0.6690804", "0.66663456", "0.6652836", "0.66521007", "0.6650742", "0.66195464", "0.657005", "0.6544851", "0.6513339", "0.64818466", "0.6454876", "0.63960725", "0.6384547", "0.6379...
0.0
-1
Use null to hide the panel.
public void setInfoLabelText(String text) { Label infoLabel = s.findNiftyControl("infoLabel", Label.class); if (text != null) { infoLabel.setText(text); infoPanel.setVisible(true); } else infoPanel.setVisible(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void hideIt(){\n this.setVisible(false);\n }", "public void hide() {\n visible=false;\n }", "@Override\n\tpublic void hide() {\n\t\tdispose();\n\n\t}", "@Override\n\tpublic void hide() {\n\t\tdispose();\n\t}", "public void hide() {\n }", "private void hide() {\n\t}", "@Override\r\n\tp...
[ "0.77710235", "0.7691442", "0.7638738", "0.7613693", "0.76125133", "0.76067823", "0.7606302", "0.7606302", "0.7606302", "0.7606302", "0.7606302", "0.7606302", "0.7606302", "0.7606302", "0.7589128", "0.75872946", "0.7559452", "0.7552929", "0.75422454", "0.7521087", "0.7521087"...
0.0
-1
Popups event handling end
private void resetMouseCursor() { GameContainer c = Main.getInstance().getContainer(); c.setDefaultMouseCursor(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void triggerPopup();", "@Override\n\t\t\tpublic void onClickedPopup(int arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\tif(e.isPopupTrigger())\n\t\t\t\t{\n\t\t\t\t\tpopup.show(e.getComponent(), e.getX(), e.getY());\n\t\t\t\t}\n\t\t\t}", "public void ge...
[ "0.7694337", "0.7641257", "0.73633003", "0.7345213", "0.7198706", "0.718891", "0.70822823", "0.6960151", "0.68684673", "0.6761931", "0.66895473", "0.66683793", "0.6652052", "0.6610314", "0.65818864", "0.6575438", "0.65586257", "0.6551778", "0.6545152", "0.6545152", "0.6545152...
0.0
-1
Created by tianzl on 2017/11/6.
public interface IUserBiz { @GET("TestServlet") Call<List<User>> getUsers(); @GET("{username}") Call<User> getUser(@Path("username")String username); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "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 void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpub...
[ "0.60324", "0.593231", "0.5765469", "0.57604516", "0.57604516", "0.5759748", "0.57570213", "0.57333285", "0.5686716", "0.56586504", "0.5637448", "0.56060416", "0.5590048", "0.55885655", "0.5564625", "0.55593544", "0.5557492", "0.554691", "0.5542339", "0.553908", "0.55389243",...
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.72461367", "0.7201596", "0.7195268", "0.7177002", "0.71069986", "0.7039653", "0.70384306", "0.70115715", "0.7010647", "0.69803435", "0.6945406", "0.69389313", "0.6933442", "0.69172275", "0.69172275", "0.6890826", "0.6883689", "0.687515", "0.6874831", "0.68615955", "0.68615...
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); return id == R.id.action_settings || super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ...
[ "0.7904066", "0.7804976", "0.7766218", "0.7726716", "0.7631313", "0.76221544", "0.7584775", "0.7530617", "0.74878734", "0.7457033", "0.7457033", "0.74380976", "0.7421477", "0.7402898", "0.7391322", "0.7386477", "0.73788774", "0.7370012", "0.7362617", "0.73555875", "0.73451835...
0.0
-1
time and space of O(nk) total coins total amount to look
public int change(int amount, int[] coins) { Integer [][] memo = new Integer[coins.length][amount+1]; return helper(amount, coins, 0 , memo) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void find_coins(int[] d, int k, int n) {\n\t\t\n\t}", "private double calculateMoneyInserted() {\r\n double amount = 0.0;\r\n\r\n for(VendingMachine.Coin coin : coins) {\r\n amount += coin.amount();\r\n }\r\n return amount;\r\n }", "public static int coi...
[ "0.730174", "0.6899739", "0.67968553", "0.6650341", "0.6612896", "0.657404", "0.65342414", "0.652656", "0.6494794", "0.6473905", "0.6446622", "0.6429012", "0.64088964", "0.63852656", "0.63618183", "0.63510954", "0.626221", "0.62608093", "0.6211947", "0.61903775", "0.61898154"...
0.5744809
54