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
Spawns a bot into existence based on a given class name.
void spawnBot( String className, String messager ) { spawnBot( className, null, null, messager); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void spawnBot( String className, String login, String password, String messager ) {\n CoreData cdata = m_botAction.getCoreData();\n long currentTime;\n\n String rawClassName = className.toLowerCase();\n BotSettings botInfo = cdata.getBotConfig( rawClassName );\n\n ...
[ "0.7158125", "0.64861053", "0.5384915", "0.5376677", "0.5349362", "0.52913207", "0.5239962", "0.51804477", "0.5179637", "0.5169821", "0.5152667", "0.5138501", "0.51156414", "0.5064774", "0.5028997", "0.5017036", "0.5006259", "0.49970102", "0.49813467", "0.49707472", "0.495221...
0.7400824
0
Spawns a bot into existence based on a given class name. In order for the bot to be spawned, the class must exist, and the CFG must exist and be properly formed. Additionally, if a "force spawn" is not being performed, the maximum number of bots of the type allowed must be less than the number currently active.
void spawnBot( String className, String login, String password, String messager ) { CoreData cdata = m_botAction.getCoreData(); long currentTime; String rawClassName = className.toLowerCase(); BotSettings botInfo = cdata.getBotConfig( rawClassName ); if( botInfo == null ) { if(messager != null) m_botAction.sendChatMessage( 1, messager + " tried to spawn bot of type " + className + ". Invalid bot type or missing CFG file." ); else m_botAction.sendChatMessage( 1, "AutoLoader tried to spawn bot of type " + className + ". Invalid bot type or missing CFG file." ); m_botAction.sendSmartPrivateMessage( messager, "That bot type does not exist, or the CFG file for it is missing." ); return; } Integer maxBots = botInfo.getInteger( "Max Bots" ); Integer currentBotCount = m_botTypes.get( rawClassName ); if( maxBots == null ) { if(messager != null) m_botAction.sendChatMessage( 1, messager + " tried to spawn bot of type " + className + ". Invalid settings file. (MaxBots improperly defined)" ); else m_botAction.sendChatMessage( 1, "AutoLoader tried to spawn bot of type " + className + ". Invalid settings file. (MaxBots improperly defined)" ); m_botAction.sendSmartPrivateMessage( messager, "The CFG file for that bot type is invalid. (MaxBots improperly defined)" ); return; } if( login == null && maxBots.intValue() == 0 ) { if(messager != null) m_botAction.sendChatMessage( 1, messager + " tried to spawn bot of type " + className + ". Spawning for this type is disabled on this hub." ); else m_botAction.sendChatMessage( 1, "AutoLoader tried to spawn bot of type " + className + ". Spawning for this type is disabled on this hub." ); m_botAction.sendSmartPrivateMessage( messager, "Bots of this type are currently disabled on this hub. If you are running another hub, please try from it instead." ); return; } if( currentBotCount == null ) { currentBotCount = new Integer( 0 ); m_botTypes.put( rawClassName, currentBotCount ); } if( login == null && currentBotCount.intValue() >= maxBots.intValue() ) { if(messager != null) m_botAction.sendChatMessage( 1, messager + " tried to spawn a new bot of type " + className + ". Maximum number already reached (" + maxBots + ")" ); else m_botAction.sendChatMessage( 1, "AutoLoader tried to spawn a new bot of type " + className + ". Maximum number already reached (" + maxBots + ")" ); m_botAction.sendSmartPrivateMessage( messager, "Maximum number of bots of this type (" + maxBots + ") has been reached." ); return; } String botName, botPassword; currentBotCount = new Integer( getFreeBotNumber( botInfo ) ); if( login == null || password == null ) { botName = botInfo.getString( "Name" + currentBotCount ); botPassword = botInfo.getString( "Password" + currentBotCount ); } else { botName = login; botPassword = password; } Session childBot = null; try { // FIXME: KNOWN BUG - sometimes, even when it detects that a class is updated, the loader // will load the old copy/cached class. Perhaps Java itself is caching the class on occasion? if( m_loader.shouldReload() ) { System.out.println( "Reinstantiating class loader; cached classes are not up to date." ); resetRepository(); m_loader = m_loader.reinstantiate(); } Class<? extends SubspaceBot> roboClass = m_loader.loadClass( "twcore.bots." + rawClassName + "." + rawClassName ).asSubclass(SubspaceBot.class); String altIP = botInfo.getString("AltIP" + currentBotCount); int altPort = botInfo.getInt("AltPort" + currentBotCount); String altSysop = botInfo.getString("AltSysop" + currentBotCount); if(altIP != null && altSysop != null && altPort > 0) childBot = new Session( cdata, roboClass, botName, botPassword, currentBotCount.intValue(), m_group, altIP, altPort, altSysop, true); else childBot = new Session( cdata, roboClass, botName, botPassword, currentBotCount.intValue(), m_group, true); } catch( ClassNotFoundException cnfe ) { Tools.printLog( "Class not found: " + rawClassName + ".class. Reinstall this bot?" ); return; } currentTime = System.currentTimeMillis(); if( m_lastSpawnTime + SPAWN_DELAY > currentTime ) { m_botAction.sendSmartPrivateMessage( messager, "Subspace only allows a certain amount of logins in a short time frame. Please be patient while your bot waits to be spawned." ); if( m_spawnQueue.isEmpty() == false ) { int size = m_spawnQueue.size(); if( size > 1 ) { m_botAction.sendSmartPrivateMessage( messager, "There are currently " + m_spawnQueue.size() + " bots in front of yours." ); } else { m_botAction.sendSmartPrivateMessage( messager, "There is only one bot in front of yours." ); } } else { m_botAction.sendSmartPrivateMessage( messager, "You are the only person waiting in line. Your bot will log in shortly." ); } if(messager != null) m_botAction.sendChatMessage( 1, messager + " in queue to spawn bot of type " + className ); else m_botAction.sendChatMessage( 1, "AutoLoader in queue to spawn bot of type " + className ); } String creator; if(messager != null) creator = messager; else creator = "AutoLoader"; ChildBot newChildBot = new ChildBot( rawClassName, creator, childBot ); addToBotCount( rawClassName, 1 ); m_botStable.put( botName, newChildBot ); m_spawnQueue.add( newChildBot ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void spawnBot( String className, String messager ) {\n spawnBot( className, null, null, messager);\n }", "public static Bot newInstance(final String className) throws ClassNotFoundException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t NoSuchMethodException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t Instantia...
[ "0.6792781", "0.5987635", "0.5690723", "0.54388493", "0.5294434", "0.5198574", "0.5171938", "0.5127998", "0.5101774", "0.5082403", "0.5071311", "0.50427103", "0.49756142", "0.49472263", "0.4895344", "0.48863313", "0.48824736", "0.48812363", "0.48524782", "0.48379663", "0.4828...
0.7649557
0
Sets whether or not new bots are allowed to spawn.
public boolean allowBotSpawn(boolean allowSpawning) { if(m_spawnBots == allowSpawning) { return false; } m_spawnBots = allowSpawning; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSpawn(boolean spawn) {\r\n this.spawn = spawn;\r\n }", "boolean spawningEnabled();", "public boolean getCanSpawnHere()\r\n {\r\n return false;\r\n }", "public void setSleepingAllowed (boolean flag) {\n\t\tbody.setSleepingAllowed(flag);\n\t}", "public boolean isBot(){\n...
[ "0.650009", "0.6194335", "0.6039308", "0.5820751", "0.58044356", "0.5769762", "0.5617042", "0.56052685", "0.55736184", "0.55254066", "0.5480372", "0.54572743", "0.5453233", "0.5450413", "0.5361047", "0.53282875", "0.53222394", "0.52960217", "0.52947026", "0.52809066", "0.5262...
0.7396128
0
Queue thread execution loop. Attempts to spawn the next bot on the waiting list, if the proper delay time has been reached.
@SuppressWarnings("unused") public void run() { Iterator<String> i; String key; Session bot; ChildBot childBot; long currentTime = 0; long lastStateDetection = 0; int SQLStatusTime = 0; final int DETECTION_TIME = 5000; while( m_botAction.getBotState() != Session.NOT_RUNNING ) { if( SQLStatusTime == 2400 ) { SQLStatusTime = 0; m_botAction.getCoreData().getSQLManager().printStatusToLog(); } try { currentTime = System.currentTimeMillis() + 1000; if( m_spawnQueue.isEmpty() == false ) { if( !m_spawnBots ) { childBot = m_spawnQueue.remove(0); if(childBot.getBot() != null) { m_botStable.remove( childBot.getBot().getBotName() ); addToBotCount( childBot.getClassName(), (-1) ); } if(childBot.getCreator() != null) { m_botAction.sendSmartPrivateMessage( childBot.getCreator(), "Bot failed to log in. Spawning of new bots is currently disabled."); } m_botAction.sendChatMessage( 1, "Bot of type " + childBot.getClassName() + " failed to log in. Spawning of new bots is currently disabled."); } else if( m_lastSpawnTime + SPAWN_DELAY < currentTime ) { childBot = m_spawnQueue.remove( 0 ); bot = childBot.getBot(); bot.start(); while( bot.getBotState() == Session.STARTING ) { Thread.sleep( 5 ); } if( bot.getBotState() == Session.NOT_RUNNING ) { removeBot( bot.getBotName(), "log in failure; possible bad login/password" ); m_botAction.sendSmartPrivateMessage( childBot.getCreator(), "Bot failed to log in. Verify login and password are correct." ); m_botAction.sendChatMessage( 1, "Bot of type " + childBot.getClassName() + " failed to log in. Verify login and password are correct." ); } else { if(childBot.getCreator() != null) { m_botAction.sendSmartPrivateMessage( childBot.getCreator(), "Your new bot is named " + bot.getBotName() + "." ); m_botAction.sendChatMessage( 1, childBot.getCreator() + " spawned " + childBot.getBot().getBotName() + " of type " + childBot.getClassName() ); } else m_botAction.sendChatMessage( 1, "AutoLoader spawned " + childBot.getBot().getBotName() + " of type " + childBot.getClassName() ); } m_lastSpawnTime = currentTime; } } // Removes bots that are no longer running. if( lastStateDetection + DETECTION_TIME < currentTime ) { for( i = m_botStable.keySet().iterator(); i.hasNext(); ) { key = i.next(); childBot = m_botStable.get( key ); if( childBot.getBot().getBotState() == Session.NOT_RUNNING && key != null) { String removalStatus = removeBot( key ); if( key == null ) m_botAction.sendChatMessage( 1, "NOTICE: Unknown (null) bot disconnected without being properly released from stable." ); else m_botAction.sendChatMessage( 1, key + "(" + childBot.getClassName() + ") " + removalStatus + "." ); childBot = null; } } lastStateDetection = currentTime; } SQLStatusTime++; Thread.sleep( 1000 ); } catch( ConcurrentModificationException e ) { //m_botAction.sendChatMessage( 1, "Concurrent modification. No state detection done this time" ); } catch( Exception e ) { Tools.printStackTrace( e ); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void execute() {\n thread = Thread.currentThread();\n while (!queue.isEmpty()) {\n if (currentThreads.get() < maxThreads) {\n queue.remove(0).start();\n currentThreads.incrementAndGet();\n } else {\n try {\n ...
[ "0.61011523", "0.5952991", "0.5949108", "0.5939425", "0.5910478", "0.5847744", "0.58258355", "0.57716846", "0.5634896", "0.5601902", "0.5599961", "0.5511245", "0.55092883", "0.5503486", "0.55013186", "0.549807", "0.5490246", "0.5489978", "0.5453848", "0.5420462", "0.5418748",...
0.6431378
0
Recursively adds all subdirectories of a given base directory to the repository, and adds the base directory itself.
public void addDirectories( File base ) { if( base.isDirectory() ) { repository.add( base ); File[] files = base.listFiles(); for( int i = 0; i < files.length; i++ ) { addDirectories( files[i] ); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static LinkedList<String> addAllSubDirs(File dir, LinkedList<String> list) {\n\t\tString [] dirListing = dir.list();\n\t\tfor (String subDirName : dirListing) {\n\t\t\tFile subdir = new File(dir.getPath() + System.getProperty(\"file.separator\") + subDirName);\n\t\t\tif (subdir.isDirectory()) {\n\t\t\t\tif...
[ "0.5978809", "0.53636336", "0.51620346", "0.51590216", "0.5153931", "0.5150124", "0.5102948", "0.5033414", "0.49772948", "0.49623522", "0.49374247", "0.49333584", "0.49330044", "0.49173653", "0.49146968", "0.48918557", "0.4890153", "0.4877059", "0.48677474", "0.48205864", "0....
0.7799726
0
Name of the bot's class Create a new instance of ChildBot.
ChildBot( String className, String creator, Session bot ) { m_bot = bot; m_creator = creator; m_className = className; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Bot newInstance(final String className) throws ClassNotFoundException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t NoSuchMethodException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t InstantiationException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t IllegalAccessException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ...
[ "0.62557507", "0.6027361", "0.59269065", "0.5656728", "0.5651155", "0.54066235", "0.5388692", "0.5305204", "0.52873135", "0.52604157", "0.5259407", "0.52564335", "0.5252159", "0.5212224", "0.51822674", "0.51807815", "0.51719046", "0.5163312", "0.5160215", "0.51305205", "0.511...
0.74865055
0
Nova view utilizando o inflater e passando o layout da ListView
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_listas,container,false); postos = new ArrayList<>(); mLista = (ListView) view.findViewById(R.id.listViewPostos); adapterPosto = new AdapterPosto(getActivity(), postos); mLista.setAdapter(adapterPosto); firebase = ConfiguracaoFirebase.getFirebase().child("PostosAdicionados"); valueEventListenerPostos = new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { postos.clear(); for (DataSnapshot dados : dataSnapshot.getChildren()) { //sem ordenação por preço Posto postoNovo = dados.getValue(Posto.class); postos.add(postoNovo); } //Posto auxiliar para ajudar na ordenação. Posto auxPosto; //ordenação for (int i = 0; i<postos.size(); i++){ for (int j = i+1; j<postos.size();j++) { if(postos.get(j).getPrecoEtanol() < postos.get(i).getPrecoEtanol()){ auxPosto = postos.get(j); postos.set(j,postos.get(i)); postos.set(i,auxPosto); } } } adapterPosto.notifyDataSetChanged(); } @Override public void onCancelled(DatabaseError databaseError) { } }; return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n \tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n \t\t\tBundle savedInstanceState) {\n \t\treturn inflater.inflate(R.layout.list, container, false);\n \t}", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) ...
[ "0.79295063", "0.7602295", "0.7555705", "0.7453868", "0.74265003", "0.73627394", "0.7352158", "0.73489285", "0.733862", "0.7333015", "0.7319927", "0.72970283", "0.7260804", "0.7260309", "0.72559035", "0.72452855", "0.72348773", "0.72238266", "0.72052485", "0.72023296", "0.720...
0.0
-1
in pascals triangle we actually calculate the combination of row and column of that particular position given that row and column starts from 0
public static void main (String[] args) { int numRows=5; for(int i=0;i<numRows;i++){ for(int j=0;j<i;j++){ System.out.print(combination(i,j)+","); } for(int j=i;j<=i;j++){ System.out.print(combination(i,j)); } System.out.println(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static List<List<Integer>> pascalTriangle(int rows){\n\t\tList<List<Integer>> triangle = new ArrayList<>();\n\t\t\n\t\tif(rows<=0) {\n\t\t\treturn triangle;\n\t\t}\n\t\t\n\t\tList<Integer> firstRow = new ArrayList<>();\n\t\tfirstRow.add(1);\n\t\ttriangle.add(firstRow);\n\n\t\tfor(int i=1; i<rows;i++) {\n\t\...
[ "0.64430845", "0.61109823", "0.6053947", "0.58990496", "0.5838145", "0.5835229", "0.57468516", "0.5720281", "0.56146204", "0.5595268", "0.5591149", "0.5554373", "0.55370426", "0.5516098", "0.55032414", "0.5439339", "0.5439247", "0.54380757", "0.5432864", "0.5421607", "0.54183...
0.0
-1
for calculating combination we also require to find the factorial of the number
static int combination(int num1,int num2){ return (fact(num1)/(fact(num2)*fact(num1-num2))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static long combination(int n, int r) {\n if (r > n || n <= 0 || r <= 0) {\n throw new IllegalArgumentException(\"r must be smaller than n and both n and r must be positive ints\");\n }\n long result = 1;\n for (int i = r + 1; i <= n; i++) {\n result = result * i;\n }\n long nMi...
[ "0.71773446", "0.7112603", "0.66488916", "0.66196054", "0.6559582", "0.6555226", "0.65267646", "0.6502151", "0.6496097", "0.64819866", "0.64625573", "0.6438988", "0.64336574", "0.6429415", "0.6422822", "0.6419243", "0.64184946", "0.6413616", "0.64073026", "0.6403782", "0.6388...
0.7447205
0
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 AreaCiudad)) { return false; } AreaCiudad other = (AreaCiudad) object; if ((this.areaciudadPK == null && other.areaciudadPK != null) || (this.areaciudadPK != null && !this.areaciudadPK.equals(other.areaciudadPK))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void se...
[ "0.6896886", "0.6838461", "0.67056817", "0.66419715", "0.66419715", "0.6592331", "0.6579151", "0.6579151", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.65624106", "0.65624106", "0.65441847", "0.65243006", "0.65154546", "0.6487427", "0.64778...
0.0
-1
to retrieve list of task working on a project
public List<TaskMaster> retrieveAllTaskOfProject(Long projectId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Task> getTaskdetails();", "TaskList getList();", "List<Task> getAllTasks();", "List<ReadOnlyTask> getTaskList();", "List<ReadOnlyTask> getTaskList();", "public List<TaskMaster> retrieveCompletedTaskByProjectId(Long projectId);", "public List<TaskDescription> getActiveTasks();", "public Project g...
[ "0.7649699", "0.7470262", "0.7335929", "0.73258513", "0.73258513", "0.73186", "0.7274052", "0.725192", "0.7235154", "0.7100048", "0.6975644", "0.694558", "0.69365215", "0.693612", "0.689695", "0.68938243", "0.68925625", "0.6809896", "0.68085444", "0.68033504", "0.6802152", ...
0.7742111
0
retrieve last TaskId of project by retrieving last Created Task Of Project
public String retrieveLastTaskIdOfProject(Long projectId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int getLatestTaskId() {\n\n int id = 0;\n try {\n List<Task> list = Task.listAll(Task.class);\n int size = list.size();\n Task task = list.get(size - 1);\n id = task.getTaskId();\n\n } catch (Exception e) {\n id=0;\n }...
[ "0.70781183", "0.66442746", "0.65028906", "0.6353877", "0.63534135", "0.63471997", "0.63441855", "0.63149923", "0.61697596", "0.61537826", "0.6153234", "0.612132", "0.6079509", "0.60182184", "0.60047966", "0.5999905", "0.5996039", "0.5987078", "0.59753615", "0.5937658", "0.59...
0.79903084
0
retrieveTaskByUserId method returns instance of class TaskMaster by searching Id
public List<TaskMaster> retrieveAllTaskByUserId(Long userId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Task getTask(String taskId, String userId) throws DaoException, DataObjectNotFoundException, SecurityException\r\n {\n dao = (TaskManagerDao) getDao();\r\n Task task = dao.selectTask(taskId,userId);\r\n if(task!=null) {\r\n // Task task = (Task)col.iterator(...
[ "0.73205423", "0.7046871", "0.7004654", "0.68384343", "0.6811953", "0.6774464", "0.6714313", "0.67076766", "0.6606194", "0.6566857", "0.6558633", "0.65033144", "0.6464087", "0.6442999", "0.6433979", "0.6431357", "0.64184463", "0.6398524", "0.63661885", "0.6350579", "0.6310606...
0.7571379
0
retrieveAllTaskByUserIdAndProjectId method returns instance of class TaskMaster by searching userId & projectId
public List<TaskMaster> retrieveAllTaskByUserIdAndProjectId(Long projectId, Long userId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<TaskMaster> retrieveTaskByProjectId(Long projectId);", "public List<TaskMaster> retrieveAllTaskOfProject(Long projectId);", "public List<TaskMaster> retrieveAllTaskByUserId(Long userId);", "public List<TaskMaster> retrieveAllTaskOfCurrentUserById(Date startDate, Date endDate, Long userId, List<Lo...
[ "0.84074396", "0.82969666", "0.797375", "0.76408446", "0.763854", "0.7244465", "0.71198535", "0.7019674", "0.69594467", "0.6890141", "0.6846381", "0.65781444", "0.65777826", "0.649058", "0.6474553", "0.6459946", "0.6417506", "0.6401906", "0.63193566", "0.63117445", "0.6300410...
0.83780825
1
retrieveTasksForSpecificDaysById methods retrieves all the task for the user and particular project
public List<TaskMaster> retrieveTasksForSpecificDaysById(Date currdate, Date xDaysAgo, Long projectId, Long userId, List<Long> projectIds);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<TaskMaster> retrieveAllTasksForSpecificDays(Date currdate, Date xDaysAgo, List<Long> projectIds, Long userIds);", "public List<TaskMaster> retrieveAllTaskOfCurrentUserById(Date startDate, Date endDate, Long userId, List<Long> projectIds);", "public List<Task> getAllTasksForUser(long userId);", "p...
[ "0.70937717", "0.6857931", "0.6610801", "0.64355415", "0.642538", "0.64226085", "0.64162475", "0.6390842", "0.61584157", "0.61488754", "0.6116817", "0.611411", "0.61093676", "0.599193", "0.597025", "0.59051496", "0.5880977", "0.5872341", "0.5872164", "0.5799405", "0.5764897",...
0.75099736
0
retrieveIncompleteTask method returns all the incomplete task of the user
public List<TaskMaster> retrieveIncompleteTask(Long userId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Task> getIncompleteTasks() {\n ArrayList<Task> output = new ArrayList<>();\n\n // get a readable instance of the database\n SQLiteDatabase db = getReadableDatabase();\n if (db == null) return output;\n\n // run the query to get all incomplete tasks\n Curso...
[ "0.72339875", "0.6621472", "0.6452763", "0.64191896", "0.63865453", "0.63411295", "0.6243377", "0.62379694", "0.6192875", "0.6184665", "0.61610985", "0.60869294", "0.6059068", "0.6059068", "0.59633833", "0.59487426", "0.59263134", "0.5924401", "0.5911489", "0.5909581", "0.589...
0.8137548
0
to retrieve all task of specified days from task master table table
public List<TaskMaster> retrieveAllTasksForSpecificDays(Date currdate, Date xDaysAgo, List<Long> projectIds, Long userIds);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Task> getCesarTasksExpiringToday() {\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tDate date = DateUtils.truncate(new Date(), Calendar.DATE);\n\t\tcalendar.setTime(date);\n\t\tint dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);\n\t\tList<Task> tasks = taskRepository.getTaskByDateAndOwnerAndExpi...
[ "0.68190867", "0.6790231", "0.66197705", "0.6488749", "0.6361178", "0.6357443", "0.63002735", "0.62842196", "0.62514395", "0.6243313", "0.6047271", "0.59670526", "0.59509456", "0.594454", "0.59064126", "0.5887825", "0.5881141", "0.5865986", "0.5845988", "0.5830262", "0.581668...
0.67217135
2
retrieve list of Tasks of particular user between start time and end time
public List<TaskMaster> retrieveTasksForIntervalById(long userId, Calendar startTime, Calendar endTime);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Task> getAllTasksForUser(long userId);", "public java.util.List<Todo> findByUserId(long userId, int start, int end);", "public List<TaskMaster> retrieveAllTaskOfCurrentUserById(Date startDate, Date endDate, Long userId, List<Long> projectIds);", "@Override\r\n\tpublic List<ExecuteTask> getByTime(...
[ "0.7201053", "0.7088928", "0.6927336", "0.68297255", "0.671386", "0.6656387", "0.65443057", "0.6531413", "0.6525823", "0.6514194", "0.6504742", "0.6493541", "0.6465116", "0.64532506", "0.64202946", "0.641097", "0.63906544", "0.63782924", "0.63284135", "0.6279613", "0.6262851"...
0.7865901
0
retrieveTaskByProjectId method returns all the resources related with projectID
public List<TaskMaster> retrieveTaskByProjectId(Long projectId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<TaskMaster> retrieveAllTaskOfProject(Long projectId);", "@GetMapping(value =\"/getTasksById/{projectId}\")\n\tpublic List<Task> getTaskByProjectId(@PathVariable (value= \"projectId\") Long projectId)\n\t{\n\t\treturn this.integrationClient.getTaskByProjectId(projectId);\n\t}", "public List<TaskMast...
[ "0.77645767", "0.76359016", "0.74228907", "0.7420023", "0.6807943", "0.6761012", "0.66521055", "0.6613317", "0.6521949", "0.64918953", "0.6279984", "0.61802846", "0.6143644", "0.614149", "0.6123777", "0.611924", "0.6114541", "0.61054903", "0.6038369", "0.6037825", "0.60313195...
0.79025596
0
retrieveTaskByMilestoneId method returns all the task related with milestoneID
public List<TaskMaster> retrieveTaskByMilestoneId(Long milestoneId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<TaskMaster> retrieveTaskByProjectId(Long projectId);", "TrackerTasks getTrackerTasks(final Integer id);", "public List<TaskMaster> retrieveAllTaskOfProject(Long projectId);", "TrackerTasks loadTrackerTasks(final Integer id);", "List<Workflow> findByIdTask( int nIdTask );", "public List<TaskMa...
[ "0.63683593", "0.61399275", "0.6051558", "0.5995317", "0.5990614", "0.59215534", "0.5824003", "0.58159304", "0.5771775", "0.5738684", "0.5734139", "0.56652844", "0.56585175", "0.56010807", "0.55702776", "0.5560782", "0.5511116", "0.55028796", "0.5479841", "0.5462816", "0.5449...
0.82982063
0
Get list of completed task by project ID
public List<TaskMaster> retrieveCompletedTaskByProjectId(Long projectId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<TaskMaster> retrieveAllTaskOfProject(Long projectId);", "List<Task> getTaskdetails();", "public List<TaskMaster> retrieveTaskByProjectId(Long projectId);", "List<Task> getAllTasks();", "@GetMapping(value =\"/getTasksById/{projectId}\")\n\tpublic List<Task> getTaskByProjectId(@PathVariable (valu...
[ "0.7490729", "0.7317119", "0.7251683", "0.70638585", "0.6948115", "0.68786216", "0.6854256", "0.68396163", "0.6788411", "0.677663", "0.67671645", "0.67527103", "0.6655775", "0.6655775", "0.6644623", "0.662484", "0.6622233", "0.659854", "0.6581641", "0.644719", "0.64387697", ...
0.83716
0
to retrieve all task of specified days from task master table and project of user table
public List<TaskMaster> retrieveTaskByProjectIdAndUserIdAndDates(Long userId, List<Long> projectIds, Date startDate, Date endDate);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<TaskMaster> retrieveAllTasksForSpecificDays(Date currdate, Date xDaysAgo, List<Long> projectIds, Long userIds);", "public List<TaskMaster> retrieveTasksForSpecificDaysById(Date currdate, Date xDaysAgo, Long projectId, Long userId, List<Long> projectIds);", "public List<TaskMaster> retrieveAllTaskOf...
[ "0.75224483", "0.73782754", "0.7335051", "0.6782587", "0.67105573", "0.65517014", "0.6547504", "0.65076315", "0.64112663", "0.63874197", "0.6341565", "0.6314369", "0.6275993", "0.62729144", "0.61290205", "0.61002135", "0.6081623", "0.6074191", "0.6036488", "0.6023076", "0.588...
0.712795
3
retrieveAllTaskOfCurrentUserByDates retrieve all task detail of current user between dates
public List<TaskMaster> retrieveAllTaskOfCurrentUserById(Date startDate, Date endDate, Long userId, List<Long> projectIds);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Task> getAllTasksForUser(long userId);", "public List<TaskMaster> retrieveAllTasksForSpecificDays(Date currdate, Date xDaysAgo, List<Long> projectIds, Long userIds);", "public List<TaskMaster> retrieveTaskByProjectIdAndUserIdAndDates(Long userId, List<Long> projectIds, Date startDate, Date endDate)...
[ "0.698293", "0.69817257", "0.6959681", "0.68481266", "0.6801613", "0.6677438", "0.6376401", "0.63482964", "0.6322628", "0.630132", "0.62289876", "0.6222927", "0.61513287", "0.60897094", "0.6044493", "0.60248315", "0.6022202", "0.59828746", "0.5980501", "0.595341", "0.59444326...
0.74681425
0
retrieve all task with given filters
public List<TaskMaster> retrieveTaskWithFilters(Date startDate, Date endDate, Long assignedTo, Long taskPriority, Long projectId, String status, Long createdBy);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ObservableList<Task> getFilteredTaskList();", "List<Receta> getAll(String filter);", "Set<Task> getAllTasks();", "List<Task> getAllTasks();", "@Override\n\tpublic List<Task> filterByTask(int id_task) {\n\t\treturn null;\n\t}", "ObservableList<Task> getUnfilteredTaskList();", "public List<Task> listTask...
[ "0.7054477", "0.6528511", "0.6508814", "0.6499546", "0.63971585", "0.63859206", "0.635034", "0.6310932", "0.63025093", "0.6081692", "0.60712475", "0.58995104", "0.58878374", "0.5883565", "0.5800688", "0.5769802", "0.5769802", "0.5764919", "0.5749727", "0.5738555", "0.57253593...
0.66585445
1
Return a counts object, or null if no counts are available
Counts getCounts(VcfRecord record, int sampleNumber) { assert mHeader != null; // i.e. checkHeader method must be called before this if (sampleNumber >= mSampleToAntecedents.size()) { return null; // No such sample } final List<Integer> antecedents = mSampleToAntecedents.get(sampleNumber); if (antecedents.isEmpty()) { return null; // Not a derived or child sample } final Integer ss = record.getSampleInteger(sampleNumber, FORMAT_SOMATIC_STATUS); if (ss != null) { if (ss != 2) { return null; // Not a somatic call } } else { // Might be a family de novo type call final String deNovoStatus = record.getSampleString(sampleNumber, FORMAT_DENOVO); if (!"Y".equals(deNovoStatus)) { return null; // Not a de novo } } final int[] originalAd = ad(record, antecedents); final int[] derivedAd = ad(record, sampleNumber); final long oSum = ArrayUtils.sum(originalAd); final long dSum = ArrayUtils.sum(derivedAd); if (oSum == 0 || dSum == 0) { return null; } final boolean[] originalAlleles = alleles(record, antecedents); final boolean[] derivedAlleles = alleles(record, sampleNumber); assert originalAlleles.length == originalAd.length && originalAlleles.length == derivedAlleles.length && originalAlleles.length == derivedAd.length; final double invOriginalAdSum = 1.0 / oSum; final double invDerivedAdSum = 1.0 / dSum; int derivedContraryCount = 0; double derivedContraryFraction = 0.0; int origContraryCount = 0; double origContraryFraction = 0.0; for (int k = 0; k < originalAlleles.length; ++k) { if (originalAlleles[k] && !derivedAlleles[k]) { derivedContraryCount += derivedAd[k]; derivedContraryFraction += derivedAd[k] * invDerivedAdSum; } else if (!originalAlleles[k] && derivedAlleles[k]) { origContraryCount += originalAd[k]; origContraryFraction += originalAd[k] * invOriginalAdSum; } } return new Counts(origContraryCount, derivedContraryCount, origContraryFraction, derivedContraryFraction); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public com.a9.spec.opensearch.x11.QueryType.Count xgetCount()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.a9.spec.opensearch.x11.QueryType.Count target = null;\n target = (com.a9.spec.opensearch.x11.QueryType.Count)get_store().find_attribute_user(C...
[ "0.6709326", "0.6583569", "0.6575623", "0.6570153", "0.64949125", "0.6479434", "0.64122367", "0.63744056", "0.63571334", "0.6340839", "0.6308285", "0.62536776", "0.62536776", "0.62393564", "0.6239355", "0.6239355", "0.6239355", "0.6225161", "0.6209371", "0.6182043", "0.618204...
0.0
-1
Performs the actual test.
@Test public void test() { Configuration.getInstance().setDeductIncomeTax(false); String symbol = "TST"; Stock stock = new Stock(symbol, "Test Stock"); stock.setPrice(10.00); stock.setDivRate(1.00); // Initial (empty) position. Position position = new Position(stock); Assert.assertEquals(0, position.getNoOfShares()); Assert.assertEquals(0.00, position.getCurrentCost(), DELTA); Assert.assertEquals(0.00, position.getCurrentValue(), DELTA); Assert.assertEquals(0.00, position.getCurrentResult(), DELTA); Assert.assertEquals(0.00, position.getTotalCost(), DELTA); Assert.assertEquals(0.00, position.getAnnualIncome(), DELTA); Assert.assertEquals(0.00, position.getYieldOnCost(), DELTA); Assert.assertEquals(0.00, position.getTotalIncome(), DELTA); Assert.assertEquals(0.00, position.getTotalReturn(), DELTA); Assert.assertEquals(0.00, position.getTotalReturnPercentage(), DELTA); // BUY 100 @ $20 ($5 costs) stock.setPrice(20.00); position.addTransaction(TestUtil.createTransaction(1, 1L, TransactionType.BUY, symbol, 100, 20.00, 5.00)); Assert.assertEquals(100, position.getNoOfShares()); Assert.assertEquals(2005.00, position.getCurrentCost(), DELTA); Assert.assertEquals(2000.00, position.getCurrentValue(), DELTA); Assert.assertEquals(-5.00, position.getCurrentResult(), DELTA); Assert.assertEquals(2005.00, position.getTotalCost(), DELTA); Assert.assertEquals(100.00, position.getAnnualIncome(), DELTA); Assert.assertEquals(4.99, position.getYieldOnCost(), DELTA); Assert.assertEquals(0.00, position.getTotalIncome(), DELTA); Assert.assertEquals(-5.00, position.getTotalReturn(), DELTA); Assert.assertEquals(-0.25, position.getTotalReturnPercentage(), DELTA); // DIVIDEND 100 @ $1.00 position.addTransaction(TestUtil.createTransaction(2, 2L, TransactionType.DIVIDEND, symbol, 100, 1.00, 0.00)); Assert.assertEquals(100, position.getNoOfShares()); Assert.assertEquals(2005.00, position.getCurrentCost(), DELTA); Assert.assertEquals(2000.00, position.getCurrentValue(), DELTA); Assert.assertEquals(-5.00, position.getCurrentResult(), DELTA); Assert.assertEquals(2005.00, position.getTotalCost(), DELTA); Assert.assertEquals(100.00, position.getAnnualIncome(), DELTA); Assert.assertEquals(4.99, position.getYieldOnCost(), DELTA); Assert.assertEquals(100.00, position.getTotalIncome(), DELTA); Assert.assertEquals(+95.00, position.getTotalReturn(), DELTA); Assert.assertEquals(+4.74, position.getTotalReturnPercentage(), DELTA); // Price drops to $10 stock.setPrice(10.00); Assert.assertEquals(100, position.getNoOfShares()); Assert.assertEquals(2005.00, position.getCurrentCost(), DELTA); Assert.assertEquals(1000.00, position.getCurrentValue(), DELTA); Assert.assertEquals(-1005.00, position.getCurrentResult(), DELTA); Assert.assertEquals(-50.12, position.getCurrentResultPercentage(), DELTA); Assert.assertEquals(2005.00, position.getTotalCost(), DELTA); Assert.assertEquals(100.00, position.getAnnualIncome(), DELTA); Assert.assertEquals(4.99, position.getYieldOnCost(), DELTA); Assert.assertEquals(100.00, position.getTotalIncome(), DELTA); Assert.assertEquals(-905.00, position.getTotalReturn(), DELTA); Assert.assertEquals(-45.14, position.getTotalReturnPercentage(), DELTA); // BUY another 100 @ $10 ($5 costs) position.addTransaction(TestUtil.createTransaction(3, 3L, TransactionType.BUY, symbol, 100, 10.00, 5.00)); Assert.assertEquals(200, position.getNoOfShares()); Assert.assertEquals(3010.00, position.getCurrentCost(), DELTA); Assert.assertEquals(2000.00, position.getCurrentValue(), DELTA); Assert.assertEquals(-1010.00, position.getCurrentResult(), DELTA); Assert.assertEquals(-33.55, position.getCurrentResultPercentage(), DELTA); Assert.assertEquals(3010.00, position.getTotalCost(), DELTA); Assert.assertEquals(200.00, position.getAnnualIncome(), DELTA); Assert.assertEquals(6.64, position.getYieldOnCost(), DELTA); Assert.assertEquals(100.00, position.getTotalIncome(), DELTA); Assert.assertEquals(-910.00, position.getTotalReturn(), DELTA); Assert.assertEquals(-30.23, position.getTotalReturnPercentage(), DELTA); // Price raises to $20 again stock.setPrice(20.00); Assert.assertEquals(200, position.getNoOfShares()); Assert.assertEquals(3010.00, position.getCurrentCost(), DELTA); Assert.assertEquals(4000.00, position.getCurrentValue(), DELTA); Assert.assertEquals(+990.00, position.getCurrentResult(), DELTA); Assert.assertEquals(+32.89, position.getCurrentResultPercentage(), DELTA); Assert.assertEquals(3010.00, position.getTotalCost(), DELTA); Assert.assertEquals(200.00, position.getAnnualIncome(), DELTA); Assert.assertEquals(6.64, position.getYieldOnCost(), DELTA); Assert.assertEquals(100.00, position.getTotalIncome(), DELTA); Assert.assertEquals(+1090.00, position.getTotalReturn(), DELTA); Assert.assertEquals(+36.21, position.getTotalReturnPercentage(), DELTA); // DIVIDEND 200 @ $1.25 stock.setDivRate(1.25); position.addTransaction(TestUtil.createTransaction(4, 4L, TransactionType.DIVIDEND, symbol, 200, 1.25, 0.00)); Assert.assertEquals(200, position.getNoOfShares()); Assert.assertEquals(3010.00, position.getCurrentCost(), DELTA); Assert.assertEquals(4000.00, position.getCurrentValue(), DELTA); Assert.assertEquals(+990.00, position.getCurrentResult(), DELTA); Assert.assertEquals(+32.89, position.getCurrentResultPercentage(), DELTA); Assert.assertEquals(3010.00, position.getTotalCost(), DELTA); Assert.assertEquals(250.00, position.getAnnualIncome(), DELTA); Assert.assertEquals(8.31, position.getYieldOnCost(), DELTA); Assert.assertEquals(350.00, position.getTotalIncome(), DELTA); Assert.assertEquals(+1340.00, position.getTotalReturn(), DELTA); Assert.assertEquals(+44.52, position.getTotalReturnPercentage(), DELTA); // SELL 200 @ $20 ($10 costs) position.addTransaction(TestUtil.createTransaction(5, 5L, TransactionType.SELL, symbol, 200, 20.00, 10.00)); Assert.assertEquals(0, position.getNoOfShares()); Assert.assertEquals(0.00, position.getCurrentCost(), DELTA); Assert.assertEquals(0.00, position.getCurrentValue(), DELTA); Assert.assertEquals(0.00, position.getCurrentResult(), DELTA); Assert.assertEquals(0.00, position.getCurrentResultPercentage(), DELTA); Assert.assertEquals(3020.00, position.getTotalCost(), DELTA); Assert.assertEquals(0.00, position.getAnnualIncome(), DELTA); Assert.assertEquals(0.00, position.getYieldOnCost(), DELTA); Assert.assertEquals(350.00, position.getTotalIncome(), DELTA); Assert.assertEquals(+1330.00, position.getTotalReturn(), DELTA); Assert.assertEquals(+44.04, position.getTotalReturnPercentage(), DELTA); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void runTest() {\n\t\trunTest(getIterations());\n\t}", "@Override\n public void runTest() {\n }", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "public void run() {\n assertEquals(sendQuery(\"SFO\"), 7);\n assertEquals(sendQuery(\"RHV\"), 1);\n assertEqu...
[ "0.7184567", "0.6948016", "0.690171", "0.67469656", "0.6716915", "0.6637996", "0.6626388", "0.6604838", "0.66003877", "0.65517974", "0.6337954", "0.63341606", "0.6323361", "0.632129", "0.6306889", "0.6300133", "0.62561285", "0.6252528", "0.6246481", "0.62294793", "0.62277454"...
0.0
-1
Retorna um extrato, escrevendoo em arquivo para paginacao.
public static RetornoExtrato getExtratos(String msisdn, String dataInicial, String dataFinal, String servidor, String porta, ArrayList diretorios, String sessionId) throws Exception { String xmlExtrato = ConsultaExtratoGPP.getXml(msisdn, dataInicial, dataFinal, servidor, porta); ConsultaExtratoGPP.saveToFile(xmlExtrato, diretorios, sessionId); return ConsultaExtratoGPP.parse(xmlExtrato); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getArquivo()\n {\n /*** Obtem o conteudo do pacote através do diretorio ***/\n File file = new File(caminho_origem);\n if (file.isFile())\n {\n try\n {\n /*** Lê o pacote e põe em um array de bytes ***/\n DataInputStrea...
[ "0.59332055", "0.5704028", "0.5477154", "0.54430526", "0.5402125", "0.53177804", "0.5258843", "0.5153146", "0.51301175", "0.49590394", "0.49516788", "0.4939048", "0.49386194", "0.48882568", "0.48857602", "0.48635757", "0.48553735", "0.48528275", "0.48517406", "0.48430127", "0...
0.46032047
38
Retorna um extrato a partir de arquivo ja criado. Caso o arquivo nao exista, obtem o extrato a partir de interface com o GPP.
public static RetornoExtrato getExtratosFromFile(String msisdn, String dataInicial, String dataFinal, String servidor, String porta, ArrayList diretorios, String sessionId) throws Exception { String xmlExtrato = ConsultaExtratoGPP.readFromFile(diretorios, sessionId); if(xmlExtrato == null) { return ConsultaExtratoGPP.getExtratos(msisdn, dataInicial, dataFinal, servidor, porta, diretorios, sessionId); } return ConsultaExtratoGPP.parse(xmlExtrato); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getArquivo()\n {\n /*** Obtem o conteudo do pacote através do diretorio ***/\n File file = new File(caminho_origem);\n if (file.isFile())\n {\n try\n {\n /*** Lê o pacote e põe em um array de bytes ***/\n DataInputStrea...
[ "0.5829285", "0.5451365", "0.517904", "0.51188254", "0.501929", "0.49929386", "0.49060735", "0.48858744", "0.4885016", "0.4801183", "0.477274", "0.47648773", "0.47635219", "0.47602788", "0.47401047", "0.4728485", "0.4723614", "0.4715574", "0.46974182", "0.46950638", "0.467651...
0.4534404
44
Interpreta o XML do extrato.
private static RetornoExtrato parse(String xmlExtrato) throws Exception { RetornoExtrato result = new RetornoExtrato(); try { //Obtendo os objetos necessarios para a execucao do parse do xml DocumentBuilderFactory docBuilder = DocumentBuilderFactory.newInstance(); DocumentBuilder parse = docBuilder.newDocumentBuilder(); InputSource is = new InputSource(new StringReader(xmlExtrato)); Document doc = parse.parse(is); Vector v = new Vector(); Extrato extrato = null; SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); //Obter o índice de recarga Element elmDadosControle = (Element)doc.getElementsByTagName("dadosControle").item(0); NodeList nlDadosControle = elmDadosControle.getChildNodes(); if(nlDadosControle.getLength() > 0) { result.setIndAssinanteLigMix(nlDadosControle.item(0).getChildNodes().item(0).getNodeValue()); result.setPlanoPreco (nlDadosControle.item(1).getChildNodes().item(0).getNodeValue()); } for (int i=0; i < doc.getElementsByTagName( "detalhe" ).getLength(); i++) { Element serviceElement = (Element) doc.getElementsByTagName( "detalhe" ).item(i); NodeList itemNodes = serviceElement.getChildNodes(); if (itemNodes.getLength() > 0) { extrato = new Extrato(); extrato.setNumeroOrigem(itemNodes.item(1).getChildNodes().item(0).getNodeValue()); extrato.setData(itemNodes.item(2).getChildNodes().item(0).getNodeValue()); extrato.setHoraChamada(itemNodes.item(3).getChildNodes().item(0).getNodeValue()); extrato.setTipoTarifacao(itemNodes.item(4).getChildNodes().item(0).getNodeValue()); extrato.setOperacao(itemNodes.item(5).getChildNodes().item(0).getNodeValue()); extrato.setRegiaoOrigem(itemNodes.item(6).getChildNodes().item(0).getNodeValue()); extrato.setRegiaoDestino(itemNodes.item(7).getChildNodes().item(0)!=null?itemNodes.item(7).getChildNodes().item(0).getNodeValue():""); extrato.setNumeroDestino(itemNodes.item(8).getChildNodes().item(0).getNodeValue()); extrato.setDuracaoChamada(itemNodes.item(9).getChildNodes().item(0).getNodeValue()); extrato.setValorPrincipal (stringToDouble(itemNodes.item(10).getChildNodes().item(0).getChildNodes().item(0).getNodeValue())); extrato.setValorBonus (stringToDouble(itemNodes.item(10).getChildNodes().item(1).getChildNodes().item(0).getNodeValue())); extrato.setValorSMS (stringToDouble(itemNodes.item(10).getChildNodes().item(2).getChildNodes().item(0).getNodeValue())); extrato.setValorGPRS (stringToDouble(itemNodes.item(10).getChildNodes().item(3).getChildNodes().item(0).getNodeValue())); extrato.setValorPeriodico (stringToDouble(itemNodes.item(10).getChildNodes().item(4).getChildNodes().item(0).getNodeValue())); extrato.setValorTotal (stringToDouble(itemNodes.item(10).getChildNodes().item(5).getChildNodes().item(0).getNodeValue())); extrato.setSaldoPrincipal (stringToDouble(itemNodes.item(11).getChildNodes().item(0).getChildNodes().item(0).getNodeValue())); extrato.setSaldoBonus (stringToDouble(itemNodes.item(11).getChildNodes().item(1).getChildNodes().item(0).getNodeValue())); extrato.setSaldoSMS (stringToDouble(itemNodes.item(11).getChildNodes().item(2).getChildNodes().item(0).getNodeValue())); extrato.setSaldoGPRS (stringToDouble(itemNodes.item(11).getChildNodes().item(3).getChildNodes().item(0).getNodeValue())); extrato.setSaldoPeriodico (stringToDouble(itemNodes.item(11).getChildNodes().item(4).getChildNodes().item(0).getNodeValue())); extrato.setSaldoTotal (stringToDouble(itemNodes.item(11).getChildNodes().item(5).getChildNodes().item(0).getNodeValue())); v.add(extrato); } } result.setExtratos(v); v= new Vector(); for (int i=0; i < doc.getElementsByTagName( "evento" ).getLength(); i++) { Element serviceElement = (Element) doc.getElementsByTagName( "evento" ).item(i); NodeList itemNodes = serviceElement.getChildNodes(); if (itemNodes.getLength() > 0) { Evento evento = new Evento(); evento.setNome(itemNodes.item(1).getChildNodes().item(0).getNodeValue()); evento.setData(itemNodes.item(2).getChildNodes().item(0).getNodeValue()); evento.setHora(itemNodes.item(3).getChildNodes().item(0).getNodeValue()); v.add(evento); } } result.setEventos(v); Element serviceElement = (Element) doc.getElementsByTagName( "totais" ).item(0); NodeList itemNodes = serviceElement.getChildNodes(); if (itemNodes.getLength() > 0) { // SaldoInicial Principal result.setSaldoInicialPrincipal (itemNodes.item(0).getChildNodes().item(0).getChildNodes().item(0).getNodeValue()); result.setSaldoInicialBonus (itemNodes.item(0).getChildNodes().item(1).getChildNodes().item(0).getNodeValue()); result.setSaldoInicialSMS (itemNodes.item(0).getChildNodes().item(2).getChildNodes().item(0).getNodeValue()); result.setSaldoInicialGPRS (itemNodes.item(0).getChildNodes().item(3).getChildNodes().item(0).getNodeValue()); result.setSaldoInicialPeriodico (itemNodes.item(0).getChildNodes().item(4).getChildNodes().item(0).getNodeValue()); result.setSaldoInicialTotal (itemNodes.item(0).getChildNodes().item(5).getChildNodes().item(0).getNodeValue()); result.setTotalDebitosPrincipal (itemNodes.item(1).getChildNodes().item(0).getChildNodes().item(0).getNodeValue()); result.setTotalDebitosBonus (itemNodes.item(1).getChildNodes().item(1).getChildNodes().item(0).getNodeValue()); result.setTotalDebitosSMS (itemNodes.item(1).getChildNodes().item(2).getChildNodes().item(0).getNodeValue()); result.setTotalDebitosGPRS (itemNodes.item(1).getChildNodes().item(3).getChildNodes().item(0).getNodeValue()); result.setTotalDebitosPeriodico (itemNodes.item(1).getChildNodes().item(4).getChildNodes().item(0).getNodeValue()); result.setTotalDebitosTotal (itemNodes.item(1).getChildNodes().item(5).getChildNodes().item(0).getNodeValue()); result.setTotalCreditosPrincipal(itemNodes.item(2).getChildNodes().item(0).getChildNodes().item(0).getNodeValue()); result.setTotalCreditosBonus (itemNodes.item(2).getChildNodes().item(1).getChildNodes().item(0).getNodeValue()); result.setTotalCreditosSMS (itemNodes.item(2).getChildNodes().item(2).getChildNodes().item(0).getNodeValue()); result.setTotalCreditosGPRS (itemNodes.item(2).getChildNodes().item(3).getChildNodes().item(0).getNodeValue()); result.setTotalCreditosPeriodico(itemNodes.item(2).getChildNodes().item(4).getChildNodes().item(0).getNodeValue()); result.setTotalCreditosTotal (itemNodes.item(2).getChildNodes().item(5).getChildNodes().item(0).getNodeValue()); result.setSaldoFinalPrincipal (itemNodes.item(3).getChildNodes().item(0).getChildNodes().item(0).getNodeValue()); result.setSaldoFinalBonus (itemNodes.item(3).getChildNodes().item(1).getChildNodes().item(0).getNodeValue()); result.setSaldoFinalSMS (itemNodes.item(3).getChildNodes().item(2).getChildNodes().item(0).getNodeValue()); result.setSaldoFinalGPRS (itemNodes.item(3).getChildNodes().item(3).getChildNodes().item(0).getNodeValue()); result.setSaldoFinalPeriodico (itemNodes.item(3).getChildNodes().item(4).getChildNodes().item(0).getNodeValue()); result.setSaldoFinalTotal (itemNodes.item(3).getChildNodes().item(5).getChildNodes().item(0).getNodeValue()); serviceElement = (Element) doc.getElementsByTagName( "dadosCadastrais" ).item(0); itemNodes = serviceElement.getChildNodes(); if (itemNodes.item(2).getChildNodes().item(0) != null) { result.setDataAtivacao(itemNodes.item(2).getChildNodes().item(0).getNodeValue()); } if (itemNodes.item(3).getChildNodes().item(0) != null) { result.setPlano(itemNodes.item(3).getChildNodes().item(0).getNodeValue()); } } } catch(NullPointerException e) { throw new Exception("Problemas com a geração do Comprovante de Serviços."); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void startElement(String espacio_nombres, String nombre_completo, String nombre_etiqueta,\r\n\t\t\tAttributes atributos) throws SAXException {\r\n\t\tif (nombre_etiqueta.equals(\"cantidad\")) {\r\n\t\t\tSystem.out.println(\"Cantidad: \");\r\n\t\t\tetiqueta_anterior = \"cantidad\";\r\n\t\t}\r\...
[ "0.61329365", "0.5817315", "0.57173467", "0.568149", "0.565352", "0.5651485", "0.56410336", "0.55726254", "0.54854697", "0.5471709", "0.54672277", "0.5407306", "0.53699845", "0.5358391", "0.5353021", "0.53317195", "0.5311994", "0.5259272", "0.5243615", "0.5243615", "0.5243615...
0.68789977
0
Le o XML do extrato retornado pelo GPP no arquivo criado na sessao.
private static String readFromFile(ArrayList diretorios, String sessionId) { StringBuffer result = new StringBuffer(); try { //Verificando na lista de diretorios se o arquivo pode ser encontrado. for(int i = 0; i < diretorios.size(); i++) { String fileName = (String)diretorios.get(i) + File.separator + sessionId; File fileExtrato = new File(fileName); if(fileExtrato.exists()) { //Lendo o XML do arquivo. FileReader reader = new FileReader(fileExtrato); char[] buffer = new char[new Long(fileExtrato.length()).intValue()]; int bytesRead = 0; while((bytesRead = reader.read(buffer)) != -1) { result.append(buffer); } reader.close(); break; } } } catch(Exception e) { e.printStackTrace(); } return (result.length() > 0) ? result.toString() : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static RetornoExtrato parse(String xmlExtrato) throws Exception\n\t{\n\t\tRetornoExtrato result = new RetornoExtrato();\n\t\t\n\t\ttry\n\t\t{\t\t\t\t\t\n\t\t\t//Obtendo os objetos necessarios para a execucao do parse do xml\n\t\t\tDocumentBuilderFactory docBuilder = DocumentBuilderFactory.newInstance();\n\...
[ "0.5937196", "0.5669714", "0.56444585", "0.5582642", "0.5332328", "0.5290343", "0.52739567", "0.52367693", "0.5192469", "0.5190454", "0.5152447", "0.5120376", "0.5109881", "0.51018614", "0.5096098", "0.5080247", "0.5080247", "0.50472367", "0.5047176", "0.5041284", "0.5016519"...
0.0
-1
Grava o XML do extrato retornado pelo GPP em arquivo.
private static void saveToFile(String xmlExtrato, ArrayList diretorios, String sessionId) { try { //Percorrendo a lista de diretorios e verificando se existe algum valido. for(int i = 0; i < diretorios.size(); i++) { File diretorio = new File((String)diretorios.get(i)); if((diretorio.exists()) && (diretorio.isDirectory())) { //Salvando o xml em arquivo String fileName = diretorios.get(i) + File.separator + sessionId; File fileExtrato = new File(fileName); FileWriter writer = new FileWriter(fileExtrato); writer.write(xmlExtrato); writer.close(); break; } } } catch(Exception e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void exportarXML(){\n \n String nombre_archivo=IO_ES.leerCadena(\"Inserte el nombre del archivo\");\n String[] nombre_elementos= {\"Modulos\", \"Estudiantes\", \"Profesores\"};\n Document doc=XML.iniciarDocument();\n doc=XML.estructurarDocument(doc, nombre_elementos);\n ...
[ "0.60666734", "0.55372864", "0.54506916", "0.54175603", "0.5373407", "0.53551567", "0.53147066", "0.5314182", "0.52882135", "0.5281166", "0.5244031", "0.5222948", "0.5206495", "0.5205105", "0.5198041", "0.5197243", "0.5188375", "0.517097", "0.513585", "0.513585", "0.5114613",...
0.0
-1
Retorna um numero double a partir de uma string. Espera que o parametros de regionalizacao estejam em formato ingles.
private static double stringToDouble(String valor) throws ParseException { DecimalFormat format = new DecimalFormat("#,###,##0.00", new DecimalFormatSymbols(Locale.ENGLISH)); double result = 0.0d; try { if(!valor.equalsIgnoreCase("")) { result = format.parse(valor).doubleValue(); } } catch(ParseException e) { result = 0; } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static Double stod(String string) {\n\t\tDouble result = 2.0; // should handle this error: \"cannnot convert string to Double\"\n\t\tif (string == null || string.equals(\"\") || string.equals(\"null\") || string.equals(\"I\")) {\n\t\t\tresult = 0.0;\n\t\t} else if (string.equals(\"E\")) {\n\t\t\tresult = 1...
[ "0.67107815", "0.6372205", "0.6332132", "0.6267937", "0.62506855", "0.624613", "0.62045336", "0.6195016", "0.6167419", "0.61516327", "0.6145517", "0.61367404", "0.6106356", "0.60456055", "0.60030985", "0.5956425", "0.5933406", "0.59328485", "0.58725846", "0.5859951", "0.58233...
0.6493843
1
Process a list of Individuals into a JSON array that holds the Names and URIs.
protected JSONArray individualsToJson(List<Individual> individuals) throws ServletException { try{ JSONArray ja = new JSONArray(); for (Individual ent: individuals) { JSONObject entJ = new JSONObject(); entJ.put("name", ent.getName()); entJ.put("URI", ent.getURI()); ja.put( entJ ); } return ja; }catch(JSONException ex){ throw new ServletException("could not convert list of Individuals into JSON: " + ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Individual> getListOfIndividuals(){\n \tList<Individual> individualList = new ArrayList<>();\n\t\tIndividual individualObject = null;\n\t\tMap<String, Object> myMap = null;\n\t\tObject obj = null;\n\t\tJSONObject jsonObject = null;\n\t\tJSONArray jsonArray = null;\n\t\tJSONObject jsonObj = null;\n...
[ "0.61776406", "0.52940696", "0.52225906", "0.5167618", "0.51388365", "0.50518024", "0.503359", "0.4981715", "0.49777815", "0.49564946", "0.49414593", "0.491027", "0.48475948", "0.47817418", "0.4769946", "0.47590563", "0.47579205", "0.47232234", "0.47219178", "0.47198218", "0....
0.73713714
0
Get the "vclassId" parameter from the request and instantiate the VClass. There must be one, and it must be valid.
protected VClass getVclassParameter(VitroRequest vreq) { String vclassId = vreq.getParameter("vclassId"); if (StringUtils.isEmpty(vclassId)) { log.error("parameter vclassId expected but not found"); throw new IllegalStateException("parameter vclassId expected "); } return instantiateVclass(vclassId, vreq); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected List<String> getVclassIds(VitroRequest vreq) {\n\t\tString[] vclassIds = vreq.getParameterValues(\"vclassId\");\n\t\tif ((vclassIds == null) || (vclassIds.length == 0)) {\n\t\t\tlog.error(\"parameter vclassId expected but not found\");\n\t\t\tthrow new IllegalStateException(\"parameter vclassId expected ...
[ "0.5663356", "0.5299197", "0.5063345", "0.48733944", "0.4868222", "0.48535985", "0.4822818", "0.47971445", "0.47788304", "0.4701368", "0.46944177", "0.46472678", "0.46394104", "0.46172217", "0.46004838", "0.45933917", "0.45919877", "0.45887905", "0.45885867", "0.45734295", "0...
0.79100305
0
Get one or more "vclassId" parameters from the request. Confirm that there is at least one, and that all are valid. Return value is never null and never empty.
protected List<String> getVclassIds(VitroRequest vreq) { String[] vclassIds = vreq.getParameterValues("vclassId"); if ((vclassIds == null) || (vclassIds.length == 0)) { log.error("parameter vclassId expected but not found"); throw new IllegalStateException("parameter vclassId expected "); } for (String vclassId : vclassIds) { instantiateVclass(vclassId, vreq); } return Arrays.asList(vclassIds); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected VClass getVclassParameter(VitroRequest vreq) {\n\t\tString vclassId = vreq.getParameter(\"vclassId\");\n\t\tif (StringUtils.isEmpty(vclassId)) {\n\t\t\tlog.error(\"parameter vclassId expected but not found\");\n\t\t\tthrow new IllegalStateException(\"parameter vclassId expected \");\n\t\t}\n\t\treturn in...
[ "0.6638624", "0.55077606", "0.485183", "0.48281676", "0.4727115", "0.47168288", "0.47023296", "0.4575096", "0.45685017", "0.4486277", "0.44839987", "0.44696748", "0.44437236", "0.43776286", "0.43764672", "0.43740287", "0.43697932", "0.43680954", "0.43468493", "0.43465132", "0...
0.67500436
0
Create a new routine call instance
public ToUnixNano() { super("to_unix_nano", Public.PUBLIC, org.jooq.impl.SQLDataType.BIGINT); setReturnParameter(RETURN_VALUE); addInParameter(TS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "FunCall createFunCall();", "ProcedureCall createProcedureCall();", "CallStatement createCallStatement();", "OperationCallExp createOperationCallExp();", "public X10Call createInstanceCall(Position pos, Expr receiver, Name name, Expr... args) {\n X10MethodInstance mi = createMethodInstance(receiver,...
[ "0.72287875", "0.68710935", "0.6642861", "0.62845594", "0.6253281", "0.6112726", "0.6102961", "0.60526145", "0.5877095", "0.5877095", "0.5857039", "0.58031934", "0.5744403", "0.573939", "0.5731038", "0.57096547", "0.57096547", "0.57062936", "0.5702379", "0.5686524", "0.568206...
0.0
-1
Set the ts parameter IN value to the routine
public void setTs(LocalDateTime value) { setValue(TS, value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTs(long value) {\n this.ts = value;\n }", "void setStaStart(double staStart);", "public void setSecond(T tt) {\n\t\t\tthis.t = tt;\n\t\t}", "public void setTimeStamp(java.lang.String param){\r\n \r\n if (param != null){\r\n ...
[ "0.62695366", "0.62150526", "0.615537", "0.6105196", "0.5988887", "0.5947909", "0.5752635", "0.57376194", "0.5719847", "0.5709217", "0.5678104", "0.5616959", "0.5612471", "0.5598708", "0.5564339", "0.5548879", "0.5534046", "0.5515244", "0.55123794", "0.5496988", "0.54967034",...
0.56796074
10
Constructor, creates a scene, a stage, and then set the stage to that scene specifically for creating triangles
public TriangleVisualizer(String rulesClass, Map<Integer, String> names, int numPossibleStates) { super(rulesClass, names, numPossibleStates); pointUp = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void initScene() {\n setupCamera(0xff888888);\n\n /*\n * Create a Cube and display next to the cube\n * */\n setupCube();\n\n\n /*\n * Create a Sphere and place it initially 4 meters next to the cube\n * */\n setupSphere();\n\n...
[ "0.688465", "0.6864878", "0.6862745", "0.68496794", "0.6832787", "0.6803148", "0.67884266", "0.677067", "0.67467296", "0.6655562", "0.6654083", "0.6605543", "0.65841496", "0.6456098", "0.645548", "0.6431936", "0.64037114", "0.6394928", "0.6376711", "0.63695604", "0.63354325",...
0.0
-1
move to the next row, update y position depending on if the triangles touch at the tip or side, reset x position, reset column number, and update the direction the triangle points
@Override protected void moveToNextRow(){ incrementRow(); resetXPos(); if(getRow()%2 == 1){ incrementYPos(getHeight()+getHeight()); } resetCol(); setPointDirection(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void moveNext(PositionTracker tracker) {\n\t\t \n\t\t //initiate if-else statement\n\t\t if(tracker.getExactColumn() == (tracker.getMaxColumns() - 1)) {\n\t\t\t \n\t\t\t //invoke the setExactRow method\n\t\t\t tracker.setExactRow(tracker.getExactRow() + 1);\n\t\t\t \n\t\t\t //invoke the setExactCol...
[ "0.6575142", "0.6554504", "0.6037747", "0.5999154", "0.59448177", "0.58763015", "0.5857792", "0.5846045", "0.57790345", "0.57691365", "0.5739374", "0.5726961", "0.57051915", "0.56965476", "0.5691372", "0.56735766", "0.5667497", "0.56386983", "0.5637216", "0.56134033", "0.5566...
0.7512361
0
move to the next column set the x and y position to the "point" of the triangle by incrementing the x position to half the width of the triangle, and incrementing/decrementing the y position by the height of the triangle update point direction for the new triangle
@Override protected void moveOver(){ incrementXPos(getWidth()/2); if(pointUp){ incrementYPos(-1*getHeight()); } else { incrementYPos(getHeight()); } incrementCol(); setPointDirection(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void moveToNextRow(){\n incrementRow();\n resetXPos();\n if(getRow()%2 == 1){\n incrementYPos(getHeight()+getHeight());\n }\n resetCol();\n setPointDirection();\n }", "private void moveNext(PositionTracker tracker) {\n\t\t \n\t\t //initiate if-else statement\n\t\t...
[ "0.7462324", "0.6370375", "0.627062", "0.6135186", "0.6056984", "0.6043757", "0.59741503", "0.59604806", "0.5815997", "0.5775329", "0.57133555", "0.5686991", "0.56585", "0.5650907", "0.56035334", "0.55964005", "0.5588109", "0.5564456", "0.5483639", "0.54725224", "0.5458729", ...
0.5386984
33
make a Double array of all the points of the triangle
@Override protected Double[] getCorners(){ return new Double[]{ //leftmost point getXPos(), getYPos(), //rightmost point getXPos() + getWidth(), getYPos(), //middle point getXPos() + getWidth() / 2, getYPos() + getHeight() * getThirdTriangleYPoint(pointUp) }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static double[] makePolygon() {\n double[] polygon = new double[POINTS*2];\n \n for (int i = 0; i < POINTS; i++) {\n double a = i * Math.PI * 2.0 / POINTS;\n polygon[2*i] = Math.cos(a);\n polygon[2*i+1] = Math.sin(a);\n }\n \n retur...
[ "0.6604535", "0.6602685", "0.6579462", "0.6545369", "0.6521145", "0.63004875", "0.6300247", "0.62512285", "0.6173004", "0.6064725", "0.60131663", "0.5972956", "0.59534234", "0.59315944", "0.5916257", "0.59022605", "0.58613575", "0.5859262", "0.58536565", "0.58410066", "0.5818...
0.5351629
69
reset all of the variables that we need to reset
@Override protected void resetVariables(){ super.resetVariables(); pointUp = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void reset() {\n errors.clear();\n variables.clear();\n }", "void reset(){\n if (vars!=null){\n vars.clear();\n }\n if (gVars!=null){\n gVars.clear();\n }\n }", "public void resetVariables(){\n\t\tthis.queryTriplets.clear();\n\t\tthis.variab...
[ "0.8379351", "0.823298", "0.8182319", "0.8133742", "0.810848", "0.8026295", "0.8001973", "0.79761225", "0.79655576", "0.79603237", "0.7942287", "0.7942036", "0.79112315", "0.7871278", "0.7811741", "0.7803175", "0.7796545", "0.77705634", "0.7768698", "0.7758958", "0.775697", ...
0.0
-1
Created by zengchao on 2020/8/17.
public interface BookMapper { List<Book> selectList(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\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 comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r...
[ "0.60354203", "0.59415275", "0.5615929", "0.5615929", "0.56067944", "0.55847865", "0.55435777", "0.5519293", "0.55065393", "0.54905", "0.5488055", "0.54860723", "0.5473072", "0.5458288", "0.5457532", "0.5457532", "0.5457532", "0.5457532", "0.5457532", "0.5457532", "0.54560834...
0.0
-1
Use this factory method to create a new instance of this fragment using the provided parameters.
public static MoreAppsFragment newInstance(String param1, String param2) { MoreAppsFragment fragment = new MoreAppsFragment(); Bundle args = new Bundle(); args.putString(ARG_PARAM1, param1); args.putString(ARG_PARAM2, param2); fragment.setArguments(args); return fragment; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static FragmentTousWanted newInstance() {\n FragmentTousWanted fragment = new FragmentTousWanted();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "protected abstract Fragment createFragment();", "public void createFragment() {\n\n ...
[ "0.7259329", "0.72331375", "0.71140355", "0.69909847", "0.69902235", "0.6834592", "0.683074", "0.68134046", "0.6801526", "0.6801054", "0.67653185", "0.6739714", "0.6739714", "0.6727412", "0.6717231", "0.6705855", "0.6692112", "0.6691661", "0.66869426", "0.66606814", "0.664618...
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { moreAppsView = inflater.inflate(R.layout.fragment_more_apps, container, false); initToolBar(); moreAppsRecyclerView = (RecyclerView) moreAppsView.findViewById(R.id.more_apps_list); MoreAppsAdapter moreAppsAdapter = new MoreAppsAdapter(getActivity(), getData(), getURLHash()); moreAppsRecyclerView.setAdapter(moreAppsAdapter); moreAppsRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity())); RecyclerView.ItemDecoration itemDecoration = new DividerItemDecoration(getActivity(), LinearLayoutManager.VERTICAL); moreAppsRecyclerView.addItemDecoration(itemDecoration); moreAppsRecyclerView.setItemAnimator(new DefaultItemAnimator()); return moreAppsView; }
{ "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
TODO Autogenerated method stub
@Override public Employee findById(int id) { List<Employee> employeeList= listEmployee().stream().filter((e -> e.getId()==id)).collect(Collectors.toList()); return (Employee)employeeList.get(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public List<Employee> findAllEmployee() { return null; }
{ "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
rescale coordinates and turn on animation mode
public static void main(String[] args) { StdDraw.setXscale(0, 32768); StdDraw.setYscale(0, 32768); StdDraw.show(0); StdDraw.setPenRadius(0.005); // make the points a bit larger // read in the input String filename = args[0]; In in = new In(filename); int N = in.readInt(); Point[] pList = new Point[N]; for (int i = 0; i < N; i++) { int x = in.readInt(); int y = in.readInt(); Point p = new Point(x, y); p.draw(); pList[i] = p; } Arrays.sort(pList); // create an auxiliary array for sorting points by slope Point[] aux = new Point[N]; for (int i = 0; i < N - 3; i++) { for (int j = i; j < N; j++) { aux[j] = pList[j]; } // sort points other than i by slope Arrays.sort(aux, i + 1, N, aux[i].SLOPE_ORDER); int countSameSlope = 1; String result = aux[i] + " -> "; for (int k = i + 1; k < N - 1; k++) { if (Double.compare(aux[i].slopeTo(aux[k]), aux[i].slopeTo(aux[k + 1])) == 0) { result += aux[k] + " -> "; countSameSlope++; } else if (countSameSlope >= 3) { result += aux[k]; StdOut.println(result); aux[i].drawTo(aux[k]); result = aux[i] + " -> "; countSameSlope = 1; } else { result = aux[i] + " -> "; countSameSlope = 1; } } // handle the case in which the last 3 or more points are collinear // with point i if (countSameSlope >= 3) { result += aux[N - 1]; StdOut.println(result); aux[i].drawTo(aux[N - 1]); } } // display to screen all at once StdDraw.show(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void rescale() {\n this.affineTransform = AffineTransform.getScaleInstance(this.zoom,\n this.zoom);\n int width = (int) ((this.board.getWidth() * 32) * this.zoom);\n int height = (int) ((this.board.getHeight() * 32) * this.zoom);\n this.setPreferredSize(new Dimens...
[ "0.6619501", "0.6260555", "0.62340385", "0.6104657", "0.61012423", "0.605866", "0.6031077", "0.595504", "0.5927886", "0.59125775", "0.58691466", "0.58380514", "0.580549", "0.5766119", "0.5758096", "0.5755019", "0.5749516", "0.57367617", "0.57134354", "0.57078", "0.57035", "...
0.0
-1
create fiveelement Employee array
public static void main(String[] args) { Employee[] employees = new Employee[5]; // initialize array with Employees employees[0] = new SalariedEmployee( "John", "Smith", "111-11-1111", 800.00); employees[1] = new HourlyEmployee( "Karen", "Price", "222-22-2222", 16.75, 40); employees[2] = new CommissionEmployee( "Sue", "Jones", "333-33-3333", 10000, .06); employees[3] = new BasePlusCommissionEmployee( "Bob", "Lewis", "444-44-4444", 5000, .04, 300); employees[4] = new PieceWorker( "Victor", "Figueroa", "555-555-5555", 90, 100); System.out.println("Employees processed polymorphically:\n"); // generically process each element in array employees for (Employee currentEmployee : employees) { System.out.println(currentEmployee); // invokes toString System.out.printf("earned $%,.2f\n\n", currentEmployee.earnings()); } // end for }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static CreateUser[] createArrayOfEmployeeNames(){\n\n CreateUser[] arr1 = new CreateUser[5];\n\n for (int i=0; i < arr1.length; i++){\n int age = (int) Math.random()* 100;\n String name = \"John\"+i;\n arr1[i] = new CreateUser(age, name); // create random peop;e w/ ages\n\n }\n\n ...
[ "0.72189695", "0.68756264", "0.664379", "0.6396597", "0.6348429", "0.6345742", "0.6337967", "0.62675023", "0.6181736", "0.61644435", "0.6132075", "0.61108273", "0.6088393", "0.60595095", "0.60587555", "0.5986997", "0.5940317", "0.5930364", "0.5884635", "0.5875344", "0.5869656...
0.5504679
40
Check all market options
public static void CheckMarketOptions(WebDriver driver) { String[] expectedMarkets = {"Forex","Major Pairs","Minor Pairs","Smart FX","Indices","Asia/Oceania", "Europe/Africa","Middle East","Americas","OTC Indices","OTC Stocks","Germany","India","UK","US", "Commodities","Metals","Energy","Volatility Indices","Continuous Indices","Daily Reset Indices"}; WebElement element = Trade_Page.select_Market(driver); ListsUtil.CompareLists(expectedMarkets, element); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void printAllOptions() {\n\t\tOption op = null;\n\t\tfor (int i = 0; i < options.size(); i++) {\n\t\t\top = options.get(i);\n\t\t\tSystem.out.println(i + \". \" + op.getOptionName() + \":Price \"\n\t\t\t\t\t+ String.format(\"%.2f\", op.getPrice()));\n\t\t}\n\t}", "public void validateRequestToBuyPage()...
[ "0.5862852", "0.571484", "0.5709352", "0.5638386", "0.55360496", "0.55320895", "0.5497223", "0.5411505", "0.5391812", "0.5384117", "0.5384117", "0.53741884", "0.53719825", "0.53671503", "0.53285944", "0.53285944", "0.53285944", "0.53285944", "0.53285944", "0.53285944", "0.532...
0.6933545
0
Check underlying assets for Forex market
public static void CheckForexAssets(WebDriver driver) { String[] forexAssets = {"AUD/JPY","AUD/USD","EUR/AUD","EUR/CAD","EUR/CHF","EUR/GBP","EUR/JPY","EUR/USD", "GBP/AUD","GBP/JPY","GBP/USD","USD/CAD","USD/CHF","USD/JPY","AUD/CAD","AUD/CHF","AUD/NZD","AUD/PLN", "EUR/NZD","GBP/CAD","GBP/CHF","GBP/NOK","GBP/NZD","GBP/PLN","NZD/JPY","NZD/USD","USD/MXN","USD/NOK", "USD/PLN","USD/SEK","AUD Index","EUR Index","GBP Index","USD Index"}; Select oSelect = new Select(Trade_Page.select_Market(driver)); oSelect.selectByVisibleText("Forex"); WebElement element = Trade_Page.select_Asset(driver); ListsUtil.CompareLists(forexAssets, element); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasForecast();", "public static void CheckOTCStocksAssets(WebDriver driver) {\n\t\tString[] OTCStocksAssets = {\"Airbus\",\"Allianz\",\"BMW\",\"Daimler\",\"Deutsche Bank\",\"Novartis\",\"SAP\",\"Siemens\",\"Bharti Airtel\",\"Maruti Suzuki\",\"Reliance Industries\",\"Tata Steel\",\"Barclays\",\"BP\",\n\t\...
[ "0.5927861", "0.5888805", "0.57600087", "0.5503836", "0.5474449", "0.5469982", "0.54619193", "0.543078", "0.53805614", "0.5357748", "0.53489643", "0.5345346", "0.5317172", "0.53034514", "0.5282685", "0.5265457", "0.5222403", "0.5165131", "0.51353383", "0.5127785", "0.51132256...
0.70027196
0
Check underlying assets for Indices market
public static void CheckIndicesAssets(WebDriver driver) { String[] IndicesAssets = {"Australian Index","Bombay Index","Hong Kong Index","Jakarta Index","Japanese Index","Singapore Index","Belgian Index","Dutch Index", "French Index","German Index","Irish Index","Norwegian Index","South African Index","Swiss Index","Australian OTC Index","Belgian OTC Index","Bombay OTC Index","Dutch OTC Index", "French OTC Index","German OTC Index","Hong Kong OTC Index","Istanbul OTC Index","Japanese OTC Index","UK OTC Index","US OTC Index","US Tech OTC Index","Wall Street OTC Index","Dubai Index", "US Index"}; Select oSelect = new Select(Trade_Page.select_Market(driver)); oSelect.selectByVisibleText("Indices"); WebElement element = Trade_Page.select_Asset(driver); ListsUtil.CompareLists(IndicesAssets, element); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void CheckVolatilityIndicesAssets(WebDriver driver) {\n\t\tString[] VolatilityIndicesAssets = {\"Volatility 10 Index\",\"Volatility 100 Index\",\"Volatility 25 Index\",\"Volatility 50 Index\",\"Volatility 75 Index\",\"Bear Market Index\",\"Bull Market Index\"};\n\t\tSelect oSelect = new Select(Trade_...
[ "0.67673874", "0.6137068", "0.58040345", "0.5529299", "0.53228265", "0.53170365", "0.52349436", "0.5220641", "0.52120763", "0.51321834", "0.50829685", "0.50820035", "0.5031008", "0.50253844", "0.5006012", "0.5004206", "0.49900457", "0.4989484", "0.4987972", "0.49622792", "0.4...
0.7188198
0
Check underlying assets for Indices market
public static void CheckOTCStocksAssets(WebDriver driver) { String[] OTCStocksAssets = {"Airbus","Allianz","BMW","Daimler","Deutsche Bank","Novartis","SAP","Siemens","Bharti Airtel","Maruti Suzuki","Reliance Industries","Tata Steel","Barclays","BP", "British American Tobacco","HSBC","Lloyds Bank","Rio Tinto","Standard Chartered","Tesco","Alibaba","Alphabet","Amazon.com","American Express","Apple","Berkshire Hathaway","Boeing","Caterpillar", "Citigroup","Electronic Arts","Exxon Mobil","Facebook","Goldman Sachs","IBM","Johnson & Johnson","MasterCard","McDonald's","Microsoft", "PepsiCo","Procter & Gamble"}; Select oSelect = new Select(Trade_Page.select_Market(driver)); oSelect.selectByVisibleText("OTC Stocks"); WebElement element = Trade_Page.select_Asset(driver); ListsUtil.CompareLists(OTCStocksAssets, element); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void CheckIndicesAssets(WebDriver driver) {\n\t\tString[] IndicesAssets = {\"Australian Index\",\"Bombay Index\",\"Hong Kong Index\",\"Jakarta Index\",\"Japanese Index\",\"Singapore Index\",\"Belgian Index\",\"Dutch Index\",\n\t\t\t\t\"French Index\",\"German Index\",\"Irish Index\",\"Norwegian Index...
[ "0.7188198", "0.67673874", "0.6137068", "0.58040345", "0.5529299", "0.53228265", "0.53170365", "0.52349436", "0.5220641", "0.52120763", "0.50829685", "0.50820035", "0.5031008", "0.50253844", "0.5006012", "0.5004206", "0.49900457", "0.4989484", "0.4987972", "0.49622792", "0.49...
0.51321834
10
Check underlying assets for Indices market
public static void CheckCommoditiesAssets(WebDriver driver) { String[] CommoditiesAssets = {"Gold/USD","Palladium/USD","Platinum/USD","Silver/USD","Oil/USD"}; Select oSelect = new Select(Trade_Page.select_Market(driver)); oSelect.selectByVisibleText("Commodities"); WebElement element = Trade_Page.select_Asset(driver); ListsUtil.CompareLists(CommoditiesAssets, element); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void CheckIndicesAssets(WebDriver driver) {\n\t\tString[] IndicesAssets = {\"Australian Index\",\"Bombay Index\",\"Hong Kong Index\",\"Jakarta Index\",\"Japanese Index\",\"Singapore Index\",\"Belgian Index\",\"Dutch Index\",\n\t\t\t\t\"French Index\",\"German Index\",\"Irish Index\",\"Norwegian Index...
[ "0.7188198", "0.67673874", "0.6137068", "0.58040345", "0.5529299", "0.53228265", "0.53170365", "0.52349436", "0.52120763", "0.51321834", "0.50829685", "0.50820035", "0.5031008", "0.50253844", "0.5006012", "0.5004206", "0.49900457", "0.4989484", "0.4987972", "0.49622792", "0.4...
0.5220641
8
Check underlying assets for Indices market
public static void CheckVolatilityIndicesAssets(WebDriver driver) { String[] VolatilityIndicesAssets = {"Volatility 10 Index","Volatility 100 Index","Volatility 25 Index","Volatility 50 Index","Volatility 75 Index","Bear Market Index","Bull Market Index"}; Select oSelect = new Select(Trade_Page.select_Market(driver)); oSelect.selectByVisibleText("Volatility Indices"); WebElement element = Trade_Page.select_Asset(driver); ListsUtil.CompareLists(VolatilityIndicesAssets, element); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void CheckIndicesAssets(WebDriver driver) {\n\t\tString[] IndicesAssets = {\"Australian Index\",\"Bombay Index\",\"Hong Kong Index\",\"Jakarta Index\",\"Japanese Index\",\"Singapore Index\",\"Belgian Index\",\"Dutch Index\",\n\t\t\t\t\"French Index\",\"German Index\",\"Irish Index\",\"Norwegian Index...
[ "0.7188198", "0.6137068", "0.58040345", "0.5529299", "0.53228265", "0.53170365", "0.52349436", "0.5220641", "0.52120763", "0.51321834", "0.50829685", "0.50820035", "0.5031008", "0.50253844", "0.5006012", "0.5004206", "0.49900457", "0.4989484", "0.4987972", "0.49622792", "0.49...
0.67673874
1
Select duration type and enter duration amount
public static void SelectEnterDuration(WebDriver driver,String durationAmount,String durationUnits) { Select dSelect = new Select(Trade_Page.select_Duration(driver)); dSelect.selectByValue("duration"); Select tSelect = new Select(Trade_Page.select_DurationUnits(driver)); tSelect.selectByValue(durationUnits); Actions action = new Actions(driver); action.doubleClick(Trade_Page.txt_DurationAmount(driver)).perform(); Trade_Page.txt_DurationAmount(driver).sendKeys(durationAmount); Trade_Page.txt_Amount(driver).click(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void ValidateDurationFields(WebDriver driver,String durationType){\n\t\tif(durationType==\"t\"){\n\t\t\tSelectEnterDuration(driver,\"2\",durationType);\n\t\t\tAssert.assertEquals(Trade_Page.err_TopPurchase(driver).getText(), \"Number of ticks must be between 5 and 10.\");\n\t\t\tAssert.assertEquals(T...
[ "0.66973376", "0.65382725", "0.6516639", "0.6433246", "0.63591594", "0.63296586", "0.63125604", "0.62073773", "0.61743873", "0.6172739", "0.6172739", "0.6165813", "0.61538815", "0.61387944", "0.61367625", "0.603514", "0.6007906", "0.60015833", "0.5986486", "0.5975591", "0.597...
0.62577385
7
Select duration and Enter amount
public static void SelectEnterAmount(WebDriver driver,String amount_value,String amount_type,String durationAmount,String durationUnits) { SelectEnterDuration(driver,durationAmount,durationUnits); Select oSelect = new Select(Trade_Page.select_AmountType(driver)); oSelect.selectByVisibleText(amount_type); Actions builder = new Actions(driver); Action seriesofActions = builder .doubleClick(Trade_Page.txt_Amount(driver)) .sendKeys(amount_value) .build(); seriesofActions.perform(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void SelectEnterDuration(WebDriver driver,String durationAmount,String durationUnits) {\n\t\tSelect dSelect = new Select(Trade_Page.select_Duration(driver));\n\t\tdSelect.selectByValue(\"duration\");\n\t\tSelect tSelect = new Select(Trade_Page.select_DurationUnits(driver));\n\t\ttSelect.selectByValue...
[ "0.68234396", "0.65520465", "0.6354943", "0.6348624", "0.6298572", "0.6271846", "0.6169886", "0.61108965", "0.60060585", "0.5983401", "0.59660715", "0.59248817", "0.5922179", "0.580086", "0.580086", "0.5793864", "0.5776892", "0.57599455", "0.5757944", "0.57490563", "0.5698747...
0.6653763
1
Navigate to UpDown/RiseFall page
public static void NavigateToUpDownRiseFall(WebDriver driver,String market,String asset) { Select mSelect = new Select(Trade_Page.select_Market(driver)); mSelect.selectByVisibleText(market); Select aSelect = new Select(Trade_Page.select_Asset(driver)); aSelect.selectByVisibleText(asset); Trade_Page.link_UpDown(driver).click(); Trade_Page.link_RiseFall(driver).click(); Select sSelect = new Select(Trade_Page.select_StartTime(driver)); sSelect.selectByValue("now"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void goUp();", "public void navigateToForward() {\n WebDriverManager.getDriver().navigate().forward();\n }", "public void goToNextPage() {\n nextPageButton.click();\n }", "public void goDown();", "private void goUpWall() {\n\t\t// TODO Auto-generated method stub\n\t\tthis.turnLef...
[ "0.64351964", "0.61153543", "0.6033789", "0.59663045", "0.59281254", "0.5880382", "0.5859665", "0.58588916", "0.5823634", "0.582095", "0.58096004", "0.5807583", "0.5804022", "0.5789682", "0.57796365", "0.5773222", "0.5752303", "0.5736581", "0.5735289", "0.5729859", "0.572884"...
0.5922847
5
Navigate to UpDown/HigherLower page
public static void NavigateToUpDownHigherLower(WebDriver driver,String market,String asset) { Select mSelect = new Select(Trade_Page.select_Market(driver)); mSelect.selectByVisibleText(market); Select aSelect = new Select(Trade_Page.select_Asset(driver)); aSelect.selectByVisibleText(asset); Trade_Page.link_UpDown(driver).click(); Trade_Page.link_HigherLower(driver).click(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void backPage()\n {\n page--;\n open();\n }", "public void goUp() {\n if(page.up == null)\n {\n if(editText.getText().toString().equals(\"\")) {\n return;\n }\n page.addRelation(\"up\",editText.getText().toString());\n ...
[ "0.6793026", "0.64972657", "0.64504206", "0.6370494", "0.63123626", "0.6303109", "0.6243417", "0.62113684", "0.62070733", "0.61499417", "0.61215484", "0.61092776", "0.60938996", "0.60797644", "0.6057831", "0.59538823", "0.59532464", "0.59517676", "0.59256905", "0.59091836", "...
0.56393677
62
Navigate to TouchNoTouch page
public static void NavigateToTouchNoTouch(WebDriver driver,String market,String asset) { Select mSelect = new Select(Trade_Page.select_Market(driver)); mSelect.selectByVisibleText(market); Select aSelect = new Select(Trade_Page.select_Asset(driver)); aSelect.selectByVisibleText(asset); Trade_Page.link_TouchNoTouch(driver).click(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void FuncSwipe() {\n AppiumDriver<MobileElement> driver = getAppiumDriver();\n\n TouchAction action = new TouchAction((AppiumDriver<MobileElement>) driver);\n\n driver.context(\"NATIVE_APP\");\n\n Dimension size = driver.manage().window().getSize();\n\n int startY =...
[ "0.6023329", "0.5822787", "0.58042866", "0.5795216", "0.57784945", "0.5726778", "0.57152206", "0.56253994", "0.5617523", "0.5587618", "0.55543226", "0.553216", "0.5530375", "0.5529238", "0.5521694", "0.5518063", "0.5512196", "0.55045384", "0.55038005", "0.55014724", "0.547827...
0.51876026
74
Navigate to InOut/EndsInOut page
public static void NavigateToInOutEndsInOut(WebDriver driver,String market,String asset) { Select mSelect = new Select(Trade_Page.select_Market(driver)); mSelect.selectByVisibleText(market); Select aSelect = new Select(Trade_Page.select_Asset(driver)); aSelect.selectByVisibleText(asset); Trade_Page.link_InOut(driver).click(); Trade_Page.link_EndsInOut(driver).click(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void writeNavigation(PrintWriter out, RequestProperties reqState)\n throws IOException\n {\n // ignore\n }", "@Override\r\n\tpublic void navigate() {\n\t\t\r\n\t}", "public void naviagteBackToPage() {\n\t\tgetDriver().close();\n\t}", "private String navigateAfterLoginAttemp()\r\n ...
[ "0.5900215", "0.5829397", "0.58098775", "0.5709997", "0.56797945", "0.5594976", "0.55487937", "0.5508816", "0.55026644", "0.5490825", "0.54805547", "0.5468813", "0.54653805", "0.5458407", "0.5448022", "0.53946805", "0.53806335", "0.5340384", "0.53100586", "0.5294055", "0.5254...
0.54634494
13
Navigate to InOut/StaysInGoesOut page
public static void NavigateToInOutStaysInGoesOut(WebDriver driver,String market,String asset) { Select mSelect = new Select(Trade_Page.select_Market(driver)); mSelect.selectByVisibleText(market); Select aSelect = new Select(Trade_Page.select_Asset(driver)); aSelect.selectByVisibleText(asset); Trade_Page.link_InOut(driver).click(); Trade_Page.link_StaysInOut(driver).click(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void goToCheckout() {\n click(CHECKOUT_UPPER_MENU);\n }", "@Override\n\tpublic void goToStings() {\n\t\t\n\t}", "public void signOut(){\n \n\t // click on the sign in/out drop down menu\n \t new WebDriverWait (DRIVER, 5)\n \t .until (ExpectedConditions.presenceOfElementLocated(...
[ "0.5827578", "0.5619024", "0.5545056", "0.53711545", "0.5353426", "0.53432107", "0.5324361", "0.5290358", "0.5237696", "0.51944506", "0.51905864", "0.5188789", "0.5162298", "0.51513565", "0.51006305", "0.509485", "0.50584495", "0.50376457", "0.50357246", "0.50162673", "0.5007...
0.566137
1
Navigate to Asians page
public static void NavigateToAsians(WebDriver driver,String market,String asset) { Select mSelect = new Select(Trade_Page.select_Market(driver)); mSelect.selectByVisibleText(market); Select aSelect = new Select(Trade_Page.select_Asset(driver)); aSelect.selectByVisibleText(asset); Trade_Page.link_Asians(driver).click(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DashBoardPage NavigateToMittICA()\n{\n\tif(Action.IsVisible(Master_Guest_Mitt_ICA_Link))\n\tAction.Click(Master_Guest_Mitt_ICA_Link);\n\telse\n\t\tAction.Click(Master_SignIN_Mitt_ICA_Link);\n\treturn this;\n}", "public HomePageAustria() {\n\t\tPageFactory.initElements(driver, this);\n\t}", "public void ...
[ "0.6321176", "0.62929964", "0.5995705", "0.5961209", "0.5942742", "0.5888092", "0.5784795", "0.57190776", "0.5711328", "0.5697535", "0.5659104", "0.5591873", "0.5589734", "0.5581725", "0.55676234", "0.55545735", "0.5545063", "0.55416477", "0.55212873", "0.5502393", "0.5496085...
0.54057235
31
Navigate to Digits/MatchesDiffers page
public static void NavigateToDigitsMatchesDiffers(WebDriver driver,String market,String asset) { Select mSelect = new Select(Trade_Page.select_Market(driver)); mSelect.selectByVisibleText(market); Select aSelect = new Select(Trade_Page.select_Asset(driver)); aSelect.selectByVisibleText(asset); Trade_Page.link_Digits(driver).click(); Trade_Page.link_MatchesDiffers(driver).click(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void findMatches() {\n this.user.getMatches().clear();\n final String HOST_MATCH = HOST_URL + \"/match/\" + user.getId() + \"/?page=0\" + HomeView.MATCH_LIMIT;\n RequestQueue que = Volley.newRequestQueue(this);\n JsonObjectRequest req = new JsonObjectRequest(Request.Method.GET, ...
[ "0.5005197", "0.49914947", "0.49220988", "0.4723523", "0.45784533", "0.45706734", "0.45637834", "0.45567662", "0.4547705", "0.454527", "0.4538272", "0.45261168", "0.45190585", "0.45089895", "0.4497062", "0.4482963", "0.4461246", "0.44559988", "0.44389012", "0.44328892", "0.44...
0.5973671
0
Navigate to Digits/EvenOdd page
public static void NavigateToDigitsEvenOdd(WebDriver driver,String market,String asset) { Select mSelect = new Select(Trade_Page.select_Market(driver)); mSelect.selectByVisibleText(market); Select aSelect = new Select(Trade_Page.select_Asset(driver)); aSelect.selectByVisibleText(asset); Trade_Page.link_Digits(driver).click(); Trade_Page.link_EvenOdd(driver).click(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void findOddEven() {\n\t\tif (number % 2 == 0) {\n\t\t\tif (number >= 2 && number <= 5)\n\t\t\t\tSystem.out.println(\"Number is even and between 2 to 5...!!\");\n\t\t\telse if (number >= 6 && number <= 20)\n\t\t\t\tSystem.out.println(\"Number is even and between 6 to 20...!!\");\n\t\t\telse\n\t\t\t\tSystem...
[ "0.59434646", "0.5519697", "0.5488343", "0.54833996", "0.5482036", "0.54457766", "0.5400052", "0.53836966", "0.53615683", "0.5330166", "0.5300766", "0.5288227", "0.5214112", "0.52103925", "0.5187659", "0.51697487", "0.51523006", "0.5149202", "0.5149061", "0.5135286", "0.50544...
0.5840325
1
Navigate to Digits/OverUnder page
public static void NavigateToDigitsOverUnder(WebDriver driver,String market,String asset) { Select mSelect = new Select(Trade_Page.select_Market(driver)); mSelect.selectByVisibleText(market); Select aSelect = new Select(Trade_Page.select_Asset(driver)); aSelect.selectByVisibleText(asset); Trade_Page.link_Digits(driver).click(); Trade_Page.link_OverUnder(driver).click(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void goToSlide() {\t\t\t\t\r\n\t\tString pageNumberStr = JOptionPane.showInputDialog(\"Page number?\");\r\n\t\tint pageNumber = Integer.parseInt(pageNumberStr);\r\n\t\t\r\n\t\tgoToSlide(pageNumber);\r\n\t}", "@Override\r\n\tpublic URLModule gotoPage(int page) {\n\t\treturn null;\r\n\t}", "private void f...
[ "0.57804245", "0.546563", "0.54248875", "0.5402067", "0.52735764", "0.5151129", "0.5130492", "0.5103776", "0.50907105", "0.5071434", "0.5061686", "0.50390005", "0.49695262", "0.49623835", "0.49620637", "0.49571252", "0.49569187", "0.4924578", "0.49143234", "0.49051622", "0.49...
0.5867666
0
Method to validate duration fields
public static void ValidateDurationFields(WebDriver driver,String durationType){ if(durationType=="t"){ SelectEnterDuration(driver,"2",durationType); Assert.assertEquals(Trade_Page.err_TopPurchase(driver).getText(), "Number of ticks must be between 5 and 10."); Assert.assertEquals(Trade_Page.err_BottomPurchase(driver).getText(), "Number of ticks must be between 5 and 10."); SelectEnterDuration(driver,"11",durationType); Assert.assertEquals(Trade_Page.err_TopPurchase(driver).getText(), "Number of ticks must be between 5 and 10."); Assert.assertEquals(Trade_Page.err_BottomPurchase(driver).getText(), "Number of ticks must be between 5 and 10."); } else if(durationType=="s") { SelectEnterDuration(driver,"2",durationType); Assert.assertEquals(Trade_Page.err_TradingOfferTop(driver).getText(), "Trading is not offered for this duration."); Assert.assertEquals(Trade_Page.err_TradingOfferBottom(driver).getText(), "Trading is not offered for this duration."); SelectEnterDuration(driver,"99999",durationType); Assert.assertEquals(Trade_Page.err_GreaterThan24HrsTop(driver).getText(), "Contracts on this market with a duration of more than 24 hours must expire at the end of a trading day."); Assert.assertEquals(Trade_Page.err_GreaterThan24HrsBottom(driver).getText(), "Contracts on this market with a duration of more than 24 hours must expire at the end of a trading day."); } else if(durationType=="m"){ SelectEnterDuration(driver,"0",durationType); Assert.assertEquals(Trade_Page.err_ExpiryTimeTop(driver).getText(), "Expiry time cannot be equal to start time."); Assert.assertEquals(Trade_Page.err_ExpiryTimeBottom(driver).getText(), "Expiry time cannot be equal to start time."); SelectEnterDuration(driver,"9999",durationType); Assert.assertEquals(Trade_Page.err_GreaterThan24HrsTop(driver).getText(), "Contracts on this market with a duration of more than 24 hours must expire at the end of a trading day."); Assert.assertEquals(Trade_Page.err_GreaterThan24HrsBottom(driver).getText(), "Contracts on this market with a duration of more than 24 hours must expire at the end of a trading day."); } else if(durationType=="h"){ SelectEnterDuration(driver,"0",durationType); Assert.assertEquals(Trade_Page.err_ExpiryTimeTop(driver).getText(), "Expiry time cannot be equal to start time."); Assert.assertEquals(Trade_Page.err_ExpiryTimeBottom(driver).getText(), "Expiry time cannot be equal to start time."); SelectEnterDuration(driver,"999",durationType); System.out.println(Trade_Page.err_TopPurchase(driver).getText()); //Assert.assertEquals(Trade_Page.err_GreaterThan24HrsTop(driver).getText(), "Contracts on this market with a duration of more than 24 hours must expire at the end of a trading day."); //Assert.assertEquals(Trade_Page.err_GreaterThan24HrsBottom(driver).getText(), "Contracts on this market with a duration of more than 24 hours must expire at the end of a trading day."); } else if(durationType=="d"){ SelectEnterDuration(driver,"0",durationType); Assert.assertEquals(Trade_Page.err_ExpiryTimeTop(driver).getText(), "Expiry time cannot be equal to start time."); Assert.assertEquals(Trade_Page.err_ExpiryTimeBottom(driver).getText(), "Expiry time cannot be equal to start time."); SelectEnterDuration(driver,"366",durationType); Assert.assertEquals(Trade_Page.err_CannotCreateContractTop(driver).getText(), "Cannot create contract"); Assert.assertEquals(Trade_Page.err_CannotCreateContractBottom(driver).getText(), "Cannot create contract"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean durationValidation(int duration){\n return duration < 300 && duration >10;\n }", "public void validateTestDuration(LocalTime duration, LocalDateTime startDate, LocalDateTime endDate)\n\t\t\tthrows UserException {\n\t\tlong hours = ChronoUnit.HOURS.between(startDate, endDate);\n\t\tif (d...
[ "0.7365917", "0.6906158", "0.66532624", "0.6610327", "0.6520211", "0.6409106", "0.62755716", "0.62755716", "0.62755716", "0.622525", "0.62204343", "0.6175152", "0.61461455", "0.6073091", "0.6027483", "0.6009486", "0.6008571", "0.598563", "0.59046763", "0.5886426", "0.583597",...
0.71388227
1
Method to validate amount fields
public static void ValidateAmountField(WebDriver driver,String market,String amount_type){ if(market=="Volatility Indices"){ SelectEnterAmount(driver,"0.34",amount_type,"5","m"); Assert.assertEquals(Trade_Page.err_Payout50000Top(driver).getText(), "Minimum stake of 0.35 and maximum payout of 50000.00."); Assert.assertEquals(Trade_Page.err_Payout50000Bottom(driver).getText(), "Minimum stake of 0.35 and maximum payout of 50000.00."); System.out.println(Trade_Page.err_Payout50000Top(driver).getText()); SelectEnterAmount(driver,"51000",amount_type,"5","m"); Assert.assertEquals(Trade_Page.err_Payout50000Top(driver).getText(), "Minimum stake of 0.35 and maximum payout of 50000.00."); Assert.assertEquals(Trade_Page.err_Payout50000Bottom(driver).getText(), "Minimum stake of 0.35 and maximum payout of 50000.00."); System.out.println(Trade_Page.err_Payout50000Top(driver).getText()); } else if (market=="Forex"){ SelectEnterAmount(driver,"0.49",amount_type,"5","m"); Assert.assertEquals(Trade_Page.err_Payout5000Top(driver).getText(), "Minimum stake of 0.50 and maximum payout of 5000.00."); Assert.assertEquals(Trade_Page.err_Payout5000Bottom(driver).getText(), "Minimum stake of 0.50 and maximum payout of 5000.00."); System.out.println(Trade_Page.err_Payout5000Top(driver).getText()); SelectEnterAmount(driver,"21000",amount_type,"5","m"); Assert.assertEquals(Trade_Page.err_Payout5000Top(driver).getText(), "Minimum stake of 0.50 and maximum payout of 5000.00."); Assert.assertEquals(Trade_Page.err_Payout5000Bottom(driver).getText(), "Minimum stake of 0.50 and maximum payout of 5000.00."); } else if (market=="Commodities"){ SelectEnterAmount(driver,"0.49",amount_type,"5","m"); Assert.assertEquals(Trade_Page.err_Payout5000Top(driver).getText(), "Minimum stake of 0.50 and maximum payout of 5000.00."); Assert.assertEquals(Trade_Page.err_Payout5000Bottom(driver).getText(), "Minimum stake of 0.50 and maximum payout of 5000.00."); SelectEnterAmount(driver,"5100",amount_type,"5","m"); Assert.assertEquals(Trade_Page.err_Payout5000Top(driver).getText(), "Minimum stake of 0.50 and maximum payout of 5000.00."); Assert.assertEquals(Trade_Page.err_Payout5000Bottom(driver).getText(), "Minimum stake of 0.50 and maximum payout of 5000.00."); System.out.println(Trade_Page.err_Payout5000Top(driver).getText()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean validateAmountFormat(String amount,\n HttpServletRequest req, HttpServletResponse resp) throws IOException {\n if(!amount.matches(wholeNumber)\n && !amount.matches(fraction)\n && !amount.matches(trailingZeroFraction)\n ...
[ "0.6434838", "0.6386841", "0.63493824", "0.634079", "0.63356173", "0.6282881", "0.62572914", "0.6212309", "0.6212309", "0.6196332", "0.6181072", "0.6171213", "0.61689955", "0.61520606", "0.6151573", "0.61292404", "0.6016098", "0.59782624", "0.5965032", "0.5955955", "0.5944961...
0.6139372
15
Method to validate barrier fields
public static void ValidateBarrierField(WebDriver driver,String submarket,String amount_type){ if(submarket=="TouchNoTouch"){ SelectEnterAmount(driver,"10",amount_type,"15","m"); Trade_Page.txt_BarrierOffset(driver).clear(); Trade_Page.txt_BarrierOffset(driver).sendKeys("2"); Assert.assertEquals(Trade_Page.err_BarrierRangeTop(driver).getText(), "Barrier is out of acceptable range."); Assert.assertEquals(Trade_Page.err_BarrierRangeBottom(driver).getText(), "Barrier is out of acceptable range."); } else if(submarket=="HigherLower"){ SelectEnterAmount(driver,"10",amount_type,"15","m"); Trade_Page.txt_BarrierOffset(driver).clear(); Trade_Page.txt_BarrierOffset(driver).sendKeys("2"); Assert.assertEquals(Trade_Page.err_BarrierRangeTop(driver).getText(), "Barrier is out of acceptable range."); Assert.assertEquals(Trade_Page.err_BarrierRangeBottom(driver).getText(), "Barrier is out of acceptable range."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean validateRequiredFields(StringBuffer b){\n boolean result = true;\n\n if (!TextFieldHelper.isNumericFieldValid(this.goalValue, \" Цель: \", b) ||\n !TextFieldHelper.isNumericFieldValid(this.startWeightValue, \" Исходный вес: \", b) ||\n !TextFieldHelper.isNumericFieldVali...
[ "0.6777036", "0.6593369", "0.6260926", "0.6237419", "0.6193735", "0.6145627", "0.60918534", "0.6091656", "0.6079719", "0.6045013", "0.604254", "0.6038891", "0.60353434", "0.6033634", "0.602545", "0.6023079", "0.5992484", "0.5980819", "0.59801275", "0.597726", "0.59747547", ...
0.5963627
23
Method to validate top contract purchase
public static void ValidateContractTopPurchase(WebDriver driver,String submarket,String duration,String durationType,String amount){ GetTradeConfirmationDetails(driver,submarket,duration,durationType,amount); Trade_Page.btn_View(driver).click(); Assert.assertTrue(Trade_Page.window_SellPopup(driver).isDisplayed()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void validatePurchaseOrder(MaintenanceRequest mrq) throws MalBusinessException{\n\t\tArrayList<String> messages = new ArrayList<String>();\n\t\tBigDecimal amount = new BigDecimal(0.00);\n\t\t\t\t\n\t\t//Validate PO header required data\n\t\tif(MALUtilities.isEmptyString(mrq.getJobNo()))\n\t\t\tmessages.add...
[ "0.6757798", "0.6441471", "0.6395565", "0.6395565", "0.6234337", "0.6105334", "0.6097271", "0.6077207", "0.60730314", "0.6044051", "0.5940269", "0.5936669", "0.5798317", "0.57909286", "0.5771436", "0.56856257", "0.5676788", "0.5666243", "0.5609501", "0.56082773", "0.56034076"...
0.63848615
4
LC167 Two Sum II Input array is sorted;
public int[] twoSumSorted(int[] numbers, int target) { int len = numbers.length; if (len < 2) return null; int left = 0, right = len - 1; while(left < right){ int tmp = numbers[left] + numbers[right]; if (tmp == target) { return new int[] {left + 1, right + 1}; } else if (tmp > target) { right--; } else { left++; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int[] twoSum(int[] numbers, int target) {\n // Start typing your Java solution below\n // DO NOT write main() function\n int[] aux = new int[numbers.length];\n HashMap<Integer, Integer> valueToIndex = new HashMap<Integer, Integer>();\n for (int i = 0; i < numbe...
[ "0.672216", "0.6673129", "0.66365856", "0.65503097", "0.6422734", "0.6394759", "0.6320159", "0.631183", "0.6289563", "0.6274883", "0.6266936", "0.61951745", "0.6191919", "0.6176287", "0.61705416", "0.6151548", "0.6150978", "0.6128215", "0.6121217", "0.60981077", "0.6085176", ...
0.62906486
8
Fetch EPG routinely or ondemand during channel scanning
public interface EpgFetcher { /** * Starts the routine service of EPG fetching. It use {@link JobScheduler} to schedule the EPG * fetching routine. The EPG fetching routine will be started roughly every 4 hours, unless the * channel scanning of tuner input is started. */ @MainThread void startRoutineService(); /** * Fetches EPG immediately if current EPG data are out-dated, i.e., not successfully updated by * routine fetching service due to various reasons. */ @MainThread void fetchImmediatelyIfNeeded(); /** Fetches EPG immediately. */ @MainThread void fetchImmediately(); /** Notifies EPG fetch service that channel scanning is started. */ @MainThread void onChannelScanStarted(); /** Notifies EPG fetch service that channel scanning is finished. */ @MainThread void onChannelScanFinished(); @MainThread boolean executeFetchTaskIfPossible(JobService jobService, JobParameters params); @MainThread void stopFetchingJob(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void fetch() {\n HttpClient client = new HttpClient();\n client.getHostConfiguration().setHost(HOST, PORT, SCHEME);\n\n List<String> prefectures = getCodes(client, PATH_PREF, \"pref\");\n List<String> categories = getCodes(client, PATH_CTG, \"category_s\");\n\n // This ...
[ "0.56937253", "0.5617301", "0.54405445", "0.52283907", "0.5223427", "0.5164311", "0.5145316", "0.5141089", "0.5127982", "0.5109664", "0.5103669", "0.5102167", "0.5013571", "0.5001675", "0.4981413", "0.49558872", "0.49522635", "0.493596", "0.49250975", "0.49227998", "0.4906429...
0.6153537
0
Fetches EPG immediately if current EPG data are outdated, i.e., not successfully updated by routine fetching service due to various reasons.
@MainThread void fetchImmediatelyIfNeeded();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void retryRequired(){\n startFetching(query);\n }", "private boolean isFetchNeeded() {\n return true;\n }", "private void fetchData() {\r\n if (fetchDialogDataInBackground != null && fetchDialogDataInBackground.getStatus() != AsyncTask.Status.FINISHED)\r\n fetchDial...
[ "0.6023463", "0.5970335", "0.5821129", "0.57155854", "0.5535754", "0.5489077", "0.5469073", "0.5423823", "0.54111576", "0.537699", "0.5362291", "0.52900976", "0.52849376", "0.52734697", "0.52733696", "0.52591276", "0.5230334", "0.52141696", "0.5209694", "0.52080435", "0.51894...
0.55463004
4
Notifies EPG fetch service that channel scanning is started.
@MainThread void onChannelScanStarted();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void notifyScanStarted() {\n for (ScanListener l : listeners) l.scanStarted(contextId);\n }", "@MainThread\n void onChannelScanFinished();", "protected void onDiscoveryStarted() {\n logAndShowSnackbar(\"Subscription Started\");\n }", "@Override\n\t\t\tpublic void callStarted(...
[ "0.6404666", "0.6323082", "0.61772436", "0.5877182", "0.5696908", "0.56580794", "0.5512868", "0.5492008", "0.5477619", "0.5454373", "0.5431998", "0.5427001", "0.54038996", "0.54027665", "0.53919154", "0.5389618", "0.52871644", "0.5285341", "0.52558714", "0.52490115", "0.52392...
0.6907777
0
Notifies EPG fetch service that channel scanning is finished.
@MainThread void onChannelScanFinished();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void notifyScanFinished() {\n for (ScanListener l : listeners) l.scanFinished(contextId);\n }", "void discoverFinished();", "@MainThread\n void onChannelScanStarted();", "@Override\n public void onDiscoveryComplete() {\n BusProvider.getInstance().post(new DiscoveryCompleteEve...
[ "0.6656752", "0.6378516", "0.6155611", "0.60236675", "0.5969147", "0.57528365", "0.5692029", "0.5601687", "0.55736744", "0.5560468", "0.55367243", "0.5489791", "0.54508334", "0.5403128", "0.5379649", "0.53671885", "0.5346298", "0.5254292", "0.52370787", "0.52295935", "0.52266...
0.69921935
0
There are 35 key buttons available (KEYS.length), but the language may need a smaller amount (Start.keysArraySize) Starting with k = 1 to skip the header row
public void loadKeyboard() { keysInUse = keyList.size(); partial = keysInUse % (KEYS.length - 2); totalScreens = keysInUse / (KEYS.length - 2); if (partial != 0) { totalScreens++; } int visibleKeys; if (keysInUse > KEYS.length) { visibleKeys = KEYS.length; } else { visibleKeys = keysInUse; } for (int k = 0; k < visibleKeys; k++) { TextView key = findViewById(KEYS[k]); key.setText(keyList.get(k).baseKey); String tileColorStr = COLORS[Integer.parseInt(keyList.get(k).keyColor)]; int tileColor = Color.parseColor(tileColorStr); key.setBackgroundColor(tileColor); } if (keysInUse > KEYS.length) { TextView key34 = findViewById(KEYS[KEYS.length - 2]); key34.setBackgroundResource(R.drawable.zz_backward_green); key34.setRotationY(getResources().getInteger(R.integer.mirror_flip)); key34.setText(""); TextView key35 = findViewById(KEYS[KEYS.length - 1]); key35.setRotationY(getResources().getInteger(R.integer.mirror_flip)); key35.setBackgroundResource(R.drawable.zz_forward_green); key35.setText(""); } for (int k = 0; k < KEYS.length; k++) { TextView key = findViewById(KEYS[k]); if (k < keysInUse) { key.setVisibility(View.VISIBLE); key.setClickable(true); } else { key.setVisibility(View.INVISIBLE); key.setClickable(false); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void generateAllKeys(){\n\t\tboolean isWhite;\n//\t\tint pitchOffset = 21;\n\t\tint pitchOffset = 1;\n\t\tint keyWidth = this.width / this.numKeys;\n\t\t\n\t\tfor(int i = 0; i<88; i++){\n\t\t\tswitch (i%12){\n\t\t\tcase 1:\n\t\t\tcase 3:\n\t\t\tcase 6:\n\t\t\tcase 8:\n\t\t\tcase 10:\tisWhite = false;\n\t\t\...
[ "0.6751668", "0.61231035", "0.6015982", "0.59329563", "0.58759755", "0.58620304", "0.578672", "0.5767238", "0.5730676", "0.57052124", "0.5703807", "0.570023", "0.5642408", "0.56250954", "0.5597209", "0.5587602", "0.555122", "0.55331856", "0.5530777", "0.5527012", "0.55145055"...
0.64522713
1
This routine will only be called from complex keyboards (more keys than will fit on the basic 35key layout)
private void updateKeyboard() { int keysLimit; if(totalScreens == keyboardScreenNo) { keysLimit = partial; for (int k = keysLimit; k < (KEYS.length - 2); k++) { TextView key = findViewById(KEYS[k]); key.setVisibility(View.INVISIBLE); } } else { keysLimit = KEYS.length - 2; } for (int k = 0; k < keysLimit; k++) { TextView key = findViewById(KEYS[k]); int keyIndex = (33 * (keyboardScreenNo - 1)) + k; key.setText(keyList.get(keyIndex).baseKey); // KP key.setVisibility(View.VISIBLE); // Added on May 15th, 2021, so that second and following screens use their own color coding String tileColorStr = COLORS[Integer.parseInt(keyList.get(keyIndex).keyColor)]; int tileColor = Color.parseColor(tileColorStr); key.setBackgroundColor(tileColor); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void keyPressed(KeyEvent e) {\n \n \n }", "@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t\t\t\t\t\t\t\t\t}", "@Override\n\t\t\tpublic void keyP...
[ "0.6892827", "0.68432766", "0.6807426", "0.6807426", "0.6807426", "0.67919916", "0.67600566", "0.67551893", "0.67453295", "0.6733397", "0.6688257", "0.6683269", "0.6683269", "0.6683269", "0.6683269", "0.6683269", "0.6683269", "0.6683269", "0.6680019", "0.6680019", "0.6680019"...
0.6954829
0
Write your code here
public static String findNumber(List<Integer> arr, int k) { return "NO"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void generateCode()\n {\n \n }", "public void logic(){\r\n\r\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "void pramitiTechTutorials() {\n\t\n}", "public void ganar() {\n // TODO implement here\n }", "@Override\r...
[ "0.6385292", "0.62825674", "0.6094859", "0.59705144", "0.59174407", "0.5879631", "0.58751583", "0.58699447", "0.5869017", "0.58553624", "0.5826625", "0.5825323", "0.58233553", "0.577183", "0.576982", "0.5769503", "0.57691693", "0.5748044", "0.57379705", "0.573767", "0.5728572...
0.0
-1
Created by linge on 2018/5/5.
public interface CodeEnum { Integer getCode(); String getMeaning(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void grabar...
[ "0.58331555", "0.570064", "0.5587954", "0.5587954", "0.5580262", "0.5568506", "0.5552307", "0.55520844", "0.5550977", "0.55505157", "0.5493686", "0.54817945", "0.5429696", "0.53971684", "0.5390705", "0.5376013", "0.5375558", "0.5372604", "0.5372299", "0.5359621", "0.5346206",...
0.0
-1
Created by wyyu on 2018/5/8.
public interface OnPositionChangeListener { void onChange(int position); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n pu...
[ "0.60735846", "0.6050517", "0.5739666", "0.5722127", "0.5722127", "0.56991094", "0.5688242", "0.5665442", "0.56584847", "0.56354845", "0.5565524", "0.5561346", "0.5550301", "0.5527021", "0.5518675", "0.55050707", "0.5486104", "0.5476565", "0.5476558", "0.54717284", "0.5465446...
0.0
-1
Consulta tipo SELECT o las de modificar datos
public static Statement usarBD( Connection con ) { try { Statement statement = con.createStatement(); statement.setQueryTimeout(30); // poner timeout 30 msg return statement; } catch (SQLException e) { lastError = e; log( Level.SEVERE, "Error en uso de base de datos", e ); e.printStackTrace(); return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SelectQuery createSelectQuery();", "CTipoPersona selectByPrimaryKey(String idTipoPersona) throws SQLException;", "public void buscarEstudiante(String codEstudiante){\n estudianteModificar=new Estudiante();\n estudianteGradoModificar=new EstudianteGrado();\n StringBuilder query=new StringBu...
[ "0.63857055", "0.6311399", "0.6297534", "0.6267562", "0.625015", "0.62430555", "0.61199725", "0.60856384", "0.6079987", "0.60787725", "0.60585034", "0.605291", "0.60315764", "0.6030673", "0.60292375", "0.59989536", "0.5990452", "0.59300447", "0.59214556", "0.5915605", "0.5869...
0.0
-1
Crea tablas, si ya existen las deja tal cual estan
public static Statement usarCrearTablasBD( Connection con ) { try { Statement statement = con.createStatement(); statement.setQueryTimeout(30); // poner timeout 30 msg statement.executeUpdate("create table if not exists items " + "(id integer, name string, timeperunit real)"); log( Level.INFO, "Creada base de datos", null ); return statement; } catch (SQLException e) { lastError = e; log( Level.SEVERE, "Error en creación de base de datos", e ); e.printStackTrace(); return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void crearTabla() {\n\t\tthis.tabla= new String[palabras.length+1][4];\t\n\t}", "public void createTable() {\n try {\n tableLayout = findViewById(R.id.tabla);\n tb = new TableDinamic(tableLayout, getApplicationContext(), \"cargarDetalle\", clc, cap_1, cap_2, cap_ct, txtidReg, ...
[ "0.74570864", "0.7144324", "0.7058261", "0.7057378", "0.704657", "0.70408195", "0.6999121", "0.6952599", "0.6914007", "0.6744346", "0.6736228", "0.67230225", "0.67155117", "0.6686992", "0.667234", "0.66068304", "0.65318745", "0.6524594", "0.65234005", "0.64946026", "0.6490933...
0.5979931
98
Reinicia las tablas (elimina y crea)
public static Statement reiniciarBD( Connection con ) { try { Statement statement = con.createStatement(); statement.setQueryTimeout(30); // poner timeout 30 msg statement.executeUpdate("drop table if exists items"); log( Level.INFO, "Reiniciada base de datos", null ); return usarCrearTablasBD( con ); } catch (SQLException e) { log( Level.SEVERE, "Error en reinicio de base de datos", e ); lastError = e; e.printStackTrace(); return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void limparTabela() {\n while (tmLivro.getRowCount() > 0) {\n tmLivro.removeRow(0);\n }\n }", "private void limparTabela() { \n while (tmLivro.getRowCount() > 0) { \n tmLivro.removeRow(0);\n }\n }", "public void vaciarTabla() {\n\...
[ "0.787784", "0.7801997", "0.7363303", "0.72739065", "0.72086614", "0.70893663", "0.70777637", "0.7049081", "0.6929445", "0.6820389", "0.6813339", "0.6782135", "0.67786425", "0.6774805", "0.6735839", "0.6721539", "0.6715351", "0.67145747", "0.66825765", "0.66636866", "0.666099...
0.0
-1
Cierra la bas de datos abierta
public static void cerrarBD( Connection con, Statement st ) { try { if (st!=null) st.close(); if (con!=null) con.close(); log( Level.INFO, "Cierre de base de datos", null ); } catch (SQLException e) { lastError = e; log( Level.SEVERE, "Error en cierre de base de datos", e ); e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void limpiarDatos() {\n\t\t\n\t}", "public datosTaller() {\n this.cedulaCliente = new int[100]; //Atributo de la clase\n this.nombreCliente = new String[100]; //Atributo de la clase\n this.compraRealizada = new String[100]; //Atributo de la clase\n this.valorCompra = new fl...
[ "0.7139288", "0.654982", "0.65283537", "0.6499147", "0.64509696", "0.6400114", "0.63752687", "0.6353143", "0.6284738", "0.62844336", "0.6283639", "0.62270516", "0.6192039", "0.6178983", "0.61678714", "0.61491424", "0.61483055", "0.61476076", "0.6107674", "0.6103267", "0.60735...
0.0
-1
Inserta datos en la BD
public static boolean itemInsert( Statement st, String name, int id, float timeperunit ) { String sentSQL = ""; try { // Secu se utiliza para escapar parametros extraños // Comilla simple para strings sentSQL = "insert into items (id, name, timeperunit) values(" + id + ", " + "'" + secu(name) + "', " + timeperunit + ")"; int val = st.executeUpdate( sentSQL ); log( Level.INFO, "BD añadida " + val + " fila\t" + sentSQL, null ); if (val!=1) { // Se tiene que añadir 1 - error si no log( Level.SEVERE, "Error en insert de BD\t" + sentSQL, null ); return false; } return true; } catch (SQLException e) { log( Level.SEVERE, "Error en BD\t" + sentSQL, e ); lastError = e; e.printStackTrace(); return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insertarDatos(String query) throws SQLException{\n Statement st = conexion.createStatement(); // creamos el mismo objeto statement para realizar la insercion a la base de datos\n st.executeUpdate(query); // se ejecuta la consulta en la base de datos\n }", "public void insertar() thro...
[ "0.75188", "0.7418744", "0.7062719", "0.7003312", "0.69794834", "0.6908579", "0.6904742", "0.6903021", "0.6896655", "0.68092954", "0.67884314", "0.6763867", "0.67546904", "0.67509425", "0.67336196", "0.66965", "0.66958964", "0.6684094", "0.6676867", "0.6668375", "0.6668006", ...
0.0
-1
Carga los items que hay en la tabla
public static List<Item> loadItems(Statement st) { List<Item> items = new ArrayList<>(); String sentSQL = ""; try { sentSQL = "select * from items"; ResultSet rs = st.executeQuery(sentSQL); // Iteramos sobre la tabla result set // El metodo next() pasa a la siguiente fila, y devuelve true si hay más filas while (rs.next()) { int id = rs.getInt("id"); String name = rs.getString("name"); float timePerUnit = rs.getFloat("timeperunit"); Item item = new Item(id, name, timePerUnit); items.add(item); log(Level.INFO,"Fila leida: " + item, null); } log(Level.INFO, "BD consultada: " + sentSQL, null); } catch (SQLException e) { log(Level.SEVERE, "Error en BD\t" + sentSQL, e); lastError = e; e.printStackTrace(); } return items; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void loadAllToTable() {\n try {\n ArrayList<ItemDTO> allItems=ip.getAllItems();\n DefaultTableModel dtm=(DefaultTableModel) tblItems.getModel();\n dtm.setRowCount(0);\n \n if(allItems!=null){\n for(ItemDTO item:allItems){\n ...
[ "0.7409845", "0.695955", "0.671654", "0.66379106", "0.6583168", "0.65735465", "0.6480199", "0.645094", "0.6445774", "0.64390695", "0.6435435", "0.64144176", "0.6329757", "0.631583", "0.6303939", "0.62780565", "0.62647086", "0.62322384", "0.62243134", "0.61960185", "0.6190826"...
0.64153916
11
TODO Autogenerated method stub
public static void main(String[] args) { stringhandler obj=new stringhandler(); obj.input(); obj.display(); }
{ "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
create empty symbol table
public SymbolTable() { classScope = new Hashtable<String, Values>(); subScope = new Hashtable<String, Values>(); currScope = classScope; subArgIdx = 0; subVarIdx = 0; classStaticIdx = 0; classFieldIdx = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SymbolTable()\r\n {\r\n // Create the tables stack and add the top level\r\n tables = new ArrayDeque<HashMap<String,T>>();\r\n tables.add( new HashMap<String,T>() );\r\n \r\n // Ditto with the counts\r\n counts = new ArrayDeque<Integer>();\r\n counts.add( ...
[ "0.7534974", "0.7378576", "0.7349397", "0.7125747", "0.711972", "0.7035065", "0.6941032", "0.6908145", "0.6906442", "0.6632646", "0.6598488", "0.6502878", "0.64865816", "0.6446378", "0.6437982", "0.63778937", "0.6359636", "0.6333439", "0.63098526", "0.62637395", "0.61741334",...
0.67375517
9
create identifier with name, type and kind. Gives it a scope
public void Define(String name, String type, String kind) { int i = -1; Values tmp = null; if(kind.equals(STATIC) || kind.equals(FIELD)) { switch(kind) { case STATIC: i = classStaticIdx++; break; case FIELD: i = classFieldIdx++; break; } tmp = classScope.put(name, new Values(type, kind, i)); if(tmp != null) { System.out.println("Multiple declarations of class identifier: " + name); System.exit(1); } } else if(kind.equals(ARG) || kind.equals(VAR)) { switch(kind) { case ARG: i = subArgIdx++; break; case VAR: i = subVarIdx++; break; } tmp = subScope.put(name, new Values(type, kind, i)); if(tmp != null) { System.out.println("Multiple declarations of subroutine identifier: " + name); System.exit(1); } } else throw new IllegalArgumentException("Identifier '" + name + "' has an invalid 'kind': " + kind); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "IdentifierType createIdentifierType();", "IdentifiersType createIdentifiersType();", "private static ExpressionTree createQualIdent(WorkingCopy workingCopy, String typeName) {\n TypeElement typeElement = workingCopy.getElements().getTypeElement(typeName);\n if (typeElement == null) {\n ...
[ "0.73043776", "0.685808", "0.6686718", "0.63949937", "0.6252675", "0.6232631", "0.6209589", "0.6178322", "0.61430347", "0.59493136", "0.5930297", "0.57385355", "0.5736476", "0.5701347", "0.56145495", "0.5597537", "0.5592815", "0.5582504", "0.5568833", "0.5551583", "0.55363834...
0.6114365
9
return number of variables in the given kind
public int VarCount(String kind) { int count = 0; Hashtable<String, Values> tmpScope = null; Enumeration<String> e; if(kind.equals(SymbolTable.VAR) || kind.equals(SymbolTable.ARG)) tmpScope = subScope; else if(kind.equals(SymbolTable.FIELD) || kind.equals(SymbolTable.STATIC)) tmpScope = classScope; else { System.out.println("Expected static, field, argument, or variable kind."); System.exit(1); } e = tmpScope.keys(); while(e.hasMoreElements()) { String key = e.nextElement(); if(tmpScope.get(key) != null && tmpScope.get(key).getKind().equals(kind)) count++; } return count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getVarsCount();", "public abstract int nVars();", "public int get_var_count()\r\n {\r\n\r\n int retVal = get_var_count_0(nativeObj);\r\n\r\n return retVal;\r\n }", "private int num_class_vars(ClassInfo cinfo) {\n\n RootInfo class_root = RootInfo.getClassPpt(cinfo, Runtime.nesting_...
[ "0.7069962", "0.69664973", "0.6689787", "0.64129305", "0.63766515", "0.6196396", "0.61681813", "0.6076217", "0.5841842", "0.5819644", "0.5746088", "0.57112074", "0.5710455", "0.5695296", "0.5687991", "0.5640369", "0.56362665", "0.5630404", "0.56136733", "0.55746233", "0.55704...
0.84611946
0
returns index of identifier
public int IndexOf(String name) { Values tmp = currScope.get(name); if(tmp != null) return tmp.getIndex(); if(currScope != classScope) { tmp = classScope.get(name); if(tmp != null) return tmp.getIndex(); } return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int getIdentifier(){\n\t\tif(index > ids.size() - 1){\n\t\t\tindex = 0;\n\t\t}\n\t\t// Post increment is used here, returns index then increments index\n\t\treturn ids.get(index++);\n\t}", "public int nextIndexOf(String identifier){\n Token token;\n int tempCurrentToken = currentToken...
[ "0.7707111", "0.7444213", "0.7434401", "0.7434401", "0.7434401", "0.7434401", "0.7434401", "0.7434401", "0.7434401", "0.7434401", "0.7434401", "0.7434401", "0.7434401", "0.7434401", "0.7434401", "0.74152493", "0.74152493", "0.74152493", "0.7363603", "0.73217976", "0.7293966",...
0.0
-1
returns the kind of the identifier
public String KindOf(String name) { Values tmp = currScope.get(name); String kind = null; if(tmp != null) return tmp.getKind(); if(currScope != classScope) { tmp = classScope.get(name); if(tmp != null) return tmp.getKind(); } return "NONE"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String kind();", "String kind();", "Kind kind();", "String getIdentifierName(String name, String type);", "public String getIdentifyKind() {\n return identifyKind;\n }", "Kind getKind();", "String type();", "String type();", "String type();", "String type();", "String type();", "Str...
[ "0.79453474", "0.79453474", "0.73199767", "0.72423744", "0.71344125", "0.7077922", "0.7016242", "0.7016242", "0.7016242", "0.7016242", "0.7016242", "0.7016242", "0.7016242", "0.7016242", "0.7016242", "0.7016242", "0.7016242", "0.7016242", "0.7016242", "0.7016242", "0.7016242"...
0.0
-1
returns type of identifier
public String TypeOf(String name) { Values tmp = currScope.get(name); if(tmp != null) return tmp.getType(); if(currScope != classScope) { tmp = classScope.get(name); if(tmp != null) return tmp.getType(); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "IdentifierType createIdentifierType();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type...
[ "0.79441816", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", "0.7863442", ...
0.0
-1
Manipulates the map once available. This callback is triggered when the map is ready to be used. This is where we can add markers or lines, add listeners or move the camera. In this case, we just add a marker near Sydney, Australia. If Google Play services is not installed on the device, the user will be prompted to install it inside the SupportMapFragment. This method will only be triggered once the user has installed Google Play services and returned to the app.
@Override public void onMapReady(GoogleMap googleMap) { mMap = googleMap; ArrayList<String> ArrayDescripcionMarker = new ArrayList<String>(); ArrayList<String> ArrayX = new ArrayList<String>(); ArrayList<String> ArrayY = new ArrayList<String>(); Integer tamanio=0; new DataMainActivitBuscarUbicacionReservas(mapa.this).execute(); System.out.println("aca lista1 ANTESSSS" +getIntent().getStringArrayListExtra("miLista")); System.out.println("aca tamaño ANTESSSS" +getIntent().getIntExtra("tamanio",0)); System.out.println("aca lista2 ANTESSS" +getIntent().getStringArrayListExtra("miLista2")); System.out.println("aca listaCLIENTE ANTESSS" +getIntent().getStringArrayListExtra("milistaCliente")); //cantidad de reservas/markes a dibujar tamanio = getIntent().getIntExtra("tamanio",0); /// Casteo la lista que tiene las latitudes double[] failsArray = new double[tamanio]; //create an array with the size of the failList for (int i = 0; i < tamanio; ++i) { //iterate over the elements of the list failsArray[i] = Double.parseDouble(getIntent().getStringArrayListExtra("miLista").get(i)); //store each element as a double in the array // failsArray[i] = Double.parseDouble(lista.get(i)); //store each element as a double in the array } /// Casteo la lista que tiene las longitudes double[] failsArray2 = new double[tamanio]; //create an array with the size of the failList for (int i = 0; i < tamanio; ++i) { //iterate over the elements of the list failsArray2[i] = Double.parseDouble(getIntent().getStringArrayListExtra("miLista2").get(i)); //store each element as a double in the array // failsArray2[i] = Double.parseDouble(lista2.get(i)); //store each element as a double in the array } ///// Recorro las listas y genero el marker. for (int i = 0; i < tamanio; i++){ LatLng vol_1 = new LatLng(failsArray[i], failsArray2[i]); mMap.addMarker(new MarkerOptions().position(vol_1).title(getIntent().getStringArrayListExtra("milistaCliente").get(i))); // mMap.addMarker(new MarkerOptions().position(vol_1)); mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(vol_1, 12f)); } ///////////// DIUJO ZONAS - POLIGIONOS ///////////////// Polygon polygon1 = mMap.addPolygon(new PolygonOptions() .add(new LatLng(-34.4466867, -58.7446665), new LatLng(-34.4755556, -58.7870237), new LatLng( -34.5313786, -58.7034557), new LatLng(-34.5005326, -58.6488037)) .strokeColor(Color.RED)); polygon1.setTag("ZONA 1"); polygon1.setStrokeWidth(4f); Polygon polygon2 = mMap.addPolygon(new PolygonOptions() .add(new LatLng(-34.4466867, -58.7446665), new LatLng(-34.4810476,-58.6806737), new LatLng( -34.4541926,-58.6249857), new LatLng( -34.3982066,-58.6507117)) .strokeColor(BLUE)); polygon2.setTag("ZONA 2"); polygon2.setStrokeWidth(4f); Polygon polygon3 = mMap.addPolygon(new PolygonOptions() .add(new LatLng(-34.4810476,-58.6806737), new LatLng(-34.5005326, -58.6488037), new LatLng( -34.4786136,-58.6067997), new LatLng( -34.4547056,-58.6234267)) .strokeColor(Color.GREEN)); polygon3.setTag("ZONA 3"); polygon3.setStrokeWidth(4f); ///////////// FIN DIUJO ZONAS - POLIGIONOS ///////////////// /* //DIBUJO ZONAS DE CIRCULOS Circle circle = mMap.addCircle(new CircleOptions() .center(new LatLng(-34.455587, -58.685503)) .radius(1800) .strokeColor(Color.RED)); circle.setStrokeWidth(4f); circle.setTag("Zona1"); Circle circle2 = mMap.addCircle(new CircleOptions() .center(new LatLng(-34.480523, -58.717237)) .radius(1600) .strokeColor(Color.BLUE)); circle2.setStrokeWidth(4f); circle2.setTag("Zona2"); Circle circle3 = mMap.addCircle(new CircleOptions() .center(new LatLng(-34.450193, -58.725039)) .radius(1800) .strokeColor(Color.GREEN)); circle2.setStrokeWidth(4f); circle2.setTag("Zona2"); Circle circle4 = mMap.addCircle(new CircleOptions() .center(new LatLng(-34.469302, -58.653062)) .radius(1500) .strokeColor(Color.YELLOW)); circle2.setStrokeWidth(4f); circle2.setTag("Zona2"); //funcion que revisa si un punto esta dentro del circulo zona 1 float[] disResultado = new float[2]; // LatLng pos = new LatLng(40.416775, -3.703790); LatLng pos = new LatLng(-34.470327, -58.683718); double lat = pos.latitude; //getLatitude double lng = pos.longitude;//getLongitude Location.distanceBetween( pos.latitude, pos.longitude, circle.getCenter().latitude, circle.getCenter().longitude, disResultado); if(disResultado[0] > circle.getRadius()){ System.out.println("FUERAAAA ZONA 1" ); } else { System.out.println("DENTROOO ZONA 1" ); } */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onMapReady(GoogleMap googleMap) {\n Geocoder geoCoder = new Geocoder(getActivity(), Locale.getDefault());\n double lat, lng;\n try {\n List<Address> addresses = geoCoder.getFromLocationName(\"Western Sydney Paramatta, NSW\", 5);\n ...
[ "0.8188441", "0.80424875", "0.80367196", "0.80337155", "0.7998222", "0.7976972", "0.7957382", "0.7957201", "0.79550856", "0.7943012", "0.79364103", "0.7929936", "0.7914818", "0.7904191", "0.78881335", "0.78846306", "0.78846306", "0.78846306", "0.78846306", "0.78778464", "0.78...
0.0
-1
getItem 1 because we have add 1 header
private String getItem(int position) { return data[position - 1]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object getFirst() {\r\n if (size == 0)\r\n throw new NoSuchElementException();\r\n\r\n return header.next.element;\r\n }", "public TempTableHeader getHeader1() { return header1; }", "public String getHeader1() {\n return header1;\n }", "public String getHeader...
[ "0.6489713", "0.644132", "0.6312941", "0.6210191", "0.6125765", "0.6097907", "0.60889804", "0.6035356", "0.60130143", "0.6012538", "0.5985251", "0.59663284", "0.59625447", "0.5949381", "0.59273124", "0.5863609", "0.5849228", "0.5802239", "0.5797639", "0.5785042", "0.5778471",...
0.0
-1
Release Camera and cleanup.
public void destroy(){ Log.d(TAG, "onDestroy called"); runRunnable = false; if (mCamera != null) { mCamera.stopPreview(); mCamera.release(); mCamera = null; } isPaused = true; // TODO stop executorService //executor.shutdown(); cameraThread.stop(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void releaseCamera() {\n if (mCamera != null) {\n mCamera.release(); // release the camera for other applications\n mCamera = null;\n }\n }", "private static void releaseCameraAndPreview() {\n if (cam != null) {\n cam.release();\n cam = ...
[ "0.8783288", "0.86759454", "0.85606974", "0.8538715", "0.85302943", "0.8492623", "0.84389055", "0.84389055", "0.8203248", "0.79976445", "0.75981474", "0.74966437", "0.73964405", "0.7384331", "0.7383074", "0.7332601", "0.73028404", "0.7228383", "0.7226533", "0.71962565", "0.70...
0.71211326
20
Take a picture with the camera, this also handles the Mat objects
private Tuple<PatternCoordinates, Mat> pair(){ mCamera.takePicture(null, null, jpegCallBack); Tuple<PatternCoordinates, Mat> patternAndImagePair = null; switch(GlobalResources.getInstance().getImageSettings().getBackgroundMode()){ case ImageSettings.BACKGROUND_MODE_RGB: patternAndImagePair = patternDetectorAlgorithm.find(rgba, binary, false); break; case ImageSettings.BACKGROUND_MODE_GRAYSCALE: patternAndImagePair = patternDetectorAlgorithm.find(grey, binary, true); break; case ImageSettings.BACKGROUND_MODE_BINARY: patternAndImagePair = patternDetectorAlgorithm.find(binary, binary, true); } GlobalResources.getInstance().updateImage(patternAndImagePair.element2); return patternAndImagePair; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void captureImage() {\n camera.takePicture(null, null, jpegCallback);\r\n }", "private void takePicture() {\n\n captureStillPicture();\n }", "private void takePicture() {\n\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n startActivityForResult(intent, ...
[ "0.7077448", "0.7054869", "0.70147943", "0.69895625", "0.6973897", "0.6963288", "0.6926101", "0.6793528", "0.66477394", "0.66328657", "0.6604378", "0.6596675", "0.6566915", "0.6562919", "0.65462404", "0.6544912", "0.6517298", "0.6503199", "0.64922714", "0.6477829", "0.6474885...
0.0
-1
TODO Autogenerated method stub
@Override public void updateByExample(Permissions obj, PermissionsDbObjExample ex) throws RuntimeException { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public Long countByExample(Permissions obj, PermissionsDbObjExample ex) throws RuntimeException { return null; }
{ "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
The index is useless in this model, so just ignore it.
public void insertNodeInto(MutableTreeNode child, MutableTreeNode par, int i) { insertNodeInto(child, par); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setNoIndex() {\n noIndex= true;\n }", "public boolean indexAllowed() {\r\n return true;\r\n }", "@Override\n\tpublic void unIndexObject(ModelKey obj) throws ASException {\n\t\t\n\t}", "public boolean getNoIndex() {\n return noIndex;\n }", "public H_index() {\n\t\tsuper();\n\...
[ "0.74701595", "0.6996879", "0.6554505", "0.65435654", "0.6314716", "0.6222652", "0.6092796", "0.6047805", "0.6006728", "0.5949259", "0.59446424", "0.5944192", "0.5944192", "0.5944192", "0.5944192", "0.59424525", "0.5922754", "0.5918477", "0.5917287", "0.5848612", "0.58416766"...
0.0
-1