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
Default constructor with initial values
public Transformation(double values[][]) { super(4, 4, values); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "defaultConstructor(){}", "void DefaultConstructor(){}", "private Default()\n {}", "DefaultConstructor(int a){}", "ConstructorPractice () {\n\t\tSystem.out.println(\"Default Constructor\");\n\t}", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", ...
[ "0.8029128", "0.7813856", "0.7683762", "0.72234905", "0.71914095", "0.7145142", "0.69815224", "0.6972747", "0.69544166", "0.69268465", "0.67860734", "0.6782512", "0.67685837", "0.67585987", "0.67558306", "0.6755673", "0.6753713", "0.6734648", "0.6711416", "0.67016083", "0.668...
0.0
-1
Combines this transformation with another, returns new one
public Transformation mult(Transformation a) { Transformation result = new Transformation(); super.mult(a, result); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Transform compose(Transform other){\n float[][] ans = new float[4][4];\n for(int row = 0; row < 4; row++){\n for(int col = 0; col < 4; col++){\n for(int i = 0; i < 3; i++){\n ans[row][col] += this.values[row][i] * other.values[i][col];\n ...
[ "0.6331596", "0.6147592", "0.5760125", "0.5572666", "0.5475338", "0.5416517", "0.536545", "0.53519744", "0.5337426", "0.5271406", "0.5243893", "0.52284807", "0.5222999", "0.5217783", "0.5202247", "0.5130237", "0.5125593", "0.5119421", "0.51119196", "0.5082457", "0.50791276", ...
0.47891435
49
Applies transformation to a point, returns resulting point
public Point mult(Point a) { Point result = new Point(); super.mult(a, result); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Point transform(double x, double y, double z) {\n\t\t\n\t\n\t\tdouble uIso = (x * xToU) + (y * yToU) + (z * zToU);\n\t\tdouble vIso = (x * xToV) + (y * yToV) + (z * zToV);\n\t\t\n\t\tint uDraw = xOffset + (int)(scale * uIso);\n\t\tint vDraw = yOffset + (int)(scale * vIso);\n\t\t\n\t\treturn new Point(uDraw,...
[ "0.6990819", "0.6953299", "0.69452", "0.694162", "0.6792063", "0.6789732", "0.67674226", "0.6668801", "0.6617503", "0.6587727", "0.6570811", "0.6552235", "0.65514106", "0.65448546", "0.65217334", "0.65162474", "0.64678997", "0.64418054", "0.63695693", "0.6296592", "0.62493676...
0.0
-1
description: Created by Kris on 2021/1/31
@Repository public interface PermissionDao { Set<Permission> findPermissionsByRoleId(Integer roleId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n public String getDescription() {\n return DESCRIPTION;\n }", "@Override\n public String getDescription() {\n return descripti...
[ "0.6097628", "0.59425557", "0.5906998", "0.58471745", "0.5792916", "0.57630074", "0.5741695", "0.57392454", "0.57197756", "0.5701751", "0.5625615", "0.5625225", "0.5616141", "0.56030726", "0.55971354", "0.55971354", "0.55971354", "0.55971354", "0.55971354", "0.55971354", "0.5...
0.0
-1
Mapper for the entity Usuario and its DTO UsuarioDTO.
@Mapper(componentModel = "spring", uses = {OrgaoMapper.class, PermissaoMapper.class}) public interface UsuarioMapper { @Mapping(target = "orgao", ignore = true) UsuarioDTO usuarioToUsuarioDTO(Usuario usuario); List<UsuarioDTO> usuariosToUsuarioDTOs(List<Usuario> usuarios); Usuario usuarioDTOToUsuario(UsuarioDTO usuarioDTO); List<Usuario> usuarioDTOsToUsuarios(List<UsuarioDTO> usuarioDTOs); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public UsuarioDTO obtener(String login) throws ReizzelException;", "public Usuario fromDTO(NovoUsuarioDTO objDto){\n Usuario user = new Usuario(null, objDto.getEmail(), objDto.getNome(), passwordEncoder.encode(objDto.getSenha()));\n return user;\n }", "public UsuarioDTO consultarUsuario(String idUsuario...
[ "0.67002785", "0.6573722", "0.6561499", "0.6558716", "0.6424734", "0.64172906", "0.63926643", "0.6363179", "0.6352857", "0.63057023", "0.6287379", "0.62614375", "0.62073475", "0.6169765", "0.6169765", "0.6161582", "0.6157276", "0.6141776", "0.6079339", "0.606788", "0.6063428"...
0.7212182
0
Evaluate in a general context
public CalendarValue evaluateItem(XPathContext context) throws XPathException { CalendarValue in = (CalendarValue)argument[0].evaluateItem(context); if (in==null) { return null; } int nargs = argument.length; if (nargs==1) { return in.adjustTimezone(context.getImplicitTimezone()); } else { AtomicValue av2 = (AtomicValue)argument[1].evaluateItem(context); if (av2==null) { return in.removeTimezone(); } return adjustToExplicitTimezone(in, (DayTimeDurationValue)av2, context); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract Value evaluate();", "public abstract Object eval();", "Result evaluate();", "public abstract void interpret(EvaluationContext context);", "public double evaluate(Context context);", "public Const evaluate();", "double eval();", "String evaluate();", "public interface IExpressionR...
[ "0.7905488", "0.7582837", "0.75094026", "0.7429694", "0.7164438", "0.71469045", "0.70540375", "0.69183254", "0.6725247", "0.6678821", "0.6647357", "0.66446334", "0.65943015", "0.6590806", "0.6557438", "0.6546679", "0.6533808", "0.65099305", "0.6475638", "0.64075243", "0.63694...
0.0
-1
Construtor default da classe ConcelhosInterior
public ConcelhosInterior(){ this.concelhos = new HashMap<>(); this.concelhos.put("PENALVA DO CASTELO", 0.1); this.concelhos.put("VINHAIS", 0.08); this.concelhos.put("RESENDE", 0.09); this.concelhos.put("RIBEIRA DE PENA", 0.07); this.concelhos.put("BAIÃO", 0.1); this.concelhos.put("CELORICO DE BASTOS", 0.1); this.concelhos.put("TABUAÇO", 0.08); this.concelhos.put("CINFÃES", 0.07); this.concelhos.put("MIRANDELA", 0.06); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setInteriorColor(PDColor ic) {\n/* 425 */ getCOSObject().setItem(COSName.IC, (COSBase)ic.toCOSArray());\n/* */ }", "public abstract boolean isInterior();", "@Override\n public boolean isGoodForInterior()\n {\n return false;\n }", "public PDColor getInteriorColor() {\n/* ...
[ "0.61015856", "0.60568863", "0.6032549", "0.5996937", "0.5984248", "0.5894258", "0.58142924", "0.5796848", "0.5792032", "0.5626455", "0.5524097", "0.5491005", "0.54729843", "0.54564977", "0.54528373", "0.54097414", "0.5373575", "0.5337574", "0.53155243", "0.5308101", "0.52923...
0.69228595
0
Created by cxspace on 161117.
public interface CurrentCompetitionDao extends BaseDao<CurrentCompetition> { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void mo51373a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "public void mo38117a() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "pr...
[ "0.60930604", "0.5840824", "0.5838617", "0.58243406", "0.58180344", "0.580751", "0.580045", "0.5771903", "0.57428175", "0.57409954", "0.5734205", "0.5734205", "0.569417", "0.5690267", "0.56707495", "0.56707495", "0.56707495", "0.56707495", "0.56707495", "0.56707495", "0.56707...
0.0
-1
Point point1 = new Point(1,2); Point point4 = new Point(1,2); Circle testCirc1 = new Circle(5.0, point1, Color.red, true); Circle testCirc2 = new Circle(5.0, point4, Color.red, true); Circle testCirc3 = new Circle(5.0, point1, Color.red, false); System.out.println(Color.red.equals(Color.red)); System.out.println(testCirc1.equals(testCirc2)); System.out.println(testCirc2.equals(testCirc3)); Rectangle testRect1 = new Rectangle(5.0, 3.0, point1, Color.red, true); Rectangle testRect2 = new Rectangle(5.0, 3.0, point1, Color.red, true); Rectangle testRect3 = new Rectangle(5.0, 3.0, point1, Color.red, false); System.out.println(testRect1.equals(testRect2)); System.out.println(testRect2.equals(testRect3)); Point point2 = new Point(0,0); Point point3 = new Point(1,0); Triangle testTri1 = new Triangle(point1, point2, point3, Color.red, true); Triangle testTri2 = new Triangle(point1, point2, point3, Color.red, true); Triangle testTri3 = new Triangle(point1, point2, point3, Color.red, false); System.out.println(testTri1.getArea()); System.out.println(testTri1.equals(testTri2)); System.out.println(testTri2.equals(testTri3)); System.out.println(testTri1.getClass().equals(Triangle.class));
public static void main(String[] args) { Triangle tri; Point a = new Point(4, 0); Point b = new Point(-2, -1); Point c = new Point(1, 4); tri = new Triangle(a, b, c, Color.cyan, false); System.out.println(tri.getArea()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testEqualsTrue() {\n Rectangle r5 = new Rectangle(7, 4, new Color(255, 0, 0), new Position2D(50, 75));\n Rectangle r6 = new Rectangle(0, 4, new Color(255, 255, 255),\n new Position2D(-50, 75));\n Rectangle r7 = new Rectangle(7, 0, new Color(255, 255, 0), new Position2D(50, -75)...
[ "0.7072435", "0.6751566", "0.656788", "0.6535545", "0.65235364", "0.65108967", "0.64767265", "0.6458702", "0.6455921", "0.64195246", "0.63836217", "0.63363236", "0.63173497", "0.63059705", "0.6231705", "0.6221541", "0.6206214", "0.6181295", "0.61615", "0.6146274", "0.6126148"...
0.0
-1
Creates a new N_TIME_BEAR01MQuery.
public N_TIME_BEAR01MQuery() { super(); // Add design-time configured components. initComponents(); Empsn_DscField.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { // TODO Auto-generated method stub doQuery(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Builder clearQueryTimeNsec() {\n bitField0_ = (bitField0_ & ~0x00000100);\n queryTimeNsec_ = 0;\n onChanged();\n return this;\n }", "public TimeMap() {\n\n }", "public Builder setQueryTimeNsec(int value) {\n bitField0_ |= 0x00000100;\n queryTimeNsec_...
[ "0.523723", "0.49386904", "0.4911706", "0.49104196", "0.49101734", "0.48618644", "0.479165", "0.47270426", "0.47257", "0.4723191", "0.47212353", "0.4679877", "0.46750116", "0.4652706", "0.46199477", "0.460081", "0.4599348", "0.45769107", "0.45511776", "0.45402613", "0.4536789...
0.6149315
0
TODO Autogenerated method stub
@Override public void actionPerformed(ActionEvent e) { doQuery(); }
{ "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
Configures initial state of component. WARNING: AUTOGENERATED METHOD. Contents will be overwritten.
private void initComponents() { rootLayout = new Grid(); rootLayout.setWidth(new Extent(100, Extent.PERCENT)); rootLayout.setSize(2); add(rootLayout); Empsn_Label= new nextapp.echo2.app.Label(); Empsn_Label.setText("N_TIME_BEAR.EMPSN"); rootLayout.add(Empsn_Label); Empsn_DscField = new dsc.echo2app.component.DscField(); Empsn_DscField.setId("Empsn_DscField"); Empsn_DscField.setWidth(new Extent(4, Extent.CM)); rootLayout.add(Empsn_DscField); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initcomponent() {\n\r\n\t}", "@Override\n public void initState() {\n \n\t//TODO: Complete Method\n\n }", "@Override\n public void initComponent() {\n }", "@Override\n public void initComponent() {\n }", "@Override\r\n public void initComponent() {\n }", "publi...
[ "0.6861117", "0.6851904", "0.68248504", "0.68248504", "0.68088204", "0.67616415", "0.6596949", "0.65548056", "0.65548056", "0.64922655", "0.64731604", "0.6451677", "0.64340264", "0.63434523", "0.63319576", "0.63271534", "0.63205767", "0.6289299", "0.6250172", "0.6238679", "0....
0.0
-1
Created by sathvik on 11/4/2017.
public interface GetOrderDetails { @FormUrlEncoded @POST("/getorderdetails") Call<List<OrderCustomerDetails>> getOrderDetails( @Field("OrderId") String OrderId ); @FormUrlEncoded @POST("/canceluser") Call<Updatepending> canceluser( @Field("OrderId") String OrderId ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Overri...
[ "0.60269445", "0.58597374", "0.5845663", "0.5805552", "0.57818675", "0.57667434", "0.5715117", "0.5715117", "0.56575906", "0.5656734", "0.56227404", "0.56103", "0.56065077", "0.5601555", "0.55976915", "0.5590958", "0.5576248", "0.5570412", "0.5560291", "0.5555884", "0.5555884...
0.0
-1
returns a string with all the data in the tree in LNR order with an space in between them. Uses the toArrayList method in MorseCodeTree It should return the data in this order:"h s v i f u e l r a p w j b d x n c k y t z g q m o"
public static String printTree() { String tree = ""; ArrayList<String> letters = converter.toArrayList(); for(int i = 0; i < letters.size(); i++) { tree += letters.get(i); if(i + 1 < letters.size()) tree += " "; } return tree; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getTree ( ) {\n\n String tree;\n StringWriter s = new StringWriter();\n PrintWriter out = null;\n\n try {\n out = new PrintWriter(s);\n } catch ( Exception ex ) {};\n\n program.printIndividual(param.Parameters.STATE, out);\n\n tree = s.toStr...
[ "0.6306336", "0.6092393", "0.59960836", "0.5976841", "0.5836935", "0.5832466", "0.58128923", "0.579502", "0.57042485", "0.5701243", "0.570055", "0.5679644", "0.56758785", "0.56536466", "0.5631412", "0.5629755", "0.5628997", "0.5596531", "0.5588813", "0.5553578", "0.55510205",...
0.6937409
0
Renders our pixel array to the screen...
public void render(Graphics graphics) { // for(int index = 0; index < pixels.length; index++) { // pixels[index] = (int)(Math.random() * 0xFFFFFF); // } graphics.drawImage(view, 0, 0, view.getWidth(), view.getHeight(), null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void render () {\n image (img, xC, yC, xLength * getPixelSize(), yLength * getPixelSize());\n }", "private void render() {\n StringBuilder builder = new StringBuilder();\n builder.append(horizontalEdge).append(\"\\n\");\n for (int i = 0; i < this.height; i++) {\n builder.append(VERTICAL_...
[ "0.74150664", "0.7160165", "0.70355797", "0.6939384", "0.67979354", "0.6688349", "0.6633655", "0.6614947", "0.65597147", "0.6534052", "0.6534052", "0.651242", "0.64749736", "0.6463154", "0.64514375", "0.645019", "0.6448873", "0.64096713", "0.6405751", "0.6387859", "0.63383234...
0.646299
14
Render an image to our array of pixels.
public void renderImage(BufferedImage image, int xPosition, int yPosition) { int[] imagePixels = ((DataBufferInt) image.getRaster().getDataBuffer()).getData(); for(int y = 0; y < image.getHeight(); y++ ) { for(int x = 0; x < image.getWidth(); x++ ) { pixels[(x + xPosition) + (y + yPosition) * view.getWidth() ] = imagePixels[x + y * image.getWidth()]; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void render () {\n image (img, xC, yC, xLength * getPixelSize(), yLength * getPixelSize());\n }", "public abstract void render(PixelImage canvas);", "public void render() { image.drawFromTopLeft(getX(), getY()); }", "public void drawImage(float x, float y, float width, float height);", "public v...
[ "0.7562374", "0.7055417", "0.6879184", "0.6777522", "0.65387917", "0.639521", "0.6273812", "0.6257916", "0.6217269", "0.6205429", "0.620285", "0.6184646", "0.6174692", "0.61297387", "0.6111359", "0.6087081", "0.60538346", "0.6042873", "0.60135484", "0.60068697", "0.59945714",...
0.7340986
1
private static final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd HH:mm:ss");
public void setPaymentTime(String paymentTime) { this.paymentTime = paymentTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private TodoData() {\n //nastavenie formatovania\n formatter = DateTimeFormatter.ofPattern(\"dd-MM-yyyy\");\n }", "private static void m1() {\n\n String d = \"2019/03/22 10:00-11:00\";\n DateFormat df = new SimpleDateFormat(\"yyyy/MM/dd HH:mm-HH:mm\");\n try {\n Date parse = df.par...
[ "0.6166982", "0.6069459", "0.601484", "0.5680025", "0.5678567", "0.56751", "0.5639671", "0.56133276", "0.5580653", "0.55692434", "0.5549412", "0.5532551", "0.552485", "0.5520321", "0.54783607", "0.5456099", "0.5455857", "0.5370131", "0.5358988", "0.52944124", "0.5281013", "...
0.0
-1
postOrder without recursive solution.
public ArrayList<Integer> postorderTraversal(TreeNode root) { ArrayList<Integer> list = new ArrayList<>(); Stack<TreeNode> stack = new Stack<>(); if (root == null) return list; stack.push(root); while (!stack.empty()) { TreeNode current = stack.pop(); if (current.left != null) { stack.push(current.left); list.add(current.left.val); current.left = null; } else if (current.right != null) { stack.push(current.right); list.add(current.right.val); current.right = null; } else { stack.pop(); list.add(current.val); } } return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void postorder() {\n\n\t}", "public void postOrderTraversal(){\n System.out.println(\"postOrderTraversal\");\n //TODO: incomplete\n\n }", "public void postorder()\r\n {\r\n postorder(root);\r\n }", "public void postorder()\n {\n postorder(root);\...
[ "0.8049212", "0.78907126", "0.77809674", "0.7757606", "0.7757606", "0.77253515", "0.76755375", "0.7594107", "0.74808383", "0.72450143", "0.71312946", "0.7029075", "0.700318", "0.69766515", "0.69558495", "0.694014", "0.68870085", "0.6877325", "0.6789278", "0.6751034", "0.67482...
0.0
-1
preOrder without recursive solution.
public ArrayList<Integer> preorderTraversal(TreeNode root) { ArrayList<Integer> list = new ArrayList<>(); Stack<TreeNode> stack = new Stack<>(); if (root == null) return list; stack.push(root); list.add(root.val); while (!stack.empty()) { TreeNode current = stack.peek(); if (current.left == null && current.right == null) { stack.pop(); } if (current.left != null) { stack.push(current.left); list.add(current.left.val); current.left = null; } else if (current.right != null) { stack.push(current.right); list.add(current.right.val); current.right = null; } } return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void traversePreOrder() {\n\t\tpreOrder(this);\n\t}", "public void preOrder() {\n preOrder(root);\n }", "public void preorder()\n {\n preorder(root);\n }", "public void preorder()\n {\n preorder(root);\n }", "public void preorder()\r\n {\r\n preorder(root);\...
[ "0.8121096", "0.8012689", "0.7982617", "0.7982617", "0.79598397", "0.78906333", "0.78742665", "0.77802205", "0.76809627", "0.75168335", "0.7446423", "0.7358815", "0.72390854", "0.71611106", "0.71069264", "0.70993626", "0.7036948", "0.70344824", "0.70335394", "0.7017599", "0.7...
0.0
-1
This method encrypting a file according to the giving data when this Object was created
public void encrypt() throws Exception { LogWriter = new BufferedWriter(new FileWriter(localWorkingDirectoryPath + "\\Log_Encryption.txt")); FileOutputStream configurationFileOutputStream = null; // Loading the store with the giving arguments writeToLog("Step 1: Loading the store with the giving arguments"); loadStore(); // Getting the receiver's public-key writeToLog("Step 2: Getting the receiver's public-key"); Certificate receiverCert = keyStore.getCertificate(receiverSelfSignedCertAlias); if (receiverCert == null) { writeToLog("The entered certificate alias: \"" + receiverSelfSignedCertAlias + "\" dose not exist in the keys store."); LogWriter.close(); throw new Exception("The entered certificate alias: \"" + receiverSelfSignedCertAlias + "\" dose not exist in the keys store."); } PublicKey receiverPublicKey = receiverCert.getPublicKey(); // Getting my private key in order to generate a signature writeToLog("Step 3: Getting the encryptor's private-key"); PrivateKey myPrivateKey = getMyPrivateKey(); // Generating a symmetric key writeToLog("Step 4: Generating a symmetric key"); KeyGenerator kg = KeyGenerator.getInstance("AES"); SecretKey semetricKey = kg.generateKey(); // Generating a random IV writeToLog("Step 5: Generating a random IV"); byte[] iv = generateRandomIV(); // Initializing the cipher writeToLog("Step 6: Initilatzing the cipher Object"); try { myCipher = createCipher(); myCipher.init(Cipher.ENCRYPT_MODE, semetricKey, new IvParameterSpec(iv)); }catch(Exception e) { writeToLog("Error While tring to Initializing the cipher with the giving arguments: " + e.getMessage()); LogWriter.close(); throw new Exception("Error: While tring to Initializing the cipher with the giving arguments",e); } // Initializing the signature with my private-key writeToLog("Step 7: Initilatzing the signature Object with the encryptor's private-key"); Signature dataSigner = Signature.getInstance("SHA256withRSA"); dataSigner.initSign(myPrivateKey); // Encrypting writeToLog("Step 8: Encrypting... "); File fileToEncrrypt = new File(fileToEncryptPath); encryptingData(fileToEncrrypt, dataSigner); // Signing on the encrypted data writeToLog("Step 9: Signing on the encrypted data "); byte[] mySignature = dataSigner.sign(); // Encrypt the symmetric key with the public of the receiver writeToLog("Step 10: Encrypt the symmetric key with the public of the receiver "); byte[] encryptedSymmetricKey = encryptSymmetricKey(receiverPublicKey, semetricKey); // Saving the IV, Encrypted Symmetric-Key and Signature to the configurations file writeToLog("Step 11: Saving the IV, Encrypted Semetric-Key and Signature to the configurations file "); savingToConfigurationsFile(configurationFileOutputStream, iv, encryptedSymmetricKey, mySignature); LogWriter.write("Encryption completed, No Errors Were Found"); LogWriter.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "OutputFile encryptingOutputFile();", "private void encryptingData(File fileToEncrrypt, Signature dataSigner) throws Exception {\n\t\tFileOutputStream fos = null;\n\t\tFileInputStream fis = null;\n\t\tCipherInputStream cis = null;\n\t\ttry {\n\t\t\tfos = new FileOutputStream(localWorkingDirectoryPath + \"\\\\Encr...
[ "0.7590779", "0.74889916", "0.6948923", "0.66403896", "0.66238797", "0.65312135", "0.64785975", "0.6444758", "0.6433625", "0.64292634", "0.6344537", "0.62394446", "0.6223398", "0.6196672", "0.61700046", "0.6112123", "0.6070471", "0.6002381", "0.59916097", "0.5973589", "0.5961...
0.52898574
63
This method returns an instance of Cipher according to the input giving for algorithm and its provider
private Cipher createCipher() throws NoSuchAlgorithmException, NoSuchProviderException, NoSuchPaddingException { if (algorithmProvider != null && !(algorithmProvider.equals("")) && algorithm != null && !(algorithm.equals(""))) { /* if there is an entered algorithm and its provider, * return the Cipher's instance of it */ return Cipher.getInstance(algorithm, algorithmProvider); } else if (algorithm != null && !(algorithm.equals(""))) { /* if there is only algorithm entered, * return the Cipher's instance of it using default provider */ return Cipher.getInstance(algorithm); } else { /* if there is isn't an algorithm entered, * return an AES in CBC mode Cipher as default */ return Cipher.getInstance("AES//CBC//PKCS5Padding"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Optional<Cipher> getCipher(int mode, byte[] iv) {\n Optional<Cipher> result = Optional.empty();\n\n Cipher cipher = null;\n try {\n cipher = Cipher.getInstance(this.algorithmMode);\n\n IvParameterSpec ivParameterSpec = new IvParameterSpec(iv);\n AlgorithmParameters parameters =\n Algorithm...
[ "0.66443074", "0.6607041", "0.65601504", "0.6512295", "0.65029174", "0.6381763", "0.6284571", "0.62058055", "0.6149015", "0.61293244", "0.6128134", "0.6073294", "0.6068222", "0.60451746", "0.60344255", "0.5952116", "0.5900617", "0.5839094", "0.58377105", "0.58168805", "0.5787...
0.78506035
0
This private method is responsible to encrypt the data from the file and while doing so, updates the Signature Object with the encrypted data
private void encryptingData(File fileToEncrrypt, Signature dataSigner) throws Exception { FileOutputStream fos = null; FileInputStream fis = null; CipherInputStream cis = null; try { fos = new FileOutputStream(localWorkingDirectoryPath + "\\Encrypted_File.txt"); fis = new FileInputStream(fileToEncrrypt); byte[] encryptedDataByteArray = new byte[8]; cis = new CipherInputStream(fis, myCipher); int i = cis.read(encryptedDataByteArray); while (i != -1) { // Updating the data inside the Signer dataSigner.update(encryptedDataByteArray); // writing the encrypted data to the file fos.write(encryptedDataByteArray, 0, i); i = cis.read(encryptedDataByteArray); } } catch (Exception e) { writeToLog("Error While trying to encrypt the data: " + e.getMessage()); LogWriter.close(); throw new Exception("Error: While trying to encrypt the data", e); } finally { cis.close(); fis.close(); fos.close(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void encryptFile() {\r\n\t\tisEncryptComplete = false;\r\n\t\tlogger.encryStart = System.currentTimeMillis();\r\n\t\tif(file == null || !file.exists())\r\n\t\t\treturn;\r\n\t\t\r\n\t\tMDFSEncoder encoder = new MDFSEncoder(file, n1, n2, k1, k2);\r\n\t\t/*\r\n\t\t * n1=4;n2=4;k1=3;k2=4; MDFSEncoder encoder =...
[ "0.6726899", "0.58502597", "0.5793777", "0.5750083", "0.572597", "0.57241297", "0.5692778", "0.56467146", "0.56130916", "0.5568958", "0.5516839", "0.54985404", "0.5476427", "0.5426972", "0.54188603", "0.5406788", "0.538339", "0.5380012", "0.5341283", "0.53327733", "0.53161484...
0.7299873
0
This Private Method return the private key of the encryptor
private PrivateKey getMyPrivateKey() throws Exception { Key myKeyPair = null; try { myKeyPair = keyStore.getKey(keyPairAlias, keyPairPassword.toCharArray()); } catch (UnrecoverableKeyException | KeyStoreException | NoSuchAlgorithmException e) { writeToLog("The key: \"" + keyPairAlias + "\" cannot be recovered."); LogWriter.close(); throw new Exception("The key: \"" + keyPairAlias + "\" cannot be recovered.", e); } PrivateKey myPrivateKey; if (myKeyPair instanceof PrivateKey) { myPrivateKey = (PrivateKey) myKeyPair; } else { writeToLog("The key: " + keyPairAlias + " is not a private-key"); LogWriter.close(); throw new Exception("The key: " + keyPairAlias + " is not a private-key"); } return myPrivateKey; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PrivateKey getKey();", "public String getKeyPrivate() throws LibMCryptException {\n\t\t\r\n\t\tString privateK = priK.getModulus().toString(16);\r\n\t\treturn privateK;\r\n\t}", "PrivateKey getPrivateKey();", "public String getPrivateKey();", "public String getPrivateKey();", "public PrivateKey ge...
[ "0.82835644", "0.7930087", "0.7917694", "0.7861261", "0.7861261", "0.7634653", "0.75905704", "0.7583929", "0.7535633", "0.74439883", "0.7426453", "0.7423903", "0.73429084", "0.7204362", "0.7204362", "0.7204362", "0.71917903", "0.71766007", "0.717329", "0.71532595", "0.7039925...
0.6866672
27
This Private Method responsible to load the keystore
private void loadStore() throws Exception { keyStore = KeyStore.getInstance(keyStoreType.toUpperCase()); FileInputStream fis = null; try { fis = new FileInputStream(keyStorePath); keyStore.load(fis, keyStorePass.toCharArray()); } catch (CertificateException | IOException e) { writeToLog("Error while trying to load the key-store"); LogWriter.close(); throw new Exception("Error while trying to load the key-store", e); } finally { if (fis != null) { fis.close(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initKeystore(Properties props) throws KeyStoreInitException {\n\t\tkeystorePassword = props.getProperty(\"keystorePassword\");\n\t\tkeystoreLocation = props.getProperty(\"keystoreLocation\");\n\t\tsecretKeyAlias = props.getProperty(\"secretKeyAlias\");\n\n\t\ttry {\n\t\t\tks = loadKeyStore();\n\t\t} c...
[ "0.72512084", "0.72370386", "0.69851303", "0.69717795", "0.67524946", "0.6715649", "0.66126513", "0.6514592", "0.6486059", "0.6442212", "0.63286734", "0.6302666", "0.62668544", "0.62573093", "0.62259907", "0.61479664", "0.6136774", "0.6119562", "0.609191", "0.60247535", "0.60...
0.74967855
0
This Private Method is responsible to save all the configuration data(IV,SemetricKey,Signature) to the configuration file That will be deliverd to the reciver
private void savingToConfigurationsFile(FileOutputStream configurationFileOutputStream, byte[] iv, byte[] encryptedSymmetricKey, byte[] mySignature) throws IOException { configurationFileOutputStream = new FileOutputStream(localWorkingDirectoryPath + "\\Config.txt"); // Saving the IV to the configuration file configurationFileOutputStream.write(iv); // Saving the encrypted symmetric key to the configuration file configurationFileOutputStream.write(encryptedSymmetricKey); // Saving the my signature to the configuration file configurationFileOutputStream.write(mySignature); // Closing the output stream configurationFileOutputStream.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void saveConfiguration() {\n }", "public void encrypt() throws Exception {\n\t\tLogWriter = new BufferedWriter(new FileWriter(localWorkingDirectoryPath + \"\\\\Log_Encryption.txt\"));\n\t\tFileOutputStream configurationFileOutputStream = null;\n\n\t\t// Loading the store with the giving arguments\n\t\...
[ "0.6592397", "0.60739464", "0.6008263", "0.5961772", "0.5890248", "0.58853555", "0.58666176", "0.5859791", "0.58551383", "0.5854346", "0.5824215", "0.56946915", "0.5679379", "0.56703764", "0.560865", "0.55911845", "0.55612046", "0.55426604", "0.5539078", "0.55237603", "0.5463...
0.70520115
0
This Private Method generates a random IV dedicated for the Cipher if a seed was giving as an input, that seed will be used in the method setSeed
private byte[] generateRandomIV() { SecureRandom rand = new SecureRandom(); if (givingSecureRandomSeedText != null && !(givingSecureRandomSeedText.equals(""))) { rand.setSeed(Long.parseLong(givingSecureRandomSeedText)); } byte[] iv = new byte[16]; rand.nextBytes(iv); return iv; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static IvParameterSpec generateIV() {\n\t\t// Make a byte array with random bits\n\t byte[] iv = new byte[16];\n\t new SecureRandom().nextBytes(iv);\n\t return new IvParameterSpec(iv);\n\t}", "public static byte[] generateIv() throws GeneralSecurityException {\n return randomBytes(IV_LENGT...
[ "0.7384926", "0.7152737", "0.71499836", "0.6941005", "0.6485109", "0.63395697", "0.62875783", "0.6214166", "0.60043555", "0.58926815", "0.58627", "0.5730749", "0.56898093", "0.56682086", "0.562826", "0.55945134", "0.55778867", "0.5537129", "0.55089456", "0.55014503", "0.54897...
0.82169825
0
This Private Method encrypt the symmetric key that was in use in this program with the reciver's publickey
private byte[] encryptSymmetricKey(PublicKey receiverPublicKey, SecretKey semetricKey) throws Exception { try { myCipher = Cipher.getInstance("RSA"); myCipher.init(Cipher.ENCRYPT_MODE, receiverPublicKey); return myCipher.doFinal(semetricKey.getEncoded()); } catch (Exception e) { writeToLog("Error While trying to encrypt the semetric-key: " + e.getMessage()); LogWriter.close(); throw new Exception(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void encrypt(byte[] vanillaInformation){\n SecretKey symmetricKey = getSymmetricEncryption().createSecretKey();\n getSymmetricEncryption().encrypt(symmetricKey, vanillaInformation);\n setEncryptedInformation(getSymmetricEncryption().getEncryptedInformation());\n\n //encrypt symme...
[ "0.67742884", "0.64988095", "0.6451145", "0.6439533", "0.6436589", "0.637664", "0.63726175", "0.63177794", "0.6312535", "0.6305379", "0.61977524", "0.61451226", "0.61161095", "0.6065475", "0.60447365", "0.60253036", "0.60213625", "0.5983228", "0.5936218", "0.5935392", "0.5904...
0.7386564
0
This Private methods writes the steps\\errors to the log file
private void writeToLog(String logMessage) throws IOException { LogWriter.write(logMessage); LogWriter.newLine(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void toLogFile() {\n\t\tRetroTectorEngine.toLogFile(\"Error message from \" + THESTRINGS[0] + \":\");\n\t\tfor (int i=1; i<THESTRINGS.length; i++) {\n\t\t\tRetroTectorEngine.toLogFile(THESTRINGS[i]);\n\t\t}\n\t}", "private void log() {\n logger.error(\"insert queue (last {}, current {...
[ "0.68095815", "0.61534363", "0.60713464", "0.60193527", "0.5969758", "0.5953782", "0.59066534", "0.58734584", "0.5864531", "0.5863543", "0.58474326", "0.5809775", "0.579754", "0.5779621", "0.57562643", "0.575498", "0.5703425", "0.56635225", "0.5645338", "0.5637372", "0.563684...
0.0
-1
Use this factory method to create a new instance of this fragment using the provided parameters.
public static MapFragment newInstance(String param1) { MapFragment fragment = new MapFragment(); Bundle args = new Bundle(); args.putString(ARG_PARAM1, param1); // args.putString(ARG_PARAM2, param2); fragment.setArguments(args); return fragment; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static FragmentTousWanted newInstance() {\n FragmentTousWanted fragment = new FragmentTousWanted();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "protected abstract Fragment createFragment();", "public void createFragment() {\n\n ...
[ "0.7259329", "0.72331375", "0.71140355", "0.69909847", "0.69902235", "0.6834592", "0.683074", "0.68134046", "0.6801526", "0.6801054", "0.67653185", "0.6739714", "0.6739714", "0.6727412", "0.6717231", "0.6705855", "0.6692112", "0.6691661", "0.66869426", "0.66606814", "0.664618...
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_map, container, false); mGoogleApiClient = new GoogleApiClient.Builder(getActivity()) .addApi(LocationServices.API) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .build(); SupportMapFragment mapFragment = (SupportMapFragment) getChildFragmentManager() .findFragmentById(R.id.map); mapFragment.getMapAsync(this); bSatellite = (Button) view.findViewById(R.id.Satellite_button); bNormal = (Button) view.findViewById(R.id.Normal_button); bSatellite.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { setSatellite(view); } }); bNormal.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { setNormal(view); } }); // Marker HashSets pointsOfInterests = new ArrayList<Marker>(); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup...
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.66251...
0.0
-1
Google Location Services callbacks Google API callbacks
@Override public void onConnected(Bundle connectionHint) { mLocationRequest = LocationRequest.create(); mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY); mLocationRequest.setInterval(4000); // Update location every 4 second //Retrieve current location LocationServices.FusedLocationApi.requestLocationUpdates(mGoogleApiClient, mLocationRequest, this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onSuccess(Void aVoid) {\n Log.i(\"MainActivity\", \"requestLocationUpdatesWithCallback onSuccess\");\n }", "@Override\n public vo...
[ "0.75729257", "0.71959597", "0.6998202", "0.69012994", "0.6886797", "0.68468463", "0.6728579", "0.66722053", "0.6653567", "0.661564", "0.65996885", "0.65597993", "0.6555183", "0.6549444", "0.654704", "0.6504128", "0.64835024", "0.6483452", "0.64611405", "0.6423993", "0.639416...
0.0
-1
On Location Change callback
@Override public void onLocationChanged(Location location) { Log.i(LOG_TAG, "Location Change"); Location target = new Location("target"); String closePoint; int closestIndex = -1;// Default to none float minDistance = 1000; // Default to high value // Focus camera on initial location if (mapReady == true && initialCameraSet == true) { LatLng initialLocation = new LatLng(location.getLatitude(), location.getLongitude()); gMap.moveCamera(CameraUpdateFactory.newLatLng(initialLocation)); initialCameraSet = false; // Initial location already displayed } // Check if spot is close for (int i = 0; i < LocationsClass.spotsCoordinates.length; ++i) { target.setLatitude(LocationsClass.spotsCoordinates[i].latitude); target.setLongitude(LocationsClass.spotsCoordinates[i].longitude); if (location.distanceTo(target) < minDistance) { closestIndex = i; //Save closes index minDistance = location.distanceTo(target); // update minDistance } } if (minDistance < 200 && minDistance > 20) { Toast.makeText(getActivity(), "Location: " + LocationsClass.spotNames[closestIndex] + " is within 200 meters!\n" + "Go check it out!", Toast.LENGTH_LONG).show(); // pointsOfInterests.get(closestIndex).showInfoWindow(); // gMap.getUiSettings().setMapToolbarEnabled(true); popNotification = true; // Allow notification to trigger when user reaches destination } else if (minDistance < 20) { if (closestIndex != currentUserLocation) { int locationId = getResources().getIdentifier("loc_"+closestIndex, "drawable", getActivity().getPackageName()); showArrivalNotification(locationId, LocationsClass.spotNames[closestIndex]); currentUserLocation = closestIndex; // Update user location } } if (hotspotIndex != -1) { pointsOfInterests.get(hotspotIndex).showInfoWindow(); gMap.getUiSettings().setMapToolbarEnabled(true); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic void onLocationChanged(Location location) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void onLocationChanged(Location location) {\n\t\t\t\n\t\t}", "@Override\n public void onMyLocationChange(Location arg0) {\n }", "public void onLocationChanged(Location locat...
[ "0.85415626", "0.85415626", "0.85211265", "0.8455737", "0.84105915", "0.8390983", "0.8390983", "0.83530164", "0.8350979", "0.834238", "0.83340794", "0.8328063", "0.82270634", "0.8218223", "0.8218223", "0.8088455", "0.79689795", "0.7957753", "0.7926276", "0.7913967", "0.788221...
0.0
-1
UI interactive functions Sets the current view of the map to a satellite view
public void setSatellite(View view) { if (mapReady) { gMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mapIsClicked(View view) {\n Controller.viewMappa();\n }", "public void displayMap() {\n MapMenuView mapMenu = new MapMenuView();\r\n mapMenu.display();\r\n \r\n }", "public void viewOnMap(View view){\r\n changeToMapActivity();\r\n }", "private void setM...
[ "0.67022985", "0.65328586", "0.64909357", "0.63773775", "0.63600874", "0.6329031", "0.6279102", "0.61633956", "0.61452293", "0.61446416", "0.60725516", "0.60094935", "0.6009315", "0.6003197", "0.5926451", "0.5916929", "0.591059", "0.58951753", "0.58926314", "0.5891427", "0.58...
0.72565925
0
Sets the current view of the map to a normal view
public void setNormal(View view) { if (mapReady) { gMap.setMapType(GoogleMap.MAP_TYPE_NORMAL); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mapViewLayedOut() {\n if (mPointToGoTo != null) {\n setCenter(mPointToGoTo);\n mPointToGoTo = null;\n }\n if (mZoomToZoomTo != -1) {\n setZoom(mZoomToZoomTo);\n mZoomToZoomTo = -1;\n }\n\n }", "private void setView( boolean re...
[ "0.6690832", "0.6614755", "0.6309793", "0.6232579", "0.6223158", "0.6214938", "0.61386174", "0.6096509", "0.6094889", "0.60831255", "0.60706747", "0.6050689", "0.6039982", "0.6033612", "0.60013777", "0.59912694", "0.5987361", "0.59555674", "0.5946003", "0.5944277", "0.5944277...
0.7840227
0
Creates a dialog showing the user's arrival
private void showArrivalNotification(int image, String location) { NotificationFragment notification = new NotificationFragment(getActivity()); notification.setNotifierImage(image); notification.setNotifierText("You are at " + location + "\n\n Look for the marker and switch to AR view in the menu to scan barcodes!"); notification.show(getActivity().getFragmentManager(), "pop up"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void dialogCreateAppointment(){\n\n String day = spin_day.getSelectedItem().toString();//Get the text of the spinner\n String time = spin_start.getSelectedItem().toString()+ \" to \" +\n spin_end.getSelectedItem().toString();//Get the text of the spinner\n String fullTim...
[ "0.6887827", "0.65522337", "0.6321631", "0.6264549", "0.62150985", "0.6201226", "0.6173371", "0.614474", "0.6137405", "0.6095117", "0.60680264", "0.6067813", "0.60519373", "0.60468364", "0.6044033", "0.6015746", "0.60015386", "0.5990474", "0.59862345", "0.5951425", "0.5946486...
0.0
-1
The constructor should first build the main layout, set the composition root and then do any custom initialization. The constructor will not be automatically regenerated by the visual editor.
public NavigationToolBar() { buildMainLayout(); setCompositionRoot(mainLayout); // TODO add user code here // set first button listener this.btnDownRegister.setEnabled(false); // default status for confirmation buttons this.btnCancelRegister.setEnabled(false); this.btnConfirmRegister.setEnabled(false); btnFirstRegister.addListener(new Button.ClickListener() { public void buttonClick(com.vaadin.ui.Button.ClickEvent event) { // set status register register = bindingSource.firstItem(); int index = bindingSource.getIndex(); lblCountRegister.setValue(bindingSource.getIndex() + "/" + bindingSource.size()); btnFirstRegister.setEnabled(false); btnPreviousRegister.setEnabled(false); btnNextRegister.setEnabled(true); btnLastRegister.setEnabled(true); // fire event if (listenerFirstButton != null) listenerFirstButton.firstButtonClick(new ClickNavigationEvent(event.getButton(), event.getComponent() , null, register, index)); } }); // set previous button listener btnPreviousRegister.addListener(new Button.ClickListener() { public void buttonClick(com.vaadin.ui.Button.ClickEvent event) { // set status register register = bindingSource.prevItem(); int index = bindingSource.getIndex(); lblCountRegister.setValue(index + "/" + bindingSource.size()); if (index == 1) { btnFirstRegister.setEnabled(false); btnPreviousRegister.setEnabled(false); btnNextRegister.setEnabled(true); btnLastRegister.setEnabled(true); } else { btnFirstRegister.setEnabled(true); btnPreviousRegister.setEnabled(true); btnNextRegister.setEnabled(true); btnLastRegister.setEnabled(true); } // fire event if (listenerPreviousButton != null) listenerPreviousButton.previousButtonClick(new ClickNavigationEvent(event.getButton(), event.getComponent() , null, register, index)); } }); // set next button listener btnNextRegister.addListener(new Button.ClickListener() { public void buttonClick(com.vaadin.ui.Button.ClickEvent event) { // set status register register = bindingSource.nextItem(); int index = bindingSource.getIndex(); lblCountRegister.setValue(index + "/" + bindingSource.size()); if (index == bindingSource.size()) { btnFirstRegister.setEnabled(true); btnPreviousRegister.setEnabled(true); btnNextRegister.setEnabled(false); btnLastRegister.setEnabled(false); } else { btnFirstRegister.setEnabled(true); btnPreviousRegister.setEnabled(true); btnNextRegister.setEnabled(true); btnLastRegister.setEnabled(true); } // fire event if (listenerNextButton != null) listenerNextButton.nextButtonClick(new ClickNavigationEvent(event.getButton(), event.getComponent() , null, register, index)); } }); // set last button listener btnLastRegister.addListener(new Button.ClickListener() { public void buttonClick(com.vaadin.ui.Button.ClickEvent event) { // set status register register = bindingSource.lastItem(); int index = bindingSource.getIndex(); lblCountRegister.setValue(bindingSource.getIndex() + "/" + bindingSource.size()); btnFirstRegister.setEnabled(true); btnPreviousRegister.setEnabled(true); btnNextRegister.setEnabled(false); btnLastRegister.setEnabled(false); // fire event if (listenerLastButton != null) listenerLastButton.lastButtonClick(new ClickNavigationEvent(event.getButton(), event.getComponent() , null, register, index)); } }); btnDownRegister.addListener(new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { // fire the index change bindingSource.setItemId(this, true, bindingSource.getItemId()); // fire the app event if it's implemented if (listenerDownButton != null) listenerDownButton.downButtonClick(new ClickNavigationEvent(event.getButton(), event.getComponent() , null, register, 0)); } }); btnDisplayRegister.addListener(new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { if (displayMode == DisplayMode.GRID) { btnDisplayRegister.setCaption("G"); displayMode = DisplayMode.CARD; } else { btnDisplayRegister.setCaption("C"); displayMode = DisplayMode.GRID; } slider.slideDisplay(displayMode); // fire the app event if it's implemented if (listenerDisplayButton != null) listenerDisplayButton.displayButtonClick(new ClickNavigationEvent(event.getButton(), event.getComponent() , null, register, 0)); } }); btnUpRegister.addListener(new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { if (slider == null) return; // go slide up try { slider.delSlideBreadCrumb(); } catch (Exception e) { e.printStackTrace(); } // fire the app event if it's implemented if (listenerUpButton != null) listenerUpButton.upButtonClick(new ClickNavigationEvent(event.getButton(), event.getComponent() , null, register, 0)); } }); btnRefreshRegister.addListener(new Button.ClickListener() { public void buttonClick(ClickEvent event) { if (listenerRefreshButton != null) listenerRefreshButton.refreshButtonClick(new ClickNavigationEvent(event.getButton(), event.getComponent() , null, register, 0)); } }); // set add button listener btnAddRegister.addListener(new Button.ClickListener() { public void buttonClick(com.vaadin.ui.Button.ClickEvent event) { // enable confirmation buttons btnConfirmRegister.setEnabled(true); btnCancelRegister.setEnabled(true); if (listenerAddButton != null) listenerAddButton.addButtonClick(new ClickNavigationEvent(event.getButton(), event.getComponent() , null, register, 0)); } }); // set edit button listener btnEditRegister.addListener(new Button.ClickListener() { public void buttonClick(com.vaadin.ui.Button.ClickEvent event) { // enable confirmation buttons btnConfirmRegister.setEnabled(true); btnCancelRegister.setEnabled(true); int index = bindingSource.getIndex(); register = bindingSource.getItemId(); if (listenerEditButton != null) listenerEditButton.editButtonClick(new ClickNavigationEvent(event.getButton(), event.getComponent() , null, register, index)); } }); // set delete button listener btnDeleteRegister.addListener(new Button.ClickListener() { public void buttonClick(com.vaadin.ui.Button.ClickEvent event) { int index = bindingSource.getIndex(); register = bindingSource.getItemId(); if (listenerDeleteButton != null) listenerDeleteButton.deleteButtonClick(new ClickNavigationEvent(event.getButton(), event.getComponent() , null, register, index)); } }); // set confirm button listener btnConfirmRegister.addListener(new Button.ClickListener() { public void buttonClick(com.vaadin.ui.Button.ClickEvent event) { int index = bindingSource.getIndex(); register = bindingSource.getItemId(); if (listenerConfirmButton != null) listenerConfirmButton.confirmButtonClick(new ClickNavigationEvent(event.getButton(), event.getComponent() , null, register, index)); // disable confirmation buttons btnConfirmRegister.setEnabled(false); btnCancelRegister.setEnabled(false); } }); // set cancel button listener btnCancelRegister.addListener(new Button.ClickListener() { public void buttonClick(com.vaadin.ui.Button.ClickEvent event) { int index = bindingSource.getIndex(); register = bindingSource.getItemId(); if (listenerCancelButton != null) listenerCancelButton.cancelButtonClick(new ClickNavigationEvent(event.getButton(), event.getComponent() , null, register, index)); // disable confirmation buttons btnConfirmRegister.setEnabled(false); btnCancelRegister.setEnabled(false); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MainView() {\r\n\t\tinitialize();\r\n\t}", "public MainView() {\n initComponents();\n \n }", "public void init()\n {\n buildUI(getContentPane());\n }", "public MainContentPane() {\r\n\t\tsuper();\r\n\r\n\t\t// Add design-time configured components.\r\n\t\tinitComponents()...
[ "0.7466401", "0.72609097", "0.7213113", "0.71709573", "0.7147316", "0.71357614", "0.7095116", "0.7089305", "0.70773095", "0.70764613", "0.7069164", "0.7069164", "0.69975734", "0.69952303", "0.69933033", "0.6984043", "0.6958381", "0.6940418", "0.69229317", "0.6902582", "0.6897...
0.0
-1
fire the index change
@Override public void buttonClick(ClickEvent event) { bindingSource.setItemId(this, true, bindingSource.getItemId()); // fire the app event if it's implemented if (listenerDownButton != null) listenerDownButton.downButtonClick(new ClickNavigationEvent(event.getButton(), event.getComponent() , null, register, 0)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onIndexUpdate();", "public abstract void updateIndex();", "public void onIndexReset();", "protected final void fireIndexedPropertyChange(\n String propertyName, int index, Object oldValue, Object newValue) {\n PropertyChangeSupport aChangeSupport = this.changeSupport;\n if (aChangeSupp...
[ "0.8251045", "0.79125386", "0.74909884", "0.68971485", "0.68781173", "0.68781173", "0.6597938", "0.64885277", "0.6449144", "0.64472437", "0.63762724", "0.63762724", "0.63750255", "0.63301146", "0.63099563", "0.63066363", "0.6295948", "0.6291568", "0.6264146", "0.62395245", "0...
0.0
-1
common part: create layout
@AutoGenerated private HorizontalLayout buildMainLayout() { mainLayout = new HorizontalLayout(); mainLayout.setImmediate(false); mainLayout.setWidth("-1px"); mainLayout.setHeight("29px"); mainLayout.setMargin(false); // top-level component properties setWidth("-1px"); setHeight("29px"); // pnToolbar pnToolbar = buildPnToolbar(); mainLayout.addComponent(pnToolbar); return mainLayout; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void iniciarLayout();", "Board createLayout();", "public abstract void doLayout();", "public void layout() {\n TitleLayout ll1 = new TitleLayout(getContext(), sourceIconView, titleTextView);\n\n // All items in ll1 are vertically centered\n ll1.setGravity(Gravity.CENTE...
[ "0.7441121", "0.7408097", "0.73983043", "0.7349182", "0.7343956", "0.72837514", "0.7228967", "0.72196674", "0.716834", "0.7118178", "0.7112332", "0.71101266", "0.70597374", "0.70571274", "0.6990229", "0.6926798", "0.6901655", "0.6854118", "0.68504196", "0.68446213", "0.683686...
0.65414953
31
common part: create layout
@AutoGenerated private Panel buildPnToolbar() { pnToolbar = new Panel(); pnToolbar.setImmediate(false); pnToolbar.setWidth("100.0%"); pnToolbar.setHeight("100.0%"); // hlToolbar hlToolbar = buildHlToolbar(); pnToolbar.setContent(hlToolbar); return pnToolbar; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void iniciarLayout();", "Board createLayout();", "public abstract void doLayout();", "public void layout() {\n TitleLayout ll1 = new TitleLayout(getContext(), sourceIconView, titleTextView);\n\n // All items in ll1 are vertically centered\n ll1.setGravity(Gravity.CENTE...
[ "0.7441121", "0.7408097", "0.73983043", "0.7349182", "0.7343956", "0.72837514", "0.7228967", "0.72196674", "0.716834", "0.7118178", "0.7112332", "0.71101266", "0.70597374", "0.70571274", "0.6990229", "0.6926798", "0.6901655", "0.6854118", "0.68504196", "0.68446213", "0.683686...
0.0
-1
common part: create layout
@AutoGenerated private HorizontalLayout buildHlToolbar() { hlToolbar = new HorizontalLayout(); hlToolbar.setImmediate(false); hlToolbar.setWidth("100.0%"); hlToolbar.setHeight("100.0%"); hlToolbar.setMargin(false); // btnFirstRegister btnFirstRegister = new Button(); btnFirstRegister.setCaption("<<"); btnFirstRegister.setImmediate(true); btnFirstRegister.setWidth("-1px"); btnFirstRegister.setHeight("-1px"); hlToolbar.addComponent(btnFirstRegister); // btnPreviousRegister btnPreviousRegister = new Button(); btnPreviousRegister.setCaption("<"); btnPreviousRegister.setImmediate(true); btnPreviousRegister.setWidth("-1px"); btnPreviousRegister.setHeight("-1px"); btnPreviousRegister.setTabIndex(1); hlToolbar.addComponent(btnPreviousRegister); // lblCountRegister lblCountRegister = new Label(); lblCountRegister.setStyleName("nav-toolbar-separator"); lblCountRegister.setImmediate(false); lblCountRegister.setWidth("50px"); lblCountRegister.setHeight("-1px"); lblCountRegister.setValue("1/1"); hlToolbar.addComponent(lblCountRegister); hlToolbar.setComponentAlignment(lblCountRegister, new Alignment(48)); // btnNextRegister btnNextRegister = new Button(); btnNextRegister.setCaption(">"); btnNextRegister.setImmediate(true); btnNextRegister.setWidth("-1px"); btnNextRegister.setHeight("-1px"); btnNextRegister.setTabIndex(2); hlToolbar.addComponent(btnNextRegister); // btnLastRegister btnLastRegister = new Button(); btnLastRegister.setCaption(">>"); btnLastRegister.setImmediate(true); btnLastRegister.setWidth("-1px"); btnLastRegister.setHeight("-1px"); btnLastRegister.setTabIndex(3); hlToolbar.addComponent(btnLastRegister); // btnDownRegister btnDownRegister = new Button(); btnDownRegister.setCaption("v"); btnDownRegister.setImmediate(true); btnDownRegister.setWidth("-1px"); btnDownRegister.setHeight("-1px"); hlToolbar.addComponent(btnDownRegister); // btnUpRegister btnUpRegister = new Button(); btnUpRegister.setCaption("^"); btnUpRegister.setImmediate(true); btnUpRegister.setWidth("-1px"); btnUpRegister.setHeight("-1px"); hlToolbar.addComponent(btnUpRegister); // btnDisplayRegister btnDisplayRegister = new Button(); btnDisplayRegister.setCaption("C"); btnDisplayRegister.setImmediate(false); btnDisplayRegister.setWidth("-1px"); btnDisplayRegister.setHeight("-1px"); hlToolbar.addComponent(btnDisplayRegister); // imgSeparator imgSeparator = new Embedded(); imgSeparator.setImmediate(false); imgSeparator.setWidth("-1px"); imgSeparator.setHeight("-1px"); imgSeparator.setSource(new ThemeResource( "../konekti/images/separator.png")); imgSeparator.setType(1); imgSeparator.setMimeType("image/png"); hlToolbar.addComponent(imgSeparator); // btnRefreshRegister btnRefreshRegister = new Button(); btnRefreshRegister.setCaption("R"); btnRefreshRegister.setImmediate(true); btnRefreshRegister.setWidth("-1px"); btnRefreshRegister.setHeight("-1px"); hlToolbar.addComponent(btnRefreshRegister); // btnAddRegister btnAddRegister = new Button(); btnAddRegister.setCaption("A"); btnAddRegister.setImmediate(true); btnAddRegister.setWidth("-1px"); btnAddRegister.setHeight("-1px"); hlToolbar.addComponent(btnAddRegister); // btnEditRegister btnEditRegister = new Button(); btnEditRegister.setCaption("U"); btnEditRegister.setImmediate(true); btnEditRegister.setWidth("-1px"); btnEditRegister.setHeight("-1px"); hlToolbar.addComponent(btnEditRegister); // btnDeleteRegister btnDeleteRegister = new Button(); btnDeleteRegister.setCaption("D"); btnDeleteRegister.setImmediate(true); btnDeleteRegister.setWidth("-1px"); btnDeleteRegister.setHeight("-1px"); hlToolbar.addComponent(btnDeleteRegister); // imgSeparatorGroup imgSeparatorGroup = new Embedded(); imgSeparatorGroup.setImmediate(false); imgSeparatorGroup.setWidth("-1px"); imgSeparatorGroup.setHeight("-1px"); imgSeparatorGroup.setSource(new ThemeResource( "../konekti/images/separator_group.png")); imgSeparatorGroup.setType(1); imgSeparatorGroup.setMimeType("image/png"); hlToolbar.addComponent(imgSeparatorGroup); hlToolbar.setComponentAlignment(imgSeparatorGroup, new Alignment(48)); // btnConfirmRegister btnConfirmRegister = new Button(); btnConfirmRegister.setCaption("[]"); btnConfirmRegister.setImmediate(true); btnConfirmRegister.setWidth("-1px"); btnConfirmRegister.setHeight("-1px"); hlToolbar.addComponent(btnConfirmRegister); // btnCancelRegister btnCancelRegister = new Button(); btnCancelRegister.setCaption("X"); btnCancelRegister.setImmediate(true); btnCancelRegister.setWidth("-1px"); btnCancelRegister.setHeight("-1px"); hlToolbar.addComponent(btnCancelRegister); return hlToolbar; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void iniciarLayout();", "Board createLayout();", "public abstract void doLayout();", "public void layout() {\n TitleLayout ll1 = new TitleLayout(getContext(), sourceIconView, titleTextView);\n\n // All items in ll1 are vertically centered\n ll1.setGravity(Gravity.CENTE...
[ "0.7441121", "0.7408097", "0.73983043", "0.7349182", "0.7343956", "0.72837514", "0.7228967", "0.72196674", "0.716834", "0.7118178", "0.7112332", "0.71101266", "0.70597374", "0.70571274", "0.6990229", "0.6926798", "0.6901655", "0.6854118", "0.68504196", "0.68446213", "0.683686...
0.0
-1
Created by Tan Phirum on 3/13/20
public interface StoreApi { @GET("api/v1.6/store") Observable<ShopItem> getShopItem(@Header("app_secret") String appSecret, @Header("Authorization") String token); @GET("api/v1.6/checkout") Observable<MySabayItem> getMySabayCheckout(@Header("app_secret") String appSecret, @Header("Authorization") String token, @Query("uuid") String uuid); @GET("api/v1.6/cashier") Observable<ThirdPartyItem> get3PartyCheckout(@Header("app_secret") String appSecret, @Header("Authorization") String token, @Query("uuid") String uuid); @POST("api/v1.6/verify_receipt/google") Observable<GoogleVerifyResponse> postToVerifyGoogle(@Header("app_secret") String appSecret, @Header("Authorization") String token, @Body() GoogleVerifyBody body); @POST("api/v1.6/charge/auth") Observable<PaymentResponseItem> postToPaid(@Header("app_secret") String appSecret, @Header("Authorization") String token, @Body() PaymentBody body); @POST("api/v1.6/charge/onetime") Observable<ResponseItem> postToChargeOneTime(@Header("app_secret") String appSecret, @Header("Authorization") String token, @Body() PaymentBody body); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void mo51373a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "protected boolean func_70814_o() { return true; }", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void grabar...
[ "0.5701881", "0.5680162", "0.56764364", "0.56426203", "0.5597238", "0.5562534", "0.5555645", "0.5538009", "0.5510636", "0.55066305", "0.54901874", "0.54901874", "0.54310113", "0.5426447", "0.53795624", "0.5371503", "0.53506047", "0.5339991", "0.53282845", "0.5323901", "0.5314...
0.0
-1
creamos la base de datos solo en el caso que no exista la misma, con el script de la version
@Override public void onCreate(SQLiteDatabase db) { executeSQLScript(db, "sql/cstigo_v" + DATABASE_VERSION + ".sql"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void instalarBaseDatos()\r\n\t{\r\n\t\tString nombrebuscado = \"information_schema\";\r\n\t\tArrayList parametrosbd = parametrosConectorBaseDatos();\r\n\t\tif(parametrosbd != null)\r\n\t\t{\r\n\t\t\tif(parametrosbd.size()>0)\r\n\t\t\t{\r\n\t\t\t\tnombrebuscado =(String)parametrosbd.get(0);\r\n\t\t\t}\r\n\t\...
[ "0.64629835", "0.61097157", "0.60420525", "0.58726716", "0.58613724", "0.5853864", "0.58377206", "0.57855374", "0.57504666", "0.5744127", "0.5727763", "0.5708513", "0.5653248", "0.56314164", "0.5630682", "0.5581271", "0.55531585", "0.5532131", "0.5526152", "0.5510032", "0.550...
0.0
-1
/ verificamos que la oldVersion sea siempre menor a newVersion si no es este el caso lanzar una excepcion y solicitar la reinstalacion de la aplicacion desde cero
@Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { if (oldVersion > newVersion) { // TODO: lanzar excepcion } else { /* * por cada version de base de datos existe un script que actualiza * la misma a su version inmediata superior, ejecutar cada uno de * los scripts desde la version inicial (oldVersion) hasta la * version final (newVersion), esto para no crear archivos cada vez * mas grandes, sino simplemente ir actualizando la base a versiones * inmediatamente superiores hasta llegar a la version final */ for (int versionToUpgrade = oldVersion + 1; versionToUpgrade <= newVersion; versionToUpgrade++) { executeSQLScript(db, "sql/cstigo_v" + (versionToUpgrade - 1) + "to" + versionToUpgrade + ".sql"); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic boolean getCheckOlderVersion()\n\t{\n\t\treturn false;\n\t}", "public boolean hasNewVersion() {\n String newVersion = newVersionName();\r\n if(TextUtils.isEmpty(newVersion)) {\r\n return false;\r\n }\r\n\r\n if(newVersion.indexOf('.') == -1) {\r\n ...
[ "0.6642779", "0.63942444", "0.6384167", "0.63757414", "0.627417", "0.6203023", "0.6031912", "0.5994305", "0.5975639", "0.59332174", "0.58903205", "0.58742374", "0.5863383", "0.58424425", "0.5833381", "0.5830058", "0.58234924", "0.5822974", "0.58133405", "0.5768667", "0.575569...
0.54749525
49
Metodo utilitario que nos servira para obtener las sentencias a ser ejecutadas de un asset dentro del paquete de la aplicacion
protected void executeSQLScript(SQLiteDatabase database, String assetName) { /* * variables locales para manejar la lectura del archivo de scripts */ ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); byte buf[] = new byte[1024]; int len; AssetManager assetManager = context.getAssets(); InputStream inputStream = null; try { /* * obtenemos el asset y lo convertimos a string */ inputStream = assetManager.open(assetName); while ((len = inputStream.read(buf)) != -1) { outputStream.write(buf, 0, len); } outputStream.close(); inputStream.close(); /* * desencriptamos el archivo */ String sqlClear = Cypher.decrypt(SD, outputStream.toString()); // String sqlClear = outputStream.toString(); /* * separamos la cadena por el separador de sentencias */ String[] createScript = sqlClear.split(";"); /* * por cada sentencia del archivo ejecutamos la misma en la base de * datos */ for (int i = 0; i < createScript.length; i++) { String sqlStatement = createScript[i].trim(); if (sqlStatement.startsWith("--")) { continue; } if (sqlStatement.length() > 0) { Log.i(CsTigoApplication.getContext().getString( CSTigoLogTags.DATABASE.getValue()), CsTigoApplication.getContext().getString( R.string.database_exec_sql) + sqlStatement); try { database.execSQL(sqlStatement + ";"); } catch (SQLException e) { Notifier.error( getClass(), CsTigoApplication.getContext().getString( R.string.database_statement_exec) + e.getMessage()); } catch (Exception e) { Notifier.error( getClass(), CsTigoApplication.getContext().getString( R.string.database_decypt_error) + e.getMessage()); } } } } catch (IOException e) { Notifier.error( getClass(), CsTigoApplication.getContext().getString( R.string.database_read_asset) + e.getMessage()); } catch (SQLException e) { Notifier.error( getClass(), CsTigoApplication.getContext().getString( R.string.database_statement_exec) + e.getMessage()); } catch (Exception e) { Notifier.error( getClass(), CsTigoApplication.getContext().getString( R.string.database_decypt_error) + e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void ejecutarCargue() {\n String respuesta = null;\n try {\n loggerApp.info(\"Cargues masivos timbres - ejecutar cargue\");\n if (!validarExtension(Constantes.EXTENSIONES_ARCHIVO_EXCEL, file)) {\n abrirModal(\"SARA\", \"Error: El archivo \" + (null == file ...
[ "0.5837675", "0.5385853", "0.5314695", "0.52777565", "0.523986", "0.5209278", "0.5190001", "0.51794404", "0.5175349", "0.5167875", "0.51478654", "0.5106064", "0.50980705", "0.50816065", "0.5073829", "0.506227", "0.5038866", "0.50350356", "0.49680892", "0.49620897", "0.4949245...
0.5194091
6
config and open ch340.
private static void openCH340(int length) { int ret_val = driver.ResumeUsbList(); YXYCLog.d(TAG, ret_val + ""); // ResumeUsbList方法用于枚举CH34X设备以及打开相关设备 if (ret_val == -1) { YXYCLog.d(TAG, ret_val + "Failed to open device!"); driver.CloseDevice(); } else if (ret_val == 0) { if (!driver.UartInit()) { //对串口设备进行初始化操作 YXYCLog.d(TAG, ret_val + "Failed device initialization!"); YXYCLog.d(TAG, ret_val + "Failed to open device!"); return; } YXYCLog.d(TAG, ret_val + "Open device successfully!"); if (!isOpenDeviceCH340) { isOpenDeviceCH340 = true; configParameters(length);//配置ch340的参数、需要先配置参数 } } else { YXYCLog.d(TAG, "The phone couldn't find the device!"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void initCH340Driver(int length) {\n CH340Driver.initCH340(sContext, length);\n }", "public static boolean isIsOpenDeviceCH340() {\n return isOpenDeviceCH340;\n }", "public void openReader(){\r\n handle = -1;\r\n try {\r\n cardReader = new ACR120U();\r\n ...
[ "0.62752354", "0.5885775", "0.54666495", "0.5398473", "0.5398473", "0.5398473", "0.5345509", "0.53031075", "0.5281772", "0.5224259", "0.520876", "0.52037823", "0.51673216", "0.51103103", "0.5110143", "0.5081874", "0.5081874", "0.5055645", "0.50547415", "0.50547415", "0.505017...
0.7247586
0
ch340 is or not open.
public static boolean isIsOpenDeviceCH340() { return isOpenDeviceCH340; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void openCH340(int length) {\n int ret_val = driver.ResumeUsbList();\n YXYCLog.d(TAG, ret_val + \"\");\n // ResumeUsbList方法用于枚举CH34X设备以及打开相关设备\n if (ret_val == -1) {\n YXYCLog.d(TAG, ret_val + \"Failed to open device!\");\n driver.CloseDevice();\n ...
[ "0.6897726", "0.6097119", "0.5765175", "0.5692737", "0.56795615", "0.56403446", "0.56243604", "0.56107557", "0.56002444", "0.55562997", "0.55394125", "0.5537859", "0.54878515", "0.5479412", "0.54580754", "0.53609943", "0.5355944", "0.5353453", "0.53503835", "0.53116095", "0.5...
0.78019106
0
end main end JDBCExample
private static byte[] mergeImageAndText(BufferedImage im, String name, String event, Point pointName, Point pointEvent) throws IOException { Graphics2D g2 = im.createGraphics(); //graohics obj banaya to draw System.out.println(name); g2.setFont(new Font("TimesRoman", Font.BOLD,28)); g2.setColor(Color.BLACK); g2.drawString(name, pointName.x, pointName.y);//write text g2.drawString(event, pointEvent.x, pointEvent.y);//write text ByteArrayOutputStream baos = new ByteArrayOutputStream(); ImageIO.write(im, "jpg", baos); return baos.toByteArray(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) throws SQLException {\n\t\t\r\n\t}", "public static void main(String args[]) throws SQLException {\n }", "public static void main(String[] args) {\n String jdbcDriver = \"com.mysql.jdbc.Driver\";\r\n String databaseUri = \"jdbc:mysql://localhost:8889/java...
[ "0.7379042", "0.7319618", "0.7263782", "0.7210081", "0.7206814", "0.7197119", "0.708992", "0.70563334", "0.70047647", "0.69912046", "0.6947782", "0.69151074", "0.6892369", "0.6850351", "0.682581", "0.68211335", "0.6795297", "0.6788279", "0.67696476", "0.67696255", "0.67621475...
0.0
-1
Creates a new base data access object
protected DaoBase(SQLiteDatabase database, String tableName, String[] columns) { this.db = database; this.tableName = tableName; this.columns = columns; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract ODatabaseInternal<?> newDatabase();", "DataBase createDataBase();", "public DatabaseAccess(Context context) {\n this.openHelper = new OlpbhtbDatabase(context);\n }", "Database createDatabase();", "Object getDB();", "public BLFacadeImplementation() {\t\t\r\n\t\tSystem.out.pri...
[ "0.69955623", "0.68632114", "0.6801049", "0.67591083", "0.6731875", "0.66999465", "0.6679047", "0.6579961", "0.6524954", "0.65212524", "0.65180665", "0.65178174", "0.64909065", "0.6453977", "0.6450245", "0.6431363", "0.64167094", "0.6400366", "0.63996077", "0.63955724", "0.63...
0.0
-1
Gets all the entities of type TEntity
public ArrayList<TEntity> getAll(){ ArrayList<TEntity> list = new ArrayList<TEntity>(); Cursor cursor = db.query(tableName, columns, null, null, null, null, null); cursor.moveToFirst(); while (!cursor.isAfterLast()) { list.add(fromCursor(cursor)); cursor.moveToNext(); } return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Entity> getAll() {\n return entities;\n }", "public List<Entity> getAllEntities()\n\t{\n\t\treturn this.entities;\n\t}", "public static Iterable<Entity> getAllEntities() {\n\t\treturn Util.listEntities(\"RecetteId\", null, null);\n\t}", "@NotNull\r\n Entity[] getEntities();", "public Lis...
[ "0.8302031", "0.8037316", "0.7792929", "0.7728539", "0.7610779", "0.75095946", "0.7412909", "0.7314888", "0.72588855", "0.7217069", "0.71803236", "0.71045053", "0.7083152", "0.7062503", "0.6999946", "0.6961961", "0.69398165", "0.6930156", "0.6920447", "0.68899035", "0.6836991...
0.71635747
11
Gets the entity with the given id
public TEntity getById(int id){ String whereClause = String.format("Id = %1$s", id); Cursor cursor = db.query(tableName, columns, whereClause, null, null, null, null); if (cursor.getCount() == 1) { cursor.moveToFirst(); return fromCursor(cursor); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public E getById(final I id) {\n LOG.info(\"[getById] Start: Id = \" + id);\n LOG.info(\"[getById] End\");\n return entityManager.find(entityClass, id);\n }", "public T findById(final String id)\n\t{\n\t\treturn em.find(entityClass, id);\n\t}", "Entity getEntityById(Long ...
[ "0.8074594", "0.78910667", "0.78259504", "0.7823594", "0.77230567", "0.772256", "0.76794964", "0.7641387", "0.76286393", "0.7601712", "0.7596948", "0.7561902", "0.7513103", "0.7485647", "0.7457702", "0.7444302", "0.74403065", "0.74365133", "0.74333954", "0.7407458", "0.735398...
0.82237685
0
Saves the given entity to the database
public TEntity save(TEntity entity){ ContentValues content = toContentValues(entity); TEntity oldEntity = getById(entity.getId()); int newKey; if (oldEntity != null) { db.update(tableName, content, String.format("Id = %1$s", oldEntity.getId()), null); newKey = oldEntity.getId(); } else { newKey = (int)db.insert(tableName, null, content); } return getById(newKey); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void save(Object entity);", "void save(E entity);", "Entity save(Entity entity);", "E save(E entity);", "void save(T entity);", "T save(T entity);", "T save(T entity);", "T save(T entity);", "public <T> T save(T entity);", "public void save(E entity){\n transaction.begin();\n entity...
[ "0.86287", "0.8546422", "0.854174", "0.83552444", "0.8226205", "0.8098177", "0.8098177", "0.8098177", "0.80547816", "0.8035275", "0.78372645", "0.7825289", "0.77090573", "0.77090573", "0.7690415", "0.7656824", "0.7619155", "0.7609961", "0.7546549", "0.74902767", "0.7449691", ...
0.7311849
27
Deletes the entity with the given id from the database
public boolean delete(int id){ int deletedCount = db.delete(tableName, String.format("Id = %1$s", id), null); return deletedCount > 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void deleteEntityById(Long id);", "@Override\n\t@Transactional\n\tpublic void delete(Long id) {\n\t\tem.remove(findOne(id));\n\t\t\n\t}", "@Override\r\n\tpublic void delete(Long id) {\n\t\trepository.deleteById(id);\r\n\t}", "@Override\n public void delete(Integer id) {\n entityManager.remove(findB...
[ "0.8818343", "0.8362186", "0.8301619", "0.8277294", "0.81701815", "0.814998", "0.8147775", "0.80838996", "0.8073674", "0.8066441", "0.8051985", "0.8051494", "0.80422926", "0.80271333", "0.80271333", "0.80271333", "0.80271333", "0.799983", "0.7998373", "0.79959446", "0.7986838...
0.0
-1
Instantiates a new scrolling tab container view.
public ScrollingTabContainerView(Context context) { super(context); setHorizontalScrollBarEnabled(false); TypedArray a = getContext().obtainStyledAttributes(null, R.styleable.SherlockActionBar, R.attr.actionBarStyle, 0); setContentHeight(a.getLayoutDimension( R.styleable.SherlockActionBar_height, 0)); a.recycle(); mInflater = LayoutInflater.from(context); mTabLayout = createTabLayout(); addView(mTabLayout, new ViewGroup.LayoutParams( ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initTabs() {\n\t\tJPanel newTab = new JPanel();\r\n\t\taddTab(\"\", newTab); //$NON-NLS-1$\r\n\t\tsetTabComponentAt(0, new NewPaneButton());\r\n\t\tsetEnabledAt(0, false);\r\n\t\t// Add a new pane\r\n\t\taddPane();\r\n }", "private void createLayout () {\n \t\n \tBorderPane border = new Bor...
[ "0.664865", "0.6563518", "0.65581805", "0.65277284", "0.64621496", "0.64606994", "0.64369607", "0.63326526", "0.6330338", "0.6272083", "0.6184109", "0.6172931", "0.6163245", "0.61528957", "0.6098602", "0.60758334", "0.60508597", "0.6022244", "0.5997331", "0.59392565", "0.5937...
0.72404045
0
Indicates whether this view is collapsed into a dropdown menu instead of traditional tabs.
private boolean isCollapsed() { return mTabSpinner != null && mTabSpinner.getParent() == this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isHiddenFromMenu()\n {\n return m_hideFromMenu;\n }", "private boolean getCollapse() {\n return false;\n }", "public boolean isCollapsed() {\n return !expanded;\n }", "public boolean isCollapsed();", "boolean isCollapsed();", "public Boolean getCanColla...
[ "0.61301714", "0.6069953", "0.6060701", "0.60542756", "0.6024203", "0.591278", "0.5680543", "0.56602573", "0.5602309", "0.55830544", "0.54387164", "0.5376005", "0.53656626", "0.53651625", "0.5357622", "0.53572816", "0.53572816", "0.53503674", "0.531972", "0.5280749", "0.52391...
0.56710416
7
Sets the allow collapse.
public void setAllowCollapse(boolean allowCollapse) { mAllowCollapse = allowCollapse; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract void setCollapsed(boolean isCollapsed);", "public void setDefineCollapse(PanelCollapse defineCollapse) {\n\t\tthis.defineCollapse = defineCollapse;\n\t}", "public void setCollapsible(boolean collapsible) {\n\t\tthrow new UnsupportedOperationException(\"readonly\");\n\t}", "protected void setRestrict...
[ "0.61422575", "0.6049386", "0.60286474", "0.5810874", "0.58073455", "0.5467586", "0.53804225", "0.5310456", "0.5296532", "0.529332", "0.52156305", "0.5160986", "0.5133457", "0.5109622", "0.5100476", "0.510019", "0.50814444", "0.5074728", "0.5071296", "0.5066545", "0.5045809",...
0.7512918
0
Sets the tab selected.
public void setTabSelected(int position) { mSelectedTabIndex = position; final int tabCount = mTabLayout.getChildCount(); for (int i = 0; i < tabCount; i++) { final View child = mTabLayout.getChildAt(i); final boolean isSelected = i == position; child.setSelected(isSelected); if (isSelected) { animateToTab(position); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSelectedTab(int arg0) {\n\n\t}", "public void setSelectedTab(int tab) {\n if ((tabbedPane.getTabCount() - 1) >= tab)\n tabbedPane.setSelectedIndex(tab);\n }", "@Override\n\tpublic void selectTab(Tab tab) {\n\t\t\n\t}", "public static void setActiveTab(Tab tab) {\n\n ...
[ "0.7750785", "0.7591876", "0.73394436", "0.73006153", "0.7163056", "0.71119606", "0.69860226", "0.69737947", "0.696278", "0.6874496", "0.68595344", "0.67540246", "0.6700212", "0.6692507", "0.66617167", "0.66462314", "0.66462284", "0.65880144", "0.6552919", "0.6550619", "0.654...
0.7326248
3
Sets the content height.
public void setContentHeight(int contentHeight) { mContentHeight = contentHeight; requestLayout(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setHeight(int height);", "public void setHeight(int height);", "public void setHeight(int value) {\n this.height = value;\n }", "void setHeight(int height);", "void setHeight(int height);", "public void setHeight(int h)\n {\n height = h;\n }", "public void setHeight(double ...
[ "0.7499077", "0.7499077", "0.74452174", "0.74195474", "0.74195474", "0.7205029", "0.7202524", "0.717001", "0.71462667", "0.7146062", "0.7123884", "0.7064281", "0.7064281", "0.7055036", "0.7031996", "0.6996771", "0.6974747", "0.6964713", "0.6950666", "0.69403803", "0.6936832",...
0.7417718
5
Creates the tab layout.
private IcsLinearLayout createTabLayout() { final IcsLinearLayout tabLayout = (IcsLinearLayout) LayoutInflater .from(getContext()).inflate( R.layout.abs__action_bar_tab_bar_view, null); tabLayout.setMeasureWithLargestChildEnabled(true); tabLayout.setLayoutParams(new LinearLayout.LayoutParams( android.view.ViewGroup.LayoutParams.WRAP_CONTENT, android.view.ViewGroup.LayoutParams.MATCH_PARENT)); return tabLayout; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createLayout () {\n \t\n \tBorderPane border = new BorderPane();\n \t\n \t\n \t tabPane = new TabPane();\n ArrayList <ScrollPane> tabs = new ArrayList <ScrollPane>();\n \t\n //create column 1 - need to refactor this and make more generic\n TilePane col1 = new Til...
[ "0.76017267", "0.75399333", "0.7514804", "0.74389565", "0.71410626", "0.70831317", "0.7051126", "0.7026563", "0.6922583", "0.6919184", "0.68941253", "0.6781942", "0.67418927", "0.670936", "0.66653097", "0.6564341", "0.655465", "0.65441394", "0.6530658", "0.65213555", "0.64748...
0.7104117
5
Creates the tab view.
private TabView createTabView(ActionBar.Tab tab, boolean forAdapter) { // Workaround for not being able to pass a defStyle on pre-3.0 final TabView tabView = (TabView) mInflater.inflate( R.layout.abs__action_bar_tab, null); tabView.init(this, tab, forAdapter); if (forAdapter) { tabView.setBackgroundDrawable(null); tabView.setLayoutParams(new ListView.LayoutParams( android.view.ViewGroup.LayoutParams.MATCH_PARENT, mContentHeight)); } else { tabView.setFocusable(true); if (mTabClickListener == null) { mTabClickListener = new TabClickListener(); } tabView.setOnClickListener(mTabClickListener); } return tabView; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createView() {\n\t\tTabWidget tWidget = (TabWidget) findViewById(android.R.id.tabs);\r\n\t\tshowLayout = (LinearLayout) LayoutInflater.from(this).inflate(\r\n\t\t\t\tR.layout.tab_layout, tWidget, false);\r\n\t\tImageView imageView = (ImageView) showLayout.getChildAt(0);\r\n\t\tTextView textView = (Tex...
[ "0.77723145", "0.6980267", "0.6976803", "0.6790436", "0.6657421", "0.66415983", "0.6558755", "0.6540277", "0.6530851", "0.65224695", "0.65193546", "0.65101665", "0.6482609", "0.64782643", "0.64546084", "0.64059764", "0.6398503", "0.6392871", "0.63872063", "0.63845503", "0.636...
0.665976
4
Removes the tab at.
public void removeTabAt(int position) { mTabLayout.removeViewAt(position); if (mTabSpinner != null) { ((TabAdapter) mTabSpinner.getAdapter()).notifyDataSetChanged(); } if (mAllowCollapse) { requestLayout(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void removeTabAt(int position) {\n\t\t\n\t}", "@Override\n\tpublic void removeTab(Tab tab) {\n\t\t\n\t}", "public void removeTab(HUDTab ht) {\r\n\t\ttabs.remove(ht);\r\n\t\tneedupdate = true;\r\n\t}", "@Override\n\tpublic void removeAllTabs() {\n\t\t\n\t}", "public void\t\tremoveAll()\n...
[ "0.80262285", "0.78394675", "0.71036845", "0.65851796", "0.6521184", "0.6452779", "0.6402466", "0.63562506", "0.63346803", "0.6333098", "0.62259334", "0.62259334", "0.6212782", "0.59931934", "0.59847426", "0.592888", "0.5898542", "0.5849292", "0.58304536", "0.5822957", "0.582...
0.62702864
10
Removes the all tabs.
public void removeAllTabs() { mTabLayout.removeAllViews(); if (mTabSpinner != null) { ((TabAdapter) mTabSpinner.getAdapter()).notifyDataSetChanged(); } if (mAllowCollapse) { requestLayout(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void removeAllTabs() {\n\t\t\n\t}", "public void\t\tremoveAll()\n\t{\n\t\ttab.clear();\n\t}", "public void clear(){\n nameTab.getChildren().clear();\n tabContent.getChildren().clear();\n tabs.clear();\n }", "public void removeAll() {\n db.delete(TABLE_NAME, ...
[ "0.8032906", "0.778382", "0.7134815", "0.6652395", "0.6487168", "0.62630445", "0.6261797", "0.6255048", "0.62157154", "0.62002206", "0.6181929", "0.61744857", "0.6140173", "0.6140173", "0.6123041", "0.6057699", "0.6057699", "0.5992507", "0.59774196", "0.59757966", "0.5941432"...
0.7241942
2
Instantiates a new tab view.
public TabView(Context context, AttributeSet attrs) { // TODO super(context, null, R.attr.actionBarTabStyle); super(context, attrs); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initTabs() {\n\t\tJPanel newTab = new JPanel();\r\n\t\taddTab(\"\", newTab); //$NON-NLS-1$\r\n\t\tsetTabComponentAt(0, new NewPaneButton());\r\n\t\tsetEnabledAt(0, false);\r\n\t\t// Add a new pane\r\n\t\taddPane();\r\n }", "public void onCreateTabClicked(View view) {\n if (mAdapter.isEmpty...
[ "0.7281446", "0.69806623", "0.6805274", "0.6509285", "0.6426515", "0.6383116", "0.63732564", "0.6302659", "0.63001716", "0.62870944", "0.6265526", "0.62451625", "0.61927634", "0.61860776", "0.6173267", "0.61668754", "0.61615306", "0.6145774", "0.61421657", "0.6119641", "0.611...
0.567488
90
Called when the activity is first created.
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.fillup); submit=(Button)findViewById(R.id.button1); question=(EditText)findViewById(R.id.fillupq); answer=(EditText)findViewById(R.id.fillupa); sock = StaticAttributes.SocketHandler.normalSocket; s4 = this.getString(R.string.ques_accepted_by_teacher); s5 = this.getString(R.string.ques_rejected_by_teacher); submit.setOnClickListener(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}", "@Override\n\tpublic void onActivit...
[ "0.791686", "0.77270156", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7637394", "0.7637394", "0.7629958", "0.76189965", "0.76189965", "0.7543775", "0.7540053", "0.7540053", "0.7539505", "0.75269467", "0.75147736", "0.7509639", "0.7500879",...
0.0
-1
Created by pygmalion on 2014/11/2.
public interface TsPtlUserDao { public TsPtlUser selectUserByUserPass(Map<String,String> map); public void updateUser(TsPtlUser user); public TsPtlUser selectUserById(Long userId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "public void...
[ "0.6152928", "0.6082599", "0.606687", "0.5942312", "0.5942312", "0.59319407", "0.59137934", "0.5902079", "0.5894647", "0.5863259", "0.5852314", "0.5844823", "0.58396715", "0.5836958", "0.58346194", "0.5833028", "0.58301514", "0.5820233", "0.57839507", "0.5734627", "0.57340527...
0.0
-1
Get name of filter
@Override public String name() { return this.name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getFilterName();", "@Override\n\tpublic String name() {\n\t\treturn filter.name();\n\t}", "public static String getNameFilter() {\r\n return nameFilter;\r\n }", "java.lang.String getFilter();", "String getFilter();", "public String getFilter()\n {\n return encryptionDictionary....
[ "0.8969414", "0.8508739", "0.770423", "0.7436235", "0.7359267", "0.7330179", "0.7259696", "0.70390975", "0.6960828", "0.68890584", "0.6815303", "0.6759801", "0.6743877", "0.664953", "0.6607964", "0.65071917", "0.64728206", "0.64271677", "0.6329859", "0.63280123", "0.6302809",...
0.0
-1
Get the total bits of the filter
public int bitsOfFilter() { return config().getM(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getBloomFilterSizeInBytesCount();", "int getBloomFilterSizeInBytes(int index);", "public int getAnalysisBits();", "public int getBloomFilterSizeInBytesCount() {\n return bloomFilterSizeInBytes_.size();\n }", "public int getBloomFilterSizeInBytesCount() {\n return bloomFilterSizeInBytes_....
[ "0.73198134", "0.6776356", "0.6762686", "0.6652995", "0.66437465", "0.64186436", "0.639079", "0.6371507", "0.62395805", "0.62163216", "0.61929905", "0.6170265", "0.616695", "0.61412805", "0.6136291", "0.6111757", "0.6092959", "0.6088655", "0.607172", "0.6071557", "0.6047263",...
0.7524611
0
Get the average bits occupied by each element
public double bitsEachElement() { return config().getC(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getAnalysisBits();", "public void setAverageBits(int bits) {\n }", "public static int countBits(int[] data) {\n\t\tint sum = 0;\n\t\tfor (int d : data) {\n\t\t\tfor (int i = 0; i < 32; i++) {\n\t\t\t\tsum += (d & (1 << i)) > 0 ? 1 : 0;\n\t\t\t}\n\t\t}\n\t\treturn sum;\n\t}", "public double defa...
[ "0.659902", "0.622396", "0.6215754", "0.6134759", "0.6041351", "0.60304433", "0.5946437", "0.59062093", "0.59044874", "0.59017926", "0.58123726", "0.579358", "0.57770085", "0.5730861", "0.5726318", "0.57180864", "0.5686543", "0.56726414", "0.5670071", "0.5651009", "0.56457007...
0.5171397
85
Get the number of elements expected to be supported by the filter
public int numOfExpectedElements() { return config().getN(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int sizeFilter() {\n\t\treturn this.size(FILTER);\n\t}", "int getBloomFilterSizeInBytesCount();", "public int getNumberOfElements();", "public abstract Integer getNumberOfElements();", "int getAnnotationFiltersCount();", "public int sizeFilter3() {\n\t\treturn this.size(FILTER3);\n\t}", "default...
[ "0.73331773", "0.6964874", "0.688219", "0.6868339", "0.68293655", "0.67582494", "0.66337955", "0.661618", "0.65982234", "0.6518686", "0.6518333", "0.6492106", "0.6463085", "0.64553577", "0.6436069", "0.6435826", "0.64305043", "0.64305043", "0.64134955", "0.64134955", "0.64134...
0.6643635
6
Get fpp of filter
public double fpp() { return config().getP(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Filter getFilter();", "FeedbackFilter getFilter();", "public LSPFilter getFilter () {\r\n return filter;\r\n }", "String getFilter();", "public int getNatureFilter();", "public String getFilter();", "String getFilterName();", "public Filter getFilter() {\n\t\treturn (filter);\n\t}", "public...
[ "0.59569347", "0.592781", "0.58948934", "0.5736011", "0.5701693", "0.57002056", "0.56552577", "0.5648724", "0.562995", "0.556308", "0.55096793", "0.5504898", "0.5431126", "0.5420139", "0.5408579", "0.53703666", "0.53639877", "0.53371584", "0.53306556", "0.5330302", "0.5328203...
0.568851
6
Get the number of hash fucntions
public int numOfHashFunctions() { return config().getK(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getHash();", "int getClientHashLength();", "public int getHashLength() {\n\t\treturn hashLength;\n\t}", "public abstract int getHash();", "int getPasswordHashLength();", "public int size(){\n\t\treturn hashTableSize;\n\t}", "private int hashOf(String key) {\n return key.length();\n }", ...
[ "0.7371883", "0.7334939", "0.70732015", "0.6990558", "0.68737084", "0.6825535", "0.6760135", "0.673776", "0.673764", "0.6685767", "0.6631651", "0.6630107", "0.6596587", "0.65766823", "0.65752345", "0.65692997", "0.65607166", "0.6495975", "0.6476025", "0.64694345", "0.6462649"...
0.8244635
0
Length: format: +1 if format > 6: +4 flags: +1 size: +2 ids: + (size 2) if flags & FLAG_IDENTIFIERS: + (4 size) crc: + (4 size) if flags & FLAG_WHIRLPOOL: + (64 size) version: + (4 size) children sizes: + (2 size) children ids: + (2 size (sum child count)) if flags & FLAG_IDENTIFIERS: + (4 size (sum child count)) format, flags, size
public ByteBuffer encode() { int length = 4; // table version if(format >= 6) length += 4; // file ids length += references.size() * 2; // identifiers (hash) of each file if((flags & FLAG_IDENTIFIERS) != 0) length += 4 * references.size(); // CRC of each file length += 4 * references.size(); // length should now be 14 at the end of this // Whirlpool hash of each file if((flags & FLAG_WHIRLPOOL) != 0) length += 64 * references.size(); // Version of each file length += 4 * references.size(); // Number of children in each file length += 2 * references.size(); int totalChildren = 0; for(AssetReference ref : references.values()) { totalChildren += ref.getChildCount(); } // Child id's inside each file length += 2 * totalChildren; if((flags & FLAG_IDENTIFIERS) != 0) length += 4 * totalChildren; ByteBuffer bb = ByteBuffer.allocate(length); bb.put((byte) format); if(format >= 6) { bb.putInt(version); } bb.put((byte) flags); bb.putShort((short) references.size()); int accumulator = 0; for(Map.Entry<Integer, AssetReference> entry : references.entrySet()) { int delta = entry.getKey() - accumulator; accumulator = entry.getKey(); bb.putShort((short) delta); } if((flags & FLAG_IDENTIFIERS) != 0) { for(Map.Entry<Integer, AssetReference> entry : references.entrySet()) { bb.putInt(entry.getValue().getIdentifier()); } } for(Map.Entry<Integer, AssetReference> entry : references.entrySet()) { bb.putInt(entry.getValue().getCRC()); } if((flags & FLAG_WHIRLPOOL) != 0) { for(Map.Entry<Integer, AssetReference> entry : references.entrySet()) { bb.put(entry.getValue().getWhirlpool()); } } for(Map.Entry<Integer, AssetReference> entry : references.entrySet()) { bb.putInt(entry.getValue().getVersion()); } for (Map.Entry<Integer, AssetReference> entry : references.entrySet()) { bb.putShort((short) entry.getValue().getChildCount()); } for (Map.Entry<Integer, AssetReference> entry : references.entrySet()) { accumulator = 0; AssetReference asset = entry.getValue(); for(int i = 0; i < asset.getChildCount(); i++) { int id = asset.getChild(i).getId(); int delta = id - accumulator; accumulator = id; bb.putShort((short) delta); } } if ((flags & FLAG_IDENTIFIERS) != 0) { for (Map.Entry<Integer, AssetReference> entry : references.entrySet()) { AssetReference asset = entry.getValue(); for (SubAssetReference subAsset : asset.getChildren()) { bb.putInt(subAsset.getIdentifier()); } } } Assert.isTrue(!bb.hasRemaining(), "Expect to have calculated exact length"); bb.flip(); return bb; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int sizeBits_parentId() {\n return 16;\n }", "public static int size_parentId() {\n return (16 / 8);\n }", "public static int totalSizeBits_infos_metadata() {\n return 16;\n }", "public int getMarshalledSize()\n{\n int marshalSize = 0; \n\n marshalSize += recor...
[ "0.6039437", "0.5711088", "0.54438424", "0.522676", "0.521441", "0.51858795", "0.5184174", "0.5100071", "0.50691235", "0.5045123", "0.5014533", "0.5003948", "0.4977704", "0.4951168", "0.49435258", "0.49274027", "0.49244505", "0.48909852", "0.4887221", "0.48828268", "0.4859655...
0.6237201
0
Verify the input is of the required type.
@Override public ObjectInspector initialize(ObjectInspector[] arguments) throws UDFArgumentException { // Exactly one input argument if( arguments.length != 1 ) { throw new UDFArgumentLengthException(GeoEncodeUDF.class.getSimpleName() + " accepts exactly one argument."); } // Is the input a String if (((PrimitiveObjectInspector)arguments[0]).getPrimitiveCategory() != PrimitiveObjectInspector.PrimitiveCategory.STRING ) { throw new UDFArgumentTypeException(0,"The single argument to " +GeoEncodeUDF.class.getSimpleName() + " should be String but " + arguments[0].getTypeName() + " is found"); } return ObjectInspectorFactory.getStandardListObjectInspector(PrimitiveObjectInspectorFactory.writableFloatObjectInspector); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected boolean checkType(String myType);", "public abstract boolean isTypeCorrect();", "public abstract boolean verifyInput();", "@Override\n\tpublic boolean checkTypes() {\n\t\treturn false;\n\t}", "private boolean validateType(int type)\n {\n return PSSecurityProvider.isSupportedType(t...
[ "0.71539646", "0.6801581", "0.67622554", "0.67322046", "0.6511555", "0.65103924", "0.64481336", "0.63712776", "0.63221824", "0.6311833", "0.6287503", "0.62643653", "0.62395334", "0.6235314", "0.6208965", "0.6175018", "0.6110196", "0.60875535", "0.6039555", "0.6032659", "0.602...
0.0
-1
Should be exactly one argument
@Override public Object evaluate(DeferredObject[] arguments) throws HiveException { if( arguments.length!=1 && arguments.length!=2 ) { return null; } // If passed a null, return a null if( arguments[0].get()==null ) { return null; } // System.out.println("arguments[0].toString() is " + arguments[0].toString()); // System.out.println("arguments[0] is " + arguments[0].get()); Float[] tmpLatLng = GeoLatLng.getLatLng(arguments[0].get().toString(), arguments[1] != null ? arguments[1].get().toString() : ""); // System.out.println("LatLong are " + tmpLatLng[0] + "#" + tmpLatLng[1]); ArrayList<FloatWritable> result = new ArrayList<FloatWritable>(); if (tmpLatLng != null && tmpLatLng[0] != null && tmpLatLng[1] != null) { result.add(new FloatWritable(tmpLatLng[0])); result.add(new FloatWritable(tmpLatLng[1])); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public boolean argsNotFull();", "@Override\n public int getNumberArguments() {\n return 1;\n }", "static Boolean verifyArguments(String[] args)\n {\n if (args.length < 2)\n {\n return false;\n }\n \n return true;\n }", "private void ch...
[ "0.69217175", "0.66922295", "0.6611917", "0.6602439", "0.6444193", "0.64312935", "0.6406369", "0.62890303", "0.6252309", "0.62162673", "0.62067133", "0.61702573", "0.6126535", "0.6118161", "0.602487", "0.60146075", "0.60115904", "0.6010105", "0.59949285", "0.5957779", "0.5950...
0.0
-1
returns the string that will be returned when explain is used
@Override public String getDisplayString(String[] arg0) { return new String("geo_points"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.lang.String explainInternal (boolean extended) { throw new RuntimeException(); }", "String getHelpString();", "public String getShortExplanation()\r\n\t{\r\n\t\treturn this._shortExplanation;\r\n\t}", "String getSqlForExplainPlan(String sql, SqlParser parser);", "public String getHelp();", ...
[ "0.7059777", "0.6642305", "0.6553897", "0.65267634", "0.65126574", "0.6453432", "0.63960373", "0.63559836", "0.63100076", "0.6289956", "0.6289956", "0.6289956", "0.6289956", "0.6289956", "0.6289956", "0.6289956", "0.6289956", "0.6289956", "0.6289956", "0.6289956", "0.6289956"...
0.0
-1
set values for custom dialog components text, image and button
@Override public void onClick(View v) { final EditText user_gmail = dialog.findViewById(R.id.flat_gmail); final EditText flat_number = dialog.findViewById(R.id.flat_no); final String gmail = user_gmail.getText().toString().trim(); final String flat_num = flat_number.getText().toString().trim(); db.collection("Residents") .get() .addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() { @Override public void onComplete(@NonNull Task<QuerySnapshot> task) { if (task.isSuccessful()) { for (QueryDocumentSnapshot document : task.getResult()) { if(gmail.trim().equals(document.getString("gmail"))|| flat_num.trim().equals(document.getString("flat_no"))) { Log.i("inside", document.getId() + " => " + document.get("gmail")); Toast.makeText(AllotFlats.this, "Redundant Id or Flat", Toast.LENGTH_SHORT).show(); flag=1; Log.i("Flag1",flag+""); break; } } if(flag!=1){ AllotList list = new AllotList(gmail, flat_num); if(flag!=1) { Log.i("Flag3",flag+""); db.collection("Residents") .add(list) .addOnSuccessListener(new OnSuccessListener<DocumentReference>() { @Override public void onSuccess(DocumentReference documentReference) { if(flag!=1) { Log.i("Flag2", flag + ""); Toast.makeText(AllotFlats.this, "Alloted Successfully", Toast.LENGTH_SHORT).show(); Log.i("TAG", "DocumentSnapshot written with ID: " + documentReference.getId()); } } }) .addOnFailureListener(new OnFailureListener() { @Override public void onFailure(@NonNull Exception e) { Log.w("TAG", "Error adding document", e); } }); dialog.dismiss(); } } } else { Log.i("TAG", "Error getting documents.", task.getException()); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private DialogBox(String text, Image img) {\n try {\n FXMLLoader fxmlLoader = new FXMLLoader(MainWindow.class.getResource(\"/view/DialogBox.fxml\"));\n assert fxmlLoader != null : \"fxmlLoader for DialogBox is null\";\n fxmlLoader.setController(this);\n fxmlLoader...
[ "0.64659226", "0.6296893", "0.6255974", "0.6219193", "0.6148014", "0.6080608", "0.6077536", "0.60570955", "0.60235417", "0.6011956", "0.6000866", "0.5969911", "0.59626794", "0.5952224", "0.59514004", "0.5950285", "0.594453", "0.59416157", "0.5907237", "0.588258", "0.58681405"...
0.0
-1
Created by Admin on 20170217.
public interface BoardBiz { public boolean writeArticle(BoardVO boardVO); public BoardVO getOneArticles(int boardId); public List<BoardVO> getAllArticles(BoardSearchVO boardSearchVO); public boolean removeArticle(int boardId); public boolean uploadArticle(BoardVO boardVO); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "public void...
[ "0.61059177", "0.6066346", "0.57990044", "0.57201475", "0.57068264", "0.5687189", "0.56827945", "0.5673908", "0.566463", "0.5661844", "0.5616563", "0.5611126", "0.55865014", "0.55865014", "0.5583046", "0.55752426", "0.55714005", "0.5548726", "0.5545754", "0.5545754", "0.55457...
0.0
-1
C\u00F3digo de identifica\u00E7\u00E3o da compra
public CompraResponse idCompra(Long idCompra) { this.idCompra = idCompra; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di friggere un uovo\";\r\n }", "public abstract java.lang.String getCod_tecnico();", "@Override\r\n public String AggiungiQualcosa() {\r\n// ...
[ "0.64556026", "0.64490473", "0.6383329", "0.6381195", "0.6378487", "0.6268662", "0.6214875", "0.62021065", "0.6182734", "0.6181848", "0.6165158", "0.61480796", "0.6140832", "0.611814", "0.60294837", "0.60229856", "0.59986603", "0.59897727", "0.5985455", "0.5978862", "0.596108...
0.0
-1
Descri\u00E7\u00E3o do status da autoriza\u00E7\u00E3o da compra
public CompraResponse status(String status) { this.status = status; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getStatus();", "java.lang.String getStatus();", "java.lang.String getStatus();", "java.lang.String getStatus();", "public java.lang.CharSequence getStatus() {\n return status;\n }", "public java.lang.CharSequence getStatus() {\n return status;\n }", "public String getStatus...
[ "0.718439", "0.718439", "0.718439", "0.718439", "0.7144182", "0.7113566", "0.6950783", "0.6877411", "0.6837111", "0.6825617", "0.6812419", "0.68050057", "0.68050057", "0.68050057", "0.68050057", "0.68050057", "0.6788303", "0.6768282", "0.6670603", "0.6670603", "0.6670603", ...
0.0
-1
Valor total da compra
public CompraResponse valorTotalCompra(BigDecimal valorTotalCompra) { this.valorTotalCompra = valorTotalCompra; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BigDecimal getValorTotal() {\r\n \treturn valorUnitario.setScale(5, BigDecimal.ROUND_HALF_EVEN).multiply(quantidade.setScale(3, BigDecimal.ROUND_HALF_EVEN)).setScale(3, BigDecimal.ROUND_DOWN).subtract(valorDesconto).setScale(3, BigDecimal.ROUND_HALF_EVEN);\r\n }", "public float totalVentas() {\n ...
[ "0.79681265", "0.77632415", "0.77335715", "0.7665347", "0.751985", "0.7513175", "0.75051934", "0.74870193", "0.7428996", "0.738061", "0.73689085", "0.7259795", "0.7259795", "0.7255906", "0.725438", "0.7247841", "0.72323775", "0.7223129", "0.7223129", "0.72093016", "0.7206422"...
0.0
-1
Valor da parcela da compra
public CompraResponse valorParcela(BigDecimal valorParcela) { this.valorParcela = valorParcela; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getValorParcela() {\n return valorParcela;\n }", "public int getCoeficienteBernua()\n {\n return potenciaCV;\n }", "public double getPrecioCompra() {\n return precioCompra;\n }", "String getPrecio();", "public int getPrecio(){\n return precio;\n }", "pub...
[ "0.75365615", "0.7184981", "0.7161502", "0.6916873", "0.6823716", "0.6822063", "0.6756665", "0.67094976", "0.6666254", "0.66499734", "0.6620307", "0.6609256", "0.6601565", "0.6601565", "0.6596508", "0.65569824", "0.6541321", "0.6539591", "0.6534653", "0.65314823", "0.6504008"...
0.6312011
32
Valor da primeira parcela da compra
public CompraResponse primeiraParcela(BigDecimal primeiraParcela) { this.primeiraParcela = primeiraParcela; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getValorParcela() {\n return valorParcela;\n }", "public int getCoeficienteBernua()\n {\n return potenciaCV;\n }", "public double getPrecioCompra() {\n return precioCompra;\n }", "public float carga(){\n return (this.capacidade/this.tamanho);\n }", "public int p...
[ "0.72211516", "0.72024626", "0.7137679", "0.7072255", "0.7006321", "0.68478656", "0.682919", "0.6817113", "0.68043494", "0.6731107", "0.6728404", "0.6669519", "0.6634715", "0.66144526", "0.6614291", "0.6580637", "0.6574126", "0.65689486", "0.6561814", "0.65524065", "0.654978"...
0.0
-1
N\u00FAmero de parcelas da compra
public CompraResponse numeroParcelas(Integer numeroParcelas) { this.numeroParcelas = numeroParcelas; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void preparar() {\n\t\tSystem.out.println(\"massa, presunto, queijo, calabreza e cebola\");\n\t\t\n\t}", "@Override\n\tpublic String parler() {\n\t\treturn \"Je suis un Orc\";\n\t}", "@Override\n\tpublic void muestraInfo() {\n\t\tSystem.out.println(\"Adivina un número par: Es un juego en el...
[ "0.64021695", "0.6318539", "0.62521183", "0.6211581", "0.61550057", "0.61229044", "0.61131597", "0.6072541", "0.6054417", "0.60436374", "0.6041947", "0.6038128", "0.6023903", "0.6023215", "0.59823817", "0.5941912", "0.5941912", "0.59108377", "0.5890333", "0.5864755", "0.58555...
0.5482202
72
N\u00FAmero de parcelas antecip\u00E1veis da compra
public CompraResponse numeroParcelasAntecipaveis(Integer numeroParcelasAntecipaveis) { this.numeroParcelasAntecipaveis = numeroParcelasAntecipaveis; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic String getInformeVendedor() {\n\t\treturn \"Informe trimestre 3\";\n\t}", "public void carroNoAgregado(){\n System.out.println(\"No hay un parqueo para su automovil\");\n }", "private String elaboraIncipit() {\n String testo = VUOTA;\n\n if (usaHeadIncipit) {\n ...
[ "0.6563144", "0.63566804", "0.6351534", "0.6329354", "0.6323355", "0.6318411", "0.6305072", "0.62837857", "0.62552714", "0.62434804", "0.62239176", "0.6209107", "0.6197611", "0.6160698", "0.615626", "0.6151415", "0.6133552", "0.6123952", "0.61225086", "0.6117968", "0.61160797...
0.5863328
53
Nome do estabelecimento da compra
public CompraResponse nomeEstabelecimento(String nomeEstabelecimento) { this.nomeEstabelecimento = nomeEstabelecimento; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getCognomeNome() {\n\t\treturn this.cognome + \" \" + this.nome;\n\t}", "@Override\n\t\t\tpublic String toString() {\n\t\t\t\treturn nome;\n\t\t\t}", "public String name() {\n return celestialName;\n }", "String getCName() {\n return nameTF.getText();\n }", "public String...
[ "0.74020696", "0.7236359", "0.72344804", "0.72280616", "0.72068906", "0.72013664", "0.71848106", "0.7145971", "0.7068963", "0.694807", "0.69336087", "0.692857", "0.69275683", "0.69275683", "0.6923829", "0.6921696", "0.68781227", "0.6874883", "0.68728983", "0.68632555", "0.682...
0.0
-1
Tipo de transa\u00E7\u00E3o da compra
public CompraResponse tipoOrigemTransacao(String tipoOrigemTransacao) { this.tipoOrigemTransacao = tipoOrigemTransacao; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String tipoConta() {\n return \"Conta Comum\";\n }", "public abstract java.lang.String getCod_tecnico();", "public String nombreTipoPago(){\n if (this.tipoPago == TipoPago.CONDONACION_PAGO_CONTADO) return \"Condonaci�n Pago Contado\";\n else if (this.tipoPago == TipoPago.CONVENIO_SIN_CON...
[ "0.7039657", "0.6346791", "0.63023734", "0.6280707", "0.6174271", "0.6119852", "0.6110941", "0.61101556", "0.6104766", "0.5887331", "0.586697", "0.585145", "0.58411026", "0.5837301", "0.58120507", "0.580636", "0.579383", "0.5782808", "0.5774971", "0.5742276", "0.57295334", ...
0.5493641
51
Cidade onde a compra foi realizada
public CompraResponse cidade(String cidade) { this.cidade = cidade; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void atualizar() {\n\t\t\n\t\t \n\t\t String idstring = id.getText();\n\t\t UUID idlong = UUID.fromString(idstring);\n\t\t \n\t\t PedidoCompra PedidoCompra = new PedidoCompra();\n\t\t\tPedidoCompra.setId(idlong);\n\t\t\tPedidoCompra.setAtivo(true);\n//\t\t\tPedidoCompra.setNome(nome.getText...
[ "0.69353205", "0.672904", "0.66310537", "0.6629594", "0.65885794", "0.65489024", "0.6548749", "0.6541566", "0.6519273", "0.6511874", "0.64923954", "0.63738894", "0.6370393", "0.6356973", "0.63443285", "0.63440937", "0.6343593", "0.631843", "0.63040686", "0.629829", "0.6296204...
0.0
-1
Pa\u00EDs onde a compra foi realizada
public CompraResponse pais(String pais) { this.pais = pais; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di friggere un uovo\";\r\n }", "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho in...
[ "0.6829743", "0.6727305", "0.6366029", "0.6325177", "0.625733", "0.61790866", "0.6129719", "0.60200053", "0.59976834", "0.59750867", "0.5961692", "0.59587175", "0.59426624", "0.59067124", "0.588602", "0.58784246", "0.5840738", "0.57966906", "0.5793028", "0.5788126", "0.577979...
0.0
-1
Coordenada latitudinal da localiza\u00E7\u00E3o da compra
public CompraResponse latitude(String latitude) { this.latitude = latitude; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getLatE6();", "int getLatE6();", "public int getLon();", "public Coord addressToCoord(String localisation);", "public int getLat();", "public String getLocation() {\n\t\treturn \"-12.9990189,-38.5140298\";\n\t}", "@AutoEscape\n\tpublic String getLatitud();", "private String latitudeConversion() {...
[ "0.67982197", "0.67982197", "0.6708172", "0.6704831", "0.6664325", "0.6615921", "0.6530306", "0.62944597", "0.62772727", "0.61449736", "0.614344", "0.614344", "0.6092108", "0.6037506", "0.6030154", "0.6018555", "0.60046303", "0.5995756", "0.5994753", "0.5994753", "0.59793204"...
0.0
-1
Coordenada longitudinal da localiza\u00E7\u00E3o da compra
public CompraResponse longitude(String longitude) { this.longitude = longitude; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getLon();", "int getLatE6();", "int getLatE6();", "private String longitudeConversion() {\n int lon = record[5];\n if (lon >= 0) {\n lon = lon & 255;\n }\n lon = (lon << 8) + (record[4] & 255);\n float flon = Float.parseFloat(\"\" + lon + \".\" + (((re...
[ "0.65970397", "0.65007186", "0.65007186", "0.64967084", "0.62018806", "0.62018806", "0.61911935", "0.6017345", "0.59504044", "0.59092104", "0.5871648", "0.5791394", "0.5791394", "0.57879484", "0.57865775", "0.57853764", "0.57456255", "0.5709335", "0.56959325", "0.56713754", "...
0.0
-1
C\u00F3digo de Identifica\u00E7\u00E3o do Grupo MCC da compra
public CompraResponse idGrupoMCC(Long idGrupoMCC) { this.idGrupoMCC = idGrupoMCC; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getMcc() {\n return mcc;\n }", "public CompraResponse descricaoGrupoMCC(String descricaoGrupoMCC) {\n this.descricaoGrupoMCC = descricaoGrupoMCC;\n return this;\n }", "public String getCROSG_CODIGO(){\n\t\treturn this.myCrosg_codigo;\n\t}", "public int getCC() {\n\t\treturn CC;...
[ "0.6474315", "0.62262005", "0.61765933", "0.61505353", "0.6117291", "0.6117291", "0.6096046", "0.6096046", "0.6077498", "0.6063682", "0.59774977", "0.59731096", "0.59731096", "0.59684026", "0.59371674", "0.58874685", "0.58442086", "0.5765362", "0.5765035", "0.567793", "0.5657...
0.60998434
6
Descri\u00E7\u00E3o do Grupo MCC da compra
public CompraResponse descricaoGrupoMCC(String descricaoGrupoMCC) { this.descricaoGrupoMCC = descricaoGrupoMCC; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getMcc() {\n return mcc;\n }", "public String getDescripcionGrupo() {\n\t\treturn descripcionGrupo;\n\t}", "public String getMarca()\n {\n return \"\\nDispositivo Marca \" + Marca; \n }", "public String getCVCTG_NOMBRE(){\n\t\treturn this.myCvctg_nombre;\n\t}", "public ...
[ "0.63027173", "0.61097866", "0.6101632", "0.5943283", "0.5898993", "0.5865348", "0.58606124", "0.58261234", "0.5797838", "0.5796104", "0.57775474", "0.57532", "0.57203317", "0.57190776", "0.5701885", "0.56937456", "0.5673099", "0.5670472", "0.5660613", "0.5659542", "0.5627327...
0.70368433
0
C\u00F3digo de Identifica\u00E7\u00E3o da conta da compra
public CompraResponse idConta(Long idConta) { this.idConta = idConta; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract java.lang.String getCod_tecnico();", "public char getCouleur(){\t\n\t\treturn couleur;\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn super.getCor().equals(\"Branco\") ? \" ♘ \": \" ♞ \";\r\n\t}", "public String getAgenciaCodCedenteFormatted() {\r\n return boleto...
[ "0.63969725", "0.6376307", "0.63571244", "0.63548833", "0.6347409", "0.6330674", "0.6325336", "0.62742585", "0.62565786", "0.62332475", "0.6232758", "0.619583", "0.6181077", "0.6178182", "0.6157555", "0.6146203", "0.6116595", "0.6054182", "0.6047764", "0.60122323", "0.6004063...
0.0
-1
C\u00F3digo de Identifica\u00E7\u00E3o do produto da compra
public CompraResponse idProduto(Long idProduto) { this.idProduto = idProduto; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.lang.String getCodigo_pcom();", "public String getCodProd() {\n return this.codProd;\n }", "java.lang.String getProductCode();", "public String getCODIGO() {\r\n return CODIGO;\r\n }", "@AutoEscape\n\tpublic String getCodDistrito();", "public String getCodigoDeBarras() {\n...
[ "0.67192024", "0.65740925", "0.634121", "0.62895256", "0.6237657", "0.62179327", "0.61962", "0.6165165", "0.6151517", "0.6143727", "0.613203", "0.605992", "0.6056622", "0.6053899", "0.60493714", "0.6026498", "0.5978234", "0.59773594", "0.5963017", "0.5943082", "0.592975", "...
0.0
-1
Descri\u00E7\u00E3o do produto da compra
public CompraResponse descricaoProduto(String descricaoProduto) { this.descricaoProduto = descricaoProduto; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String description () {\n\t\t\tSystem.out.println(treinador.getTreinador() + \" fugiu da batalha!!\");\r\n\t\t\tSystem.exit(0);\r\n\t\t\treturn treinador.getTreinador() + \" fugiu da batalha!!\";\r\n\t\t}", "public String dameDescripcion(){\n return \"Este empleado tiene un id = \"+getId()+\" con u...
[ "0.6962705", "0.6908473", "0.6792557", "0.6773595", "0.6762871", "0.6746696", "0.673133", "0.6657454", "0.6635675", "0.66349566", "0.66134495", "0.6563912", "0.6540965", "0.6529154", "0.6513829", "0.6479569", "0.64775914", "0.64599323", "0.64330757", "0.64330757", "0.64247984...
0.6547052
12
N\u00FAmero do cart\u00E3o da compra
public CompraResponse cartao(String cartao) { this.cartao = cartao; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic String toString(){\n\t\treturn \"Inf carta:\\n\"+numero+\"de \"+palo+\"\\nValor: \"+valor;\n\t}", "public String toString() {\n return \" Carta [numero=\" + numero + \", seme=\" + seme + \" ,valore= \"+valore+\" , punti= \"+punti+\"] \";\n }", "private String insertarCartaNaturalS...
[ "0.6998448", "0.6544288", "0.640832", "0.63590634", "0.6287624", "0.6286044", "0.6283618", "0.6272145", "0.62603575", "0.6256074", "0.6256074", "0.62461996", "0.6198941", "0.61792755", "0.617699", "0.6102069", "0.60985166", "0.6038275", "0.60335517", "0.60318714", "0.60102427...
0.5768132
44
Nome do portador do cart\u00E3o da compra
public CompraResponse nomePortadorCartao(String nomePortadorCartao) { this.nomePortadorCartao = nomePortadorCartao; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic String toString(){\n\t\treturn \"Inf carta:\\n\"+numero+\"de \"+palo+\"\\nValor: \"+valor;\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn super.getCor().equals(\"Branco\") ? \" ♘ \": \" ♞ \";\r\n\t}", "public String toString() {\n return \" Carta [numero=\" + n...
[ "0.64428", "0.63909125", "0.63674676", "0.6185386", "0.61653644", "0.61539525", "0.61539525", "0.6107919", "0.60723025", "0.6033362", "0.59785324", "0.59378904", "0.5936626", "0.5918704", "0.59094495", "0.5909008", "0.5863605", "0.5853157", "0.5845815", "0.5839236", "0.582019...
0.61729795
4
Convert the given object to string with each line indented by 4 spaces (except the first line).
private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String toIndentedString(Object object) {\n if (object == null) {\n return EndpointCentralConstants.NULL_STRING;\n }\n return object.toString().replace(EndpointCentralConstants.LINE_BREAK,\n EndpointCentralConstants.LINE_BREAK + EndpointCentralConstants.TAB_SPA...
[ "0.78840077", "0.75487214", "0.74962974", "0.74606246", "0.74606246", "0.74606246", "0.74606246", "0.74606246", "0.74606246", "0.74606246", "0.74606246", "0.74606246", "0.74606246", "0.74606246", "0.74606246", "0.74606246", "0.74606246", "0.74606246", "0.74606246", "0.74606246"...
0.0
-1
Write a function that adds two numbers. You should not use + or any arithmetic operators.
@Test public void test1() { Assert.assertEquals(addBinary(2, 4), 6); Assert.assertEquals(addBinary(3, 6), 9); Assert.assertEquals(addBinary(23, 9), 32); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int addition(int a, int b){\n return a + b;\n }", "public double add(int a, int b){\r\n return a + b;\r\n }", "public int add(int a, int b) //add method take two int values and returns the sum\n {\n int sum = a + b;\n return sum;\n }", "public int addTwoNumbers(int a, in...
[ "0.84160197", "0.84116465", "0.8400245", "0.83914983", "0.8197814", "0.817089", "0.8137392", "0.8030488", "0.7969456", "0.7969456", "0.7927561", "0.79196113", "0.7894552", "0.78699994", "0.78612715", "0.78466785", "0.78136814", "0.7805613", "0.77735937", "0.77485836", "0.7681...
0.0
-1
if b=0 then the sum is a
private int addBinary(int a, int b) { if (b == 0) { return a; } // XOR is like doing a sum without carrying the remainders int sum = a ^ b; // AND shifted left is like getting just the remainders int carry = (a & b) << 1; return addBinary(sum, carry); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected int sumIterative(int a, int b){\n int result = a;\n while (b != 0){\n if (b > 0){\n result++;\n b--;\n } else {\n result--;\n b++;\n }\n }\n return result;\n }", "public static in...
[ "0.7634268", "0.73987776", "0.73502505", "0.7196741", "0.7115407", "0.69648755", "0.6925283", "0.6911211", "0.68881094", "0.6736592", "0.6707846", "0.6605175", "0.6584502", "0.6574174", "0.6572264", "0.6568178", "0.6555204", "0.65477574", "0.6532756", "0.6509189", "0.64940256...
0.62413424
29
Write a method to shuffle a deck of cards. It must be a perfect shuffle in other words, each 52! permutations of the deck has to be equally likely. Assume that you are given a random number generator which is perfect.
@Test public void test2() { int[] deck = new int[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; shuffle(deck); String prepend = ""; for (int i : deck) { System.out.print(prepend + i); prepend = ", "; } System.out.println(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void shuffleDeck() {\n\t\tint numberOfShuffles = (int) ( Math.random() * 4 + 1 ) ;\n\t\tCard temp;\n\t\t\n\t\tfor( int j = 0; j < numberOfShuffles; j++ ) {\n\t\t\tfor( int i = 0; i < deck.length; i++ ) {\n\t\t\t\tint randSwitchNum = (int) (Math.random() * 52);\n\t\t\t\ttemp = deck[i];\n\t\t\t\tdeck[i] = de...
[ "0.7768375", "0.7670008", "0.76519775", "0.7522559", "0.75176567", "0.74803835", "0.74605113", "0.7456114", "0.7415795", "0.7410126", "0.73962903", "0.73732543", "0.73723394", "0.7352342", "0.7305582", "0.7299701", "0.7252209", "0.7243845", "0.72364956", "0.7206127", "0.71995...
0.6066401
92