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
Loads an existing Shapes model.
private void loadShapesModel(String modelPath) { // Initialize the model ShapesPackage.eINSTANCE.eClass(); // Register the XMI resource factory for the .shapes extension Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE; Map<String, Object> m = reg.getExtensionToFactoryMap(); m.put("shapes", new XMIResourceFactoryImpl()); // Obtain a new resource set ResourceSet resSet = new ResourceSetImpl(); // Get the resource Resource resource = resSet.getResource(URI.createURI(modelPath), true); // Get the first model element and cast it to the right type EObject obj = resource.getContents().get(0); if (obj instanceof RootBlock) { sourceRootBlock = (RootBlock) obj; } else { throw new IllegalArgumentException( "RootBlock has to be first element in " + modelPath); } if (LOGGER.isInfoEnabled()) { LOGGER.info("Loaded Shapes model from " + modelPath); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initializeShapesModel() {\n\t\t// Initialize the model\n\t\tShapesPackage.eINSTANCE.eClass();\n\t\tShapesPackage.eINSTANCE.setNsURI(METAMODEL_PATH_SHAPES);\n\n\t\t// Retrieve the default factory singleton\n\t\tfactory = ShapesFactory.eINSTANCE;\n\n\t\t// Create the content of the model via this progra...
[ "0.7146119", "0.6458511", "0.5894522", "0.57615596", "0.576108", "0.57374287", "0.5687136", "0.5653641", "0.55051625", "0.5430567", "0.5422153", "0.5414002", "0.5365125", "0.5361102", "0.52879596", "0.5285085", "0.5263177", "0.5248155", "0.5246546", "0.523299", "0.51972395", ...
0.7843901
0
Creates a new Shapes model with one RootBlock in its root.
private void initializeShapesModel() { // Initialize the model ShapesPackage.eINSTANCE.eClass(); ShapesPackage.eINSTANCE.setNsURI(METAMODEL_PATH_SHAPES); // Retrieve the default factory singleton factory = ShapesFactory.eINSTANCE; // Create the content of the model via this program targetRootBlock = factory.createRootBlock(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createRootNode()\r\n {\r\n root = new Node(\"root\", null);\r\n Node.clear();\r\n }", "public RMShape getRootShape() { return _parent!=null? _parent.getRootShape() : this; }", "private DocumentRootImpl createInitialModel() {\n\t\tEClass eClass = ExtendedMetaData.INSTANCE.getDocumentRoot(m...
[ "0.6400233", "0.61582553", "0.6130224", "0.581136", "0.5663284", "0.5639097", "0.5625763", "0.55724585", "0.5503695", "0.54845166", "0.5481339", "0.54394156", "0.54270554", "0.5418574", "0.5415588", "0.5404307", "0.5382596", "0.53531456", "0.53493226", "0.5340034", "0.5309931...
0.65493757
0
Saves the contents of the targetRootBlock member variable to the specified output URI.
public void save() { // Register the XMI resource factory for the .xmi extension Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE; Map<String, Object> m = reg.getExtensionToFactoryMap(); m.put("xmi", new XMIResourceFactoryImpl()); // Obtain a new resource set ResourceSet resSet = new ResourceSetImpl(); // Create a resource Resource resource = resSet.createResource(this.targetURI); // Get the first model element and cast it to the right type resource.getContents().add(targetRootBlock); // Now save the content. Map<String, Object> options = new HashMap<String, Object>(); options.put(XMIResource.OPTION_ENCODING, "UTF-8"); try { resource.save(options); } catch (IOException e) { LOGGER.error("IOException when trying to save to " + this.targetURI); } if (LOGGER.isInfoEnabled()) { LOGGER.info("Saved Shapes model to " + this.targetURI); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String saveProductionBlock(ProductionBlock pb);", "void save(MountPoint mountPoint);", "abstract protected URI getSavedMasterUri();", "public void save()\n throws IOException\n {\n File file = new File(MainFrame.getConfig().getUserPath(), SNAPSHOTFILE);\n if(null != file.getParentFile...
[ "0.4964732", "0.477452", "0.47608703", "0.4670955", "0.45193288", "0.45174736", "0.44901884", "0.4471825", "0.44480106", "0.4440858", "0.4437532", "0.44219714", "0.4421694", "0.44215012", "0.44199815", "0.44137937", "0.44051605", "0.4366275", "0.43622112", "0.4343631", "0.433...
0.52412933
0
Executes the transformation from a Shapes model to a new Shapes model. First copies the model, then selects every empty block and replaces it by a square with the same name.
public void transform() { this.targetRootBlock = copy(this.sourceRootBlock); List<BlockImpl> blocks = allSubobjectsOfKind(targetRootBlock, BlockImpl.class); List<Block> emptyBlocks = new LinkedList<Block>(); for (Block block : blocks) { if (block.getModelElement().size() == 0) { emptyBlocks.add(block); } } for (Block block : emptyBlocks) { createSquare(block); EcoreUtil.delete(block); } if (LOGGER.isInfoEnabled()) { LOGGER.info("Completed Transformation"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void run() {\n\n for (IDrawShape copiedShape : shapeList.getClipBoard() ) {\n newShape = copiedShape;\n //offset the shape, per Prof instructions\n newShape.addX(100);\n newShape.addY(100);\n\n CreateShapeCommand shape = new CreateShapeCommand(ap...
[ "0.5910426", "0.5645483", "0.5436048", "0.5348355", "0.5280086", "0.5275384", "0.5201496", "0.5191914", "0.51804924", "0.513577", "0.5117421", "0.51023537", "0.5090049", "0.50857353", "0.5078868", "0.50661933", "0.5065795", "0.5043663", "0.5024968", "0.501743", "0.50102085", ...
0.7287355
0
Returns iteratively all sub objects filtered by a type of an object.
@SuppressWarnings("unchecked") // caused by instanceof simulation private <T extends EObject> List<T> allSubobjectsOfKind(EObject rootObject, Class<T> type) { List<T> result = new LinkedList<T>(); TreeIterator<EObject> iterator = rootObject.eAllContents(); while (iterator.hasNext()) { EObject eObj = iterator.next(); if (eObj.getClass() == type) { // simulates instanceof result.add((T) eObj); } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\n public <T extends Resource> List<T> getChildren(Class<T> type)\n {\n Resource[] allChildren = getChildren();\n List<T> filteredChildren = new ArrayList<T>();\n for(Resource child : allChildren)\n {\n if(type.isAssignableFrom(child.getC...
[ "0.5915628", "0.58206004", "0.56314266", "0.5593691", "0.5571098", "0.5471679", "0.5463788", "0.54595834", "0.5384056", "0.5366128", "0.53580177", "0.53299266", "0.5318827", "0.5309696", "0.5221722", "0.52195865", "0.51885897", "0.51775557", "0.51417947", "0.51060975", "0.510...
0.74435335
0
Creates a new square by using information from a given block.
private void createSquare(Block block) { Square square = factory.createSquare(); square.setName(block.getName()); square.setBlock(block.getBlock()); square.getInArrow().addAll(block.getInArrow()); square.getOutArrow().addAll(block.getOutArrow()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Block create(int xpos, int ypos);", "Block createBlock();", "private void createBlock() {\n\t\tblock = new Block(mouseX, mouseY, 25, 25);\r\n\t\tblock.addObserver(this);\r\n\t\tblock.start();\r\n\t\t// System.out.println(\"Block created (at Model.createBlock)\");\r\n\t}", "private SpawnSquare createSquare(bo...
[ "0.7242719", "0.7011449", "0.651676", "0.6474831", "0.6410351", "0.6287882", "0.62461907", "0.61900765", "0.610329", "0.60979724", "0.60901827", "0.60522103", "0.6023433", "0.595835", "0.5910358", "0.5909656", "0.5905397", "0.5838451", "0.5825973", "0.58237255", "0.57977545",...
0.8205094
0
Returns a copy of the given sourceRootBlock.
private RootBlock copy(RootBlock sourceRootBlock) { Copier copier = new Copier(true); RootBlock result = (RootBlock) copier.copy(sourceRootBlock); copier.copyReferences(); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public RawBlockContainer copy() {\n final RawBlockContainer container = new RawBlockContainer();\n container.setVersion(ArrayUtil.arrayCopy(getVersion()));\n container.setPreviousBlockHash(ArrayUtil.arrayCopy(getPreviousBlockHash()));\n container.setMerkleRoot(ArrayUtil.arrayCopy(getMerkleRoot()));\n ...
[ "0.6115428", "0.5996716", "0.57061344", "0.5639867", "0.55581987", "0.55399054", "0.5509816", "0.54047", "0.539594", "0.5351432", "0.53265125", "0.5241515", "0.5187295", "0.51522666", "0.51174515", "0.511535", "0.50773525", "0.5045187", "0.5025437", "0.50058657", "0.49923283"...
0.8316542
0
This interface describes the property metadata storage.
public interface IPropertyMetadata { /** * This method gets the property metadata for this appender. * * @return The property metadata for this appender. */ ArrayList<PropertyMetadata> getProperties(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String metadata(String property);", "public interface Property extends Assignable\n{\n\t/**\n\t * Property name\n\t */\n\tString getName();\n\n\t/**\n\t * Type.\n\t * \n\t * If this is a getter, the returned value is the getter's return type.\n\t * If this is a setter, the returned value is the t...
[ "0.710663", "0.66491467", "0.63555825", "0.63257545", "0.6320634", "0.63167566", "0.6275248", "0.62539315", "0.621682", "0.6202757", "0.6165527", "0.6121463", "0.61060274", "0.6028724", "0.6019668", "0.6014717", "0.6007939", "0.59817374", "0.59626126", "0.59419113", "0.589148...
0.6152675
11
This method gets the property metadata for this appender.
ArrayList<PropertyMetadata> getProperties();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface IPropertyMetadata\r\n{\r\n /**\r\n * This method gets the property metadata for this appender.\r\n *\r\n * @return The property metadata for this appender.\r\n */\r\n ArrayList<PropertyMetadata> getProperties();\r\n}", "public PropertyMetaData[] getPropertyMetaData() \n {...
[ "0.7616325", "0.71158403", "0.6802805", "0.6172911", "0.6107156", "0.6103743", "0.60908985", "0.60404253", "0.60404253", "0.6005328", "0.59813094", "0.5958015", "0.5893463", "0.58725965", "0.58682024", "0.58615845", "0.5858996", "0.5843877", "0.5843877", "0.58388597", "0.5836...
0.6336553
3
Constructs new instance of CM_LEGION packet
public CM_LEGION(int opcode, State state, State... restStates) { super(opcode, state, restStates); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ef l()\r\n/* 293: */ {\r\n/* 294:240 */ Packet211TileDesc packet = new Packet211TileDesc();\r\n/* 295:241 */ packet.subId = 9;\r\n/* 296:242 */ packet.xCoord = this.l;packet.yCoord = this.m;\r\n/* 297:243 */ packet.zCoord = this.n;\r\n/* 298:244 */ writeToPacket(packet);\r\n/* 299:2...
[ "0.55524224", "0.5432264", "0.5392202", "0.53268844", "0.51341504", "0.5065475", "0.5060205", "0.5048894", "0.50207335", "0.4992702", "0.49578485", "0.49115768", "0.48717582", "0.48632237", "0.48498523", "0.48428366", "0.48377293", "0.48269257", "0.4805859", "0.47836912", "0....
0.5415829
2
TODO Autogenerated method stub
public static void main(String[] args) { int [] input = {10,50,20,60,30}; bubble_srt(input); }
{ "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
Parse whether it's in debug mode.
@Override public void parse(JsonNode data) throws InvalidCaseException { JsonNode node = getConfValue(DEBUG); if (node != null && (node.getBooleanValue() || Boolean.parseBoolean(node.getTextValue()))) { debug = true; } int daemonsPerSection = 0; boolean enableTTL = false; // Whether ttl feature is enabled. node = getConfValue(CACHE_ENABLE_TTL); if (node != null && (node.getBooleanValue() || Boolean.parseBoolean(node.getTextValue()))) { enableTTL = true; } // Parse daemons number per section. node = getConfValue(CACHE_DAEMONS_PER_SECTION); daemonsPerSection = node.getIntValue(); cacheConf = CacheConfig.getConfig(daemonsPerSection, enableTTL); MailConf conf = MailConf.getConf(); conf.setHost(getConfValue("mail.host").getTextValue()); conf.setPort(getConfValue("mail.port").getIntValue()); conf.setUsername(getConfValue("mail.username").getTextValue()); conf.setPasswd(getConfValue("mail.password").getTextValue()); conf.setSsl(getConfValue("mail.ssl").getBooleanValue()); conf.setSender(getConfValue("mail.sender").getTextValue()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isDebug();", "boolean isDebug();", "boolean isDebug();", "private final boolean isDebugMode() {\r\n\tString debug = m_ctx.getInitParameter(\"gateway.debug\");\r\n\tif (debug == null)\r\n\t return false;\r\n\tif (debug.equalsIgnoreCase(\"true\"))\r\n\t return true;\r\n\telse\r\n\t retu...
[ "0.73967475", "0.7373957", "0.7373957", "0.7242601", "0.712117", "0.70865816", "0.7078991", "0.7008296", "0.7008296", "0.6877575", "0.6832702", "0.6808817", "0.6807516", "0.67707485", "0.67309374", "0.66611546", "0.66505843", "0.66320294", "0.6577881", "0.65135795", "0.651357...
0.0
-1
alterando a linguagem automatica do compilador para a desejada
public static void main(String[] args) { Locale.setDefault(Locale.US); //criando objeto do tipo Scanner que irá realizar a leitura padrão do teclado Scanner sc = new Scanner(System.in); //cria uma lista do tipo TaxPlayer recebendo um new ArrayList List<TaxPlayer> list = new ArrayList<>(); //solicita a informação de quantos contribuintes terão os dados lidos System.out.println("Enter the number of tax payers: "); //armazena a quantidade de contribuintes no atributo numberTaxPlayer int numberTaxPlayer = sc.nextInt(); //laço for para que ocorra um loop conforme a quantidade de contribuintes que foi informado for(int i=1; i<=numberTaxPlayer; i++) { System.out.println("\nTax payer #" + i + " data: "); //solicitando que informe se é pessoa física ou jurídica System.out.println("Individual or company (i/c)? "); //armazenando no atributo op o caracter que foi digitado pelo usuário char op = sc.next().charAt(0); //limpando o buffer sc.nextLine(); //solicita a informação do nome do contribuinte System.out.println("Name: "); //armazena o nome do contribuinte no atributo name String name = sc.nextLine(); //solicita a informação de quanto é a renda anual do contribuinte System.out.println("Anual income: "); //armazenando o valor da renda anual do contribuinte no atributo currentIncome double currentIncome = sc.nextDouble(); //verifica se foi informado que o contribuinte é pessoa física ou jurídica if(op == 'i') { //solicita o valor dos gatos com saúde que o contribuinte teve durante o ano System.out.println("Health expenditures: "); //armazena no atributo healthExpenses o valor dos gastos com saúde double healthExpenses = sc.nextDouble(); //adiciona na lista um new PhysicalPerson chamando o construtor da classe passando os dados do contribuinte como parâmetro list.add(new PhysicalPerson(name, currentIncome, healthExpenses)); } else if(op == 'c') { //solicita que o contribuinte informe quantos funcionários possui System.out.println("Number of employees: "); //armazena no atributo numberEmployees o número de funcionários int numberEmployees = sc.nextInt(); //adiciona na lista um new LegalPerson chamando o construtor da classe passando os dados do contribuinte como parâmetro list.add(new LegalPerson(name, currentIncome, numberEmployees)); } } //instanciando e inicializando atributo que irá armazenar a soma da arrecadação de imposto double totalTax = 0; //percorre cada posição na lista System.out.println("\nTAXES PAID: "); for(TaxPlayer x : list) { //printando ome do contribuinte e a taxa de imposto a ser paga pelo contribuinte System.out.println(x.getName() + ": $" + String.format("%.2f", x.tax())); //somando a taxa de imposto a ser paga por cada contribuinte totalTax += x.tax(); } //printando a arrecação total de imposto System.out.println("\nTOTAL TAXES: $" + String.format("%.2f", totalTax)); //encerrando o objeto do tipo scanner que permite a entrada de dados padrão do teclado sc.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void reestablecerComponentes()\n {\n tokenslist = new LinkedList<LineaToken>();\n tokenslistErrores = new LinkedList<LineaToken>();\n info_tabla_tokens.clear();\n info_tabla_errores.clear();\n ta_errores_sintacticos_id.clear();\n ta_errores_semanticos_id.clear()...
[ "0.6119323", "0.60384876", "0.60117126", "0.6002113", "0.59931725", "0.59666437", "0.5910644", "0.58546114", "0.5826451", "0.58119255", "0.5804374", "0.57891566", "0.5782238", "0.5771088", "0.57656854", "0.5765185", "0.5698224", "0.5645925", "0.56416124", "0.5640984", "0.5640...
0.0
-1
this method is called by asynchronous or synchronous client and adds response to queueToMemaslap
public void send(SocketChannel socket, byte[] data) { synchronized (this.changeKeyQueue) { // since we now have something to write we change // key for this channel to WRITE state this.changeKeyQueue .add(new ChangeKey(socket, SelectionKey.OP_WRITE)); synchronized (this.queueToMemaslap) { List<ByteBuffer> queue = (List<ByteBuffer>) this.queueToMemaslap .get(socket); if (queue == null) { queue = new ArrayList<ByteBuffer>(); this.queueToMemaslap.put(socket, queue); } queue.add(ByteBuffer.wrap(data)); } } // wakes up selector's blocking .select() method this.selector.wakeup(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void responseFail(){\n\t\tqueue.clear();\n\t}", "private void getData() {\n\n //Adding the method to the queue by calling the method getDataFromServer\n requestQueue.add(getDataFromServer(pos));\n\n }", "@Override\n public int getResponseQueueLength() {\n return 0;\n }", "publ...
[ "0.6402677", "0.6074872", "0.60125256", "0.6009841", "0.60006607", "0.5919973", "0.58714545", "0.5820607", "0.58156836", "0.58086884", "0.5806129", "0.5785281", "0.5777755", "0.57407737", "0.57388604", "0.5691357", "0.56819856", "0.56613225", "0.56613225", "0.5656594", "0.565...
0.0
-1
helper method accepts socketchannels and registers them with our selector
private void accept(SelectionKey key) throws IOException { ServerSocketChannel serverSocketChannel = (ServerSocketChannel) key .channel(); SocketChannel socketChannel = serverSocketChannel.accept(); // as usual, non blocking fashion here socketChannel.configureBlocking(false); // after registering, this socket channel goes to READ state // since we expect some request from it socketChannel.register(this.selector, SelectionKey.OP_READ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void registerSockets() {\n if (!registerQueue.isEmpty()) {\n SocketChannel chan;\n while ((chan = registerQueue.poll()) != null) {\n System.out.println(Thread.currentThread().getName() + \": registering a new socket\");\n try {\n ...
[ "0.65097684", "0.6421057", "0.602015", "0.58573467", "0.58445746", "0.5798804", "0.5788903", "0.57695997", "0.5761578", "0.56976", "0.56933486", "0.565152", "0.56159586", "0.5582227", "0.5567714", "0.5560144", "0.55555815", "0.5554785", "0.55370665", "0.55241156", "0.55010474...
0.5731044
9
Conectar ao banco de dados
public void connectToDb() { try { con = DriverManager.getConnection(url, user, password); } catch (SQLException ex) { JOptionPane.showMessageDialog(null, "Erro: " + ex.getMessage(), "Mensagem de Erro", JOptionPane.ERROR_MESSAGE); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void conectar_bd() throws SQLException, ClassNotFoundException {\n\t\t\n\t\tClass.forName(\"com.mysql.cj.jdbc.Driver\");\n\t\tconn = DriverManager.getConnection(url, user,pass);\n\n\t}", "public ConectarBD(String pNombreServidor, String pNumeroPuerto, String pNombreBD, String pUsuario, String pPassword) {...
[ "0.73236877", "0.71082073", "0.7099319", "0.70497787", "0.7012259", "0.6933867", "0.6911927", "0.6863526", "0.6841416", "0.6828152", "0.6741934", "0.67047995", "0.6651859", "0.6635213", "0.66235197", "0.65881515", "0.65135413", "0.6491387", "0.6435819", "0.6414965", "0.640762...
0.6130327
42
Reads 128 bytes of Id3V1 tag data.
public static byte[] readId3V1Data(File file) { final byte[] buffer = new byte[128]; try (RandomAccessFile mp3File = new RandomAccessFile(file, "r")) { mp3File.seek(mp3File.length() - 128); mp3File.read(buffer, 0, 128); } catch (FileNotFoundException e) { } catch (IOException e) { } return buffer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "com.google.protobuf.ByteString\n getField1283Bytes();", "com.google.protobuf.ByteString\n getField1281Bytes();", "com.google.protobuf.ByteString\n getField1128Bytes();", "com.google.protobuf.ByteString\n getField1323Bytes();", "com.google.protobuf.ByteString\n getField132...
[ "0.61828905", "0.6105163", "0.60774505", "0.5916089", "0.57804585", "0.5703642", "0.5666822", "0.560567", "0.5515033", "0.5429968", "0.54055774", "0.5393763", "0.5379272", "0.5369811", "0.53616434", "0.5323805", "0.53072625", "0.52976674", "0.5280638", "0.5279563", "0.524556"...
0.6890951
0
refresh table on refresh event
@Override public void onEventRaised(Event evt) { if (evt.equals(EventType.SLAVE_STATE_CHANGED)) { refreshSlaveTable(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void refreshTable() {\n data = getTableData();\n updateTable();\n }", "public void refresh() {\n calcDataInTable();\n fireTableDataChanged();\n\n}", "public void refreshTable() {\n\t\tmyTable.refreshTable();\n\t}", "public void refreshData() {\r\n\t\tfireTableDataChanged();\r\n\t...
[ "0.8391871", "0.83580077", "0.8244073", "0.80488396", "0.78698766", "0.77911794", "0.766687", "0.76434106", "0.75811356", "0.7386529", "0.7370868", "0.7320721", "0.7317911", "0.72794795", "0.7277001", "0.72448486", "0.7240147", "0.7200344", "0.71998334", "0.71651626", "0.7143...
0.0
-1
A rule for applicationspecific objects. Rule determines whether given object has correct data.
public interface Rule<T> { /** * Validate the supplied target object. * * @param regData the object that is to be validated (can be null) * @param errors contextual state about the validation process */ void validate(T regData, Errors errors); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean validCheckForObject(final AtlasObject object)\n {\n return object instanceof Edge\n // Make sure that the object has an iso_country_code\n && object.getTag(ISOCountryTag.KEY).isPresent()\n // Make sure that the edges are instances...
[ "0.6405629", "0.6312128", "0.6196425", "0.5967659", "0.5967012", "0.59502786", "0.594578", "0.594578", "0.594578", "0.594578", "0.594578", "0.594578", "0.594578", "0.5904973", "0.58956665", "0.5877121", "0.58612806", "0.5839447", "0.58134955", "0.57982856", "0.57766265", "0...
0.0
-1
Validate the supplied target object.
void validate(T regData, Errors errors);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void validate(Object target, Errors errors) {\n\t }", "@Override\n\tpublic void validate(Object target, Errors errors) {\n\t\t\n\t}", "@Override\n\tpublic void validate(Object target, Errors errors) {\n\t\t\n\t\t\n\t}", "public void validate(Object target, Errors errors) {\n\t\tInvoiceDTO invoiceDT...
[ "0.7403877", "0.73158455", "0.72946876", "0.67275214", "0.6644854", "0.663728", "0.6534916", "0.647433", "0.63166475", "0.627885", "0.62506545", "0.6238298", "0.6200014", "0.61723524", "0.60628", "0.6003592", "0.6003592", "0.6003592", "0.59952486", "0.5988793", "0.59393305", ...
0.0
-1
Description : Action Performed by Assign button.
public final void actionPerformed(final ActionEvent actionEvent) { ViewEditDescriptionListener.LOGGER.info("Enter ViewEditDescriptionListener:actionPerformed()"); String priorityCode = null; DcsMessagePanelHandler.clearAllMessages(); if (controller.getDefaultSPFilterTablePanel() != null && controller.getDefaultSPFilterTablePanel().getTable() != null) { final int selectedRowCount = controller.getDefaultSPFilterTablePanel().getTable().getSelectedRowCount(); if (selectedRowCount == 1) { final int selectedRow = controller.getDefaultSPFilterTablePanel().getTable().getSelectedRow(); if (controller.getDefaultSPFilterTablePanel().getTable().getValueAt(selectedRow, 2) != null) { priorityCode = controller.getDefaultSPFilterTablePanel().getTable().getValueAt(selectedRow, 2) .toString(); } final DefaultTableModel dm = (DefaultTableModel) controller.getDefaultSPFilterTablePanel().getModel(); JFrame parentFrame = NGAFParentFrameUtil.getParentFrame().getNGAFParentFrame(); final StandbyPriorityUtil standbyPriorityUtil = new StandbyPriorityUtil(parentFrame, dm.getValueAt(selectedRow, THREE).toString(), priorityCode, controller, selectedRow); //if (standbyPriorityUtil != null) { ViewEditDescriptionListener.LOGGER.info("ViewEditDescriptionListener:actionPerformed()" + standbyPriorityUtil); //} } } ViewEditDescriptionListener.LOGGER.info("Exit ViewEditDescriptionListener:actionPerformed()"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void chooseOptionAssignToOnBulkActionsDropDown() {\n getLogger().info(\"Choose option: Assign to.\");\n clickElement(optionAssignTo, \"Assign To Option\");\n }", "void onSaveAssignmentClick(View view);", "public void chooseOptionAssignToAssigneeOnBulkActionsDropDownWithName(String assig...
[ "0.69966304", "0.64712566", "0.63446325", "0.6290253", "0.6285531", "0.6248528", "0.61783236", "0.61560076", "0.6097485", "0.60862625", "0.6079095", "0.6079095", "0.6060371", "0.6040255", "0.60331917", "0.6016987", "0.6005958", "0.60027885", "0.5977652", "0.59688354", "0.5965...
0.0
-1
Description : Get the 'controller' attribute value.
public final StandbyPriorityController getController() { return controller; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Controller getController() {\n\t\treturn this.controller;\n\t}", "public Controller getController() {\n\t\treturn this.controller;\n\t}", "public Controller getController() {\n\t\treturn controller;\n\t}", "public Controller getController() {\n\t\treturn controller;\n\t}", "public Controller getCont...
[ "0.73775405", "0.73775405", "0.73196405", "0.73196405", "0.7308155", "0.71600574", "0.71213436", "0.7109088", "0.6865914", "0.6770441", "0.6724184", "0.6700672", "0.6561611", "0.6406022", "0.6310537", "0.63030493", "0.6224041", "0.6220626", "0.6208185", "0.61449265", "0.60932...
0.6511735
13
Description : Set the 'controller' attribute value.
public final void setController(final StandbyPriorityController controllerParam) { controller = controllerParam; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setController(Controller controller);", "public void setController (Controller controller)\n {\n _controller = controller;\n }", "public void setController(Controller controller) {\n this.controller = controller;\n }", "public void setValue(IController controller){\n ...
[ "0.79600465", "0.7922843", "0.7885558", "0.7501773", "0.74382174", "0.7259206", "0.71584517", "0.7153405", "0.6924139", "0.6901849", "0.6741281", "0.66009295", "0.6466467", "0.6332204", "0.62375003", "0.62348986", "0.61240554", "0.61240554", "0.6117156", "0.6057175", "0.60281...
0.7029245
8
Description : Get the 'defaultSPFilterTablePanel' attribute value.
public final NGAFFilterTablePanel getDefaultSPFilterTablePanel() { return defaultSPFilterTablePanel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void setDefaultSPFilterTablePanel(final NGAFFilterTablePanel defaultSPFilterTablePanelParam) {\n defaultSPFilterTablePanel = defaultSPFilterTablePanelParam;\n }", "PreferenceDefaultValueAttribute getDefaultValue();", "public Object getDefault() {\n\t\treturn defaultField;\n\t}", "publi...
[ "0.5950458", "0.53840804", "0.5372022", "0.53372353", "0.5256772", "0.5237266", "0.5225091", "0.5225091", "0.52084666", "0.52084666", "0.52059776", "0.5205351", "0.51944447", "0.518079", "0.51659006", "0.5144753", "0.51386106", "0.51076394", "0.509492", "0.509113", "0.5085521...
0.76953167
0
Description : Set the 'defaultSPFilterTablePanel' attribute value.
public final void setDefaultSPFilterTablePanel(final NGAFFilterTablePanel defaultSPFilterTablePanelParam) { defaultSPFilterTablePanel = defaultSPFilterTablePanelParam; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final NGAFFilterTablePanel getDefaultSPFilterTablePanel() {\n return defaultSPFilterTablePanel;\n }", "protected void setToDefault(){\n\n\t}", "public final void mT__116() throws RecognitionException {\r\n try {\r\n int _type = T__116;\r\n int _channel = DEFAULT_TO...
[ "0.7211791", "0.5592308", "0.53840286", "0.53809875", "0.5378354", "0.53326213", "0.53194", "0.5214788", "0.51482886", "0.5140702", "0.51178575", "0.50939465", "0.5075222", "0.5071665", "0.5003198", "0.5000229", "0.49652818", "0.49468374", "0.49366194", "0.49264887", "0.48907...
0.8273584
0
Description : Get the 'defaultSPViewEditDescButton' attribute value.
public final JButton getDefaultSPViewEditDescButton() { return defaultSPViewEditDescButton; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void setDefaultSPViewEditDescButton(final JButton defaultSPViewEditDescButtonParam) {\n defaultSPViewEditDescButton = defaultSPViewEditDescButtonParam;\n }", "public IButton getEditButton() {\n return controls.getEditButton();\n }", "public Button getEditButton() {\n\t\treturn ...
[ "0.6693457", "0.6105222", "0.6067843", "0.57121146", "0.5661783", "0.5601606", "0.55296147", "0.55075234", "0.5472211", "0.5437027", "0.54045266", "0.5354981", "0.5354519", "0.5348953", "0.53438157", "0.5296485", "0.5287812", "0.52804965", "0.52685374", "0.5239995", "0.522689...
0.82616025
0
Description : Set the 'defaultSPViewEditDescButton' attribute value.
public final void setDefaultSPViewEditDescButton(final JButton defaultSPViewEditDescButtonParam) { defaultSPViewEditDescButton = defaultSPViewEditDescButtonParam; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final JButton getDefaultSPViewEditDescButton() {\n return defaultSPViewEditDescButton;\n }", "public void setActionDesc(String value) {\n setAttributeInternal(ACTIONDESC, value);\n }", "public void setEditButtonText(String text) {\n/*Generated! Do not modify!*/ replyDTO.getVa...
[ "0.7835184", "0.5840153", "0.5726045", "0.5651908", "0.56133074", "0.5568725", "0.53515184", "0.526226", "0.5221504", "0.513813", "0.5127814", "0.51102674", "0.5046645", "0.50455093", "0.5037742", "0.50360125", "0.5020217", "0.5020217", "0.5020217", "0.50158274", "0.50089", ...
0.8351383
0
replaceItAll(url, "url(\"%s\")", s > File.relative(this.file, s));
public void processFile() { Matcher m = css.matcher(html); html = m.replaceAll(matchResult -> { String location = File.relative(this.file, matchResult.group(1)); String stylesheet = File.readFrom(location); File loc = new File(location).getParentFile(); Matcher urlMatcher = url.matcher(stylesheet); stylesheet = urlMatcher.replaceAll(match -> { String s = "url(\"" + File.relative(loc, match.group(1)) + "\")"; return s.replaceAll("\\\\", "\\\\\\\\\\\\\\\\"); }); loc.close(); return String.format("<style type=\"text/css\">%n%s%n</style>", stylesheet); }); replaceItAll(js, "<script type=\"text/javascript\">%n%s%n</script>", s -> File.readFrom(file.getAbsolutePath() + "\\" + s)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String rewriteUrl(String originalUrl);", "public static URL adjustURL(URL resource) throws MalformedURLException {\n \t\tString urlStr = resource.getFile();\n \t\tif (urlStr.startsWith(\"file://\"))\n \t\t\turlStr.replaceFirst(\"file://localhost\", \"file://\");\n \t\telse\n \t\t\turlStr = \"file:///\" + urlStr;...
[ "0.59324956", "0.5605133", "0.55516213", "0.5466794", "0.5441346", "0.54286754", "0.54003507", "0.53601944", "0.53497875", "0.53436744", "0.530574", "0.5288503", "0.5277693", "0.5206141", "0.52019584", "0.5200159", "0.5194013", "0.5188496", "0.5187634", "0.51194215", "0.51172...
0.5091192
21
Default option evaluates to interacting with nothing Example of generating a default interactOption variable to print its optionText: import static java.lang.System.out;// import print method interactOption interact = new interactOption();// simply generate a new object as a interactOption variable out.println(interact.toString());// print interact Returns:"interact with the nothing"
public interactOption() { super(); optionType = "interact with the"; optionFocus = "nothing"; optionText = optionType + " " + optionFocus; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void initDefaultOptions()\r\n\t{\n\r\n\t\taddOption(HELP, true, \"show Arguments\");\r\n\t}", "@Override\n\tpublic IKeyword option() { return option; }", "private static void printOption(){\r\n System.out.println(\"Select option what you want to do\");\r\n System.out.println(\"Input plain(d...
[ "0.71557957", "0.644569", "0.6430241", "0.6354718", "0.62966466", "0.6193229", "0.6123248", "0.61024004", "0.60954756", "0.6091394", "0.6066501", "0.6065142", "0.60572344", "0.60567045", "0.60565627", "0.60315824", "0.6026951", "0.6003984", "0.5999573", "0.59734577", "0.59703...
0.7547323
0
Complex option that evaluates to interacting with an item Example of creating a complex interactOption that takes an item and printing its optionText: import static java.lang.System.out;// import print method item interact_item = new item("door");// create new item object interactOption interact = new interactOption(interact_item, "".toCharArray()); // create new interactOption (or use existing) out.println(interact_item.toString()); // print interact_item Returns:"interact with the door"
public interactOption(item interactItem, char... is) { super(); if(is == null) { // what do we do when we are given nothing? optionType = "interact with the"; } else if(new String(is).toLowerCase().contains("pickupable")) { isPickupable = true; optionType = "pick up the"; } else if(new String(is).toLowerCase().contains("unlockable")) { isUnlockable = true; optionType = "unlock the"; } else if(new String(is).toLowerCase().contains("movable")) { isMoveable = true; optionType = "move the"; } else if(new String(is).toLowerCase().contains("equipable")) { isEquipable = true; optionType = "equip the"; } else if(new String(is).toLowerCase().contains("consumable")) { isConsumable = true; optionType = "consume the"; } else if(new String(is).toLowerCase().contains("destroyable")) { isDestructable = true; optionType = "destroy the"; } else { // what do we do when we are given garbage? optionType = "interact with the"; } optionFocus = interactItem.itemName.toLowerCase(); optionText = (optionType + " " + optionFocus).toLowerCase(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interactOption()\n\t{\n\t\tsuper();\n\t\toptionType = \"interact with the\";\n\t\toptionFocus = \"nothing\";\n\t\toptionText = optionType + \" \" + optionFocus;\n\t}", "public String parseItemChoice() {\n\t\tSystem.out.println(\"What would you like to do?\");\n\t\tSystem.out.println(\"Equip/Unequip Weapon...
[ "0.73829603", "0.5989229", "0.5873538", "0.5855921", "0.58264935", "0.5808899", "0.5753036", "0.5729871", "0.5711424", "0.5704845", "0.5702619", "0.5624459", "0.5621464", "0.559644", "0.5521967", "0.54938996", "0.54863626", "0.54858947", "0.5485176", "0.54377383", "0.54340464...
0.78507304
0
System.out.println("SKKSammlungonline01: ExportcompileQuery: " + query);
protected String compileQuery(final String query, String result) throws IllegalArgumentException { if (query != null && ! query.isEmpty()) { final SelektQLErrorListener selektQLErrorListener = new SelektQLErrorListener(); SelektQLLexer lexer = new SelektQLLexer(CharStreams.fromString(query)); SelektQLParser parser = new SelektQLParser(new CommonTokenStream(lexer)); parser.removeErrorListeners(); parser.addErrorListener(selektQLErrorListener); result = selektQL2Solr.visit(parser.anfrage()); if (selektQLErrorListener.error) { throw new IllegalArgumentException("Fehler beim Kompilieren der Anfrage " + query); } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void export(UtilityDataExportQuery query) throws ApplicationException;", "String export(UserDataExportQuery query) throws ApplicationException;", "@Override\n\tvoid executeQuery(String query) {\n\t\tSystem.out.println(\"Mssql ==> \" + query);\n\t}", "private void dumpQuery(ByteArrayOutputStream out) {\n ...
[ "0.6284936", "0.62456906", "0.5924226", "0.5734656", "0.5500483", "0.543517", "0.54015034", "0.5379529", "0.5357076", "0.5325628", "0.53124523", "0.5297763", "0.5263535", "0.5259703", "0.519826", "0.51877135", "0.51814663", "0.51611274", "0.51410264", "0.51353306", "0.5095336...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { Book b1 = new Book(23,"The mads in heaven",200); Book b2 = new Book(25,"Island Treasury",300); Book b3 = new Book(27,"Watery heart",400); ArrayList<Book> al = new ArrayList<Book>(); al.add(b1); al.add(b2); al.add(b3); Iterator<Book> itr1 = al.iterator(); while(itr1.hasNext()) { Book book = itr1.next(); System.out.println("Book price is: "+book.price); System.out.println("Number of pages in the book are: "+book.pages); System.out.println("The book name is: "+book.name); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
set associations among components
public void initialize() { toolBar.setDrawingPanel(this.drawingPanel); //component initialize menuBar.initialize(); toolBar.initialize(); drawingPanel.initialize(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void loadAssociations() {\r\n\r\n\t\tif (immunization.getPatient() != null) {\r\n\t\t\tpatientAction.setInstance(getInstance().getPatient());\r\n\t\t}\r\n\r\n\t\tif (immunization.getVaccine() != null) {\r\n\t\t\tvaccineAction.setInstance(getInstance().getVaccine());\r\n\t\t}\r\n\r\n\t}", "public void load...
[ "0.6012501", "0.6005674", "0.5932906", "0.5912183", "0.5773998", "0.57739085", "0.5679285", "0.5557358", "0.5459247", "0.54147273", "0.5295682", "0.5294301", "0.5284931", "0.5276324", "0.5243031", "0.5233905", "0.52313054", "0.52090293", "0.5208224", "0.52052504", "0.5196333"...
0.0
-1
The main method used for running this filter from the commandline interface.
public static void main(String[] options) { runFilter(new Smear(), options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) throws FilterException, IOException, ParseException {\n cli.CLI(args);\n folderFileList.dumpLog();\n }", "public static void main(String[] args) {\n filter(\"blup\");\n }", "public static void main(String[] args) {\n \n AirFilterTes...
[ "0.73619616", "0.73005056", "0.7096515", "0.7086256", "0.70620203", "0.698797", "0.67601573", "0.6733378", "0.66946864", "0.66146463", "0.65990454", "0.65938336", "0.65934503", "0.6543142", "0.6539377", "0.652906", "0.652906", "0.6528944", "0.65209967", "0.65209967", "0.65209...
0.6844976
6
First display loading message before the actual loading begins
public boolean loadData(WebView webView) { Util.loadData(webView, getString(R.string.msg_loading)); final String content = getContentToDisplay(); if (this.acceptContentForDisplay(content)) { return loadData(webView, content, getContentType(), getContentCharset()); } final String urlString = getLinkToDisplay(); if (this.acceptLinkForDisplay(urlString)) { this.loadData(webView, urlString); return true; }else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showLoadingError() {\n showError(MESSAGE_LOADING_ERROR);\n }", "public void startLoading() {\r\n\t\tgetDisplay().setRowCount(0, true);\r\n\t\tlabel1.setHTML(\"\");\r\n\t\tlabel2.setHTML(\"\");\r\n\t}", "protected abstract String getLoadingMessage();", "private void showLoading()\n {\...
[ "0.77709883", "0.7620595", "0.744202", "0.7362248", "0.735517", "0.72525007", "0.7244462", "0.723992", "0.72287315", "0.7202797", "0.7197916", "0.71909237", "0.71501243", "0.71017605", "0.7020916", "0.7012197", "0.70024514", "0.6994614", "0.6993859", "0.6986069", "0.697766", ...
0.0
-1
Print Array as table
public static void printArray(int[][] Array) { for (int i = 0; i < Array.length; i++) { for (int j = 0; j < Array[0].length; j++) { System.out.print(Array[i][j] + " "); } System.out.println(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void print() {\n\t\tfor (int i = 0; i < TABLE_SIZE; i++) {\n\t\t\tSystem.out.print(\"|\");\n\t\t\tif (array[i] != null) {\n\t\t\t\tSystem.out.print(array[i].value);\n\t\t\t} else {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.print(\"|\\n\");\n\t}", "static public void printTable(in...
[ "0.7587899", "0.74897736", "0.74518204", "0.7423056", "0.7345924", "0.721138", "0.70988566", "0.7088655", "0.70815396", "0.7069916", "0.7033659", "0.70150954", "0.70027554", "0.6949972", "0.690191", "0.68828267", "0.6862406", "0.68606174", "0.6830613", "0.6824117", "0.6822367...
0.6330279
80
Constructor for getting a list of users
public User(String uid, String name, String gender, String language) { this.uid = uid; this.name = name; this.gender = gender; this.language = language; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public UserList()\n\t\t{\n\t\t\tusers = new ArrayList<User>();\n\t\t}", "java.util.List<com.heroiclabs.nakama.api.User> \n getUsersList();", "List<User> getUsers();", "List<User> getUsers();", "public List<User> getUserList();", "public List getAllUsers();", "public Users() {\r\n this.user ...
[ "0.7975282", "0.78667855", "0.77488196", "0.77488196", "0.76568735", "0.76463354", "0.7642394", "0.7624842", "0.76219356", "0.7594469", "0.7540112", "0.7500804", "0.7492807", "0.7484032", "0.74582106", "0.7441494", "0.7440688", "0.7433324", "0.73885465", "0.7362036", "0.73346...
0.0
-1
Constructor for getting a single user
public User(String timestamp, String uid, String name, String gender, String email, String phone, String dept, String grade, String language, String region, String role, String preferTags, String obtainedCredits) { this(uid, name, gender, language); this.timestamp = Long.parseLong(timestamp); this.email = email; this.phone = phone; this.dept = dept; this.grade = grade; this.region = region; this.role = role; this.preferTags = preferTags; this.obtainedCredits = Integer.parseInt(obtainedCredits); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "User getUser();", "User getUser();", "User getUser(Long id);", "User getUserById(int id);", "User getUserById(Long id);", "User getUserById(Long id);", "public User getUser();", "public User getUser() {\n SharedPreferences sharedPreferences = mCtx.getSharedPreferences(AppConfig.SHARED_PREF_NAM...
[ "0.7460397", "0.7460397", "0.7346968", "0.7326257", "0.7324196", "0.7324196", "0.7170446", "0.71619093", "0.7123584", "0.7107445", "0.70600754", "0.70463663", "0.70412594", "0.70070493", "0.6998015", "0.6985231", "0.6982364", "0.6980827", "0.6939838", "0.6921063", "0.6909731"...
0.0
-1
Constructor for creating a new user
public User(String uid, String name, String gender, String email, String phone, String dept, String grade, String language, String region, String role, String preferTags) { this.uid = uid; this.name = name; this.gender = gender; this.email = email; this.phone = phone; this.dept = dept; this.grade = grade; this.language = language; this.region = region; this.role = role; this.preferTags = preferTags; this.timestamp = System.currentTimeMillis(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public User() {\n this.id = 0;\n this.username = \"gfisher\";\n this.password = \"password\";\n this.email = \"email@gmail.com\";\n this.firstname = \"Gene\";\n this.lastname = \"Fisher\";\n this.type = new UserPermission(true, true, true, true);\n }", "public ...
[ "0.79651076", "0.77283144", "0.7706487", "0.76852256", "0.76744556", "0.76657736", "0.76593965", "0.765472", "0.7639423", "0.7614995", "0.7607484", "0.7605964", "0.75955886", "0.75822145", "0.7577316", "0.756541", "0.7564246", "0.7564246", "0.7564246", "0.7563916", "0.7554298...
0.0
-1
Created by Comfy on 12.03.2017.
public interface ClientDao { Long create(Client client); Client read(Long id); void update(Client client); void delete(Client client); List<Client> findAll(); }
{ "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}", "@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}", "public fina...
[ "0.5867644", "0.5759576", "0.57547265", "0.5704572", "0.56782734", "0.56782734", "0.56448823", "0.5593791", "0.5540666", "0.5511535", "0.55089736", "0.5463963", "0.54509133", "0.54509133", "0.54509133", "0.54509133", "0.54509133", "0.54509133", "0.544373", "0.54426324", "0.54...
0.0
-1
Wird beim Speichern aufgerufen.
private void handleStore() throws ApplicationException { try { getService().reload(); } catch (Exception e) { Logger.error("unable to restart scripting service",e); throw new ApplicationException(i18n.tr("Fehler beim Laden der Scripts: {0}",e.getMessage())); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "public void sendeSpielfeld();", "@Override\n\tpublic void einkaufen() {\n\t}", "public void Tyre() {\n\t\t\r\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "private void poe...
[ "0.6650016", "0.6348518", "0.63173634", "0.62198734", "0.6139625", "0.5978259", "0.59622043", "0.5956143", "0.5956143", "0.5956143", "0.595244", "0.5951498", "0.5936672", "0.5935243", "0.59302825", "0.5903024", "0.5865445", "0.5862473", "0.58508605", "0.5847225", "0.58391243"...
0.0
-1
Liefert die Liste der Scripts.
private TablePart getScripts() throws RemoteException { if (this.scripts != null) return this.scripts; this.scripts = new TablePart(this.getService().getScripts(),null); this.scripts.setMulti(false); this.scripts.setRememberColWidths(true); this.scripts.setRememberOrder(true); this.scripts.setSummary(false); this.scripts.addColumn(i18n.tr("Script-Datei"),"absolutePath"); this.scripts.setFormatter(new TableFormatter() { public void format(TableItem item) { if (item == null) return; File f = (File) item.getData(); if (!f.canRead() || !f.isFile() || !f.exists()) { item.setForeground(Color.ERROR.getSWTColor()); item.setText(f.getAbsolutePath() + " (" + i18n.tr("Datei nicht lesbar") + ")"); } else item.setForeground(Color.FOREGROUND.getSWTColor()); } }); ContextMenu menu = new ContextMenu(); menu.addItem(new ItemAdd()); menu.addItem(new ItemRemove()); this.scripts.setContextMenu(menu); return this.scripts; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Collection<Script> getScripts()\n\t{\n\t\treturn scripts.values();\n\t}", "private static File[] listScripts(File baseDir) {\n\n return baseDir.listFiles(new FilenameFilter() {\n @Override\n public boolean accept(File dir, String name) {\n boolean hasJsonFileExtension = \"json\".equals...
[ "0.67825073", "0.64109695", "0.64054835", "0.63114303", "0.6291961", "0.6192316", "0.60557604", "0.60324574", "0.595938", "0.5954726", "0.58094853", "0.57103384", "0.56614953", "0.56582683", "0.5642252", "0.5641984", "0.5626359", "0.5625459", "0.560591", "0.5515092", "0.55146...
0.63073057
4
Class DAO Created by yslabko on 07/02/2017.
public interface DAO<T> { boolean save(T t); T get(Serializable id); boolean update(T t); boolean delete(Serializable id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public OnibusDAO() {}", "public DescritoresDAO() {\n\t\t\n\t}", "private DAOOfferta() {\r\n\t\ttry {\r\n\t\t\tClass.forName(driverName);\r\n\r\n\t\t\tconn = getConnection(usr, pass);\r\n\r\n\t\t\tps = conn.prepareStatement(createQuery);\r\n\r\n\t\t\tps.executeUpdate();\r\n\t\t} catch (ClassNotFoundException e)...
[ "0.7900227", "0.75988007", "0.7548652", "0.7466714", "0.7398924", "0.73969024", "0.73567295", "0.7339949", "0.73070186", "0.72979397", "0.720664", "0.7166865", "0.7157461", "0.712254", "0.71006966", "0.7091543", "0.70833766", "0.7061994", "0.7060065", "0.7050846", "0.70420384...
0.0
-1
false for available and true for borrowed
public Video(String iD, String title, String genre, int rental_type, boolean rental_status) { super(); ID = iD; this.title = title; this.genre = genre; this.rental_type = rental_type; this.rental_status = rental_status; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean borrowed()\r\n\t{\n\t\treturn !(currentlyBorrowed == null);\r\n\t}", "Boolean isAvailable();", "public abstract boolean isAvailable();", "public abstract boolean isAvailable();", "private boolean checkiforiginal(int copynum) {\n boolean isAvailable = false;\n if (copynum == 0) ...
[ "0.73836887", "0.70678645", "0.69984347", "0.69984347", "0.695874", "0.6907187", "0.6907187", "0.6907187", "0.6907187", "0.68717843", "0.6720766", "0.66985315", "0.6682481", "0.6673287", "0.6662675", "0.663431", "0.66222453", "0.660629", "0.660629", "0.6578764", "0.6544855", ...
0.0
-1
Calcul du poids de cet equipement
public int totalEffetInventaire() { int limiteInventaire = 0; if (bonusForce >0) limiteInventaire+= bonusForce; if (bonusDefense >0) limiteInventaire+= bonusDefense; if (bonusVie >0) limiteInventaire+= bonusVie; if (bonusEsquive >0) limiteInventaire+= bonusEsquive; if (bonusInventaire >0) limiteInventaire+= bonusInventaire; return limiteInventaire*3/4; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double Poids () {return this.masse()*G/(this.r*this.r);}", "public double perimeter ()\r\n {\r\n return v1.distanceTo(v2)+v2.distanceTo(v3)+v3.distanceTo(v1);\r\n }", "public void calcPerimeter(){\n perimeter=side1+side2+side3;\n }", "public PVector cohesion (ArrayList<Boid> boids) ...
[ "0.739408", "0.6049267", "0.6018544", "0.5969417", "0.5896399", "0.58816004", "0.5881239", "0.5853827", "0.5848729", "0.5848729", "0.5848729", "0.5848729", "0.5830038", "0.57921463", "0.57664853", "0.5762468", "0.5761071", "0.5761001", "0.5760687", "0.57432777", "0.57199997",...
0.0
-1
Utilise par la methode parler de la console
public String toString() { return this.getNom() + formatbonus('f', bonusForce) + formatbonus('d', bonusDefense) + formatbonus('v', bonusVie) + formatbonus('e', bonusEsquive) + formatbonus('i', bonusInventaire) + ""; }
{ "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}", "public void parler() {\n\t System.out.println(this.formulerMonNom()); // appel d'une méthode de l'objet\n\t System.out.println(\"Je suis un animal et j'ai \" + t...
[ "0.6515877", "0.6213212", "0.59986734", "0.5950002", "0.59012985", "0.5869573", "0.5855107", "0.58531946", "0.58338666", "0.5786462", "0.57713926", "0.5754566", "0.5749135", "0.5734382", "0.5708082", "0.56981397", "0.5680404", "0.5680185", "0.56690866", "0.56269574", "0.56216...
0.0
-1
Perform the action. Any exceptions thrown and values returned are passed back to the caller.
public Object perform(MethodActionEvent event) throws Throwable;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void executeActionsIfError();", "public abstract boolean execute(ActionContext actionContext)\n throws Exception;", "public Object call() throws Exception {\n return this.call();\n }", "public void performAction(HandlerData actionInfo) throws ActionException;", "private Act...
[ "0.65545684", "0.6411654", "0.63602877", "0.6352042", "0.6239977", "0.6125695", "0.61129194", "0.6109233", "0.6081127", "0.60628074", "0.6043582", "0.5995687", "0.59854686", "0.59622604", "0.59601784", "0.5922259", "0.59043694", "0.5895129", "0.58869326", "0.58818334", "0.587...
0.5720153
52
create the control panels
public void peerConnected(final ServiceManager serviceManager) { serviceControlPanelsMap = ServiceControlPanelFactory.getInstance().createServiceControlPanelsMap(this, serviceManager); // refresh the state of the control panels refresh(); // notify listeners of the peer connection for (final ControlPanelManagerEventListener listener : controlPanelManagerEventListeners) { listener.handlePeerConnectedEvent(serviceControlPanelsMap); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addPanelControls() {\n\t\tlist_sort = new JComboBox<>(new String[] { \"MSSV\", \"HoTen\", \"NTNS\" });\r\n\t\tbtn_sapxep = new JButton(\"Sap xep\");\r\n\t\tbtn_them = new JButton(\"Them\");\r\n\t\tbtn_xoa = new JButton(\"Xoa\");\r\n\t\tbtn_save = new JButton(\"Save\");\r\n\t\tbtn_load = new JButton(\"L...
[ "0.79110086", "0.77585393", "0.76743025", "0.74962413", "0.74310374", "0.74290496", "0.7410206", "0.73417354", "0.7288716", "0.7268488", "0.7225393", "0.72169566", "0.72067434", "0.71620905", "0.7161701", "0.7160352", "0.71502036", "0.7132776", "0.71315354", "0.7115256", "0.7...
0.0
-1
Builds a new aggregator engine.
public CGImageAggregatorEngine(final Boolean aggregate, final DimensionPacker<Nut> packer, final SpriteProvider[] sp) { super(aggregate); spriteProviders = Arrays.copyOf(sp, sp.length); dimensionPacker = packer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Engine build() {\n this.extensions.add(new CoreExtension());\n \n // load extensions\n this.extensions.forEach(extension -> {\n this.renderers.putAll(extension.getRenderers());\n this.directives.putAll(extension.getDirectives());\n ...
[ "0.6126886", "0.60786855", "0.5982379", "0.58229667", "0.5675144", "0.56208336", "0.5426427", "0.53354883", "0.5292015", "0.5281686", "0.5213265", "0.5206873", "0.51996714", "0.5199045", "0.5177175", "0.5154047", "0.51050717", "0.5099855", "0.5098932", "0.50305814", "0.501440...
0.45895836
74
Initializes all sprite providers.
private void initSpriteProviders(final String name) { for (final SpriteProvider sp : spriteProviders) { sp.init(name); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void init() {\n\t\tloadSpritesheet();\n\t\tloadSounds();\n\t\tinitIntro();\n\t}", "protected void initSkins()\n {\n synchronized (this)\n {\n _skins = new HashMap<SkinMetadata, Skin>();\n }\n }", "public void initialize()\n {\n \t// Luodaan manager-luokat\n Effe...
[ "0.6803971", "0.6587246", "0.65534246", "0.65266484", "0.649941", "0.6473817", "0.6398072", "0.6340996", "0.6325436", "0.62381494", "0.62290794", "0.6219569", "0.6216598", "0.61839837", "0.61813605", "0.6172162", "0.61699426", "0.6167809", "0.6156747", "0.6151863", "0.6140003...
0.7732651
0
Adds the region to all sprite providers.
private void addRegionToSpriteProviders(final Region region, final String name) { for (final SpriteProvider sp : spriteProviders) { sp.addRegion(region, name); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addRegion(Region region);", "public void addRegions(Collection<GridRegion> regions) {\n if (this.regions == null) {\n this.regions = new ArrayList<GridRegion>();\n }\n this.regions.addAll(regions);\n }", "@Override\r\n public void addQueryRegion(QueryRegion region)\r\...
[ "0.6866656", "0.57936805", "0.5741619", "0.56321144", "0.5583295", "0.5543043", "0.5502471", "0.54201883", "0.5404874", "0.53475267", "0.5233902", "0.52208686", "0.5196816", "0.5185383", "0.5182418", "0.5168482", "0.51678914", "0.5123339", "0.5122462", "0.51057494", "0.509730...
0.80830646
0
Generates sprites from all sprite providers and add it to the given nut.
private Nut applySpriteProviders(final String url, final String heapId, final String suffix, final Nut n, final EngineRequest request) throws WuicException { if (spriteProviders.length == 0) { return n; } Nut retval = null; for (final SpriteProvider sp : spriteProviders) { Nut nut = sp.getSprite(url, heapId, suffix); final Engine chain = request.getChainFor(nut.getNutType()); if (chain != null) { /* * We perform request by skipping cache to not override cache entry with the given heap ID as key. * We also skip inspection because this is not necessary to detect references to this image */ final List<Nut> parsed = chain.parse(new EngineRequest(heapId, Arrays.asList(nut), request, EngineType.CACHE, EngineType.INSPECTOR)); if (retval != null) { n.addReferencedNut(parsed.get(0)); } else { retval = parsed.get(0); retval.addReferencedNut(n); } } else if (retval != null) { n.addReferencedNut(nut); } else { retval = nut; retval.addReferencedNut(n); } } return retval == null ? n : retval; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addAllSprites(String heroName) throws IOException {\n BufferedReader reader = new BufferedReader(\n new FileReader(\"assets/config/characters/\"+heroName+\"Sprites.txt\")\n );\n String line = reader.readLine();\n String[] data;\n BufferedImage[] sprites;\n while (line != null) {...
[ "0.632818", "0.61913615", "0.6152829", "0.6132313", "0.61276615", "0.60867786", "0.59300005", "0.5825741", "0.5800631", "0.573245", "0.5727253", "0.5652033", "0.5596321", "0.5545811", "0.5501724", "0.5482647", "0.54641026", "0.5457645", "0.5406823", "0.53740275", "0.5340185",...
0.6470199
0
Makes a transparent image of the given dimensions.
public static BufferedImage makeTransparentImage(final int width, final int height) { // Create an image with the given dimension final BufferedImage img = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); // Now filter the image to make all pixels transparent final ImageFilter filter = new TransparentImageFilter(); final ImageProducer ip = new FilteredImageSource(img.getSource(), filter); final Image image = Toolkit.getDefaultToolkit().createImage(ip); // Write the resulting image in the buffered image to return final BufferedImage bufferedImage = new BufferedImage(width, height, img.getType()); final Graphics graphics = bufferedImage.createGraphics(); graphics.drawImage(image, 0, 0, null); graphics.dispose(); return bufferedImage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static BufferedImage getTransparentBufferedImage(int width, int height) {\r\n\t\tBufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);\r\n\t\tGraphics2D g = image.createGraphics();\r\n\r\n\t\tg.setComposite(AlphaComposite.getInstance(AlphaComposite.CLEAR, 0.0f));\r\n\t\tg.fill...
[ "0.6460398", "0.60335165", "0.5789182", "0.57712656", "0.5762574", "0.5664089", "0.552975", "0.5431444", "0.5431031", "0.54075", "0.5208674", "0.51962197", "0.51896006", "0.5181766", "0.5156195", "0.511411", "0.5106646", "0.5087116", "0.5020757", "0.50203776", "0.5013884", ...
0.65757674
0
Packs the given nuts (which embed images) in the smallest area.
public Map<Region, Nut> pack(final List<Nut> nuts) throws WuicException { // Clear previous work dimensionPacker.clearElements(); // Load each image, read its dimension and add it to the packer with the ile as data for (final Nut nut : nuts) { InputStream is = null; try { is = nut.openStream(); final BufferedImage buff = ImageIO.read(is); dimensionPacker.addElement(new Dimension(buff.getWidth(), buff.getHeight()), nut); } catch (IOException ioe) { throw new StreamException(ioe); } finally { IOUtils.close(is); } } // Get the regions calculated by the packer ! return dimensionPacker.getRegions(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void doPack() {\n }", "public void doPack() {\n }", "public void doPack() {\n }", "public void doPack() {\n }", "public void doPack() {\n }", "public void doPack() {\n }", "public void removeAllPawns(){\n\n for (Map.Entry<Integer, ImageView> entry : actionButtons.entrySe...
[ "0.561596", "0.561596", "0.561596", "0.561596", "0.561596", "0.561596", "0.49332708", "0.48974562", "0.48960513", "0.48489982", "0.4844866", "0.48164603", "0.4806229", "0.47873554", "0.4780599", "0.4756697", "0.4714146", "0.46791023", "0.46678472", "0.46660212", "0.4651975", ...
0.6739833
0
Gets the dimension computed by the packer when defining a position for elements.
public Dimension getDimensionPack() { return dimensionPacker.getFilledArea(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final int getDimension() {\r\n\t\treturn this.dimension;\r\n\t}", "public int getCoordinateDimension() { \n return getPosition().getCoordinateDimension();\n }", "public int getDimension() {\n\t\treturn dimension;\n\t}", "public byte getDimension() {\n return this.dimension;\n ...
[ "0.709396", "0.7079637", "0.70525295", "0.686489", "0.686489", "0.6862124", "0.6790556", "0.6785022", "0.67361534", "0.6728961", "0.65977395", "0.6583402", "0.65771294", "0.65725183", "0.65471035", "0.65150315", "0.6485801", "0.6461715", "0.6453536", "0.64462", "0.64347535", ...
0.694
3
ASSERT & UTILS METHODS
private void assertEquivalentPair(Set<Pair> result, String s1, String s2) { Pair resultPair = filterResult(result, s1, s2); assertFalse(resultPair.isMarked()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Assert createAssert();", "private void assertAll() {\n\t\t\n\t}", "protected Assert() {\n\t}", "boolean assertExpected(Exception e);", "protected Assert() {\n }", "protected Assert() {\n }", "public void testInvalidNoType() { assertInvalid(\"a\"); }", "@VisibleForTesting\n @SuppressWarnings(\"...
[ "0.72970873", "0.7066146", "0.6869875", "0.6636982", "0.6569124", "0.6569124", "0.6516814", "0.64090705", "0.63687336", "0.6367756", "0.6342599", "0.6286197", "0.62621737", "0.6231814", "0.6231602", "0.6171396", "0.61150265", "0.6105485", "0.6098391", "0.6095648", "0.60833704...
0.0
-1
private static BukkitCommandManager commandManager;
@Override public void onEnable() { plugin = this; if(!getServer().getPluginManager().isPluginEnabled("BedWars1058")){ getLogger().severe("Unable to locate Bedwars1058."); getLogger().severe("Plugin will be disabled!"); getServer().getPluginManager().disablePlugin(this); return; }else{ bwAPI = Bukkit.getServicesManager().getRegistration(BedWars .class).getProvider(); bedwarsEnabled = true; } if(!getServer().getPluginManager().isPluginEnabled("Citizens")){ getLogger().severe("Citizens is missing shopkeeper won't be used!"); getServer().getPluginManager().disablePlugin(this); return; }else{ npcRegistry = CitizensAPI.getNPCRegistry(); citizensEnabled = true; getLogger().info("Hooked with Citizens for shopkeeper"); } /*commandManager = new BukkitCommandManager(this); if(commandManager == null){ getLogger().severe("Unable to intialize BukkitCommandManager."); getLogger().severe("Plugin will be disabled!"); getServer().getPluginManager().disablePlugin(this); return; }*/ fileUtils = new FileUtils(); configuration = new Configuration(); if(!configuration.createConfiguration(this)){ getLogger().severe("Unable to create configuration file."); getLogger().severe("Plugin will be disabled!"); getServer().getPluginManager().disablePlugin(this); return; } messages = new Messages(); if(!messages.generateMessages()){ getLogger().severe("Unable to create messages.yml file."); getLogger().severe("Plugin will be disabled!"); getServer().getPluginManager().disablePlugin(this); return; } cacheManager = new CacheManager(this); if(!cacheManager.buildCache()){ getLogger().severe("Unable to create cache file."); getLogger().severe("Plugin will be disabled!"); getServer().getPluginManager().disablePlugin(this); return; } scheduler = new WorkloadScheduler(); scheduler.intializeThread(); storage = new Storage(this,getConfiguration().isUsingMysql()); storage.build(); storage.tryConnection(); storage.createDatabase(); randomUtility = new RandomUtility(this); cosmeticManager = new CosmeticManager(); cosmeticManager.loadCosmetics(); playerManager = new PlayerCosmeticsManager(); registerListeners(); cooldownTasks = new Cooldowns(); cooldownTasks.runTaskTimerAsynchronously(this,100L,20L); registerCommands(); getLogger().info("------------------------------------------------"); getLogger().info("Enabled Plugin"); getLogger().info("------------------------------------------------"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CommandManager() {}", "public static BlackjackCommandManager getInstance() {\n return instance;\n }", "private void getGameCommands(){\n\n }", "public CommandManager getCommand() {\n\treturn command;\n }", "private CommandBrocker() {}", "public CommandManager getCommandManager() {\...
[ "0.7202538", "0.6649845", "0.65374464", "0.64781475", "0.6430673", "0.62819993", "0.627031", "0.6073448", "0.60680187", "0.6027997", "0.59596163", "0.5882489", "0.585643", "0.5854726", "0.58279175", "0.5819795", "0.5795246", "0.57392", "0.5728686", "0.57283556", "0.5727552", ...
0.5904823
11
Tests this surface for intersection with ray. If an intersection is found record is filled out with the information about the intersection and the method returns true. It returns false otherwise and the information in outRecord is not modified.
public boolean intersect(IntersectionRecord outRecord, Ray rayIn) { // TODO#A2: fill in this function. Vector3d d = rayIn.direction; Vector3d e = rayIn.origin; Vector3d c = (new Vector3d()).addMultiple(1, center); Vector3d ec = e.clone().sub(c); double dec = d.clone().dot(ec); double dd = d.clone().dot(d); double discr = Math.sqrt(Math.pow(dec, 2) - dd * (ec.clone().dot(ec) - Math.pow(radius, 2))); if (discr > 0) { double t1 = (-dec + discr) / dd; double t2 = (-dec - discr) / dd; if ((t1 > rayIn.start && t1 < rayIn.end) || (t2 > rayIn.start && t2 < rayIn.end)) { double t; if (t1 < t2) { if (t1 > rayIn.start) { t = t1; } else { t = t2; } } else { if (t2 > rayIn.start) { t = t2; } else { t = t1; } } Vector3d p = e.clone().add(d.clone().mul(t)); outRecord.location.set(p); outRecord.normal.set(p.clone().sub(c).div(radius).normalize()); double theta = Math.acos((p.z-c.z) / radius); double phi = Math.atan2(p.y-c.y, p.x-c.x); if (phi < 0) { phi += M_2PI; } double u = phi / M_2PI; double v = (Math.PI-theta) / Math.PI; outRecord.texCoords.set(u,v); outRecord.surface = this; outRecord.t = t; rayIn.end = t; return true; } return false; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean intersect(IntersectionRecord outRecord, Ray rayIn) {\n\t// TODO: Process rayIn so that it is in the same coordinates as the object.\n // This should be a single line.\n\trayIn = untransformRay(rayIn);\n Ray ray = rayIn;\n\n // Rename the common vectors so I don't have to type so much\n V...
[ "0.7776976", "0.71662384", "0.6743041", "0.6461552", "0.6424535", "0.6413974", "0.60946065", "0.5936005", "0.5908463", "0.5843089", "0.57791907", "0.5725554", "0.5644624", "0.56303376", "0.56106204", "0.5503396", "0.54470426", "0.5447004", "0.5446107", "0.5340148", "0.5337133...
0.75465846
1
Retrieve ECKey from active accounts list from manager perspective !important method. use in careful Can use this method as check if unlocked
@Override public ECKey getKey(final AionAddress _address) { Account acc = this.accounts.getIfPresent(_address); if (Optional.ofNullable(acc).isPresent()) { if (acc.getTimeout() >= Instant.now().getEpochSecond()) { return acc.getKey(); } else { this.accounts.invalidate(_address); } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private PrivateKey getUserKey() throws KeyChainException, InterruptedException {\n return KeyChain.getPrivateKey(getApplicationContext(), mCurrentProfile.getUserCertificateAlias());\n\n }", "public List<Key> getActiveKeys() {\n\t\tactiveKeys.clear();\n\t\t\n\t\tfor (Key key : keys) {\n\t\t\tif (key.get...
[ "0.60141474", "0.5960746", "0.57082665", "0.5702448", "0.5681528", "0.5645907", "0.5636118", "0.5543178", "0.5540521", "0.55109906", "0.5485195", "0.54243433", "0.54053813", "0.54033124", "0.53803223", "0.53650165", "0.53040063", "0.5289039", "0.5286068", "0.525598", "0.52195...
0.5406694
12
creating new product in background thread
@Override public void onClick(View view) { new AddInDatabase().execute(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\twhile(true) {\n\t\t\t\t\t\tProduct p = new Product(id, \"product\"+id++);\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\tc.addProduct(p);\n\t\t\t\t\t\t\tSystem.out.println(\"成产好了一个产品\");\n\t\t\t\t\t\t} catch (InterruptedException...
[ "0.75194657", "0.6464331", "0.6384558", "0.6275801", "0.6201357", "0.6198487", "0.6131159", "0.6120511", "0.60154665", "0.60154665", "0.5921911", "0.5789084", "0.5750271", "0.5741367", "0.57352716", "0.57272494", "0.57070935", "0.5706463", "0.56982374", "0.5688221", "0.568761...
0.0
-1
Before starting background thread Show Progress Dialog
@Override protected void onPreExecute() { super.onPreExecute(); pDialog = new ProgressDialog(MainActivity.this); pDialog.setMessage("Adding into the Database.."); pDialog.setIndeterminate(false); pDialog.setCancelable(true); pDialog.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void showProgress() {\n\t\twaitDialog(true);\n\t}", "@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tprogressDialog = new ProgressDialog(context);\n\t\t\t\t\t\t\tprogressDialog.setCancelable(true);\n\t\t\t\t\t\t\tprogressDialog.setMessage(context.getString(R.string.initialising_runt...
[ "0.78512526", "0.7774337", "0.7758762", "0.76871306", "0.76871306", "0.7604463", "0.7545033", "0.7539513", "0.7538019", "0.75282806", "0.74861383", "0.7477129", "0.747349", "0.74352926", "0.7418026", "0.7408039", "0.73935735", "0.7377503", "0.73673785", "0.7359571", "0.735264...
0.0
-1
After completing background task Dismiss the progress dialog
protected void onPostExecute(String file_url) { // dismiss the dialog once done pDialog.dismiss(); //Intent i = new Intent(getApplicationContext(), ShowDatabase.class); //startActivity(i); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\t\t protected void onPostExecute(Void result)\n\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tif (progressDialog != null)\n\t\t\t\t\t\t\t\t\t\t\tprogressDialog.dismiss();\n\t\t\t\t }", "@Override\n\t\t\t protected void onPostExecute(Voi...
[ "0.7633279", "0.7601489", "0.7586698", "0.754777", "0.7509033", "0.7509033", "0.7443056", "0.7425983", "0.73980045", "0.73965484", "0.7380501", "0.7345959", "0.7341082", "0.7321036", "0.7312464", "0.73121625", "0.73121625", "0.73121625", "0.72893476", "0.7242116", "0.7210768"...
0.0
-1
Create new photon object
@Test public void testArming() { Photon photon = new Photon(); // Verify that it's initial arming turn is 0. assertEquals(photon.getArmingTurn(), 0); // Set armingType to STANDARD assertTrue(photon.setStandard()); // Verify arming type is STANDARD assertEquals(photon.getArmingType(), WeaponArmingType.STANDARD); // First round of arming, with proper energy assertTrue(photon.arm(2)); // Second round of arming, improper energy. assertFalse(photon.arm(1)); // Second round of arming, proper energy. assertTrue(photon.arm(2)); // Verify that the weapon is armed. assertTrue(photon.isArmed()); // Try to arm an already armed weapon. assertTrue(photon.arm(2)); // Set arming to OVERLOAD, this is legal assertTrue(photon.setOverload()); // Set arming to PROXIMITY, this is NOT legal. assertFalse(photon.setProximity()); // Verify that the photons have been armed with 4 points of energy. assertEquals(photon.getArmingEnergy(), 6, 0.24); // Reset the photon photon.reset(); // Verify that default values are in place. assertEquals(photon.getArmingTurn(), 0); assertFalse(photon.isArmed()); assertEquals(photon.getArmingType(), WeaponArmingType.STANDARD); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Telefone() {\n\t}", "public Telefone() {\n\t\t\n\t}", "private Photon getStandardPhoton() {\n\t\tPhoton photon = new Photon();\n\t\tphoton.setStandard();\n\t\tphoton.arm(2);\n\t\tphoton.arm(2);\n\t\t\n\t\treturn photon;\n\t}", "public void create(){}", "P createP();", "public CMObject newInstance(...
[ "0.6316241", "0.6313885", "0.62887204", "0.5981348", "0.5979287", "0.5887644", "0.5823915", "0.58228683", "0.58096534", "0.5777001", "0.5755094", "0.5751886", "0.57429445", "0.57366747", "0.56563705", "0.5651768", "0.5625963", "0.56197923", "0.5619438", "0.561672", "0.5609904...
0.0
-1
Helpers to create test objects.s
private Photon getStandardPhoton() { Photon photon = new Photon(); photon.setStandard(); photon.arm(2); photon.arm(2); return photon; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\n\tprivate static void createTestData() {\n\t\t\n\t\tusers.put(\"User0\", objectHandler.createUser(25.0));\n\t\tusers.put(\"User1\", objectHandler.createUser(1.0));\n\t\t\n\t\tdocuments.put(\"Doc0\", objectHandler.createDocument(\"mydoc\", 25, '4', 'C'));\n\t\tdocuments.put(\"Doc1\...
[ "0.688235", "0.6825746", "0.667054", "0.6627714", "0.65513265", "0.654693", "0.65339875", "0.6533462", "0.65036607", "0.65008783", "0.6487296", "0.6469236", "0.6413299", "0.6396366", "0.63837415", "0.6378275", "0.6333035", "0.6331762", "0.6328913", "0.6324444", "0.6321486", ...
0.0
-1
3 Mins get data
public void listImage() { GlobalValue.listFlags = new ArrayList<Integer>(); GlobalValue.listFlags.add(R.drawable.icon_noname); GlobalValue.listFlags.add(R.drawable.icon_brazil); GlobalValue.listFlags.add(R.drawable.icon_croatia); GlobalValue.listFlags.add(R.drawable.icon_mexico); GlobalValue.listFlags.add(R.drawable.icon_cameroon); GlobalValue.listFlags.add(R.drawable.icon_spain); GlobalValue.listFlags.add(R.drawable.icon_netherland); GlobalValue.listFlags.add(R.drawable.icon_chile); GlobalValue.listFlags.add(R.drawable.icon_australia); GlobalValue.listFlags.add(R.drawable.icon_colombia); GlobalValue.listFlags.add(R.drawable.icon_ivory_coast); GlobalValue.listFlags.add(R.drawable.icon_japan); GlobalValue.listFlags.add(R.drawable.icon_greece); GlobalValue.listFlags.add(R.drawable.icon_uruguay); GlobalValue.listFlags.add(R.drawable.icon_costa_rica); GlobalValue.listFlags.add(R.drawable.icon_england); GlobalValue.listFlags.add(R.drawable.icon_italy); GlobalValue.listFlags.add(R.drawable.icon_switzerland); GlobalValue.listFlags.add(R.drawable.icon_ecuador); GlobalValue.listFlags.add(R.drawable.icon_honduras); GlobalValue.listFlags.add(R.drawable.icon_france); GlobalValue.listFlags.add(R.drawable.icon_argentina); GlobalValue.listFlags.add(R.drawable.icon_bosnia); GlobalValue.listFlags.add(R.drawable.icon_iran); GlobalValue.listFlags.add(R.drawable.icon_nigeria); GlobalValue.listFlags.add(R.drawable.icon_germany); GlobalValue.listFlags.add(R.drawable.icon_portugal); GlobalValue.listFlags.add(R.drawable.icon_ghana); GlobalValue.listFlags.add(R.drawable.icon_usa); GlobalValue.listFlags.add(R.drawable.icon_belgium); GlobalValue.listFlags.add(R.drawable.icon_algeria); GlobalValue.listFlags.add(R.drawable.icon_russia); GlobalValue.listFlags.add(R.drawable.icon_korea); GlobalValue.listFlags.add(R.drawable.icon_noname); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void readData()\n {\n while(System.currentTimeMillis() - start <= durationMillis)\n {\n counters.numRequested.incrementAndGet();\n readRate.acquire();\n\n if (state.get() == SimulationState.TEARING_DOWN)\n break;\n...
[ "0.60871655", "0.5584898", "0.5562326", "0.5556539", "0.5484961", "0.5475265", "0.5414007", "0.5352722", "0.5351182", "0.5327281", "0.53254247", "0.5312217", "0.5306206", "0.5268769", "0.52659255", "0.52439326", "0.5241424", "0.52356786", "0.522821", "0.5196441", "0.5194333",...
0.0
-1
Sends notification that sessions list has been changed
void refresh();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateList() {\r\n\t\ttry {\r\n\t \t// Reset the list\r\n\t\t\tsipSessions.clear();\r\n\t \t\r\n\t \t// Get list of pending sessions\r\n\t \tList<IBinder> sessions = sipApi.getSessions();\r\n\t\t\tfor (IBinder session : sessions) {\r\n\t\t\t\tISipSession sipSession = ISipSession.Stub.asInt...
[ "0.7194443", "0.6409199", "0.63930357", "0.63216794", "0.61103207", "0.6006437", "0.5937387", "0.5926885", "0.5906104", "0.5828698", "0.57051134", "0.5680141", "0.5672519", "0.5644449", "0.5633428", "0.5621355", "0.5616614", "0.5607102", "0.56053615", "0.5592581", "0.55867016...
0.0
-1
helper method for inflating Items
private Item fromResultSet(ResultSet resultSet) throws SQLException { String name = resultSet.getString("Name"); String description = resultSet.getString("Description"); int dollars = resultSet.getInt("PriceDollars"); int cents = resultSet.getInt("PriceCents"); Item i = new Item(name, description, dollars, cents); dao.setId(i, resultSet.getInt("id")); return i; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void loadItemsInternal();", "private void inflateViewForItem(Item item) {\n\n //Inflate Layout\n ItemCardBinding binding = ItemCardBinding.inflate(getLayoutInflater());\n\n //Bind Data\n binding.imageView.setImageBitmap(item.bitmap);\n binding.title.setText(i...
[ "0.6438743", "0.63780177", "0.6135953", "0.601791", "0.5975461", "0.5944945", "0.5943461", "0.5938794", "0.5931889", "0.58951145", "0.58838797", "0.58742213", "0.58669555", "0.58370394", "0.5829278", "0.58273804", "0.5816264", "0.58148855", "0.58031565", "0.5781412", "0.57728...
0.0
-1
created by wangguoqun at 20200909
public interface ApiService { @GET("charts/transactions-per-second") Observable<Chart> getChartsTransactionsPerSecond(@Query("timespan") String timespan, @Query("rollingAverage") String rollingAverage, @Query("start") String start, @Query("format") String format, @Query("sampled") String sampled); @GET("stats") Observable<Stat> getStats(); @GET("pools?timespan=5days") Observable<Pool> getPools(@Query("timespan") String timespan); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void cajas() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tprotected void getE...
[ "0.5665155", "0.5653438", "0.5569757", "0.54268885", "0.54268885", "0.5405123", "0.53897595", "0.53882194", "0.53718287", "0.5368093", "0.5361352", "0.5357104", "0.534039", "0.5328059", "0.53144795", "0.52822787", "0.5280831", "0.52769774", "0.52769774", "0.52769774", "0.5276...
0.0
-1
TODO Autogenerated method stub
public Customer getCustom(short customerId) { return custom.selectByPrimaryKey(customerId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.home, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.6862...
0.0
-1
The key for 'encrypting' and 'decrypting'.
public static String encrypt(String str) { StringBuilder sb = new StringBuilder(str); int lenStr = str.length(); int lenKey = key.length(); // // For each character in our string, encrypt it... for ( int i = 0, j = 0; i < lenStr; i++, j++ ) { if ( j >= lenKey ) j = 0; // Wrap 'round to beginning of key string. // // XOR the chars together. Must cast back to char to avoid compile error. // sb.setCharAt(i, (char)(str.charAt(i) ^ key.charAt(j))); } return sb.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getKey() {\t\t\n\t\treturn key;\n\t}", "String key();", "java.lang.String getClientKey();", "String getEncryptionKeyId();", "public java.lang.String getEncryptedKey() {\n\t\treturn encryptedKey;\n\t}", "public static String getKey(){\n\t\treturn key;\n\t}", "byte[] getKey();", "...
[ "0.7340818", "0.7224759", "0.7203441", "0.7158328", "0.7122794", "0.7060787", "0.7049455", "0.69703126", "0.69446176", "0.6938667", "0.68667746", "0.6863262", "0.6862627", "0.68301624", "0.68224806", "0.68224806", "0.6822251", "0.67744946", "0.67685026", "0.67685026", "0.6768...
0.0
-1
To 'decrypt' the string, simply apply the same technique.
public static String decrypt(String str) { return encrypt(str); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String Decrypt(String s);", "String decryptString(String toDecrypt) throws NoUserSelectedException, IllegalValueException;", "public String decrypt(String cipherText);", "public String decrypt(String text) {\n return content.decrypt(text);\n }", "public String decrypt(final String value) ...
[ "0.8165151", "0.7868436", "0.7625907", "0.7578922", "0.7492116", "0.7395459", "0.73206574", "0.72994536", "0.72828937", "0.7267953", "0.7262258", "0.7146017", "0.71298254", "0.71132135", "0.71091956", "0.7047304", "0.6963928", "0.69499004", "0.69447213", "0.69370127", "0.6907...
0.7654389
2
Tests that a rescaled job graph will be recovered with the latest parallelism.
@Test void testRescaledJobGraphsWillBeRecoveredCorrectly(@TempDir Path tmpFolder) throws Exception { final Configuration configuration = new Configuration(); final JobVertex jobVertex = new JobVertex("operator"); jobVertex.setParallelism(1); jobVertex.setInvokableClass(BlockingNoOpInvokable.class); final JobGraph jobGraph = JobGraphTestUtils.streamingJobGraph(jobVertex); final JobID jobId = jobGraph.getJobID(); // We need to have a restart strategy set, to prevent the job from failing during the first // cluster shutdown when TM disconnects. configuration.set(RestartStrategyOptions.RESTART_STRATEGY, "fixed-delay"); configuration.set( RestartStrategyOptions.RESTART_STRATEGY_FIXED_DELAY_ATTEMPTS, Integer.MAX_VALUE); configuration.set( RestartStrategyOptions.RESTART_STRATEGY_FIXED_DELAY_DELAY, Duration.ofMillis(100)); // The test is only supposed to pass with AdaptiveScheduler enabled. configuration.set(JobManagerOptions.SCHEDULER, JobManagerOptions.SchedulerType.Adaptive); // High-Availability settings. configuration.set(HighAvailabilityOptions.HA_MODE, "zookeeper"); configuration.set( HighAvailabilityOptions.HA_ZOOKEEPER_QUORUM, ZOOKEEPER_EXTENSION.getCustomExtension().getConnectString()); configuration.set( HighAvailabilityOptions.HA_STORAGE_PATH, tmpFolder.toFile().getAbsolutePath()); final MiniClusterConfiguration miniClusterConfiguration = new MiniClusterConfiguration.Builder() .setConfiguration(configuration) .setNumSlotsPerTaskManager(2) .build(); final RestClusterClient<?> restClusterClient = new RestClusterClient<>(configuration, "foobar"); final MiniCluster miniCluster = new MiniCluster(miniClusterConfiguration); miniCluster.start(); assertThatFuture(restClusterClient.submitJob(jobGraph)).eventuallySucceeds(); ClientUtils.waitUntilJobInitializationFinished( () -> restClusterClient.getJobStatus(jobId).get(), () -> restClusterClient.requestJobResult(jobId).get(), getClass().getClassLoader()); assertThatFuture( restClusterClient.updateJobResourceRequirements( jobGraph.getJobID(), JobResourceRequirements.newBuilder() .setParallelismForJobVertex(jobVertex.getID(), 1, 2) .build())) .eventuallySucceeds(); assertThatFuture(miniCluster.closeAsyncWithoutCleaningHighAvailabilityData()) .eventuallySucceeds(); LOG.info("Start second mini cluster to recover the persisted job."); try (final MiniCluster recoveredMiniCluster = new MiniCluster(miniClusterConfiguration)) { recoveredMiniCluster.start(); UpdateJobResourceRequirementsITCase.waitForRunningTasks(restClusterClient, jobId, 2); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 60000)\n public void testVariableOnlyUnboundedIteration() throws Exception {\n JobGraph jobGraph = createVariableOnlyJobGraph(4, 1000, true, 0, false, 1, false, result);\n miniCluster.submitJob(jobGraph);\n\n // Expected records is round * parallelism * numRecordsPerSource\n...
[ "0.5619637", "0.5588017", "0.55341494", "0.5506063", "0.54988146", "0.54282427", "0.5414323", "0.5392799", "0.5364062", "0.5320924", "0.52998835", "0.5247049", "0.52416164", "0.5229131", "0.5211162", "0.52034616", "0.5181864", "0.5180744", "0.5176536", "0.51710665", "0.516408...
0.7109994
0
Registration in DB using Bcrypt to hash password
@Override public boolean register(Client client) { boolean result = false; Connection con = null; try { con = connection; con.setAutoCommit(false); PreparedStatement st = con.prepareStatement(Sql.REGISTER); st.setString(1, client.getLogin()); String pass = BCrypt.hashpw(client.getPassword(), BCrypt.gensalt(5)); st.setString(2, pass); st.setString(3, client.getPassport()); result = st.executeUpdate() > 0; con.commit(); } catch (SQLException e) { try { con.rollback(); } catch (SQLException throwables) { throwables.printStackTrace(); } throw new RuntimeException("Such user exists"); } finally { try { con.close(); } catch (SQLException e) { e.printStackTrace(); } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void saveNewPassword(String userName, String hashedPassword) throws DatabaseException;", "String getUserPasswordHash();", "String hashPassword(String salt, String password);", "public void register(String firstname, String lastname, String username, String email, String password) {\n BasicDBObject que...
[ "0.74887556", "0.67977536", "0.66882145", "0.65483254", "0.6513112", "0.650338", "0.6466867", "0.6375645", "0.6371084", "0.63693345", "0.63537407", "0.6349329", "0.6341841", "0.6266689", "0.6260948", "0.62455845", "0.61843896", "0.61361897", "0.61296636", "0.6120623", "0.6106...
0.0
-1
Laods the package and any subpackages from their serialized form.
public void loadPackage() { if (isLoaded) return; isLoaded = true; URL url = getClass().getResource(packageFilename); if (url == null) { throw new RuntimeException("Missing serialized package: " + packageFilename); //$NON-NLS-1$ } URI uri = URI.createURI(url.toString()); Resource resource = new EcoreResourceFactoryImpl().createResource(uri); try { resource.load(null); } catch (IOException exception) { throw new WrappedException(exception); } initializeFromLoadedEPackage(this, (EPackage)resource.getContents().get(0)); createResource(eNS_URI); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void loadPackage() {\r\n\t\tif (isLoaded)\r\n\t\t\treturn;\r\n\t\tisLoaded = true;\r\n\r\n\t\tURL url = getClass().getResource(packageFilename);\r\n\t\tif (url == null) {\r\n\t\t\tthrow new RuntimeException(\"Missing serialized package: \"\r\n\t\t\t\t\t+ packageFilename);\r\n\t\t}\r\n\t\tURI uri = URI.creat...
[ "0.64967155", "0.580342", "0.5519164", "0.54122216", "0.5404828", "0.5373174", "0.5317327", "0.5305198", "0.52950555", "0.5282176", "0.5272292", "0.5238234", "0.5224819", "0.52147275", "0.5202584", "0.519504", "0.515839", "0.51510566", "0.5140952", "0.5119409", "0.5113272", ...
0.64281726
1
Fixes up the loaded package, to make it appear as if it had been programmatically built.
public void fixPackageContents() { if (isFixed) return; isFixed = true; fixEClassifiers(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void fixPackageContents() {\r\n\t\tif (isFixed)\r\n\t\t\treturn;\r\n\t\tisFixed = true;\r\n\t\tfixEClassifiers();\r\n\t}", "public void setPackage()\n {\n ensureLoaded();\n m_flags.setPackage();\n setModified(true);\n }", "public void reInit() {\n super.reInit();\n ...
[ "0.65852255", "0.6444489", "0.6040484", "0.5857668", "0.5849341", "0.58061737", "0.5756081", "0.5627248", "0.56000304", "0.55699694", "0.54398894", "0.54205894", "0.53884786", "0.53742886", "0.53638756", "0.5362362", "0.5349269", "0.53251296", "0.53132844", "0.5304208", "0.52...
0.6588945
2
Sets the instance class on the given classifier.
@Override protected void fixInstanceClass(EClassifier eClassifier) { if (eClassifier.getInstanceClassName() == null) { eClassifier.setInstanceClassName("net.certware.measurement.spm." + eClassifier.getName()); //$NON-NLS-1$ setGeneratedClassName(eClassifier); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setClassifier(Classifier classifier) {\n this.classifier = classifier;\n //setClassifier(classifier, false);\n }", "public void setClassifier(String classifier) {\n JodaBeanUtils.notNull(classifier, \"classifier\");\n this._classifier = classifier;\n }", "public void setClas...
[ "0.7151694", "0.70832676", "0.6633301", "0.61015534", "0.60874087", "0.59818214", "0.59287643", "0.5917114", "0.59113884", "0.5868016", "0.5854975", "0.57666105", "0.5732235", "0.5723707", "0.5711787", "0.5674829", "0.56745344", "0.56745094", "0.56504136", "0.56391233", "0.56...
0.54981947
24
Returns the time in seconds for which a traffic light will appear yellow when transitioning from green to red.
public int getYellowTime() { return yellowTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tInteger getGreenDuration() {\n\t\treturn null;\r\n\t}", "public void oneSecond() {\r\n int routeSize = connections.size();\r\n if (routeSize != 0) {\r\n // if the signal is green.\r\n if (connections.get(lightIndex).getTrafficLight().getSignal()\r\n ...
[ "0.649553", "0.6130722", "0.61159945", "0.58275586", "0.5802624", "0.579989", "0.5755468", "0.574475", "0.574168", "0.57391214", "0.5720327", "0.57129806", "0.5709713", "0.56734675", "0.5668747", "0.5657815", "0.5611202", "0.5602774", "0.55457354", "0.5539687", "0.55043024", ...
0.6967405
0
Sets a new duration of each greenyellow cycle. The current progress of the lights cycle should be reset, such that on the next call to oneSecond(), only one second of the new duration has been elapsed for the incoming route that currently has a green light.
public void setDuration(int duration) { this.duration = duration; if (connections.get(lightIndex).getTrafficLight().getSignal() == TrafficSignal.YELLOW) { connections.get(lightIndex).getTrafficLight().setSignal (TrafficSignal.GREEN); } currentGreenTime = 0; currentYellowTime = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void oneSecond() {\r\n int routeSize = connections.size();\r\n if (routeSize != 0) {\r\n // if the signal is green.\r\n if (connections.get(lightIndex).getTrafficLight().getSignal()\r\n == TrafficSignal.GREEN) {\r\n currentGreenTime ++;\r...
[ "0.68789065", "0.6251862", "0.6193803", "0.6095651", "0.60545045", "0.60044867", "0.5817775", "0.5777758", "0.5724908", "0.570429", "0.55759555", "0.54813975", "0.5472154", "0.54436797", "0.54185706", "0.5415404", "0.5399363", "0.5384344", "0.5366704", "0.5330834", "0.5282749...
0.71030885
0
Simulates one second passing and updates the state of this set of traffic lights. If enough time has passed such that a full greenyellow duration has elapsed, or such that the current green light should now be yellow, the appropriate light signals should be changed: When a traffic light signal has been green for 'duration yellowTime' seconds, it should be changed from green to yellow. When a traffic light signal has been yellow for 'yellowTime' seconds, it should be changed from yellow to red, and the next incoming route in the order passed to IntersectionLights(List, int, int) should be given a green light. If the end of the list of routes has been reached, simply wrap around to the start of the list and repeat. If no routes are connected to the intersection, the duration shall not elapse and the call should simply return without changing anything. Specified by: oneSecond in interface TimedItem
public void oneSecond() { int routeSize = connections.size(); if (routeSize != 0) { // if the signal is green. if (connections.get(lightIndex).getTrafficLight().getSignal() == TrafficSignal.GREEN) { currentGreenTime ++; if (currentGreenTime + yellowTime == duration) { connections.get(lightIndex).getTrafficLight().setSignal (TrafficSignal.YELLOW); currentGreenTime = 0; } } // if the signal is yellow. else if (connections.get(lightIndex).getTrafficLight().getSignal() == TrafficSignal.YELLOW) { currentYellowTime ++; if (currentYellowTime == yellowTime) { connections.get(lightIndex).getTrafficLight().setSignal (TrafficSignal.RED); currentYellowTime = 0; if(lightIndex == connections.size() - 1){ lightIndex = 0; } else { lightIndex ++; } connections.get(lightIndex).getTrafficLight().setSignal (TrafficSignal.GREEN); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void update() {\r\n\t\ttimePassed++; //increment time\r\n\t\t\r\n\t\tswitch(state) {\r\n\t\tcase GNS_REW:\r\n\t\t\tif (timePassed > greenNS) {\r\n\t\t\t\tstate = LightState.YNS_REW; // turn NS light yellow\r\n\t\t\t\ttimePassed = 0;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase YNS_REW:\r\n\t\t\tif (timePassed > y...
[ "0.5635591", "0.54417664", "0.53809375", "0.50810677", "0.50707203", "0.5058489", "0.49736598", "0.49482784", "0.4888992", "0.4853933", "0.4797921", "0.47493777", "0.47112536", "0.4704981", "0.47007114", "0.46878016", "0.46636194", "0.46359718", "0.46316528", "0.46091357", "0...
0.68240297
0
Returns the string representation of this set of IntersectionLights. The format to return is "duration:list,of,intersection,ids" where 'duration' is our current duration and 'list,of,intersection,ids' is a commaseparated list of the IDs of all intersections that have an incoming route to this set of traffic lights, in order given to IntersectionLights' constructor. For example, for a set of traffic lights with inbound routes from three intersections A, C and B in that order, and a duration of 8 seconds, return the string "8:A,C,B". Overrides: toString in class Object
@Override public String toString() { String intersectionName = ""; for (Route demo : connections) { intersectionName += demo.getFrom() + ","; } return duration + ":" + intersectionName.substring(0, intersectionName.length() - 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString(){\n\t\tString str = \"<Route: \";\n\t\tfor(int i=0; i<visits.size(); i++){\n\t\t\tVisit v = visits.get(i);\n\t\t\tstr += \"\\t\"+i+\": \"+ v +\"\\t\"+ \"At time: \"+arrivalTimes.get(i)+\"->\"+departureTimes.get(i);\n\t\t\tif(locked.get(i)) str += \" locked\";\n\t\t\tstr += \"\\n\";\n\t\t}\n...
[ "0.5547934", "0.55268663", "0.5503696", "0.54834026", "0.5370556", "0.5346164", "0.53377366", "0.5334334", "0.5314559", "0.5313853", "0.5309575", "0.5297174", "0.52879417", "0.52869964", "0.52854604", "0.5264267", "0.52466315", "0.5237727", "0.5237305", "0.523109", "0.5227150...
0.69322693
0
finds a project by its id and converts it to be shown
Project findProjectByIdAndConvert(String projectId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Project getById(Long id);", "Project findProjectById(String projectId);", "public Project findById(Integer id) {\n Session session = SessionManager.getSessionFactory().openSession();\n //The find method returns the object with the provided id\n Project project = session.find(Project.class,...
[ "0.7390189", "0.72120965", "0.7087121", "0.6978133", "0.69464236", "0.6934802", "0.682532", "0.6788877", "0.6744151", "0.6739416", "0.67323256", "0.6729181", "0.669957", "0.66973346", "0.6694768", "0.6651318", "0.6590329", "0.65872216", "0.6583449", "0.6566146", "0.656103", ...
0.721714
1
Find all projects of an account
List<Project> findProjectsOfAccount(String username);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Project> getAllProjects();", "@Override\n\tpublic List<ProjectInfo> findAllProject() {\n\t\treturn sqlSession.selectList(\"cn.sep.samp2.project.findAllProject\");\n\t}", "public List<Project> findAllProject() {\n\t\tProject project;\r\n\t\tList<Project> projectList = new ArrayList<Project>();\r\n\t...
[ "0.76084965", "0.7464551", "0.7295146", "0.71684664", "0.71267605", "0.6993173", "0.6928868", "0.6869236", "0.67640394", "0.67255753", "0.66967416", "0.6672548", "0.66517985", "0.66332805", "0.66245586", "0.66244817", "0.66063046", "0.6592131", "0.64627796", "0.6457172", "0.6...
0.8095603
0
Finds all project categories of an account
Set<String> findProjectCategoriesOfAccount(String username);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Project> findProjectsOfAccount(String username);", "public List<Cvcategory> findAllCvcategories();", "public List<Project> getAllProjects();", "public List<Categorie> getAllCategories();", "@Transactional(readOnly = true)\n public List<ProjectDTO> getProjectsAssignedToUser(String login) {\n ...
[ "0.6375852", "0.629413", "0.61481285", "0.6078704", "0.60652447", "0.5981344", "0.5954112", "0.5937277", "0.589934", "0.5896591", "0.5827604", "0.5811441", "0.58038557", "0.5789627", "0.57536626", "0.571935", "0.5689969", "0.56858665", "0.56726265", "0.566474", "0.5656552", ...
0.80274177
0
finds a project by its id
Project findProjectById(String projectId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Project findById(Integer id) {\n Session session = SessionManager.getSessionFactory().openSession();\n //The find method returns the object with the provided id\n Project project = session.find(Project.class, id);\n session.close();\n return project;\n }", "Project ge...
[ "0.8200786", "0.789806", "0.7512912", "0.74994636", "0.7447135", "0.74449885", "0.7401277", "0.7390366", "0.7365842", "0.7223551", "0.71809125", "0.7106798", "0.70904946", "0.70804024", "0.70802075", "0.6994488", "0.6920436", "0.68966335", "0.6867271", "0.68539035", "0.680548...
0.77861094
2
To solve this problem without a loop first idea comes to me to use Stream in Java 8 API but I think that it is also a subtype of loop and I am lazy to switch environment version to 8. So, instead of using loop, we always can replace it with Recurtion!
public static int getSumOfDigitsinInt(int val) { // if we have just on digit, stop it if (val < 10) { return val; } else { //we find the last digit in the int value, if 123, the last is 3 int theLastDigit = val % 10; //we find another part of int, to divide it, until we don't come to 1 digit int beforeTheLastDigit = val / 10; return theLastDigit + getSumOfDigitsinInt(beforeTheLastDigit); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static Stream<?> all(Iterator<Object> i) {\n requireNonNull(i);\n final Iterable<Object> it = () -> i;\n return StreamSupport.stream(it.spliterator(), false);\n }", "@Test\n public void streamApiTest(){\n Collection<Integer> myCollection=initializeIntCollection(3,5);\n\n...
[ "0.5849304", "0.56762105", "0.5462653", "0.53202146", "0.53010595", "0.5299101", "0.5255665", "0.5216695", "0.51905334", "0.5186407", "0.51787055", "0.51520747", "0.5150641", "0.51087105", "0.50883406", "0.5085601", "0.507664", "0.50708747", "0.5069025", "0.50550735", "0.5050...
0.0
-1
TODO Autogenerated method stub
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.getWriter().append("Served at: ").append(request.getContextPath()); }
{ "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
run your code here
@Override public void run() { welcome(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void run() {\n // The run method should be overridden by the subordinate class. Please\n // see the example applications provided for more details.\n }", "void run();", "void run();", "void run();", "void run();", "public static void run() {\n }", "public static void run(){}", ...
[ "0.69217724", "0.6828046", "0.6828046", "0.6828046", "0.6828046", "0.6804079", "0.676466", "0.6728249", "0.6694506", "0.66911227", "0.6680654", "0.66577697", "0.66577697", "0.6626904", "0.66032785", "0.66032785", "0.66032785", "0.6597371", "0.6549879", "0.6549879", "0.6548396...
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(DialogInterface paramDialogInterface, int paramInt) { }
{ "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
run your code here
@Override public void run() { finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void run() {\n // The run method should be overridden by the subordinate class. Please\n // see the example applications provided for more details.\n }", "void run();", "void run();", "void run();", "void run();", "public static void run() {\n }", "public static void run(){}", ...
[ "0.69217724", "0.6828046", "0.6828046", "0.6828046", "0.6828046", "0.6804079", "0.676466", "0.6728249", "0.6694506", "0.66911227", "0.6680654", "0.66577697", "0.66577697", "0.6626904", "0.66032785", "0.66032785", "0.66032785", "0.6597371", "0.6549879", "0.6549879", "0.6548396...
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.6862...
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(DialogInterface paramDialogInterface, int paramInt) { Intent myIntent = new Intent( Settings.ACTION_LOCATION_SOURCE_SETTINGS); context.startActivity(myIntent); //get gps }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(DialogInterface paramDialogInterface, int paramInt) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(DialogInterface paramDialogInterface, int paramInt) { Intent myIntent = new Intent( Settings.ACTION_WIFI_SETTINGS); context.startActivity(myIntent); //get gps }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(DialogInterface paramDialogInterface, int paramInt) { }
{ "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
All location settings are satisfied. The client can initialize location requests here. ...
@SuppressLint("MissingPermission") @Override public void onSuccess(LocationSettingsResponse locationSettingsResponse) { Toast.makeText(getBaseContext(), "All Location Settings are satisfied herer The client can initialize", Toast.LENGTH_SHORT).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void SetupLocationRequest()\n {\n mLocationRequest = LocationRequest.create()\n .setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY)\n .setInterval(30 * 1000) // 30 seconds, in milliseconds\n .setFastestInterval(1 * 1000); // 1 second, in mill...
[ "0.74942124", "0.7485335", "0.7467695", "0.731641", "0.7194058", "0.7184494", "0.694001", "0.69103974", "0.690913", "0.68922406", "0.6883672", "0.6882379", "0.6871662", "0.68107706", "0.6794371", "0.67674536", "0.67588556", "0.67304087", "0.6729495", "0.6727172", "0.6714737",...
0.64624923
48
Handles the Request Updates button and requests start of location updates.
public void requestLocationUpdates(View view) { Log.d(TAG, "requestLocationUpdates"); try { Log.i(TAG, "Starting location updates"); LocationRequestHelper.setRequesting(this, true); LocationServices.FusedLocationApi.requestLocationUpdates(mGoogleApiClient, mLocationRequest, getPendingIntent()); } catch (SecurityException e) { LocationRequestHelper.setRequesting(this, false); e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void startUpdatesButtonHandler() {\n if (!mRequestingLocationUpdates) {\n mRequestingLocationUpdates = true;\n // startLocationUpdates();\n }\n }", "public void startUpdatesButtonHandler() {\n if (!mRequestingLocationUpdates) {\n mRequestingLocation...
[ "0.80437785", "0.7995198", "0.7225287", "0.72134125", "0.70976245", "0.7075143", "0.69000494", "0.68054664", "0.6793523", "0.67396784", "0.6735202", "0.671261", "0.6639935", "0.6634797", "0.6627006", "0.66035247", "0.65167314", "0.6511761", "0.64830995", "0.64763224", "0.6462...
0.66959834
12
Handles the Remove Updates button, and requests removal of location updates.
public void removeLocationUpdates(View view) { Log.i(TAG, "Removing location updates"); LocationRequestHelper.setRequesting(this, false); LocationServices.FusedLocationApi.removeLocationUpdates(mGoogleApiClient, getPendingIntent()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void stopUpdatesButtonHandler() {\n if (mRequestingLocationUpdates) {\n mRequestingLocationUpdates = false;\n stopLocationUpdates();\n }\n }", "private void removeLocationUpdatesWithIntent() {\n mFusedLocationProviderClient.removeLocationUpdates(mLocationCallb...
[ "0.67908335", "0.66523945", "0.6131501", "0.6113677", "0.60736996", "0.60134697", "0.5995345", "0.5899558", "0.58894277", "0.5830847", "0.58167845", "0.5802714", "0.5787565", "0.5766662", "0.57123", "0.5687908", "0.56487864", "0.5591576", "0.5523533", "0.5501209", "0.5459397"...
0.6188122
2
Ensures that only one button is enabled at any time. The Start Updates button is enabled if the user is not requesting location updates. The Stop Updates button is enabled if the user is requesting location updates.
private void updateButtonsState(boolean requestingLocationUpdates) { Log.d(TAG, "updateButtonsState"); if (requestingLocationUpdates) { //mRequestUpdatesButton.setEnabled(false); //mRemoveUpdatesButton.setEnabled(true); } else { //mRequestUpdatesButton.setEnabled(true); //mRemoveUpdatesButton.setEnabled(false); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setButtonsEnabledState() {\n if (mRequestingLocationUpdates) {\n mStartUpdatesButton.setEnabled(false);\n mStopUpdatesButton.setEnabled(true);\n } else {\n mStartUpdatesButton.setEnabled(true);\n mStopUpdatesButton.setEnabled(false);\n }...
[ "0.8052438", "0.71693933", "0.70550174", "0.6959505", "0.67961323", "0.653465", "0.6484527", "0.6437664", "0.63854444", "0.63837403", "0.63362694", "0.6262048", "0.62345165", "0.6230254", "0.6217619", "0.6193373", "0.61887485", "0.61312425", "0.6123395", "0.6111363", "0.60756...
0.7393181
1
Toast.makeText(GeoFencingDemo.this, "permission denied", Toast.LENGTH_SHORT).show();
@Override public void onPermissionDenied() { Log.d(TAG, "onPermissionDenied() called"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkLocationPermission() {\n if(ContextCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED){\n if (ActivityCompat.shouldShowRequestPermissionRationale(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION)) {\n ...
[ "0.76204497", "0.76169586", "0.7578211", "0.7575545", "0.7571854", "0.75450766", "0.75305086", "0.7459609", "0.74573475", "0.74530786", "0.73989165", "0.7359245", "0.7352354", "0.7334625", "0.72901124", "0.7279255", "0.72715276", "0.7247353", "0.7245553", "0.7229531", "0.7200...
0.6835552
40