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
Write a method to randomly generate a set of m integers from an array of size n. Each element must have equal probability of being chosen.
@Test public void test3() throws Exception { int[] random = getRandomlyFromArray(new int[] {1, 2, 3, 4, 5, 6, 7, 8}, 3); String prepend = ""; for (int i : random) { System.out.print(prepend + i); prepend = ", "; } System.out.println(); try { getRandomlyFromArray(new int[] {1}, 2); Assert.fail("Should have thrown an exception"); } catch (Exception e) { // expected } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static BigFraction[][] randomInt(int m, int n) {\n BigFraction[][] C = new BigFraction[m][n];\n for (int i = 0; i < m; i++)\n for (int j = 0; j < n; j++)\n C[i][j] = new BigFraction(Math.round(Math.random() * 20) - 10);// * 256;\n return C;\n }", "static i...
[ "0.6928454", "0.67848706", "0.67683893", "0.66819257", "0.66472274", "0.66106826", "0.6598656", "0.6486833", "0.6461052", "0.6433015", "0.64253426", "0.6376975", "0.63249904", "0.62897915", "0.62792194", "0.6210108", "0.61697894", "0.61686635", "0.6167941", "0.61505187", "0.6...
0.0
-1
You have a large text file containing words. Given any two words, find the shortest distance (in terms of number of words) between them in the file. Can you make the searching operation in O(1) time? What about the space complexity for your solution?
@Test public void test5() { String[] words = new String[] { "A", "B", "C", "D", "E", "F", "F", "B", "H", "I", "J", "K" }; Assert.assertEquals(shortestDistanceBetween(words, "B", "F"), 1); Assert.assertEquals(shortestDistanceBetween(words, "A", "E"), 4); Assert.assertEquals(shortestDistanceBetween(words, "I", "A"), 9); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void findTheShortestDistance(String[]\tarrayOfWords, String word1, String word2) {\n\t\tHashMap<String, ArrayList<Integer>> wordMap = new HashMap<String, ArrayList<Integer>>();\n\t\t\n\t\t// Add each word to the map\n\t\tfor(int i = 0; i < arrayOfWords.length; ++i) {\n\t\t\t\n\t\t\t// Does this word ...
[ "0.776567", "0.7607485", "0.7463207", "0.7390457", "0.73546696", "0.7294773", "0.72754884", "0.7261059", "0.72053695", "0.71678996", "0.7153858", "0.7056578", "0.7009927", "0.6980986", "0.67864347", "0.6626735", "0.64402926", "0.64031446", "0.62973416", "0.6202228", "0.619385...
0.5781051
47
Constructeur d'un editeur simple
public EditeurSimple() { super(); this.buffer = new Buffer(); this.pressPapier = new PressePapier(); this.selection = new Selection(); this.fluxFile = new FluxFile(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Simple createSimple();", "public SimpleCitizen(){\n super();\n information = \"let's help to find mafias and take them out\";\n }", "public Cgg_jur_anticipo(){}", "public Sobre() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public Pasien() {\r\n }", "public Student() {\r\n\t\timePrezime...
[ "0.71171033", "0.6369028", "0.62707585", "0.62033737", "0.6198826", "0.61744577", "0.6168295", "0.61604595", "0.61432475", "0.6105196", "0.60927504", "0.6060516", "0.6050824", "0.6045804", "0.60376155", "0.6033647", "0.6019248", "0.6012843", "0.5999019", "0.5984498", "0.59817...
0.62735593
2
Obtention de la valeur
public int getValeur() { return valeur; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getVal();", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "public String getValue () { return value; }", "java...
[ "0.7240182", "0.7078479", "0.7078479", "0.7078479", "0.7078479", "0.7078479", "0.7078479", "0.7078479", "0.7078479", "0.7078479", "0.7078479", "0.7019756", "0.70047766", "0.70047766", "0.70047766", "0.70047766", "0.70047766", "0.70047766", "0.68964523", "0.68964523", "0.68964...
0.7296507
0
Restitution de la valeur
public int getType () { return type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract int getInfraredValue();", "public int getAltNeg(){\n return this._alturaNegra;\n }", "public double getRisultato() {\r\n return risultato;\r\n }", "public void setRisultato(double risultato) {\r\n this.risultato = risultato;\r\n }", "public float getRestitution...
[ "0.6031253", "0.5908656", "0.5902409", "0.58373255", "0.5829983", "0.5821453", "0.572719", "0.5697686", "0.56806433", "0.5675399", "0.56668377", "0.56626135", "0.56540334", "0.5653698", "0.56201804", "0.5608785", "0.5601821", "0.55912524", "0.5587743", "0.5587688", "0.5572015...
0.0
-1
Affichage des attributs du message
public void afficherMessage () { System.out.println("("+valeur+", "+type+")"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Map<String, String> getSourceAttributes() {\n return sqsMessage.getAttributes();\n }", "public String getattribut() \n\t{\n\t\treturn attribut;\n\t}", "@Override\n\tpublic void onSetMessageAttributes(EMMessage message) {\n\n\t}", "@AutoEscape\n\tpublic String getMessageInfo();...
[ "0.64090115", "0.6204275", "0.6154801", "0.6145103", "0.6078535", "0.6072661", "0.6055345", "0.6050394", "0.60304505", "0.5981609", "0.5981609", "0.59798384", "0.5958535", "0.5951379", "0.5950549", "0.593628", "0.5844902", "0.5839198", "0.582947", "0.5823151", "0.5823151", ...
0.0
-1
Constructor when the node doesnt have a parent
public Node(Board board){ children = new ArrayList<>(); counter = 0; this.board = board; parent = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Node(){}", "public Node() {}", "public Node() {}", "public Node() {}", "public Node() {}", "public TreeNode (TreeNode parent)\r\n {\r\n if (logger.isFineEnabled()) {\r\n logger.fine(\"new TreeNode parent=\" + parent);\r\n }\r\n\r\n if (parent != null) {\r\n ...
[ "0.71468264", "0.71002364", "0.71002364", "0.71002364", "0.71002364", "0.70505214", "0.6924722", "0.6894801", "0.68909824", "0.68909824", "0.68877816", "0.6881742", "0.6829067", "0.6822268", "0.68055505", "0.6795519", "0.67588663", "0.67574286", "0.6746651", "0.6734456", "0.6...
0.6448111
36
Constructor when the node has a parent
public Node(Node parent, Board board){ children = new ArrayList<>(); counter = 0; this.parent = parent; this.board = board; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TreeNode (TreeNode parent)\r\n {\r\n if (logger.isFineEnabled()) {\r\n logger.fine(\"new TreeNode parent=\" + parent);\r\n }\r\n\r\n if (parent != null) {\r\n parent.addChild(this);\r\n }\r\n }", "public TNode(E item, TNode<E> parent) {\r\n el...
[ "0.74408644", "0.72260934", "0.721449", "0.71572727", "0.6989892", "0.6939273", "0.69332045", "0.688303", "0.68819344", "0.6849867", "0.6767087", "0.67644346", "0.67644346", "0.67644346", "0.67644346", "0.6747589", "0.67390645", "0.67259735", "0.67252207", "0.66979784", "0.66...
0.69070995
7
Adding a child to the node
public void addChild(Node node){ children.add(node); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addChild(Node child){\n children.add(child);\n }", "public abstract void addChild(Node node);", "@Override\n\tpublic void addChild(Node node) {\n\t\t\n\t}", "public void addChild(Node childnode)\n {\n children.add(childnode);\n }", "public void addChild( ChildType child )...
[ "0.7899784", "0.782775", "0.77095103", "0.7593572", "0.75777334", "0.7441491", "0.74305004", "0.7417135", "0.74004835", "0.7361076", "0.7357968", "0.7345016", "0.73378754", "0.7323685", "0.7321948", "0.7293579", "0.72791713", "0.72791713", "0.72791713", "0.72791713", "0.72791...
0.75058055
5
Accessor method for the children of the node
public ArrayList<Node> getChildren(){ return children; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Node[] getChildren(){return children;}", "public ArrayList<Node> getChildren() { return this.children; }", "@Override\n\tpublic TreeNode[] getChildren() {\n\t\treturn this.children ;\n\t}", "Node[] getChildren(Node node);", "public Vector getChildren() {\n return this.children;\n }", "public a...
[ "0.7973526", "0.76014054", "0.7560388", "0.75271964", "0.7526172", "0.7456038", "0.7389994", "0.73880076", "0.73664224", "0.73556435", "0.7343193", "0.7335514", "0.7305724", "0.73004913", "0.7278165", "0.72248286", "0.7224626", "0.7220773", "0.7214746", "0.721351", "0.7205758...
0.7309304
12
Method to return next child
public Node returnNextChild(){ try{ return children.get(counter); }catch(Exception ex){ return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Nodo getnext ()\n\t\t{\n\t\t\treturn next;\n\t\t\t\n\t\t}", "ComponentAgent getNextSibling();", "public SlideNode getNext() {\n\t\treturn next;\n\t}", "public E getNext() {\n\t\tif (!super.isEmpty()) {\n\t\t\tif (index >= this.size() - 1)\n\t\t\t\tindex = -1;\n\t\t\treturn this.get(++index);\n\t\t}\n...
[ "0.71338713", "0.70766294", "0.70535046", "0.69809395", "0.6980287", "0.6970798", "0.69475365", "0.69181883", "0.6910127", "0.68609554", "0.68448627", "0.6839921", "0.68313396", "0.68282944", "0.68241936", "0.6809323", "0.6806358", "0.68031645", "0.680233", "0.679188", "0.678...
0.8298286
0
Accessor method for the board
public Board getBoard(){ return board; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Board getBoard ();", "Board getBoard() {\r\n return _board;\r\n }", "public Board getBoard(){return board;}", "Board getBoard() {\n return _board;\n }", "public Board getBoard() {\r\n return board;\r\n }", "public Board getBoard(){\n return m_board;\n }", ...
[ "0.8059148", "0.79456145", "0.79102635", "0.7859652", "0.7745465", "0.7737508", "0.7692123", "0.7627506", "0.76264423", "0.761972", "0.760164", "0.760164", "0.7596214", "0.75723904", "0.7530922", "0.75270236", "0.7520389", "0.7507798", "0.7505681", "0.75050235", "0.747392", ...
0.7693798
6
Method to increment the counter
public void incCounter(){ counter++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void incrementCounter()\r\n\t{\r\n\t\tthis.counter++;\r\n\t}", "public void incCounter()\n {\n counter++;\n }", "void incrementCount();", "public void incrementCount() {\n\t\tcount++;\n\t}", "public void incrementCount() {\n count++;\n }", "public void incCount() { ...
[ "0.877152", "0.8619971", "0.8576509", "0.85320085", "0.8429592", "0.84108615", "0.834988", "0.83497643", "0.8266571", "0.8204324", "0.8192942", "0.8170363", "0.81654185", "0.8154569", "0.8100323", "0.8033249", "0.80252886", "0.80032814", "0.79568136", "0.7942193", "0.79219943...
0.84802574
4
Accessor method for counter
public int getCounter(){ return counter; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int getCounter() {return counter;}", "public int getCounter()\n {\n return counter;\n }", "public int getCounter() {\r\n return counter;\r\n }", "@Override\n\tpublic int getCounter() {\n\t\treturn counter;\n\t}", "public int getCounter() {\n return counter;\n ...
[ "0.8214249", "0.81480247", "0.80813694", "0.80230373", "0.80208117", "0.8006015", "0.7883793", "0.7769012", "0.75051534", "0.74795574", "0.74615884", "0.729604", "0.7284416", "0.7279856", "0.72756934", "0.7244634", "0.7217828", "0.7192883", "0.7180563", "0.71745056", "0.70937...
0.82347524
0
Method to set counter
public void setCounter(int number){ this.counter = number; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void setCounter() {++counter;}", "public void setCounter(int value) { \n\t\tthis.count = value;\n\t}", "public void setCounter(int counter) {\n this.counter = counter;\n }", "public void set_count(int c);", "private void incrementCounter()\r\n\t{\r\n\t\tthis.counter++;\r\n\t}", "...
[ "0.8581774", "0.8215397", "0.8057855", "0.8010437", "0.7677692", "0.7564729", "0.74871343", "0.7446129", "0.74183875", "0.72959596", "0.72959596", "0.72959596", "0.72729343", "0.7258018", "0.72480774", "0.72031206", "0.7181098", "0.71810853", "0.71798664", "0.7157824", "0.713...
0.8087657
2
Accessor method for parent
public Node getParent(){ return parent; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n Derived get();", "@Override\n public void get() {}", "protected abstract MethodDescription accessorMethod();", "T childValue(T parentValue) {\n throw new UnsupportedOperationException();\n }", "public int Parent() { return this.Parent; }", "protected String getName(){\r\n ...
[ "0.66575074", "0.64563215", "0.61662817", "0.60924435", "0.6049424", "0.5995793", "0.59881824", "0.5952249", "0.593827", "0.59165597", "0.59165597", "0.5913777", "0.58969796", "0.58465654", "0.5841143", "0.57979065", "0.57964176", "0.57927656", "0.57856345", "0.5771468", "0.5...
0.0
-1
Accessor method for generated check
public boolean getGeneratedCheck(){ return generatedCheck; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void check() {\n\t\t\n\t}", "@Override\n\tpublic void check() {\n\t\t\n\t}", "public String getCheckMethod() {\r\n return checkMethod;\r\n }", "public abstract String check() throws Exception;", "abstract protected boolean checkMethod();", "void check();", "void check();",...
[ "0.6698035", "0.6698035", "0.65036184", "0.6433506", "0.6389291", "0.6336355", "0.6336355", "0.6335343", "0.62347054", "0.62347054", "0.62347054", "0.6143479", "0.6136821", "0.60993475", "0.608707", "0.6054289", "0.60214347", "0.59942627", "0.59659237", "0.59393096", "0.59117...
0.6248153
8
Mutator method for generated check
public void setGeneratedCheck(){ generatedCheck = !generatedCheck; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void check() {\n\t\t\n\t}", "@Override\n\tpublic void check() {\n\t\t\n\t}", "public abstract void setCheck(Boolean check);", "void check() throws YangException;", "abstract protected boolean checkMethod();", "void check();", "void check();", "void checkValid();", "@Override\n\t...
[ "0.6823829", "0.6823829", "0.65503216", "0.63052994", "0.6215914", "0.6176387", "0.6176387", "0.59935117", "0.593131", "0.5918452", "0.59039", "0.59029275", "0.58809066", "0.58809066", "0.58809066", "0.5774067", "0.5754762", "0.574694", "0.57172525", "0.57026017", "0.5698772"...
0.6408175
3
To String method to get info out of node
@Override public String toString(){ return "the node has: " + children.size() + " the counter is " + counter; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString(){\n return \"Node: \" + data;\n }", "public String printNodeData(Node<T> node){\n return String.valueOf(node.data);\n }", "@Override\n public Object string(Object node) {\n return ((Node<E>) node).element.toString();\n }", "public String getInfoString(...
[ "0.7326153", "0.708378", "0.69515824", "0.6946687", "0.69449306", "0.6895503", "0.68818146", "0.68278223", "0.680483", "0.6801037", "0.6779999", "0.6710065", "0.6664246", "0.66612774", "0.66453105", "0.6639522", "0.6615232", "0.6602645", "0.658746", "0.6586792", "0.6579281", ...
0.0
-1
Fetches the number of searches and unique IPs grouped by date.
@Override public List<Object[]> getStatistics(String owner, StatisticsGroup group) { String groupHQL = this.groupToHQL(group); List<Object[]> list = (List<Object[]>) getHibernateTemplate().findByNamedParam("select count(*), " + "count(distinct ipAddress), " + groupHQL + " " + "from SearchEvent " + "where owner like :owner " + "group by col_2_0_", "owner", owner); return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int countUniqueIPs(){\n ArrayList<String> uniqueIps = new ArrayList<String>();\n for(LogEntry le : records){\n String iprAddr = le.getIpAddress();\n if(!uniqueIps.contains(iprAddr)){\n uniqueIps.add(iprAddr);\n } \n } \n return uniqueIp...
[ "0.59976584", "0.5990726", "0.5773595", "0.5743895", "0.56419003", "0.5485763", "0.5485763", "0.5463687", "0.5438733", "0.5344848", "0.53411216", "0.53121215", "0.52847034", "0.5284569", "0.5277835", "0.52686155", "0.5203704", "0.5186207", "0.5182087", "0.51796216", "0.517962...
0.51440686
24
Fetches the number of searches and unique IPs grouped by date.
@Override public List<Object[]> getStatistics(String owner, StatisticsGroup group, SearchEventType type) { String groupHQL = this.groupToHQL(group); List<Object[]> list = (List<Object[]>) getHibernateTemplate().findByNamedParam("select count(*), " + "count(distinct ipAddress), " + groupHQL + " " + "from SearchEvent " + "where owner like :owner " + "and eventType = :type " + "group by col_2_0_", new String[]{"owner", "type"}, new Object[]{owner, type}); return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int countUniqueIPs(){\n ArrayList<String> uniqueIps = new ArrayList<String>();\n for(LogEntry le : records){\n String iprAddr = le.getIpAddress();\n if(!uniqueIps.contains(iprAddr)){\n uniqueIps.add(iprAddr);\n } \n } \n return uniqueIp...
[ "0.59976584", "0.5990726", "0.5773595", "0.5743895", "0.56419003", "0.5485763", "0.5485763", "0.5463687", "0.5438733", "0.5344848", "0.53411216", "0.53121215", "0.52847034", "0.5284569", "0.5277835", "0.52686155", "0.5203704", "0.5186207", "0.5182087", "0.51796216", "0.517962...
0.49075106
84
Fetches the number of searches and unique IPs grouped by date.
@Override public List<Object[]> getStatistics(String owner, StatisticsGroup group, String from, String to) { String date = parseDateLimit(from, to); String groupHQL = this.groupToHQL(group); List<Object[]> list = (List<Object[]>) getHibernateTemplate().findByNamedParam("select count(*), " + "count(distinct ipAddress), " + groupHQL + " " + "from SearchEvent " + "where owner like :owner " + date + " " + "group by col_2_0_", "owner", owner); return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int countUniqueIPs(){\n ArrayList<String> uniqueIps = new ArrayList<String>();\n for(LogEntry le : records){\n String iprAddr = le.getIpAddress();\n if(!uniqueIps.contains(iprAddr)){\n uniqueIps.add(iprAddr);\n } \n } \n return uniqueIp...
[ "0.59976584", "0.5990726", "0.5773595", "0.5743895", "0.56419003", "0.5485763", "0.5485763", "0.5463687", "0.5438733", "0.5344848", "0.53411216", "0.53121215", "0.52847034", "0.5284569", "0.5277835", "0.52686155", "0.5203704", "0.5186207", "0.51796216", "0.51796216", "0.51722...
0.5182087
18
Fetches the number of searches and unique IPs grouped by date.
@Override public List<Object[]> getStatistics(String owner, StatisticsGroup group, SearchEventType type, String from, String to) { String date = parseDateLimit(from, to); String groupHQL = this.groupToHQL(group); List<Object[]> list = (List<Object[]>) getHibernateTemplate().findByNamedParam("select count(*), " + "count(distinct ipAddress), " + groupHQL + " " + "from SearchEvent " + "where owner like :owner " + "and eventType = :type " + date + " " + "group by col_2_0_", new String[]{"owner", "type"}, new Object[]{owner, type}); return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int countUniqueIPs(){\n ArrayList<String> uniqueIps = new ArrayList<String>();\n for(LogEntry le : records){\n String iprAddr = le.getIpAddress();\n if(!uniqueIps.contains(iprAddr)){\n uniqueIps.add(iprAddr);\n } \n } \n return uniqueIp...
[ "0.59976584", "0.5990726", "0.5773595", "0.5743895", "0.56419003", "0.5485763", "0.5485763", "0.5463687", "0.5438733", "0.5344848", "0.53411216", "0.53121215", "0.52847034", "0.5284569", "0.5277835", "0.52686155", "0.5203704", "0.5186207", "0.5182087", "0.51796216", "0.517962...
0.49777406
56
list is in the form of 'a, bc, cf ...' without the signs
ArrayList<String> createList(String finalInput);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String encode(String List) {\n String tempstr = \"\";\n for (int j = 0; j < List.length(); j++) {\n for (int k = 0; k < basealpha.length; k++) {\n if (List.charAt(j) == basealpha[k]) {\n tempstr += temps[k];\n }\n }\...
[ "0.67180943", "0.66362494", "0.6398341", "0.6319852", "0.63035834", "0.6289468", "0.6286788", "0.62632626", "0.6218996", "0.6175836", "0.6022168", "0.60015243", "0.5998881", "0.5919845", "0.5916582", "0.58689505", "0.5827761", "0.5820795", "0.57784814", "0.5755746", "0.572573...
0.0
-1
get the first elements from the list. such as if a, bc, de... get a, b, d orderedList() will use first elements to organize the list
ArrayList<String> firstElements(ArrayList<String> myList);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <C> C FIRST(LIST<C> L) {\n if ( isNull( L ) ) {\n return null;\n }\n if ( L.iter != null ) {\n if ( L.iter.hasNext() ) {\n return L.iter.next();\n } else {\n L.iter = null;\n return null;\n }\n }\n return L.l...
[ "0.6695777", "0.66250277", "0.6526327", "0.65228903", "0.6495536", "0.6418426", "0.6312067", "0.6268618", "0.62007606", "0.61886185", "0.61755", "0.6107807", "0.6097177", "0.6095397", "0.6079731", "0.60516065", "0.59558916", "0.5953162", "0.5952281", "0.5950774", "0.59492797"...
0.7602385
0
2 lists : myList and theList. myList in form of a, bc, d, ef ... theList first elements of myList is in form of a, b, d , e ... get the second char of elements in myList and change positions in theList. such as 'bc' is for b => c that c comes before b that we rearrange accordingly
ArrayList<String> orderedList(ArrayList<String> unOrderedList);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void swap(List<CustomCharacter> list, int a, int b){\n CustomCharacter temp = getClone(list, a);\n list.set(a, list.get(b));\n list.set(b, temp);\n }", "public static ArrayList<String>\n swap(ArrayList<String> list,int pos1,int pos2)\n { Collections.swap(list,pos1,pos2);\n ...
[ "0.6585525", "0.5955272", "0.58958894", "0.58132106", "0.57896364", "0.55239576", "0.551422", "0.5491185", "0.5458247", "0.5398063", "0.5359817", "0.53564566", "0.5356425", "0.5349882", "0.5336552", "0.5300663", "0.5263866", "0.52572674", "0.5244816", "0.5237473", "0.52355844...
0.5249907
18
Check if dependent on themselves
boolean isDependOnThemselves(List<String> l);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final boolean hasDependents() {\r\n synchronized (f_seaLock) {\r\n return !f_dependents.isEmpty();\r\n }\r\n }", "private boolean isDependentOn(BuildTask dependency, BuildTask dependant) {\n return dependant.getDependencies().contains(dependency);\n }", "public boolean isIndependen...
[ "0.6824807", "0.67103326", "0.6567271", "0.6484047", "0.63030964", "0.6268961", "0.6166119", "0.61609095", "0.6151998", "0.6151524", "0.60313946", "0.60216403", "0.5961653", "0.5957138", "0.59254766", "0.59106046", "0.58899647", "0.5887326", "0.58754414", "0.58754015", "0.586...
0.626372
6
Check for circular dependencies
void checkCircular(List<String> myList);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkCircular(AlfClass alfClass) throws CircularParentException {\r\n\t\tList<AlfClass> parents = getParents();\r\n\t\tfor (AlfClass ac : parents) {\r\n\t\t\tif (ac.equals(alfClass))\r\n\t\t\t\tthrow new CircularParentException();\r\n\t\t\tac.checkCircular(alfClass);\r\n\t\t}\r\n\t}", "private void ...
[ "0.72775054", "0.66153425", "0.6373281", "0.6233785", "0.6141149", "0.61370987", "0.6101231", "0.5949259", "0.5745474", "0.5625306", "0.56070596", "0.55898136", "0.55618584", "0.5552403", "0.55376446", "0.55187464", "0.5479752", "0.5448875", "0.5418887", "0.54090506", "0.5385...
0.51937944
32
check last char of an element with first char of the other
boolean checkChar(String s1, String s2);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic boolean matches(String first, String last) {\n\t\treturn false;\r\n\t}", "public boolean frontAgain(String str) {\r\n if (str.length() > 1 && str.substring(0, 2).equals(str.substring(str.length() - 2))) {\r\n return true;\r\n }\r\n return false;\r\n }", "@Test\n public v...
[ "0.6344779", "0.61937106", "0.61911774", "0.6116392", "0.597251", "0.5935801", "0.5863016", "0.58590084", "0.58565307", "0.5821898", "0.58019614", "0.5747659", "0.5736291", "0.57350117", "0.56756145", "0.5670188", "0.5614359", "0.5597057", "0.5580708", "0.5571624", "0.5535252...
0.5263723
41
check if string starts and ends with same letter
boolean isCircular(String s);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean hasA( String w, String letter )\r\n { return w.indexOf(letter) != -1;\r\n }", "public static boolean hasA( String w, String letter ) \n {\n return (w.indexOf(letter) > -1);\n }", "@Override\r\n\tpublic boolean matches(String first, String last) {\n\t\treturn false;\r\n\t}",...
[ "0.6827817", "0.6799004", "0.6746815", "0.66848207", "0.66333103", "0.66052395", "0.65833044", "0.65560496", "0.65424097", "0.64947224", "0.6486262", "0.64571595", "0.6447897", "0.64330083", "0.6417566", "0.6413365", "0.6404891", "0.6397254", "0.62812", "0.62644374", "0.62553...
0.0
-1
read the input from console and call createList method to create a list in form of ab, c ,d , ef .... single element for single input line, double for double
String consoleInput();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static ArrayList<Double> manualInput() {\n\t\tArrayList<Double> lineData = new ArrayList<Double>();\n\t\t// Cumulative data\n\t\tArrayList<Double> cumData = new ArrayList<Double>();\n\t\tSystem.out.println(MANUAL_MSG);\n\t\tin = new Scanner(System.in);\n\t\twhile (true) {\n\t\t\tString line = in.nextLine()...
[ "0.6572415", "0.6501005", "0.618849", "0.61647713", "0.6120314", "0.6105987", "0.6055772", "0.6052319", "0.5973635", "0.5970861", "0.5946384", "0.59173584", "0.59097546", "0.5815159", "0.57664895", "0.57170296", "0.5703371", "0.5695636", "0.5687495", "0.568222", "0.5655935", ...
0.0
-1
When the draggableEllipse (the head) is clicked, it changes its color to the one saved in the color holder(which is the color of the button clicked)
public void mouseClicked(MouseEvent e) { this.setColor(colorHolder.getColor()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mousePressed(MouseEvent e){\n if(e.getSource() == cmUI) {\n ColorMixerModel.ColorItem tmpC = selectedColor(e.getPoint());\n if(tmpC == null) {\n // if clicked on a empty space\n // create a new color\n // or draw a trace to delet...
[ "0.70191383", "0.700711", "0.6810776", "0.6662906", "0.66531813", "0.6636769", "0.6635478", "0.6601053", "0.65315795", "0.6528011", "0.65145355", "0.6488741", "0.64758223", "0.6461282", "0.64463013", "0.6439536", "0.64202636", "0.63836515", "0.63754714", "0.6335455", "0.63340...
0.7187559
0
Implemented methods of the interface
@Override public void move(int dx, int dy) { // TODO Auto-generated method stub co.move(dx, dy); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void interfaceMethod() {\n\t\tSystem.out.println(\"overriden method from interface\");\t\t\r\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "public Object _get_interface()\n {\n throw new NO_IMPLEMENT(reason);\n }", "@Override\n\tpublic boolean isImplemented() {\n\t\tretur...
[ "0.7090655", "0.66611", "0.66407233", "0.6574496", "0.6470494", "0.6470494", "0.6455723", "0.64511675", "0.6441801", "0.6430225", "0.64260423", "0.6421914", "0.64085364", "0.6391605", "0.63853234", "0.6375566", "0.6362583", "0.62626183", "0.6257456", "0.6255159", "0.6226624",...
0.0
-1
TODO Autogenerated method stub
@Override public void mousePressed(MouseEvent e) { co.mousePressed(e); }
{ "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 mouseDragged(MouseEvent e) { co.mouseDragged(e); }
{ "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
Don't modify this constructor
public Reptile() { // Providing default constructor System.out.println( " Reptile() - If this called then something is wrong"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "private Rekenhulp()\n\t{\n\t}", "public static void copyConstructor(){\n\t}", "private TMCourse() {\n\t}", "Reproducible newInstance();", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n ...
[ "0.73842746", "0.73810446", "0.72206074", "0.70535505", "0.7001785", "0.696136", "0.695235", "0.6844648", "0.68402874", "0.67700243", "0.6764537", "0.6728556", "0.6728123", "0.6686466", "0.66853225", "0.6684632", "0.66710275", "0.6667287", "0.66433215", "0.6604595", "0.659543...
0.0
-1
You should not need any additional field variables This sets the classification of the animal to Reptile
public Reptile(String spec, String crazy) { super(spec, crazy); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setClassification(String classification) {\n this.classification = classification;\n }", "AnimalSpecific(String category,String name,String type){\n\t\tsuper(category);\n\t\tanimalName = name;\n\t\tanimalType = type;\n\t}", "public void setClassification(String classification) {\n this.c...
[ "0.61177623", "0.6047034", "0.5994793", "0.5887884", "0.5739459", "0.56976473", "0.569743", "0.563308", "0.55980825", "0.55820656", "0.5566337", "0.5565883", "0.5553645", "0.5495441", "0.54773986", "0.5472798", "0.5455889", "0.54345405", "0.5382479", "0.5373244", "0.5300894",...
0.5214928
25
ExecutorService es = Executors.newFixedThreadPool(3);
public static void main(String[] args) { ExecutorService es = Executors.newCachedThreadPool(); es.execute(new Task(65)); es.execute(new Task(5)); System.out.println("结束执行!"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void testES() {\n ExecutorService es = Executors.newFixedThreadPool(2);\n for (int i = 0; i < 10; i++)\n es.execute(new TestTask());\n }", "public static void main(String[] args) {\n\t\tExecutorService pool = Executors.newFixedThreadPool(3);\n\t\t//ExecutorService pool =...
[ "0.7207475", "0.7040441", "0.6882216", "0.68595976", "0.67714846", "0.6763751", "0.6755664", "0.6676343", "0.6669979", "0.65944636", "0.659426", "0.65760654", "0.65651524", "0.6554811", "0.6550819", "0.6548148", "0.6515534", "0.6468423", "0.6446586", "0.6432302", "0.64169997"...
0.67699695
5
/ marketItemList.add(new MarketItem("Selling PS4", 100, "Gaming", "New PS4 for sell", R.drawable.ps4)); marketItemList.add(new MarketItem("Selling PS4", 140, "Gaming", "New PS4 for sell", R.drawable.ps4)); marketItemList.add(new MarketItem("Selling PS4", 170, "Gaming", "New PS4 for sell", R.drawable.ps4)); marketItemList.add(new MarketItem("Selling PS4", 90, "Gaming", "New PS4 for sell", R.drawable.ps4)); marketItemList.add(new MarketItem("Selling PS4", 120, "Gaming", "New PS4 for sell"));
public void onViewCreated(View view, Bundle savedInstanceState) { market_recycler_view = view.findViewById(R.id.recycler_market_items_list); marketItemAdapter = new MarketRecyclerViewAdapter(marketItemList, getContext()); gridLayoutManager = new GridLayoutManager(getContext(), calculateNoOfColumns(getContext())); market_recycler_view.setLayoutManager(gridLayoutManager); market_recycler_view.setAdapter(marketItemAdapter); marketItemAdapter.notifyDataSetChanged(); //click event and pass data. marketItemAdapter.SetOnItemClickListener(new MarketRecyclerViewAdapter.OnItemClickListener() { @Override public void onItemClick(int position) { MarketItem marketItem = marketItemList.get(position); Intent intent = new Intent(getActivity(), MarketItemViewActivity.class); intent.putExtra("clickedItem", marketItem); startActivity(intent); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addItem() {\n\n ItemBean bean2 = new ItemBean();\n int drawableId2 = getResources().getIdentifier(\"ic_swrl\", \"drawable\", this.getPackageName());\n bean2.setAddress(drawableId2);\n bean2.setName(getResources().getString(R.string.swrl));\n itemList.add(bean2);\n\n ...
[ "0.66310626", "0.6581639", "0.6367955", "0.6224861", "0.6163382", "0.6082683", "0.6059808", "0.6018835", "0.5996975", "0.5982862", "0.5953828", "0.59523284", "0.59150827", "0.58299315", "0.5829695", "0.580866", "0.58068097", "0.5796784", "0.5783679", "0.57824636", "0.57823396...
0.0
-1
TODO implementar el tomar una foto;
public void toTakeAPicture(View view) { requestCameraPermissions(); Intent launchCamera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(launchCamera, Constants.CAM_REQUEST); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tvoid postarFoto() {\n\n\t}", "fotos(){}", "public abstract String getFotoPath();", "private BufferedImage sacaFoto(String fo){\n File input = null;\n BufferedImage image = null;\n try{\n input = new File(fo);\n image = ImageIO.read(input);\n }cat...
[ "0.70834243", "0.6990997", "0.6899527", "0.68788064", "0.66509145", "0.64934415", "0.6302587", "0.62834674", "0.6280162", "0.62615854", "0.62583476", "0.62441254", "0.62322325", "0.61793077", "0.61464405", "0.60268193", "0.6015668", "0.6011957", "0.5978236", "0.59565467", "0....
0.0
-1
Creates new form LoginWindow2
public LoginWindow2() { initComponents(); setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("/photo/bus-icon-17.png"))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Login() \n {\n super();\n create();\n this.setVisible(true);\n initComponents();\n }", "private void genLoginGui(){\n loginFrame = new JFrame(\"Log in\");\n\n // login panel, inputs name\n loginPanel = new JPanel();\n loginPanel.setLayout(new FlowLay...
[ "0.73108405", "0.7250427", "0.7228806", "0.7111948", "0.69893456", "0.6951272", "0.6926374", "0.69098336", "0.6900821", "0.6839584", "0.68127686", "0.680591", "0.6773726", "0.6772685", "0.67710567", "0.6762868", "0.67583513", "0.6748397", "0.6741646", "0.67412096", "0.6737504...
0.0
-1
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel2 = new javax.swing.JPanel(); jPanel1 = new javax.swing.JPanel(); jLabel3 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); userLogin_btn = new javax.swing.JButton(); AuthLogin_btn = new javax.swing.JButton(); jLabel4 = new javax.swing.JLabel(); create_btn = new javax.swing.JButton(); jLabel5 = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jButton6 = new javax.swing.JButton(); jButton8 = new javax.swing.JButton(); AuthorityLogin_btn = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Welcome to CityBus E-ticketing"); setName("welcome_frame"); // NOI18N setResizable(false); jPanel2.setBackground(new java.awt.Color(255, 255, 255)); jPanel1.setBackground(new java.awt.Color(102, 0, 153)); jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/photo/bus-icon-17.png"))); // NOI18N jLabel2.setFont(new java.awt.Font("Calibri", 1, 24)); // NOI18N jLabel2.setForeground(new java.awt.Color(255, 255, 255)); jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel2.setText("City Bus E-ticketing"); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(102, 102, 102) .addComponent(jLabel3)) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(21, 21, 21) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 288, javax.swing.GroupLayout.PREFERRED_SIZE)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(88, 88, 88) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel2) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); userLogin_btn.setBackground(new java.awt.Color(255, 255, 255)); userLogin_btn.setText("User"); userLogin_btn.setToolTipText(""); userLogin_btn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { userLogin_btnActionPerformed(evt); } }); AuthLogin_btn.setBackground(new java.awt.Color(255, 255, 255)); AuthLogin_btn.setText("Employee"); AuthLogin_btn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { AuthLogin_btnActionPerformed(evt); } }); jLabel4.setBackground(new java.awt.Color(255, 255, 255)); jLabel4.setFont(new java.awt.Font("Calibri", 1, 18)); // NOI18N jLabel4.setForeground(new java.awt.Color(153, 0, 204)); jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel4.setText("Login As.."); create_btn.setBackground(new java.awt.Color(255, 255, 255)); create_btn.setText("Create Account"); create_btn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { create_btnActionPerformed(evt); } }); jLabel5.setBackground(new java.awt.Color(255, 255, 255)); jLabel5.setFont(new java.awt.Font("Calibri", 1, 18)); // NOI18N jLabel5.setForeground(new java.awt.Color(153, 0, 204)); jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel5.setText("New User?.."); jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/photo/profile-icon-29.png"))); // NOI18N jButton1.setBackground(new java.awt.Color(102, 0, 153)); jButton1.setForeground(new java.awt.Color(255, 255, 255)); jButton1.setText("About "); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jButton2.setBackground(new java.awt.Color(102, 0, 153)); jButton2.setForeground(new java.awt.Color(255, 255, 255)); jButton2.setText("Help"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jButton6.setBackground(new java.awt.Color(102, 0, 153)); jButton6.setForeground(new java.awt.Color(255, 255, 255)); jButton6.setText("Contact"); jButton6.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton6ActionPerformed(evt); } }); jButton8.setBackground(new java.awt.Color(102, 0, 153)); jButton8.setForeground(new java.awt.Color(255, 255, 255)); jButton8.setText("Close"); jButton8.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton8ActionPerformed(evt); } }); AuthorityLogin_btn.setBackground(new java.awt.Color(255, 255, 255)); AuthorityLogin_btn.setText("Authority"); AuthorityLogin_btn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { AuthorityLogin_btnActionPerformed(evt); } }); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29, Short.MAX_VALUE) .addComponent(jButton1) .addGap(10, 10, 10) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(10, 10, 10) .addComponent(jButton6) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jButton8, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(27, 27, 27)) .addGroup(jPanel2Layout.createSequentialGroup() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(82, 82, 82) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(create_btn, javax.swing.GroupLayout.PREFERRED_SIZE, 242, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(41, 41, 41)))) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(80, 80, 80) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(userLogin_btn, javax.swing.GroupLayout.PREFERRED_SIZE, 242, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(AuthLogin_btn, javax.swing.GroupLayout.PREFERRED_SIZE, 242, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(32, 32, 32) .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(AuthorityLogin_btn, javax.swing.GroupLayout.PREFERRED_SIZE, 242, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addContainerGap(42, Short.MAX_VALUE)) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(100, 100, 100) .addComponent(jLabel1) .addGap(0, 0, Short.MAX_VALUE)))) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(1, 1, 1) .addComponent(create_btn, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(userLogin_btn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(AuthLogin_btn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(AuthorityLogin_btn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 22, Short.MAX_VALUE) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton1) .addComponent(jButton2) .addComponent(jButton6) .addComponent(jButton8)) .addContainerGap()) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.7320782", "0.72918797", "0.72918797", "0.72918797", "0.728645", "0.72498447", "0.7214492", "0.720934", "0.7197145", "0.71912014", "0.71852076", "0.7160113", "0.71487373", "0.70943654", "0.70820624", "0.7058153", "0.69883204", "0.6978216", "0.69558746", "0.6955715", "0.6945...
0.0
-1
//Configure Log4J org.apache.log4j.PropertyConfigurator.configure( System.getProperty("log4jConfigFile", "log4j.properties"));
public static void main(String[] args) throws Exception { if (System.getSecurityManager() == null) { System.setSecurityManager(new java.rmi.RMISecurityManager()); } try { QuartzServer server = new QuartzServer(); if (args.length == 0) { server.serve( new org.quartz.impl.StdSchedulerFactory(), false); } else if (args.length == 1 && args[0].equalsIgnoreCase("console")) { server.serve(new org.quartz.impl.StdSchedulerFactory(), true); } else { System.err.println("\nUsage: QuartzServer [console]"); } } catch (Exception e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void getLoggerConfiguration() {\n\t\tPropertyConfigurator.configure(System.getProperty(\"user.dir\")+ \"\\\\Config\\\\log4j.properties\");\n\t}", "public void init(String log4JPropertiesPath) throws IOException{\n\t\t\n\t\t//LoggerServices.build().disableApacheCommonsLogging();\n\t\t\n\t\t//By defa...
[ "0.8000291", "0.72849727", "0.6775932", "0.6673975", "0.662765", "0.661524", "0.6597368", "0.63944346", "0.6250047", "0.6227519", "0.62193584", "0.61936706", "0.61893207", "0.6168739", "0.6158823", "0.615173", "0.60764253", "0.606848", "0.6064966", "0.60379905", "0.60248435",...
0.0
-1
mLayoutUtil.drawViewRBLayout(rel_login_account, 0, 80, 30, 30, 16, 0);
@Override protected void initLocation() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private View createAccountLayout() {\r\n\t\tLinearLayout accountLayout = new LinearLayout(getContext());\r\n\t\tLayoutParams aclp = new LayoutParams(android.view.ViewGroup.LayoutParams.WRAP_CONTENT,\r\n\t\t\t\tandroid.view.ViewGroup.LayoutParams.WRAP_CONTENT, 3);\r\n\t\taccountLayout.setOrientation(VERTICAL);\r\n\...
[ "0.64787763", "0.6229965", "0.60043055", "0.59562886", "0.58719367", "0.5746409", "0.5725568", "0.56916153", "0.5682768", "0.5660138", "0.5610778", "0.56045514", "0.5604129", "0.55874014", "0.5573364", "0.55593735", "0.55581933", "0.5549252", "0.55405056", "0.55360806", "0.55...
0.0
-1
TODO Autogenerated method stub
@Override public void onPageStarted(WebView view, String url, Bitmap favicon) { super.onPageStarted(view, url, favicon); LOG("开始加载url:" + url); if (!firstLoad) { firstLoad = true; // iv_webview_hint.setBackgroundDrawable(mContext.getResources().getDrawable(R.drawable.iv_web_loading)); // iv_webview_hint.setVisibility(View.VISIBLE); setLoading(true); } else { // iv_webview_hint.setVisibility(View.GONE); setLoading(false); } }
{ "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 WebResourceResponse shouldInterceptRequest(WebView view, WebResourceRequest request) { LOG("shouldInterceptRequest:"); return super.shouldInterceptRequest(view, request); }
{ "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
For Android < 3.0
public void openFileChooser(ValueCallback<Uri> uploadMsg) { LOG("MyWebChromeClient openFileChooser <3.0"); openFileChooser(uploadMsg, ""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "android.view.View mo12148b();", "public Lollipop() {\r\n\t\t}", "public static String _activity_create(boolean _firsttime) throws Exception{\nmostCurrent._activity.LoadLayout(\"lay_mosquito_Main\",mostCurrent.activityBA);\n //BA.debugLineNum = 61;BA.debugLine=\"utilidades.ResetUserFontScale(Activity)\";\nmost...
[ "0.5901667", "0.58170867", "0.5707641", "0.5588641", "0.5538828", "0.5508973", "0.5484112", "0.5479452", "0.54759467", "0.5441436", "0.5409972", "0.539688", "0.5374809", "0.53489876", "0.53424126", "0.53424126", "0.533854", "0.5337525", "0.53185487", "0.53184056", "0.53170615...
0.0
-1
For Android > 4.1.1
public void openFileChooser(ValueCallback<Uri> uploadMsg, String acceptType, String capture) { LOG("MyWebChromeClient openFileChooser >4.1"); openFileChooser(uploadMsg, acceptType); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "android.view.View mo12148b();", "public Lollipop() {\r\n\t\t}", "public static String _activity_create(boolean _firsttime) throws Exception{\nmostCurrent._activity.LoadLayout(\"lay_mosquito_Main\",mostCurrent.activityBA);\n //BA.debugLineNum = 61;BA.debugLine=\"utilidades.ResetUserFontScale(Activity)\";\nmost...
[ "0.5937688", "0.57205176", "0.56909233", "0.5620612", "0.56066453", "0.5600314", "0.5570139", "0.55418557", "0.55147237", "0.54899496", "0.548825", "0.54610276", "0.54271877", "0.5424119", "0.5406601", "0.5374384", "0.53673816", "0.5346894", "0.5346374", "0.5340393", "0.53277...
0.0
-1
TODO Autogenerated method stub
@Override public boolean onJsAlert(WebView view, String url, String message, JsResult result) { return super.onJsAlert(view, url, message, result); }
{ "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
/ access modifiers changed from: 0000
public void runFinally() { if (compareAndSet(0, 1)) { try { this.onFinally.run(); } catch (Throwable th) { Exceptions.throwIfFatal(th); RxJavaPlugins.onError(th); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Member mo23408O();", "@Override\n public void func_104112_b() {\n \n }", "public final void mo51373a() {\n }", "@Override\n protected void prot() {\n }", "public void m23075a() {\n }", "@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}", "public void m...
[ "0.65168345", "0.6417889", "0.6403412", "0.6346675", "0.6299906", "0.62951195", "0.6244629", "0.6228537", "0.620437", "0.6192846", "0.6189669", "0.61808765", "0.6173851", "0.6169742", "0.616948", "0.6162881", "0.6150504", "0.6149917", "0.61402553", "0.6134384", "0.6133215", ...
0.0
-1
/ access modifiers changed from: protected
public void subscribeActual(SingleObserver<? super T> singleObserver) { this.source.subscribe(new DoFinallyObserver(singleObserver, this.onFinally)); }
{ "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
TODO Autogenerated method stub
public void Success(ClientProxy container, Map<String, String> request) throws UIException { }
{ "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
Returns this configuration as an XML document with the specified encoding.
public String toXml( String inEncoding ) { Document doc = DocumentHelper.createDocument(); Element root = doc.addElement(getName()); appendXml(this,root); StringWriter text = new StringWriter(); OutputFormat format = OutputFormat.createPrettyPrint(); format.setEncoding(inEncoding); XMLWriter out = new XMLWriter(text, format); try { out.write(doc); } catch (IOException ex) { throw new OpenEditRuntimeException(ex); } return text.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toXML() {\n StringWriter stringWriter = new StringWriter();\n PrintWriter printWriter = new PrintWriter(stringWriter, true);\n toXML(printWriter);\n return stringWriter.toString();\n }", "public abstract String toXML();", "public abstract String toXML();", "public abstract String t...
[ "0.6015232", "0.5972729", "0.5972729", "0.5972729", "0.59410715", "0.58399594", "0.58385885", "0.5783746", "0.57410514", "0.57309145", "0.57154083", "0.5651922", "0.56397885", "0.5632343", "0.5630382", "0.56096685", "0.560423", "0.5603105", "0.56005734", "0.5597733", "0.55843...
0.66860527
0
Method should be avoided due to slow performance without shared SaxReader
public void readXML(Reader inReader) { XmlUtil util = new XmlUtil(); Element root = util.getXml(inReader, "UTF-8"); populate(root); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void readFromXMLFile(XMLStreamReader reader) throws XMLStreamException {\n while (reader.hasNext())\n {\n int eventType= reader.next();\n switch (eventType){\n case XMLStreamReader.START_ELEMENT:\n String elemName=reader.getLocalName();\...
[ "0.59959966", "0.5822711", "0.58163303", "0.5815045", "0.5804523", "0.579632", "0.57807606", "0.57778746", "0.5759619", "0.57512385", "0.57476425", "0.5745363", "0.5739265", "0.5707015", "0.57025", "0.5696959", "0.5696959", "0.5696959", "0.5696959", "0.5694098", "0.5686062", ...
0.0
-1
note: needs replacement in list, else would use earlier ones
private void moveMatchingNodeToNextElement(Node tmp) { for (int i = 0; i < ALL_LINKED_LISTS.size();i++) { Node next = ALL_LINKED_LISTS.get(i); if (tmp.equals(next)) { next = next.next; ALL_LINKED_LISTS.put(i, next); break; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void modify(List listString){\n\t}", "public static void replace (Object[] list, Object original, Object replacement)\n {\n // You will write this method in lab.\n \t\n \tfor(int pos = 0; pos < list.length; pos++)\n \t\tif(list[pos] == original)\n \t\t\tlist[pos] = replacement;\n ...
[ "0.6468124", "0.6340918", "0.6198002", "0.6175946", "0.61751324", "0.606929", "0.5978231", "0.59127116", "0.57405317", "0.5705047", "0.5699267", "0.56664", "0.5646615", "0.5643913", "0.5640143", "0.56063974", "0.55755514", "0.5573174", "0.55617696", "0.54801035", "0.54610986"...
0.0
-1
===== older nonoptimized solutions =====
private Node getMinimumOld() { Node tmp = null; // TODO: optimize by putting in 1 list and // provide 'starting offset' for remaining nodes to find mimimum // note: see new getMinimum method above if (null != nodeA) { tmp = nodeA; if (null != nodeB && tmp.data > nodeB.data) { tmp = nodeB; } if (null != nodeC && tmp.data > nodeC.data) { tmp = nodeC; } } else if (null != nodeB) { tmp = nodeB; if (null != nodeC && tmp.data > nodeC.data) { tmp = nodeC; } } else if (null != nodeC) { tmp = nodeC; } // System.out.println(tmp); if (null == tmp ) { // terminating condition return null; } if (tmp.equals(nodeA)) { nodeA = nodeA.next; } if (tmp.equals(nodeB)) { nodeB = nodeB.next; } if (tmp.equals(nodeC)) { nodeC = nodeC.next; } System.out.println(tmp.data); return tmp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\n pairsSum();\n\n printAllSubArrays();\n\n tripletZero();\n\n // int[][] sub = subsets();\n\n PairsSum sum = new PairsSum();\n int[] arr = { 10, 1, 2, 3, 4, 5, 6, 1 };\n boolean flag = sum.almostIncreasingSequence(arr);\n ...
[ "0.5616457", "0.53949535", "0.533072", "0.52935684", "0.52770305", "0.52656144", "0.5230417", "0.5205257", "0.5164066", "0.5142903", "0.51190174", "0.511304", "0.51093405", "0.50853395", "0.5078818", "0.5075085", "0.507399", "0.50631136", "0.5031556", "0.5026719", "0.50266397...
0.0
-1
It may be better to support prefix optimization as a post processor protected boolean optimizePrefixes;
public SparqlParserConfig clone() { SparqlParserConfig result = new SparqlParserConfig(syntax, prologue.copy(), baseURI, sharedPrefixes); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isPrefix() { return prefix; }", "public boolean isPrefix() {\n return prefix;\n }", "public void setPrefix(boolean prefix) {\n this.prefix = prefix;\n }", "boolean setPrefix(String prefix);", "public boolean startsWith(String prefix) {\n int length = prefix.len...
[ "0.7126136", "0.6848974", "0.6787496", "0.6605637", "0.6493992", "0.6363894", "0.61735684", "0.6170884", "0.6167455", "0.6148553", "0.61144614", "0.6087707", "0.6070131", "0.6065824", "0.6061941", "0.60514426", "0.60410154", "0.60356176", "0.6032103", "0.6028925", "0.6027788"...
0.0
-1
Parse sparql statements as given without resolving relative IRIs Sets the base URL to an empty string and configures the iri resolver without a base.
public SparqlParserConfig parseAsGiven() { setIrixResolverAsGiven(); setBaseURI(""); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void init() throws JRException {\n if (result != null) {\n return;\n }\n if (endpointUrl == null) {\n throw new JRException(\"Endpoint URLs can't be null\");\n }\n if (sparqlStatement == null || sparqlStatement.length() == 0) {\n throw new...
[ "0.54429656", "0.5373587", "0.4996742", "0.49618423", "0.49618047", "0.48665795", "0.48391676", "0.48264715", "0.47948122", "0.47638422", "0.4719335", "0.47177625", "0.47127715", "0.4681459", "0.4655066", "0.46010706", "0.4598608", "0.4590565", "0.45861548", "0.4585318", "0.4...
0.52255094
2
Create contents of the window.
protected void createContents() { register Register = new register(); RegisterDAOImpl RDI = new RegisterDAOImpl(); load = new Shell(); load.setSize(519, 370); load.setText("XX\u533B\u9662\u6302\u53F7\u7CFB\u7EDF"); load.setLayout(new FormLayout()); Label name = new Label(load, SWT.NONE); FormData fd_name = new FormData(); fd_name.top = new FormAttachment(20); fd_name.left = new FormAttachment(45, -10); name.setLayoutData(fd_name); name.setFont(SWTResourceManager.getFont("微软雅黑", 12, SWT.NORMAL)); name.setText("\u59D3\u540D"); Label subjet = new Label(load, SWT.NONE); FormData fd_subjet = new FormData(); fd_subjet.left = new FormAttachment(44); fd_subjet.top = new FormAttachment(50); subjet.setLayoutData(fd_subjet); subjet.setFont(SWTResourceManager.getFont("微软雅黑", 12, SWT.NORMAL)); subjet.setText("\u79D1\u5BA4"); Label doctor = new Label(load, SWT.NONE); FormData fd_doctor = new FormData(); fd_doctor.top = new FormAttachment(60); fd_doctor.left = new FormAttachment(45, -10); doctor.setLayoutData(fd_doctor); doctor.setFont(SWTResourceManager.getFont("微软雅黑", 12, SWT.NORMAL)); doctor.setText("\u533B\u751F"); nametext = new Text(load, SWT.BORDER); nametext.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND)); nametext.setFont(SWTResourceManager.getFont("微软雅黑", 12, SWT.NORMAL)); FormData fd_nametext = new FormData(); fd_nametext.right = new FormAttachment(50, 94); fd_nametext.top = new FormAttachment(20); fd_nametext.left = new FormAttachment(50); nametext.setLayoutData(fd_nametext); Label titlelabel = new Label(load, SWT.NONE); FormData fd_titlelabel = new FormData(); fd_titlelabel.right = new FormAttachment(43, 176); fd_titlelabel.top = new FormAttachment(10); fd_titlelabel.left = new FormAttachment(43); titlelabel.setLayoutData(fd_titlelabel); titlelabel.setFont(SWTResourceManager.getFont("楷体", 18, SWT.BOLD)); titlelabel.setText("XX\u533B\u9662\u95E8\u8BCA\u6302\u53F7"); Label label = new Label(load, SWT.NONE); FormData fd_label = new FormData(); fd_label.top = new FormAttachment(40); fd_label.left = new FormAttachment(44, -10); label.setLayoutData(fd_label); label.setFont(SWTResourceManager.getFont("微软雅黑", 12, SWT.NORMAL)); label.setText("\u6302\u53F7\u8D39"); costtext = new Text(load, SWT.BORDER); costtext.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND)); costtext.setFont(SWTResourceManager.getFont("微软雅黑", 12, SWT.NORMAL)); FormData fd_costtext = new FormData(); fd_costtext.right = new FormAttachment(nametext, 0, SWT.RIGHT); fd_costtext.top = new FormAttachment(40); fd_costtext.left = new FormAttachment(50); costtext.setLayoutData(fd_costtext); Label type = new Label(load, SWT.NONE); FormData fd_type = new FormData(); fd_type.top = new FormAttachment(30); fd_type.left = new FormAttachment(45, -10); type.setLayoutData(fd_type); type.setFont(SWTResourceManager.getFont("微软雅黑", 12, SWT.NORMAL)); type.setText("\u7C7B\u578B"); Combo typecombo = new Combo(load, SWT.NONE); typecombo.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND)); typecombo.setFont(SWTResourceManager.getFont("微软雅黑", 12, SWT.NORMAL)); FormData fd_typecombo = new FormData(); fd_typecombo.right = new FormAttachment(nametext, 0, SWT.RIGHT); fd_typecombo.top = new FormAttachment(30); fd_typecombo.left = new FormAttachment(50); typecombo.setLayoutData(fd_typecombo); typecombo.setText("\u95E8\u8BCA\u7C7B\u578B"); typecombo.add("普通门诊",0); typecombo.add("专家门诊",1); MySelectionListener3 ms3 = new MySelectionListener3(typecombo,costtext); typecombo.addSelectionListener(ms3); Combo doctorcombo = new Combo(load, SWT.NONE); doctorcombo.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND)); doctorcombo.setFont(SWTResourceManager.getFont("微软雅黑", 12, SWT.NORMAL)); FormData fd_doctorcombo = new FormData(); fd_doctorcombo.right = new FormAttachment(nametext, 0, SWT.RIGHT); fd_doctorcombo.top = new FormAttachment(60); fd_doctorcombo.left = new FormAttachment(50); doctorcombo.setLayoutData(fd_doctorcombo); doctorcombo.setText("\u9009\u62E9\u533B\u751F"); Combo subject = new Combo(load, SWT.NONE); subject.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND)); subject.setFont(SWTResourceManager.getFont("微软雅黑", 12, SWT.NORMAL)); fd_subjet.right = new FormAttachment(subject, -6); fd_subjet.top = new FormAttachment(subject, -1, SWT.TOP); FormData fd_subject = new FormData(); fd_subject.right = new FormAttachment(nametext, 0, SWT.RIGHT); fd_subject.top = new FormAttachment(50); fd_subject.left = new FormAttachment(50); subject.setLayoutData(fd_subject); subject.setText("\u79D1\u5BA4\uFF1F"); subject.add("神经内科", 0); subject.add("呼吸科", 1); subject.add("泌尿科", 2); subject.add("放射科", 3); subject.add("五官", 4); MySelectionListener myselection = new MySelectionListener(i,subject,doctorcombo,pdtabledaoimpl); subject.addSelectionListener(myselection); MySelectionListener2 ms2 = new MySelectionListener2(subject,doctorcombo,Register,nametext,RDI); doctorcombo.addSelectionListener(ms2); Button surebutton = new Button(load, SWT.NONE); FormData fd_surebutton = new FormData(); fd_surebutton.top = new FormAttachment(70); fd_surebutton.left = new FormAttachment(44); surebutton.setLayoutData(fd_surebutton); surebutton.setFont(SWTResourceManager.getFont("楷体", 12, SWT.BOLD)); surebutton.setText("\u786E\u5B9A"); surebutton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { Register register = new Register(); PatientDAOImpl patientdaoimpl = new PatientDAOImpl(); /* registerdaoimpl.Save(Register);*/ PatientInfo patientinfo = null; patientinfo = patientdaoimpl.findByname(nametext.getText()); if(patientinfo.getId() > 0 ){ MessageBox messagebox = new MessageBox(load); messagebox.setMessage("挂号成功!"); messagebox.open(); } else{ MessageBox messagebox = new MessageBox(load); messagebox.setMessage("此用户不存在,请先注册"); messagebox.open(); load.dispose(); register.open(); } } }); Button registerbutton = new Button(load, SWT.NONE); FormData fd_registerbutton = new FormData(); fd_registerbutton.top = new FormAttachment(70); fd_registerbutton.left = new FormAttachment(53); registerbutton.setLayoutData(fd_registerbutton); registerbutton.setFont(SWTResourceManager.getFont("楷体", 12, SWT.BOLD)); registerbutton.setText("\u6CE8\u518C"); registerbutton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { Register register = new Register(); load.close(); register.open(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(\"SWT Application\");\r\n\r\n\t}", "void createWindow();", "private void createContents() {\r\n\t\tshell = new Shell(getParent(), SWT.TITLE);\r\n\r\n\t\tgetParent().setEnabled(false);\r\n\r\n\t\ts...
[ "0.78568476", "0.770408", "0.77024", "0.75711876", "0.747748", "0.7446512", "0.7418617", "0.74041", "0.7305366", "0.72465086", "0.7217618", "0.7171157", "0.71683043", "0.7142865", "0.71213007", "0.71075344", "0.7094211", "0.7083325", "0.707515", "0.69683087", "0.69569373", ...
0.6324279
76
TODO Autogenerated method stub
public void widgetSelected(SelectionEvent e) { doctorcombo.removeAll(); int i = subject.getSelectionIndex(); if(i == 0){ int j = pdtabledaoimpl.findByname1(subject.getItem(0)); for (int k = 0; k < j; k++){ String ss = pdtabledaoimpl.findByname2(subject.getItem(0),j,k); doctorcombo.add(ss, k); } } else if(i == 1){ int j = pdtabledaoimpl.findByname1(subject.getItem(1)); for (int k = 0; k < j; k++){ String ss = pdtabledaoimpl.findByname2(subject.getItem(1),j,k); doctorcombo.add(ss, k); } } else if(i == 2){ int j = pdtabledaoimpl.findByname1(subject.getItem(2)); for(int k = 0; k< j; k++){ String ss = pdtabledaoimpl.findByname2(subject.getItem(2),j,k); doctorcombo.add(ss, k); } } else if(i == 3){ int j = pdtabledaoimpl.findByname1(subject.getItem(3)); for(int k = 0; k< j; k++){ String ss = pdtabledaoimpl.findByname2(subject.getItem(3),j,k); doctorcombo.add(ss, k); } } else if(i == 4){ int j = pdtabledaoimpl.findByname1(subject.getItem(4)); for(int k = 0; k< j; k++){ String ss = pdtabledaoimpl.findByname2(subject.getItem(4),j,k); doctorcombo.add(ss, k); } } }
{ "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 widgetSelected(SelectionEvent e) { int i = doctorcombo.getSelectionIndex(); int j = subject.getSelectionIndex(); Register.setName(nametext.getText()); Register.setSubject(subject.getItem(j)); Register.setDoctor(doctorcombo.getItem(i)); RDI.Save(Register); }
{ "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 widgetSelected(SelectionEvent e) { int i = typecombo.getSelectionIndex(); if(i == 0){ costtext.setText("3元"); } else if(i == 1){ costtext.setText("5元"); } }
{ "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 protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.config_input_layout); }
{ "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
This method is to sort the data based on map value (count of the word)
public static Map<String, Integer> sortByCount(Map<String, Integer> countMap) { LOG.info("counterUtil::sortByCount:start"); //Below logic will sort the map based on "max count" value and will store sorted map in a LinkedHashMap Map<String, Integer> sortedMap = countMap.entrySet().stream(). sorted(Collections.reverseOrder(comparingByValue())). collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e2, LinkedHashMap::new)); LOG.info("counterUtil::sortByCount:end"); return sortedMap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sortCount() {\n\t\tfor(Entry<String, TreeMap<String, Integer>> entry:map.entrySet()){\r\n\t\t\tTreeMap<String, Integer> tmap = entry.getValue();\r\n\t\t\tList<Entry<String, Integer>> sorttmap = MapSort.sortMapByIntegerValue(tmap);\r\n\t\t\t int flag=0;\r\n for(Entry<String, Integer> word:so...
[ "0.79435146", "0.68662196", "0.66006964", "0.65846974", "0.6444091", "0.6391401", "0.63496", "0.6317239", "0.61740464", "0.6131436", "0.61019415", "0.6095848", "0.6079106", "0.6069243", "0.6068115", "0.60467523", "0.60240704", "0.6011698", "0.59836197", "0.5980837", "0.597218...
0.64452785
4
Constructor, that initializes the graph.
public FacebookGraph(int size) { super(size, false); this.vertexNames = new HashMap<>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Graph() {\r\n\t\tinit();\r\n\t}", "public Graph() {\n }", "public Graph()\r\n\t{\r\n\t\tthis.adjacencyMap = new HashMap<String, HashMap<String,Integer>>();\r\n\t\tthis.dataMap = new HashMap<String,E>();\r\n\t}", "public Graph()\r\n {\r\n this( \"x\", \"y\" );\r\n }", "public Graph() {\...
[ "0.8964114", "0.85065985", "0.8181761", "0.81676596", "0.8120438", "0.81054187", "0.79376686", "0.79150784", "0.77717483", "0.77358496", "0.76750386", "0.7648295", "0.7617152", "0.76164573", "0.757493", "0.75721735", "0.75721735", "0.75604093", "0.75213397", "0.7488886", "0.7...
0.0
-1
Adds a friendship to the graph.
public void addFriendShip(String firstPerson, String secondPerson) { Integer fromIndex = this.vertexNames.get(firstPerson); if (fromIndex == null) { fromIndex = this.indexCounter; this.indexCounter++; this.vertexNames.put(firstPerson, fromIndex); } Integer toIndex = this.vertexNames.get(secondPerson); if (toIndex == null) { toIndex = this.indexCounter; this.indexCounter++; this.vertexNames.put(secondPerson, toIndex); } super.addEdge(fromIndex, toIndex, 1.0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void add() {\n\t\tperson.addRelationship(\"Friend\", friend);\n\t}", "public void addFriend(String friend){\n friends.add(friend);\n }", "public void addFriendship(int u1, int u2) {\n\t\tUser usr=users.get(u1);\n\t\tUser friend=users.get(u2);\n\t\tif(usr!=null &&friend!=null) {\n\...
[ "0.7180649", "0.6976792", "0.652185", "0.6517498", "0.64496136", "0.6402619", "0.6317091", "0.62916166", "0.6234614", "0.60988814", "0.6074945", "0.6067912", "0.59435976", "0.5936244", "0.5893524", "0.5776257", "0.5755539", "0.5753941", "0.5742265", "0.5726149", "0.5716073", ...
0.69515365
2
From the given index finds the name of the person.
public String getNameFromIndex(int index) { for (Map.Entry<String, Integer> entry : this.vertexNames.entrySet()) { if (entry.getValue().equals(index)) { return entry.getKey(); } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String userNameIndex(int index){\n index = index-1;\n String userName1 = \"\";\n userName1 = user[index].getUserName();\n return userName1;\n }", "public NameRecord getName(int index){\n\t\treturn list.get(index);\n\t}", "People getUser(int index);", "public Person getPerson(int index) {\...
[ "0.7261797", "0.70663136", "0.6959868", "0.6829712", "0.6755247", "0.6550049", "0.6377572", "0.6339841", "0.63322324", "0.6279457", "0.6275357", "0.62494534", "0.61170876", "0.60990536", "0.60457873", "0.59577286", "0.5921107", "0.5896075", "0.5862625", "0.5861854", "0.585939...
0.62100464
12
private int [][] pattern_index_trips; Default constructor for serialization only. Do not use.
public Achterbahn() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Pattern(Collection<Delta> pattern)\n {\n assert(! pattern.isEmpty());\n\n _pattern = (Delta[]) pattern.toArray();\n _index = 0;\n }", "public Object[] getPattern(){\n return pattern;\n }", "public int getPatternIndex(){\n\t\treturn this.indexPattern;\n\t}", "public...
[ "0.5916236", "0.5851705", "0.5663132", "0.56056184", "0.5597825", "0.5588136", "0.55870736", "0.5577206", "0.55656916", "0.5444862", "0.5444647", "0.54442817", "0.5429018", "0.5427571", "0.5371524", "0.5370929", "0.5345032", "0.531852", "0.52902937", "0.52753645", "0.5274949"...
0.0
-1
Created by fy on 2017/3/14.
public interface IClientGoodsService { void del(int id); void update(ClientGoods t); boolean add(ClientGoods t); ClientGoods get(int id); ClientGoods load(int id); /** * 根据类别查询 * * @param categories * @return */ List<ClientGoods> goodsListByCategories(int categories, int storeId); /** * 根据商品编号查找商品 * * @param goodsNo * @param storeId * @return */ ClientGoods findByGoodsNo(String goodsNo, int storeId); /** * 查找店铺下所有商品 * * @param storeId * @return */ List<ClientGoods> findAll(int storeId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n...
[ "0.59465915", "0.5748163", "0.57470757", "0.5709492", "0.5709492", "0.570567", "0.563516", "0.5604836", "0.5580672", "0.5578508", "0.55661994", "0.55372214", "0.55303365", "0.55247116", "0.5508082", "0.5504222", "0.5503837", "0.54888135", "0.5481856", "0.5480588", "0.5480588"...
0.0
-1
Creates new form GlowneOkno
public GlowneOkno() { initComponents(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "FORM createFORM();", "public static Result newForm() {\n return ok(newForm.render(palletForm, setOfArticleForm));\n }", "private void createAndShowGUI (){\n\n JustawieniaPowitalne = new JUstawieniaPowitalne();\n }", "@Override\n\tpublic void create(CreateCoinForm form) throws Exception {\...
[ "0.68670744", "0.6821384", "0.6354813", "0.6287947", "0.62331724", "0.61866987", "0.61768377", "0.61196786", "0.60811424", "0.60792106", "0.6055198", "0.604928", "0.6047301", "0.60452735", "0.6039958", "0.6020864", "0.601095", "0.59962296", "0.59752864", "0.5961012", "0.59302...
0.6109757
8
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jFileChooser1 = new javax.swing.JFileChooser(); jPanel1 = new javax.swing.JPanel(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jScrollPane1 = new javax.swing.JScrollPane(); jTextArea1 = new javax.swing.JTextArea(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jScrollPane2 = new javax.swing.JScrollPane(); jList1 = new javax.swing.JList<>(); jButton3 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Zarzadzanie Projektami"); jButton1.setText("wczytaj z pliku"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jButton2.setText("demo"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jTextArea1.setColumns(20); jTextArea1.setRows(5); jScrollPane1.setViewportView(jTextArea1); jLabel1.setText("Dane Wejsciowe"); jLabel2.setText("Wyniki"); jLabel2.setToolTipText(""); jScrollPane2.setViewportView(jList1); jButton3.setText("start"); jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton3ActionPerformed(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1) .addComponent(jScrollPane2) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1) .addComponent(jLabel2) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(0, 695, Short.MAX_VALUE))) .addContainerGap()) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton1) .addComponent(jButton2) .addComponent(jButton3)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 358, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 219, Short.MAX_VALUE) .addContainerGap()) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(33, 33, 33) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.73213893", "0.72913563", "0.72913563", "0.72913563", "0.7286415", "0.724936", "0.72132975", "0.72076875", "0.71963966", "0.7190991", "0.7184836", "0.71593595", "0.71489584", "0.709429", "0.7080468", "0.70567", "0.6987573", "0.69780385", "0.69556123", "0.69538146", "0.69455...
0.0
-1
Created by biz on 2017/2/21.
public interface PlatformManagerClient { /** * 查询所有平台 * @return 平台列表 */ ResultDTO<List<Platform>> getAllPlatform(); /** * 按id查询平台 * @param platformId 平台Id * @return */ ResultDTO<Platform> getPlatformById(@NotBlank String platformId); /** * 按id查询平台 * @param appId 微信公众平台id * @return */ ResultDTO<Platform> getPlatformByAppId(@NotBlank String appId); /** * 按企业码查询平台 * @param platformCode 平台企业码 * @return */ ResultDTO<Platform> getPlatformByCode(@NotBlank(message="平台代码不可以为空") String platformCode); /** * 创建平台 * @param platform 平台信息 * @return */ ResultDTO<Boolean> createPlatform(@NotNull(message="平台类不可为空") @Valid Platform platform); /** * 更新平台 * @param platform 平台信息 * @return */ ResultDTO<Boolean> updatePlatform(@NotNull @Valid Platform platform); /** * 禁用平台 * @param platformId * @return */ ResultDTO<Boolean> disablePlatform(@NotBlank String platformId); /** * 解禁平台 * @param platformId * @return */ ResultDTO<Boolean> enablePlatform(@NotBlank String platformId); /** * 分页查询平台 * @param keyWord 企业码关键字 * @param pageNo 页码 * @param pageSize 分页大小 * @return */ ResultDTO<PageInfo<Platform>> listPlatform(String keyWord, @NotNull Integer pageNo, @NotNull Integer pageSize); /** * 获取所有平台的企业码 * @return */ ResultDTO<List<String>> listAllPlatformCodes(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "priv...
[ "0.6077015", "0.5892664", "0.5892664", "0.58885366", "0.58357847", "0.5804815", "0.57988214", "0.5765829", "0.576245", "0.5739552", "0.57107204", "0.5707764", "0.5674555", "0.566618", "0.56447315", "0.5636328", "0.56222975", "0.5612298", "0.55971825", "0.55659044", "0.5546606...
0.0
-1
very simple impl, not ideal one!!!
private void update(final FoldHierarchyTransaction tran) { if(task != null && !task.isFinished()) return ; task = RequestProcessor.getDefault().post(new Runnable() { public void run() { updateFolds(tran); } }, UPDATE_TIMEOUT); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "abstract int pregnancy();", "private void strin() {\n\n\t}", "@Override\n\t...
[ "0.56261426", "0.5606311", "0.55288655", "0.5525749", "0.5522291", "0.55205977", "0.54926974", "0.5466898", "0.544353", "0.5415469", "0.5407895", "0.54071707", "0.5406552", "0.5392142", "0.5378085", "0.5377853", "0.53679675", "0.5366932", "0.5366932", "0.53440535", "0.5335598...
0.0
-1
deatach potential settings listeners, stop the RP.Task is runs etc...
public void release() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Stop(priority = 99)\n void stop() {\n for (List<ListenerInvocation> list : listenersMap.values()) {\n if (list != null) list.clear();\n }\n\n if (syncProcessor != null) syncProcessor.shutdownNow();\n }", "@Override\n public void onDestroy() {\n super.onDestroy();\n un...
[ "0.61668885", "0.6156589", "0.6130548", "0.6126883", "0.6111145", "0.60758704", "0.6023314", "0.59632653", "0.5947926", "0.5942305", "0.5933293", "0.59061897", "0.5891582", "0.58898747", "0.58870625", "0.58836067", "0.58833814", "0.5867744", "0.58676344", "0.58668566", "0.585...
0.0
-1
do nothing the updates are catched in insertUpdate and removeUpdate methods
public void changedUpdate(DocumentEvent evt, FoldHierarchyTransaction transaction) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void performAdditionalUpdates() {\n\t\t// Default: do nothing - subclasses should override if needed\n\t}", "@Override\n\tpublic void queryUpdate() {\n\t\tneedToUpdate = true;\n\t}", "public void update(){\n \t//NOOP\n }", "public void prepareUpdateAll() {\n setCallFromStatement();// Will...
[ "0.67148215", "0.6671319", "0.6530714", "0.649261", "0.64674675", "0.64576006", "0.63771194", "0.6369539", "0.62958115", "0.6271002", "0.6267365", "0.6267365", "0.6267365", "0.6256853", "0.61623967", "0.6156754", "0.61229753", "0.61160547", "0.6088842", "0.6086631", "0.608316...
0.0
-1
The heart of this class. This method parses the manifest and based on syntax parser information creates appropriate folds.
private synchronized void updateFolds(final FoldHierarchyTransaction tran) { final FoldHierarchy fh = getOperation().getHierarchy(); final BaseDocument doc = (BaseDocument)getOperation().getHierarchy().getComponent().getDocument(); try { //parse document and create an array of folds List/*<FoldInfo>*/ generated = generateFolds2(doc); logger.fine("generated " + generated.size()); //get existing folds List existingFolds = FoldUtilities.findRecursive(fh.getRootFold()); Iterator itr = existingFolds.iterator(); final ArrayList newborns = new ArrayList(generated.size() / 2); final ArrayList/*<Fold>*/ zombies = new ArrayList(generated.size() / 2); //delete unexisting while(itr.hasNext()) { Fold f = (Fold)itr.next(); if(!generated.contains(new FoldInfo(f.getStartOffset(), f.getEndOffset(), -1, ""))) { //delete this one logger.fine("adding " + f + " to zombies"); zombies.add(f); } } //and create new ones itr = generated.iterator(); while(itr.hasNext()) { FoldInfo fi = (FoldInfo)itr.next(); Iterator existingItr = existingFolds.iterator(); boolean add = true; while(existingItr.hasNext()) { Fold f = (Fold)existingItr.next(); if(f.getStartOffset() == fi.startOffset && f.getEndOffset() == fi.endOffset) { add = false; } } if(add) { newborns.add(fi); logger.fine("adding " + fi + " to newborns"); } } //run folds update in event dispatching thread Runnable updateTask = new Runnable() { public void run() { //lock the document for changes doc.readLock(); try { //lock the hierarchy fh.lock(); try { try { //remove outdated folds Iterator i = zombies.iterator(); while(i.hasNext()) { Fold f = (Fold)i.next(); getOperation().removeFromHierarchy(f, tran); } //add new folds Iterator newFolds = newborns.iterator(); while(newFolds.hasNext()) { FoldInfo f = (FoldInfo)newFolds.next(); getOperation().addToHierarchy(GROUP, f.label, false, f.startOffset , f.endOffset , 0, 0, null, tran); } }catch(BadLocationException ble) { //when the document is closing the hierarchy returns different empty document, grrrr ErrorManager.getDefault().notify(ble); } // }finally { // tran.commit(); // } } finally { fh.unlock(); } } finally { doc.readUnlock(); } } }; if(SwingUtilities.isEventDispatchThread()) { updateTask.run(); } else { SwingUtilities.invokeAndWait(updateTask); } }catch(BadLocationException e) { ErrorManager.getDefault().notify(e); }catch(InterruptedException ie) { ; }catch(InvocationTargetException ite) { ErrorManager.getDefault().notify(ite); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void parseConfig() {\n try {\n synonymAnalyzers = new HashMap<>();\n\n Object xmlSynonymAnalyzers = args.get(\"synonymAnalyzers\");\n\n if (xmlSynonymAnalyzers != null && xmlSynonymAnalyzers instanceof NamedList) {\n NamedList<?> synonymAnalyzersList =...
[ "0.5128803", "0.49962568", "0.49186727", "0.48564598", "0.48315814", "0.47852913", "0.47376388", "0.46800676", "0.4667807", "0.46236354", "0.45954713", "0.45735025", "0.4546135", "0.45329547", "0.45230153", "0.45199504", "0.4476703", "0.44665772", "0.4458336", "0.44546303", "...
0.0
-1
lock the document for changes
public void run() { doc.readLock(); try { //lock the hierarchy fh.lock(); try { try { //remove outdated folds Iterator i = zombies.iterator(); while(i.hasNext()) { Fold f = (Fold)i.next(); getOperation().removeFromHierarchy(f, tran); } //add new folds Iterator newFolds = newborns.iterator(); while(newFolds.hasNext()) { FoldInfo f = (FoldInfo)newFolds.next(); getOperation().addToHierarchy(GROUP, f.label, false, f.startOffset , f.endOffset , 0, 0, null, tran); } }catch(BadLocationException ble) { //when the document is closing the hierarchy returns different empty document, grrrr ErrorManager.getDefault().notify(ble); } // }finally { // tran.commit(); // } } finally { fh.unlock(); } } finally { doc.readUnlock(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void lock(View view) {\n \t\n \t// Do not perform lock unless there's a unlocked doc chosen.\n \tif (mObjects.getUnlockedDoc() == null)\n \t\treturn;\n \t\n \ttry {\n\t\t\tmObjects.setWaitingKey(mObjects.getCurrentDocumentKey());\n\t\t\tLockedDocument locked = service.lockDocument(mObjects...
[ "0.713458", "0.68846893", "0.68555427", "0.66847736", "0.66678876", "0.6644354", "0.6644354", "0.6644354", "0.66139835", "0.6604", "0.6439797", "0.6338259", "0.63203627", "0.6284576", "0.6239536", "0.6144979", "0.60959315", "0.6063429", "0.5988461", "0.59878385", "0.5970251",...
0.0
-1
list of the favorite National Parks. StringBuilder was added. a separator between words and the vertical piping bar is added.
private static String nationalParks(List<String> list, String separator) { StringBuilder sb = new StringBuilder(32); boolean first = true; for(String el : list) { if (first) first = false; else { sb.append(separator); } sb.append(el); } return sb.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<String> getFavoriteRecipeTitle();", "public static void displayPlurals(ArrayList<String> list){\r\n //Loops through the list\r\n for(String str:list){\r\n if(str.endsWith(\"s\"))\r\n System.out.print(str.toUpperCase() + \" \");\r\n }\r\n System.out.println();\r\n }",...
[ "0.56615955", "0.5555826", "0.5555061", "0.5542083", "0.5505356", "0.54953367", "0.5444978", "0.54162914", "0.53590006", "0.5308361", "0.53059983", "0.5280022", "0.52509665", "0.52250546", "0.5159081", "0.51514757", "0.5142336", "0.51381725", "0.5130639", "0.5123485", "0.5114...
0.6157857
0
private method to update the spelling. StingBuilder was added. First letter in the word will be upper case then every letter aftwards will be lower case.
private static String updateSpelling(String text) { StringBuilder upSpell = new StringBuilder(32); char ch = ' '; for (int i = 0; i<text.length(); i++) { if(ch == ' ' && text.charAt(i) != ' ') { upSpell.append(Character.toUpperCase(text.charAt(i))); }else if(Character.isLetter(text.charAt(i))) { upSpell.append(Character.toLowerCase(text.charAt(i))); } // if anything other type of input is added besides letters. else { upSpell.append(text.charAt(i)); } //This will keep track of previous characters inputed. ch = text.charAt(i); } return upSpell.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void correctSpelling() {\n\t\tparent_frame.getFestival().speak(\"Correct\", false);\n\n\t\t//adds to respective arraylist based on which attempt they get it right\n\t\tif (current_attempt_number==1){\n\t\t\twords_mastered.add(words_to_spell.get(current_word_number));\n\t\t} else {//words is faulted\n\t\t\t...
[ "0.6836909", "0.66835064", "0.6350299", "0.6324305", "0.6228378", "0.620541", "0.62030196", "0.6183646", "0.6169491", "0.5999121", "0.59914666", "0.59625536", "0.5917529", "0.5900931", "0.59007174", "0.5894766", "0.58738524", "0.58736444", "0.58670515", "0.5857669", "0.583525...
0.75014377
0
checkedId is the RadioButton selected
@Override public void onCheckedChanged(RadioGroup group, int checkedId) { View radioButton = group.findViewById(checkedId); int index = group.indexOfChild(radioButton); switch (index) { case 0: // first button mText.setVisibility(View.VISIBLE); mEdit.setVisibility(View.VISIBLE); break; case 1: // secondbutton info1="no"; mText.setVisibility(View.INVISIBLE); mEdit.setVisibility(View.INVISIBLE); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onCheckedChanged(RadioGroup radioGroup, @IdRes int checked) {\n }", "@Override\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n pos = radioGroup.indexOfChild(findViewById(checkedId));\n switch (pos) {\n ...
[ "0.7291366", "0.7188274", "0.71839136", "0.7133232", "0.7067684", "0.706249", "0.7021893", "0.6972436", "0.6956884", "0.6940704", "0.69366753", "0.6931982", "0.6928446", "0.68930775", "0.68588567", "0.68576646", "0.68441904", "0.6827048", "0.6821967", "0.67923695", "0.6769362...
0.66876256
26
Constructor. Takes a MIDI number and turns it into a Note.
public Note(int midiNumber) { this.noteName = NoteName.C.noteAt(midiNumber); this.octave = midiNumber / OCTAVE_LENGTH; this.midiNumber = midiNumber; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Note(int noteNumber, int instrument) {\n this.octave = (noteNumber / 12) - 1;\n this.pitch = Pitch.pitchFromNumber(noteNumber - (this.octave * 12));\n this.instrument = instrument;\n }", "public Note(char n, int dur) {\n\t\tnote = n;\n\t\tduration = dur;\n\t}", "public Note(Pitch pitch, int oc...
[ "0.7455251", "0.6864299", "0.6693591", "0.6676438", "0.6557097", "0.6513002", "0.64980066", "0.63978153", "0.62811214", "0.627921", "0.61820906", "0.6167269", "0.6107465", "0.6093295", "0.60885334", "0.60598636", "0.60588557", "0.60397565", "0.60349166", "0.6011109", "0.59983...
0.8087206
0
Checks if the two Notes equal each other.
public boolean equals(Note otherNote) { return getMidiNumber() == otherNote.getMidiNumber(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean sameNoteAs(Note otherNote) {\n\t\treturn getNoteName() == otherNote.getNoteName();\n\t}", "@Override\n public boolean equals(Object obj) {\n if(!(obj instanceof Note)) return false;\n Note comparing = (Note) obj;\n if(!this.title.equals(comparing.getTitle())) return false;\...
[ "0.698212", "0.6464366", "0.6314298", "0.61465675", "0.60431", "0.60353374", "0.6010289", "0.59815574", "0.59416366", "0.5936563", "0.5889531", "0.5887732", "0.5825297", "0.57827985", "0.5771724", "0.57603085", "0.5730547", "0.572416", "0.5722277", "0.57185113", "0.5661627", ...
0.6979646
1
Checks if the two NoteNames are the same.
public boolean sameNoteAs(Note otherNote) { return getNoteName() == otherNote.getNoteName(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean namesEqual(String name1, String name2) {\n if (StringUtil.isEmpty(name1) && StringUtil.isEmpty(name2)) {\n return true;\n }\n if (normalizer.isDelimited(defaultRule, name1)) {\n if (!Objects.equals(name1, name2)) {\n return false;\n ...
[ "0.688623", "0.6638449", "0.65329045", "0.62227154", "0.616534", "0.6158029", "0.6003321", "0.5908887", "0.58046013", "0.5763341", "0.5749176", "0.574457", "0.5725459", "0.5719053", "0.56843865", "0.5651138", "0.56470466", "0.56177735", "0.56018656", "0.5584077", "0.55838", ...
0.71165246
0
Checks if this note is higher than the other note.
public boolean greaterThan(Note otherNote) { return getMidiNumber() > otherNote.getMidiNumber(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean lessThan(Note otherNote) {\n\t\treturn getMidiNumber() < otherNote.getMidiNumber();\n\t}", "@Override\n\t\tprotected boolean lessThan(final Entry hitA, final Entry hitB) {\n\t\t\tassert hitA != hitB;\n\t\t\tassert hitA.mSlot != hitB.mSlot;\n\n\t\t\tfinal int c = mOneReverseMul * mFirstComparator.c...
[ "0.6807285", "0.65566033", "0.6414148", "0.62786204", "0.62553245", "0.6206004", "0.6142138", "0.60536927", "0.6026484", "0.59968483", "0.5956442", "0.5899797", "0.58954084", "0.57201934", "0.56815815", "0.56456935", "0.56356746", "0.56277454", "0.56207806", "0.56170493", "0....
0.74659324
0
Checks if this note is lower than the other note.
public boolean lessThan(Note otherNote) { return getMidiNumber() < otherNote.getMidiNumber(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tprotected boolean lessThan(final Entry hitA, final Entry hitB) {\n\t\t\tassert hitA != hitB;\n\t\t\tassert hitA.mSlot != hitB.mSlot;\n\n\t\t\tfinal int c = mOneReverseMul * mFirstComparator.compare(hitA.mSlot, hitB.mSlot);\n\t\t\tif (c != 0) \n\t\t\t\treturn c > 0;\n\n\t\t\t\t// avoid random sort or...
[ "0.6800438", "0.63638425", "0.61836106", "0.6167391", "0.6118105", "0.6040769", "0.59759206", "0.593314", "0.5920097", "0.58943254", "0.5868139", "0.5867911", "0.5811964", "0.5795206", "0.57581025", "0.57573646", "0.5720193", "0.57103384", "0.5705126", "0.5703642", "0.5703115...
0.7528134
0
Finds the MIDI number
public int getMidiNumber() { return midiNumber; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getMidiNum() {\n\t\treturn midiNum % 12;\n\t}", "String getMidiTarget();", "public static int getNote(MidiMessage mes){\r\n\t\tif (!(mes instanceof ShortMessage))\r\n\t\t\treturn 0;\r\n\t\tShortMessage mes2 = (ShortMessage) mes;\r\n\t\tif (mes2.getCommand() != ShortMessage.NOTE_ON)\r\n\t\t\treturn 0...
[ "0.7201073", "0.6439129", "0.6091319", "0.59998304", "0.5914109", "0.57952887", "0.5785578", "0.5768214", "0.5756704", "0.5708218", "0.5648935", "0.5617496", "0.5594249", "0.5589954", "0.5589877", "0.55648035", "0.5518752", "0.5500378", "0.54995525", "0.5490387", "0.54600763"...
0.7018779
1
Finds this note's lowest octave's MIDI number.
public int getLowestOctaveMidiNumber() { return noteName.getLowestOctaveMidiNumber(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getMidiNum() {\n\t\treturn midiNum % 12;\n\t}", "public static int getNotePosition(Byte midiByte) {\n int shifted = midiByte.intValue() - Constants.MIDI_OFFSET;\n int octave = shifted / 12;\n int keyIndex = shifted % 12;\n return ((7 * octave) * wkInterval + offsetMap[keyIn...
[ "0.6336811", "0.6283091", "0.6207696", "0.618532", "0.6059039", "0.5969328", "0.5959416", "0.5776866", "0.5772991", "0.5583099", "0.55752695", "0.5461786", "0.5353749", "0.53217846", "0.5298865", "0.52734846", "0.5205117", "0.51764107", "0.5176202", "0.5170895", "0.51640046",...
0.8385433
0
Finds the interval between two notes.
public int getInterval(Note otherNote) { return getMidiNumber() - otherNote.getMidiNumber(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tpublic int compare(Interval o1, Interval o2) {\n\t\t\t\treturn o1.start-o2.start;\n\t\t\t}", "public interface Interval extends Comparable<Interval> {\n\n /**\n * Returns the start coordinate of this interval.\n * \n * @return the start coordinate of this interval\n */\n in...
[ "0.59555984", "0.59114623", "0.57582754", "0.5598976", "0.55202353", "0.55037564", "0.53896254", "0.5359899", "0.5260694", "0.5229542", "0.52114666", "0.51593524", "0.5155298", "0.5136241", "0.5114633", "0.5086639", "0.5080359", "0.50660753", "0.5065622", "0.5046366", "0.5017...
0.7040199
0
Finds the note at a given interval.
public Note noteAt(int interval) { int newMidiNote = getMidiNumber() + interval; return new Note(newMidiNote); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testfindNote() {\n System.out.println(\"findNote\");\n net.sharedmemory.tuner.Note instance = new net.sharedmemory.tuner.Note();\n\n double frequency = 441.123;\n java.lang.String expectedResult = \"A4\";\n java.lang.String result = instance.findNote(frequency);\n ...
[ "0.6055371", "0.54927903", "0.5390325", "0.52822554", "0.5078692", "0.5034284", "0.5020995", "0.49580425", "0.49346715", "0.4869377", "0.48686892", "0.4859827", "0.4802451", "0.47842368", "0.476849", "0.47118697", "0.47018367", "0.46830842", "0.46770757", "0.4676633", "0.4664...
0.70013654
0
Converts the types to a JSON array.
protected String typesJSONResponse(final Collection<ComputationTargetType> types) { final List<ComputationTargetType> sorted = new ArrayList<>(types); Collections.sort(sorted, SORT_ORDER); try { final JSONWriter response = new JSONStringer().object().key("types").array(); for (final ComputationTargetType type : sorted) { response.object().key("label").value(type.getName()).key("value").value(type.toString()).endObject(); } return response.endArray().endObject().toString(); } catch (final JSONException e) { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public native JsArrayString getTypes()/*-{\n\t\tvar jso = this.@com.ait.toolkit.core.client.JsObject::getJsObj()();\n\t\treturn jso.types;\n }-*/;", "public String[] getTypes() {\n/* 388 */ return getStringArray(\"type\");\n/* */ }", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n @P...
[ "0.68728185", "0.64697206", "0.62031555", "0.61832106", "0.61571544", "0.6076043", "0.60611296", "0.6013762", "0.6011375", "0.59931505", "0.59721756", "0.5894788", "0.5788093", "0.57841873", "0.57628727", "0.5715914", "0.57139397", "0.56779826", "0.56730574", "0.5589677", "0....
0.6806093
1
Gets the simple computation target types as a JSON response.
@GET @Path("simpleTypes") @Produces(MediaType.APPLICATION_JSON) public String getSimpleTypes() { return typesJSONResponse(_types.getSimpleTypes()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected String typesJSONResponse(final Collection<ComputationTargetType> types) {\n final List<ComputationTargetType> sorted = new ArrayList<>(types);\n Collections.sort(sorted, SORT_ORDER);\n try {\n final JSONWriter response = new JSONStringer().object().key(\"types\").array();\n for (final ...
[ "0.6725744", "0.5970836", "0.5866573", "0.5823956", "0.5743695", "0.56390107", "0.55645216", "0.5552596", "0.5550193", "0.5450983", "0.5366307", "0.5306561", "0.52769375", "0.52533567", "0.5233604", "0.521518", "0.51757234", "0.5160759", "0.51575017", "0.51120776", "0.5045051...
0.6313836
1
Gets additional computation target types as a JSON response.
@GET @Path("additionalTypes") @Produces(MediaType.APPLICATION_JSON) public String getAdditionalTypes() { return typesJSONResponse(_types.getAdditionalTypes()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected String typesJSONResponse(final Collection<ComputationTargetType> types) {\n final List<ComputationTargetType> sorted = new ArrayList<>(types);\n Collections.sort(sorted, SORT_ORDER);\n try {\n final JSONWriter response = new JSONStringer().object().key(\"types\").array();\n for (final ...
[ "0.60872734", "0.5807261", "0.55888563", "0.53170323", "0.5249616", "0.52405894", "0.51254416", "0.51212394", "0.5108426", "0.5086936", "0.50473005", "0.5041988", "0.50162506", "0.50099623", "0.5006154", "0.50032395", "0.4949866", "0.4864497", "0.4847355", "0.48418808", "0.48...
0.5999364
1
Gets all computation target types as a JSON response.
@GET @Path("allTypes") @Produces(MediaType.APPLICATION_JSON) public String getAllTypes() { return typesJSONResponse(_types.getAllTypes()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected String typesJSONResponse(final Collection<ComputationTargetType> types) {\n final List<ComputationTargetType> sorted = new ArrayList<>(types);\n Collections.sort(sorted, SORT_ORDER);\n try {\n final JSONWriter response = new JSONStringer().object().key(\"types\").array();\n for (final ...
[ "0.61885995", "0.6093285", "0.5951276", "0.5939392", "0.58708084", "0.56918025", "0.52966446", "0.52784157", "0.5258947", "0.52229273", "0.5207147", "0.52042484", "0.51865834", "0.51453793", "0.509846", "0.5081909", "0.50742203", "0.5038024", "0.50285614", "0.49865952", "0.49...
0.5793323
5
Set this instance's list of Link objects. The input list is not copied.
public void setLinks(List<Link> links) { this.links = links; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLinks(List<ALink> link) {\n this.link = link;\n }", "protected void setRefList( ReferenceList refList )\n {\n _refList = refList;\n }", "private void setLinks(\n int index, org.chromium.components.paint_preview.common.proto.PaintPreview.LinkDataProto value) {\n ...
[ "0.6572276", "0.6331044", "0.6309904", "0.6274544", "0.61903477", "0.6188058", "0.61758286", "0.60654587", "0.60074705", "0.5988884", "0.5940359", "0.5904224", "0.5898367", "0.5886459", "0.58519477", "0.58421016", "0.5793116", "0.5714596", "0.56778824", "0.56751597", "0.56615...
0.67445785
0
Interprets a string array to create a Destination object
public static Destination createLocation(String[] _input){ String name = _input[DATA_ARRAY_NAME]; int zip = Integer.parseInt(_input[DATA_ARRAY_ZIP]); String airport = _input[DATA_ARRAY_AIRPORT]; String cityCode = _input[DATA_ARRAY_CITY]; String description = _input[DATA_ARRAY_DESCRIPTION]; return new Destination(name, zip, airport, cityCode, description); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void buildDestinationsFromIntent() {\n Intent intent = getIntent();\n ArrayList<String> listOfDestNames = intent.getStringArrayListExtra(\"dName\");\n double[] listOfDestLong = intent.getDoubleArrayExtra(\"dLong\");\n double[] listOfDestLat = intent.getDoubleArrayExtra(\"dLat\");...
[ "0.6599453", "0.54632056", "0.5367601", "0.51383746", "0.50860405", "0.5065359", "0.5018361", "0.50057995", "0.4992982", "0.4959284", "0.49579915", "0.49009672", "0.489329", "0.4862518", "0.48403224", "0.4798274", "0.47709402", "0.47656763", "0.47149506", "0.46730173", "0.464...
0.66558677
0
TODO Autogenerated method stub
@Override public void executerEffetMiseEnJeu(Object cible) throws HearthstoneException { executerAction(cible); }
{ "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 executerEffetDebutTour() throws HearthstoneException { }
{ "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 executerEffetFinTour() throws HearthstoneException { }
{ "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 executerAction(Object cible) throws HearthstoneException { if ( cible == null ) throw new CibleInvalideException("La cible ne peut pas être nulle."); if ( !(cible instanceof ICible) ) throw new CibleInvalideException("La cible doit être une cible valide."); ICible cibleVisee = (ICible) cible; if ( cibleVisee.peutRecevoirDegats() ) { cibleVisee.recevoirDegats(this.degats); } else { throw new CibleInvalideException("La cible ne peut pas recevoir de dégats !"); } }
{ "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 executerEffetDisparition(Object cible) throws HearthstoneException { }
{ "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