query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
TODO Autogenerated method stub
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.new_activity_main); mDrawerView=(LinearLayout)findViewById(R.id.linearLayout); profilePic=(ImageView)findViewById(R.id.myBloodGroup); name=(TextView)findViewById(R.id.donorMenuName); ...
{ "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.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
display view for selected nav drawer item
@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { displayView(position); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void selectDrawerItem(MenuItem menuItem) {\n Fragment fragment = null;\n Class fragmentClass;\n switch(menuItem.getItemId()) {\n case R.id.nav_home:\n fragmentClass = MainFragment.class;\n startFragment(fragmentClass);\n break;\n ...
[ "0.7112345", "0.70579094", "0.6929277", "0.6897872", "0.68665236", "0.68139255", "0.67870075", "0.6764774", "0.6755591", "0.6740172", "0.67366695", "0.6727487", "0.67166823", "0.67042184", "0.6685011", "0.6669062", "0.6669062", "0.6633194", "0.66313225", "0.66257566", "0.6620...
0.0
-1
toggle nav drawer on selecting action bar app icon/title
@Override public boolean onOptionsItemSelected(MenuItem item) { if (mDrawerToggle.onOptionsItemSelected(item)) { return true; } // Handle action bar actions click switch (item.getItemId()) { case R.id.action_settings: return true; default: return super.onOptionsItemSelected(item); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\nint home=item.getItemId();\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_settings) {\r\n return true;\r\n }\r\nif(home==R.id.home){\r\n drawerlayou...
[ "0.71149343", "0.6932773", "0.68455756", "0.6820197", "0.6793385", "0.6775112", "0.6767155", "0.6742277", "0.67149836", "0.66992515", "0.669826", "0.66963315", "0.6685156", "0.6683178", "0.66573554", "0.66502845", "0.66501546", "0.66462004", "0.66326565", "0.6604643", "0.6598...
0.0
-1
/ Called when invalidateOptionsMenu() is triggered
@Override public boolean onPrepareOptionsMenu(Menu menu) { // if nav drawer is opened, hide the action items boolean drawerOpen = mDrawerLayout.isDrawerOpen(mDrawerView); menu.findItem(R.id.action_settings).setVisible(!drawerOpen); return super.onPrepareOptionsMenu(menu); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onDrawerOpened(View drawerView) {\n\t\t\t\t\t invalidateOptionsMenu(); \n\t\t\t\t\t }", "@Override\r\n public void onPageSelected(int position) {\n invalidateOptionsMenu();\r\n }", "public void onSearchStarted() {\n mActivity.invalid...
[ "0.73958796", "0.7307511", "0.72879606", "0.7284202", "0.72531104", "0.7167428", "0.7144019", "0.713819", "0.71283853", "0.7013687", "0.700654", "0.69704795", "0.69638264", "0.69468755", "0.6913638", "0.6904814", "0.6868166", "0.68448764", "0.6842651", "0.6842651", "0.6834920...
0.0
-1
update the main content by replacing fragments
private void displayView(int position) { Fragment fragment = null; Bundle bundle=new Bundle(); switch (position) { case 0: fragment = new Profile(); break; case 1: fragment = new SearchProjects(); break; case 2: fragment = new MyProjects(); break; case 3: break; default: break; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void refresh(){\n // close loading dialogs if they are open\n Fragment dialog = getSupportFragmentManager().findFragmentByTag(\"loading\");\n if (dialog != null) {\n loadingDialog.dismiss();\n }\n\n // update timestamp\n if (timestamp != null) {\n ...
[ "0.7009121", "0.6948678", "0.6730658", "0.6675358", "0.66165197", "0.6611591", "0.66032475", "0.6463688", "0.6438722", "0.6436336", "0.64263254", "0.6314441", "0.62816167", "0.62546426", "0.6245493", "0.62142855", "0.6180705", "0.6153804", "0.61326784", "0.6046095", "0.604064...
0.0
-1
When using the ActionBarDrawerToggle, you must call it during onPostCreate() and onConfigurationChanged()...
@Override protected void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); // Sync the toggle state after onRestoreInstanceState has occurred. mDrawerToggle.syncState(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void onPostCreate(Bundle savedInstanceState) {\n super.onPostCreate(savedInstanceState);\n mDrawerToggle.syncState();\n }", "@Override\n protected void onPostCreate(Bundle savedInstanceState) {\n super.onPostCreate(savedInstanceState);\n mDrawerToggle.sy...
[ "0.81234926", "0.81234926", "0.8065619", "0.79623634", "0.7793273", "0.7783374", "0.7768122", "0.77499306", "0.7662742", "0.75863886", "0.75645584", "0.75645584", "0.75645584", "0.75645584", "0.75645584", "0.75645584", "0.7537642", "0.7497469", "0.74885434", "0.7462033", "0.7...
0.7286193
28
Creates a new VmAllocationPolicySimple object.
public VMAllocationPolicyRandom(List<? extends Host> list) { super(list); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PowerVmAllocationPolicySimple(List<? extends PowerHost> list) {\n\t\tsuper(list);\n\t}", "public NatPolicy createNatPolicy();", "AllocationPolicy getAllocationPolicy(ReservationDAO reservations);", "public GAAlloc(VMCwMProblem instance) {\n super(instance, \"NSGAII\", VMCwMProblem.Encoding.INTE...
[ "0.61805546", "0.54398924", "0.49847862", "0.49194393", "0.48322845", "0.48273936", "0.48024118", "0.47472292", "0.47403926", "0.47342238", "0.47316644", "0.46905032", "0.46865", "0.45862162", "0.45358846", "0.4516558", "0.4513661", "0.45065054", "0.4499942", "0.4499942", "0....
0.0
-1
System.out.println("Heading: "+heading); System.out.println("Value of each row: "+rowvalues);
public void getDataType(String heading, String rowvalues) { String rowval[]=rowvalues.split(","); HashMap<String,String> hmap= new HashMap<String,String>(); //logic for datatype for(String val:rowval) { try { //checking for integer Integer.parseInt(val); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void PrintResult() {\n try {\n res.beforeFirst();\n int columnsNumber = res.getMetaData().getColumnCount();\n while (res.next()) {\n for (int i = 1; i <= columnsNumber; i++) {\n if (i > 1) System.out.print(\", \");\n ...
[ "0.6950462", "0.6666129", "0.6491755", "0.6406187", "0.6375102", "0.6304926", "0.626485", "0.626223", "0.6099751", "0.6084485", "0.6076777", "0.60582817", "0.6052625", "0.6014599", "0.6003203", "0.59865075", "0.5952564", "0.5933239", "0.5927785", "0.59163207", "0.59021735", ...
0.0
-1
Create an entity for this test. This is a static method, as tests for other entities might also need it, if they test an entity which requires the current entity.
public static Skill createEntity(EntityManager em) { Skill skill = new Skill().name(DEFAULT_NAME).agentSharing(DEFAULT_AGENT_SHARING); return skill; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Entity createEntity();", "T createEntity();", "protected abstract ENTITY createEntity();", "void create(E entity);", "void create(T entity);", "E create(E entity);", "E create(E entity);", "TestEntity buildEntity () {\n TestEntity testEntity = new TestEntity();\n testEntity.setName(\"Te...
[ "0.77223766", "0.75040364", "0.7487764", "0.7361146", "0.7314088", "0.7155444", "0.7155444", "0.71508443", "0.71501833", "0.7076941", "0.7016207", "0.68038535", "0.6752083", "0.6740013", "0.6740013", "0.67108333", "0.6680824", "0.6665985", "0.663898", "0.6624753", "0.66239864...
0.0
-1
Create an updated entity for this test. This is a static method, as tests for other entities might also need it, if they test an entity which requires the current entity.
public static Skill createUpdatedEntity(EntityManager em) { Skill skill = new Skill().name(UPDATED_NAME).agentSharing(UPDATED_AGENT_SHARING); return skill; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Student createUpdatedEntity(EntityManager em) {\n Student student = new Student()\n .firstName(UPDATED_FIRST_NAME)\n .middleName(UPDATED_MIDDLE_NAME)\n .lastName(UPDATED_LAST_NAME)\n .studentRegNumber(UPDATED_STUDENT_REG_NUMBER)\n .dateOfB...
[ "0.6945028", "0.67900705", "0.67889315", "0.67169404", "0.66941833", "0.66931623", "0.66679513", "0.66362596", "0.6619976", "0.65133643", "0.65087175", "0.6446217", "0.6421794", "0.64206475", "0.6419418", "0.641517", "0.6413087", "0.64091843", "0.6402996", "0.639374", "0.6392...
0.0
-1
Create the Skill with an existing ID
@Test @Transactional void createSkillWithExistingId() throws Exception { skill.setId(1L); SkillDTO skillDTO = skillMapper.toDto(skill); int databaseSizeBeforeCreate = skillRepository.findAll().size(); // An entity with an existing ID cannot be created, so this API call must fai...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void AddSkill(int aSkill_ID)\n\t{\n\t\tSkill aSkill= new Skill(aSkill_ID);\n\t\taSkill.user_Id=this.id;\n\t\tmySkills.add(aSkill);\n\t}", "public void AddNewSkill()\n\t{\n\t\t\n\t}", "Skill saveSkill(Skill skill);", "public com.transerainc.aha.gen.agent.SkillDocument.Skill addNewSkill()\n {\n ...
[ "0.704702", "0.7037742", "0.68250144", "0.66034335", "0.6589577", "0.63959056", "0.634495", "0.62619364", "0.62216973", "0.61631626", "0.60877234", "0.6072855", "0.6064057", "0.6054182", "0.59205246", "0.5856195", "0.58261967", "0.5814231", "0.57758427", "0.57468677", "0.5746...
0.6684883
3
sum of all individual fitnesses
public void findTotalFit() { for (int i=0;i<popSize;i++) { totalFitness+=this.getFitness(i); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static double sumOfSquares(LeastSquaresFit fit, double[] x,\n\t\t\t\t double[] y)\n {\n\tAdder.Kahan adder = new Adder.Kahan();\n\tAdder.Kahan.State state = adder.getState();\n\tint m = x.length;\n\tfor (int i = 0; i < m; i++) {\n\t double term = y[i] - fit.valueAt(x[i]);\n\t term *= term;\n\t...
[ "0.67908466", "0.66457653", "0.6629603", "0.6496637", "0.6252867", "0.6252867", "0.6189326", "0.61354613", "0.6056825", "0.6046027", "0.60397667", "0.6024955", "0.59893525", "0.588029", "0.58715785", "0.587123", "0.58466023", "0.5839535", "0.57666755", "0.57385623", "0.573474...
0.71350837
0
static methods save data in a csv file only saves gen and bna strings
public void writeToCsv(String fileName) throws Exception { FileWriter writer=new FileWriter(fileName); writer.append(Integer.toString(this.gen)); writer.append('\n'); for(int i=0;i<popSize;i++) { writer.append(getBna(i)); writer.append('\n'); } writer.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void save(List<String[]> data, Integer numFichier, String nomFichier) throws IOException {\n FileWriter fileWriter = null;\n CSVWriter cSVWriter2 = null;\n //-------------------------------------------------------------\n // Construction du nom de fichier\n /...
[ "0.7181262", "0.7050137", "0.69961375", "0.6818228", "0.6776605", "0.67747635", "0.6604401", "0.6568123", "0.6558987", "0.65571797", "0.64800805", "0.6446476", "0.64277107", "0.64005977", "0.63605964", "0.6310907", "0.6309018", "0.6305874", "0.62842655", "0.6259172", "0.62451...
0.56971025
71
loads data from a csv file should be called from constructor only
public void loadFromCsv(String filePath) throws Exception { BufferedReader br=new BufferedReader(new FileReader(filePath)); String line=""; int i=0; line=br.readLine(); this.gen=Integer.parseInt(line); while((line=br.readLine()) != null) { this.setBna(i,line); i++; } br.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void openPlayerDataFromCSV() throws FileNotFoundException {\n csvReader = new BufferedReader(new FileReader(PATH_TO_CSV));\n }", "public LoadCSV(String file_position){\r\n this.file_position = file_position;\r\n }", "@Override\n public void importCSV(File file) {\n System.o...
[ "0.75656193", "0.73600054", "0.7358029", "0.7214138", "0.72002316", "0.69744414", "0.6970772", "0.69518507", "0.69271344", "0.6889002", "0.6872591", "0.6841827", "0.68295765", "0.68084216", "0.6805594", "0.68037176", "0.67529887", "0.67489254", "0.67480445", "0.67173105", "0....
0.73251027
3
checks whether a node should be registered in this module
abstract protected boolean shouldRegister(NodeDescriptor node) throws NodeException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasHasNodeID();", "boolean hasNode();", "boolean hasNode();", "boolean hasHasNodeSettings();", "boolean hasNodeId();", "@java.lang.Override\n public boolean hasNode() {\n return node_ != null;\n }", "@java.lang.Override\n public boolean hasNode() {\n r...
[ "0.7150315", "0.7088101", "0.7088101", "0.69257534", "0.6880956", "0.6832998", "0.6832998", "0.679004", "0.6457533", "0.6445277", "0.6444557", "0.6444557", "0.6362658", "0.624399", "0.6230782", "0.6218303", "0.6207814", "0.6168666", "0.61473656", "0.61473656", "0.611968", "...
0.799644
0
Create a module node from a NodeDescriptor. Nodes that should be registered are registered using the ModuleNodeDescriptor returned by this method
abstract protected T createModuleNode(NodeDescriptor node);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected T registerNode(NodeDescriptor node) {\n\t\tT moduleNode = createModuleNode(node);\n \tsynchronized (nodes) {\n \t\tnodes.add(moduleNode);\n \t\tnodesMap.put(node, moduleNode);\n \t}\n\t\treturn moduleNode;\n\t}", "Module createModule();", "private static Module createEditedModule(Module m...
[ "0.61416924", "0.5991921", "0.5914338", "0.57971007", "0.5593313", "0.55147016", "0.5492092", "0.5374335", "0.52044755", "0.5197978", "0.51661766", "0.51606447", "0.51451963", "0.508031", "0.50751716", "0.5071665", "0.5045083", "0.50324124", "0.4999279", "0.4974123", "0.49655...
0.80209297
0
whenever the cluster notifies a node, and the node belongs to this module, the module will call notifyModuleNode
abstract protected void notifyModuleNode(T node);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void notify(Node node);", "private void notifyReplicaNodes(Identifier pid, boolean notifyAuthNode) {\n\n logger.info(buildStandardLogMessage(null, \" Entering notifyReplicaNodes...\"));\n SystemMetadata cnSystemMetadata = hzSystemMetaMap.get(pid);\n if (cnSystemMetadata != null) {\n ...
[ "0.7192632", "0.64979476", "0.64353746", "0.6124208", "0.60908324", "0.5912609", "0.56676173", "0.56607974", "0.56599694", "0.5598001", "0.55363196", "0.5534199", "0.5527813", "0.552418", "0.5506839", "0.55032617", "0.54942656", "0.5491038", "0.5485", "0.5465797", "0.54605925...
0.85372984
0
registers a node, creating a module node for this node
protected T registerNode(NodeDescriptor node) { T moduleNode = createModuleNode(node); synchronized (nodes) { nodes.add(moduleNode); nodesMap.put(node, moduleNode); } return moduleNode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected T createModuleNode(NodeDescriptor node);", "public boolean registerNode(Node node, OutputStream out, boolean isRequestedRegistration) throws IOException;", "RegistrationModule createRegistrationModule();", "public boolean registerNode(Node node, String remoteHost, String remoteAddress, Out...
[ "0.74404836", "0.66176593", "0.6616358", "0.6523498", "0.64989066", "0.63919574", "0.6339021", "0.62284577", "0.61027473", "0.5969868", "0.5952841", "0.59224224", "0.58458656", "0.5794461", "0.57608", "0.5758625", "0.57301116", "0.56823486", "0.56602603", "0.56600475", "0.560...
0.8009086
0
Contains static methods to parse commands. Created by sautin1 on 9/30/14.
public interface CommandParser { String[] splitStringIntoCommands(String string); String[] splitCommandIntoParams(String string); String convertArrayToString(String... stringArray); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Command parse() throws ParseException {\n next();\n expect(Token.COMMAND);\n cmd = new Command(text);\n next();\n while (!((token == Token.WHERE) || (token == Token.RETURN) || (token == Token.EOL))) {\n param();\n }\n if (token == Token.WHERE) {\n...
[ "0.7599479", "0.7187931", "0.71804005", "0.7151624", "0.7144193", "0.7099446", "0.7076864", "0.7068011", "0.7066901", "0.70453775", "0.6994661", "0.69839543", "0.69749224", "0.69685036", "0.694631", "0.6925581", "0.6861957", "0.68366784", "0.67873526", "0.6752906", "0.6743418...
0.7000016
10
create a new ImageView for each item referenced by the Adapter
public View getView(int position, View convertView, ViewGroup parent) { ImageView imageView; if (convertView == null) { // if it's not recycled, initialize some attributes imageView = new ImageView(mContext); imageView.setLayoutParams(new GridView.LayoutParams(180, 180)); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\t\tImageView imageView = new ImageView(ImgShowActivity.this);\n\t\t\t\timageView.setImageBitmap(bitmaps[position]);\n\t\t\t\treturn imageView;\n\t\t\t}", "@Override\n public Object instantiateItem(ViewGroup view...
[ "0.71452034", "0.71411014", "0.71197724", "0.7074658", "0.7059322", "0.7038054", "0.69652206", "0.6958741", "0.6956034", "0.68671596", "0.6846921", "0.68428725", "0.6786976", "0.67771167", "0.67336726", "0.6728429", "0.6726654", "0.6712992", "0.66787225", "0.66743267", "0.666...
0.65265626
36
TODO Autogenerated method stub
@Override public int getCount() { if(data.size()>0){ return data.size(); } return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
TODO Autogenerated method stub
@Override public Object getItem(int position) { return data.get(position); }
{ "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 getItemId(int position) { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
State pattern realization for scale mode. Scale mode defines method of trace scaling inside each Slot
public interface IScaleModeState { /** * Should be called before other methods using * * @param graphs * List<PlotData> for current Slot * @param allViews * List<Slot> All views for graph panel * @param timeRange * TimeInterval set in graph panel * @param meanState ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void\nupdateStatelistScale(int updateScaleType) {\n\n\tfor (int istate=0; istate<=systemDesign_.numstatelist; istate++) {\n\n\t\tswitch (updateScaleType) {\n\n\t\t\tcase UPDATE_STATELIST_SCALE_PFAIL:\n\t\t\t\tsystemDesign_.statelist[istate].pfailurescale = systemDesign_.pfailurescale;\n\t\t\t\tbreak;\n\n\t\...
[ "0.6369467", "0.6131041", "0.59449923", "0.5924567", "0.58940774", "0.5885475", "0.5857292", "0.58456385", "0.5824094", "0.58209693", "0.5800628", "0.5792206", "0.5788432", "0.5780344", "0.5763428", "0.575489", "0.5752257", "0.5738142", "0.5728918", "0.572493", "0.57173026", ...
0.73991716
0
Should be called before other methods using
public void init(List<PlotData> graphs, int currentGraphNum, List<Slot> allViews, TimeInterval timeRange, IMeanState meanState, int height);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void preRun() {\n super.preRun();\n }", "protected void onFirstUse() {}", "@Override\n public void beforeFirstLogic() {\n }", "protected abstract void before();", "@Override\n @Before\n public void before() throws Exception {\n\n super.before();\n }", "@Be...
[ "0.7364154", "0.73615545", "0.7177791", "0.70843846", "0.6992482", "0.6953121", "0.6862449", "0.6853891", "0.6803089", "0.67909974", "0.6756204", "0.6754708", "0.6751305", "0.670926", "0.670926", "0.670926", "0.670926", "0.670926", "0.670926", "0.6689571", "0.6689571", "0.6...
0.0
-1
Declare and define an array
public static void main(String[] args) { String [] cities = {"New York", "San Francisco", "Miami", "Malmö" }; System.out.println(cities[0]); System.out.println(cities[1]); System.out.println(cities[2]); System.out.println(cities[3]); //Declare array String[] countries; // D...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Array createArray();", "private void declareArray() {\n\t\twriter.println();\n\t\twriter.println(\"; array of 52 for variables:\");\n\t\twriter.print(variables + \" dw\");\n\t\tfor (int i = 0; i < 51; i++) {\n\t\t\twriter.print(\" 0,\");\n\t\t}\n\t\twriter.println(\" 0\");\n\t}", "public static void arrayDemo(...
[ "0.7442229", "0.72583216", "0.69292235", "0.6920459", "0.6649295", "0.66144246", "0.65603983", "0.65252304", "0.64830387", "0.64812905", "0.6434596", "0.6427511", "0.64183164", "0.62094", "0.6204506", "0.61905587", "0.61892927", "0.61814505", "0.61794627", "0.61674017", "0.61...
0.0
-1
walks over the collection and returns true as soon as one element f(el) yields true
public<T> boolean containsAny(final Collection<T> collection, final Filter<T> filter ){ for(T t:query.getOrEmpty(collection)){ if(filter.applicable(t)){ return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean test(E element);", "public boolean forEach(I2ForEach<T> func)\n\t{\n\t\tfor (T e : this)\n\t\t{\n\t\t\tif (!func.ForEach(e))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "boolean hasNextElement();", "public boolean hasNextElement();", "@Override\n public boolea...
[ "0.6526855", "0.6521194", "0.6462387", "0.6348891", "0.6262858", "0.62214154", "0.6204558", "0.61589825", "0.6124434", "0.60936713", "0.60754395", "0.6065864", "0.6053157", "0.59866786", "0.59834117", "0.59804314", "0.5964179", "0.5947316", "0.59401", "0.5933288", "0.59248537...
0.0
-1
walks over the collection and returns false as soon as one element f(el) yields false
public<T> boolean containsOnly(final Collection<T> collection, final Filter<T> filter ){ for(T t:query.getOrEmpty(collection)){ if(!filter.applicable(t)){ return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean test(E element);", "boolean hasNextElement();", "public boolean forEach(I2ForEach<T> func)\n\t{\n\t\tfor (T e : this)\n\t\t{\n\t\t\tif (!func.ForEach(e))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean hasNext() {\n return nextElem...
[ "0.66523063", "0.64263594", "0.6358613", "0.6298121", "0.6264511", "0.61871165", "0.61639893", "0.61605036", "0.60718364", "0.6031444", "0.6003466", "0.6001168", "0.5980916", "0.5980413", "0.59759855", "0.595482", "0.59438866", "0.5931857", "0.5917368", "0.5913871", "0.590240...
0.0
-1
walks over the collection and adds the elements to the list until one filter(el) returns false;
public<T> List<T> takeWhile(final Collection<T> collection, final Filter<T> filter ){ List<T> result = create.createLinkedList(); for(T t:query.getOrEmpty(collection)){ if(!filter.applicable(t)){ return result; } result.add(t); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Element> filter(Predicate<Element> p)\n\t{\n\t\treturn recursive_filter(new ArrayList<Element>(), p, group);\n\t}", "<E extends CtElement> List<E> getElements(Filter<E> filter);", "@Override\r\n public List<Element> findElements()\r\n {\n return null;\r\n }", "Collection<V> getAll...
[ "0.5719073", "0.56238645", "0.5385297", "0.534123", "0.5306552", "0.52914417", "0.51879007", "0.51724017", "0.5125909", "0.51240337", "0.5119416", "0.5100183", "0.5056567", "0.50338125", "0.50288796", "0.5014123", "0.50061035", "0.500335", "0.5002815", "0.5002155", "0.497763"...
0.6147002
0
turns a collection(T) into collection(U)
public<T,U> List<U> map(final Collection<T> collection, final Operation<T,U> operation ){ List<U> result = create.createLinkedList(); for(T t:query.getOrEmpty(collection)){ result.add(operation.apply(t)); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Nullable\n @SuppressWarnings(\"unchecked\")\n protected Collection createCollection(MappingContext context, Object value) {\n if (value instanceof Iterable<?>) {\n TypeInformation entryType = context.getGenericTypeInfoOrFail(0);\n Collection result = createCollectionMatchingType...
[ "0.6483135", "0.6454874", "0.633476", "0.62919515", "0.6269374", "0.61964023", "0.6167256", "0.6114386", "0.60543376", "0.6038125", "0.6023326", "0.60185796", "0.59965616", "0.5992209", "0.59661305", "0.59593534", "0.59463465", "0.5941982", "0.5897948", "0.58716387", "0.57524...
0.5360873
57
fold/reduce the collection into value U walk over the elements and then take initial/current U and apply current = operation(el, U)
public <T,U> U foldLeft(final Collection<T> collection, final FoldOperation<T,U> operation, final U initial){ U current = initial; for(T el: query.getOrEmpty(collection)){ current = operation.apply(el, current); } return current; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public <T,U> U foldRight(final Collection<T> collection, final FoldOperation<T,U> operation, final U initial){\n\t\tList<T> temp = new ArrayList<T>(query.getOrEmpty(collection));\n\t\tCollections.reverse(temp);\n\t\treturn foldLeft(temp, operation, initial);\n\t}", "public<T,U> List<U> map(final Collection<T> co...
[ "0.63304627", "0.5413871", "0.53411824", "0.51426554", "0.5141429", "0.51230216", "0.5117413", "0.5116319", "0.5052188", "0.503958", "0.5028471", "0.50215924", "0.50010145", "0.49862963", "0.49659076", "0.49624345", "0.49496174", "0.48588243", "0.48445466", "0.48224497", "0.4...
0.7042949
0
fold/reduce the collection into value U walk over the elements and then take initial/current U and apply current = operation(el, U)
public <T,U> U foldRight(final Collection<T> collection, final FoldOperation<T,U> operation, final U initial){ List<T> temp = new ArrayList<T>(query.getOrEmpty(collection)); Collections.reverse(temp); return foldLeft(temp, operation, initial); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public <T,U> U foldLeft(final Collection<T> collection, final FoldOperation<T,U> operation, final U initial){\n\t\tU current = initial;\n\t\tfor(T el: query.getOrEmpty(collection)){\n\t\t\tcurrent = operation.apply(el, current);\n\t\t}\n\t\treturn current;\n\t}", "public<T,U> List<U> map(final Collection<T> coll...
[ "0.7042949", "0.5413871", "0.53411824", "0.51426554", "0.5141429", "0.51230216", "0.5117413", "0.5116319", "0.5052188", "0.503958", "0.5028471", "0.50215924", "0.50010145", "0.49862963", "0.49659076", "0.49624345", "0.49496174", "0.48588243", "0.48445466", "0.48224497", "0.47...
0.63304627
1
String path = "C:\\\\work\\\\Data\\\\";
public static void main(String[] args) { int loop = 20; loop = loop - 4; // remove initial Point double dt = 0.25; double K = 0.3; KuramotoNetWork_Manage nm = new KuramotoNetWork_Manage(loop, size, dt, K); for(int i = 0; i < loop; i++) { nm.addNewNode(); } // WriteWire ww = new WriteWire();...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static String localPath(String name) {\n\t\tchar c = File.separatorChar;\n\t\treturn name.replace((char) (c ^ '/' ^ '\\\\'), c);\n\t}", "private String getEclipsePathFromWindowsPath(String path) {\n StringBuilder sbPath = new StringBuilder();\n char [] chars = path.toCharArray();\n for (int i = 0; i < c...
[ "0.6629474", "0.6554542", "0.6337752", "0.59358436", "0.5809077", "0.57989424", "0.57965845", "0.5734364", "0.56846595", "0.56716263", "0.5605511", "0.5518588", "0.5518588", "0.5513919", "0.5510107", "0.55034274", "0.5481944", "0.54777175", "0.5470794", "0.54691195", "0.54307...
0.0
-1
/ Always read the file and sort the values for good measure
public HighScore(){ readFile(); sortHighscores(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void sortFile(String fileName, PrintStream pOstream, boolean pReverse, int pCol, boolean pIncludesHeader) throws IOException {\n ArrayList lineLengthsList = new ArrayList(); \n ArrayList ordering = new ArrayList();\n BufferedReader reader = new BufferedReader(new FileReader(fi...
[ "0.67161965", "0.65382373", "0.626227", "0.62506396", "0.6187152", "0.6148476", "0.6121453", "0.609715", "0.6063729", "0.59647095", "0.589351", "0.5870288", "0.5867338", "0.58461124", "0.58427775", "0.5805457", "0.57936996", "0.5785942", "0.577847", "0.5755041", "0.5752329", ...
0.0
-1
/ The highscores.txt file is read line by line it will try to convert the line to an integer and add it to an ArrayList if it fails to convert then it will skip this line
public void readFile(){ try { highscores = new ArrayList<>(); BufferedReader br = new BufferedReader(new FileReader("Highscores.txt")); String line = br.readLine(); while (line != null){ try{ highscores.add(Integer.parseInt(line...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ArrayList<Score> getScoreFromFile() {\n ArrayList<Score> scores = new ArrayList<>();\n\n // Read line by line.\n try (Stream<String> stream = Files.lines(Paths.get(\"src/main/resources/score-file.txt\"))) {\n stream.forEach(s -> {\n String[] line = s.split(\" ...
[ "0.71919644", "0.70113355", "0.69262385", "0.6923316", "0.684738", "0.68365353", "0.67341655", "0.6440437", "0.64003456", "0.6366309", "0.6288818", "0.62747437", "0.6197335", "0.6182659", "0.617952", "0.6124673", "0.6124598", "0.6079359", "0.59963274", "0.59680337", "0.596312...
0.8392254
0
/ Whenever the highscores are sorted this should be sorted from highest to lowest collections will sort from lowest to highest by default so the reverse method is called right after
public void sortHighscores(){ Collections.sort(highscores); Collections.reverse(highscores); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sortScores(){\r\n // TODO: Use a single round of bubble sort to bubble the last entry\r\n // TODO: in the high scores up to the correct location.\r\n \tcount=0;\r\n \tfor(int i=Settings.numScores-1; i>0;i--){\r\n \t\tif(scores[i]>scores[i-1]){\r\n \t\t\tint tempS;\r\n \t\t\...
[ "0.7367436", "0.7317204", "0.7272066", "0.71503294", "0.69037753", "0.6812051", "0.6569624", "0.6430025", "0.61927724", "0.61516285", "0.6138847", "0.60787904", "0.6067021", "0.6047913", "0.6015538", "0.5959113", "0.5897824", "0.58853596", "0.5867577", "0.58616716", "0.584288...
0.83858997
0
/ Add whatever integer to ArrayList afterwards it is sorted again and written back to the file
public void addHighscore(int i){ highscores.add(i); sortHighscores(); writeFile(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void writeScoreToFile(ArrayList<String> sArrayList,int score, Context context,String userName){\n\n int[] temp = new int[sArrayList.size()];\n Scanner in = null;\n\n //get the score part from the txt file\n for(int i=0;i<sArrayList.size();i++){\n\n in = new Scan...
[ "0.64619493", "0.62946665", "0.6290608", "0.62848294", "0.6122426", "0.60620064", "0.6023312", "0.5995982", "0.59636515", "0.5883381", "0.5873295", "0.5869425", "0.58484745", "0.5832453", "0.5827489", "0.5799681", "0.5799078", "0.5796878", "0.5777403", "0.57624376", "0.574795...
0.5654396
29
/ write the ArrayList highscores to highscores.txt but only do this for the top 10 if the highscores contain less than 10 numbers it will stop after the last number
public void writeFile(){ try{ FileWriter writer = new FileWriter("Highscores.txt"); for (int i = 0; i<10; i++){ if (i >= this.highscores.size()){ break; } writer.write(String.valueOf(this.highscores.get(i)) + "\n"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void writeScores(){\r\n // TODO: Write the high scores data to the file name indicated\r\n // TODO: by Settings.highScoresFileName.\r\n \tFile outFile=new File(Settings.highScoresFileName);\r\n \tPrintWriter out=null;\r\n \ttry{\r\n \t\tout=new PrintWriter(outFile);\r\n \t\tfor(...
[ "0.7415415", "0.7374677", "0.71370935", "0.70978403", "0.68871015", "0.66966575", "0.6608352", "0.6486292", "0.6456492", "0.63991076", "0.6336644", "0.6334306", "0.62743163", "0.6248763", "0.61859125", "0.61401886", "0.6135829", "0.6104301", "0.6070188", "0.60651636", "0.6002...
0.8209046
0
/ Draw a new frame displaying the highscores this is formatted in html to make it easier
public void drawHighscores(){ JFrame highScoreFrame = new JFrame(); highScoreFrame.setLayout(new BorderLayout()); highScoreFrame.setSize(new Dimension(280,400)); String top = "<h1><u>Highscores</u></h1>"; String numbers = getNumbers(); String scoreString = getTop(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void draw() {\r\n\t\tclearDoc();\r\n\t\twrite(\"score: \" + score + \"\\n\", null);\r\n\t\twrite(\"+\", null);\r\n\t\tfor (int i = 0; i < COLUMNS; i++) {\r\n\t\t\twrite(\"-\", null);\r\n\t\t}\r\n\t\twrite(\"+\\n\", null);\r\n\t\tfor (int i = 0; i < ROWS; i++) {\r\n\t\t\twrite(\"|\", null);\r\n\t\t\t...
[ "0.67250216", "0.65430456", "0.6541761", "0.6475348", "0.6415613", "0.63596046", "0.63151497", "0.6311109", "0.6279658", "0.6235756", "0.6166651", "0.6157992", "0.60820574", "0.60779697", "0.60421365", "0.6028171", "0.6022303", "0.60153395", "0.60076237", "0.6006571", "0.5995...
0.82851547
0
/ create a string of html code that contains the numbers from 1 to 10
public String getNumbers(){ StringBuilder htmlNumbers = new StringBuilder("<h2>"); for (int i = 1; i<=10; i++){ htmlNumbers.append(String.valueOf(i) + ".<br>"); } htmlNumbers.append("</h2>"); return htmlNumbers.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toHtml(String text, int number) {\r\n StringBuilder sb = new StringBuilder(text);\r\n int loc = 0;\r\n String space = \" \";\r\n loc = loc + number;\r\n while (loc < sb.length()) {\r\n createLine(loc, sb);\r\n loc = loc + number; \r\n ...
[ "0.73521537", "0.6409138", "0.5977175", "0.5877316", "0.5877039", "0.5849201", "0.5823992", "0.5807115", "0.5761926", "0.57257295", "0.5708955", "0.570776", "0.56646144", "0.5557054", "0.55454326", "0.5545055", "0.55434895", "0.5512821", "0.54500186", "0.54383487", "0.5381397...
0.7760708
0
/ Create a string of html code that contains the scores in descending order
public String getTop(){ StringBuilder htmlTop = new StringBuilder("<h2>"); for (int i = 0; i<10; i++){ if (i >= this.highscores.size()){ htmlTop.append(" ----<br>"); } else { htmlTop.append(String.valueOf(this.highscores.get(i))).append("<br>"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void sortPlayerScores(){\n text=\"<html>\";\n for (int i = 1; i <= Options.getNumberOfPlayers(); i++){\n if(Collections.max(playerScores.entrySet(), (entry1, entry2) -> entry1.getValue() - entry2.getValue()).getKey() != null){\n Integer pl = Collections.max(playerSco...
[ "0.71647453", "0.6425889", "0.6325911", "0.6258105", "0.5948416", "0.5860394", "0.5824553", "0.5653893", "0.5647321", "0.56025016", "0.55972", "0.55741864", "0.5561514", "0.55609137", "0.55506134", "0.553353", "0.55246395", "0.55077666", "0.5504714", "0.5503533", "0.54996085"...
0.67752147
1
onCreateView: This inflates the view and checks to see if an existing WebView already exists. If it does, the old WebView is added to the view.
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment View view = inflater.inflate(R.layout.fragment_browser, container, false); webViewContainer = (LinearLayout) view.findViewById(R.id.webVi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_program_unggulan, container, false);\n wvPage1 = (WebView)v.findViewById(R.id.activity_main_webview);\n ...
[ "0.6986889", "0.6971986", "0.69283235", "0.6915438", "0.68647933", "0.6851758", "0.6683397", "0.66490746", "0.66411555", "0.66151077", "0.65639234", "0.6555548", "0.65514034", "0.6536503", "0.65346515", "0.64839906", "0.6479389", "0.6432816", "0.64127654", "0.64026153", "0.63...
0.7524885
0
displayUrl: This method updates the WebView in the fragment to display the specified url.
public void displayUrl(String url) { //Create a new WebView to clear the old data createNewWebView(); //Enable JavaScript WebSettings webSettings = webView.getSettings(); webSettings.setJavaScriptEnabled(true); //Display website to user webView.setWebViewCli...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDisplayUrl(String displayUrl) {\r\n this.displayUrl = displayUrl;\r\n }", "public void setDisplayUrl(String displayUrl) {\r\n this.displayUrl = displayUrl;\r\n }", "public void updateDisplay() {\n\t\t\n\t\tif (!this.isAdded()) return;\n\t\t\n\t\tthis.layout.removeAllViews();\...
[ "0.6792708", "0.6792708", "0.6529605", "0.5763028", "0.5763028", "0.57470095", "0.5640614", "0.5581258", "0.55769956", "0.55672425", "0.55518883", "0.55518883", "0.554965", "0.554965", "0.5536957", "0.5503245", "0.5484804", "0.5481258", "0.54758394", "0.5475565", "0.5475565",...
0.71359956
0
createNewWebView: This method creates a new WebView and adds it to the WebView container.
private void createNewWebView() { //Remove the webView from it's parent if the webView exists if(webView != null) { ViewGroup parent = (ViewGroup) webView.getParent(); parent.removeView(webView); } //Create a new WebView webView = new WebView(getConte...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private WebView createWebView() {\n WebView webView = new WebView();\n webView.setContextMenuEnabled(false);\n\n WebEngine engine = webView.getEngine();\n // The files below must exist! Or pdf viewer no more!\n String url = new File(\"src/Resources/pdfjs_2.7.570/web/viewer.html\"...
[ "0.68594086", "0.6245364", "0.6207987", "0.6092232", "0.60124415", "0.59145194", "0.5900355", "0.58363795", "0.57992285", "0.5759542", "0.57540196", "0.5677936", "0.5638471", "0.56369984", "0.562044", "0.5617539", "0.5612846", "0.5577562", "0.5528814", "0.55271643", "0.551870...
0.8748387
0
TODO Autogenerated method stub
@Override public void actionPerformed(ActionEvent e) { Date date=new Date(); DateFormat timeFormat=new SimpleDateFormat("HH:mm:ss"); String time=timeFormat.format(date); ceas.setText("Ora curenta: "+time); }
{ "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.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
/ \brief Handle the loop unroll optimization pragmas. / pragma unroll / pragma unroll unrollhintvalue / pragma unroll '(' unrollhintvalue ')' / pragma nounroll / / unrollhintvalue: / constantexpression / / Loop unrolling hints can be specified with 'pragma unroll' or / 'pragma nounroll'. 'pragma unroll' can take a nume...
@Converted(kind = Converted.Kind.MANUAL_COMPILATION, source = "${LLVM_SRC}/llvm/tools/clang/lib/Parse/ParsePragma.cpp", line = 2078, FQN="(anonymous namespace)::PragmaUnrollHintHandler::HandlePragma", NM="_ZN12_GLOBAL__N_123PragmaUnrollHintHandler12HandlePragmaERN5clang12PreprocessorENS1_20PragmaIntroducerKindERN...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Converted(kind = Converted.Kind.AUTO_NO_BODY,\n source = \"${LLVM_SRC}/llvm/lib/Analysis/LoopAccessAnalysis.cpp\", line = 1508,\n FQN=\"llvm::LoopAccessInfo::analyzeLoop\", NM=\"_ZN4llvm14LoopAccessInfo11analyzeLoopEPNS_9AAResultsEPNS_8LoopInfoEPKNS_17TargetLibraryInfoEPNS_13DominatorTreeE\",\n cmd=\"jclank...
[ "0.5606103", "0.52594495", "0.51983297", "0.5153845", "0.5077572", "0.505675", "0.49199542", "0.47896683", "0.47611496", "0.47218588", "0.46893626", "0.46626496", "0.46617863", "0.45743474", "0.44910493", "0.4463295", "0.44499615", "0.4444467", "0.4403976", "0.43412364", "0.4...
0.5776365
0
/ Add integer n to the end of the list.
@Override public void add(int n) { values[size] = n; //add value to the list size++; //increment size if (size == values.length){ //if the list is full expand it resize(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void addAt(int n, int index) throws IndexOutOfBoundsException {\n\t\tif(checkIndex(index, size+1)) { //check if index is valid\n\t\t\tfor (int i=size; i>index; i--) {\n\t\t\t\tvalues[i] = values[i-1]; //move every value one step right until index\n\t\t\t}\n\t\t\tvalues[index] = n; //place the n...
[ "0.7470894", "0.7011506", "0.6771368", "0.67385787", "0.666767", "0.6576538", "0.65513873", "0.6516539", "0.6422277", "0.6408514", "0.6356899", "0.63500315", "0.6300876", "0.6300876", "0.6292585", "0.62853754", "0.62828183", "0.6274899", "0.6273893", "0.62552536", "0.6205434"...
0.77114564
0
/ Inserts integer n at position index. Shifts the element currently at that position (if any) and any subsequent elements to the right.
@Override public void addAt(int n, int index) throws IndexOutOfBoundsException { if(checkIndex(index, size+1)) { //check if index is valid for (int i=size; i>index; i--) { values[i] = values[i-1]; //move every value one step right until index } values[index] = n; //place the new value at index size++...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insert(int index, T element);", "public void insert(int n) {\n\n // Fill in the blank here.\n\tif(!contains(n)){\n\t\telements[size] = n;\n\t\tsize++;\n\t}\n System.out.println(\"Inserting \" + n + \"...\");\n }", "void insert(int idx, int val);", "public void insert(int index, T value) {\...
[ "0.65930134", "0.64544755", "0.63916796", "0.63383687", "0.6256032", "0.6231789", "0.61832154", "0.6167304", "0.6146583", "0.6123166", "0.6105506", "0.61019045", "0.609385", "0.60279727", "0.6019832", "0.597033", "0.5928052", "0.5917745", "0.59160525", "0.58963346", "0.586433...
0.6936122
0
/ Remove integer at position index.
@Override public void remove(int index) throws IndexOutOfBoundsException { if(checkIndex(index, size)) { //check if index is valid for (int i=index; i<size; i++) { values[i] = values[i+1]; //move every value one step left until index (which is overwritten) } size--; //decrement size }else { thro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void remove(int index);", "int remove(int idx);", "void remove( int index );", "public Type remove(int index);", "void remove(int idx);", "void remove(int index);", "void remove(int index);", "void remove(int index);", "void remove(int index);", "public void remove(int index) {\n\n\t}", ...
[ "0.80787224", "0.7996718", "0.79905903", "0.7974822", "0.7949502", "0.79488903", "0.79488903", "0.79488903", "0.79488903", "0.7869996", "0.7729775", "0.7697985", "0.7679724", "0.7665845", "0.76424354", "0.75824976", "0.7581751", "0.7560606", "0.7560606", "0.74417335", "0.7417...
0.6856492
46
/ Get integer at position index.
@Override public int get(int index) throws IndexOutOfBoundsException { if(checkIndex(index, size)) { //check if index is valid return values[index]; //return the value at index }else { throw new IndexOutOfBoundsException("Highest index: " + size); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int get(int index);", "public int getPosition(int index);", "public int getIndex(int position);", "public int get(int position) {\n return Integer.MIN_VALUE;\n }", "abstract int get(int index);", "public int get(int index) {\n\t\treturn r[index];\n\t}", "public int getPos(int index) {\...
[ "0.79232043", "0.769951", "0.7545292", "0.75045764", "0.74318033", "0.74086285", "0.7310804", "0.72438896", "0.72170836", "0.71823573", "0.71823573", "0.71823573", "0.7172445", "0.71525216", "0.71292144", "0.71292144", "0.71292144", "0.71292144", "0.71292144", "0.71292144", "...
0.0
-1
/ Find position of integer n, otherwise return 1
@Override public int indexOf(int n) { int returnInt = -1; for (int i=0; i<size; i++) { if(values[i] == n) returnInt = i; } return returnInt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int search(int[] arr, int n, int x, int k) {\n\t\tint i = 0;\n\t\twhile (i < n) {\n\n\t\t\t// If x is found at index i\n\t\t\tif (arr[i] == x)\n\t\t\t\treturn i;\n\n\t\t\t// Jump the difference between\n\t\t\t// current array element and x\n\t\t\t// divided by k We use max here\n\t\t\t// to make sur...
[ "0.6702505", "0.6510095", "0.6482469", "0.64503", "0.64342654", "0.64057696", "0.6404258", "0.6316163", "0.6270715", "0.6254468", "0.6219619", "0.6206394", "0.6172619", "0.61610544", "0.607459", "0.606535", "0.60534596", "0.6044915", "0.60419464", "0.5994878", "0.59829664", ...
0.6909466
0
if checkbox is checked
@Override public void dismiss() { if(chk.isChecked()){ //make file languageFixed.txt File setting = null; setting = makeDirectory(external_path+"/OurMenu/setting/"); makeFile(setting, external_path+"/OurMenu/setting/tutorialNo.txt"); } super.d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean getIsChecked();", "boolean isChecked();", "boolean isChecked();", "public boolean CheckBox() {\n if (AseguradoCulpable.isSelected()) {\n return true;\n } else {\n return false;\n }\n }", "private boolean checkBox() {\n if(ToSCheckBox.isSelected()...
[ "0.7760456", "0.77407336", "0.77407336", "0.767281", "0.74489737", "0.72649205", "0.71424454", "0.71346676", "0.71315557", "0.7023457", "0.6926001", "0.69115245", "0.68999016", "0.6887886", "0.6842006", "0.6809848", "0.6765498", "0.67618716", "0.6740939", "0.6739916", "0.6735...
0.0
-1
Spring Data JPA repository for the Countries entity.
@SuppressWarnings("unused") @Repository public interface CountriesRepository extends JpaRepository<Countries,Long> { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Repository\npublic interface ICountryRepository extends JpaRepository<Country, String> {\n\n Country findByCode(String code);\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface CountryRepository extends JpaRepository<Country,Long> {\n Long countByCountryCode(Integer countryCode);\n Coun...
[ "0.7212006", "0.7122927", "0.69572914", "0.682766", "0.6717692", "0.66761494", "0.6664336", "0.66011715", "0.6566933", "0.6457214", "0.6421044", "0.6402304", "0.6321221", "0.63030255", "0.62880456", "0.62232447", "0.62215996", "0.6198281", "0.6137156", "0.6103196", "0.6041431...
0.6697531
5
Function for tanh, hyperbolic tangent. Uses Math.tanh, no approximation.
@Override public double f(double x) { return Math.tanh(x); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static double tanh(double x) {\n if (Double.isNaN(x)) return Double.NaN;\n double result = (Math.exp(x) - Math.exp(-x)) / (Math.exp(x) + Math.exp(-x));\n if (Double.isNaN(result))\n return (x < 0) ? -1.0 : 1.0;\n return result;\n }", "public static double \t\ttanh...
[ "0.775054", "0.77315736", "0.7311127", "0.7082893", "0.6543509", "0.6299508", "0.6234793", "0.60910326", "0.6075975", "0.6068501", "0.59987015", "0.5963604", "0.5899724", "0.5780101", "0.57661647", "0.5746933", "0.57301974", "0.5673066", "0.5612761", "0.5597096", "0.5560134",...
0.72734606
3
Read the developer key from the properties file.
public List<YoutubeVideo> searchFromYoutube(String keyword) { Properties properties = new Properties(); try { InputStream in = SearchYoutube.class.getResourceAsStream("/weiwei/google/" + PROPERTIES_FILENAME); properties.load(in); } catch (IOException e) { Sys...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getApiKey() throws IOException {\n Properties prop = new Properties();\n InputStream loader = getClass().getClassLoader().getResourceAsStream(\"config.properties\");\n prop.load(loader);\n\n return prop.getProperty(\"apiKey\");\n }", "public static String extractFrom...
[ "0.67462003", "0.635409", "0.6341859", "0.6291053", "0.6189665", "0.6153231", "0.6134391", "0.6088675", "0.60510945", "0.6029294", "0.59849495", "0.5934606", "0.58925396", "0.58860046", "0.5855257", "0.5814855", "0.5808532", "0.5782577", "0.57595485", "0.57589525", "0.5712061...
0.0
-1
/ access modifiers changed from: protected
public void onResume() { List<String> a2; try { super.onResume(); if (Build.VERSION.SDK_INT >= 23 && this.a) { String[] strArr = this.needPermissions; try { if (Build.VERSION.SDK_INT >= 23 && getApplicationInfo().targetSdkVersio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.640...
0.0
-1
check for valid input
public void writeNumber(int row, int column, int value){ if(!checkInput(row, column, value)) return; //Tile must be instance of Guess if (gameField[row][column] instanceof Guess) { if (gameState == GameState.PAUSED) { if (row == usedRow && column == usedColumn) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isValidInput() {\n\t\treturn true;\n\t}", "private boolean isInputValid() {\n return true;\n }", "protected abstract boolean isInputValid();", "protected abstract boolean checkInput();", "private void validateInputParameters(){\n\n }", "protected abstract int isValidInput();",...
[ "0.84283096", "0.8279811", "0.8173578", "0.7814372", "0.78072685", "0.76525486", "0.7641181", "0.75494045", "0.7533217", "0.7248567", "0.7233538", "0.7094465", "0.70860356", "0.70676017", "0.7062181", "0.7041608", "0.70374566", "0.7036175", "0.7028434", "0.69914263", "0.69434...
0.0
-1
check for valid input
public void writeHelpingGuess(int row, int column, int help){ if(!checkInput(row, column, help)) return; if(gameField[row][column] instanceof Guess){ gameField[row][column].setTileState(TileState.HELPING); ((Guess) gameField[row][column]).setHelp(help == 0 ? 0 : help - 1, help);...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isValidInput() {\n\t\treturn true;\n\t}", "private boolean isInputValid() {\n return true;\n }", "protected abstract boolean isInputValid();", "protected abstract boolean checkInput();", "private void validateInputParameters(){\n\n }", "protected abstract int isValidInput();",...
[ "0.84283096", "0.8279811", "0.8173578", "0.7814372", "0.78072685", "0.76525486", "0.7641181", "0.75494045", "0.7533217", "0.7248567", "0.7233538", "0.7094465", "0.70860356", "0.70676017", "0.7062181", "0.7041608", "0.70374566", "0.7036175", "0.7028434", "0.69914263", "0.69434...
0.0
-1
check for valid input
private void setTileInField(int row, int column, int value, char section){ if(!checkInput(row, column, value)) return; if(value > 0){ gameField[row][column] = new Assignment(value, Section.getSection(section)); } else { gameField[row][column] = new Guess(Section.getSecti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isValidInput() {\n\t\treturn true;\n\t}", "private boolean isInputValid() {\n return true;\n }", "protected abstract boolean isInputValid();", "protected abstract boolean checkInput();", "private void validateInputParameters(){\n\n }", "protected abstract int isValidInput();",...
[ "0.84283096", "0.8279811", "0.8173578", "0.7814372", "0.78072685", "0.76525486", "0.7641181", "0.75494045", "0.7533217", "0.7248567", "0.7233538", "0.7094465", "0.70860356", "0.70676017", "0.7062181", "0.7041608", "0.70374566", "0.7036175", "0.7028434", "0.69914263", "0.69434...
0.0
-1
Create an empty groceries list of Grocery and display it.
public static void main(String[] args) { List<Grocery> groceries = new ArrayList<>(); String message = "Groceries: "; displayList(message, groceries); // Create three different Grocery objects. Grocery object1 = new Grocery("bananas"); Grocery object2 = new Grocery("orang...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<String> getGroceries()\n {\n List<String> groceryList=new ArrayList<String>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_GROCERIES;\n\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n // looping throu...
[ "0.6509279", "0.6272645", "0.58826584", "0.58146167", "0.56952953", "0.5651561", "0.56416875", "0.56088084", "0.5574338", "0.55662674", "0.5553649", "0.5527695", "0.5518467", "0.5493655", "0.5478653", "0.545088", "0.537712", "0.53474855", "0.53243804", "0.53080845", "0.525875...
0.69168603
0
View headerView = this.mViewHolder.navigationView.getHeaderView(0);
private void updateHeader() { this.mViewHolder.imageView = findViewById(R.id.image_header); this.mViewHolder.textHeader = findViewById(R.id.text_nav_header); this.mViewHolder.textHeader.setText(_NAME); Glide.with(this).load(user.getPhotoUrl()).into(this.mViewHolder.imageView); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testGetView_Header() {\n mView = mAdapter.getView(0, null, null);\n }", "private HeaderViewClickListener manageHeaderClick() {\n return new HeaderViewClickListener() {\n @Override\n public void onClickOfHeaderLeftView() {\n AppUtils.showLog(TAG, \...
[ "0.6666111", "0.65741724", "0.6506904", "0.64844435", "0.6462594", "0.6310649", "0.6220674", "0.6178627", "0.6170522", "0.6027194", "0.6005131", "0.5950561", "0.5950561", "0.5892331", "0.58745706", "0.5866149", "0.5861545", "0.5853903", "0.58501893", "0.5849567", "0.5846949",...
0.58878374
14
Add a pixel to the component
public void accumulate(IntValuePixel p) { size++; for (final ComponentFeature f : features) { f.addSample(p); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addPixel(int x, int y, byte colour) {\n pixelBuffer[x][y] = colour;\n dirtyPixels.add(new byte[]{((byte) x), ((byte) y)});\n }", "public abstract void putPixelRgb(int x, int y, RGBPixel p);", "public abstract void addComponent(DrawingComponent component);", "public void addPixel(int ind...
[ "0.7104337", "0.66623574", "0.6579832", "0.65506786", "0.6437673", "0.64146787", "0.6366153", "0.63267213", "0.62669444", "0.62529916", "0.6226408", "0.620924", "0.6101003", "0.6003771", "0.5997552", "0.59691703", "0.5934172", "0.5931421", "0.58418405", "0.57889533", "0.57603...
0.5439801
50
Merge another component with this one
public void merge(Component p) { size += p.size(); for (int i = 0; i < features.length; i++) { features[i].merge(p.features[i]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public abstract void merge(Mergeable merge);", "public Item merge(Item other);", "@Override\n\tprotected void merge(Object in1, Object in2, Object out) {\n\t\t\n\t}", "public ComponentCommon(ComponentCommon other) {\n __isset_bitfield = other.__isset_bitfield;\n if (other.is_set_inputs()) ...
[ "0.5973303", "0.56798565", "0.5658621", "0.55408126", "0.5480708", "0.5464994", "0.54370457", "0.5412792", "0.536161", "0.53580004", "0.5304477", "0.5304013", "0.52830476", "0.5263504", "0.52630293", "0.52565706", "0.52264804", "0.5197369", "0.5187647", "0.5175881", "0.516691...
0.6003605
0
The size of the component (i.e. the number of pixels)
public int size() { return size; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Dimension getSize();", "Dimension getSize();", "public Dimension getSize()\n {\n return new Dimension(300, 150);\n }", "public Dimension getSize ( )\r\n\t{\r\n\t\treturn new Dimension ( BORDER_X*2 + SQUARE_SIZE*size, BORDER_Y*2 + SQUARE_SIZE*size );\r\n\t}", "public Point2D.Float getSize() {\r...
[ "0.78833055", "0.78833055", "0.78630286", "0.7817988", "0.778315", "0.772468", "0.77134037", "0.7712959", "0.770201", "0.76795286", "0.7676519", "0.7671646", "0.76675886", "0.7657773", "0.76540273", "0.7623276", "0.76182985", "0.7564247", "0.7563216", "0.75582075", "0.7476916...
0.0
-1
Get the feature at the given index
public ComponentFeature getFeature(int index) { if (index >= features.length) return null; return features[index]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "iet.distributed.telemetry.Feature getFeature(int index);", "public ISlideData getFeature(int index);", "java.lang.String getFeatures(int index);", "iet.distributed.telemetry.FeatureOrBuilder getFeatureOrBuilder(\n int index);", "public Example getExample(Feature f,int i){\n\t\treturn featureIndex(f).g...
[ "0.806264", "0.8011654", "0.76206285", "0.7322323", "0.7067161", "0.6987749", "0.6893376", "0.6818856", "0.6680097", "0.66699797", "0.6659548", "0.6656404", "0.6656094", "0.6595553", "0.6589978", "0.6577756", "0.6577756", "0.6577756", "0.6547953", "0.65285116", "0.65210235", ...
0.80257815
1
Get the feature matching the given class if it exists. If more than one feature of the given class exists, then the first will be returned.
@SuppressWarnings("unchecked") public <T extends ComponentFeature> T getFeature(Class<T> featureClass) { for (final ComponentFeature f : features) if (f.getClass().isAssignableFrom(featureClass)) return (T) f; return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static ClassifiedFeature getClassifiedFeature(Classification classification, Feature feature, boolean containedInView) {\n ClassifiedFeature result = null;\n EList<ClassifiedFeature> classifiedFeatures;\n if (containedInView) {\n classifiedFeatures = classification.getClassifiedFeatur...
[ "0.6206799", "0.5886297", "0.5881514", "0.5861704", "0.57684344", "0.5707813", "0.5661889", "0.5661889", "0.55325437", "0.5513788", "0.54942745", "0.5415601", "0.5381699", "0.53585297", "0.53232926", "0.53206307", "0.52989197", "0.5264417", "0.5255051", "0.518691", "0.5185604...
0.770175
0
/ No super call because of splash gfx
@Override public void hit(Npc attacker, Mob defender, Hit hit) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void showSplash() {\n }", "private void splashScreen() {\r\n\t\t// Clear the screen, reset the level, and display the legend\r\n\t\tclear();\r\n\t\tdisplay.setLegend(\"Asteroids\");\r\n\r\n\t\t// Place four asteroids near the corners of the screen.\r\n\t\tplaceAsteroids();\r\n\t}", "st...
[ "0.7030121", "0.6544582", "0.6282674", "0.6148579", "0.61430687", "0.608103", "0.606244", "0.60585314", "0.60443026", "0.60443026", "0.60443026", "0.60231143", "0.60182434", "0.59847295", "0.5969386", "0.5948755", "0.59381646", "0.59193856", "0.5901768", "0.58950263", "0.5894...
0.0
-1
Class constructor capturing information about the element change.
public EditChange(int tag, String oldValue, String newValue, String siUID) { this.tag = tag; this.oldValue = oldValue; this.newValue = newValue; this.siUID = siUID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ElementChange getElementChange();", "public Change() {\n // Required for WebServices to work. Comment added to please Sonar.\n }", "public Changes() {\n }", "Element() {\n\t}", "public ElementObject(WebElement element) {\n // check null value\n super(0); //0 : Element is THERE\n...
[ "0.63319033", "0.6199573", "0.598909", "0.58799726", "0.5802363", "0.5686221", "0.5685502", "0.56763273", "0.5604551", "0.5569987", "0.54793596", "0.5432919", "0.5414079", "0.53867507", "0.53858596", "0.532156", "0.53047884", "0.5297946", "0.52959204", "0.52615535", "0.521833...
0.0
-1
Check if course exits
public boolean checkCourse(String nombre) { String[] campos = new String[] { "nombre" }; String[] args = new String[] { nombre }; Cursor c = db.query("Cursos", campos, "nombre=?", args, null, null, null); if (c.getCount() <= 0) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean courseExists(int courseCode){}", "private boolean checkCompletedCourse(int id) {\r\n boolean x = false;\r\n for (Registration registration : completeCourses) {\r\n if (id == registration.getCourseId()) {\r\n x = true;\r\n break;\r\n ...
[ "0.7260903", "0.7053023", "0.6878614", "0.6786076", "0.6618719", "0.6558518", "0.651185", "0.6433109", "0.6376631", "0.63494253", "0.63328546", "0.63290536", "0.62980485", "0.62974876", "0.6288006", "0.62830627", "0.6259484", "0.624456", "0.6217423", "0.61850476", "0.61810267...
0.63893306
8
Check if notification exits
public boolean checkNofitication(String titulo, String msg) { String[] campos = new String[] { "titulo" }; String[] args = new String[] { titulo }; String[] campos2 = new String[] { "mensaje" }; String[] args2 = new String[] { msg }; Cursor c = db.query("Notificaciones", campos, "titulo=?", args, null, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean hasNotifications()\n {\n return !this.notifications.isEmpty();\n }", "public Boolean notificationPresent() {\n\t\tBoolean isPresent = false;\n\t\twait.resetImplicitTimeout(2);\n\t\ttry {\n\t\t\tif (elements(\"li_notificationCount\").size() == 1) {\n\t\t\t\tisPresent = true;\n\t\t\t}\n...
[ "0.6512311", "0.6481535", "0.6303759", "0.6235143", "0.62153214", "0.620207", "0.6188001", "0.6164279", "0.6146369", "0.61272943", "0.6123018", "0.60983974", "0.6080617", "0.60793066", "0.6058805", "0.6023727", "0.6023727", "0.6023727", "0.6023727", "0.6023727", "0.6023727", ...
0.0
-1
Retorna el String en formato Json con los datos del proyecto: nombre y descripcion.
@Override public String traerProyecto(Proyecto p) { JSONObject json = new JSONObject(); //json.put("codigo", 0004); json.put("nombre", p.getNombre()); json.put("descripcion", p.getDescripcion()); json.put("duracionSprints", p.getDuracionDeSprints()); json.put("numeroS...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString(){\n return \"Codigo Produto: \"+this.idProduto+\n \"\\nNome do Produto \"+this.nomePro+\n \"\\nDescrição \"+this.descricao+\n \"\\nPreço: \"+this.preco;\n }", "public java.lang.String getProyecto() {\n return proyecto;\n }",...
[ "0.6470369", "0.63247776", "0.63247776", "0.62886244", "0.6166494", "0.59421736", "0.59261644", "0.59228927", "0.59198606", "0.5876993", "0.5852564", "0.58309364", "0.57811844", "0.5755048", "0.5751802", "0.57358336", "0.5725861", "0.57206625", "0.571163", "0.5687529", "0.566...
0.6717185
0
set response output to PDF format
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("application/pdf"); Document document = new Document(); try { //PdfWriter - a class from third party library PdfWriter.getInstance(document, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void sendPDF(byte[] content, HttpServletResponse response) throws IOException {\n response.setContentType(\"application/pdf\");\n response.setContentLength(content.length);\n response.getOutputStream().write(content);\n response.getOutputStream().flush();\n }", "@GetMapping...
[ "0.68602663", "0.68318695", "0.659634", "0.6563669", "0.65130645", "0.6405056", "0.6314029", "0.6266708", "0.6231286", "0.621652", "0.6188034", "0.61562604", "0.61513263", "0.60417986", "0.6036513", "0.60226953", "0.5937788", "0.5932197", "0.5924207", "0.58990306", "0.5848406...
0.5600316
35
bac dau click chuot
@Override public void mousePressed(MouseEvent e) { clickPoint = e.getPoint(); selectionBounds = null; // System.out.println("Bac dau" + e.getPoint().toString()); bacdauX = (int) e.getPoint().getX(); bacdauY = (int) e.getPoint().getY(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tSystem.out.println(\"vai ficar clikando ai a toa? PATETA\");\n\t\t\t\t\n\t\t\t}", "@Override\n public void mousePressed(MouseEvent e){\n String boton = W.detClick( e.getButton() );\n \n //System.out.pri...
[ "0.75907266", "0.7413925", "0.7345301", "0.7080261", "0.70433927", "0.70017457", "0.699334", "0.6983913", "0.68977547", "0.6896616", "0.68527496", "0.67580104", "0.67283183", "0.6716966", "0.6715257", "0.6700448", "0.6692496", "0.6692249", "0.6689596", "0.6689596", "0.6681906...
0.0
-1
get call from postman
public void GetCall(String url) throws ClientProtocolException, IOException { CloseableHttpClient httpclient=HttpClients.createDefault(); HttpGet httpget=new HttpGet(url); //lohith CloseableHttpResponse closeablehttpresponse=httpclient.execute(httpget); int responsestatuscode=closeablehttpresponse.getStatusLin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GET(\"posts/1\")\n public Call<Post> getPost();", "GetToken.Req getGetTokenReq();", "public Response getRequestForGetAPI(String endpoint) {\n response = given().contentType(ContentType.JSON)\n .when()\n .get(endpoint)\n .then()\n .extract(...
[ "0.6263997", "0.62188107", "0.6088139", "0.6082206", "0.6056833", "0.6048018", "0.60454744", "0.601123", "0.6008812", "0.600551", "0.59710205", "0.5947548", "0.5873121", "0.5866739", "0.5864043", "0.58601", "0.5844936", "0.58405274", "0.5826089", "0.58245707", "0.5818347", ...
0.0
-1
Read the content of this InputStream and return it as a String. The stream is closed before this method returns.
public static String getText(InputStream is) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(is)); return getText(reader); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String read() {\n\n String s = \"\";\n\n try {\n // Check if there are bytes available\n if (inStream.available() > 0) {\n\n // Read bytes into a buffer\n byte[] inBuffer = new byte[1024];\n int bytesRead = inStream.read(inBuf...
[ "0.750401", "0.71766174", "0.71658283", "0.71614", "0.703968", "0.6957307", "0.6951378", "0.6943325", "0.68958026", "0.68387455", "0.68240273", "0.6815508", "0.681406", "0.6791604", "0.6769644", "0.67581195", "0.675076", "0.6674198", "0.6642366", "0.66232073", "0.66109115", ...
0.64269257
39
Read the content of this InputStream using specified charset and return it as a String. The stream is closed before this method returns.
public static String getText(InputStream is, String charset) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(is, charset)); return getText(reader); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String readStream(InputStream is, String charsetName) throws UnsupportedEncodingException, IOException {\r\n StringBuffer sb = new StringBuffer();\r\n byte[] buffer = new byte[1024];\r\n int length = 0;\r\n while ((length = is.read(buffer)) != -1) {\r\n sb.appe...
[ "0.7268685", "0.6915386", "0.68700117", "0.6850134", "0.6723728", "0.66768605", "0.6676599", "0.6672888", "0.6605543", "0.6510115", "0.6463359", "0.64496857", "0.63550323", "0.63310724", "0.631648", "0.6261696", "0.62365407", "0.62315214", "0.6212349", "0.6196451", "0.6195188...
0.7226666
1
Read the content of the Reader and return it as a String. The reader is closed before this method returns.
public static String getText(Reader reader) throws IOException { BufferedReader bufferedReader = new BufferedReader(reader); return getText(bufferedReader); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String getString(Reader reader) {\n StringBuffer buf = new StringBuffer();\n char[] buffer = new char[1024];\n int count;\n try {\n while ((count = reader.read(buffer)) != -1) {\n buf.append(buffer, 0, count);\n }\n } catch (IOException e) {\n return null;\n }...
[ "0.7497638", "0.72253704", "0.7205618", "0.7200244", "0.7139847", "0.7127019", "0.7004908", "0.6994871", "0.685931", "0.6858148", "0.6811185", "0.67172444", "0.6709463", "0.6701768", "0.6690161", "0.66522455", "0.6612697", "0.66035664", "0.66035664", "0.65090364", "0.6494985"...
0.67393017
11
Read the content of the BufferedReader and return it as a String. The BufferedReader is closed afterwards.
public static String getText(BufferedReader reader) throws IOException { StringBuilder answer = new StringBuilder(); // reading the content of the file within a char buffer // allow to keep the correct line endings char[] charBuffer = new char[8192]; int nbCharRead /* = 0*/; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static String readString() throws IOException{\n return bufferedReader.readLine();\n }", "private static String getString(BufferedReader reader) throws IOException{\n String result=null;\n while(result==null) {\n result = reader.readLine();\n }\n return result...
[ "0.76448953", "0.75239164", "0.7336122", "0.729221", "0.71942973", "0.70569927", "0.70181453", "0.7011259", "0.69880927", "0.6958488", "0.6946416", "0.69348365", "0.68314135", "0.6807702", "0.6772812", "0.67634046", "0.6731396", "0.6716449", "0.6701995", "0.667455", "0.666690...
0.7458489
2
Close the Closeable. Logging a warning if any problems occur.
public static void closeWithWarning(Closeable c) { if (c != null) { try { c.close(); } catch (IOException e) { LOG.warning("Caught exception during close(): " + e); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void close() {\n if (cleanup != null) {\n cleanup.disable();\n }\n if (isOpen()) {\n forceClose();\n }\n }", "public void close() throws IOException;", "public void close() throws IOException;", "public void close() throws IOException;", "public v...
[ "0.72817063", "0.69601697", "0.69601697", "0.69601697", "0.69601697", "0.69601697", "0.69601697", "0.69601697", "0.69601697", "0.6954965", "0.69540954", "0.6936791", "0.6936791", "0.6936791", "0.6936791", "0.6936791", "0.6936791", "0.6936791", "0.6936791", "0.6936791", "0.693...
0.70042974
1
Close the Closeable. Ignore any problems that might occur.
public static void closeQuietly(Closeable c) { if (c != null) { try { c.close(); } catch (IOException e) { /* ignore */ } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected final void close()\n {\n try {\n _reader.close();\n _reader = null;\n } catch ( IOException except ) { }\n }", "public void close() {\n if (cleanup != null) {\n cleanup.disable();\n }\n if (isOpen()) {\n forceClose();\...
[ "0.74980307", "0.7465323", "0.74081224", "0.73563737", "0.73563737", "0.73563737", "0.73563737", "0.73563737", "0.73563737", "0.73563737", "0.73563737", "0.7293001", "0.7293001", "0.7293001", "0.7293001", "0.7293001", "0.7293001", "0.7293001", "0.7293001", "0.7293001", "0.729...
0.0
-1
Created by feng on 2015/8/8.
public interface Component { public void operation(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}",...
[ "0.62235576", "0.61594087", "0.61099446", "0.60991067", "0.60991067", "0.60908985", "0.6067942", "0.60315406", "0.6003369", "0.60017365", "0.59879375", "0.5978093", "0.59375924", "0.59196997", "0.5906573", "0.5895621", "0.5891126", "0.5864742", "0.5847863", "0.5831558", "0.58...
0.0
-1
Game View Controller is instantiated with inputs generated by the menu controller, indicating number of players and decks.
public GameViewController(int[] input) { inputs = input; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GameController() {\n \t\t// Fill the table empty positions.\n \t\tfor (int i = 0; i < MAX_NUMBER_OF_PILES; i++) {\n \t\t\tmTable.add(i, null);\n \t\t}\n \t\tcreateDeck();\n \t\tgs = new GameState(mTable, pileNames, pileNo);\n \t\tnew Listener(this);\n \t}", "public GameController() {\r\n\t\tsuper();\r\n\t...
[ "0.674099", "0.6567885", "0.65562254", "0.6550608", "0.64955837", "0.6450296", "0.6410479", "0.6372124", "0.63306916", "0.632725", "0.63271403", "0.6262563", "0.623108", "0.6211139", "0.61888826", "0.6185595", "0.6177841", "0.61631566", "0.6121193", "0.6109254", "0.6097843", ...
0.65975165
1
/ The NameDialog throws a game exception if the user clicks on the cancel button.
private ArrayList<String> getNames() { NameDialog n = new NameDialog(); nameList = new ArrayList<String>(); try { nameList = n.getNames(inputs[1]); }catch(GameException ex) { view.close(); menuStage.show(); } return nameList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void usernameTakenDialog() {\n Dialog dialog = new Dialog(\"Username taken\", cloudSkin, \"dialog\") {\n public void result(Object obj) {\n System.out.println(\"result \" + obj);\n }\n };\n dialog.text(\"This username has already been taken, try a n...
[ "0.68187314", "0.6700333", "0.6650651", "0.6639648", "0.6622038", "0.6548485", "0.65311044", "0.6523487", "0.65113217", "0.6348558", "0.6348353", "0.6346492", "0.63148224", "0.62906945", "0.61653626", "0.61650306", "0.6161009", "0.61595726", "0.61560565", "0.6148765", "0.6100...
0.56597686
70
Collects Player names and instantiates a new game, a game loop and a new game view.
public void createNewGame(Stage menuStage) { this.menuStage = menuStage; this.menuStage.hide(); view = new GameView(inputs[1]); try { view.show(); game = new Game(getNames(), inputs[0]); turned = false; view.initialisePlayerViews(nameList); createKeyListeners(); createGameLoop(); }catch (IndexO...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createPlayers() {\n\tGlobal.camera_player1 = new Camera(new OrthographicCamera());\n\tGlobal.camera_player2 = new Camera(new OrthographicCamera());\n\tGlobal.camera_ui = new OrthographicCamera();\n\tGlobal.player1 = new Plane(Global.player1_respawn.x,\n\t\tGlobal.player1_respawn.y, 0, new Planetype(Pl...
[ "0.70724934", "0.704879", "0.7034845", "0.6991756", "0.6984401", "0.6952472", "0.688355", "0.6863663", "0.6833408", "0.6810382", "0.6780479", "0.6775744", "0.6730692", "0.67221874", "0.6717384", "0.6717159", "0.66590595", "0.66576535", "0.6656647", "0.66505426", "0.66480863",...
0.0
-1
/ This creates the keyboard input listeners necessary to play the game.
private void createKeyListeners() { addGameKeys(); view.getGameScene().setOnKeyPressed(event ->{ if (keyListeners.containsKey(event.getCode())) { keyListeners.put(event.getCode(), true); } }); view.getGameScene().setOnKeyReleased(event ->{ if (keyListeners.containsKey(event.getCode())) { keyLi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setInputListeners () {\r\n // initialize input state\r\n myLastKeyPressed = NO_KEY_PRESSED;\r\n myKeys = new TreeSet<Integer>();\r\n addKeyListener(new KeyAdapter() {\r\n @Override\r\n public void keyPressed (KeyEvent e) {\r\n // resets ...
[ "0.734322", "0.71589535", "0.69012964", "0.68552995", "0.682068", "0.6798985", "0.67654043", "0.67568165", "0.6716732", "0.66963416", "0.6635227", "0.6618318", "0.6601759", "0.6588935", "0.65356433", "0.64226687", "0.6401041", "0.63922596", "0.6391928", "0.63859755", "0.63838...
0.7818621
0
/ This takes the current number of cards from the model, and updates the view.
private void displayPlayers() { for (Player p: game.getPlayers()) { view.updateDisplay(p.getId(), p.getDeck().getNumberOfCards()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateCards() {\r\n riderUserCards.setAll(riderUserModel.getCards());\r\n if (riderUserCards.size() != 0) {\r\n riderUserView.noCards.setVisible(false);\r\n riderUserView.dropDownOfCards.getSelectionModel().selectFirst();\r\n setCardSelected(riderUserView.dropDownOfCards.getValue()...
[ "0.6746697", "0.63058406", "0.62678784", "0.6152301", "0.6138497", "0.60463786", "0.60463786", "0.60244626", "0.6003096", "0.60002834", "0.599487", "0.59516865", "0.58838177", "0.58618385", "0.5849901", "0.5842742", "0.5842649", "0.58293605", "0.58293533", "0.58054596", "0.57...
0.52372056
100
/ This verifies that the player who pressed a snap key is not already out of the game.
private boolean playerHasPressed(PlayerView p) { return (!game.getPlayer(p.getId() - 1).getHasLost() && keyListeners.get(p.getKeyCode())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkSnap() {\n\t\tif (turned && view.getInstructions().getHidden())\n\t\t\tfor (PlayerView p: view.getPlayerViewList())\n\t\t\t\tif (playerHasPressed(p)) {\n\t\t\t\t\t// If last card is null, the turned card is the first card in the pile and can't be snap.\n\t\t\t\t\tif(game.getLastCard() != null)\n\...
[ "0.72269076", "0.63959223", "0.6383143", "0.6338227", "0.6290123", "0.6278244", "0.6206561", "0.6174575", "0.6143241", "0.61366475", "0.6110763", "0.60916126", "0.6078778", "0.60642356", "0.6044855", "0.6033168", "0.6031459", "0.60163116", "0.60113645", "0.5989497", "0.59823"...
0.594603
23
/ First we check if a new card has been turned (to prevent multiple snaps on the same card, and we verify that the instructions scene is not obscuring the game play, then we check if any player has pressed snap, and if that snap is valid.
private void checkSnap() { if (turned && view.getInstructions().getHidden()) for (PlayerView p: view.getPlayerViewList()) if (playerHasPressed(p)) { // If last card is null, the turned card is the first card in the pile and can't be snap. if(game.getLastCard() != null) view.showLastCard(game.ge...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void checkCards(){\r\n if (Card1.getSource().equals(Card2.getSource())){\r\n Card1.setEnabled(false); \r\n Card2.setEnabled(false);\r\n Card1.setBackground(new Color(190, 190, 255));\r\n Card2.setBackground(new Color(190, 190, 255));\r\n Card1.se...
[ "0.64403737", "0.6320917", "0.62064457", "0.6145509", "0.61358875", "0.6085974", "0.6075557", "0.6057143", "0.6029872", "0.60294694", "0.6023852", "0.59813577", "0.5966225", "0.5957991", "0.5909138", "0.5894764", "0.58906764", "0.58823514", "0.5874369", "0.5872806", "0.583677...
0.81145954
0
The H key shows/hides the help instructions scene
@Override public void handle(long now) { if (keyListeners.get(KeyCode.H)) { view.moveInstructions(); keyListeners.put(KeyCode.H, false); } //The space bar turns a new card if ((view.getInstructions().getHidden()) && keyListeners.get(KeyCode.SPACE)){ turnCard(); displayPlayers(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void ShowHelpScreen() {\n ToggleVisibility(HelpPage.window);\n }", "public void displayHelpMenuView()\n {\n System.out.println(\"\\nHelp menu selected.\");\n }", "void showHelp() {\n\t\tif (helpScreen == null) {\n\t\t helpScreen = new Form(\"Walking Help\");\n\t\t hel...
[ "0.7675924", "0.7671607", "0.76265585", "0.7333805", "0.7300262", "0.7232596", "0.7204855", "0.7147801", "0.70714295", "0.70387", "0.699796", "0.6948904", "0.69033295", "0.68819726", "0.68721294", "0.67778736", "0.67445534", "0.67279303", "0.6694964", "0.6680618", "0.66680646...
0.0
-1
release motors from STOPPED state without actually running them
public static synchronized void idleAllLiftMotors() { synchronized(armStage1.motorLock) { // synchronized(armStage2.motorLock) { armStage1.motorObj.set(ControlMode.PercentOutput, 0.0); // armStage1.auxMotorObj.set(ControlMode.PercentOutput, 0.0); // armStage2.motorObj.set(ControlMode.PercentOutp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void stopMotors(){\n\t\tsynchStop(MMXCOMMAND_BRAKE);\n\t}", "public void stop() {\n climberMotors.stopMotor();\n }", "public void stop(){\n started = false;\n for (DcMotor motor :this.motors) {\n motor.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n ...
[ "0.7670943", "0.7496989", "0.74728256", "0.72777385", "0.72559553", "0.7247844", "0.7138538", "0.71000564", "0.7070673", "0.7047288", "0.6973638", "0.6943932", "0.69079185", "0.68749344", "0.6861088", "0.68551534", "0.68327105", "0.68287385", "0.6805954", "0.67901427", "0.676...
0.0
-1
also see config methods in ArmLiftMotorInfo class
protected static synchronized void configLiftMotorAndEncoder(ArmLiftMotorInfo mtrCfg) { if(mtrCfg.equals(TmSsArm.armStage1)) { mtrCfg.sdKeyJoystickReading =SdKeysE.KEY_ARM_STAGE1_JOYSTICK_RDG; mtrCfg.sdKeyMtrControlMode = mtrCfg.motorObj.m_namedCntlEnt.cSdKeyMtrControlMode; //SdKeysE.KEY_ARM_STAGE1_MT...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initializing\"); //display on the drivers phone that its working\n\n FLM = hardwareMap.get(DcMotor.class, \"FLM\"); //Go into the config and get the device named \"FLM\" and assign it to FLM\n FRM = hardwareMap.get(DcMotor.c...
[ "0.69798523", "0.66987205", "0.66924036", "0.66805744", "0.6640662", "0.6520454", "0.63915104", "0.63336295", "0.62978065", "0.625683", "0.62351525", "0.62297016", "0.6199173", "0.6186821", "0.61863613", "0.61567384", "0.61171794", "0.6108231", "0.6085075", "0.6072812", "0.60...
0.71902806
0
This method is intended for lab testing and early development. At competitions, should only be doing servo mode
private static synchronized void runLiftStageFromJoystick(ArmLiftMotorInfo mtrInfo) { //double stage1JoystickReading, double stage2JoystickReading) { double percentOut; synchronized(armStage1.motorLock) { // synchronized(armStage2.motorLock) { //joysticks give negative readings when pushed away f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void testServo(){\n\n if (gamepad1.y) {\n servoLeft.setDirection(Servo.Direction.REVERSE);\n servoLeft.setPosition(0.5);\n servoRight.setDirection(Servo.Direction.REVERSE);\n servoRight.setPosition(0.5);\n\n }\n if (gamepad1.x) {\n ...
[ "0.743026", "0.73775274", "0.708388", "0.6975977", "0.6942941", "0.6879603", "0.6764882", "0.67510366", "0.6736705", "0.671679", "0.6714396", "0.66752166", "0.66585267", "0.6608525", "0.6603873", "0.65940636", "0.6579222", "0.6524517", "0.6517894", "0.65100765", "0.65047956",...
0.0
-1
use the joysticks on the xbox controller to nudge the setpoints up or down from their official servo settings. Use the nudgeThrottle parm to keep "nudges" from being too drastic.
private static synchronized void nudgeServo(ArmLiftMotorInfo mtrInfo, double encoderAdjustmentRatio) { synchronized(armStage1.motorLock) { // synchronized(armStage2.motorLock) { //CONFIG ME int nudgeAmt = 0; //use squaring to make the joysticks easier to use double jsReadingRaw = mtrInf...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void loop() {\n float left = -gamepad1.left_stick_y;\n float right = -gamepad1.right_stick_y;\n // clip the right/left values so that the values never exceed +/- 1\n right = Range.clip(right, -1, 1);\n left = Range.clip(left, -1, 1);\n\n // scale the ...
[ "0.58998287", "0.55651885", "0.54832953", "0.5410491", "0.5373911", "0.5329498", "0.5262923", "0.52456945", "0.5201236", "0.5184931", "0.5178085", "0.5165147", "0.5156968", "0.5095432", "0.50953484", "0.5092505", "0.50649095", "0.5038094", "0.5025455", "0.501059", "0.50000924...
0.59259015
0
private static String prevStg2StatusStr = "";
public static void runArm() { synchronized(ArmClawInfo.clawLock) { synchronized(armStage1.motorLock) { // synchronized(armStage2.motorLock) { PrtYn flag = PrtYn.N; if(Tm744Opts.isInSimulationMode()) { flag = PrtYn.Y; } String stg1StatusStr; // String stg2StatusStr; DsName...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected String getStatus()\n { return call_state; \n }", "private String getServiceCurrentStatus(String csStatChng) {\r\n\t\t\t\t\r\n\t\tchar serviceStatus;\r\n\t\tString serviceStatusStr = \"\";\t\t\t\t\r\n\t\t\r\n\t\tif (csStatChng != null) {\r\n\t\t\tserviceStatus = csStatChng.charAt(csStatChng.length(...
[ "0.6215381", "0.62144446", "0.615823", "0.58919317", "0.5878591", "0.5878591", "0.5878591", "0.5878591", "0.58757824", "0.58757824", "0.5826649", "0.5826365", "0.57497853", "0.5745741", "0.5729365", "0.5713349", "0.5702283", "0.5702283", "0.5692676", "0.5692676", "0.5692676",...
0.0
-1
TODO Autogenerated method stub
@Override public void sssDoLwTestInit() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void sssDoLwTestPeriodic() { }
{ "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
Called just before this Command runs the first time
protected void initialize() { P.println(Tt.getClassName(this) + " initializing"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void preRun() {\n super.preRun();\n }", "protected void preRun() {\r\n\t\tthis.preparePairs();\r\n\t}", "@Override\n public void beforeFirstLogic() {\n }", "public void prePerform() {\n // nothing to do by default\n }", "protected void onFirstUse() {}", "@O...
[ "0.71116775", "0.6540082", "0.643276", "0.64309984", "0.6406235", "0.63530433", "0.6307191", "0.62521607", "0.6246859", "0.6240541", "0.61669374", "0.6162758", "0.612669", "0.612669", "0.612669", "0.612669", "0.612669", "0.6106636", "0.60843927", "0.60843927", "0.6078098", ...
0.0
-1
Called repeatedly when this Command is scheduled to run
protected void execute() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tvoid runCommand() {\n\t\t\ttrigger.execute();\n\t\t}", "@Override\n public void run() {\n schedule();\n }", "@Override\n public void autonomousPeriodic() {\n \n Scheduler.getInstance().run();\n \n }", "public void run() {\n\t\texecuteCommand( client, false );\n\t}", "...
[ "0.6689458", "0.6631115", "0.6566414", "0.65512514", "0.6530515", "0.6488629", "0.64019585", "0.6380878", "0.637645", "0.6363615", "0.63557744", "0.6330997", "0.6295938", "0.6275704", "0.6268897", "0.62656784", "0.62656784", "0.62656784", "0.62656784", "0.62656784", "0.626567...
0.0
-1
Make this return true when this Command no longer needs to run execute()
protected boolean isFinished() { boolean ans = false; return ans; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean execute() {\n return false;\n }", "@Override\n public boolean execute() {\n return false;\n }", "public boolean execute(){\n return false;\n }", "@Override\n\tpublic boolean Unexecute() \n\t{\n\t\treturn false;\n\t}", "p...
[ "0.77345294", "0.77345294", "0.7678753", "0.76457655", "0.75966", "0.7554271", "0.6877811", "0.6748956", "0.6728847", "0.66855806", "0.65891784", "0.65624696", "0.64980483", "0.63857424", "0.63736373", "0.6356819", "0.6356819", "0.63498974", "0.63401324", "0.63290936", "0.632...
0.0
-1
Called once after isFinished returns true
protected void end() { P.println(Tt.getClassName(this) + " ending"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected boolean isFinished() {\n return true;\n }", "@Override\n protected boolean isFinished() {\n return true;\n }", "@Override\n public boolean isFinished() {\n return true;\n }", "@Override\r\n\tprotected boolean isFinished() {\n\t\treturn true;\r\n\t}", "@Override\...
[ "0.85854495", "0.85395205", "0.83341306", "0.83313096", "0.83313096", "0.83068", "0.8305024", "0.8298836", "0.8277644", "0.8277644", "0.8277644", "0.8277644", "0.8277644", "0.8277644", "0.8277644", "0.8277644", "0.8277644", "0.8277644", "0.8277644", "0.8277644", "0.8277644", ...
0.0
-1