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
Set columns that will be swapped
public void setColumns(int a, int b) { this.a = a; this.b = b; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void swapColumns() {\r\n\t\tboolean moved = false;\r\n\t\tfor(int i = 0; i < columnLocations.size() && !moved; i++) {\r\n if(!(table.getColumnName(i).equals(columnLocations.get(i)))) {\r\n int properIndex = columnLocations.indexOf(table.getColumnName(i));\r\n if ( pr...
[ "0.7306465", "0.69012946", "0.68348837", "0.66141087", "0.6386971", "0.6304403", "0.6253096", "0.61445504", "0.60904276", "0.6070494", "0.6015774", "0.59866863", "0.5967694", "0.595154", "0.5916202", "0.59027606", "0.589314", "0.58706534", "0.58666015", "0.58600014", "0.58244...
0.6198328
7
Execute column swap (go through equations and swap columns)
@Override public void execute() { for (LinearEquation e : m) { ComplexNumber temp = new ComplexNumber(e.getCoefficient(a)); e.setCoefficient(a, e.getCoefficient(b)); e.setCoefficient(b, temp); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void swapColumns( int c1, int c2 ) {\n\tfor (int r = 0; r < this.size(); r++){\n\t Object c1Val = matrix[r][c1];\n\t matrix[r][c1] = matrix[r][c2];\n\t matrix[r][c2] = c1Val;\n\t}\n }", "private void swapCol(int col1, int col2) {\r\n List<Integer> columnTmp = new ArrayList<Integer>();\...
[ "0.66304976", "0.6243721", "0.6229078", "0.59938097", "0.5908347", "0.58548623", "0.58172214", "0.5748496", "0.5659411", "0.5575218", "0.55705374", "0.5568521", "0.55454326", "0.5506562", "0.54743636", "0.5472506", "0.5470831", "0.54361016", "0.54026335", "0.53936434", "0.538...
0.0
-1
/ When sorting all characters we should obtain the same sequence for both strings. Additionally, if length is different they can't be permutations of each other.
boolean isPermutationSorting(String s1, String s2) { if(s1.length() != s2.length()) return false; char[] s1Arr = s1.toCharArray(); char[] s2Arr = s2.toCharArray(); java.util.Arrays.sort(s1Arr); java.util.Arrays.sort(s2Arr); String newS1 = new String(s1Arr); String newS2 = new String(s2Arr); if(newS1.equals(newS2)) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean checkPermutationSorting(String s1, String s2) {\n // Strings are of unequal length. Cannot be permutations.\n if (s1.length() != s2.length()) {\n return false;\n }\n\n // Since strings are immutable, we wrote a simple sort function that returns the sort...
[ "0.7359729", "0.7095896", "0.7018291", "0.68908334", "0.6886527", "0.6785759", "0.6757418", "0.66857284", "0.66622174", "0.664966", "0.6597815", "0.6558567", "0.6487758", "0.64636874", "0.6418799", "0.6402717", "0.6383491", "0.6380529", "0.6365698", "0.63502115", "0.6344417",...
0.7125982
1
/ O(n) approach "Bucket sort" similarity.
boolean isPermutationBuckets(String s1, String s2) { int[] countsS1 = new int[256]; int[] countsS2 = new int[256]; if(s1.length() != s2.length()) return false; for(int i = 0; i < s1.length(); ++i) { char c1 = s1.charAt(i); char c2 = s2.charAt(i); ++countsS1[c1]; ++countsS2[c2]; } for(int i = 0; i < countsS1.length; ++i) { if(countsS1[i] != countsS2[i]) return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void bucketSort() {\n MyArray ten = new MyArray();\n MyArray hundred = new MyArray();\n MyArray thousand = new MyArray();\n MyArray tenThousand = new MyArray();\n MyArray hundredThousand = new MyArray();\n MyArray million = new MyArray();\n MyArray tenMillion = new MyArray();\n MyArr...
[ "0.67488664", "0.63544196", "0.62501895", "0.61235464", "0.61028194", "0.58932674", "0.586097", "0.58454704", "0.58367604", "0.58085865", "0.580634", "0.5773575", "0.57437426", "0.57425076", "0.57411504", "0.572016", "0.57145536", "0.5708266", "0.5695191", "0.56914014", "0.56...
0.0
-1
Method, which stops measuring the time, if Log.measureTime() was called before
public static void done(String id) { if(measurements.containsKey(id)) { String timeDifference = ""; for(int i = 0; i < logPatterns.get(0).getLength() + logPatterns.get(1).getLength() + 1; i++) { timeDifference = timeDifference.concat(" "); } timeDifference = timeDifference + logPointer + " Done '" + measurements.get(id).getMessage() + "' in '" + (System.currentTimeMillis() - measurements.get(id).getTimestamp()) + "ms'"; System.out.println(timeDifference); measurements.remove(id); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void stopMeasuring() {\n\tsuper.stopMeasuring();\n}", "public void stop() {\n stopTime = Calendar.getInstance().getTime();\n long diff = stopTime.getTime() - startTime.getTime();\n\n writeln();\n writeln(\"# --------------------------------------------------------------------\"...
[ "0.7328091", "0.6638046", "0.63713276", "0.63711447", "0.6369008", "0.6342493", "0.63360596", "0.63147306", "0.62351274", "0.62107503", "0.61614406", "0.6138817", "0.60820115", "0.601782", "0.5961633", "0.5954007", "0.5942131", "0.5942131", "0.5942131", "0.59269816", "0.59230...
0.0
-1
Prints a given prefix and message to a given logLevel
public static void print(LogLevel level, String prefix, Object message) { print(level, prefix, String.valueOf(message)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void print(LogLevel level, String prefix, String message)\n {\n Map<String, String> sections = defaultSections();\n sections.replace(\"prefix\", prefix);\n sections.replace(\"message\", message);\n\n print(level, sections);\n }", "public abstract void print(Level l...
[ "0.74903136", "0.7098266", "0.6662336", "0.66259974", "0.6548749", "0.65091044", "0.6492052", "0.6487799", "0.6478582", "0.6443933", "0.6277463", "0.62381554", "0.6172858", "0.6148967", "0.60746944", "0.60729074", "0.5978489", "0.59694034", "0.5957585", "0.5953603", "0.593995...
0.72330624
1
Prints a given message to a given logLevel
public static void print(LogLevel level, Object message) { print(level, String.valueOf(message)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void print(Level level, Object logMessage);", "void log(Level level, String message);", "public static void print(LogLevel level, String message)\n {\n Map<String, String> sections = defaultSections();\n sections.replace(\"message\", message);\n\n print(level, sections);...
[ "0.77753884", "0.7556108", "0.73950046", "0.71487033", "0.69705963", "0.6903231", "0.68158746", "0.68043494", "0.68038815", "0.67665595", "0.67625743", "0.6753949", "0.6751106", "0.6727194", "0.669622", "0.66760945", "0.6660076", "0.6646529", "0.659491", "0.6583174", "0.65631...
0.7446293
2
Prints a given message to a given logLevel
public static void print(LogLevel level, String message) { Map<String, String> sections = defaultSections(); sections.replace("message", message); print(level, sections); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void print(Level level, Object logMessage);", "void log(Level level, String message);", "public static void print(LogLevel level, Object message)\n {\n print(level, String.valueOf(message));\n }", "public void log(String message, int loglevel) {\n if (managingPc != null) {...
[ "0.777361", "0.7555203", "0.7446264", "0.7147347", "0.69695306", "0.6903131", "0.6812683", "0.68046635", "0.68038195", "0.6766391", "0.6760556", "0.67529094", "0.6749466", "0.6726444", "0.6694191", "0.6674459", "0.66596127", "0.6645467", "0.65946156", "0.6586125", "0.656093",...
0.7394987
3
Prints a given prefix and message to a given logLevel
public static void print(LogLevel level, String prefix, String message) { Map<String, String> sections = defaultSections(); sections.replace("prefix", prefix); sections.replace("message", message); print(level, sections); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void print(LogLevel level, String prefix, Object message)\n {\n print(level, prefix, String.valueOf(message));\n }", "public abstract void print(Level level, Object logMessage);", "public static void print(LogLevel level, String message)\n {\n Map<String, String> sections =...
[ "0.72326916", "0.7097158", "0.6662536", "0.6626793", "0.6548316", "0.6511098", "0.6491826", "0.64879626", "0.64791864", "0.644415", "0.62792", "0.62371397", "0.6174097", "0.6150387", "0.60763747", "0.60728043", "0.59798515", "0.59695876", "0.59563375", "0.5954437", "0.5941488...
0.7490126
0
Prints a list of given logSections to a given logLevel, while overriding default sections
public static void print(LogLevel level, LogSection... logSections) { Map<String, String> sections = defaultSections(); Arrays.asList(logSections).forEach((logSection) -> sections.replace(logSection.getKey(), logSection.getValue())); print(level, sections); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void print(LogLevel level, Map<String, String> logSections)\n {\n levels.get(level.getLevel()).log(FormatUtil.formatLog(logPatterns, logSections));\n }", "public abstract void print(Level level, Object logMessage);", "public void logIfLevel(Marker ifLevel, String... messages);", "p...
[ "0.72441524", "0.56666553", "0.5608939", "0.5492605", "0.5447053", "0.53220147", "0.5225373", "0.51233965", "0.51061285", "0.5101222", "0.5099392", "0.50882334", "0.50878894", "0.5062303", "0.5030716", "0.49982592", "0.49615973", "0.49528906", "0.48753908", "0.48469064", "0.4...
0.7596054
0
Prints a map of given logSections to a given logLevel, while overriding default sections
public static void print(LogLevel level, Map<String, String> logSections) { levels.get(level.getLevel()).log(FormatUtil.formatLog(logPatterns, logSections)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void print(LogLevel level, LogSection... logSections)\n {\n Map<String, String> sections = defaultSections();\n Arrays.asList(logSections).forEach((logSection) -> sections.replace(logSection.getKey(), logSection.getValue()));\n\n print(level, sections);\n }", "public void...
[ "0.7321075", "0.56924146", "0.565313", "0.5572319", "0.5334922", "0.5234374", "0.5194292", "0.51460916", "0.5111304", "0.50987303", "0.5094277", "0.50837743", "0.5071933", "0.5025583", "0.49372277", "0.48806646", "0.48799333", "0.48756778", "0.48608184", "0.48398703", "0.4831...
0.7274078
1
Overrides a registered logLevel or adds a new one
public static void registerLevel(LogLevel level, LevelImplementation implementation) { CollectionUtil.replaceOrPut(levels, level.getLevel().toLowerCase(), implementation); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Update withLogLevel(String logLevel);", "private void changeLogLevel(String level){\n\n }", "public static void setLoggingLevel(Level newLevel)\n {\n ErrorLogger.setLevel(newLevel);\n }", "public static void setLevel(int level){\n\tlogLevel = level;\n }", "final public static void setLog...
[ "0.7531613", "0.7183811", "0.71008736", "0.70030546", "0.6947914", "0.6866942", "0.6838704", "0.68341106", "0.6800788", "0.66188425", "0.66029096", "0.6556868", "0.6526309", "0.6522609", "0.65126425", "0.6508076", "0.6465626", "0.64622384", "0.6445315", "0.64399743", "0.63668...
0.56454206
60
Creates a DirectReference element.
public DirectReference() throws XWSSecurityException { try { setSOAPElement( soapFactory.createElement( "Reference", "wsse", MessageConstants.WSSE_NS)); } catch (SOAPException e) { log.log(Level.SEVERE, "WSS0750.soap.exception", new Object[] {"wsse:Reference", e.getMessage()}); throw new XWSSecurityException(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "CollectionReferenceElement createCollectionReferenceElement();", "ReferenceEmbed createReferenceEmbed();", "ReferenceLink createReferenceLink();", "ReferenceProperty createReferenceProperty();", "ElementDefinition createElementDefinition();", "ReferenceTreatment createReferenceTreatment();", "HxType cr...
[ "0.6263534", "0.623306", "0.61893606", "0.6100221", "0.5878075", "0.5611229", "0.5593273", "0.5581461", "0.55532104", "0.55404025", "0.5534254", "0.5508568", "0.54117423", "0.53762126", "0.5370679", "0.53652287", "0.5362642", "0.5320613", "0.5315288", "0.53005785", "0.5283284...
0.58304965
5
Takes a SOAPElement and checks if it has the right name.
public DirectReference(SOAPElement element, boolean isBSP) throws XWSSecurityException { setSOAPElement(element); if (!(element.getLocalName().equals("Reference") && XMLUtil.inWsseNS(element))) { log.log(Level.SEVERE, "WSS0751.invalid.direct.reference", "{"+element.getNamespaceURI()+"}"+element.getLocalName()); throw new XWSSecurityException("Invalid DirectReference passed"); } if (isBSP && (getURI()==null)) { throw new XWSSecurityException("Violation of BSP R3062" + ": A wsse:Reference element in a SECURITY_TOKEN_REFERENCE MUST specify a URI attribute"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void checkElementNameUnique(Element element)\n {\n }", "private boolean checkStartElement(XMLEvent event, String elementName) {\n\t\tif (event.isStartElement()\n\t\t\t\t&& event.asStartElement().getName().getLocalPart()\n\t\t\t\t\t\t.toLowerCase().equals(elementName)) {\n\t\t\tretu...
[ "0.72180104", "0.6450968", "0.63667864", "0.6303566", "0.6249269", "0.6245537", "0.61869454", "0.6156056", "0.6126633", "0.60117674", "0.59277976", "0.59131503", "0.5894746", "0.58231795", "0.58231795", "0.58231795", "0.58231795", "0.58231795", "0.58231795", "0.58231795", "0....
0.0
-1
If this attr is not present, returns null.
public String getValueType() { String valueType = getAttribute("ValueType"); if (valueType.equals("")) return null; return valueType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Object getAttrVal(String attrName) {\n\t\treturn null;\n\t}", "public String getNullAttribute();", "@Override\r\n\tpublic String getAttribute() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic Object getAttribute(String arg0, int arg1) {\n\t\treturn null;\n\t}", "@Override\n\t\tpublic ...
[ "0.7389904", "0.72553945", "0.72295153", "0.71118677", "0.68567216", "0.68567216", "0.6792535", "0.6785769", "0.6729764", "0.656864", "0.65611", "0.6445195", "0.6443354", "0.64113796", "0.6270208", "0.6189598", "0.6178563", "0.6083287", "0.6068588", "0.606431", "0.60518885", ...
0.0
-1
Created by Mayokun on 4/9/2017.
public interface MovieListener { void onMovieClicked(int position); void onFinished(List<Movie> movieList); void onFailed(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "private void m50366E() {\n }", "@Override\n\tpublic v...
[ "0.60195446", "0.60018814", "0.5883369", "0.5828324", "0.581049", "0.57977515", "0.5780912", "0.5740692", "0.569805", "0.56941473", "0.5689854", "0.5689854", "0.56747395", "0.5651587", "0.5641033", "0.5639478", "0.5637943", "0.5623777", "0.56218845", "0.56218845", "0.56218845...
0.0
-1
Creates new form AdminLog
public AdminLog() { initComponents(); setSize(1450,853); setLocation (250,130); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createAdminLog(TadminLog adminlog) {\n\t\tadminLogDao.create(adminlog);\n\t}", "public LogForm(String title) {\r\n\t\tsuper(title);\r\n\t\tthis.addCommand(clearLogCommand);\r\n\t\tthis.addCommand(previuosScreenCommand);\r\n\t\tthis.setCommandListener(new CommandHandler());\r\n\t}", "public Logs() {...
[ "0.6964615", "0.61176413", "0.5924941", "0.5829489", "0.581523", "0.5685269", "0.56362295", "0.56263536", "0.5596411", "0.55664635", "0.5517848", "0.5394547", "0.53262335", "0.53100544", "0.5302022", "0.5293137", "0.52807164", "0.52779293", "0.5275191", "0.5274838", "0.527053...
0.59649944
2
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() { jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); textField1 = new java.awt.TextField(); jPasswordField1 = new javax.swing.JPasswordField(); button1 = new java.awt.Button(); jLabel1 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); getContentPane().setLayout(null); jLabel2.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N jLabel2.setForeground(new java.awt.Color(0, 102, 102)); jLabel2.setText("Admin ID"); getContentPane().add(jLabel2); jLabel2.setBounds(990, 360, 200, 50); jLabel3.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N jLabel3.setForeground(new java.awt.Color(0, 102, 102)); jLabel3.setText("Password"); getContentPane().add(jLabel3); jLabel3.setBounds(990, 500, 190, 50); textField1.setBackground(new java.awt.Color(153, 153, 153)); textField1.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N textField1.setForeground(new java.awt.Color(255, 255, 0)); getContentPane().add(textField1); textField1.setBounds(990, 430, 300, 50); jPasswordField1.setBackground(new java.awt.Color(153, 153, 153)); jPasswordField1.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N jPasswordField1.setForeground(new java.awt.Color(255, 255, 0)); jPasswordField1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jPasswordField1ActionPerformed(evt); } }); getContentPane().add(jPasswordField1); jPasswordField1.setBounds(990, 550, 300, 50); button1.setBackground(new java.awt.Color(0, 153, 51)); button1.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N button1.setLabel("I 'm in"); button1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { button1ActionPerformed(evt); } }); getContentPane().add(button1); button1.setBounds(990, 740, 370, 50); jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/adminbank/image/7M5QGITIEQI6RIZVYRID2BA6V4.jpg"))); // NOI18N getContentPane().add(jLabel1); jLabel1.setBounds(0, 0, 1484, 854); 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.73191476", "0.72906625", "0.72906625", "0.72906625", "0.72860986", "0.7248112", "0.7213479", "0.72078276", "0.7195841", "0.71899796", "0.71840525", "0.7158498", "0.71477973", "0.7092748", "0.70800966", "0.70558053", "0.69871384", "0.69773406", "0.69548076", "0.69533914", "...
0.0
-1
Translates code to Condition type
public static Condition meaningOfCode(Integer code) {return BY_LABEL.get(code);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "LogicCondition createLogicCondition();", "cn.infinivision.dataforce.busybee.pb.meta.Expr getCondition();", "java.lang.String getCondition();", "private void parseCondition() {\n Struct type1 = parseExpr().type;\n\n int op;\n if (RELATIONAL_OPERATORS.contains(nextToken.kind)) {\n ...
[ "0.66068965", "0.645871", "0.6372806", "0.62830335", "0.62265587", "0.62232363", "0.6214752", "0.6125407", "0.6118612", "0.6076429", "0.5961965", "0.5908548", "0.58945113", "0.5873867", "0.585431", "0.57928354", "0.5782552", "0.5770629", "0.57616055", "0.5747374", "0.5713602"...
0.63443244
3
pDialog = new ProgressDialog(this); pDialog.setCancelable(false); pDialog.setMessage("Loading ..."); pDialog.show();
private void getData(){ UserAPIService api = Config.getRetrofit().create(UserAPIService.class); Call<Value> call = api.getJSON(); call.enqueue(new Callback<Value>() { @Override public void onResponse(Call<Value> call, Response<Value> response) { // pDialog.dismiss(); String value1 = response.body().getStatus(); if (value1.equals("1")) { Value value = response.body(); resultAlls = new ArrayList<>(Arrays.asList(value.getResult())); adapter = new RecyclerAdapterListAll(resultAlls, getApplicationContext()); recyclerView.setAdapter(adapter); }else{ Toast.makeText(ListPonpesActivity.this,"Maaf Data Tidak Ada",Toast.LENGTH_SHORT).show(); } } @Override public void onFailure(Call<Value> call, Throwable t) { // pDialog.dismiss(); Toast.makeText(ListPonpesActivity.this,"Respon gagal",Toast.LENGTH_SHORT).show(); Log.d("Hasil internet",t.toString()); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showProgressDialog(){\n progressDialog=ProgressDialog.show(context,\"\",\"Loading...Please wait...\");\n\n\n }", "private Dialog buildLoadingDialog() {\n ProgressDialog dialog = new ProgressDialog(this);\n dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n dia...
[ "0.85567886", "0.8352688", "0.8278885", "0.82205284", "0.81206936", "0.81118655", "0.8108865", "0.8074827", "0.8038312", "0.80098265", "0.7998259", "0.79511577", "0.7948703", "0.7930043", "0.7912505", "0.7867033", "0.7850678", "0.7844706", "0.78353035", "0.78156286", "0.77978...
0.0
-1
pDialog = new ProgressDialog(this); pDialog.setCancelable(false); pDialog.setMessage("Loading ..."); pDialog.show();
private void getDataSalaf(){ UserAPIService api = Config.getRetrofit().create(UserAPIService.class); Call<Value> call = api.lihat_jenis("Salaf"); call.enqueue(new Callback<Value>() { @Override public void onResponse(Call<Value> call, Response<Value> response) { // pDialog.dismiss(); String value1 = response.body().getStatus(); if (value1.equals("1")){ Value value = response.body(); resultAlls = new ArrayList<>(Arrays.asList(value.getResult())); adapter = new RecyclerAdapterListAll(resultAlls,getApplicationContext()); recyclerView.setAdapter(adapter); }else { Toast.makeText(ListPonpesActivity.this,"Maaf Data Tidak Ada",Toast.LENGTH_SHORT).show(); } } @Override public void onFailure(Call<Value> call, Throwable t) { // pDialog.dismiss(); Toast.makeText(ListPonpesActivity.this,"Respon gagal",Toast.LENGTH_SHORT).show(); Log.d("Hasil internet",t.toString()); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showProgressDialog(){\n progressDialog=ProgressDialog.show(context,\"\",\"Loading...Please wait...\");\n\n\n }", "private Dialog buildLoadingDialog() {\n ProgressDialog dialog = new ProgressDialog(this);\n dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n dia...
[ "0.8557397", "0.8352308", "0.82789254", "0.822031", "0.81208867", "0.81119037", "0.8109187", "0.8075028", "0.8038799", "0.8010011", "0.7997998", "0.7951318", "0.79485315", "0.7929994", "0.7912588", "0.78673536", "0.78506404", "0.78455085", "0.7834386", "0.78159356", "0.779838...
0.0
-1
pDialog = new ProgressDialog(this); pDialog.setCancelable(false); pDialog.setMessage("Loading ..."); pDialog.show();
private void getDataModern(){ UserAPIService api = Config.getRetrofit().create(UserAPIService.class); Call<Value> call = api.lihat_jenis("Modern"); call.enqueue(new Callback<Value>() { @Override public void onResponse(Call<Value> call, Response<Value> response) { // pDialog.dismiss(); String value1 = response.body().getStatus(); if (value1.equals("1")){ Value value = response.body(); resultAlls = new ArrayList<>(Arrays.asList(value.getResult())); adapter = new RecyclerAdapterListAll(resultAlls,getApplicationContext()); recyclerView.setAdapter(adapter); }else { Toast.makeText(ListPonpesActivity.this,"Maaf Data Tidak Ada",Toast.LENGTH_SHORT).show(); } } @Override public void onFailure(Call<Value> call, Throwable t) { // pDialog.dismiss(); Toast.makeText(ListPonpesActivity.this,"Respon gagal",Toast.LENGTH_SHORT).show(); Log.d("Hasil internet",t.toString()); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showProgressDialog(){\n progressDialog=ProgressDialog.show(context,\"\",\"Loading...Please wait...\");\n\n\n }", "private Dialog buildLoadingDialog() {\n ProgressDialog dialog = new ProgressDialog(this);\n dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n dia...
[ "0.8557045", "0.8352073", "0.82782894", "0.8220604", "0.81204444", "0.81114143", "0.81088936", "0.8075008", "0.80385983", "0.80099565", "0.7998021", "0.7951042", "0.7948951", "0.79297745", "0.79125816", "0.7867626", "0.78503615", "0.7844461", "0.783419", "0.78155154", "0.7797...
0.0
-1
pDialog = new ProgressDialog(this); pDialog.setCancelable(false); pDialog.setMessage("Loading ..."); pDialog.show();
private void getDataLainya(){ UserAPIService api = Config.getRetrofit().create(UserAPIService.class); Call<Value> call = api.lihat_jenis("Komprehensif"); call.enqueue(new Callback<Value>() { @Override public void onResponse(Call<Value> call, Response<Value> response) { // pDialog.dismiss(); String value1= response.body().getStatus(); if (value1.equals("1")){ Value value = response.body(); resultAlls = new ArrayList<>(Arrays.asList(value.getResult())); adapter = new RecyclerAdapterListAll(resultAlls,getApplicationContext()); recyclerView.setAdapter(adapter); }else { Toast.makeText(ListPonpesActivity.this,"Maaf Data Tidak Ada",Toast.LENGTH_SHORT).show(); } } @Override public void onFailure(Call<Value> call, Throwable t) { // pDialog.dismiss(); Toast.makeText(ListPonpesActivity.this,"Respon gagal",Toast.LENGTH_SHORT).show(); Log.d("Hasil internet",t.toString()); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showProgressDialog(){\n progressDialog=ProgressDialog.show(context,\"\",\"Loading...Please wait...\");\n\n\n }", "private Dialog buildLoadingDialog() {\n ProgressDialog dialog = new ProgressDialog(this);\n dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n dia...
[ "0.8556975", "0.8352341", "0.8278571", "0.82200515", "0.81206495", "0.81117713", "0.81087923", "0.80747885", "0.80385137", "0.8009662", "0.79978704", "0.79510033", "0.7948115", "0.79299206", "0.79119074", "0.78677505", "0.78505844", "0.7845455", "0.783418", "0.7815574", "0.77...
0.0
-1
pDialog = new ProgressDialog(this); pDialog.setCancelable(false); pDialog.setMessage("Loading ..."); pDialog.show();
private void getDataTakfidul(){ UserAPIService api = Config.getRetrofit().create(UserAPIService.class); Call<Value> call = api.lihat_program_like("Takhfidul Qur'an"); call.enqueue(new Callback<Value>() { @Override public void onResponse(Call<Value> call, Response<Value> response) { // pDialog.dismiss(); String value1 = response.body().getStatus(); if (value1.equals("1")){ Value value = response.body(); resultAlls = new ArrayList<>(Arrays.asList(value.getResult())); adapter = new RecyclerAdapterListAll(resultAlls,getApplicationContext()); recyclerView.setAdapter(adapter); }else { Toast.makeText(ListPonpesActivity.this,"Maaf Data Tidak Ada",Toast.LENGTH_SHORT).show(); } } @Override public void onFailure(Call<Value> call, Throwable t) { // pDialog.dismiss(); Toast.makeText(ListPonpesActivity.this,"Respon gagal",Toast.LENGTH_SHORT).show(); Log.d("Hasil internet",t.toString()); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showProgressDialog(){\n progressDialog=ProgressDialog.show(context,\"\",\"Loading...Please wait...\");\n\n\n }", "private Dialog buildLoadingDialog() {\n ProgressDialog dialog = new ProgressDialog(this);\n dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n dia...
[ "0.85567886", "0.8352688", "0.8278885", "0.82205284", "0.81206936", "0.81118655", "0.8108865", "0.8074827", "0.8038312", "0.80098265", "0.7998259", "0.79511577", "0.7948703", "0.7930043", "0.7912505", "0.7867033", "0.7850678", "0.7844706", "0.78353035", "0.78156286", "0.77978...
0.0
-1
pDialog = new ProgressDialog(this); pDialog.setCancelable(false); pDialog.setMessage("Loading ..."); pDialog.show();
private void getDataKitabKuning(){ UserAPIService api = Config.getRetrofit().create(UserAPIService.class); Call<Value> call = api.lihat_program_like("Kitab Kuning"); call.enqueue(new Callback<Value>() { @Override public void onResponse(Call<Value> call, Response<Value> response) { // pDialog.dismiss(); String value1 = response.body().getStatus(); if (value1.equals("1")){ Value value = response.body(); resultAlls = new ArrayList<>(Arrays.asList(value.getResult())); adapter = new RecyclerAdapterListAll(resultAlls,getApplicationContext()); recyclerView.setAdapter(adapter); }else { Toast.makeText(ListPonpesActivity.this,"Maaf Data Tidak Ada",Toast.LENGTH_SHORT).show(); } } @Override public void onFailure(Call<Value> call, Throwable t) { // pDialog.dismiss(); Toast.makeText(ListPonpesActivity.this,"Respon gagal",Toast.LENGTH_SHORT).show(); Log.d("Hasil internet",t.toString()); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showProgressDialog(){\n progressDialog=ProgressDialog.show(context,\"\",\"Loading...Please wait...\");\n\n\n }", "private Dialog buildLoadingDialog() {\n ProgressDialog dialog = new ProgressDialog(this);\n dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n dia...
[ "0.8557397", "0.8352308", "0.82789254", "0.822031", "0.81208867", "0.81119037", "0.8109187", "0.8075028", "0.8038799", "0.8010011", "0.7997998", "0.7951318", "0.79485315", "0.7929994", "0.7912588", "0.78673536", "0.78506404", "0.78455085", "0.7834386", "0.78159356", "0.779838...
0.0
-1
pDialog = new ProgressDialog(this); pDialog.setCancelable(false); pDialog.setMessage("Loading ..."); pDialog.show();
private void getDataBahasa(){ UserAPIService api = Config.getRetrofit().create(UserAPIService.class); Call<Value> call = api.lihat_program_like("Bahasa"); call.enqueue(new Callback<Value>() { @Override public void onResponse(Call<Value> call, Response<Value> response) { // pDialog.dismiss(); String value1= response.body().getStatus(); if (value1.equals("1")){ Value value = response.body(); resultAlls = new ArrayList<>(Arrays.asList(value.getResult())); adapter = new RecyclerAdapterListAll(resultAlls,getApplicationContext()); recyclerView.setAdapter(adapter); }else { Toast.makeText(ListPonpesActivity.this,"Maaf Data Tidak Ada",Toast.LENGTH_SHORT).show(); } } @Override public void onFailure(Call<Value> call, Throwable t) { // pDialog.dismiss(); Toast.makeText(ListPonpesActivity.this,"Respon gagal",Toast.LENGTH_SHORT).show(); Log.d("Hasil internet",t.toString()); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showProgressDialog(){\n progressDialog=ProgressDialog.show(context,\"\",\"Loading...Please wait...\");\n\n\n }", "private Dialog buildLoadingDialog() {\n ProgressDialog dialog = new ProgressDialog(this);\n dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n dia...
[ "0.8557045", "0.8352073", "0.82782894", "0.8220604", "0.81204444", "0.81114143", "0.81088936", "0.8075008", "0.80385983", "0.80099565", "0.7998021", "0.7951042", "0.7948951", "0.79297745", "0.79125816", "0.7867626", "0.78503615", "0.7844461", "0.783419", "0.78155154", "0.7797...
0.0
-1
pDialog = new ProgressDialog(this); pDialog.setCancelable(false); pDialog.setMessage("Loading ..."); pDialog.show();
private void getDataDai(){ UserAPIService api = Config.getRetrofit().create(UserAPIService.class); Call<Value> call = api.lihat_program_like("Dai"); call.enqueue(new Callback<Value>() { @Override public void onResponse(Call<Value> call, Response<Value> response) { // pDialog.dismiss(); String value1= response.body().getStatus(); if (value1.equals("1")){ Value value = response.body(); resultAlls = new ArrayList<>(Arrays.asList(value.getResult())); adapter = new RecyclerAdapterListAll(resultAlls,getApplicationContext()); recyclerView.setAdapter(adapter); }else { Toast.makeText(ListPonpesActivity.this,"Maaf Data Tidak Ada",Toast.LENGTH_SHORT).show(); } } @Override public void onFailure(Call<Value> call, Throwable t) { // pDialog.dismiss(); Toast.makeText(ListPonpesActivity.this,"Respon gagal",Toast.LENGTH_SHORT).show(); Log.d("Hasil internet",t.toString()); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showProgressDialog(){\n progressDialog=ProgressDialog.show(context,\"\",\"Loading...Please wait...\");\n\n\n }", "private Dialog buildLoadingDialog() {\n ProgressDialog dialog = new ProgressDialog(this);\n dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n dia...
[ "0.8556975", "0.8352341", "0.8278571", "0.82200515", "0.81206495", "0.81117713", "0.81087923", "0.80747885", "0.80385137", "0.8009662", "0.79978704", "0.79510033", "0.7948115", "0.79299206", "0.79119074", "0.78677505", "0.78505844", "0.7845455", "0.783418", "0.7815574", "0.77...
0.0
-1
Do something when collapsed
@Override public boolean onMenuItemActionCollapse(MenuItem item) { adapter.setFilter(resultAlls); return true; // Return true to collapse action view }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isCollapsed();", "public boolean isCollapsed();", "public void collapse() {\n if(contentLayout.isVisible()) {\n toggle(false);\n }\n }", "abstract void setCollapsed(boolean isCollapsed);", "@JDIAction(\"Collapse '{name}'\")\n public void collapse() {\n if (isEx...
[ "0.7407031", "0.73513275", "0.7154493", "0.70649666", "0.7028113", "0.6943541", "0.69423556", "0.68898535", "0.68674463", "0.6793058", "0.67643225", "0.67340475", "0.6631765", "0.65772974", "0.65293956", "0.6516395", "0.6513237", "0.6496207", "0.64900905", "0.64900905", "0.64...
0.0
-1
Do something when expanded
@Override public boolean onMenuItemActionExpand(MenuItem item) { return true; // Return true to expand action view }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void expand() {\n openItems();\n }", "@JDIAction(\"Expand '{name}'\")\n public void expand() {\n if (isCollapsed()) {\n expandButton.click();\n }\n }", "public boolean isExpanded();", "public boolean isExpand(){\n return this == EXPAND;\n }", "@Override\n...
[ "0.71771663", "0.70189625", "0.6719292", "0.66357934", "0.65212643", "0.650959", "0.6505571", "0.6486085", "0.6410624", "0.6404927", "0.63578546", "0.6167241", "0.6154914", "0.6132328", "0.61117554", "0.60912764", "0.6089671", "0.6077273", "0.5989702", "0.59834945", "0.596734...
0.5852184
35
kodeMK = txt_kodeMK.getSelectedItem().toString(); kelas = txt_kelas.getSelectedItem().toString(); Toast.makeText(ListPonpesActivity.this,"Cari Semuanya ",Toast.LENGTH_SHORT).show();
@Override public void onClick(DialogInterface dialog, int which) { getCariSemua(); // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position,\n long id) {\n nama_dokter2 = parent.getItemAtPosition(position).toString();\n\n // Showing selected spinner item\n Toast.makeText(par...
[ "0.71610695", "0.7119756", "0.70564026", "0.68392617", "0.68239486", "0.67560506", "0.671376", "0.6694796", "0.6665385", "0.6636487", "0.6635822", "0.66355854", "0.6536804", "0.6526287", "0.64639354", "0.6405869", "0.6376017", "0.6360446", "0.63550043", "0.63185644", "0.62647...
0.0
-1
pDialog = new ProgressDialog(this); pDialog.setCancelable(false); pDialog.setMessage("Loading ..."); pDialog.show();
private void getCariSemua(){ UserAPIService api = Config.getRetrofit().create(UserAPIService.class); Call<Value> call = api.cari_semua_like(txt_kodeMK.getSelectedItem().toString(),txt_kelas.getSelectedItem().toString()); call.enqueue(new Callback<Value>() { @Override public void onResponse(Call<Value> call, Response<Value> response) { // pDialog.dismiss(); String value1 = response.body().getStatus(); if (value1.equals("1")) { Value value = response.body(); resultAlls = new ArrayList<>(Arrays.asList(value.getResult())); adapter = new RecyclerAdapterListAll(resultAlls, getApplicationContext()); recyclerView.setAdapter(adapter); }else{ Toast.makeText(ListPonpesActivity.this,"Maaf Data Tidak Ada",Toast.LENGTH_SHORT).show(); } } @Override public void onFailure(Call<Value> call, Throwable t) { // pDialog.dismiss(); Toast.makeText(ListPonpesActivity.this,"Respon gagal",Toast.LENGTH_SHORT).show(); Log.d("Hasil internet",t.toString()); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showProgressDialog(){\n progressDialog=ProgressDialog.show(context,\"\",\"Loading...Please wait...\");\n\n\n }", "private Dialog buildLoadingDialog() {\n ProgressDialog dialog = new ProgressDialog(this);\n dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n dia...
[ "0.8556975", "0.8352341", "0.8278571", "0.82200515", "0.81206495", "0.81117713", "0.81087923", "0.80747885", "0.80385137", "0.8009662", "0.79978704", "0.79510033", "0.7948115", "0.79299206", "0.79119074", "0.78677505", "0.78505844", "0.7845455", "0.783418", "0.7815574", "0.77...
0.0
-1
This method returns current edge count.
public long getEdgeCount() { return edgeCount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getEdgeCount()\n\t{\n\t\treturn edgeCount;\n\t}", "public int getEdgeCount() {\n return edge_.size();\n }", "public int getEdgeCount() {\n if (edgeBuilder_ == null) {\n return edge_.size();\n } else {\n return edgeBuilder_.getCount();\n }\n }", "...
[ "0.8820045", "0.8782085", "0.8770004", "0.8680601", "0.86689156", "0.8417299", "0.82731277", "0.8137598", "0.81324977", "0.8117856", "0.80911267", "0.8078136", "0.80769074", "0.80431414", "0.80162114", "0.8011638", "0.7996021", "0.7991614", "0.7970485", "0.7936098", "0.793532...
0.8867268
0
This method returns current vertex count.
public long getVertexCount(){ return vertexCount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getVertexCount() {\n return vertexCount;\n }", "public int getVertexCount() {\n\t\treturn vertexCount;\n\t}", "public int getVertexCount();", "public int getVertexCount() {\n\t\treturn this._vertices.size();\n\t}", "public abstract int getVertexCount();", "public int getVertexCount()...
[ "0.88061905", "0.8741917", "0.8621868", "0.8592589", "0.83510494", "0.8337106", "0.81252503", "0.81042564", "0.8100267", "0.8088632", "0.808148", "0.80730873", "0.80484205", "0.80267286", "0.8024897", "0.80141234", "0.7982151", "0.79600626", "0.79600626", "0.7915447", "0.7863...
0.86566114
2
This method is triggered by the Kernel to flush transactions.
public boolean flushTransactions() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void flushAll() {\n\t\t\r\n\t}", "@Override\n\tpublic void flush() {\n\t}", "@Override\n public void flush()\n {\n }", "@Override\r\n\tpublic void flush() {\n\t}", "public void flush() {\n entityManager.flush();\n }", "@Override\r\n\tpublic void flush() {\n\t\t\r\n\t...
[ "0.6957896", "0.6917399", "0.6887985", "0.68778586", "0.6868034", "0.68642706", "0.6839699", "0.683926", "0.683926", "0.683926", "0.68234175", "0.6815813", "0.68053836", "0.68053836", "0.68053836", "0.68053836", "0.6798851", "0.67846507", "0.6696921", "0.6672816", "0.65869063...
0.7157576
0
This function queries the underlying storage and retrieves the edge matching the given criteria.
@Deprecated public abstract Edge getEdge(String childVertexHash, String parentVertexHash);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "E getEdge(int id);", "Edge getEdge();", "public Edge getEdge(Node k){\n for(int i = 0; i<edges.size(); i++){\n Edge edge = edges.get(i);\n if(edge.end() == k){\n return edge;\n }\n }\n return null;\n }", "public Edge returnEdgeById(Id id...
[ "0.65518", "0.58268064", "0.55952567", "0.5539852", "0.54549474", "0.5447354", "0.5419852", "0.5411835", "0.5392296", "0.53913015", "0.5379459", "0.5307664", "0.5278309", "0.5268833", "0.5267464", "0.5193911", "0.5125481", "0.50923896", "0.50898045", "0.508638", "0.5002056", ...
0.46090746
61
This function queries the underlying storage and retrieves the vertex matching the given criteria.
@Deprecated public abstract Vertex getVertex(String vertexHash);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Vertex getVertex(int index);", "private Optional<Vertex> getVertexByIndex(GraphTraversalSource source, UUID id, String collectionName) {\n Optional<Vertex> vertexOpt = indexHandler.findById(id);\n\n // Return if the neo4j Node ID matches no vertex (extreme edge case)\n if (!vertexOpt.isPresent()) {\n ...
[ "0.6157496", "0.605255", "0.60100377", "0.5845049", "0.5653417", "0.56245166", "0.55748713", "0.5495925", "0.5427153", "0.54173297", "0.5409614", "0.54088825", "0.5401454", "0.53634113", "0.53570396", "0.5278046", "0.52416253", "0.5220134", "0.5177164", "0.517314", "0.5171268...
0.51703686
21
This function finds the children of a given vertex. A child is defined as a vertex which is the source of a direct edge between itself and the given vertex.
public abstract Graph getChildren(String parentHash);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Collection<V> getChildren(V vertex);", "public Collection<E> getChildEdges(V vertex);", "public int getChildCount(V vertex);", "public Set<V> getNeighbours(V vertex);", "public Vector<GraphicalLatticeElement> getChildren() {\n\t\tVector<GraphicalLatticeElement> children = new Vector<GraphicalLattice...
[ "0.778766", "0.7544633", "0.6463057", "0.6179662", "0.6053796", "0.5852151", "0.58402216", "0.5824237", "0.5810833", "0.58024335", "0.578797", "0.57427204", "0.5690481", "0.5674055", "0.5670885", "0.56664985", "0.5647735", "0.5646786", "0.5614514", "0.5613962", "0.5613562", ...
0.6004425
5
This function finds the parents of a given vertex. A parent is defined as a vertex which is the destination of a direct edge between itself and the given vertex.
public abstract Graph getParents(String childVertexHash);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public V getParent(V vertex);", "public E getParentEdge(V vertex);", "public VNode[] getParents() throws VlException // for Graph\n {\n VNode parent=getParent();\n \n if (parent==null)\n return null; \n \n VNode nodes[]=new VNode[1]; \n nodes[0]=parent; \...
[ "0.7248563", "0.67274433", "0.65516335", "0.62949085", "0.6104543", "0.6090317", "0.6014881", "0.59131175", "0.5807201", "0.5763187", "0.5691163", "0.5643846", "0.56271714", "0.5574078", "0.5552402", "0.5551944", "0.5542986", "0.5502067", "0.55020005", "0.5483116", "0.5476316...
0.6902453
1
This function inserts the given edge into the underlying storage(s) and updates the cache(s) accordingly.
public abstract boolean putEdge(Edge incomingEdge);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insert(Edge edge){\n edges[edge.getSource()].add(edge);\n if (isDirected()){\n edges[edge.getDest()].add(new Edge(edge.getDest(), edge.getSource(),edge.getWeight()));\n }\n }", "protected void addEdge(IEdge edge) {\n\n if (edge != null) {\n\n this....
[ "0.61952525", "0.61597", "0.6108583", "0.6086996", "0.60521114", "0.5959758", "0.5837672", "0.5733984", "0.5677607", "0.5661254", "0.5612266", "0.5609292", "0.5587255", "0.5586042", "0.5562577", "0.5555409", "0.55524", "0.55449253", "0.5522204", "0.55167454", "0.5499263", "...
0.6426393
0
This function inserts the given vertex into the underlying storage(s) and updates the cache(s) accordingly.
public abstract boolean putVertex(Vertex incomingVertex);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addVertex(Vertex vertex){\n \n synchronized(vertexes){\n \n vertexes.put(vertex.getID(),vertex);\n }\n }", "@Override\n public E addVertex(E vertex) {\n if (vertex == null || dictionary.containsKey(vertex)) {\n return null;\n }...
[ "0.641776", "0.6356567", "0.6337263", "0.6243977", "0.6216678", "0.6216678", "0.6140106", "0.61143047", "0.607523", "0.60598177", "0.60586953", "0.60484356", "0.60215443", "0.601589", "0.5987106", "0.59836656", "0.5978122", "0.5911169", "0.58591825", "0.58578134", "0.58136016...
0.67361844
0
This function finds the lineage of the graph starting from a source vertex.
@Deprecated public Graph getLineage(String hash, String direction, int maxDepth) { Graph result = new Graph(); Vertex previousVertex = null; Vertex currentVertex = null; int depth = 0; Queue<Vertex> queue = new LinkedList<>(); queue.add(getVertex(hash)); while(!queue.isEmpty() && depth < maxDepth) { currentVertex = queue.remove(); String currentHash = currentVertex.getAnnotation("hash"); if(DIRECTION_ANCESTORS.startsWith(direction.toLowerCase())) queue.addAll(getParents(currentHash).vertexSet()); else if(DIRECTION_DESCENDANTS.startsWith(direction.toLowerCase())) queue.addAll(getChildren(currentHash).vertexSet()); result.putVertex(currentVertex); if(previousVertex != null) result.putEdge(getEdge(previousVertex.getAnnotation("hash"), currentHash)); previousVertex = currentVertex; depth++; } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void computePaths(Vertex source){\n\t\tsource.minDistance=0;\n\t\t//visit each vertex u, always visiting vertex with smallest minDistance first\n\t\tPriorityQueue<Vertex> vertexQueue=new PriorityQueue<Vertex>();\n\t\tvertexQueue.add(source);\n\t\twhile(!vertexQueue.isEmpty()){\n\t\t\tVertex u = verte...
[ "0.61635774", "0.615771", "0.6154456", "0.61078686", "0.60744464", "0.60181445", "0.59949225", "0.59106696", "0.58454394", "0.5784703", "0.5758772", "0.5752373", "0.57374746", "0.5699677", "0.564916", "0.56400394", "0.56164885", "0.5593685", "0.556302", "0.55611265", "0.55600...
0.5136646
79
This function finds all possible paths between source and destination vertices.
@Deprecated public Graph getPaths(String childVertexHash, String parentVertexHash, int maxPathLength) { Set<Graph> allPaths = new HashSet<>(); Stack<Vertex>currentPath = new Stack<>(); Vertex previousVertex = null; Vertex currentVertex = null; int pathLength = 0; Queue<Vertex> queue = new LinkedList<>(); queue.add(getVertex(childVertexHash)); Graph children = null; while(!queue.isEmpty()) { pathLength++; if(pathLength > maxPathLength) children = null; currentVertex = queue.remove(); String currentHash = currentVertex.getAnnotation("hash"); currentPath.push(currentVertex); if(currentHash.equals(parentVertexHash)) { allPaths.add(convertStackToGraph(currentPath)); } else { children = getChildren(currentHash); } if(children != null) { queue.addAll(children.vertexSet()); continue; } currentPath.pop(); } // merge graphs for each path Graph resultGraph = new Graph(); for (Graph path: allPaths) { resultGraph = Graph.union(resultGraph, path); } return resultGraph; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Iterable<Vertex> computePath(Vertex start, Vertex end) throws GraphException;", "@Override\r\n public Set<List<String>> findAllPaths(int sourceId, int targetId, int reachability) {\r\n //all paths found\r\n Set<List<String>> allPaths = new HashSet<List<String>>();\r\n ...
[ "0.7129166", "0.70499766", "0.68662", "0.67834175", "0.6776748", "0.6706605", "0.66688627", "0.65719706", "0.65149254", "0.648122", "0.6469439", "0.6404605", "0.6375499", "0.6361938", "0.6346237", "0.6310533", "0.62919825", "0.62916595", "0.6286229", "0.62842476", "0.62779343...
0.0
-1
This helper function converts a stack of vertices into a corresponding graph of vertices. It also finds and adds the edges between those vertices.
@Deprecated protected Graph convertStackToGraph(Stack<Vertex> stack) { Graph graph = new Graph(); Iterator<Vertex> iter = stack.iterator(); Vertex previous = iter.next(); graph.putVertex(previous); while(iter.hasNext()) { Vertex curr = iter.next(); graph.putVertex(curr); graph.putEdge(getEdge(previous.getAnnotation("hash"), curr.getAnnotation("hash"))); previous = curr; } return graph; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Graph createGraph() {\n String fileName;\n// fileName =\"./428333.edges\";\n String line;\n Graph g = new Graph();\n// List<String> vertexNames = new ArrayList<>();\n// try\n// {\n// BufferedReader in=new BufferedReader(new FileReader(fileName));\n...
[ "0.5959954", "0.59106827", "0.58962923", "0.58578384", "0.5764308", "0.570903", "0.55628824", "0.55119574", "0.54777765", "0.5464851", "0.5410033", "0.54074556", "0.5388436", "0.53869593", "0.53747773", "0.53078455", "0.5297588", "0.5289977", "0.52877057", "0.5276022", "0.526...
0.61914754
0
Initialize the contents of the frame.
private void initialize() { frame = new JFrame(); frame.setBounds(100, 100, 600, 600); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); card = new CardLayout(0, 0); frame.getContentPane().setLayout(card); JPanel panel = new JPanel(); panel.setBackground(Color.WHITE); frame.getContentPane().add(panel, "name_6126640247321"); panel.add(cdFilmePanel); JPanel panel_1 = new JPanel(); panel_1.setBackground(Color.WHITE); frame.getContentPane().add(panel_1, "name_6128366176959"); panel_1.add(fdFilmePanel); JMenuBar menuBar = new JMenuBar(); frame.setJMenuBar(menuBar); JMenu mnNewMenu = new JMenu("Filmes"); menuBar.add(mnNewMenu); JMenuItem mntmNewMenuItem_1 = new JMenuItem("New menu item"); mntmNewMenuItem_1.setAction(action); mnNewMenu.add(mntmNewMenuItem_1); JMenuItem mntmNewMenuItem = new JMenuItem("New menu item"); mntmNewMenuItem.setAction(action_1); mnNewMenu.add(mntmNewMenuItem); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BreukFrame() {\n super();\n initialize();\n }", "public MainFrame() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "private void initialize() {\n\t\tthis.setSize(211, 449);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setTitle(\"JFrame\");\n\t}", "public SiscobanFrame() {\r\n\t\tsuper();\r...
[ "0.77689224", "0.7563363", "0.74401903", "0.7367074", "0.7364635", "0.735602", "0.7312278", "0.73067313", "0.72965485", "0.72960347", "0.72767437", "0.72702324", "0.7268066", "0.7268066", "0.7213252", "0.7179349", "0.7167731", "0.71392417", "0.71390206", "0.7125134", "0.71056...
0.0
-1
A PerceptronClassifier uses the perceptron learning rule (AIMA Eq. 18.7): w_i \leftarrow w_i+\alpha(yh_w(x)) \times x_i
public void update(double[] x, double y, double alpha) { // This must be implemented by you double h = threshold(VectorOps.dot(this.weights, x)); for (int i=0; i<this.weights.length; i++) { this.weights[i] += alpha * (y - h) * x[i]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void trainPerceptrons(){\n double activationValues[] = new double[4];\n for(Image image:asciiReader.getTrainingImages()){\n for (int j = 0 ; j < activationValues.length; j++){\n activationValues[j] = activationFunction\n .apply(sumWeights(j,ima...
[ "0.74658084", "0.7153421", "0.71528596", "0.6784588", "0.67029476", "0.6308507", "0.6227396", "0.618563", "0.6175156", "0.61550665", "0.60143244", "0.58034253", "0.56324476", "0.53418416", "0.53201884", "0.52975976", "0.5163601", "0.51106817", "0.50849354", "0.50377923", "0.5...
0.45157638
63
A PerceptronClassifier uses a hard 0/1 threshold.
public double threshold(double z) { // This must be implemented by you if(z>=0) { return 1; }else { return 0; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void trainPerceptron() {\n\t\t// Creates a log of that contains the percentage each epoch got correct\n\t\tint numWrong = images.size();\n\t\tint numReps = 0;\n\n\t\t// Repeat the training process TIMES_TO_REPEAT number of times or until\n\t\t// there are none wrong\n\t\tfor (int repetition = 0; repetition...
[ "0.63867027", "0.62319285", "0.6045955", "0.6042826", "0.60101885", "0.5971131", "0.59281874", "0.591782", "0.5880612", "0.55601805", "0.5513482", "0.52939224", "0.52925515", "0.5272057", "0.5240243", "0.52320755", "0.5145216", "0.51449823", "0.5110173", "0.5055128", "0.50446...
0.47205046
61
The function checks if the username exist, in case of positive answer HttpStatus in HttpServletResponse should be set to HttpStatus.CONFLICT, else insert the user to the system and set to HttpStatus in HttpServletResponse HttpStatus.OK
@RequestMapping(value = "register_new_customer", method = { RequestMethod.POST }) public void registerNewUser(@RequestParam("username") String username, @RequestParam("password") String password, @RequestParam("firstName") String firstName, @RequestParam("lastName") String lastName, HttpServletResponse response) { System.out.println(username + " " + password + " " + lastName + " " + firstName); try { // In case the user already exist, show error to the user if (isExistUser(username)) { HttpStatus status = HttpStatus.CONFLICT; response.setStatus(status.value()); } else { // Create Mongo client MongoClient mongoClient = new MongoClient("localhost", 27017); MongoDatabase db = mongoClient.getDatabase("projectDB"); // Create Users collection MongoCollection<Document> collection = db.getCollection("USERS"); // Create user document and add to users collection Document document = new Document("username", username).append("password", password) .append("firstName", firstName).append("lastName", lastName) .append("RegistrationDate", new Date()); collection.insertOne(document); System.out.println("Document inserted successfully"); //Close DB connection and send OK message to the user mongoClient.close(); HttpStatus status = HttpStatus.OK; response.setStatus(status.value()); } } catch (Exception e) { System.out.println(e); HttpStatus status = HttpStatus.CONFLICT; response.setStatus(status.value()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void whenFetchingExistingUserReturn200() throws Exception {\n UserRegistrationRequestDTO request = getSampleRegistrationRequest();\n long userId = api.registerUser(request).execute().body();\n\n // when fetching user details\n Response<UserDTO> response = api.getUserDe...
[ "0.6898705", "0.689064", "0.66457725", "0.6460312", "0.6431024", "0.6395562", "0.6388038", "0.6384723", "0.6367195", "0.6359834", "0.6350159", "0.6329772", "0.6294451", "0.6293061", "0.6291142", "0.6283558", "0.62797076", "0.6241704", "0.62292904", "0.62215173", "0.6201681", ...
0.0
-1
The function returns true if the received username exist in the system otherwise false
@RequestMapping(value = "is_exist_user", method = { RequestMethod.GET }) public boolean isExistUser(@RequestParam("username") String username) throws IOException { System.out.println(username); boolean result = true; MongoClient mongoClient = null; try { // Create Mongo client mongoClient = new MongoClient("localhost", 27017); MongoDatabase db = mongoClient.getDatabase("projectDB"); // Create Users collection and user document MongoCollection<Document> collection = db.getCollection("USERS"); Document myDoc = collection.find(eq("username", username)).first(); //In case no document in the collection match the condition, the user not exist in the DB if (myDoc == null) { mongoClient.close(); return false; } //Close DB connection mongoClient.close(); } catch (Exception e) { mongoClient.close(); System.out.println(e); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean userNameExist(String username);", "public Boolean isUsernameExist(String username);", "boolean isUsernameExist(String username);", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();...
[ "0.89271784", "0.8784113", "0.8725657", "0.8516042", "0.8516042", "0.8516042", "0.8516042", "0.8516042", "0.8516042", "0.8363363", "0.8273814", "0.8260506", "0.8147448", "0.8083626", "0.80096114", "0.79937935", "0.7969036", "0.79349273", "0.78953797", "0.7840845", "0.7837379"...
0.70588666
71
The function returns true if the received username and password match a system storage entry, otherwise false
@RequestMapping(value = "validate_user", method = { RequestMethod.POST }) public boolean validateUser(@RequestParam("username") String username, @RequestParam("password") String password) throws IOException { System.out.println(username + " " + password); boolean result = false; MongoClient mongoClient = null; try { // Create Mongo client mongoClient = new MongoClient("localhost", 27017); MongoDatabase db = mongoClient.getDatabase("projectDB"); // Create Users collection and user document MongoCollection<Document> collection = db.getCollection("USERS"); Document myDoc = collection.find(eq("username", username)).first(); // No user in the collection with the given username if (myDoc == null) { mongoClient.close(); return false; } else { // Check for password mongoClient.close(); result = myDoc.get("password").equals(password); } //Close DB connection mongoClient.close(); } catch (Exception e) { mongoClient.close(); System.out.println(e); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract boolean checkCredentials (String username, String password);", "private static boolean admin(String username, String password) {\r\n\t\tFile file = new File(\"admin.txt\");\r\n\t\tScanner scanner;\r\n\t\tString user = null;\r\n\t\tString pwd = null;\r\n\t\ttry {\r\n\t\t\tscanner = new Scanner(fil...
[ "0.7185651", "0.6903452", "0.6866181", "0.6801031", "0.6763969", "0.66979706", "0.66781723", "0.6586215", "0.65681046", "0.6545066", "0.6516176", "0.6508688", "0.64528334", "0.64293635", "0.64221257", "0.6418632", "0.6391839", "0.63797796", "0.63749194", "0.63726383", "0.6340...
0.0
-1
The function retrieves number of the registered users in the past n days
@SuppressWarnings("deprecation") @RequestMapping(value = "get_number_of_registred_users", method = { RequestMethod.GET }) public int getNumberOfRegistredUsers(@RequestParam("days") int days) throws IOException { System.out.println(days + ""); int result = 0; MongoClient mongoClient = null; try { // Create the date before n days Date startDate = new Date(); startDate.setDate(startDate.getDate() - days); startDate.setHours(0); startDate.setMinutes(0); startDate.setSeconds(0); // Create Mongo client mongoClient = new MongoClient("localhost", 27017); MongoDatabase db = mongoClient.getDatabase("projectDB"); // Create Users collection MongoCollection<Document> collection = db.getCollection("USERS"); // Get all user before n days FindIterable<Document> iterDoc = collection.find(gt("RegistrationDate", startDate)); Iterator it = iterDoc.iterator(); while (it.hasNext()) { it.next(); result++; } // Close DB connection mongoClient.close(); } catch (Exception e) { mongoClient.close(); System.out.println(e); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getMessageCounterHistoryDayLimit();", "public int getNumberOfNewerOnUserActivities(Identity ownerIdentity, Long sinceTime);", "int getUsersCount();", "int getUsersCount();", "int getUsersCount();", "public int getNumberOfOlderOnUserActivities(Identity ownerIdentity, Long sinceTime);", "int getUserC...
[ "0.64240754", "0.63347626", "0.63143706", "0.63143706", "0.63143706", "0.62131137", "0.6205446", "0.6205446", "0.61731756", "0.6158484", "0.615505", "0.5969962", "0.5952294", "0.5920685", "0.59170794", "0.5912049", "0.58635896", "0.5859096", "0.5852567", "0.5846927", "0.57926...
0.714399
0
The function retrieves all the users
@RequestMapping(value = "get_all_users", headers = "Accept=*/*", method = { RequestMethod.GET }, produces = "application/json") @ResponseBody @org.codehaus.jackson.map.annotate.JsonView(User.class) public User[] getAllUsers() { ArrayList<User> users = new ArrayList<>(); MongoClient mongoClient = null; try { // Create Mongo client mongoClient = new MongoClient("localhost", 27017); MongoDatabase db = mongoClient.getDatabase("projectDB"); // Create Users collection MongoCollection<Document> collection = db.getCollection("USERS"); FindIterable<Document> iterDoc = collection.find(); // Create all users collection int i = 1; Iterator it = iterDoc.iterator(); while (it.hasNext()) { Document docUser = (Document) it.next(); User user = new User((String) docUser.get("username"), (String) docUser.get("firstName"), (String) docUser.get("lastName")); users.add(user); } // Close DB connection mongoClient.close(); } catch (Exception e) { mongoClient.close(); System.out.println(e); } // Insert list to array User[] usersArray = new User[users.size()]; users.toArray(usersArray); return usersArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List getAllUsers();", "public List<User> getAllUsers();", "List<User> getAllUsers();", "List<User> getAllUsers();", "public void getAllUsers() {\n\t\t\n\t}", "public List<User> getAllUsers(){\n myUsers = loginDAO.getAllUsers();\n return myUsers;\n }", "Iterable<User> getAllUsers...
[ "0.87929666", "0.86154795", "0.85068935", "0.85068935", "0.83694714", "0.83441687", "0.83380973", "0.8228831", "0.8154644", "0.81355804", "0.8127571", "0.8124158", "0.8119746", "0.81188065", "0.81071657", "0.8106824", "0.8097273", "0.80845255", "0.8080779", "0.8080779", "0.80...
0.0
-1
TODO Autogenerated method stub
@Override public Act3370102 findOneByKyBaoCao(String kyBaoCao) { return act3370102Repo.findOneByKy(kyBaoCao); }
{ "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 deleteByKyBaoCao(String ky) { act3370102Repo.deleteByKy(ky); }
{ "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 deleteByKyBaoCaoAndUserId(String ky, String userId) { act3370102Repo.deleteByKyAndUsrId(ky, userId); }
{ "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
Initialize the contents of the frame.
private void initialize(PeerList peerList, Peer user) { client = new Client(peerList,user); frame = new JFrame(); frame.setBounds(100, 100, 880, 584); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); client.setConnected(true); client.listenServer(); client.listenPeers(); if(peerList.getList().size()>0) { for(Peer aPeer:peerList.getList()) { if(!(aPeer.getUsername().compareTo(theUser.getUsername())==0)){ listModel.add(modelIndex,aPeer.getUsername()); modelIndex++; } if(modelIndex>0) { list = new JList<String>(listModel); } else { listModel.add(0, "No Peers Online"); list = new JList<String>(listModel); } } } else { listModel.add(0, "No Peers Online"); list = new JList<String>(listModel); } list.setFont(new Font("Tahoma", Font.PLAIN, 14)); list.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent evt) { JList<String> list = (JList<String>)evt.getSource(); if (evt.getClickCount() == 2) { // When the user double clicks on the peer list, the messageList gets populated // with the messages from that peers conversation. int index = list.locationToIndex(evt.getPoint()); String peerName = list.getComponent(index).toString(); selectedPeer = peerList.getPeer(peerName); if (!selectedPeer.getMessageList().isEmpty()) { String peerMessages = selectedPeer.getMessageListString(); messageListContent.setText(peerMessages); } } } }); JLabel lblPeers = new JLabel("Peers"); lblPeers.setFont(new Font("Tahoma", Font.PLAIN, 22)); JLabel lblmessageListContent = new JLabel("Message List:"); lblmessageListContent.setFont(new Font("Tahoma", Font.PLAIN, 22)); JLabel lblMessage = new JLabel("Message:"); lblMessage.setFont(new Font("Tahoma", Font.PLAIN, 22)); messageListContent = new JTextArea(); messageListContent.setLineWrap(true); messageListContent.setFont(new Font("Monospaced", Font.PLAIN, 15)); messageListContent.setEditable(false); JTextArea messageBox = new JTextArea(); messageBox.setLineWrap(true); messageBox.setToolTipText("Enter your text here"); messageBox.setRows(5); JButton send = new JButton("Send"); //When the send button is clicked, the contents of the message box are cleared and sent to the selected peer. send.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if(selectedPeer != null) { Message sentMessage = new Message(messageBox.getText(),client.getTheUser().getUsername()); client.sendToPeer(sentMessage,selectedPeer,clientPort); messageListContent.append("Sent:"+sentMessage.toString()); messageBox.setText(null); } } }); JScrollPane scrollPane = new JScrollPane(messageListContent,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); GroupLayout groupLayout = new GroupLayout(frame.getContentPane()); groupLayout.setHorizontalGroup( groupLayout.createParallelGroup(Alignment.LEADING) .addGroup(groupLayout.createSequentialGroup() .addGap(35) .addGroup(groupLayout.createParallelGroup(Alignment.LEADING) .addComponent(lblPeers, GroupLayout.PREFERRED_SIZE, 217, GroupLayout.PREFERRED_SIZE) .addComponent(list, GroupLayout.PREFERRED_SIZE, 227, GroupLayout.PREFERRED_SIZE)) .addGap(48) .addGroup(groupLayout.createParallelGroup(Alignment.LEADING) .addComponent(lblmessageListContent, GroupLayout.PREFERRED_SIZE, 217, GroupLayout.PREFERRED_SIZE) .addComponent(lblMessage, GroupLayout.PREFERRED_SIZE, 217, GroupLayout.PREFERRED_SIZE) .addGroup(groupLayout.createSequentialGroup() .addComponent(messageBox, GroupLayout.PREFERRED_SIZE, 474, GroupLayout.PREFERRED_SIZE) .addPreferredGap(ComponentPlacement.RELATED) .addComponent(send)) .addGroup(groupLayout.createSequentialGroup() .addComponent(messageListContent, GroupLayout.PREFERRED_SIZE, 530, GroupLayout.PREFERRED_SIZE) .addPreferredGap(ComponentPlacement.RELATED) .addComponent(scrollPane, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))) .addGap(17)) ); groupLayout.setVerticalGroup( groupLayout.createParallelGroup(Alignment.TRAILING) .addGroup(groupLayout.createSequentialGroup() .addContainerGap() .addGroup(groupLayout.createParallelGroup(Alignment.BASELINE) .addComponent(lblmessageListContent, GroupLayout.PREFERRED_SIZE, 32, GroupLayout.PREFERRED_SIZE) .addComponent(lblPeers, GroupLayout.PREFERRED_SIZE, 32, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(groupLayout.createParallelGroup(Alignment.LEADING) .addGroup(Alignment.TRAILING, groupLayout.createSequentialGroup() .addGroup(groupLayout.createParallelGroup(Alignment.LEADING) .addGroup(groupLayout.createSequentialGroup() .addComponent(messageListContent, GroupLayout.PREFERRED_SIZE, 308, GroupLayout.PREFERRED_SIZE) .addGap(18) .addComponent(lblMessage, GroupLayout.PREFERRED_SIZE, 32, GroupLayout.PREFERRED_SIZE)) .addComponent(scrollPane, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(groupLayout.createParallelGroup(Alignment.LEADING, false) .addComponent(send, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(messageBox, GroupLayout.DEFAULT_SIZE, 88, Short.MAX_VALUE)) .addGap(14)) .addGroup(groupLayout.createSequentialGroup() .addComponent(list, GroupLayout.DEFAULT_SIZE, 463, Short.MAX_VALUE) .addContainerGap()))) ); frame.getContentPane().setLayout(groupLayout); JMenuBar menuBar = new JMenuBar(); frame.setJMenuBar(menuBar); JMenu mnFile = new JMenu("File"); menuBar.add(mnFile); JMenuItem mntmNewMenuItem = new JMenuItem("New menu item"); mnFile.add(mntmNewMenuItem); JMenuItem mntmNewMenuItem_1 = new JMenuItem("New menu item"); mnFile.add(mntmNewMenuItem_1); JMenu mnHelp = new JMenu("Help"); menuBar.add(mnHelp); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BreukFrame() {\n super();\n initialize();\n }", "public MainFrame() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "private void initialize() {\n\t\tthis.setSize(211, 449);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setTitle(\"JFrame\");\n\t}", "public SiscobanFrame() {\r\n\t\tsuper();\r...
[ "0.77704835", "0.75652915", "0.7442664", "0.7369101", "0.7366378", "0.7358479", "0.73146075", "0.73096764", "0.72987294", "0.72978777", "0.7278321", "0.72729623", "0.7269468", "0.7269468", "0.7215727", "0.7180792", "0.71682984", "0.7140954", "0.7140953", "0.7126852", "0.71079...
0.0
-1
Constructor Read All Data
public Cursor readAllData() { Cursor objCursor = readSQLite.query(TABLE_OFFICER, new String[]{COLUMN_ID_OFFICER, COLUMN_OFFICER, COLUMN_POSITION, COLUMN_IMAGE, COLUMN_VIDEO, COLUMN_SOUND}, null, null, null, null, null); if (objCursor != null) { objCursor.moveToFirst(); } return objCursor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Data() {}", "public InitialData(){}", "public Data() {\n }", "public Data() {\n }", "public mainData() {\n }", "public Data() {\n \n }", "public DatasetReader()\n\t{\n\t\treviews = new ArrayList<Review>();\n\t\tratings = new HashMap<Double,List<Double>>();\n\t\tproducts = new HashMa...
[ "0.6943403", "0.67737144", "0.67569536", "0.67569536", "0.6727562", "0.66795313", "0.6572503", "0.65443224", "0.65333205", "0.65128505", "0.6496244", "0.64855164", "0.64855164", "0.6471371", "0.6437841", "0.6435638", "0.64280987", "0.64067614", "0.6393235", "0.6392273", "0.63...
0.0
-1
Given a string, compute the relative frequency of each letter in that string.
private static HashMap<String, Double> ComputeRelativeFrequencyLetters(String text) { long length = text.length(); HashMap<String, Integer> freqMap = new HashMap<String, Integer>(); //Search through the string and count each character. for (int i = 0; i < length; i++) { char character = text.charAt(i); if ((character >= 'A' && character <= 'Z')) { int freq; //If we haven't seen this character yet, frequency is 1, otherwise, increment it. if (freqMap.get(Character.toString(character)) == null) { freq = 1; } else { freq = freqMap.get(Character.toString(character)) + 1; } freqMap.put(Character.toString(character), freq); } } HashMap<String, Double> relativeFreqMap = new HashMap<String, Double>(); long totalFreq = 0; //Find total frequency by adding all frequencies together. for (Entry<String, Integer> entry : freqMap.entrySet()) { totalFreq += entry.getValue(); } //Find relative frequency of all letters. for (Entry<String, Integer> entry : freqMap.entrySet()) { double relativeFreq = (double)entry.getValue() / (double)totalFreq; relativeFreqMap.put(entry.getKey(), relativeFreq); } return relativeFreqMap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int[] buildFrequencyTable(String s)\n{\n int[] table = new int [Character.getNumericValue('z') - Character.getNumericValue('a') + 1];\n for (char c : s.toCharArray())\n {\n int x = getCharNumber(c);\n if (x != -1) table[x]++;\n }\n return table;\n}", "@Override //old methd for letter...
[ "0.76649547", "0.7519262", "0.7261482", "0.7206413", "0.71254116", "0.69676393", "0.6892672", "0.68786484", "0.6793122", "0.677278", "0.67595816", "0.67077273", "0.65618914", "0.654267", "0.6539095", "0.6536824", "0.6514618", "0.6491028", "0.6457372", "0.6451825", "0.643792",...
0.75542015
1
Given a text string, calculate the frequency of all Digraphs in that string.
private static HashMap<String, Double> ComputeRelativeFrequencyDigraphs(String text) { long length = text.length(); //We need at least 2 characters. if (length <= 1) { return new HashMap<String, Double>(); } HashMap<String, Integer> freqMap = new HashMap<String, Integer>(); //Look at this character, and the next one to determine digraphs. for (int i = 0; i < length - 1; i++) { char character1 = text.charAt(i); char character2 = text.charAt(i+1); if (((character1 >= 'A' && character1 <= 'Z')) && ((character2 >= 'A' && character2 <= 'Z'))) { int freq; //If we haven't seen this combination yet, add it with a frequency of 1. if (freqMap.get("" + character1 + character2) == null) { freq = 1; } else { freq = freqMap.get("" + character1 + character2) + 1; } freqMap.put(("" + character1 + character2), freq); } } HashMap<String, Double> relativeFreqMap = new HashMap<String, Double>(); long totalFreq = 0; //Find total frequency by adding all frequencies together. for (Entry<String, Integer> entry : freqMap.entrySet()) { totalFreq += entry.getValue(); } //Find relative frequency of all letters. for (Entry<String, Integer> entry : freqMap.entrySet()) { double relativeFreq = (double)entry.getValue() / (double)totalFreq; relativeFreqMap.put(entry.getKey(), relativeFreq); } return relativeFreqMap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int[] buildFrequencyTable(String s)\n{\n int[] table = new int [Character.getNumericValue('z') - Character.getNumericValue('a') + 1];\n for (char c : s.toCharArray())\n {\n int x = getCharNumber(c);\n if (x != -1) table[x]++;\n }\n return table;\n}", "public static Map<Character,Inte...
[ "0.6300746", "0.60797715", "0.5829788", "0.5822353", "0.5784683", "0.5739376", "0.5727116", "0.564604", "0.5596313", "0.5579681", "0.55689275", "0.55619705", "0.5558072", "0.55118924", "0.551142", "0.54938906", "0.5464392", "0.54500157", "0.5387859", "0.53688747", "0.5329552"...
0.7400556
0
Given a hashmap of relative frequencies, draw a histogram of those frequencies.
private static void drawHistogram(HashMap<String, Double> map) { double maximumRelativeFrequency = 0; //Find maximum relative frequency. for (Entry<String, Double> entry : map.entrySet()) { if (maximumRelativeFrequency < entry.getValue()) { maximumRelativeFrequency = entry.getValue(); } } for (Entry<String, Double> entry : map.entrySet()) { System.out.print(entry.getKey() + ": "); System.out.printf("%5.2f%% : ", entry.getValue()*100); //Scale histogram to largest relative frequency. int stars = (int)((entry.getValue() / maximumRelativeFrequency) * 70.0); for (int i = 0; i < stars; i++) { System.out.print("*"); } System.out.println(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addHistogram2map(HashMap<String, double[][]> map, double[] histValues, String key, int iteration) {\r\n if (!map.containsKey(key)) {\r\n map.put(key, new double[nRandomisations][]);\r\n }\r\n double[][] values = map.get(key);\r\n values[iteration] = histValues;\r...
[ "0.6154941", "0.6129387", "0.612876", "0.6066822", "0.5921427", "0.5870553", "0.5735457", "0.56918544", "0.56804395", "0.5641067", "0.56148684", "0.5610541", "0.5594893", "0.55906636", "0.55691475", "0.5561908", "0.55001074", "0.54810274", "0.54656523", "0.5459856", "0.544220...
0.8371269
0
Converts a map of pojos keyed by string to a map of adapters keyed by the same strings.
private Map<String, ObjectAdapter> wrap(final Map<String, Object> argumentsByParameterName) { final Map<String, ObjectAdapter> argumentsAdaptersByParameterName = _Maps.newHashMap(); for (final Map.Entry<String, Object> entry : argumentsByParameterName.entrySet()) { final String parameterName = entry.getKey(); final Object argument = argumentsByParameterName.get(parameterName); final ObjectAdapter argumentAdapter = argument != null ? adapterProvider.apply(argument) : null; argumentsAdaptersByParameterName.put(parameterName, argumentAdapter); } return argumentsAdaptersByParameterName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void convertitMap(Map<String, Object> map) {\n\t\t\n\t}", "public Map toMap(Map<String, Object> map) {\n return super.toMap(map);\n }", "public abstract Map<String, Serializable> toMap();", "public Object[] adapt( Map<String, Object> objs, Object arg );", "public abstract Map<String...
[ "0.61853176", "0.5623682", "0.5528374", "0.5394871", "0.5358266", "0.5227834", "0.51846987", "0.5118246", "0.509647", "0.5085768", "0.5014969", "0.49510762", "0.49348825", "0.49276257", "0.49251962", "0.49148145", "0.49069482", "0.4901916", "0.48805943", "0.4864017", "0.48591...
0.5150836
7
Type your code here
int main() { int i,n; float arr [100]; cin >> n; for(i=0;i<n;++i) { cin >> arr[i]; } for(i=1;i<n;++i) { if(arr[0]<arr[i]) arr[0]=arr[i]; } cout<< arr[0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void generateCode()\n {\n \n }", "@Override\r\n\tpublic void code() {\n\t\tus.code();\r\n\t\tSystem.out.println(\"我会java...\");\r\n\t}", "@Override\r\n\tpublic void code() {\n\t\tSystem.out.println(\"我会C语言....\");\r\n\t}", "CD withCode();", "Code getCode();", "private void sear...
[ "0.67529005", "0.65678793", "0.641418", "0.6334503", "0.6230944", "0.62127316", "0.6207898", "0.60968196", "0.6072467", "0.606349", "0.606349", "0.606349", "0.606349", "0.606349", "0.59795964", "0.58908486", "0.58157927", "0.5754923", "0.57194966", "0.57184726", "0.5709211", ...
0.0
-1
private int index = 1;
public SetExtensionPolicyCommand(ESequenceValue value, EExtensionPolicy policy) { this.policy = policy; this.value = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getIndex(){\r\n\t\treturn index;\r\n\t}", "public int getIndex(){\n return index;\n }", "public int getIndex(){\n return index;\n }", "public int getIndex(){\r\n \treturn index;\r\n }", "public int getIndex(){\n\t\treturn index;\n\t}", "public int getIndex(){\n\t\treturn ind...
[ "0.8250513", "0.8245695", "0.8245695", "0.8089802", "0.7864802", "0.7864802", "0.7864802", "0.78540635", "0.7845596", "0.7813455", "0.77428925", "0.77297086", "0.771101", "0.76551473", "0.76475435", "0.760967", "0.760967", "0.7598095", "0.757259", "0.75489503", "0.7545127", ...
0.0
-1
Validates given config, returns it on success or throws exception on error
public static Config checkValid(Config config) { ConfigValidator validator = new ConfigValidator(config); try { checkNotNull(config); validator.checkLogLevel(); validator.checkAuthAtMain(); validator.checkAuthXMain(); validator.checkAuthSessionId(); validator.checkAuthSessionToken(); validator.checkAuthUbidMain(); validator.checkAuthControl(); validator.checkMode(); validator.checkList(); validator.checkDocumentSourceTypes(); validator.checkComparators(); validator.checkUserAgent(); validator.checkYearDeviation(); validator.checkTimeout(); validator.checkDataBase(); } catch (NullPointerException | IllegalArgumentException e) { throw new ConfigException.Generic(e.getMessage(), e); } return config; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void validateConfiguration() {}", "protected void validate() throws ConfigurationException\n {\n\n }", "public Configuration(Config config){\n String error = fromConfig(config);\n if(errors){\n throw new RuntimeException(error);\n }\n }", "@Test\n public fina...
[ "0.6898073", "0.6635496", "0.61910605", "0.6051384", "0.60436136", "0.5955297", "0.5922552", "0.5904733", "0.5893993", "0.58152354", "0.5796822", "0.57673836", "0.57656723", "0.57634836", "0.57359535", "0.5720482", "0.5705048", "0.56765497", "0.5574255", "0.5561268", "0.55447...
0.72165704
0
Checks the db and db.additional settings
private void checkDataBase() { final Config dbConfig = config.getConfig("db"); checkArgument(!isNullOrEmpty(dbConfig.getString("driver")), "db.driver is not set!"); checkArgument(!isNullOrEmpty(dbConfig.getString("url")), "db.url is not set!"); dbConfig.getString("user"); dbConfig.getString("password"); dbConfig.getObject("additional"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic boolean checkdbconfig() {\n\t\t// get path\n\t\tString path = context.getRealPath(\"/\");\n\t\tString dbpath = path + Utility.DB_PATH;\n\t\tString dbconfig = \"\";\n\t\tFileInputStream fileInputStreamSystemSettings = null;\n\t\tProperties prop = new Properties();\n\t\ttry {\n\t\t\tfileInputStre...
[ "0.65499556", "0.6523141", "0.6057843", "0.601901", "0.5827478", "0.575533", "0.5711237", "0.5700962", "0.5681436", "0.56628084", "0.56608784", "0.56476337", "0.56476337", "0.56059545", "0.55940443", "0.55918366", "0.5586424", "0.5564708", "0.5560933", "0.55395824", "0.552310...
0.7417245
0
Checks the log_level string
private void checkLogLevel() { config.getString("log_level"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean isValidLogLevel(int level) {\n\t\tif ((level == BackupLogger.INFO) || (level == BackupLogger.DETAIL)\n\t\t\t\t|| (level == BackupLogger.WARN) || (level == BackupLogger.TRACE)) {\n\t\t\treturn true;\n\t\t} else return false;\n\t}", "public static int getLevel(){\n\treturn logLevel;\n }", ...
[ "0.66294265", "0.6075189", "0.6074244", "0.59451663", "0.5912221", "0.5902757", "0.58801305", "0.57990634", "0.57826674", "0.5760973", "0.5676139", "0.5651038", "0.56348646", "0.56256694", "0.5624688", "0.5607606", "0.56006426", "0.5560052", "0.55320334", "0.5523896", "0.5511...
0.76868004
0
Checks the user_agent string
private void checkUserAgent() { val userAgent = config.getString("user_agent"); checkArgument(!isNullOrEmpty(userAgent), "user_agent is not set!"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasUserAgent();", "public static boolean isBrowser(String[] nonBrowserUserAgents, HttpServletRequest request) {\n String userAgent = request.getHeader(\"User-Agent\");\n LOG.debug(\"User agent is \" + userAgent);\n if (userAgent == null) {\n return false;\n }\n ...
[ "0.71689546", "0.6519654", "0.6286295", "0.61936563", "0.6121509", "0.6111107", "0.61019546", "0.60678947", "0.5838012", "0.5823163", "0.58209264", "0.58199704", "0.5780537", "0.57566315", "0.57512915", "0.5743594", "0.5664482", "0.5642523", "0.56274194", "0.55758977", "0.557...
0.7864729
0
Checks the year_deviation int
private void checkYearDeviation() { val yearDeviation = config.getInt("year_deviation"); checkArgument(yearDeviation > 0, "year_deviation is less than or equal to 0!"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void isLeapYear() {\n assertFalse(Deadline.isLeapYear(Integer.parseInt(VALID_YEAR_2018)));\n\n // Valid leap year -> returns true\n assertTrue(Deadline.isLeapYear(Integer.parseInt(LEAP_YEAR_2020)));\n\n // Valid year divisible by 4 but is common year -> returns false\n...
[ "0.6825966", "0.66212696", "0.65100545", "0.64896494", "0.64846843", "0.6484369", "0.645032", "0.6436598", "0.6427734", "0.6375611", "0.6351741", "0.63369745", "0.6331127", "0.63286763", "0.63221705", "0.63217956", "0.63196933", "0.6318459", "0.6303136", "0.63008064", "0.6267...
0.8691367
0
Checks the timeout int
private void checkTimeout() { val timeout = config.getInt("timeout"); checkArgument(timeout >= 1000, "timeout is less than 1000!"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void isTimeout(long ms);", "private void checkTimeout() {\n/* 169 */ if (this.socket != null) {\n/* */ \n/* 171 */ long i = this.keepaliveTimeoutMs;\n/* */ \n/* 173 */ if (this.listRequests.size() > 0)\n/* */ {\n/* 175 */ i = 5000L;\n/* */...
[ "0.79481643", "0.7419109", "0.7151549", "0.7090888", "0.70721304", "0.70225406", "0.69848764", "0.6828901", "0.68051845", "0.6746278", "0.6731712", "0.6633688", "0.6607975", "0.6594529", "0.656681", "0.65509844", "0.65329474", "0.6481499", "0.6411143", "0.6353764", "0.6350468...
0.84228355
0
Checks the query_format string
private void checkDocumentSourceTypes() { val message = "document_source_types is not valid!"; val documentSourceTypes = config.getStringList("document_source_types"); if (documentSourceTypes.contains(DocumentSourceType.OMDB.name())) { val omdbApiKey = config.getString("omdbApiKey"); checkArgument(!isNullOrEmpty(omdbApiKey), "OMDB API KEY must be set for using OMDB as source. \n" + "You can obtain one here: http://www.omdbapi.com/apikey.aspx"); } try { documentSourceTypes.forEach(DocumentSourceType::valueOf); } catch (IllegalArgumentException e) { throw new IllegalArgumentException(message); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void checkFormat(String queryString) throws WrongQueryFormatException {\n\t\tString filters[] = queryString.split(\" \");\n\t\tif (filters.length != 7)\n\t\t\tthrow new WrongQueryFormatException(\n\t\t\t\t\t\"the query should be in this format-- QUERY <IP_ADDRESS> <CPU_ID> <START_DATE> <START_HOUR:ST...
[ "0.76538837", "0.63320124", "0.62937236", "0.58807445", "0.5770947", "0.57396173", "0.5724959", "0.57191294", "0.5656323", "0.55946714", "0.55779815", "0.5559525", "0.54451346", "0.5437078", "0.541525", "0.5404432", "0.5382357", "0.53506553", "0.5240209", "0.5216756", "0.5214...
0.0
-1
Checks the comparators string list
private void checkComparators() { val message = "Comparators setting is not valid!"; val comparators = config.getStringList("comparators"); try { comparators.forEach(MovieComparator.Type::valueOf); } catch (IllegalArgumentException e) { throw new IllegalArgumentException(message); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkListOrder(String[] sortedList, Collator c) {\n for (int i = 0; i < sortedList.length - 1; i++) {\n if (c.compare(sortedList[i], sortedList[i + 1]) >= 0) {\n errln(\"List out of order at element #\" + i + \": \"\n + sortedList[i] + \" >= \"\n...
[ "0.6172035", "0.6043834", "0.57390547", "0.5666309", "0.55560476", "0.5520303", "0.54746133", "0.540282", "0.5380928", "0.5334062", "0.5302689", "0.52845657", "0.5257833", "0.5238156", "0.5226067", "0.5206425", "0.5202909", "0.51900905", "0.51900905", "0.51900905", "0.5187765...
0.76884806
0
Checks the auth atmain string
private void checkAuthAtMain() { val auth = config.getString("authAtMain"); checkArgument(auth.length() > 10, "auth string (at-main) length is less than or equal to 10!"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkAuthUbidMain() {\n val auth = config.getString(\"authUbidMain\");\n\n checkArgument(auth.length() > 10, \"auth string (ubid-main) length is less than or equal to 10!\");\n }", "private void checkAuthControl() {\n val authKey = config.getString(\"authControlKey\");\n ...
[ "0.75150126", "0.74573493", "0.74476945", "0.6950745", "0.65991545", "0.64647746", "0.6432034", "0.63737977", "0.63118625", "0.63118625", "0.63118625", "0.6277698", "0.6239169", "0.62177277", "0.62089014", "0.6163429", "0.5984868", "0.59394944", "0.5904183", "0.5817632", "0.5...
0.84365606
0
Checks the auth xmain string
private void checkAuthXMain() { val auth = config.getString("authXMain"); checkArgument(auth.length() > 10, "auth string (x-main) length is less than or equal to 10!"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkAuthAtMain() {\n val auth = config.getString(\"authAtMain\");\n\n checkArgument(auth.length() > 10, \"auth string (at-main) length is less than or equal to 10!\");\n }", "private void checkAuthUbidMain() {\n val auth = config.getString(\"authUbidMain\");\n\n check...
[ "0.80101097", "0.7541442", "0.69882154", "0.64909357", "0.62748986", "0.61584765", "0.6040214", "0.5921183", "0.58430934", "0.5818136", "0.57469106", "0.5667527", "0.5662255", "0.5655503", "0.5655503", "0.5655503", "0.5609031", "0.55256784", "0.5509318", "0.5496828", "0.54769...
0.86980283
0
Checks the auth session id string
private void checkAuthSessionId() { val auth = config.getString("authSessionId"); checkArgument(auth.length() > 10, "auth string (sessionId) length is less than or equal to 10!"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkAuthSessionToken() {\n val auth = config.getString(\"authSessionToken\");\n\n checkArgument(auth.length() > 10, \"auth string (sessionToken) length is less than or equal to 10!\");\n }", "boolean hasSessionId();", "boolean hasSessionId();", "boolean hasSessionId();", "boo...
[ "0.743868", "0.63911045", "0.63911045", "0.63911045", "0.63911045", "0.63911045", "0.63911045", "0.63799715", "0.6290956", "0.62607", "0.6203184", "0.61655307", "0.61655307", "0.615579", "0.61359096", "0.61057794", "0.60446066", "0.6033314", "0.5971736", "0.59501994", "0.5945...
0.85234946
0
Checks the auth session token string
private void checkAuthSessionToken() { val auth = config.getString("authSessionToken"); checkArgument(auth.length() > 10, "auth string (sessionToken) length is less than or equal to 10!"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkAuthSessionId() {\n val auth = config.getString(\"authSessionId\");\n\n checkArgument(auth.length() > 10, \"auth string (sessionId) length is less than or equal to 10!\");\n }", "protected void validateToken() {\n\n authToken = preferences.getString(getString(R.string.au...
[ "0.7457813", "0.69652647", "0.67738324", "0.67035395", "0.6503571", "0.6498225", "0.64041287", "0.63988715", "0.6359072", "0.635505", "0.63294894", "0.630247", "0.6280432", "0.6280432", "0.6280432", "0.6280432", "0.6280432", "0.6280432", "0.62700564", "0.6263692", "0.61784685...
0.85516906
0
Checks the auth ubidmain string
private void checkAuthUbidMain() { val auth = config.getString("authUbidMain"); checkArgument(auth.length() > 10, "auth string (ubid-main) length is less than or equal to 10!"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkAuthAtMain() {\n val auth = config.getString(\"authAtMain\");\n\n checkArgument(auth.length() > 10, \"auth string (at-main) length is less than or equal to 10!\");\n }", "private void checkAuthXMain() {\n val auth = config.getString(\"authXMain\");\n\n checkArgume...
[ "0.8023687", "0.7315773", "0.7094304", "0.65884924", "0.6421431", "0.60144335", "0.6010524", "0.5795344", "0.57921684", "0.5776141", "0.5776141", "0.5776141", "0.5734299", "0.57206494", "0.56889296", "0.5683195", "0.56536657", "0.5562226", "0.55159867", "0.5515181", "0.551232...
0.8693198
0
Checks the auth control pair
private void checkAuthControl() { val authKey = config.getString("authControlKey"); val authValue = config.getString("authControlValue"); checkArgument(authKey.length() > 2, "auth string (control key) length is less than or equal to 2!"); checkArgument(authValue.length() > 2, "auth string (control value) length is less than or equal to 2!"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean authNeeded();", "private void checkAuthAtMain() {\n val auth = config.getString(\"authAtMain\");\n\n checkArgument(auth.length() > 10, \"auth string (at-main) length is less than or equal to 10!\");\n }", "boolean hasAuth();", "@Override\n public boolean check() {\n return ...
[ "0.71252835", "0.69369537", "0.68943256", "0.67720556", "0.668397", "0.6521539", "0.650699", "0.64679235", "0.6441667", "0.6360892", "0.6350228", "0.62719434", "0.6249797", "0.62469673", "0.6217377", "0.62060153", "0.6175462", "0.6115119", "0.6061613", "0.605529", "0.60116136...
0.8389808
0
Checks the list string
private void checkList() { val list = config.getString("list"); val mode = config.getString("mode"); if (isNullOrEmpty(list)) { MovieHandler.Type type = MovieHandler.Type.valueOf(mode); if (type.equals(MovieHandler.Type.COMBINED) || type.equals(MovieHandler.Type.ADD_TO_WATCHLIST)) { throw new IllegalArgumentException("list is not set, but required for current mode!"); } } else { checkArgument(list.startsWith("ls") || list.equals("watchlist"), "list doesn't start with ls prefix!"); checkArgument(list.length() >= 3, "list string length less than 3!"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 1;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 1;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\tr...
[ "0.6880555", "0.6880555", "0.6880555", "0.6875421", "0.68246084", "0.68246084", "0.68246084", "0.68246084", "0.68246084", "0.68246084", "0.6822071", "0.66997826", "0.66997826", "0.6674975", "0.63449544", "0.6313334", "0.62978506", "0.62032366", "0.61449224", "0.6098329", "0.6...
0.6779564
11
Checks the mode string
private void checkMode() { val mode = config.getString("mode"); if (!EnumUtils.isValidEnum(MovieHandler.Type.class, mode)) { throw new IllegalArgumentException("mode is not valid!"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected boolean compareModeStrings(final String source, String mode) {\r\n\t\t// Allow multiple spaces\r\n\t\tmode = mode.replace(\" \", \"(?:[\\\\s]*)\");\r\n\r\n\t\t// Create pattern object, ignore case sensitive chars.\r\n\t\tfinal Pattern pattern = Pattern.compile(\"(\" + mode + \")\", Pattern.CASE_INSENSITI...
[ "0.7071382", "0.6968641", "0.67482287", "0.67454547", "0.62222964", "0.6131625", "0.606369", "0.6018974", "0.5990011", "0.58819467", "0.5828322", "0.58154917", "0.5799873", "0.57898057", "0.57680464", "0.5761016", "0.5760183", "0.5748193", "0.5722793", "0.56863564", "0.568544...
0.71614265
0
Primeiro precisamos copiar o tabuleiro pra podermos brincar direito
private void copiaTabuleiro () { Tabuleiro tab = Tabuleiro.getTabuleiro (); for (int i = 0; i < 8; i++) { for (int j = 0; j < 8; j++) Casa.copia (casa[i][j], tab.getCasa (i, j)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void writeIntoCSVFromTable() {\n try {\n backItUp(ROOT);\n backItUp(ROOT + Calendar.getInstance().getTime() + \"/\");\n } catch (Throwable e) {\n itsLogger.error(e.getMessage(), e);\n }\n\n }", "public void copiarComprobanteContabilidad() {\r...
[ "0.63208497", "0.6180567", "0.6047582", "0.6016436", "0.6014184", "0.6002217", "0.5995387", "0.5983121", "0.5861978", "0.5856897", "0.57780856", "0.5757266", "0.5734481", "0.57125086", "0.57045203", "0.569984", "0.56866074", "0.5675208", "0.56346524", "0.56329477", "0.5610608...
0.7258981
0
Do operations on [user] table
public interface UserRepo extends BaseRepo<User, Integer>, UserCustomRepo { public User findByUserEmail(String userEmail); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "User modifyUser(Long user_id, User user);", "@Override\r\n\tpublic int updateUser(Users user) {\n\t\treturn 0;\r\n\t}", "void update(User user) throws SQLException;", "public void getAllUsers() {\n\t\t\n\t}", "public void update(JTable tblUser)\n {\n int i = tblUser.getSelectedRow();\n \n ...
[ "0.6348393", "0.6193689", "0.6092406", "0.5981815", "0.59736824", "0.5955251", "0.59471667", "0.5946639", "0.5946421", "0.59104896", "0.5894118", "0.58727527", "0.58661044", "0.5857431", "0.58556783", "0.5844141", "0.5840577", "0.5829316", "0.58244723", "0.58168894", "0.58151...
0.0
-1
The method adds a new storage into list "storages".
public void addStorage(AbstractStorageOfFoods storage) { storages.add(storage); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addStorageSystem(URI storage, URI[] providers, boolean primaryProvider, String opId) throws InternalException;", "@Override\r\n\tpublic void addStorageUnit() {\r\n\t}", "public void addStorage(StackType option);", "private void initStorage() {\n storageList = new ItemsList();\n stor...
[ "0.69978595", "0.6848628", "0.6401925", "0.63949144", "0.6174116", "0.6124925", "0.6119696", "0.59944636", "0.5970229", "0.5964006", "0.59247494", "0.5902844", "0.5869836", "0.57208836", "0.5718256", "0.570732", "0.5695618", "0.5695049", "0.56750816", "0.56717306", "0.5625430...
0.7903242
0
The main method controls quality of food
public AbstractStorageOfFoods control(Food food, Date currentDate) { AbstractStorageOfFoods result = this.reallocateFood(food, currentDate); this.lowPrice(food, currentDate); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void cook(Food food) {\n //cook in pressure cooker\n }", "public static void main(String[] args)\n\t {\n\t \n\t Coffee coffee = new Coffee();\n\t Expresso espresso = new Expresso();\n\t Cappuccino cappuccino = new Cappuccino();\n\t \n\t \n\t final double SALES...
[ "0.6485694", "0.6451163", "0.64010286", "0.63029385", "0.6254628", "0.6179423", "0.61751825", "0.61399865", "0.61344165", "0.6128308", "0.611001", "0.60971487", "0.60914433", "0.6083961", "0.6082287", "0.6082065", "0.6051556", "0.6038935", "0.6038159", "0.6033238", "0.6026358...
0.0
-1
The methods reallocate food into the storage depending the shelf life of product.
private AbstractStorageOfFoods reallocateFood(Food food, Date currentDate) { AbstractStorageOfFoods result = null; for (AbstractStorageOfFoods storage : storages) { if (storage != null && storage.isAppropriate(food, currentDate)) { storage.add(food); result = storage; break; } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void Restock() {\n for (Ingredient ingredient : stock.keySet()) {\n stock.put(ingredient, inventoryMax);\n }\n }", "private void reallocate(){\n capacity = 2 * capacity;\n theData = Arrays.copyOf(theData, capacity);\n }", "public static void gained() {\n\t\tP...
[ "0.6214184", "0.608027", "0.59825677", "0.59360164", "0.5858061", "0.5829473", "0.5799281", "0.57361877", "0.5731226", "0.5701021", "0.5680614", "0.56802064", "0.5656092", "0.5636025", "0.5615855", "0.5614843", "0.56103027", "0.5605919", "0.56022745", "0.5544424", "0.5534992"...
0.72363544
0
The methods low price of food.
private void lowPrice(Food food, Date currentDate) { if (food.getShelfLifeOfProductInPercent(currentDate) > START_SHELF_LIFE_OF_PRODUCT_IN_PERSENT_FOR_LOW_PRICE && food.getShelfLifeOfProductInPercent(currentDate) <= END_SHELF_LIFE_OF_PRODUCT_IN_PERSENT_FOR_LOW_PRICE) { food.setPriceByDiccount(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getPotatoesPrice();", "public double getLowPrice() {\r\n\t\treturn lowPrice;\r\n\t}", "public double getLowPrice() {\n return this.lowPrice;\n }", "@Override\n public int getPrice() {\n return 20;\n }", "@Override\n\tpublic float getPrice() {\n\t\treturn 70.0f;\n\t}", ...
[ "0.68966115", "0.68572456", "0.68366903", "0.6786103", "0.6697406", "0.669487", "0.6680185", "0.66578025", "0.664266", "0.6635256", "0.6623541", "0.6620752", "0.6620752", "0.6620752", "0.6617477", "0.6598059", "0.65957", "0.65818256", "0.65681624", "0.6561325", "0.6547063", ...
0.6817849
3
TODO: Prob just learning program relationship needed
@Override public Profile createProfile(Long educationProviderId, Long learningProgramId, Profile profile) { LearningProgram lProgram = learningProgramRepository.findByIdAndEducationProviderId(learningProgramId, educationProviderId) .orElseThrow(()-> new ResourceNotFoundException(String.format("Education provider with id: %s and " + "Learning program with id: %s were not found", learningProgramId))); profile.setEducationProvider(lProgram.getEducationProvider()); profile.setLearningProgram(lProgram); return profileRepository.save(profile); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Programming(){\n\t}", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "public static void main(String[]args) {\n\t\n\t\t\n\n}", "private static void cajas() {\n\t\t\n\t}", "private void strin() {\n\n\t}", "private void kk12() {\n\n\t}", "public static voi...
[ "0.57306516", "0.57076705", "0.5652904", "0.5627874", "0.56170404", "0.5598698", "0.55875957", "0.55742025", "0.5527465", "0.55133295", "0.55054086", "0.5503828", "0.5484519", "0.5452728", "0.54246503", "0.54212236", "0.54203945", "0.5407801", "0.5394608", "0.53891987", "0.53...
0.0
-1
TODO Autogenerated method stub
@Override public Object retrieveSerializedObject() { return explanation; }
{ "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 parse(InputStream iStream) throws LearningpodException { XStream xs = new XStream(); xs.autodetectAnnotations(true); xs.ignoreUnknownElements(); // set aliases xs.alias("learningpod",ExplanationBean.class); explanation = (ExplanationBean)xs.fromXML(iStream); }
{ "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
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.save_game, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.7249201", "0.7204109", "0.7197405", "0.71792436", "0.7109801", "0.7041446", "0.7040234", "0.70145714", "0.7011273", "0.6983118", "0.6946729", "0.6940447", "0.6936383", "0.6920103", "0.6920103", "0.6893587", "0.6885479", "0.6877562", "0.6877041", "0.6864375", "0.6864375", ...
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ...
[ "0.79036397", "0.78051436", "0.77656627", "0.7726445", "0.7630767", "0.76211494", "0.75842685", "0.75296193", "0.74868536", "0.74574566", "0.74574566", "0.7437983", "0.7422003", "0.7402867", "0.7391276", "0.73864174", "0.7378494", "0.73696834", "0.736246", "0.7355139", "0.734...
0.0
-1
if null, the SessionContext's value applies
public AbstractDateTimeField() { super(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic HttpSessionContext getSessionContext() {\n\t\treturn null;\n\t}", "private void saveAsCurrentSession(Context context) {\n \t// Save the context\n \tthis.context = context;\n }", "public void setSessionContext(String SessionContext) {\n this.SessionContext = SessionContext;\n...
[ "0.68018293", "0.65573734", "0.64271367", "0.6143757", "0.6093099", "0.60610753", "0.6056655", "0.5855892", "0.5821094", "0.5821094", "0.579492", "0.5769672", "0.57362086", "0.57307273", "0.5692915", "0.56885064", "0.5680264", "0.5667033", "0.56635755", "0.56519556", "0.56514...
0.0
-1
Getter/Setters for all private variables.
public int getRow() { return row; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private PropertyAccess() {\n\t\tsuper();\n\t}", "public void setPrivate()\n {\n ensureLoaded();\n m_flags.setPrivate();\n setModified(true);\n }", "protected void initVars() {}", "public Variables() {\n this.numCliente = 0;\n this.tiempoSalida = 999;\n }", "@Overri...
[ "0.60937804", "0.60911834", "0.60206866", "0.59100324", "0.5835575", "0.5683373", "0.5680681", "0.5631033", "0.5573536", "0.5557313", "0.55498976", "0.55481064", "0.55374026", "0.5500488", "0.5485559", "0.54424435", "0.5429628", "0.5403689", "0.53998834", "0.5397976", "0.5372...
0.0
-1
Return the next prism, if the laser hits a prism. Else this will return null.
public Prism getNext() { return next; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Area findBestNext(boolean type) {\n\t\tArea next = null;\n\t\tif (type) { // then current\n\t\t\tfor (Edge e : this.getPoly().getEdges()) {\n\t\t\t\tif (intersects(this.currents, e)) {\n\t\t\t\t\tif (this.getPoly() == e.getLeftSite().getPoly()) {\n\t\t\t\t\t\tnext = e.getRightSite().getPoly().getArea();\n\t...
[ "0.54116434", "0.51466197", "0.5109077", "0.5083953", "0.50645363", "0.50570464", "0.5005495", "0.49761808", "0.49547952", "0.49404877", "0.49087173", "0.49070644", "0.47980586", "0.47952676", "0.47942498", "0.4768268", "0.4758897", "0.4728619", "0.47173497", "0.47042474", "0...
0.6716494
0
TODO Autogenerated method stub
@Override public void declareOutputFields(OutputFieldsDeclarer fieldsDeclarer) { fieldsDeclarer.declare(new Fields("time-interval", "hotzones")); }
{ "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
start the playback of the background music when the screen is shown
@Override public void show() { music.play(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void playMusic() {\n\t\tthis.music.start();\n\t}", "public void start() {\n background.playMusic();\n createTimer();\n timer.start();\n }", "public void Play() {\n superPlaneGodMode = false;\r\n if (!musicPlaying)\r\n backgroundMusic.pause();\r\n i...
[ "0.76894873", "0.7680285", "0.7630377", "0.757257", "0.75657207", "0.75224185", "0.74158186", "0.7401109", "0.73932767", "0.7345196", "0.73246825", "0.7210529", "0.71755815", "0.7173951", "0.7094502", "0.7088825", "0.7071853", "0.7033171", "0.6995269", "0.69608706", "0.695013...
0.7020255
18
TODO Autogenerated method stub
@Override public List<CompanyMessage> selectMessage(CompanyMessage companyMessage) { return companyMessageMapper.selectMessage(companyMessage); }
{ "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 int updateMessageByID(CompanyMessage companyMessage) { return companyMessageMapper.updateMessageByID(companyMessage); }
{ "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 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() { jPasswordField1 = new javax.swing.JPasswordField(); jLabel4 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(3, 0), new java.awt.Dimension(3, 0), new java.awt.Dimension(3, 32767)); jTextField1 = new javax.swing.JTextField(); jLabel1 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setUndecorated(true); setSize(new java.awt.Dimension(1000, 500)); getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jPasswordField1.setFont(new java.awt.Font("Arial", 0, 18)); // NOI18N jPasswordField1.setForeground(new java.awt.Color(102, 102, 102)); jPasswordField1.setText("jPasswordField1"); jPasswordField1.setBorder(null); jPasswordField1.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { jPasswordField1FocusGained(evt); } }); jPasswordField1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jPasswordField1ActionPerformed(evt); } }); getContentPane().add(jPasswordField1, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 270, 260, 30)); jLabel4.setFont(new java.awt.Font("Microsoft YaHei UI", 0, 13)); // NOI18N jLabel4.setForeground(new java.awt.Color(182, 67, 136)); jLabel4.setText("crée un compt "); jLabel4.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseEntered(java.awt.event.MouseEvent evt) { jLabel4MouseEntered(evt); } public void mouseExited(java.awt.event.MouseEvent evt) { jLabel4MouseExited(evt); } public void mousePressed(java.awt.event.MouseEvent evt) { jLabel4MousePressed(evt); } }); getContentPane().add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(310, 380, -1, -1)); jLabel3.setFont(new java.awt.Font("Microsoft YaHei UI", 0, 13)); // NOI18N jLabel3.setForeground(new java.awt.Color(102, 102, 102)); jLabel3.setText("vous ñ'avez pas un compte ?"); getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 380, -1, -1)); jLabel2.setFont(new java.awt.Font("Tahoma", 0, 70)); // NOI18N jLabel2.setForeground(new java.awt.Color(255, 255, 255)); jLabel2.setText("x"); jLabel2.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jLabel2MouseClicked(evt); } public void mouseEntered(java.awt.event.MouseEvent evt) { jLabel2MouseEntered(evt); } public void mouseExited(java.awt.event.MouseEvent evt) { jLabel2MouseExited(evt); } public void mousePressed(java.awt.event.MouseEvent evt) { jLabel2MousePressed(evt); } }); getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(1150, -10, 40, -1)); jLabel5.setIcon(new javax.swing.ImageIcon("C:\\Users\\hp\\Desktop\\POROGET_JAVA\\hover_effact\\connecter_enter.png")); // NOI18N jLabel5.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseEntered(java.awt.event.MouseEvent evt) { jLabel5MouseEntered(evt); } public void mouseExited(java.awt.event.MouseEvent evt) { jLabel5MouseExited(evt); } public void mousePressed(java.awt.event.MouseEvent evt) { jLabel5MousePressed(evt); } }); getContentPane().add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(68, 320, -1, 60)); getContentPane().add(filler1, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 220, 330, 0)); jTextField1.setFont(new java.awt.Font("OCR A Extended", 0, 22)); // NOI18N jTextField1.setForeground(new java.awt.Color(195, 190, 190)); jTextField1.setText("nom d'utilisater"); jTextField1.setBorder(null); jTextField1.setPreferredSize(new java.awt.Dimension(200, 23)); jTextField1.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { jTextField1FocusGained(evt); } public void focusLost(java.awt.event.FocusEvent evt) { jTextField1FocusLost(evt); } }); getContentPane().add(jTextField1, new org.netbeans.lib.awtextra.AbsoluteConstraints(146, 204, 270, 40)); jLabel1.setIcon(new javax.swing.ImageIcon("C:\\Users\\hp\\Desktop\\POROGET_JAVA\\back22.jpg")); // NOI18N getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1200, 600)); 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.7318655", "0.7289971", "0.7289971", "0.7289971", "0.72860885", "0.7247684", "0.7213551", "0.72080934", "0.7195069", "0.7189731", "0.7183451", "0.71579945", "0.7147311", "0.7092687", "0.70798934", "0.7055229", "0.69868284", "0.6976656", "0.6954658", "0.6952896", "0.69449455...
0.0
-1
/ Set the Nimbus look and feel / If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. For details see
public static void main(String args[]) { try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Windows".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(menu2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(menu2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(menu2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(menu2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new menu2().setVisible(true); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void setLookAndFeel() {\n try {\n for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n ...
[ "0.7948844", "0.77676886", "0.770006", "0.75052917", "0.7287361", "0.7227688", "0.72236377", "0.72196996", "0.71810573", "0.7155472", "0.7119134", "0.71118087", "0.70989954", "0.70609176", "0.7049158", "0.6913391", "0.681691", "0.6704903", "0.669436", "0.6584968", "0.6573832"...
0.0
-1
Singleton access to the ConceptTemplate
public static ConceptTemplate getInstance(){ if (instance == null){ instance = new ConceptTemplate("src/main/resources/conceptMapping.csv"); } return instance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "T getInstance();", "public T getInstance() {\n return instance;\n }", "@Override\n public T getInstance() {\n return instance;\n }", "public Concept getConcept() {\n\t\treturn concept;\n\t}", "public Concept getConcept() {\n\t\treturn concept;\n\t}", "synchronized public static Samplety...
[ "0.6022463", "0.59359527", "0.58858883", "0.58294415", "0.58294415", "0.5814851", "0.5760358", "0.575662", "0.5623475", "0.56076187", "0.5580516", "0.5574834", "0.555148", "0.555148", "0.55358124", "0.5524439", "0.54739994", "0.5464585", "0.54565316", "0.5449786", "0.54267675...
0.7103131
0
Constructor for Tool object, creates a Tool object Tool(String name, String id, String address) Creates a Tool object.
public Tool(String name, String id, String address) { this.name = name; this.id = id; this.address = address; this.isHome = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Tool(String name, String id, String address, boolean isHome) {\n this.name = name;\n this.id = id;\n this.address = address;\n this.isHome = isHome;\n }", "public Tool(ToolType type, String brand) {\n this.type = type;\n this.brand = brand;\n }", "public T...
[ "0.7899564", "0.6819402", "0.6731928", "0.66440344", "0.64119214", "0.62937874", "0.6288956", "0.62495166", "0.61361295", "0.60307026", "0.60065913", "0.5955404", "0.5844371", "0.56750697", "0.56548357", "0.56485635", "0.56464756", "0.562923", "0.5554701", "0.5482603", "0.547...
0.8725925
0