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
Based on a set of Cases and an attribute, finds the threshold for that attribute that gives the highest information gain
public static double chooseAttributeThreshold(ArrayList<Case> cases, Attribute attribute) { double currentBestThreshold = -1; double currentBestRemainder = 0; double [] values = new double[cases.size()]; for (int i = 0 ; i < cases.size() ; i++) { // Create an array of the appropriate field values from each ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Attribute chooseAttribute(ArrayList<Case> cases) {\n\t\tAttribute currentBestAttribute = null;\n\t\tdouble currentBestRemainder = 0;\n\n\t\t// k\n\t\tdouble [] kValues = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\t// Extract the correct fields from each case into ...
[ "0.72548085", "0.6264076", "0.61963856", "0.6016736", "0.5972371", "0.56298", "0.561494", "0.5529074", "0.5507053", "0.5499641", "0.54834104", "0.5357695", "0.53454554", "0.5342307", "0.53385824", "0.53352314", "0.5314181", "0.5283418", "0.52368045", "0.51958144", "0.5178072"...
0.7710242
0
Get exchange rates for a chosen date
ExchangeRateDto getByDate(ExchangeRateDateFilter filter);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(method = RequestMethod.GET, value = \"/{date}/{baseCurrency}/{targetCurrency}\")\n public ResponseEntity exchangeRate(@PathVariable String date, @PathVariable String baseCurrency,\n @PathVariable String targetCurrency) throws ParseException {\n Utils....
[ "0.670901", "0.66611046", "0.661874", "0.6571793", "0.64523846", "0.63864213", "0.6371617", "0.63185865", "0.6265709", "0.6241024", "0.61921465", "0.61071706", "0.6098057", "0.607627", "0.60678995", "0.60479325", "0.60120547", "0.59594345", "0.5951822", "0.59094614", "0.58942...
0.7005935
0
Save new or update existing Exchange rate
ExchangeRate saveOrUpdate(ExchangeRate rate);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Rate save(Rate u);", "@Override\r\n\tpublic void updateRate(Rates rates) {\n\t\tsession.saveOrUpdate(rates);\r\n\t\tsession.beginTransaction().commit();\r\n\t}", "public String insertExchangeRate() {\r\n\t\t\r\n\t\tString loginId = com.omp.admin.common.util.CommonUtil.getLoginId(this.req.getSession());\r\n\t\t...
[ "0.71780324", "0.7034827", "0.6937259", "0.67453885", "0.6640454", "0.6253453", "0.62503815", "0.6170907", "0.6116238", "0.608065", "0.60754144", "0.60376626", "0.6029138", "0.5998314", "0.5938972", "0.59371847", "0.5909589", "0.58947307", "0.58462286", "0.58367085", "0.58312...
0.8633588
0
Get a number of exchange rates in the database
Long count();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String exchangeRateList() {\r\n\t\tif (exRateS == null) {\r\n\t\t\texRateS = new ExchangeRate();\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\texchangeRateList = service.exchangeRateList(exRateS);\r\n\t\ttotalCount = ((PagenateList) exchangeRateList).getTotalCount();\r\n\t\t\r\n\t\treturn SUCCESS;\r\n\t}", "public Bi...
[ "0.69949263", "0.6134581", "0.6130202", "0.6098027", "0.606782", "0.6066144", "0.6020523", "0.5926318", "0.5894676", "0.5891734", "0.5865387", "0.5831769", "0.5827154", "0.5799114", "0.5782624", "0.5775316", "0.576573", "0.576542", "0.5734899", "0.5689593", "0.5687801", "0....
0.0
-1
Write parsed data from European Central Bank to the database.
void writeEcbRatesToDb(EcbEnvelope envelope);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final /* synthetic */ void saveToDb() {\n DruidPooledConnection druidPooledConnection;\n DruidPooledConnection druidPooledConnection2;\n block18: {\n block17: {\n StringBuilder stringBuilder;\n PreparedStatement preparedStatement;\n ...
[ "0.58369553", "0.5667128", "0.5651794", "0.53085643", "0.52812356", "0.52638364", "0.5262393", "0.5256071", "0.5229187", "0.5204775", "0.5194696", "0.51594424", "0.5067997", "0.5025022", "0.50159353", "0.50154775", "0.49943158", "0.49706522", "0.49585888", "0.49437332", "0.49...
0.5795777
1
Get exchange rates by history filter
List<ExchangeRateDto> getHistoryRates(ExchangeRateHistoryFilter filter);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ExchangeRateDto getByDate(ExchangeRateDateFilter filter);", "ResponseEntity<List<TOURatesHistory>> getTouRatesHistory();", "ResponseEntity<List<GenericRatesHistory>> getGenericRatesHistory();", "ResponseEntity<List<TieredRatesHistory>> getTieredRatesHistory();", "hr.client.appuser.CouponCenter.ExchangeReco...
[ "0.6821366", "0.6791315", "0.6624119", "0.6512298", "0.59810275", "0.59669584", "0.5935001", "0.59272176", "0.59143925", "0.5909815", "0.5839644", "0.5833811", "0.5819845", "0.57868147", "0.5755736", "0.5700508", "0.5686016", "0.5639501", "0.5630625", "0.56195927", "0.5566618...
0.8785819
0
Create an image file name
private File createImageFile() throws IOException { String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss", Locale.CHINA).format(new Date()); String imageFileName = "JPEG_" + timeStamp + "_"; //.getExternalFilesDir()方法可以获取到 SDCard/Android/data/你的应用的包名/files/ 目录,一般放一些长时间保存的数据 File stor...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private File createImageFileName() throws IOException {\n String timestamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n //there are two types of SimpleDateFormat and Date()\n String prepend = \"JPEG_\" + timestamp + \"_\";\n File imageFile = File.createTempFile(prep...
[ "0.7782615", "0.7292824", "0.6992056", "0.6992056", "0.6943564", "0.6911284", "0.68938434", "0.686538", "0.68592805", "0.68590325", "0.68580544", "0.68443614", "0.67711073", "0.67546785", "0.6751638", "0.6737171", "0.6726197", "0.67170936", "0.67068315", "0.6706409", "0.66945...
0.0
-1
If we get a bot or a nonmember, dip
@SubscribeEvent public void onMessageReceived(GuildMessageReceivedEvent event) { if (event.getAuthor().isBot() || event.getMember() == null) return; // Logic GuildUserModel guildUser = taules.dataManager.getGuildUserModel(event.getGuild().getIdLong(), event.getMember()); DB.save(new ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isBot(){\n return false;\n }", "@Override\r\n public void notLeader() {\n }", "private void handleResponseIsOwner(Friends friends) {\n final Gson gson = new Gson();\n //Toast.makeText(_context, response.toString(), Toast.LENGTH_SHORT).show();...
[ "0.63491136", "0.5835367", "0.5813251", "0.57965785", "0.57769364", "0.5752415", "0.56810725", "0.56580514", "0.56538266", "0.56486607", "0.56268054", "0.5599753", "0.5533214", "0.54890174", "0.545979", "0.5446187", "0.54095787", "0.5403112", "0.53950495", "0.5378014", "0.537...
0.0
-1
If we get a bot, dip
@SubscribeEvent public void onVoiceJoined(GuildVoiceJoinEvent event) { if (event.getMember().getUser().isBot()) return; // Logic GuildUserModel guildUser = taules.dataManager.getGuildUserModel(event.getGuild().getIdLong(), event.getMember()); DB.save(new CallLogModel(guildUser.getId(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isBot(){\n return false;\n }", "public boolean isBot() {\n//\t\treturn this.getUserIO().checkConnection();\n\t\treturn false;\n\t}", "public boolean getBot() {\n return bot;\n }", "public boolean isBot() {\n \t\treturn (type == PLAYER_BOT);\n \t}", "@Override\n public ...
[ "0.7136602", "0.66668403", "0.653307", "0.65222085", "0.6414009", "0.61275935", "0.6111768", "0.59100777", "0.5899304", "0.5890466", "0.5775956", "0.5766269", "0.56567067", "0.5656332", "0.56318533", "0.56133467", "0.55975384", "0.5567454", "0.555606", "0.5522783", "0.549617"...
0.0
-1
If we get a bot, dip
@SubscribeEvent public void onVoiceLeft(GuildVoiceLeaveEvent event) { if (event.getMember().getUser().isBot()) return; // Logic GuildUserModel guildUser = taules.dataManager.getGuildUserModel(event.getGuild().getIdLong(), event.getMember()); List<CallLogModel> callLogs = new QCallLog...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isBot(){\n return false;\n }", "public boolean isBot() {\n//\t\treturn this.getUserIO().checkConnection();\n\t\treturn false;\n\t}", "public boolean getBot() {\n return bot;\n }", "public boolean isBot() {\n \t\treturn (type == PLAYER_BOT);\n \t}", "@Override\n public ...
[ "0.7136602", "0.66668403", "0.653307", "0.65222085", "0.6414009", "0.61275935", "0.6111768", "0.59100777", "0.5899304", "0.5890466", "0.5775956", "0.5766269", "0.56567067", "0.5656332", "0.56318533", "0.56133467", "0.55975384", "0.5567454", "0.555606", "0.5522783", "0.549617"...
0.0
-1
to be included in the next payload SecretServer sends
public SecretServer(boolean simMode) { this.simMode = simMode; secretsfn = "secrets.txt"; hashfn = "hashes.txt"; pubkeysfn = "publickeys.txt"; privkeysfn = "privatekeys.txt"; validusersfn = "validusers.txt"; validUsers = ComMethods.getValidUsers(); configureKeys(); userNum = -1; myNonce = null; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private byte[] preparePayload(byte[] message) {\n\t\treturn ComMethods.preparePayload(\"SecretServer\".getBytes(), message, counter, currentSessionKey, simMode);\n\t}", "private byte[] handleView() {\n\t\tString secret = ComMethods.getValueFor(currentUser, secretsfn);\n\t\tif (secret.equals(\"\")) {\n\t\t\tretur...
[ "0.6827598", "0.6190681", "0.59548855", "0.592717", "0.59256625", "0.5797804", "0.57361996", "0.56002754", "0.55888635", "0.55541223", "0.5550802", "0.55310625", "0.552865", "0.5498099", "0.54952693", "0.5449761", "0.5424309", "0.54165417", "0.5404438", "0.5402851", "0.537532...
0.0
-1
Interprets input payloads and returns appropriate responses 'partTwo' differentiates messages for auth. part 1 and auth. part 2
public byte[] getMessage(byte[] payload, boolean partTwo) { ComMethods.report("SecretServer received payload and will now process it.", simMode); byte[] resp = new byte[0]; if (activeSession) { // Extract message from active session payload byte[] message = processPayload(payload); switch (getSessionCom...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private byte[] handleAuthPt2(byte[] payload) { \n\t\tbyte[] message = ComMethods.decryptRSA(payload, my_n, my_d);\n\t\tComMethods.report(\"SecretServer has decrypted the User's message using SecretServer's private RSA key.\", simMode);\n\t\t\n\t\tif (!Arrays.equals(Arrays.copyOf(message, myNonce.length), myNonce))...
[ "0.65013623", "0.62273544", "0.54584926", "0.52568525", "0.52176505", "0.5108147", "0.50562215", "0.49881497", "0.49756855", "0.49504998", "0.4922494", "0.48442864", "0.4842459", "0.47618484", "0.47577137", "0.47312438", "0.47232386", "0.4702486", "0.47001067", "0.4645752", "...
0.6658454
0
Determines the type of command in the encrypted payload This method is called during a session, after the authentication protocol
private String getSessionCommand(byte[] message) { // Various accepted options byte[] pw = "password:".getBytes(); byte[] view = "view".getBytes(); byte[] update = "update:".getBytes(); byte[] delete = "delete".getBytes(); String resp; if (Arrays.equals(Arrays.copyOf(message, pw.length), pw) && !passVeri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getCommandType() {\n return commandType;\n }", "private byte[] handleAuthPt2(byte[] payload) { \n\t\tbyte[] message = ComMethods.decryptRSA(payload, my_n, my_d);\n\t\tComMethods.report(\"SecretServer has decrypted the User's message using SecretServer's private RSA key.\", simMode);\n\t\t...
[ "0.53337264", "0.525629", "0.52288985", "0.520663", "0.5197447", "0.51185507", "0.50729465", "0.5006362", "0.49181762", "0.48829457", "0.48745", "0.48393625", "0.4823772", "0.4820301", "0.48127788", "0.47824505", "0.47613105", "0.47230417", "0.47093818", "0.46976644", "0.4691...
0.5752967
0
Handles password verif., returns "accepted" or "rejected"
private byte[] handlePassword(byte[] message) { byte[] password = Arrays.copyOfRange(message, "password:".getBytes().length, message.length); // Check hash of password against user's value in the digest text file passVerified = checkHash(password, ComMethods.getValueFor(currentUser, hashfn)); // Respond to us...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean getPasswordValid();", "private void validatePassword() {\n mPassWordValidator.processResult(\n mPassWordValidator.apply(binding.registerPassword.getText().toString()),\n this::verifyAuthWithServer,\n result -> binding.registerPassword.setError(\"Please ...
[ "0.7063271", "0.6969024", "0.69282115", "0.68776935", "0.68776935", "0.68776935", "0.68776935", "0.68776935", "0.68776935", "0.68776935", "0.68776935", "0.6834036", "0.673624", "0.6709019", "0.66799647", "0.6679823", "0.6675946", "0.6648876", "0.66206765", "0.6576792", "0.652...
0.7001681
1
Handles view requests, returns the deciphered secret
private byte[] handleView() { String secret = ComMethods.getValueFor(currentUser, secretsfn); if (secret.equals("")) { return "error".getBytes(); } else { byte[] secretInBytes = DatatypeConverter.parseBase64Binary(secret); ComMethods.report("SecretServer has retrieved "+currentUser+"'s secret and will n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String requestView() { \n\t\tbyte[] userMessage = \"view\".getBytes();\n\t\tbyte[] srvrResponse = sendServerCoded(userMessage);\n\t\t\n\t\tif (!checkError(srvrResponse)) {\n\t\t\tbyte[] encryptedSecret = srvrResponse;\n\t\t\tbyte[] decryptedSecret = SecureMethods.decryptRSA(encryptedSecret, my_n, my_d, simM...
[ "0.66294324", "0.61125475", "0.6093254", "0.59644616", "0.594161", "0.5838609", "0.58312947", "0.580048", "0.5666834", "0.5579912", "0.5552612", "0.55482566", "0.5492081", "0.5428448", "0.54057837", "0.5396968", "0.53733647", "0.5262724", "0.52485555", "0.52413416", "0.517926...
0.7773103
0
Handles update requests, returns "secretupdated" when done
private byte[] handleUpdate(byte[] message) { byte[] newSecretBytes = Arrays.copyOfRange(message, "update:".getBytes().length, message.length); /* System.out.println("THIS IS A TEST:"); System.out.println("newSecretBytes:"); ComMethods.charByChar(newSecretBytes, true); System.out.println("newSecretBytes, rev...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void receivedUpdateFromServer();", "@Override\r\n\tpublic void doUpdate(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\t\r\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {...
[ "0.6422012", "0.6155503", "0.61474085", "0.60197407", "0.6018589", "0.59517586", "0.5934363", "0.58612555", "0.5849229", "0.5838154", "0.58267915", "0.57246995", "0.5661651", "0.56489956", "0.5640602", "0.5613496", "0.56081945", "0.56081945", "0.55824786", "0.55351573", "0.54...
0.68871886
0
Handles delete requests, returns "secretdeleted" when done
private byte[] handleDelete() { boolean success = replaceSecretWith(currentUser, ""); if (success) { ComMethods.report("SecretServer has deleted "+currentUser+"'s secret.", simMode); return preparePayload("secretdeleted".getBytes()); } else { ComMethods.report("SecretServer has FAILED to delete "+curren...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void delete(SecretIdentifier secretIdentifier);", "public boolean deleteSecret() {\n\t\tbyte[] userMessage = \"delete\".getBytes();\n\t\treturn sendAndCheckResp(userMessage, \"secretdeleted\", \"writingfailure\");\n\t}", "@Override\n\tpublic void doDelete(HttpRequest request, AbstractHttpResponse response)\n\t...
[ "0.71510565", "0.7043786", "0.6854052", "0.6759992", "0.6594905", "0.6519541", "0.64781517", "0.6473071", "0.6463454", "0.64301807", "0.6428172", "0.63991106", "0.63818", "0.63378745", "0.63358855", "0.6333542", "0.6325902", "0.63176596", "0.6310722", "0.62977505", "0.6277089...
0.8339784
0
Handles second transaction of Bilateral Auth. Protocol Given encrypted first message, identifies User, verifies proper formatting of message, generates a nonce, and sends the User a payload in response
private byte[] handleAuthPt1(byte[] payload) { boolean userIdentified = false; byte[] supposedUser = null; // System.out.println("payload received by SecretServer:"); ComMethods.charByChar(payload,true); // userNum = -1; while (userNum < validUsers.length-1 && !userIdentified) { userNum++; supposedU...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private byte[] handleAuthPt2(byte[] payload) { \n\t\tbyte[] message = ComMethods.decryptRSA(payload, my_n, my_d);\n\t\tComMethods.report(\"SecretServer has decrypted the User's message using SecretServer's private RSA key.\", simMode);\n\t\t\n\t\tif (!Arrays.equals(Arrays.copyOf(message, myNonce.length), myNonce))...
[ "0.7057637", "0.55897385", "0.5484281", "0.5354397", "0.53484404", "0.5212885", "0.5170457", "0.5116293", "0.5080429", "0.5041548", "0.5012382", "0.50091034", "0.49850976", "0.49397478", "0.49281457", "0.48945698", "0.48843488", "0.48729706", "0.48687753", "0.48681888", "0.48...
0.65908694
1
Handles fourth transaction of Bilateral Auth. Protocol Verifies Server's nonce, stores value of sessionKey, and sends a response to the User
private byte[] handleAuthPt2(byte[] payload) { byte[] message = ComMethods.decryptRSA(payload, my_n, my_d); ComMethods.report("SecretServer has decrypted the User's message using SecretServer's private RSA key.", simMode); if (!Arrays.equals(Arrays.copyOf(message, myNonce.length), myNonce)) { ComMethods.re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] server_response) {\n try {\n String response = String.valueOf(new String(server_response, \"UTF-8\"));\n Log.e(TAG, \"response l...
[ "0.5550596", "0.5548175", "0.55179745", "0.5413751", "0.5372323", "0.53552336", "0.5328489", "0.5327486", "0.5319623", "0.5299686", "0.5277595", "0.526636", "0.52416605", "0.52338386", "0.52145314", "0.52114844", "0.5202655", "0.5155323", "0.51240534", "0.51226735", "0.510398...
0.6118821
0
Determines whether a password matches up to the hashed value (digest), using knowledge of the hash function and of times the hash was stretched
private boolean checkHash(byte[] password, String hashValue) { int hashReps = 1000; // stretch the hash this many times String hashAlgorithm = "MD5"; String endValue = new String(); try { MessageDigest md = MessageDigest.getInstance(hashAlgorithm); byte[] value = password; for (int i=0; i<hashReps; i+...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean comparePasswordHash(String password, String salt, String destinationHash);", "private boolean givenPassword_whenHashing_thenVerifying(String hashPwd, String inputPwd){\n MessageDigest md;\r\n\t\ttry {\r\n\t\t\tmd = MessageDigest.getInstance(\"MD5\");\r\n\t\t\t//Add password bytes to digest\r\n\t ...
[ "0.7972828", "0.71898115", "0.711146", "0.70647234", "0.7018148", "0.69811094", "0.6931412", "0.68383604", "0.67881715", "0.6746574", "0.6663387", "0.66140294", "0.6607884", "0.65194285", "0.64699805", "0.6436773", "0.6432171", "0.63749945", "0.6372761", "0.63263154", "0.6285...
0.77490366
1
Writes to file, replacing user's existing secret with newSecret Returns true if new file was created properly with appropriate contents
private boolean replaceSecretWith(String user, String newSecret) { // System.out.println(); System.out.println(); System.out.println(); System.out.println("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); System.out.println("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); System.out.println...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean updateSecret(String newSecret) {\n\t\tbyte[] encryptedNewSecret = SecureMethods.encryptRSA(newSecret.getBytes(), my_n, BigInteger.valueOf(my_e), simMode);\n\t\tbyte[] userMessage = ComMethods.concatByteArrs(\"update:\".getBytes(), encryptedNewSecret);\n\t\treturn sendAndCheckResp(userMessage, \"secr...
[ "0.62896043", "0.6116801", "0.59739006", "0.5660835", "0.56108266", "0.5585368", "0.53901476", "0.5378266", "0.5273952", "0.52615196", "0.5202774", "0.5192693", "0.5189641", "0.51043284", "0.5092826", "0.50829846", "0.5065624", "0.50420254", "0.50307983", "0.50177747", "0.498...
0.82464045
0
Takes "regular" payload and spits out enclosed message
private byte[] processPayload(byte[] message) { return ComMethods.processPayload(currentUser.getBytes(), message, counter-1, currentSessionKey, simMode); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Payload getMsg();", "@Override\n\tpublic void onMessage(Message message) {\n\t\tSystem.out.println(message.getBody());\n\t}", "ByteBuf getMessageBody();", "String getRawMessage();", "public Payload.Inbound getInboundPayload();", "com.google.protobuf.ByteString getPayload();", "com.google.protobuf.ByteS...
[ "0.6586933", "0.6399293", "0.6237906", "0.61751986", "0.6139362", "0.60157734", "0.60157734", "0.5973494", "0.5963404", "0.59203666", "0.58461493", "0.58461493", "0.5781827", "0.57644826", "0.57334036", "0.5728465", "0.57017064", "0.56962985", "0.56436884", "0.5634102", "0.56...
0.5807027
12
Takes message and packages it in "regular" payload for active session
private byte[] preparePayload(byte[] message) { return ComMethods.preparePayload("SecretServer".getBytes(), message, counter, currentSessionKey, simMode); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private byte[] processPayload(byte[] message) {\n\t\treturn ComMethods.processPayload(currentUser.getBytes(), message, counter-1, currentSessionKey, simMode);\n\t}", "@Override\n\tpublic void processMessage(byte[] message) {\n\t}", "private MessageType processMessage(MessageType message) {\n\t\tJSONObject mess...
[ "0.71300435", "0.625361", "0.61412394", "0.6129184", "0.60249114", "0.6018496", "0.5986007", "0.5959021", "0.5942473", "0.59386796", "0.5924417", "0.5921824", "0.5905807", "0.5855329", "0.58498526", "0.5819122", "0.5797749", "0.5783391", "0.57650614", "0.57558537", "0.5711852...
0.6458071
1
Sets the private and public keys of the SecretServer, which are found by parsing the relevant text files for public keys and private keys of registered users of this secret server storage service. Also sets up arrays of public keys for all registered users for efficient use and access. NOTE: This is a simulation. In a ...
private final void configureKeys() { // SecretServer's public key String line = ComMethods.getValueFor("SecretServer", pubkeysfn); int x = line.indexOf(','); my_n = new BigInteger(line.substring(0,x)); my_e = new Integer(line.substring(x+1,line.length())); // SecretServer's private key line = ComMethods....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void saveKeys(String publicKeyFileLocation, String secretKeyFileLocation) throws IOException;", "void saveKeys(PGPPublicKeyRingCollection publicKeyRings, PGPSecretKeyRingCollection secretKeyRings, String publicKeyFileLocation, String secretKeyFileLocation) throws IOException;", "public void generateKeys() {\r\...
[ "0.637339", "0.61673313", "0.58530116", "0.5729534", "0.56682044", "0.56051296", "0.551871", "0.540143", "0.5302357", "0.5286174", "0.5171144", "0.5149069", "0.5134642", "0.51292247", "0.50906354", "0.505494", "0.50299513", "0.50271255", "0.50235903", "0.50053984", "0.4982447...
0.8104909
0
test that the activity is not null when the app is run
@Test public void testMessagesActivityNotNull(){ assertNotNull(messagesActivity); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void assertActivityNotNull() {\n if (mActivity == null) {\n mActivity = getActivity();\n assertNotNull(mActivity);\n }\n }", "@Test\n public void homeActivityShouldNotBeNull() {\n assertThat(homeActivity).isNotNull();\n }", "@SmallTest\n public voi...
[ "0.73421663", "0.6984727", "0.6595826", "0.65064174", "0.6395282", "0.63772863", "0.63509053", "0.6189581", "0.612426", "0.61046994", "0.6084199", "0.606066", "0.6024518", "0.6011281", "0.5976326", "0.59431905", "0.5931404", "0.5901374", "0.58905846", "0.58736426", "0.5836776...
0.62046975
7
test that the chat log is not null when the activity is run
@Test public void testChatLogExists(){ ListView chatLog = messagesActivity.listOfMessages; assertNotNull(chatLog); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testMessagesActivityNotNull(){\n assertNotNull(messagesActivity);\n }", "private static void initLog() {\n LogManager.mCallback = null;\n if (SettingsManager.getDefaultState().debugToasts) {\n Toast.makeText(mContext, mContext.getClass().getCanonicalName(...
[ "0.6225576", "0.607543", "0.5960574", "0.58594406", "0.5779297", "0.57732767", "0.5733419", "0.571225", "0.5682787", "0.5581243", "0.5563072", "0.55358815", "0.55330664", "0.54734427", "0.5470338", "0.54596174", "0.5457026", "0.5454132", "0.5387484", "0.53862983", "0.5383679"...
0.7202147
0
test that the chat log uses the correct listview
@Test public void testChatLogHasCorrectID(){ ListView chatLog = messagesActivity.listOfMessages; int ID = chatLog.getId(); int expectedID = R.id.list_of_messages; assertEquals(ID, expectedID); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testChatLogExists(){\n ListView chatLog = messagesActivity.listOfMessages;\n assertNotNull(chatLog);\n }", "private void updateListViewLogWindow()\n {\n listViewMessageItems.clear();\n\n for(int i =0;i<= printResult.size() - 1;i++)\n {\n ...
[ "0.7480722", "0.6898925", "0.66269666", "0.6547329", "0.6534979", "0.64708257", "0.6429307", "0.6391523", "0.6385242", "0.6360404", "0.62911665", "0.62334806", "0.6225931", "0.6215363", "0.6211945", "0.62089986", "0.61857814", "0.6185008", "0.6173303", "0.61665905", "0.613942...
0.6676159
2
test that the send button is not null when the activity is run
@Test public void testSendButtonExists(){ FloatingActionButton sendButton = messagesActivity.fab; assertNotNull(sendButton); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void triggerIntentTestButtonToRegister() {\n onView(withId(R.id.btnLinkToRegisterScreen)).check(matches(isClickable()));\n onView(withId(R.id.btnLinkToRegisterScreen)).check(matches(notNullValue()));\n }", "public boolean send() {\n\t\tif (!isValid())\n\t\t\treturn false;\n\t\t...
[ "0.6837007", "0.6587495", "0.6493858", "0.6434146", "0.6423935", "0.6338277", "0.62528676", "0.62090427", "0.6145809", "0.6138947", "0.6124845", "0.61027664", "0.6092178", "0.6086071", "0.60822475", "0.6070534", "0.6058522", "0.60560167", "0.5986287", "0.59833956", "0.5983395...
0.7300946
0
test that the send button uses the correct button
@Test public void testSendButtonHasCorrectID(){ FloatingActionButton sendButton = messagesActivity.fab; int ID = sendButton.getId(); int expectedID = R.id.fab; assertEquals(ID, expectedID); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Then(\"^Click On Send Button$\")\r\n\tpublic void click_On_Send_Button() {\n\t\tnop.click(\"//*[@id=\\\"submitMessage\\\"]/span\"); \r\n\t \r\n\t}", "public void acceptTenderButton() {\n\t\tBy elem = By.cssSelector(\"button\");\n\t\tList<WebElement> elements = driver.findElements(elem);\n\t\t\n\t\tfor (Web...
[ "0.7155129", "0.6690007", "0.6493338", "0.64661276", "0.64640033", "0.6458423", "0.6447844", "0.6377239", "0.63707525", "0.63704747", "0.6367409", "0.63566506", "0.63439375", "0.63335437", "0.6325426", "0.62933487", "0.62669075", "0.6263338", "0.62610495", "0.6259407", "0.625...
0.0
-1
test that the edit text view is not null when the activity is run
@Test public void testEditTextExists(){ ViewInteraction appCompatEditTextView = onView(withId(R.id.input)); appCompatEditTextView.perform(replaceText("testEditTextExists"), closeSoftKeyboard()); onView(withId(R.id.fab)).perform(click()); EditText input = messagesActivity.input; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testEditTextCleanup() throws Exception {\n\n // perform text input\n onView(withId(R.id.editText))\n .perform(typeText(LOG_TAG));\n\n // click pin button\n onView(withText(R.string.button_name))\n .perform(click());\n\n // veri...
[ "0.703944", "0.68783647", "0.6849771", "0.66005796", "0.6598137", "0.6510192", "0.6435221", "0.64057964", "0.63715655", "0.63504195", "0.6311757", "0.62985146", "0.6271382", "0.6231683", "0.6194336", "0.6117394", "0.61126304", "0.609009", "0.6081783", "0.604255", "0.60276425"...
0.75051403
0
test that the edit text view uses the correct button
@Test public void testEditTextHasCorrectID(){ ViewInteraction appCompatEditTextView = onView(withId(R.id.input)); appCompatEditTextView.perform(replaceText("testEditTextHasCorrectID"), closeSoftKeyboard()); onView(withId(R.id.fab)).perform(click()); EditText input = messagesActivity....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testEditTextExists(){\n ViewInteraction appCompatEditTextView = onView(withId(R.id.input));\n appCompatEditTextView.perform(replaceText(\"testEditTextExists\"), closeSoftKeyboard());\n onView(withId(R.id.fab)).perform(click());\n EditText input = messagesActivity....
[ "0.7263213", "0.7158105", "0.71121836", "0.69097525", "0.688493", "0.67581224", "0.6756589", "0.67455465", "0.66324246", "0.65891206", "0.6464347", "0.6446136", "0.6434359", "0.64018786", "0.63873523", "0.63438195", "0.6328669", "0.63218707", "0.6301873", "0.6299164", "0.6246...
0.7077228
3
test that when a message is sent, the message time receives the current user's time stamp
@Test public void testMessageTimeNotNull(){ ViewInteraction appCompatEditTextView = onView(withId(R.id.input)); appCompatEditTextView.perform(replaceText("testMessageTime"), closeSoftKeyboard()); onView(withId(R.id.fab)).perform(click()); TextView messageTime= messagesActivity.messag...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetTime() throws InterruptedException {\n Thread.sleep(5);\n assertTrue(chatMessage.getTime().before(new Date()));\n }", "@Test\n public void testTimeStamp() throws JMSException {\n long requestTimeStamp = requestMessage.getJMSTimestamp();\n long resp...
[ "0.7303476", "0.65674466", "0.6544194", "0.6428961", "0.6305228", "0.63029766", "0.6194173", "0.6031842", "0.59948826", "0.59508455", "0.591377", "0.58845735", "0.5867692", "0.58177865", "0.58073676", "0.5797791", "0.57942706", "0.5787618", "0.5773513", "0.57725155", "0.57693...
0.56916857
26
Create a new NumberedList.
public NumberedList() { _init=1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\r\n public void createList() {\r\n items = new int[MAX_LIST];\r\n NumItems = 0;\r\n }", "public TempList(int n) {\n list = new ArrayList<T>(n >= 0 ? n : 0);\n }", "List() {\n final int ten = 10;\n list = new int[ten];\n ...
[ "0.63987136", "0.6354183", "0.630242", "0.623829", "0.6235397", "0.61940885", "0.61928207", "0.61872596", "0.6108343", "0.6085024", "0.5989366", "0.5978271", "0.5962744", "0.59306717", "0.59008783", "0.5895786", "0.58338827", "0.58226067", "0.5822565", "0.57845175", "0.571761...
0.78727764
0
Get the initial value.
public int getInitialValue() { return _init; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getInitialValue() {\n return initialValue;\n }", "public int getInitialValue() {\n return initialValue;\n }", "public int getInitialValue() {\r\n\t\treturn initialValue;\r\n\t}", "public String getInitialValue() {\n\t\treturn initialValue;\n\t}", "protected abstract int getIn...
[ "0.8513254", "0.8513254", "0.84268266", "0.814184", "0.7985854", "0.76690733", "0.75192845", "0.74089414", "0.73232454", "0.66696084", "0.6661448", "0.6661448", "0.6627064", "0.65807486", "0.6572538", "0.6558218", "0.65492815", "0.65492815", "0.6537628", "0.6537628", "0.65182...
0.8633377
0
Getting formatted message by pattern layout
public String getFormattedMessage(String level,String message, String target){ StringBuilder builder = new StringBuilder(); for (String next : priority) { if(next.equals("date")){ if(date == null) { builder.append(dateFormat.format(new Date())); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String format(String pattern, Object... params) {\n\t\tStringBuffer result = new StringBuffer();\n\t\tnew MessageFormat(pattern, getLocale()).format(params, result, null);\n\t\treturn result.toString();\n\t}", "private static String format(final String pattern, final Object... args) {\n\t\tString ...
[ "0.6994705", "0.6829018", "0.6239189", "0.60414845", "0.5888267", "0.58867186", "0.587654", "0.5855127", "0.5855127", "0.5855127", "0.5829108", "0.58274764", "0.58243686", "0.58231837", "0.57879126", "0.5751254", "0.5733025", "0.57280695", "0.56893486", "0.56506836", "0.56432...
0.5628757
21
/ Object Param View
@XmlElement(required = true) public String getName() { return name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getViewParam() {\r\n\t\treturn viewParam;\r\n\t}", "INDArray getParams();", "public ObjectParamView init(Object obj)\n\t{\n\t\tif((obj instanceof ObjectParam))\n\t\t\tthis.init((ObjectParam) obj);\n\t\treturn this;\n\t}", "public Object getParam() {\n return param;\n }", "@Override\...
[ "0.6273839", "0.6223508", "0.62025917", "0.58364177", "0.5815933", "0.5814584", "0.57922286", "0.5783292", "0.57163894", "0.57135946", "0.56985146", "0.56467724", "0.5638414", "0.5632063", "0.5614258", "0.56052685", "0.55979264", "0.5596001", "0.5596001", "0.5596001", "0.5581...
0.0
-1
/ public: ObjectParamView (init) interface
public ObjectParamView init(Object obj) { if((obj instanceof ObjectParam)) this.init((ObjectParam) obj); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void initParams() {\n\t\t\n\t}", "@Override\n\tprotected void init() throws Exception {\n\t\toid = getParameter(\"oid\");\n\t\tif (AppUtil.isEmpty(oid)) {\n\t\t\toid = getArgument(\"oid\");\n\t\t}\n\t\tif (AppUtil.isEmpty(oid)) {\n\t\t\tsetupNewPage();\n\t\t} else {\n\t\t\tsetupEditPage();...
[ "0.6764985", "0.6446369", "0.64327216", "0.6281416", "0.6260584", "0.62524617", "0.61488295", "0.6127398", "0.61016876", "0.61016744", "0.60687375", "0.60675883", "0.60613984", "0.60613984", "0.60577166", "0.6036525", "0.60268193", "0.60267633", "0.6024286", "0.6024286", "0.6...
0.84032243
0
TODO Autogenerated method stub
public String get_currency_name() { return name; }
{ "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
public int[] get_ranking() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Record the video data sends by the camClient
private void recordCam() throws IOException, InterruptedException { VideoDataStream vds = new VideoDataStream(true); while (true) { try { if (dis.available() > 0) { vds.processFrame(dis); } else { //Writing byt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void recordVideo() {\n\n }", "private void liveStreaming() throws IOException, InterruptedException {\n\n CamStreaming camStreaming = new CamStreaming();\n VideoDataStream vds = new VideoDataStream(true);\n byte[] frame;\n\n if (camStreaming.prepareStream(in)) {\n\n ...
[ "0.7386263", "0.707025", "0.68315136", "0.6753297", "0.66465366", "0.63840115", "0.62664455", "0.6249779", "0.62470907", "0.62403053", "0.6217827", "0.61909145", "0.6172522", "0.60644495", "0.60067505", "0.60004926", "0.5998849", "0.59754825", "0.5938067", "0.5936633", "0.591...
0.7728257
0
Stream video data between two camClients and stores it simultaneously
private void liveStreaming() throws IOException, InterruptedException { CamStreaming camStreaming = new CamStreaming(); VideoDataStream vds = new VideoDataStream(true); byte[] frame; if (camStreaming.prepareStream(in)) { while (camStreaming.isTargetConnected()) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void requestLiveStreaming() throws IOException {\n\n String targetCamCode = dis.readUTF();\n\n Cam targetCam = CamRegister.findRegisteredCam(targetCamCode);\n\n try {\n DataOutputStream targetDos = new DataOutputStream(targetCam.getCamSocket().getOutputStream());\n\n ...
[ "0.6765168", "0.6629281", "0.65394175", "0.6379433", "0.6076767", "0.6025764", "0.59686905", "0.59216666", "0.5865124", "0.5813422", "0.5800829", "0.5732836", "0.56966466", "0.56699395", "0.5630639", "0.558473", "0.55743814", "0.55701345", "0.5557522", "0.55539924", "0.552890...
0.7519468
0
Requests video recording to another camClient
private void requestRecord() throws IOException { String targetCamCode = dis.readUTF(); Cam targetCam = CamRegister.findRegisteredCam(targetCamCode); try { DataOutputStream targetDos = new DataOutputStream(targetCam.getCamSocket().getOutputStream()); targetDos.writeInt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void sendVideoRecordingRequest() {\n SurfaceTexture surfaceTexture = mTextureView.getSurfaceTexture();\n assert surfaceTexture != null;\n surfaceTexture.setDefaultBufferSize(mSizePreview.getSize().getWidth(), mSizePreview.getSize().getHeight());\n Surface previewSurface = new Su...
[ "0.6997779", "0.6529984", "0.6417616", "0.63458467", "0.63444906", "0.6311839", "0.60718423", "0.5979483", "0.5822907", "0.5811819", "0.5696986", "0.56793547", "0.5677607", "0.56140393", "0.55998206", "0.5581227", "0.55555713", "0.5501461", "0.5465655", "0.5424361", "0.542147...
0.61156636
6
Requests video live streaming to another camClient
private void requestLiveStreaming() throws IOException { String targetCamCode = dis.readUTF(); Cam targetCam = CamRegister.findRegisteredCam(targetCamCode); try { DataOutputStream targetDos = new DataOutputStream(targetCam.getCamSocket().getOutputStream()); targetDos....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void liveStreaming() throws IOException, InterruptedException {\n\n CamStreaming camStreaming = new CamStreaming();\n VideoDataStream vds = new VideoDataStream(true);\n byte[] frame;\n\n if (camStreaming.prepareStream(in)) {\n\n while (camStreaming.isTargetConnected()...
[ "0.7130705", "0.6822361", "0.66052663", "0.6433414", "0.62424886", "0.61532253", "0.6113599", "0.59824824", "0.59687126", "0.59453076", "0.5942353", "0.591622", "0.588334", "0.5882252", "0.58746165", "0.58490884", "0.5847488", "0.5780216", "0.57749677", "0.5752175", "0.571175...
0.77167493
0
TODO Autogenerated method stub
public int getCount() { int count = 0; if (newTwitts != null) count += newTwitts.size(); if (oldTwitts.moveToFirst()) count += oldTwitts.getCount(); return count; }
{ "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
public Object getItem(int arg0) { if ((newTwitts != null) && (oldTwitts.moveToFirst())){ if(arg0 < newTwitts.size()) return newTwitts.get(arg0); else if (arg0 < getCount()){ oldTwitts.moveToPosition(arg0 - newTwitts.size()); try { Status status = (Status) new JSONObject(ol...
{ "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
public long getItemId(int arg0) { return arg0; }
{ "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
public View getView(int position, View convertView, ViewGroup parent) { if (convertView == null) { convertView = newView(position, parent); } bindView(position, convertView); return convertView; }
{ "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
X axis vector Constructors // Construct Camera according to location and directions
public Camera(Point3D p0, Vector vUp, Vector vTo) { _vTo = vTo.normalized(); _vUp = vUp.normalized(); if (!isZero(_vUp.dotProduct(_vTo))) throw new IllegalArgumentException("Vup and Vto must be orthogonal"); _p0 = p0; _vRight = _vTo.crossProduct(_vUp).normalize(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PlayerWL() {\n super();\n rotateYAxis = 0;\n positionZ = 0;\n positionX = 0;\n camera = new PerspectiveCamera(true);\n camera.getTransforms().addAll(\n new Rotate(0, Rotate.Y_AXIS),\n new Rotate(-10, Rotate.X_AXIS),\n new...
[ "0.629685", "0.6200202", "0.6131984", "0.6126561", "0.61107963", "0.609393", "0.60397226", "0.5995225", "0.5957576", "0.5952216", "0.59463984", "0.5925891", "0.59110254", "0.5903883", "0.5886186", "0.5886014", "0.5868697", "0.5818477", "0.58060294", "0.5801447", "0.5792504", ...
0.5904412
13
Getters/Setters // Getter of camera's location
public Point3D getP0() { return _p0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Point getCameraPosition() {\n\t\treturn new Point(cameraPosition.x, cameraPosition.y, cameraPosition.z);\n\t}", "public Coord getCameraPosition() {\n if(internalNative == null) {\n if(internalLightweightCmp != null) {\n return internalLightweightCmp.getCenter();\n ...
[ "0.76706785", "0.7452009", "0.7304758", "0.72690845", "0.72338325", "0.71559983", "0.7154101", "0.7046798", "0.70081633", "0.69327897", "0.69272655", "0.68681216", "0.68557644", "0.67711866", "0.67711866", "0.6747399", "0.6741011", "0.6716902", "0.6701804", "0.66915077", "0.6...
0.0
-1
Getter of Y axis in relation to the camera
public Vector get_vUp() { return _vUp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getY()\n {\n return yaxis;\n }", "public int getYPos() {\r\n\t\treturn this.cameraY;\r\n\t}", "public float getYComponent() {\n return this.vy;\n }", "public int getUserPlaneY() {\r\n\t\treturn levelManager.getUserPlaneY();\r\n\t}", "public double getRightYAxis() {\n\t\treturn getRawAxi...
[ "0.7999134", "0.7897046", "0.74586236", "0.74051386", "0.73900485", "0.7307881", "0.72350925", "0.72350925", "0.72290343", "0.71996915", "0.7196935", "0.7196721", "0.71762556", "0.7169685", "0.7155802", "0.71551186", "0.71535957", "0.71391636", "0.7133373", "0.71317726", "0.7...
0.0
-1
Getter of Z axis in relation to the camera
public Vector get_vTo() { return _vTo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getZ()\n {\n return zaxis;\n }", "public double getZ() {\n return position.getZ();\n }", "public float getZ() {\r\n return z;\r\n }", "godot.wire.Wire.Vector3 getZ();", "public float getZ() {\n return z_;\n }", "public float getZ() {\n return z_;...
[ "0.82104605", "0.7450367", "0.7320933", "0.7319531", "0.72825867", "0.72662157", "0.71566004", "0.71566004", "0.71501875", "0.71501875", "0.7141119", "0.7141119", "0.7141119", "0.70997256", "0.70879894", "0.7021309", "0.7021309", "0.7014221", "0.70016927", "0.69941556", "0.69...
0.0
-1
Getter of X axis in relation to the camera
public Vector get_vRight() { return _vRight; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getX()\n {\n return xaxis;\n }", "public int getXPos() {\r\n\t\treturn this.cameraX;\r\n\t}", "public ChartXAxis getXAxis() { return _xaxis; }", "public float getxPosition() {\n return xPosition;\n }", "public float getX() { return xCoordinate;}", "public double getFrameX() { ...
[ "0.7930546", "0.788584", "0.7296697", "0.7065517", "0.7039688", "0.70329106", "0.6998971", "0.69734335", "0.69453865", "0.69453865", "0.69453865", "0.6933261", "0.6931384", "0.693011", "0.6919721", "0.6918418", "0.6895458", "0.68951845", "0.68951845", "0.68888426", "0.6888562...
0.0
-1
Operations // Creates a ray though a certain pixel in the view plane
public Ray constructRayThroughPixel(int nX, int nY, int j, int i, // double screenDistance, double screenWidth, double screenHeight) { Point3D pC = _p0.add(_vTo.scale(screenDistance)); double rX = screenWidth / nX; double rY = screenHeight / nY; double yi = (i - (nY / 2.0)) * rY + (rY / 2.0); double xj = (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testConstructRayThroughPixel() {\n\n\t\tCamera camera1 = new Camera(Point3D.ZERO, new Vector(0, 1, 0), new Vector(0, 0, 1));\n\n\t\t// 3X3\n\t\tRay ray11 = camera1.constructRayThroughPixel(3, 3, 1, 1, 100, 150, 150);\n\t\tRay expectedRay11 = new Ray(Point3D.ZERO, new Vector(50, 50, 100).normal...
[ "0.6826123", "0.6718421", "0.6547426", "0.65022767", "0.65022767", "0.6460753", "0.64524597", "0.63822556", "0.62495774", "0.6227091", "0.6226044", "0.61740535", "0.5921775", "0.59114337", "0.58347124", "0.5762176", "0.57131124", "0.5679688", "0.56575257", "0.56371623", "0.56...
0.6210782
11
Constructor for duke.task.Task which takes in a String description and whether it is done or not.
Task(String description, boolean isDone) throws DateTimeException { this.description = description; this.isDone = isDone; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Task(String description, boolean done) {\r\n this.description = description;\r\n this.isDone = done;\r\n }", "public Task(boolean isDone, String description) {\n this.description = description;\n this.isDone = isDone;\n }", "public Task(String description){\n thi...
[ "0.8908575", "0.8813516", "0.86736125", "0.86736125", "0.86520123", "0.86520123", "0.8636979", "0.8501657", "0.8496353", "0.84530014", "0.84458363", "0.84147775", "0.83810556", "0.8259589", "0.8232722", "0.79592997", "0.78487396", "0.76453996", "0.7442807", "0.7356628", "0.72...
0.78493875
16
Gets the String description of the task.
public String getDescription() { return description; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String get_task_description()\n {\n return task_description;\n }", "public String getDescription()\r\n {\r\n return \"Approver of the task \"+taskName();\r\n }", "public String getTaskName() {\n return this.taskDescription;\n }", "public String GiveTask(){\n return \...
[ "0.8601203", "0.81070465", "0.7988292", "0.75082636", "0.7391041", "0.7390478", "0.7301132", "0.7232685", "0.7194147", "0.71572083", "0.71572083", "0.7147198", "0.7147133", "0.71446717", "0.71305436", "0.71305436", "0.7114812", "0.7109568", "0.7081664", "0.70810413", "0.70742...
0.0
-1
Gets the boolean value whether task is done or not.
public boolean getDone() { return isDone; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isDone(){\n return done;\n }", "public String getIsDone() {\n if (isDone) {\n return \"1\";\n } else {\n return \"0\";\n }\n }", "public boolean isDone() {\n return done;\n }", "public boolean isDone() {\r\n return isDone;\r\n ...
[ "0.8020528", "0.7949551", "0.7901273", "0.78913486", "0.7885356", "0.78826874", "0.78826874", "0.78826874", "0.7881275", "0.7881275", "0.78720874", "0.7867291", "0.7827865", "0.78197044", "0.78197044", "0.77187896", "0.7682681", "0.76467663", "0.7602398", "0.75435096", "0.754...
0.78373384
12
Sets duke.task.Task to be done.
public void setDone() { isDone = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTask(Task task) {\n this.task = task;\n }", "public void setTask(Task inTask){\n punchTask = inTask;\n }", "public void setTask(TaskDTO task) {\n\t\tthis.task = task;\r\n\t\t\r\n\t\t\r\n\t}", "protected void setupTask(Task task) {\n }", "public void setTask(PickingRequ...
[ "0.71818554", "0.7028011", "0.68016356", "0.6696008", "0.653116", "0.64311975", "0.64230406", "0.6386578", "0.6351203", "0.6343776", "0.6255076", "0.62515134", "0.62498385", "0.6228714", "0.6181563", "0.61627024", "0.6162351", "0.60684246", "0.6056501", "0.60524416", "0.60256...
0.61767673
15
Converts whether task is done or not to a status. + symbols means done symbol means not done
private String getStatusIcon() { return (isDone ? "+" : "-"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getStatus() {\n return isDone ? \"1\" : \"0\";\n }", "private static String getStatus(Task task) {\n Status myStatus = task.getStatus();\n if (myStatus == Status.UP_NEXT) {\n return \"UP_NEXT\";\n } else if (myStatus == Status.IN_PROGRESS) {\n re...
[ "0.70748615", "0.69444174", "0.6917158", "0.6550039", "0.64795375", "0.63951546", "0.63346833", "0.62858784", "0.6142251", "0.61319554", "0.60298777", "0.60006696", "0.59567076", "0.58739954", "0.5846445", "0.57982326", "0.5783803", "0.57679725", "0.57679725", "0.57679725", "...
0.58162415
15
Gets the String representation of the task.
@Override public String toString() { return "[" + getStatusIcon() + "] " + getDescription(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString() {\n\n\t\tString output = \"\";\n\n\t\tfor (Task i : tasks) {\n\t\t\toutput += i.toString() + \"\\n \\n\";\n\t\t}\n\n\t\treturn output;\n\t}", "public String pendingToString() {\n InterruptibleTask interruptibleTask = this.task;\n if (interruptibleTask == null) {\n ...
[ "0.7861892", "0.76334476", "0.7465651", "0.74368036", "0.73272437", "0.72967964", "0.72678256", "0.72678256", "0.72390264", "0.7212752", "0.72084284", "0.71931136", "0.709573", "0.7087583", "0.70421076", "0.70408165", "0.70265234", "0.7014924", "0.7009299", "0.70027995", "0.6...
0.0
-1
Returns the String representation of Deadline object.
public String toDataString() { return isDone ? "1 | " + getDescription() : "0 | " + getDescription(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic String toString() {\n\t\treturn String.format(\"Deadline: %d Value: %d\", this.deadline, this.value);\n\t}", "@Override\n\tpublic DateTime getDeadLine() {\n\t\treturn this.details.getDeadLine();\n\t}", "public String printDeadlineFormat() {\n return \" (. ゚ー゚) Doesn't match the deadl...
[ "0.7107814", "0.6456071", "0.642164", "0.6409127", "0.63603824", "0.6340242", "0.63291246", "0.6279171", "0.6278137", "0.62546134", "0.62449837", "0.6228679", "0.62225413", "0.6173224", "0.61686665", "0.6129624", "0.6117578", "0.61012983", "0.60974354", "0.6052069", "0.605163...
0.0
-1
TODO Autogenerated method stub
@Override public void widgetDefaultSelected(SelectionEvent e) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void widgetDefaultSelected(SelectionEvent e) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void widgetDefaultSelected(SelectionEvent e) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Creates a new instance of SyncApplication
public DerbyApplication(Context context,DB db,Storage storage) { super(context); this.db = db; this.storage = storage; getTunnelService().setEnabled(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private NewApplication createNewApplication() {\n GetNewApplicationRequest req =\n recordFactory.newRecordInstance(GetNewApplicationRequest.class);\n GetNewApplicationResponse resp;\n try {\n resp = rm.getClientRMService().getNewApplication(req);\n } catch (YarnException e) {\n String ...
[ "0.66869944", "0.6574492", "0.6512984", "0.64005166", "0.62663466", "0.6063663", "0.6040612", "0.5969038", "0.580241", "0.5765427", "0.5703421", "0.55645216", "0.5560555", "0.5545641", "0.55427516", "0.5533849", "0.5518471", "0.5499832", "0.54973996", "0.5491882", "0.5474138"...
0.0
-1
Initialize database from file
private static void loadTableData() { BufferedReader in = null; try { in = new BufferedReader(new FileReader(dataDir + tableInfoFile)); while (true) { // read next line String line = in.readLine(); if (line == null) { break; } String[] tokens = line.split(" "); String tableNam...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void initializeDatabase() {\n\t\tArrayList<String> data = DatabaseHandler.readDatabase(DATABASE_NAME);\n\t\tAbstractSerializer serializer = new CineplexSerializer();\n\t\trecords = serializer.deserialize(data);\n\t}", "public FileDatabase(String filename) throws IOException {\n\t\tdatabase = new F...
[ "0.7548207", "0.7158145", "0.6648796", "0.66438127", "0.6642097", "0.66413355", "0.6599986", "0.6593157", "0.6557276", "0.65557224", "0.6514799", "0.6482477", "0.6468478", "0.6453314", "0.6424349", "0.63794047", "0.6348668", "0.6338576", "0.6336453", "0.6335966", "0.63340217"...
0.0
-1
Load table data from file and insert it into DB.
public static void readTable(String tableName, String filename) { // System.out.println(filename); BufferedReader in = null; try { in = new BufferedReader(new FileReader(dataDir + filename)); while (true) { String line = in.readLine(); if (line == null) { break; } // remove | at en...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void loadTableData() {\n\n\t\tBufferedReader in = null;\n\t\ttry {\n\t\t\tin = new BufferedReader(new FileReader(dataDir + tableInfoFile));\n\n\t\t\twhile (true) {\n\n\t\t\t\t// read next line\n\t\t\t\tString line = in.readLine();\n\t\t\t\tif (line == null) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t...
[ "0.7117139", "0.69467306", "0.67497486", "0.67228657", "0.6546166", "0.6520098", "0.64840114", "0.64533603", "0.6390806", "0.6358577", "0.6345898", "0.63434947", "0.6326316", "0.6241529", "0.6191376", "0.6146392", "0.6134666", "0.6093861", "0.604476", "0.60385454", "0.6028895...
0.62319565
14
/ CREATE and UPDATE
public void saveProduct(Product product);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Update createUpdate();", "E update(E entiry);", "Dao.CreateOrUpdateStatus createOrUpdate(T data) throws SQLException, DaoException;", "int updateByPrimaryKey(Factory record);", "private static void testupdate() {\n\t\ttry {\n\t\t\tRoleModel model = new RoleModel();\n\t\t\tRoleBean bean = new RoleBean();\n\...
[ "0.7551734", "0.6337913", "0.63296205", "0.6224424", "0.6022952", "0.5995848", "0.5974442", "0.59267586", "0.59255564", "0.59012264", "0.5877681", "0.5870225", "0.58656925", "0.58656925", "0.5857596", "0.5857238", "0.5848731", "0.58469486", "0.58456814", "0.58251405", "0.5823...
0.0
-1
Constructor for device that takes a hub.
public Device(Hub h) { uuid = UUID.randomUUID(); status = Status.NORMAL; hub = h; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public device() {\n\t\tsuper();\n\t}", "public Device() {\n }", "public PuppetIdracServerDevice() { }", "private Device(Builder builder) {\n super(builder);\n }", "Device createDevice();", "public IoTSecurityAlertedDevice() {\n }", "public DeviceInfo() {}", "Builder forDevice(Device...
[ "0.62662727", "0.62225235", "0.5870068", "0.58545834", "0.5662433", "0.55389583", "0.55365556", "0.54398614", "0.5427518", "0.5411364", "0.54077846", "0.5370419", "0.53584594", "0.53284353", "0.53234935", "0.5298077", "0.52637833", "0.52526337", "0.5228228", "0.52001774", "0....
0.84345526
0
This function alerts the hub with a message from the device. It protects the hub from the device implementations.
protected final void alertHub(String message) { hub.alert(new JSONMessaging(this, message)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void alert(String message) {\n\t\tAlertDialog alert = new AlertDialog.Builder(this).setTitle(getString(R.string.warning)).setMessage(message)\n\t\t\t\t.setNeutralButton(getString(R.string.ok), new DialogInterface.OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\n\t\t\t\t...
[ "0.6408825", "0.6180617", "0.61442816", "0.6108709", "0.6082957", "0.60825557", "0.59979665", "0.5984548", "0.59442174", "0.59188604", "0.5906586", "0.5903808", "0.5893656", "0.586571", "0.58470786", "0.58420664", "0.58418465", "0.5838498", "0.5828049", "0.58240885", "0.58201...
0.689159
0
This function receives notifications from the hub which are sent from the clients. The device implementation should filter based on target UUID/message.
public abstract void notify(JSONObject message);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n Log.i(TAG, \"From: \" + remoteMessage.getFrom());\n sendOnChannel1();\n sendOnChannel2();\n if (remoteMessage == null)\n return;\n\n // Check if message contains a notification payload.\n ...
[ "0.625814", "0.59923756", "0.5935336", "0.58732873", "0.5866304", "0.5864618", "0.58565974", "0.5829044", "0.5809247", "0.5803461", "0.5749803", "0.5746646", "0.57394207", "0.57371145", "0.5734778", "0.5719245", "0.5709673", "0.5701233", "0.56726086", "0.5671781", "0.5656573"...
0.5232158
81
This method serves to ensure that only the button at lowest possible location will be turned red/yellow
public int checkLowestPossible(int j, int m){ for(int i =5; i>=0; i--){ if(board[i][j]==0){ board[i][j] = m; return i; } } return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void setButtonsColor(){\r\n for(MyButton b: mylist.getAllButtons()){\r\n if(!b.isChosen()){\r\n b.resetColor();\r\n }\r\n }\r\n \r\n for (MyButton b1: mylist.getAllButtons()){\r\n if(b1.isChosen()){\r\n for(My...
[ "0.67935747", "0.64528584", "0.644425", "0.63673043", "0.63002086", "0.62935823", "0.6291535", "0.62806374", "0.61793625", "0.61237913", "0.6123112", "0.6119282", "0.6110097", "0.60961545", "0.608377", "0.6052848", "0.60176915", "0.5987466", "0.59867525", "0.5954904", "0.5951...
0.0
-1
This methods checks to see if there is a winner. Every nested for loop works in the same way in that it goes through and sees if there are four integers in the board array that are the same, if they aren't 0. If so, the applicable buttons in the GBoard[][] will be turned into a star, the wonYet variable will be set to ...
public boolean winCheck(){ for(int i=0; i<3; i++){//goes through rows for(int j=0; j<4; j++){//goes through columns if(board[i][j+3] != 0 && board[i+1][j+2] != 0 && board[i+2][j+1] != 0 && board[i+3][j] != 0) if(board[i][j+3]==(board[i+1][j+2])) i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean checkForWinner(String player) {\r\n\t\t\r\n\t\t// check rows\r\n\t\tfor (int row = 0; row < board.length; row++) {\r\n\t\t\tint markCounter = 0;\r\n\t\t\tfor (int col = 0; col < board[row].length; col++) {\r\n\t\t\t\tif (board[row][col].getText().contains(player)) {\r\n\t\t\t\t\tmarkCounter++;\r\n\t...
[ "0.76808673", "0.7676943", "0.75713795", "0.75407284", "0.7531781", "0.752648", "0.74821734", "0.74299294", "0.74128234", "0.7391343", "0.7368067", "0.7356322", "0.7342707", "0.72748566", "0.7274512", "0.7236196", "0.7233697", "0.7211992", "0.7188406", "0.7187419", "0.7179037...
0.8556861
0
/This method only returns one integer, referring to one column a "chip will be dropped into". It first sees to if it can win anywhere (verticals, all horizontals, all diagnonals, and all sub subdiagonals). If if can't win anywhere, it will then see if the user is one move away from winning by checking for all verticals...
public int AI(){ for(int i=0; i<3; i++){ for(int j=0; j<7; j++){ if(board[i][j]==0 && board[i+1][j]==2 && board[i+2][j]==2 && board[i+3][j]==2){ return j; } } } //checks for horizontals (Y-YY) for(int i=0; i<6; i++){ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int checkWinner() {\n if (this.turnCount >= 2) {\n int colWin = this.checkColumn();\n if (colWin > 0) {\n return colWin;\n }\n\n int rowWin = this.checkRow();\n if (rowWin > 0) {\n return rowWin;\n }\n\n ...
[ "0.7284139", "0.7104654", "0.6932534", "0.68327767", "0.6809983", "0.6788454", "0.6765939", "0.65822726", "0.65763813", "0.65308684", "0.6508098", "0.6497964", "0.6475624", "0.6444424", "0.641199", "0.6384879", "0.63818955", "0.6364739", "0.6362011", "0.63601094", "0.6342892"...
0.0
-1
TODO Autogenerated method stub
@Override public void keyPressed() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
For wildcard or type variable, the first bound determines the runtime type.
public final Class<? super T> getRawType() { Class<?> rawType = getRawTypes().iterator().next(); @SuppressWarnings("unchecked") // raw type is |T| Class<? super T> result = (Class<? super T>) rawType; return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n public void testParameterizedTypeWithWildcardWithTypeVariableBound()\r\n {\r\n Type typeVariable = Types.createTypeVariable(\"E\");\r\n Type wildcardType = Types.createWildcardType(\r\n null, new Type[]{typeVariable});\r\n Type parameterizedType = \r\n Ty...
[ "0.5873269", "0.58136857", "0.5732055", "0.55127215", "0.54531866", "0.5448836", "0.54032785", "0.5390001", "0.53781074", "0.5319641", "0.5310277", "0.5235763", "0.5187563", "0.51568156", "0.51051575", "0.5082757", "0.50807315", "0.50397736", "0.49919072", "0.49791312", "0.49...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { List<String> x=getCompanyNames(); for(String y:x){ System.out.println(y); } }
{ "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
GET All User's Current Location
@RequestMapping(value = "/current_location/all", method = RequestMethod.GET) public ResponseEntity<List<CurrentLocation>> getAllFavoriteZones() { List<CurrentLocation> currentLocationList = currentLocationService.findAllCurrentLocation(); if(currentLocationList.isEmpty()){ return new R...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Location getUserLocation()\n {\n\n return userLocation;\n }", "public List<LocationInfo> getAllLocation() {\n return allLocation;\n }", "com.google.ads.googleads.v6.resources.UserLocationView getUserLocationView();", "Map<UUID, Optional<Location>> getAllCurrentLocations();", "public ...
[ "0.7027496", "0.70127463", "0.69614536", "0.68853545", "0.6871158", "0.6867586", "0.66958594", "0.66261953", "0.65846604", "0.65846604", "0.65846604", "0.65846604", "0.65215224", "0.65211505", "0.6516885", "0.6474377", "0.6432292", "0.6408678", "0.6399806", "0.63953745", "0.6...
0.0
-1
GET My Current Location
@RequestMapping(value = "/current_location/{user_id}", method = RequestMethod.GET) public ResponseEntity<CurrentLocation> getAboutMe(@PathVariable String user_id) { CurrentLocation currentLocation = currentLocationService.findMyCurrentLocation(user_id); if (currentLocation == null) { S...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Location getCurrentLocation();", "URI getLocation();", "Location getLocation();", "Location getLocation();", "Location getLocation();", "Location getLocation();", "@SuppressWarnings(\"unused\")\n Location getCurrentLocation();", "String location();", "String location();", "String lo...
[ "0.7912868", "0.77893895", "0.77008957", "0.77008957", "0.77008957", "0.77008957", "0.75745404", "0.7512766", "0.7512766", "0.7512766", "0.7512766", "0.7512766", "0.7512766", "0.7512766", "0.7512766", "0.7507328", "0.74938804", "0.74938804", "0.74938804", "0.7357591", "0.7270...
0.0
-1
Created by TW on 2017/7/14.
public interface GoodsDao { @Select("SELECT g.id, g.NAME, g.caption, g.image, g.price FROM xx_goods g LEFT JOIN " + " xx_product_category p on g.product_category = p.id LEFT JOIN xx_goods_tag t on g.id=t.goods " + " where p.tree_path LIKE ',${categoryId},%' AND t.tags = #{tagId} and g.is_ma...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r...
[ "0.60549164", "0.59378976", "0.5798452", "0.5762114", "0.5741649", "0.57081324", "0.57081324", "0.5665461", "0.5643025", "0.56324536", "0.5617877", "0.55715424", "0.5548387", "0.5535888", "0.55287606", "0.55274373", "0.5522739", "0.5522739", "0.5522739", "0.5522739", "0.55227...
0.0
-1
Creates a new empty instance of DailyQuoteSeries.
public Series() { super(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private XYSeries createSeries() {\r\n return createSeries(0);\r\n }", "public DateAxis() { this(null); }", "public BasicOrderedSeries()\n\t{\n\t\tsuper();\n\t}", "public Series () {\n super();\n this.price = RandomFill.generateNumber(5,15);\n this.listSeason = RandomFill.genera...
[ "0.66558605", "0.60162497", "0.6010112", "0.57146883", "0.56819767", "0.54534674", "0.54357696", "0.53980863", "0.5316092", "0.529453", "0.5289731", "0.5283593", "0.5273274", "0.5261185", "0.52505434", "0.52478236", "0.5228155", "0.5222818", "0.52124697", "0.5108033", "0.5105...
0.6124297
1
Creates a new instance of DailyQuoteSeries from a collection.
public Series(Collection<Integer> series) { readCollection(series); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private XYDataset createDataset() {\n final XYSeriesCollection dataset = new XYSeriesCollection();\n //dataset.addSeries(totalDemand);\n dataset.addSeries(cerContent);\n //dataset.addSeries(cerDemand);\n dataset.addSeries(comContent);\n //dataset.addSeries(comDemand);\n ...
[ "0.5225168", "0.51628864", "0.5085745", "0.50808245", "0.4996711", "0.4959507", "0.48796365", "0.4837174", "0.48033255", "0.47983602", "0.46557888", "0.46286884", "0.4625884", "0.4601717", "0.45996085", "0.45935482", "0.4593343", "0.45831278", "0.45741603", "0.45392412", "0.4...
0.5644957
0
Reads the series from a collection of floating point values in double precision.
protected void readCollection(Collection<Integer> series) { size = series.size(); if(size==0) return; x = new double[size]; Iterator<Integer> i = series.iterator(); for(int t = 0; i.hasNext(); t++) x[t] = (i.next()).doubleValue(); if(size<2) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static double[] readDoubles() {\n return readAllDoubles();\n }", "public abstract void read_double_array(double[] value, int offset, int\nlength);", "public abstract double readAsDbl(int offset);", "double readDouble();", "double readDouble() throws IOException;", "private Data[...
[ "0.6997097", "0.65448064", "0.6420158", "0.6241261", "0.6060583", "0.60147303", "0.6014709", "0.5972213", "0.59520096", "0.5931642", "0.59146595", "0.5903449", "0.5827682", "0.5804927", "0.57390577", "0.572967", "0.571828", "0.56917524", "0.5678745", "0.5654575", "0.5650003",...
0.6953889
1
Get the tth quote in the series.
public double getQuote(int t) { if(t<0 || t>=size) return 0.0; return x[t]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getTick() { // 3\n\t\treturn tic;\n\t}", "public String getQuote(){\n\t\tString quote = null;\n\t\ttry {\n\t\t\tcrs = qb.selectFrom(\"qotd\").all().executeQuery();\n\n\t\t\tif(crs.next()) {\n\t\t\t\tquote = crs.getString(\"qotd\");\n\...
[ "0.604744", "0.5943398", "0.5878005", "0.58649635", "0.5774259", "0.576446", "0.57144666", "0.57097787", "0.56965274", "0.5662565", "0.55669814", "0.5560736", "0.55371404", "0.5530598", "0.54584324", "0.54466325", "0.5437523", "0.5423475", "0.5395896", "0.5327191", "0.5322363...
0.6981264
0
Get the square of the tth quote in the series.
public double getSqrQuote(int t) { if(t<0 || t>=size) return 0.0; return x[t]*x[t]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getQuote(int t)\n {\n if(t<0 || t>=size)\n return 0.0;\n return x[t];\n }", "private int getMQuote()\n {\n if (mQuote != 0)\n {\n return mQuote; // already calculated\n }\n\n// assert this.sign > 0;\n\n int d = -magnitu...
[ "0.71790266", "0.5745889", "0.57217056", "0.5646441", "0.5483308", "0.5470933", "0.5394773", "0.53751916", "0.53218865", "0.5267231", "0.52542824", "0.5228414", "0.5223884", "0.52205426", "0.52074474", "0.51898354", "0.51624525", "0.5157856", "0.5126182", "0.5106508", "0.5065...
0.7119622
1
Returns the logreturn calculated on the tth environement of the series. The logreturn of environement x(t) of series X is defined as log(x(t)/x(t 1). For this reason, the first environement for which logreturn can be calculated is the one with index 1. Requesting a logreturn for an outofrange index does not cause an ex...
public double getLogReturn(int t) { if(t<1 || t>=size) return 0.0; return r[t - 1]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double logZero(double x);", "long getLastLogIndex();", "long getFirstLogIndex();", "public Series logarithmic()\n {\n Series logarithmic = new Series();\n logarithmic.x = new double[logarithmic.size = size];\n logarithmic.r = r;\n for(int t = 0; t<size; t++)\n ...
[ "0.5831289", "0.56712365", "0.5641109", "0.5636774", "0.5563027", "0.54627055", "0.5392971", "0.53246105", "0.53125197", "0.52770096", "0.52540725", "0.52529925", "0.5186798", "0.5183949", "0.51615274", "0.514997", "0.5132007", "0.50933486", "0.5060206", "0.5050792", "0.50493...
0.6868315
0
Sample mean of the series.
public double mean() { double sum = 0.0; for(int t = 0; t<size; t++) sum += x[t]; return sum/size; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double mean() {\n double total = 0;\n for (int i = 0; i < sites.length; i++) {\n total += sites[i];\n }\n sampleMean = total / size / times;\n return sampleMean;\n }", "public double mean() {\r\n\t\treturn mean;\r\n\t}", "public double mean() {\n\t\tretur...
[ "0.7463143", "0.72188044", "0.71837693", "0.71837693", "0.71716744", "0.71409225", "0.70390004", "0.7015413", "0.6967397", "0.6951795", "0.6949215", "0.6930485", "0.69242525", "0.68493843", "0.68419594", "0.68400085", "0.6834142", "0.68331766", "0.679127", "0.6757434", "0.675...
0.69534713
9
Variance of the series w.r.t. a known mean.
public double variance(double m) { double var = 0.0; for(int t = 0; t<size; t++) { double dev = x[t] - m; var += dev*dev; } return var/size; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static double varianceVal(double[] arrayOfSamples, double mean){\n\t double v = 0;\n\t for(double i :arrayOfSamples)\n\t v += Math.pow((mean-i), 2);\n\t return v / arrayOfSamples.length;\n\t}", "public double varianceOfMean() {\n\t\treturn variance() * getWeight();\n\t}", ...
[ "0.78710103", "0.78310233", "0.7800162", "0.7689536", "0.76676583", "0.762574", "0.75679225", "0.7541008", "0.7243375", "0.71831983", "0.71747977", "0.70331806", "0.6996695", "0.69443744", "0.68520516", "0.6732104", "0.6675919", "0.66715294", "0.6624185", "0.65689576", "0.656...
0.68469554
15
Variance of the series.
public double variance() { return variance(mean()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Double getVariance() {\n return variance;\n }", "public double variance() {\n final double average = average();\n final int size = size();\n\n int cnt = 0;\n double rval = 0;\n\n // Compute the variance\n for (int i = 0; i < size; i++) {\n fin...
[ "0.8065374", "0.79044783", "0.789876", "0.7867054", "0.78445333", "0.7619414", "0.74946046", "0.74621403", "0.73266447", "0.7326475", "0.7306682", "0.72074115", "0.7050715", "0.7034852", "0.695394", "0.6889989", "0.68309194", "0.68229866", "0.68229866", "0.6811071", "0.675020...
0.79914725
1
Exponential smoothing backcast for GARCH variance initialization. This method is a Java porting of Matlab function varbackcast by TradingLab.
public double varianceBackcast() { double unconditionalVariance = variance(0.0); // why do they compute the unconditional variance if they don't // use it afterwards? double lambda = .7; double sigsum = 0.0; for(int t = 0; t<size; t++) sigsum += M...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double [] calcGamma(){\n\t\t\tgamma = new double [N];\n\t\t\tdouble [] gammaParam = new double [noLiveSites];\n\t\t\tint liveSite = 0;\n\t\t\tfor (int i = 0; i < N; i ++){\n\t\t\t\tgamma[i] = 1.0;\n\t\t\t\tif(aliveLattice[i]){\n\t\t\t\t\tdouble phi_i = 1.0 - fracDeadNbors[i];\n\t\t\t\t\tgammaParam[liveSite] = 1-ph...
[ "0.51500094", "0.49908596", "0.49872848", "0.4832363", "0.4774074", "0.47540474", "0.46885556", "0.46764994", "0.46677428", "0.46667022", "0.46390954", "0.46076834", "0.46023986", "0.45800066", "0.45209542", "0.45164892", "0.44780508", "0.4475406", "0.44749272", "0.44710934", ...
0.529897
0
Return a moving average for the series for the given day. The nday moving average, MA(n), is a very simple and popular delay technical indicator.
public double movingAverage(int periods, int t) { if(periods>t + 1 || periods<1) throw new IndexOutOfBoundsException("MA(" + periods + ") is undefined at time " + t); double sum = 0.0; for(int i = t - periods + 1; i<=t; i++) sum += x[i]; return sum/periods; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void MovingAverage() {\n\t\tList<Double> high = new ArrayList<Double>();\n\t\t// high = highPriceList();\n\t\tfor (Double data2 : high) {\n\t\t\tSystem.out.println(data2);\n\t\t}\n\t\t// double[] testData = { 1, 2, 3, 4, 5, 5, 4, 3, 2, 1 };\n\t\tint[] windowSizes = { 3 };\n\n\t\tfor (int windSize :...
[ "0.6104358", "0.6029362", "0.5758788", "0.5700185", "0.56716883", "0.5554278", "0.5480909", "0.53541315", "0.53469783", "0.5338232", "0.5322921", "0.51918405", "0.5174072", "0.51092106", "0.49829495", "0.4951872", "0.49417424", "0.49314085", "0.48986727", "0.4876008", "0.4874...
0.5698314
4
Return an exponential moving average for the series for the given day. The nday exponential moving average, EMA(n), is a very popular delay technical indicator.
public double expMovingAverage(int periods, int t) { if(periods<1) throw new IndexOutOfBoundsException("EMA(" + periods + ") is undefined at time " + t); double alpha = 2.0/(periods + 1); double ema = 0.0; for(int i = 0; i<=t; i++) ema += alpha*(x[i] - ema); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double averageSteps() {\n if (day==0) return 0;\n return (double) totalSteps / day;}", "private static double calculateMovingAverage(JsArrayNumber history) {\n double[] vals = new double[history.length()];\n long size = history.length();\n double sum = 0.0;\n double mSum = 0.0;\n...
[ "0.57069635", "0.5461666", "0.5426084", "0.5391336", "0.5247684", "0.52086073", "0.5170173", "0.50805634", "0.5071065", "0.5043507", "0.5042026", "0.50237584", "0.50073195", "0.5001429", "0.49868557", "0.49804515", "0.49752748", "0.4914446", "0.4875539", "0.48647755", "0.4832...
0.6108191
0
Returns the "standard" MACD for the series for the given day. Developed by Gerald Appel, Moving Average Convergence/Divergence (MACD) is one of the simplest and most reliable indicators available. MACD uses moving averages, which are lagging indicators, to include some trendfollowing characteristics. These lagging indi...
public double MACD(int t) { return MACD(26, 12, t); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double MACDSignal(int t)\n {\n Series macd = new Series();\n macd.x = new double[macd.size = t + 1];\n for(int i = 0; i<=t; i++)\n macd.x[i] = MACD(i);\n return macd.expMovingAverage(9, t);\n }", "@Override \r\n protected void calculate(int index, DataContext...
[ "0.5747135", "0.4984603", "0.4729237", "0.45979315", "0.45145375", "0.44193342", "0.44025046", "0.43632177", "0.43584004", "0.42650777", "0.42184192", "0.42168382", "0.4177957", "0.41522455", "0.41474697", "0.41410518", "0.41263267", "0.41074225", "0.408753", "0.408753", "0.4...
0.500716
1
Returns the MACD technical indicator for the series for the given day. Developed by Gerald Appel, Moving Average Convergence/Divergence (MACD) is one of the simplest and most reliable indicators available. MACD uses moving averages, which are lagging indicators, to include some trendfollowing characteristics. These lag...
public double MACD(int slow, int fast, int t) { if(slow<=fast) throw new IndexOutOfBoundsException("MACD(" + slow + " - " + fast + ") is undefined at time " + t); return expMovingAverage(slow, t) - expMovingAverage(fast, t); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override \r\n protected void calculate(int index, DataContext ctx)\r\n {\r\n DataSeries series = ctx.getDataSeries();\r\n boolean complete=true;\r\n \r\n /*\r\n int macdPeriod1 = getSettings().getInteger(MACD_PERIOD1, 12);\r\n int macdPeriod2 = getSettings().getInteger(MACD_PERIOD2, 26);\r\n ...
[ "0.5711288", "0.54807335", "0.4906584", "0.48030573", "0.45229852", "0.45071", "0.44453505", "0.44249108", "0.437002", "0.4330886", "0.4327715", "0.4313148", "0.43106163", "0.43103933", "0.4296545", "0.4292115", "0.42614692", "0.42514506", "0.42509276", "0.42502838", "0.42501...
0.4065727
33
Calculates the signal line for the MACD (Moving Average Convergence/Divergence), which is the difference between a short and a long term moving average for a field. The signal line is a moving average of the MACD used for generating entry/exit signals. The MACD signal line is a 9period exponential moving average of the...
public double MACDSignal(int t) { Series macd = new Series(); macd.x = new double[macd.size = t + 1]; for(int i = 0; i<=t; i++) macd.x[i] = MACD(i); return macd.expMovingAverage(9, t); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override \r\n protected void calculate(int index, DataContext ctx)\r\n {\r\n DataSeries series = ctx.getDataSeries();\r\n boolean complete=true;\r\n \r\n /*\r\n int macdPeriod1 = getSettings().getInteger(MACD_PERIOD1, 12);\r\n int macdPeriod2 = getSettings().getInteger(MACD_PERIOD2, 26);\r\n ...
[ "0.6408273", "0.5388387", "0.50075793", "0.48845273", "0.47046033", "0.469359", "0.46626016", "0.46207273", "0.45988655", "0.44616583", "0.44593862", "0.43690953", "0.43485478", "0.43134356", "0.43045345", "0.4300377", "0.42951757", "0.4273741", "0.42725843", "0.42520598", "0...
0.6478376
0
Computes the momentum technical indicator.
public double momentum(int periods, int t) { if(periods>t || periods<1) throw new IndexOutOfBoundsException("Momentum(" + periods + ") is undefined at time " + t); return x[t] - x[t - periods]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract double getCarbon();", "double getAcceleration ();", "public abstract float getMomentOfInertia();", "@Override\n\tpublic double getCarbon() {\n\t\treturn 0;\n\t}", "Measurement getAccumulation();", "public Momentum() {\r\n m1 = m2 = v1 = v2 = p1 = p2 = comx = cv = 0.0;\r\n xp...
[ "0.5842511", "0.5621919", "0.55915004", "0.54739785", "0.53959656", "0.5384035", "0.5352019", "0.5313902", "0.5301976", "0.5283968", "0.52585053", "0.52410376", "0.52403766", "0.5226403", "0.5222235", "0.52209216", "0.5213842", "0.5205169", "0.51634383", "0.5163087", "0.51558...
0.48180455
88
Computes the rate of change (or ROC) technical indicator.
public double rateOfChange(int periods, int t) { if(periods>t || periods<1) throw new IndexOutOfBoundsException("ROC(" + periods + ") is undefined at time " + t); return 100.0*(x[t] - x[t - periods])/x[t - periods]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract double calculateCurrentDiscountRate();", "float getVacationAccrualRate();", "public abstract double getDiscountRate();", "double getRate();", "@Override\n\tpublic double calRate() {\n\t\treturn 0.9f;\n\t}", "public double getRate() {\r\n\t\treturn (getRate(0)+getRate(1))/2.0;\r\n\t}", "public ...
[ "0.71553296", "0.6922983", "0.6765091", "0.67244434", "0.66893506", "0.6533797", "0.626141", "0.62270856", "0.6212958", "0.62019116", "0.61990136", "0.61549115", "0.615388", "0.6125401", "0.6111512", "0.6106158", "0.6106158", "0.6076298", "0.6076096", "0.60693413", "0.6060036...
0.58961135
43
Computes the relative strength index (RSI) with the given number of periods.
public double relativeStrengthIndex(int periods, int t) { double rs = upward().expMovingAverage(periods, t - 1)/downward().expMovingAverage(periods, t - 1); return 100.0 - 100.0/(1 + rs); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getRSI(double[] hArr) throws Exception {\n\t\tdouble up=0;\n\t\tdouble down=0;\n\t\tSystem.out.println(\"plz\" + hArr.length + \"?\" + period_day);\n\t\tfor(int i = 0; i < period_day; i++) {\n\t\t\t\n\t\t\tif(hArr[i] < hArr[i+1]) {\n\t\t\t\tup += hArr[i+1] - hArr[i];\n\t\t\t}\n\t\t\telse if(hArr[i] >...
[ "0.6084087", "0.5116293", "0.50306547", "0.49412704", "0.48824358", "0.48582923", "0.47497806", "0.46959522", "0.4670009", "0.46693566", "0.4646477", "0.45650303", "0.4529743", "0.44942683", "0.4485951", "0.44691697", "0.44615254", "0.44497746", "0.44259173", "0.441421", "0.4...
0.6565824
0
Create a new historical series from this one by removing the trend by means of a moving average of the given depth. Because of the way the trend is removed from the series, the first depth quotes are lost.
public Series removeDelayedTrend(int depth) { if(depth<1 || depth>=size) throw new IndexOutOfBoundsException(); Series oscillator = new Series(); oscillator.x = new double[oscillator.size = size - depth]; if(oscillator.size>1) oscillator.r = new double[oscilla...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static double calculateMovingAverage(JsArrayNumber history) {\n double[] vals = new double[history.length()];\n long size = history.length();\n double sum = 0.0;\n double mSum = 0.0;\n long mCount = 0;\n\n // Check for sufficient data\n if (size >= 8) {\n // Clone the array and Ca...
[ "0.50266796", "0.46697804", "0.46451804", "0.46282667", "0.4593762", "0.45455372", "0.44172737", "0.43962234", "0.420705", "0.41807774", "0.41794118", "0.41414747", "0.4132326", "0.41083792", "0.4102095", "0.40482166", "0.40200713", "0.39770633", "0.39330322", "0.3888552", "0...
0.7574231
0
Create a new historical series from this one by removing the given linear trend. This method is intended for use on logarithmic series only. Applying it to a linear series is possible, but would be a conceptual error.
public Series removeLinearTrend(double c, double r) { Series oscillator = new Series(); oscillator.x = new double[oscillator.size = size]; if(size>1) oscillator.r = new double[size - 1]; for(int t = 0; t<size; t++) { oscillator.x[t] = x[t] - c - r*t; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean removeLinearTrend( double[] array, double timestep ) {\r\n if ((array == null) || (array.length == 0) ||\r\n (Math.abs(timestep - 0.0) < OPS_EPSILON)) {\r\n return false;\r\n }\r\n int len = array.length;\r\n double[] t...
[ "0.5592576", "0.5246531", "0.51622653", "0.47355467", "0.47331023", "0.46588823", "0.46109483", "0.45942107", "0.4569927", "0.4534085", "0.44513577", "0.4449001", "0.4400845", "0.434282", "0.4329999", "0.4318406", "0.43067905", "0.43048805", "0.42989022", "0.428638", "0.42818...
0.597564
0
Create a new historical series from this one by taking the logarithm of prices. The log returns of the new series are identical to those of the original series and equal the differences for the new series.
public Series logarithmic() { Series logarithmic = new Series(); logarithmic.x = new double[logarithmic.size = size]; logarithmic.r = r; for(int t = 0; t<size; t++) logarithmic.x[t] = Math.log(x[t]); return logarithmic; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setHistoryPrice(BigDecimal historyPrice) {\n this.historyPrice = historyPrice;\n }", "public ArrayList<History> getPriceHistory() { return priceHistory; }", "public BigDecimal getHistoryPrice() {\n return historyPrice;\n }", "public static double sumInLogDomain(double[] logs) ...
[ "0.56701726", "0.53513", "0.534101", "0.5295705", "0.5287103", "0.5275227", "0.5236696", "0.52333117", "0.5215374", "0.5162313", "0.5141226", "0.5138028", "0.512332", "0.5031366", "0.4976179", "0.49663207", "0.4875819", "0.48569795", "0.4848211", "0.48299852", "0.48278138", ...
0.681108
0