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
Open dialer with the phone no.
@OnClick({R.id.phone_img, R.id.phone}) void OnClickPhone() { Intent intent=new Intent(Intent.ACTION_DIAL); intent.setData(Uri.parse("tel:" + getString(R.string.here_comes_phone_no))); if (intent.resolveActivity(getPackageManager()) != null) { startActivity(intent); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void openDialerToCall(Context context, String mobileNo) {\n\n try {\n context.startActivity(\n new Intent(Intent.ACTION_DIAL).setData(Uri.parse(\"tel:\" + mobileNo))\n );\n } catch (Exception e) {e.printStackTrace();}\n }", "public void laun...
[ "0.79748523", "0.74929136", "0.7425354", "0.72173506", "0.7210906", "0.7207896", "0.71883637", "0.71882915", "0.7173648", "0.7163588", "0.7117316", "0.7064007", "0.7032679", "0.6968465", "0.6955609", "0.69198686", "0.68874264", "0.6884343", "0.6881269", "0.68685806", "0.68668...
0.70806146
11
Open the website in the browser
@OnClick({R.id.web_img, R.id.web}) void OnClickWeb() { Uri webpage=Uri.parse("http://" + getString(R.string.web)); Intent intentW=new Intent(Intent.ACTION_VIEW, webpage); if (intentW.resolveActivity(getPackageManager()) != null) { startActivity(intentW); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void openWebpage(String url) {\n try {\n new ProcessBuilder(\"x-www-browser\", url).start();\n } catch (IOException e) {\n log.error(e.getMessage(), e);\n }\n }", "public static void openBrowser()\n\t{\n\t\tdriver = DriverSetup.getWebDriver(ReadPropert...
[ "0.8112195", "0.79815274", "0.7610298", "0.76034355", "0.74160445", "0.7407445", "0.73864526", "0.7384789", "0.7238006", "0.720995", "0.71875256", "0.7172077", "0.7168124", "0.7082016", "0.70776975", "0.7077355", "0.7055647", "0.70087266", "0.6975378", "0.6962968", "0.6955818...
0.0
-1
An interface for a simple, singlethreaded game loop, which the user can implement and then plug into a game loop driver to create a working algo.
public interface GameLoop { /** * Callback for receiving the config data at the beginning of the game. Not all algos will have a reason * to process this. */ default void initialize(GameIO io, Config config) {} /** * Callback for processing an action frame data received between deploy phases. Not all algos will have a reason * to process this. This move builder is only used for random access to the map, and will not actually be * submitted. */ default void onActionFrame(GameIO io, GameState move) {} /** * Callback for configuring a movebuilder each action frame, which the game loop driver will then submit as * a turn. */ void onTurn(GameIO io, GameState move); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void loop();", "Loop createLoop();", "@Override\r\n\tpublic void gameLoopLogic(double time) {\n\r\n\t}", "public interface GameLaunchable extends Runnable {\n void start();\n void stop() throws InterruptedException;\n}", "public interface IGameLogic {\n /**\n * An object that i...
[ "0.7296387", "0.7225399", "0.7037185", "0.6537276", "0.6507579", "0.64749193", "0.6460475", "0.64038384", "0.63940716", "0.6364595", "0.6348972", "0.6338004", "0.6307689", "0.6297241", "0.62910175", "0.62900263", "0.62900263", "0.62900263", "0.62900263", "0.62115926", "0.6211...
0.7273695
1
Callback for receiving the config data at the beginning of the game. Not all algos will have a reason to process this.
default void initialize(GameIO io, Config config) {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initialConfig() {\n }", "@Override\r\n public void doUpdateConfig(GameConfig game)\r\n {\n \r\n }", "private void init() {\r\n this.configMapping = ChannelConfigHolder.getInstance().getConfigs();\r\n if (!isValid(this.configMapping)) {\r\n SystemExitHelpe...
[ "0.64319795", "0.62452066", "0.62241805", "0.61105955", "0.60976315", "0.608942", "0.6068034", "0.60589486", "0.591537", "0.5894547", "0.58897626", "0.58731127", "0.57612115", "0.57287556", "0.56740034", "0.5661497", "0.5654964", "0.5629273", "0.5607523", "0.560131", "0.55816...
0.53951854
40
Callback for processing an action frame data received between deploy phases. Not all algos will have a reason to process this. This move builder is only used for random access to the map, and will not actually be submitted.
default void onActionFrame(GameIO io, GameState move) {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "interface ActionPostprocessing {\n void run(\n Environment env,\n Action action,\n ActionMetadataHandler metadataHandler,\n Map<String, String> clientEnv)\n throws InterruptedException, ActionExecutionException;\n }", "public abstract void buildMoveData(HexagonalBoard board...
[ "0.5653281", "0.5371634", "0.5229416", "0.5173434", "0.51516736", "0.5144685", "0.51443154", "0.512051", "0.5027385", "0.5013486", "0.5006118", "0.4974303", "0.49578685", "0.49500465", "0.49165642", "0.49106938", "0.49066147", "0.4905725", "0.48931524", "0.48733792", "0.48672...
0.5360984
2
Callback for configuring a movebuilder each action frame, which the game loop driver will then submit as a turn.
void onTurn(GameIO io, GameState move);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void doAction()\n {\n if (app.getBuilderEditorPanel().getBoardViewPanel().getBoard().willPopulate())\n {\n app.getBuilderEditorPanel().getBoardViewPanel().getBoard().setPopulate(false);\n app.getBuilderEditorPanel().getBoardViewPanel().getBoard().resetBoard();\n ...
[ "0.5928877", "0.588604", "0.58854693", "0.5745338", "0.57085437", "0.56751865", "0.565012", "0.54529375", "0.5417122", "0.5410133", "0.5382236", "0.5356003", "0.5350999", "0.53404075", "0.5301518", "0.527457", "0.526473", "0.52616954", "0.5225632", "0.52020097", "0.5193906", ...
0.5256071
18
Handles the HTTP POST method.
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { processRequest(request, response); } catch (ParseException ex) { Logger.getLogger(experiencia_byadmin.class.getName()).log(Level.SEVERE, null, ex); } catch (ClassNotFoundException ex) { Logger.getLogger(experiencia_byadmin.class.getName()).log(Level.SEVERE, null, ex); } catch (SQLException ex) { Logger.getLogger(experiencia_byadmin.class.getName()).log(Level.SEVERE, null, ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void doPost(Request request, Response response) {\n\n\t}", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) {\n }", "public void doPost( )\n {\n \n }", "@Override\n public String getMethod() {\n return \"POST\";\n ...
[ "0.73289514", "0.71383566", "0.7116213", "0.7105215", "0.7100045", "0.70236707", "0.7016248", "0.6964149", "0.6889435", "0.6784954", "0.67733276", "0.67482096", "0.66677034", "0.6558593", "0.65582114", "0.6525548", "0.652552", "0.652552", "0.652552", "0.65229493", "0.6520197"...
0.0
-1
Returns a short description of the servlet.
@Override public String getServletInfo() { return "Short description"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getServletInfo()\n {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short d...
[ "0.87634975", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8699131", "0.8699131", "0.8699131", "0.8699131", "0.8699131", "0.8699131", "0.8531295", "0.8531295", "0.85282224", "0.85282224", ...
0.0
-1
print results to screen.
void responseReady(String response);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printToStdout() {\n\t\tfor (int i = 0; i < results.size(); i++) {\n\t\t\tSystem.out.println(results.get(i).toString());\n\t\t}\n\t}", "public void printResults() {\n getUtl().getOutput().add(\"~~ Results ~~\\n\");\n for (int i = 0; i < getHeroes().size(); i++) {\n if (getHero...
[ "0.795166", "0.7782109", "0.7639979", "0.75451934", "0.74958014", "0.74124503", "0.73625576", "0.7346216", "0.73224586", "0.72801596", "0.7202296", "0.7150772", "0.7135029", "0.70162654", "0.70012665", "0.69741255", "0.6955913", "0.6910218", "0.68969804", "0.6800453", "0.6760...
0.0
-1
Generar query lista MenuPersonalizado.
private Query generarQueryListaMenuPersonalizado(MenuPersonalizadoDTO menuPersonalizado, boolean esContador) { Map<String, Object> parametros = new HashMap<String, Object>(); StringBuilder jpaql = new StringBuilder(); if (esContador) { jpaql.append(" select count(o.idMenuPersonalizado) from MenuPersonalizado o where 1=1 "); } else { jpaql.append(" select o from MenuPersonalizado o left join fetch o.menu where 1=1 "); } jpaql.append(" and o.persona.idUsuario =:idUsuario "); parametros.put("idUsuario", menuPersonalizado.getId() + ""); if (!StringUtils.isNullOrEmpty(menuPersonalizado.getEstado())) { jpaql.append(" and upper(o.estado) = :estado "); parametros.put("estado", menuPersonalizado.getEstado().toUpperCase()); } if (!StringUtils.isNullOrEmpty(menuPersonalizado.getSearch())) { jpaql.append(" and upper(o.idMenuPersonalizado) like :search "); parametros.put("search", "%" + menuPersonalizado.getSearch().toUpperCase() + "%"); } else { if (!StringUtils.isNullOrEmpty(menuPersonalizado.getFechaCreacion())) { jpaql.append(" and o.fechaCreacion = :fechaCreacion "); parametros.put("fechaCreacion", menuPersonalizado.getFechaCreacion()); } if (!StringUtils.isNullOrEmpty(menuPersonalizado.getUsuarioCreacion())) { jpaql.append(" and upper(o.usuarioCreacion) like :usuarioCreacion "); parametros.put("usuarioCreacion", "%" + menuPersonalizado.getUsuarioCreacion().toUpperCase() + "%"); } } if (!esContador) { //jpaql.append(" ORDER BY 1 "); } Query query = createQuery(jpaql.toString(), parametros); return query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Menu> listarMenuPorUsuario(String nombre);", "public static String todosLosEmpleados(){\n String query=\"SELECT empleado.idEmpleado, persona.nombre, persona.apePaterno, persona.apeMaterno, empleado.codigo, empleado.fechaIngreso,persona.codigoPostal,persona.domicilio,\" +\n\"empleado.puesto, empleado....
[ "0.6696103", "0.6617838", "0.6431825", "0.6189559", "0.61770195", "0.6100091", "0.59833515", "0.5978663", "0.5944683", "0.59428054", "0.5911025", "0.5878885", "0.58567446", "0.58384454", "0.58377624", "0.58314353", "0.5814609", "0.5809629", "0.5776099", "0.5765099", "0.575790...
0.76194584
0
increase the number of task
public void increase() { synchronized (activity.getTaskTracker()) { activity.getTaskTracker().count++; Log.d(LOGTAG, "Incremented task count to " + count); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected synchronized void increaseThreadsNumber() {\r\n threadNumber++;\r\n }", "public void incrementLoopCounter() throws EndTaskException {\n\t\tgoToBeeperStock();\n\t\tpickBeeper();\n\t\tgoToLoopCounter();\n\t\tputBeeper();\n\t}", "public void incrementActiveRequests() \n {\n ++reque...
[ "0.68625426", "0.66880536", "0.6686076", "0.66679037", "0.6627137", "0.66237223", "0.66219336", "0.66219336", "0.6597339", "0.6591844", "0.656492", "0.65304565", "0.6517714", "0.64728487", "0.64719296", "0.643106", "0.6426455", "0.6405478", "0.6399787", "0.6382925", "0.637156...
0.80378383
0
decrease the number of task
public void decrease() { synchronized (activity.getTaskTracker()) { activity.getTaskTracker().count--; Log.d(LOGTAG, "Decremented task count to " + count); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected synchronized void decreaseThreadsNumber() {\r\n threadNumber--;\r\n }", "public void decrementWorkload() {\n workload--;\n }", "public void decrease(int number) {\r\n this.count -= number;\r\n }", "public void decrease(int number) {\r\n this.count -= number;\r\n ...
[ "0.6661809", "0.6588124", "0.6525253", "0.6525253", "0.6441865", "0.63615376", "0.6335173", "0.6322225", "0.6314337", "0.6314337", "0.6248678", "0.6227373", "0.6191153", "0.6179585", "0.6136798", "0.6104316", "0.6084766", "0.6082844", "0.60794467", "0.6060562", "0.6043436", ...
0.77625835
0
Display Welcome to Java! in a message dialog box
public static void main(String[] args) { javax.swing.JOptionPane.showMessageDialog(null, "WELCOME TO THE WORLD OF JIMUT", "J I M UT" , JOptionPane.INFORMATION_MESSAGE); JOptionPane.showMessageDialog(null, " WELCOME TO JAVA","PROGRAMMING IS FUN", JOptionPane.INFORMATION_MESSAGE); javax.swing.JOptionPane.showMessageDialog(null, " THANKYOU" , "JAVA PROGRAMMING" , JOptionPane.INFORMATION_MESSAGE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void displayWelcomeMessage() {\n\t\tSystem.out.println(\"Welcome to my program! :D\");\n\t\tSystem.out.println(\" Ryan Shupe \");\n\t\tSystem.out.println(\" CSCI 1250-004 Project 3 \");\n\t}", "public static void WelcomeMessage () {\n System.out.println(\"=======================...
[ "0.78132325", "0.7784454", "0.7645031", "0.75766593", "0.7484109", "0.73572683", "0.7354261", "0.73519135", "0.72700244", "0.7267873", "0.7211046", "0.7122849", "0.71034384", "0.70838666", "0.7082304", "0.70597166", "0.7018197", "0.69978905", "0.69910955", "0.69784975", "0.69...
0.73125136
8
Creates a new instance.
protected RecordStorageUnderTest(ContextSpec context, RecordStorage<I, M> delegate) { super(context, delegate); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Instance createInstance();", "public void create(){}", "public Instance() {\n }", "private Instantiation(){}", "private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}", "void create(T instance) throws IOException;", "public v...
[ "0.7834167", "0.72893584", "0.70771503", "0.7048765", "0.70209944", "0.6839274", "0.67782235", "0.6770133", "0.67429745", "0.6701039", "0.6690158", "0.6630354", "0.66046286", "0.6600776", "0.6600776", "0.6597608", "0.6592152", "0.6564594", "0.65268713", "0.652679", "0.6475239...
0.0
-1
get all the products.
@Transactional(readOnly = true) public Page<Product> findAll(Pageable pageable) { log.debug("Request to get all Products"); Page<Product> result = productRepository.findAll(pageable); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GetMapping(\"/getproduct\")\n\t\tpublic List<Product> getAllProduct() {\n\t\t\tlogger.info(\"products displayed\");\n\t\t\treturn productService.getAllProduct();\n\t\t}", "public List<Product> getAll() {\n\t\treturn productRepository.findAll();\n\n\t}", "public List<Product> getAllProducts() {\n List<P...
[ "0.8472166", "0.8451066", "0.8418244", "0.83969504", "0.83969504", "0.83969504", "0.834165", "0.8313802", "0.82892466", "0.82232577", "0.8222286", "0.8222286", "0.8088291", "0.80414057", "0.8033077", "0.8013738", "0.798654", "0.7979682", "0.79605997", "0.7929619", "0.7929166"...
0.0
-1
get one product by id.
@Transactional(readOnly = true) public Product findOne(Long id) { log.debug("Request to get Product : {}", id); Product product = productRepository.findOne(id); return product; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Product getProductByID(Long id);", "@RequestMapping(value = \"/api/products/{id}\", method = RequestMethod.GET)\n\tpublic Product getOneProduct(@PathVariable(\"id\") long id) {\n\t\treturn this.productRepo.findById(id).orElseThrow(() -> {\n\t\t\tthrow new ProductNotFoundException();\n\t\t});\n\t}", "@Override\...
[ "0.8661187", "0.8567409", "0.8411277", "0.84007126", "0.8376317", "0.8368829", "0.83685", "0.83074903", "0.8287234", "0.82559705", "0.8221771", "0.82201797", "0.82201797", "0.8180684", "0.81793183", "0.8155747", "0.81523615", "0.81462526", "0.8143861", "0.8127396", "0.8115622...
0.8186907
13
delete the product by id.
public void delete(Long id) { log.debug("Request to delete Product : {}", id); productRepository.delete(id); productSearchRepository.delete(id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void deleteProduct(Long id);", "void deleteProduct(Integer productId);", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Product : {}\", id);\n productRepository.delete(id);\n }", "public void deleteProductById(int id) {\n\t\tproductMapper.deleteProductById(id);...
[ "0.8984191", "0.8489463", "0.8445543", "0.8400395", "0.8250208", "0.81982934", "0.81902707", "0.8189647", "0.8187056", "0.8147831", "0.8146484", "0.8099546", "0.8009702", "0.7994015", "0.79493105", "0.7933875", "0.7916032", "0.7888595", "0.7813124", "0.7769736", "0.7751418", ...
0.8097577
12
search for the product corresponding to the query.
@Transactional(readOnly = true) public List<Product> search(String query) { log.debug("REST request to search Products for query {}", query); return StreamSupport .stream(productSearchRepository.search(queryStringQuery(query)).spliterator(), false) .collect(Collectors.toList()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void search(String product) {\n // ..\n }", "public List<Product> search(String searchString);", "public List<Product> getProductBySearchName(String search) {\r\n List<Product> list = new ArrayList<>();\r\n String query = \"select * from Trungnxhe141261_Product\\n \"\r\n ...
[ "0.8127969", "0.70553035", "0.70458186", "0.70177436", "0.6938994", "0.691641", "0.6883064", "0.6867899", "0.68334794", "0.67712563", "0.6713264", "0.66556054", "0.66535914", "0.6640523", "0.6633259", "0.66269296", "0.6617829", "0.6603958", "0.6509847", "0.6499069", "0.649461...
0.71152365
1
Created by kinger on 2016/11/24. ImageLoader
public interface IImageLoader { /** * 获取当前图片缓存的大小 * * @return */ long size(); /** * 清空所有的缓存 * * 注意 不要在主线程上执行 这样的耗时操作 */ void clear(); /** * ImageLoaderBuilder * * 默认是Application Context * * @return IImageLoaderBuilder */ IImageLoaderBuilder with(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ImageLoader() {}", "public interface ImageLoader {\n\n}", "public void imageLoader(File file)\n{\n float ratio;\n if (file == null)\n {\n return;\n } else\n {\n try\n {\n PImage img = loadImage(file.getAbsolutePath());\n //if(img.width < 300)\n //{\n // img.resize(300...
[ "0.78692", "0.723558", "0.72100765", "0.7071549", "0.68962103", "0.68459684", "0.6840876", "0.675348", "0.67269295", "0.6672837", "0.66249365", "0.65580106", "0.65303373", "0.6476692", "0.6449531", "0.64272237", "0.6412756", "0.64115375", "0.6360401", "0.63109326", "0.6307842...
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.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
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ...
[ "0.7904231", "0.78061396", "0.7767007", "0.77273244", "0.76318634", "0.7621818", "0.7585249", "0.7531511", "0.7488678", "0.74574006", "0.74574006", "0.7439257", "0.7421747", "0.7403457", "0.73920685", "0.7387285", "0.7379893", "0.73710734", "0.7363068", "0.73565257", "0.73461...
0.0
-1
TODO Autogenerated method stub
@Override public Set<ServerEndpointConfig> getEndpointConfigs(Set<Class<? extends Endpoint>> arg0) { Set<ServerEndpointConfig> result = new HashSet<>(); // if (arg0.contains(EchoEndpoint.class)) { // result.add(ServerEndpointConfig.Builder.create( // EchoEndpoint.class, // "/websocket/echoProgrammatic").build()); // } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Esta es la interfaz para la clase bitacora Contiene todos los metodos requeridos para la entidad bitacora
@Local public interface BitacoraFacadeLocal { void create(Bitacora bitacora); void edit(Bitacora bitacora); void remove(Bitacora bitacora); Bitacora find(Object id); List<Bitacora> findAll(); List<Bitacora> findRange(int[] range); int count(); public void registrarUsuario(DatosSolicitudPOJO solicitud); public List<DatosSolicitudPOJO> buscarUsuarioSinFechaFin(Integer idUsuario, ReportePOJO reporte,int cantidadDatos,int paginaActual); public List<DatosSolicitudPOJO> buscarUsuarioConFechaFin(Integer idUsuario, ReportePOJO reporte,int cantidadDatos,int paginaActual); public List<DatosSolicitudPOJO> buscarModuloSinFechaFin(Integer idModulo, ReportePOJO reporte,int cantidadDatos,int paginaActual); public List<DatosSolicitudPOJO> buscarModuloConFechaFin(Integer idModulo, ReportePOJO reporte,int cantidadDatos,int paginaActual); public List<DatosSolicitudPOJO> buscarActividadSinFechaFin(ReportePOJO reporte,int cantidadDatos,int paginaActual); public List<DatosSolicitudPOJO> buscarActividadConFechaFin(ReportePOJO reporte,int cantidadDatos,int paginaActual); public int buscarUsuarioSinFechaFinCantidad(Integer idUsuario, ReportePOJO reporte); public int buscarUsuarioConFechaFinCantidad(Integer idUsuario, ReportePOJO reporte); public int buscarModuloSinFechaFinCantidad(Integer idModulo, ReportePOJO reporte); public int buscarModuloConFechaFinCantidad(Integer idModulo, ReportePOJO reporte); public int buscarActividadSinFechaFinCantidad(ReportePOJO reporte); public int buscarActividadConFechaFinCantidad(ReportePOJO reporte); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean[] bitwiseChangeList();", "public List<BitOrarioOraLezione> get() {\n List<BitOrarioOraLezione> ris = new ArrayList<>();\n for (ArrayList<BitOrarioOraLezione>[] riga : orario) {\n if (riga != null)\n for (ArrayList<BitOrarioOraLezione> v : riga) {\n ...
[ "0.62116086", "0.6128203", "0.5994865", "0.5954635", "0.5934941", "0.5877568", "0.57970124", "0.5720353", "0.5661037", "0.5611592", "0.55743355", "0.55632484", "0.5531026", "0.55174947", "0.54878074", "0.5484855", "0.54642236", "0.5452572", "0.5448737", "0.5394482", "0.539402...
0.0
-1
Minimizing Permutations In this problem, you are given an integer N, and a permutation, P of the integers from 1 to N, denoted as (a_1, a_2, ..., a_N). You want to rearrange the elements of the permutation into increasing order, repeatedly making the following operation: Select a subportion of the permutation, (a_i, ..., a_j), and reverse its order. Your goal is to compute the minimum number of such operations required to return the permutation to increasing order. Signature int minOperations(int[] arr) Input Array arr is a permutation of all integers from 1 to N, N is between 1 and 8 Output An integer denoting the minimum number of operations required to arrange the permutation in increasing order Example If N = 3, and P = (3, 1, 2), we can do the following operations: Select (1, 2) and reverse it: P = (3, 2, 1). Select (3, 2, 1) and reverse it: P = (1, 2, 3). output = 2
private int[] swap(final int[] current, int i, int j) { int[] newStatus = current.clone(); newStatus[j] = current[i]; newStatus[i] = current[j]; return newStatus; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int minOperations(int[] arr) {\n // Write your code here\n Set<String> set = new HashSet<>();//store visited string\n Queue<String> queue = new LinkedList<>(); // store next strs\n int counter = 0;\n\n queue.offer(getKey(arr));\n set.add(getKey(arr));\n\n while (!qu...
[ "0.6703778", "0.6155233", "0.61536515", "0.5997973", "0.59398043", "0.5884734", "0.5865438", "0.58555514", "0.5854423", "0.5822545", "0.58047974", "0.5773248", "0.5745643", "0.57172346", "0.56818676", "0.56597805", "0.56432676", "0.5550722", "0.5548597", "0.5534642", "0.55059...
0.0
-1
Properties properties = new Properties(); properties.load(PropertiesUtl.class.getResourceAsStream("/config/url.properties")); String baseUrl = properties.getProperty("base_url"); String login_url = properties.getProperty("login_url"); System.out.println(baseUrl + login_url); System.out.println(urlProperties.get("base_url"));
public static void main(String[] args) throws IOException { System.out.println(getUrlByKey("登录页面")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void getConfigProperty() {\n Properties properties = new Properties();\n try(InputStream input = new FileInputStream(\"config.properties\");){\n properties.load(input);\n logger.info(\"BASE URL :\" + properties.getProperty(\"BASEURL\"));\n setBaseUrl(properties...
[ "0.7317437", "0.7112407", "0.68577063", "0.67607814", "0.66622335", "0.66300726", "0.66023844", "0.6576216", "0.6562153", "0.65434134", "0.6541914", "0.6510059", "0.650687", "0.6451056", "0.6401881", "0.6363811", "0.63078284", "0.6292699", "0.62860477", "0.62635934", "0.62599...
0.0
-1
add your code here if necessary
private void onCancel() { data.put("cerrado",true); dispose(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void additionalProcessing() {\n\t}", "@Override\r\n\tprotected void doPre() {\n\t\t\r\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n public void preRun() {\n super.preRun();\n }", "@Override\n public void settings() {\n // TODO Auto-generated method stub\n ...
[ "0.60416734", "0.59354484", "0.5863151", "0.58090276", "0.5746471", "0.56709766", "0.5664205", "0.56605375", "0.56430143", "0.5587466", "0.55589986", "0.549325", "0.5489072", "0.5486497", "0.54832125", "0.5477773", "0.54607296", "0.54506975", "0.5437963", "0.5436685", "0.5412...
0.0
-1
method overloading didn't know how to do this pickup p = new pickup(); System.out.println(p.pickup(10, 20)); System.out.println(p.pickup(10, 20, 30));
public int pickup(int x, int y) { return (x + y); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\tP92_Overloading_Sample obj=new P92_Overloading_Sample();\n\t\tSystem.out.println(obj.add());//30\n\t\tSystem.out.println(obj.add(500));//530\n\t\tSystem.out.println(obj.add(200, 300.9f));//500\n\t\tSystem.out.println(obj.add(55, 500));//555\n\t}", "public static void...
[ "0.5918984", "0.59072304", "0.56055933", "0.5591878", "0.5543476", "0.55415756", "0.55076504", "0.54874694", "0.5457753", "0.5454119", "0.5329003", "0.5324167", "0.52653337", "0.51983076", "0.5152586", "0.5101525", "0.5068037", "0.50390506", "0.5027678", "0.50068915", "0.4992...
0.483891
29
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof Schedule)) { return false; } Schedule other = (Schedule) object; if ((this.scheduleId == null && other.scheduleId != null) || (this.scheduleId != null && !this.scheduleId.equals(other.scheduleId))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void se...
[ "0.6896886", "0.6838461", "0.67056817", "0.66419715", "0.66419715", "0.6592331", "0.6579151", "0.6579151", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.65624106", "0.65624106", "0.65441847", "0.65243006", "0.65154546", "0.6487427", "0.64778...
0.0
-1
Solution: Find Inverse point, from right to left, where leftNum < rightNum. Time: O(n); Space: O(1);
public void nextPermutation(int[] nums) { // if only 1 num or less, no need to do anything. if (nums == null || nums.length <= 1) { return; } // inverse index, start with 2nd lastNum. int inverseIndex = nums.length - 2; // search for ip. Found / dir where leftNum < rightNum. while (inverseIndex >= 0 && nums[inverseIndex] >= nums[inverseIndex + 1]) { inverseIndex--; } // if found inversePoint, now find smallest # > IP# on right subarr. if (inverseIndex >= 0) { int minLargerIndex = inverseIndex + 1; for (int i = minLargerIndex; i < nums.length; i++) { // num > IP#, <= curMin. if == curMin, we want the rightmost smallest. if (nums[i] <= nums[minLargerIndex] && nums[i] > nums[inverseIndex]) { minLargerIndex = i; } } // swap Ip with smallest # > ip. int temp = nums[inverseIndex]; nums[inverseIndex] = nums[minLargerIndex]; nums[minLargerIndex] = temp; // reverse the right side to become smallest possible right subarr. // Ex: 2,(4,3,1) -> 2,1,3,4; reverse(nums, inverseIndex + 1, nums.length - 1); } else { // if no inversePoint, index= -1, Reverse all elms to return the smallest. reverse(nums, 0, nums.length - 1); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int equilibriumPoint(long arr[], int n) {\n long sum=0;\n for(int i=0;i<n;++i){\n sum+=arr[i];\n }\n long right=0;\n for(int i=n-1;i>=0;i--){\n if(right==sum-(arr[i]+right))\n return i+1;\n right+=arr[i];\n }\n ...
[ "0.57949555", "0.57258385", "0.5576845", "0.55695957", "0.55655766", "0.5506299", "0.5502615", "0.5494241", "0.5444403", "0.5359505", "0.53367144", "0.52823716", "0.5275764", "0.5271598", "0.52699035", "0.5268894", "0.5258103", "0.5256748", "0.52394766", "0.52337277", "0.5230...
0.59460634
0
/ Country country = new Country(); country.setId(167); Object obj = countryService.delete(country);
@Autowired /* private CountryService countryService; */ /** * * Method: save(Country country) * */ @Test public void test() throws Exception { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t public void deleteCountry(Country country){\n\t Session session = factory.openSession();\n\t Transaction tx = null;\n\t \n\t try {\n\t tx = session.beginTransaction();\n\t session.delete(country); \n\t tx.commit();\n\t } catch (HibernateException e) ...
[ "0.7510177", "0.72600454", "0.7216645", "0.7111873", "0.7111059", "0.7110586", "0.70983464", "0.7084395", "0.7027238", "0.7019851", "0.70175385", "0.7007473", "0.7001375", "0.6995708", "0.6985309", "0.69581985", "0.6932622", "0.6905756", "0.69010806", "0.6896224", "0.68933654...
0.0
-1
Created by wanglin on 2017/12/27.
public interface IUserService { /** * 返回所有的users * * @return */ List<User> getAllUsers(); /** * 通过id寻找User * * @param id * @return */ User getUserByID(Long id); /** * 更新用户 * * @param user * @return */ int updateUserByID(User user); /** * 通过id删除用户 * * @param id * @return */ int deleteUserByID(Long id); /** * 创建用户 * * @param user * @return */ int insertUser(User user); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r...
[ "0.613661", "0.6040674", "0.58769804", "0.5869019", "0.58345336", "0.58345336", "0.57700837", "0.57697254", "0.5728122", "0.5699341", "0.56787974", "0.5675349", "0.56654286", "0.56633925", "0.56415915", "0.56269175", "0.5623092", "0.5623092", "0.5623092", "0.5623092", "0.5623...
0.0
-1
the position we get in this callback can be used to reposition the map and change orientation.
@Override public void onPositionUpdated(GeoPosition loc) { loc.getCoordinate(); loc.getHeading(); loc.getSpeed(); //double time=navigationManager.getTta(Route.TrafficPenaltyMode.DISABLED,true); //getEta(loc.getCoordinate()); // also remaining time and distance can be // fetched from navigation manager navigationManager.getTta(Route.TrafficPenaltyMode.DISABLED, true); navigationManager.getDestinationDistance(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Point getLocation() {\n\t\treturn position;\n\t}", "@Override\n\tpublic void updatePosition() {\n\t\t\n\t}", "public void setMapPosition() {\n\t\txmap = levelState.getx();\n\t\tymap = levelState.gety();\n\t}", "private void updatePosition(){\n updateXPosition(true);\n update...
[ "0.6787633", "0.66350186", "0.6565258", "0.6554301", "0.6517045", "0.6445517", "0.64441884", "0.64441884", "0.64354026", "0.64317155", "0.6385442", "0.63566273", "0.6283861", "0.6254175", "0.62526774", "0.6232268", "0.6230731", "0.62265104", "0.6204142", "0.6204142", "0.61983...
0.0
-1
pause RoadView so that map will stop moving, the map marker will use updates from PositionManager callback to update its position.
private void pauseRoadView() { if (navigationManager.getMapUpdateMode().equals(NavigationManager.MapUpdateMode.ROADVIEW)) { navigationManager.setMapUpdateMode(NavigationManager.MapUpdateMode.NONE); navigationManager.getRoadView().removeListener(roadViewListener); m_lastZoomLevelInRoadViewMode = m_map.getZoomLevel(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void resumeRoadView() {\n m_map.setCenter(PositioningManager.getInstance().getPosition().getCoordinate(), Map\n .Animation.BOW, m_lastZoomLevelInRoadViewMode, Map.MOVE_PRESERVE_ORIENTATION,\n 80);\n // do not start RoadView and its listener until the map ...
[ "0.77711445", "0.6919644", "0.66627663", "0.66371244", "0.659862", "0.65800554", "0.65002376", "0.6462525", "0.6311374", "0.62869817", "0.6274079", "0.62296927", "0.6123943", "0.6120755", "0.6074643", "0.6065276", "0.6056538", "0.6056538", "0.6049551", "0.6041035", "0.602697"...
0.8026271
0
move map back to it's current position.
private void resumeRoadView() { m_map.setCenter(PositioningManager.getInstance().getPosition().getCoordinate(), Map .Animation.BOW, m_lastZoomLevelInRoadViewMode, Map.MOVE_PRESERVE_ORIENTATION, 80); // do not start RoadView and its listener until the map movement is complete. m_returningToRoadViewMode = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void move() {\n\n int move_position_x = 0;\n int move_postion_y = 0;\n Random random = new Random();\n do {\n\n move_position_x = 0;\n move_postion_y = 0;\n int direction = random.nextInt(6);\n switch (direction) {\n case...
[ "0.67822933", "0.6714764", "0.66265607", "0.66240007", "0.6599105", "0.6581571", "0.65096265", "0.64407784", "0.6217989", "0.6214181", "0.61001664", "0.6077999", "0.60471356", "0.6042498", "0.60415864", "0.60337484", "0.6017", "0.6002071", "0.5998691", "0.5975818", "0.5973574...
0.0
-1
an active RoadView provides coordinates that is the map transform center of it's movements.
@Override public void onPositionChanged(GeoCoordinate geoCoordinate) { m_mapTransformCenter = m_map.projectToPixel (geoCoordinate).getResult(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Point2D getCenterLatLon(){\n Point2D.Double result = new Point2D.Double();\n Point2D.Double screenCenter = new Point2D.Double();\n screenCenter.x = getWidth()/2; //contentpane width/height\n screenCenter.y = getHeight()/2;\n try{\n transform.inverseTransform(sc...
[ "0.6543002", "0.6335955", "0.62306845", "0.6198157", "0.6157449", "0.6085182", "0.60840213", "0.60668576", "0.6051415", "0.6051415", "0.5993567", "0.59916586", "0.59420055", "0.59385353", "0.5926781", "0.59172356", "0.5905875", "0.5904842", "0.5816063", "0.5777514", "0.576056...
0.5594868
44
do not start RoadView and its listener until moving map to current position has completed
@Override public void onMapTransformEnd(MapState mapsState) { if (m_returningToRoadViewMode) { navigationManager.setMapUpdateMode(NavigationManager.MapUpdateMode .ROADVIEW); navigationManager.getRoadView().addListener(new WeakReference<NavigationManager.RoadView.Listener>(roadViewListener)); m_returningToRoadViewMode = false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void resumeRoadView() {\n m_map.setCenter(PositioningManager.getInstance().getPosition().getCoordinate(), Map\n .Animation.BOW, m_lastZoomLevelInRoadViewMode, Map.MOVE_PRESERVE_ORIENTATION,\n 80);\n // do not start RoadView and its listener until the map ...
[ "0.7821601", "0.6889739", "0.6618531", "0.6603904", "0.6579208", "0.6544359", "0.6485406", "0.64611363", "0.6456748", "0.6456748", "0.639788", "0.6391164", "0.63844556", "0.63570327", "0.63550305", "0.6354713", "0.6329311", "0.6325998", "0.6304813", "0.6261824", "0.62435424",...
0.6898078
1
Convert the given object to string with each line indented by 4 spaces (except the first line).
private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String toIndentedString(Object object) {\n if (object == null) {\n return EndpointCentralConstants.NULL_STRING;\n }\n return object.toString().replace(EndpointCentralConstants.LINE_BREAK,\n EndpointCentralConstants.LINE_BREAK + EndpointCentralConstants.TAB_SPA...
[ "0.7885475", "0.75498515", "0.74975353", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", ...
0.0
-1
private static final Logger log = LoggerFactory.getLogger(BaseTest.class);
@BeforeAll static void setup() { log.info("@BeforeAll - executes once before all test methods in this class"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private HeaderBrandingTest()\n\t{\n\t\tBaseTest.classLogger = LoggerFactory.getLogger( HeaderBrandingTest.class );\n\t}", "@Test\r\n\tpublic void logTest() {\r\n\t\tlogger.info(\"Testando info\");\r\n\t\tlogger.debug(\"nao sera logado\" + \"Nice\");\r\n\t\tlogger.error(\"This is Error message\", new Exception(\"...
[ "0.7963138", "0.7439861", "0.73029464", "0.73006964", "0.7295751", "0.71552575", "0.6995828", "0.6918027", "0.69135195", "0.68956107", "0.68349105", "0.6811809", "0.6649311", "0.6640431", "0.6636996", "0.6632344", "0.65879774", "0.658288", "0.65166014", "0.6490926", "0.649014...
0.0
-1
Restrict for internal use only.
OidcLogoutEndpointConfigurer(ObjectPostProcessor<Object> objectPostProcessor) { super(objectPostProcessor); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected boolean func_70041_e_() { return false; }", "@Override\r\n public boolean isSafe() {\n return false;\r\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "public Boolean isProhibited() {\n throw new N...
[ "0.62748784", "0.6246249", "0.62350255", "0.62207144", "0.6105654", "0.60370773", "0.59540373", "0.59517485", "0.5921336", "0.58697325", "0.5864531", "0.5861483", "0.5830573", "0.5828353", "0.58143103", "0.58116925", "0.5793415", "0.5786996", "0.57717603", "0.575944", "0.5734...
0.0
-1
Interface for common HTTP header values.
public interface HttpHeaderValues { /** * {@code "keep-alive"}. */ String CONNECTION_KEEP_ALIVE = "keep-alive"; /** * {@code "Bearer"}. */ String AUTHORIZATION_PREFIX_BEARER = "Bearer"; /** * {@code "Basic"}. */ String AUTHORIZATION_PREFIX_BASIC = "Basic"; /** * @see <a href="https://tools.ietf.org/html/rfc7234#section-5.2.1.1">Rfc 7234 section-5.2.1.1</a> * @see <a href="https://tools.ietf.org/html/rfc7234#section-5.2.2.8">Rfc 7234 section-5.2.2.8</a> */ String CACHE_MAX_AGE = "max-age"; /** * @see <a href="https://tools.ietf.org/html/rfc7234#section-5.2.1.2">Rfc 7234 section-5.2.1.2</a> */ String CACHE_MAX_STALE = "max-stale"; /** * @see <a href="https://tools.ietf.org/html/rfc7234#section-5.2.1.3">Rfc 7234 section-5.2.1.3</a> */ String CACHE_MIN_FRESH = "min-fresh"; /** * @see <a href="https://tools.ietf.org/html/rfc7234#section-5.2.2.1">Rfc 7234 section-5.2.2.1</a> */ String CACHE_MUST_REVALIDATE = "must-revalidate"; /** * @see <a href="https://tools.ietf.org/html/rfc7234#section-5.2.1.4">Rfc 7234 section-5.2.1.4</a> * @see <a href="https://tools.ietf.org/html/rfc7234#section-5.2.2.2">Rfc 7234 section-5.2.2.2</a> */ String CACHE_NO_CACHE = "no-cache"; /** * @see <a href="https://tools.ietf.org/html/rfc7234#section-5.2.1.5">Rfc 7234 section-5.2.1.5</a> * @see <a href="https://tools.ietf.org/html/rfc7234#section-5.2.2.3">Rfc 7234 section-5.2.2.3</a> */ String CACHE_NO_STORE = "no-store"; /** * @see <a href="https://tools.ietf.org/html/rfc7234#section-5.2.1.6">Rfc 7234 section-5.2.1.6</a> * @see <a href="https://tools.ietf.org/html/rfc7234#section-5.2.2.4">Rfc 7234 section-5.2.2.4</a> */ String CACHE_NO_TRANSFORM = "no-transform"; /** * @see <a href="https://tools.ietf.org/html/rfc7234#section-5.2.1.7">Rfc 7234 section-5.2.1.7</a> */ String CACHE_ONLY_IF_CACHED = "only-if-cached"; /** * @see <a href="https://tools.ietf.org/html/rfc7234#section-5.2.2.6">Rfc 7234 section-5.2.2.6</a> */ String CACHE_PRIVATE = "private"; /** * @see <a href="https://tools.ietf.org/html/rfc7234#section-5.2.2.7">Rfc 7234 section-5.2.2.7</a> */ String CACHE_PROXY_REVALIDATE = "proxy-revalidate"; /** * @see <a href="https://tools.ietf.org/html/rfc7234#section-5.2.2.5">Rfc 7234 section-5.2.2.5</a> */ String CACHE_PUBLIC = "proxy-revalidate"; /** * @see <a href="https://tools.ietf.org/html/rfc7234#section-5.2.2.9">Rfc 7234 section-5.2.2.9</a> */ String CACHE_S_MAXAGE = "s-maxage"; /** * @see <a href="https://tools.ietf.org/html/rfc5861#section-4">RFC5861, Section 4</a> */ String CACHE_STALE_IF_ERROR = "stale-if-error"; /** * @see <a href="https://tools.ietf.org/html/rfc5861#section-3">RFC5861, Section 3</a> */ String CACHE_STALE_WHILE_REVALIDATE = "stale-while-revalidate"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract HttpHeaders headers();", "public interface HttpResponseHeaders {\n\n /**\n * Http status code\n */\n int statusCode();\n\n /**\n * all commons headers(exclude request line)\n */\n List<Header> headers();\n}", "HttpClientRequest header(CharSequence name, CharSequence ...
[ "0.7742193", "0.73443884", "0.7058832", "0.6801732", "0.6762314", "0.6731049", "0.65409386", "0.65333796", "0.6449186", "0.6426717", "0.64256763", "0.6380327", "0.6380056", "0.6330465", "0.63174826", "0.6309614", "0.6297904", "0.62927", "0.62890106", "0.628811", "0.62787616",...
0.7657849
1
final HandlerInput inputMock = Mockito.mock(HandlerInput.class); when(inputMock.matches(any())).thenReturn(true); no hobby saved yet
@Test public void testHandle() { Response response = TestHelp.testForHandle(handler, "eis essen", PhrasesAndConstants.ACTIVITY_SLOT, null); assertTrue(response.getOutputSpeech().toString().contains(PhrasesAndConstants.NO_ACTIVITIES_YET)); Map<String, Object> persistentAttributes = new HashMap<>(); persistentAttributes.put("zumba", "name: zumba; inside: true; minutes: 30"); // no hobby by that name response = TestHelp.testForHandle(handler, "billard", PhrasesAndConstants.ACTIVITY_SLOT, persistentAttributes); assertTrue(response.getOutputSpeech().toString().contains(PhrasesAndConstants.NO_HOBBY_BY_THAT_NAME)); // delete successful response = TestHelp.testForHandle(handler, "zumba", PhrasesAndConstants.ACTIVITY_SLOT, persistentAttributes); assertTrue(response.getOutputSpeech().toString().contains(String.format(PhrasesAndConstants.DELETED_SUCCESSFULL, "zumba"))); persistentAttributes.put("sport", "name: sport; inside: true; minutes: 30"); response = TestHelp.testForHandle(handler, "alle", PhrasesAndConstants.ACTIVITY_SLOT, persistentAttributes); assertTrue(response.getOutputSpeech().toString().contains(String.format(PhrasesAndConstants.DELETED_ALL_SUCCESSFULL, "alle"))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void happyFlow() throws Exception {\n RegisterHandler registerHandler = new RegisterHandler(service);\n RegistrationVerificationHandler verificationHandler = new RegistrationVerificationHandler(service);\n LoginHandler loginHandler = new LoginHandler(service);\n HttpHa...
[ "0.6164615", "0.6091216", "0.60676825", "0.6018101", "0.5913666", "0.58899343", "0.5829599", "0.5825556", "0.5823325", "0.5809644", "0.5803483", "0.58006525", "0.5769993", "0.57621837", "0.5752951", "0.5726394", "0.571462", "0.5650118", "0.56290776", "0.562001", "0.5602597", ...
0.6191227
0
Makes an encrypted token built with the user's name.
public String generateWebToken(Authentication authentication) { var userdetailsUser = (org.springframework.security.core.userdetails.User) authentication.getPrincipal(); return Jwts.builder() .setSubject(userdetailsUser.getUsername()) .setIssuedAt(new Date()) .setExpiration(new Date((new Date()).getTime() + jwtExpirationMs)) .signWith(SignatureAlgorithm.HS512, jwtSecret) .compact(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String createToken(User user);", "public String generateTokenForUser(String userName) {\n\t\tSession session = new Session();\n\t\tString token = session.getToken();\n\t\tsessionMap.put(userName, session);\n\t\t\n\t\treturn Base64.getEncoder().encodeToString(token.getBytes());\n\t}", "public static String crea...
[ "0.73697925", "0.7124842", "0.68479055", "0.6825044", "0.6771844", "0.67521864", "0.6718966", "0.6695009", "0.6633911", "0.65302193", "0.6494468", "0.6463562", "0.6461917", "0.6413505", "0.6401697", "0.6265596", "0.6235377", "0.62203336", "0.6215433", "0.6203633", "0.61870486...
0.5895477
37
Gets the user's name from the encrypted token.
public String getUserNameFromWebToken(String webToken) { return Jwts.parser().setSigningKey(jwtSecret).parseClaimsJws(webToken).getBody().getSubject(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getUsernameFromToken(String token);", "public String getUsernameFromToken() {\n\t\tHttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();\n\t\tfinal String requestTokenHeader = request.getHeader(AUTH);\n\t\tString jwtToken = requestTokenHeader.s...
[ "0.7843678", "0.750142", "0.7260019", "0.7260019", "0.7260019", "0.70490646", "0.70490646", "0.70490646", "0.70490646", "0.70490646", "0.70490646", "0.70490646", "0.70490646", "0.70490646", "0.70189965", "0.6982302", "0.6982302", "0.6973523", "0.69636106", "0.6960752", "0.696...
0.63572013
69
Tries parsing the encrypted token.
public boolean validateWebToken(String webToken) { try { Jwts.parser().setSigningKey(jwtSecret).parseClaimsJws(webToken); return true; } catch (SignatureException e) { logger.error("Invalid JWT signature: {}", e.getMessage()); } catch (MalformedJwtException e) { logger.error("Invalid JWT token: {}", e.getMessage()); } catch (ExpiredJwtException e) { logger.error("Expired JWT token: {}", e.getMessage()); } catch (UnsupportedJwtException e) { logger.error("Unsupported JWT token: {}", e.getMessage()); } catch (IllegalArgumentException e) { logger.error("Empty JWT token: {}", e.getMessage()); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private byte[] readToken() throws IOException, AuthenticationException {\n int status = conn.getResponseCode();\n if (status == HttpURLConnection.HTTP_OK || status == HttpURLConnection.HTTP_UNAUTHORIZED) {\n List<String> authHeaders = readHeaderField(conn, WWW_AUTHENTICATE);\n i...
[ "0.5860509", "0.5849209", "0.5613175", "0.54911894", "0.54911894", "0.54911894", "0.54911894", "0.54911894", "0.54911894", "0.5429164", "0.52813363", "0.525887", "0.5258385", "0.5258385", "0.5258385", "0.5258385", "0.5258385", "0.52391183", "0.52113444", "0.5195243", "0.51816...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { Double double1 = new Double(); St1 st1 = new St1(); St2 st2 = new St2(); for (int i = 0; i <= 4; i++) { st1.push(i); } for (int i = 5; i <= 9; i++) { st2.push(i); } for (int i : double1.n) { System.out.println(i); } }
{ "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.66713095", "0.6567948", "0.652319", "0.648097", "0.64770466", "0.64586824", "0.64132667", "0.6376419", "0.62759", "0.62545097", "0.62371093", "0.62237984", "0.6201738", "0.619477", "0.619477", "0.61924416", "0.61872935", "0.6173417", "0.613289", "0.6127952", "0.6080854", ...
0.0
-1
Constructor for a ClientAcceptor
public ClientAcceptor(ChatServer cs, ServerSocket ss){ listener = ss; this.chatServ = cs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Client() {}", "public Client() {\n }", "public Cliente() {\n }", "public Client(Client client) {\n\n }", "public Client() {\r\n\t// TODO Auto-generated constructor stub\r\n\t \r\n }", "public Cliente() {\n\t\tsuper();\n\t}", "public Client() {\n\t\t// TODO Auto-generated constructor ...
[ "0.67587453", "0.6736564", "0.6720816", "0.65842885", "0.65615255", "0.6554557", "0.63971525", "0.6291993", "0.62749505", "0.62730914", "0.6271909", "0.62387156", "0.62002283", "0.61987793", "0.6179287", "0.61784834", "0.61331326", "0.61157936", "0.60469615", "0.5987501", "0....
0.6749618
1
Called when this thread is run. Continuously accept new clients
public void run(){ while(true){ try { Socket s = listener.accept(); new ServerConnection(chatServ, s).start(); } catch (IOException e) { e.printStackTrace(); return; // stop listening } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile (true) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tSocket socket = serverSocket.accept();\n\t\t\t\t\t\tclients.add(new Client(socket));\n\t\t\t\t\t\tSystem.out.println(\"[클라이언트 접속] \" + socket.getRemoteSocketAddress() + \": \"\n\t\t\t\t\t\t\t\t+ Thread.currentThread().getNam...
[ "0.780866", "0.77555305", "0.74662244", "0.72880244", "0.7208748", "0.71944916", "0.71717334", "0.7166307", "0.7164611", "0.71056527", "0.70901924", "0.7054023", "0.7045502", "0.7037953", "0.700975", "0.7001192", "0.6929314", "0.69111687", "0.6895491", "0.689245", "0.688962",...
0.6767479
27
Test of modifyName method, of class FaceRecognizer1.
public void testModifyName() { FaceRecognizer1 fr1 = new FaceRecognizer1(); String name = "Hiran N"; String expResult = "Hiran_N"; String result = fr1.modifyName(name); assertEquals(expResult, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testChangeName() {\n System.out.println(\"changeName\");\n String expResult = \"Anu\";\n //String result = new changeName('Anu', \"Shar\");\n assertEquals(expResult, result);\n }", "private static String testSetName(String newName, Greeter greeter)\n {\n Strin...
[ "0.66584045", "0.65188205", "0.6500699", "0.64458305", "0.6429586", "0.64103967", "0.6401375", "0.6384338", "0.63788396", "0.6310907", "0.6292023", "0.62819165", "0.62384355", "0.6230545", "0.62197715", "0.62197715", "0.62197715", "0.6201322", "0.6178939", "0.6174928", "0.617...
0.88352704
0
Created by Administrator on 2016/11/22.
public interface IModelCart extends IModelBase { /** * 下载用户购物车信息 */ void downUserCart(Context context, String name, OkHttpUtils.OnCompleteListener<CartBean[]> listener); /** * 删除购物车信息 */ void deleteCart(Context context, int goodId, OkHttpUtils.OnCompleteListener<MessageBean> listener); /** * 添加购物车 */ void addCar(Context context, int goodId, String username, OkHttpUtils.OnCompleteListener<MessageBean> listener); void updateCar(Context context, int cartId, int count, OkHttpUtils.OnCompleteListener<MessageBean> listener); void downloadCollecCounts(Context context, String username, OkHttpUtils.OnCompleteListener<MessageBean> listener); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "@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\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Ov...
[ "0.6238377", "0.61387205", "0.606765", "0.6040741", "0.59706336", "0.59673774", "0.59360147", "0.58887434", "0.5872728", "0.5860985", "0.5860985", "0.58401155", "0.58401155", "0.5837944", "0.5822509", "0.5815355", "0.58125067", "0.57850677", "0.5767809", "0.5747848", "0.57217...
0.0
-1
JFormDesigner Component initialization DO NOT MODIFY //GENBEGIN:initComponents
private void initComponents() { JLabel label54 = new JLabel(); JLabel label68 = new JLabel(); JLabel label69 = new JLabel(); JLabel label10 = new JLabel(); JLabel label11 = new JLabel(); JLabel label72 = new JLabel(); JLabel label28 = new JLabel(); JLabel label29 = new JLabel(); JLabel label1 = new JLabel(); JLabel label37 = new JLabel(); JLabel label46 = new JLabel(); FlatTypographyTest.LinkLabel linkLabel9 = new FlatTypographyTest.LinkLabel(); FlatTypographyTest.LinkLabel linkLabel1 = new FlatTypographyTest.LinkLabel(); FlatTypographyTest.LinkLabel linkLabel2 = new FlatTypographyTest.LinkLabel(); FlatTypographyTest.LinkLabel linkLabel3 = new FlatTypographyTest.LinkLabel(); JLabel label2 = new JLabel(); FlatTypographyTest.LinkLabel linkLabel4 = new FlatTypographyTest.LinkLabel(); FlatTypographyTest.LinkLabel linkLabel10 = new FlatTypographyTest.LinkLabel(); FlatTypographyTest.LinkLabel linkLabel8 = new FlatTypographyTest.LinkLabel(); FlatTypographyTest.LinkLabel linkLabel11 = new FlatTypographyTest.LinkLabel(); FlatTypographyTest.LinkLabel linkLabel5 = new FlatTypographyTest.LinkLabel(); FlatTypographyTest.LinkLabel linkLabel6 = new FlatTypographyTest.LinkLabel(); FlatTypographyTest.LinkLabel linkLabel7 = new FlatTypographyTest.LinkLabel(); FlatTypographyTest.FontPreview fontPreview69 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview93 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview40 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview35 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview85 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview70 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview36 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview51 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview1 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview11 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview19 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview27 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview41 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview86 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview71 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview37 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview47 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview54 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview62 = new FlatTypographyTest.FontPreview(); JSeparator separator3 = new JSeparator(); FlatTypographyTest.FontPreview fontPreview2 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview12 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview20 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview28 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview42 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview87 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview72 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview38 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview48 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview55 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview63 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview3 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview13 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview21 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview29 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview43 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview88 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview73 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview79 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview49 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview57 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview64 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview4 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview14 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview22 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview30 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview89 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview74 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview80 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview50 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview58 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview65 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview5 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview15 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview23 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview31 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview44 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview81 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview56 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview66 = new FlatTypographyTest.FontPreview(); JSeparator separator1 = new JSeparator(); FlatTypographyTest.FontPreview fontPreview7 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview6 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview16 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview24 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview32 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview45 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview90 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview98 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview75 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview82 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview95 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview52 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview59 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview67 = new FlatTypographyTest.FontPreview(); JSeparator separator2 = new JSeparator(); FlatTypographyTest.FontPreview fontPreview8 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview17 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview25 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview39 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview91 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview76 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview83 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview96 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview9 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview18 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview26 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview33 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview46 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview92 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview77 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview84 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview97 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview53 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview60 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview68 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview10 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview34 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview78 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview94 = new FlatTypographyTest.FontPreview(); FlatTypographyTest.FontPreview fontPreview61 = new FlatTypographyTest.FontPreview(); //======== this ======== setLayout(new MigLayout( "ltr,insets dialog,hidemode 3", // columns "[left]unrel" + "[left]unrel" + "[left]unrel" + "[left]unrel" + "[left]unrel" + "[left]unrel" + "[left]unrel" + "[fill]unrel" + "[left]unrel" + "[left]unrel" + "[left]unrel", // rows "[top]" + "[bottom]" + "[bottom]" + "[bottom]" + "[bottom]" + "[]" + "[bottom]" + "[bottom]" + "[bottom]" + "[bottom]" + "[]" + "[bottom]" + "[]" + "[bottom]" + "[bottom]" + "[bottom]")); //---- label54 ---- label54.setText("<html>FlatLaf<br><small>Windows</small></html>"); label54.putClientProperty("FlatLaf.styleClass", "h1"); add(label54, "cell 0 0"); //---- label68 ---- label68.setText("<html>JetBrains<br><small>Windows</small></html>"); label68.putClientProperty("FlatLaf.styleClass", "h1"); add(label68, "cell 1 0"); //---- label69 ---- label69.setText("<html>JetBrains<br><small>macOS</small></html>"); label69.putClientProperty("FlatLaf.styleClass", "h1"); add(label69, "cell 2 0"); //---- label10 ---- label10.setText("macOS"); label10.putClientProperty("FlatLaf.styleClass", "h1"); add(label10, "cell 3 0"); //---- label11 ---- label11.setText("Windows 10/11"); label11.putClientProperty("FlatLaf.styleClass", "h1"); add(label11, "cell 4 0"); //---- label72 ---- label72.setText("<html>GitHub<br>Primer</html>"); label72.putClientProperty("FlatLaf.styleClass", "h1"); add(label72, "cell 5 0"); //---- label28 ---- label28.setText("Material"); label28.putClientProperty("FlatLaf.styleClass", "h1"); add(label28, "cell 6 0"); //---- label29 ---- label29.setText("Material 3"); label29.putClientProperty("FlatLaf.styleClass", "h1"); add(label29, "cell 7 0"); //---- label1 ---- label1.setText("SAP Fiori"); label1.putClientProperty("FlatLaf.styleClass", "h1"); add(label1, "cell 8 0"); //---- label37 ---- label37.setText("Atlassian"); label37.putClientProperty("FlatLaf.styleClass", "h1"); add(label37, "cell 9 0"); //---- label46 ---- label46.setText("Iris"); label46.putClientProperty("FlatLaf.styleClass", "h1"); add(label46, "cell 10 0"); //---- linkLabel9 ---- linkLabel9.setLink("https://www.formdev.com/flatlaf/typography/"); add(linkLabel9, "cell 0 1"); //---- linkLabel1 ---- linkLabel1.setLink("https://jetbrains.design/intellij/principles/typography/"); add(linkLabel1, "cell 1 1"); //---- linkLabel2 ---- linkLabel2.setLink("https://developer.apple.com/design/human-interface-guidelines/macos/visual-design/typography/"); add(linkLabel2, "cell 3 1"); //---- linkLabel3 ---- linkLabel3.setLink("https://docs.microsoft.com/en-us/windows/apps/design/style/typography#type-ramp"); add(linkLabel3, "cell 4 1"); //---- label2 ---- label2.setText("/"); add(label2, "cell 4 1"); //---- linkLabel4 ---- linkLabel4.setLink("https://docs.microsoft.com/en-us/windows/apps/design/signature-experiences/typography#type-ramp"); add(linkLabel4, "cell 4 1"); //---- linkLabel10 ---- linkLabel10.setLink("https://primer.style/css/utilities/typography"); add(linkLabel10, "cell 5 1"); //---- linkLabel8 ---- linkLabel8.setLink("https://material.io/design/typography/the-type-system.html#type-scale"); add(linkLabel8, "cell 6 1"); //---- linkLabel11 ---- linkLabel11.setLink("https://m3.material.io/styles/typography/tokens"); add(linkLabel11, "cell 7 1"); //---- linkLabel5 ---- linkLabel5.setLink("https://experience.sap.com/fiori-design-web/typography/#headlines-and-font-styles-for-ui-controls"); add(linkLabel5, "cell 8 1"); //---- linkLabel6 ---- linkLabel6.setLink("https://atlassian.design/foundations/typography"); add(linkLabel6, "cell 9 1"); //---- linkLabel7 ---- linkLabel7.setLink("https://iris.alkamitech.com/foundations/typography.html"); add(linkLabel7, "cell 10 1"); //---- fontPreview69 ---- fontPreview69.setFontType("H1"); fontPreview69.setFontSize(96); fontPreview69.setBaseSize(16); fontPreview69.setLight(true); add(fontPreview69, "cell 6 2"); //---- fontPreview93 ---- fontPreview93.setBaseSize(12); fontPreview93.setFontType("H00"); fontPreview93.setFontSize(36); add(fontPreview93, "cell 0 3"); //---- fontPreview40 ---- fontPreview40.setFontSize(68); fontPreview40.setFontType("Disp"); fontPreview40.setBaseSize(14); fontPreview40.setSemibold(true); add(fontPreview40, "cell 4 2 1 2"); //---- fontPreview35 ---- fontPreview35.setFontType("Disp L"); fontPreview35.setFontSize(57); fontPreview35.setBaseSize(16); add(fontPreview35, "cell 7 2"); //---- fontPreview85 ---- fontPreview85.setFontSize(48); fontPreview85.setFontType("H00"); fontPreview85.setBaseSize(16); fontPreview85.setSemibold(true); add(fontPreview85, "cell 5 3"); //---- fontPreview70 ---- fontPreview70.setFontSize(60); fontPreview70.setFontType("H2"); fontPreview70.setBaseSize(16); fontPreview70.setLight(true); add(fontPreview70, "cell 6 3"); //---- fontPreview36 ---- fontPreview36.setFontSize(45); fontPreview36.setFontType("Disp M"); fontPreview36.setBaseSize(16); add(fontPreview36, "cell 7 3"); //---- fontPreview51 ---- fontPreview51.setFontType("h900"); fontPreview51.setFontSize(35); fontPreview51.setBaseSize(14); fontPreview51.setSemibold(true); add(fontPreview51, "cell 9 3"); //---- fontPreview1 ---- fontPreview1.setBaseSize(12); fontPreview1.setFontType("H0"); fontPreview1.setFontSize(30); add(fontPreview1, "cell 0 4"); //---- fontPreview11 ---- fontPreview11.setFontType("H0"); fontPreview11.setFontSize(24); fontPreview11.setBold(true); fontPreview11.setBaseSize(12); fontPreview11.setShowPlain(true); add(fontPreview11, "cell 1 4"); //---- fontPreview19 ---- fontPreview19.setFontType("H0"); fontPreview19.setFontSize(25); fontPreview19.setBold(true); fontPreview19.setBaseSize(13); fontPreview19.setShowPlain(true); add(fontPreview19, "cell 2 4"); //---- fontPreview27 ---- fontPreview27.setFontType("Large Title"); fontPreview27.setFontSize(26); fontPreview27.setBaseSize(13); add(fontPreview27, "cell 3 4"); //---- fontPreview41 ---- fontPreview41.setFontType("Title L"); fontPreview41.setFontSize(40); fontPreview41.setBaseSize(14); fontPreview41.setSemibold(true); add(fontPreview41, "cell 4 4"); //---- fontPreview86 ---- fontPreview86.setFontSize(40); fontPreview86.setFontType("H0"); fontPreview86.setBaseSize(16); fontPreview86.setSemibold(true); add(fontPreview86, "cell 5 4"); //---- fontPreview71 ---- fontPreview71.setFontType("H3"); fontPreview71.setFontSize(48); fontPreview71.setBaseSize(16); add(fontPreview71, "cell 6 4"); //---- fontPreview37 ---- fontPreview37.setFontSize(36); fontPreview37.setFontType("Display S"); fontPreview37.setBaseSize(16); add(fontPreview37, "cell 7 4"); //---- fontPreview47 ---- fontPreview47.setFontType("Header 1"); fontPreview47.setFontSize(36); fontPreview47.setBaseSize(14); add(fontPreview47, "cell 8 4"); //---- fontPreview54 ---- fontPreview54.setBaseSize(14); fontPreview54.setFontType("h800"); fontPreview54.setFontSize(29); fontPreview54.setSemibold(true); add(fontPreview54, "cell 9 4"); //---- fontPreview62 ---- fontPreview62.setBaseSize(16); fontPreview62.setFontSize(44); fontPreview62.setFontType("Hero"); add(fontPreview62, "cell 10 4"); add(separator3, "cell 0 5 11 1,growx"); //---- fontPreview2 ---- fontPreview2.setBaseSize(12); fontPreview2.setFontSize(24); fontPreview2.setFontType("H1"); fontPreview2.setSemibold(true); fontPreview2.setShowPlain(true); add(fontPreview2, "cell 0 6"); //---- fontPreview12 ---- fontPreview12.setFontType("H1"); fontPreview12.setFontSize(21); fontPreview12.setBold(true); fontPreview12.setBaseSize(12); fontPreview12.setShowPlain(true); add(fontPreview12, "cell 1 6"); //---- fontPreview20 ---- fontPreview20.setFontType("H1"); fontPreview20.setFontSize(22); fontPreview20.setBold(true); fontPreview20.setBaseSize(13); fontPreview20.setShowPlain(true); add(fontPreview20, "cell 2 6"); //---- fontPreview28 ---- fontPreview28.setFontSize(22); fontPreview28.setFontType("Title 1"); fontPreview28.setBaseSize(13); add(fontPreview28, "cell 3 6"); //---- fontPreview42 ---- fontPreview42.setFontType("Title"); fontPreview42.setFontSize(28); fontPreview42.setBaseSize(14); fontPreview42.setSemibold(true); add(fontPreview42, "cell 4 6"); //---- fontPreview87 ---- fontPreview87.setFontType("H1"); fontPreview87.setFontSize(32); fontPreview87.setBaseSize(16); fontPreview87.setSemibold(true); add(fontPreview87, "cell 5 6"); //---- fontPreview72 ---- fontPreview72.setFontType("H4"); fontPreview72.setFontSize(34); fontPreview72.setBaseSize(16); add(fontPreview72, "cell 6 6"); //---- fontPreview38 ---- fontPreview38.setFontSize(32); fontPreview38.setFontType("Headline L"); fontPreview38.setBaseSize(16); add(fontPreview38, "cell 7 6"); //---- fontPreview48 ---- fontPreview48.setFontType("Header 2"); fontPreview48.setFontSize(24); fontPreview48.setBaseSize(14); add(fontPreview48, "cell 8 6"); //---- fontPreview55 ---- fontPreview55.setBaseSize(14); fontPreview55.setFontType("h700"); fontPreview55.setFontSize(24); fontPreview55.setSemibold(true); add(fontPreview55, "cell 9 6"); //---- fontPreview63 ---- fontPreview63.setBaseSize(16); fontPreview63.setFontSize(32); fontPreview63.setFontType("H1"); add(fontPreview63, "cell 10 6"); //---- fontPreview3 ---- fontPreview3.setBaseSize(12); fontPreview3.setFontSize(18); fontPreview3.setFontType("H2"); fontPreview3.setSemibold(true); fontPreview3.setShowPlain(true); add(fontPreview3, "cell 0 7"); //---- fontPreview13 ---- fontPreview13.setFontType("H2"); fontPreview13.setFontSize(17); fontPreview13.setBold(true); fontPreview13.setBaseSize(12); fontPreview13.setShowPlain(true); add(fontPreview13, "cell 1 7"); //---- fontPreview21 ---- fontPreview21.setFontType("H2"); fontPreview21.setFontSize(18); fontPreview21.setBold(true); fontPreview21.setBaseSize(13); fontPreview21.setShowPlain(true); add(fontPreview21, "cell 2 7"); //---- fontPreview29 ---- fontPreview29.setFontSize(17); fontPreview29.setFontType("Title 2"); fontPreview29.setBaseSize(13); add(fontPreview29, "cell 3 7"); //---- fontPreview43 ---- fontPreview43.setFontType("Subtitle"); fontPreview43.setFontSize(20); fontPreview43.setBaseSize(14); fontPreview43.setSemibold(true); add(fontPreview43, "cell 4 7"); //---- fontPreview88 ---- fontPreview88.setFontSize(24); fontPreview88.setFontType("H2"); fontPreview88.setBaseSize(16); fontPreview88.setSemibold(true); add(fontPreview88, "cell 5 7"); //---- fontPreview73 ---- fontPreview73.setFontType("H5"); fontPreview73.setFontSize(24); fontPreview73.setBaseSize(16); add(fontPreview73, "cell 6 7"); //---- fontPreview79 ---- fontPreview79.setFontType("Headline M"); fontPreview79.setFontSize(28); fontPreview79.setBaseSize(16); add(fontPreview79, "cell 7 7"); //---- fontPreview49 ---- fontPreview49.setFontType("Header 3"); fontPreview49.setFontSize(20); fontPreview49.setBaseSize(14); add(fontPreview49, "cell 8 7"); //---- fontPreview57 ---- fontPreview57.setBaseSize(14); fontPreview57.setFontType("h600"); fontPreview57.setFontSize(20); fontPreview57.setSemibold(true); add(fontPreview57, "cell 9 7"); //---- fontPreview64 ---- fontPreview64.setBaseSize(16); fontPreview64.setFontType("H2"); fontPreview64.setFontSize(24); add(fontPreview64, "cell 10 7"); //---- fontPreview4 ---- fontPreview4.setBaseSize(12); fontPreview4.setFontSize(15); fontPreview4.setFontType("H3"); fontPreview4.setSemibold(true); fontPreview4.setShowPlain(true); add(fontPreview4, "cell 0 8"); //---- fontPreview14 ---- fontPreview14.setFontType("H3"); fontPreview14.setFontSize(15); fontPreview14.setBold(true); fontPreview14.setBaseSize(12); fontPreview14.setShowPlain(true); add(fontPreview14, "cell 1 8"); //---- fontPreview22 ---- fontPreview22.setFontType("H3"); fontPreview22.setFontSize(16); fontPreview22.setBold(true); fontPreview22.setBaseSize(13); fontPreview22.setShowPlain(true); add(fontPreview22, "cell 2 8"); //---- fontPreview30 ---- fontPreview30.setFontType("Title 3"); fontPreview30.setFontSize(15); fontPreview30.setBaseSize(13); add(fontPreview30, "cell 3 8"); //---- fontPreview89 ---- fontPreview89.setFontType("H3"); fontPreview89.setFontSize(20); fontPreview89.setBaseSize(16); fontPreview89.setSemibold(true); add(fontPreview89, "cell 5 8"); //---- fontPreview74 ---- fontPreview74.setFontType("H6"); fontPreview74.setFontSize(20); fontPreview74.setBaseSize(16); fontPreview74.setSemibold(true); add(fontPreview74, "cell 6 8"); //---- fontPreview80 ---- fontPreview80.setFontType("Headline S"); fontPreview80.setFontSize(24); fontPreview80.setBaseSize(16); add(fontPreview80, "cell 7 8"); //---- fontPreview50 ---- fontPreview50.setFontType("Header 4"); fontPreview50.setFontSize(18); fontPreview50.setBaseSize(14); add(fontPreview50, "cell 8 8"); //---- fontPreview58 ---- fontPreview58.setBaseSize(14); fontPreview58.setFontType("h500"); fontPreview58.setFontSize(16); fontPreview58.setSemibold(true); add(fontPreview58, "cell 9 8"); //---- fontPreview65 ---- fontPreview65.setBaseSize(16); fontPreview65.setFontSize(20); fontPreview65.setFontType("H3"); add(fontPreview65, "cell 10 8"); //---- fontPreview5 ---- fontPreview5.setBaseSize(12); fontPreview5.setFontSize(14); fontPreview5.setFontType("Large"); add(fontPreview5, "cell 0 9"); //---- fontPreview15 ---- fontPreview15.setFontType("H4"); fontPreview15.setBold(true); fontPreview15.setFontSize(12); fontPreview15.setBaseSize(12); add(fontPreview15, "cell 1 9"); //---- fontPreview23 ---- fontPreview23.setFontType("H4"); fontPreview23.setFontSize(13); fontPreview23.setBold(true); fontPreview23.setBaseSize(13); add(fontPreview23, "cell 2 9"); //---- fontPreview31 ---- fontPreview31.setFontType("Headline"); fontPreview31.setFontSize(13); fontPreview31.setBold(true); fontPreview31.setBaseSize(13); add(fontPreview31, "cell 3 9"); //---- fontPreview44 ---- fontPreview44.setFontSize(18); fontPreview44.setFontType("Body Large"); fontPreview44.setBaseSize(14); add(fontPreview44, "cell 4 9"); //---- fontPreview81 ---- fontPreview81.setFontType("Title L"); fontPreview81.setFontSize(22); fontPreview81.setBaseSize(16); fontPreview81.setSemibold(true); add(fontPreview81, "cell 7 9"); //---- fontPreview56 ---- fontPreview56.setFontType("Large Text / Header 5"); fontPreview56.setFontSize(16); fontPreview56.setBaseSize(14); add(fontPreview56, "cell 8 9"); //---- fontPreview66 ---- fontPreview66.setBaseSize(16); fontPreview66.setFontType("H4"); fontPreview66.setFontSize(18); add(fontPreview66, "cell 10 9"); add(separator1, "cell 0 10 11 1,growx"); //---- fontPreview7 ---- fontPreview7.setFontType("Default"); fontPreview7.setFontSize(12); fontPreview7.setBaseSize(12); add(fontPreview7, "cell 0 11"); //---- fontPreview6 ---- fontPreview6.setFontSize(12); fontPreview6.setBold(true); fontPreview6.setFontType("H4"); fontPreview6.setBaseSize(12); add(fontPreview6, "cell 0 11"); //---- fontPreview16 ---- fontPreview16.setFontType("Default"); fontPreview16.setFontSize(12); fontPreview16.setBaseSize(12); add(fontPreview16, "cell 1 11"); //---- fontPreview24 ---- fontPreview24.setFontType("Default"); fontPreview24.setFontSize(13); fontPreview24.setBaseSize(13); add(fontPreview24, "cell 2 11"); //---- fontPreview32 ---- fontPreview32.setFontType("Body"); fontPreview32.setFontSize(13); fontPreview32.setBaseSize(13); add(fontPreview32, "cell 3 11"); //---- fontPreview45 ---- fontPreview45.setFontType("Body"); fontPreview45.setFontSize(14); fontPreview45.setBaseSize(14); add(fontPreview45, "cell 4 11"); //---- fontPreview90 ---- fontPreview90.setFontSize(16); fontPreview90.setFontType("Body /"); fontPreview90.setBaseSize(16); add(fontPreview90, "cell 5 11,alignx left,growx 0"); //---- fontPreview98 ---- fontPreview98.setFontSize(16); fontPreview98.setFontType("H4"); fontPreview98.setBaseSize(16); fontPreview98.setSemibold(true); add(fontPreview98, "cell 5 11"); //---- fontPreview75 ---- fontPreview75.setFontSize(16); fontPreview75.setFontType("Body 1 / Subtitle 1"); fontPreview75.setBaseSize(16); add(fontPreview75, "cell 6 11"); //---- fontPreview82 ---- fontPreview82.setFontSize(16); fontPreview82.setFontType("Body L /"); fontPreview82.setBaseSize(16); add(fontPreview82, "cell 7 11,alignx left,growx 0"); //---- fontPreview95 ---- fontPreview95.setFontSize(16); fontPreview95.setFontType("Title M"); fontPreview95.setBaseSize(16); fontPreview95.setSemibold(true); add(fontPreview95, "cell 7 11"); //---- fontPreview52 ---- fontPreview52.setFontType("Medium Text / Header 6"); fontPreview52.setFontSize(14); fontPreview52.setBaseSize(14); add(fontPreview52, "cell 8 11"); //---- fontPreview59 ---- fontPreview59.setBaseSize(14); fontPreview59.setFontSize(14); fontPreview59.setFontType("h400"); fontPreview59.setSemibold(true); add(fontPreview59, "cell 9 11"); //---- fontPreview67 ---- fontPreview67.setBaseSize(16); fontPreview67.setFontSize(16); fontPreview67.setFontType("Body"); add(fontPreview67, "cell 10 11"); add(separator2, "cell 0 12 11 1,growx"); //---- fontPreview8 ---- fontPreview8.setFontType("Medium"); fontPreview8.setFontSize(11); fontPreview8.setBaseSize(12); add(fontPreview8, "cell 0 13"); //---- fontPreview17 ---- fontPreview17.setFontType("Medium"); fontPreview17.setFontSize(12); fontPreview17.setBaseSize(12); add(fontPreview17, "cell 1 13"); //---- fontPreview25 ---- fontPreview25.setFontType("Medium"); fontPreview25.setFontSize(12); fontPreview25.setBaseSize(13); add(fontPreview25, "cell 2 13"); //---- fontPreview39 ---- fontPreview39.setFontSize(12); fontPreview39.setFontType("Callout"); fontPreview39.setBaseSize(13); add(fontPreview39, "cell 3 13"); //---- fontPreview91 ---- fontPreview91.setFontType("H5"); fontPreview91.setFontSize(14); fontPreview91.setBaseSize(16); fontPreview91.setSemibold(true); add(fontPreview91, "cell 5 13"); //---- fontPreview76 ---- fontPreview76.setFontType("Body 2 / Subtitle 2"); fontPreview76.setFontSize(14); fontPreview76.setBaseSize(16); add(fontPreview76, "cell 6 13"); //---- fontPreview83 ---- fontPreview83.setFontType("Body M /"); fontPreview83.setFontSize(14); fontPreview83.setBaseSize(16); add(fontPreview83, "cell 7 13,alignx left,growx 0"); //---- fontPreview96 ---- fontPreview96.setFontType("Title S / Label L"); fontPreview96.setFontSize(14); fontPreview96.setBaseSize(16); fontPreview96.setSemibold(true); add(fontPreview96, "cell 7 13"); //---- fontPreview9 ---- fontPreview9.setFontType("Small"); fontPreview9.setFontSize(10); fontPreview9.setBaseSize(12); add(fontPreview9, "cell 0 14"); //---- fontPreview18 ---- fontPreview18.setFontType("Small"); fontPreview18.setFontSize(12); fontPreview18.setBaseSize(12); add(fontPreview18, "cell 1 14"); //---- fontPreview26 ---- fontPreview26.setFontType("Small"); fontPreview26.setFontSize(11); fontPreview26.setBaseSize(13); add(fontPreview26, "cell 2 14"); //---- fontPreview33 ---- fontPreview33.setFontType("Subheadline"); fontPreview33.setFontSize(11); fontPreview33.setBaseSize(13); add(fontPreview33, "cell 3 14"); //---- fontPreview46 ---- fontPreview46.setFontType("Caption"); fontPreview46.setFontSize(12); fontPreview46.setBaseSize(14); add(fontPreview46, "cell 4 14"); //---- fontPreview92 ---- fontPreview92.setFontSize(12); fontPreview92.setFontType("H6"); fontPreview92.setBaseSize(12); fontPreview92.setSemibold(true); add(fontPreview92, "cell 5 14"); //---- fontPreview77 ---- fontPreview77.setFontSize(12); fontPreview77.setFontType("Caption"); fontPreview77.setBaseSize(16); add(fontPreview77, "cell 6 14"); //---- fontPreview84 ---- fontPreview84.setFontType("Body S /"); fontPreview84.setFontSize(12); fontPreview84.setBaseSize(16); add(fontPreview84, "cell 7 14,alignx left,growx 0"); //---- fontPreview97 ---- fontPreview97.setFontType("Label M"); fontPreview97.setFontSize(12); fontPreview97.setBaseSize(16); fontPreview97.setSemibold(true); add(fontPreview97, "cell 7 14"); //---- fontPreview53 ---- fontPreview53.setFontType("Small Text"); fontPreview53.setFontSize(12); fontPreview53.setBaseSize(14); add(fontPreview53, "cell 8 14"); //---- fontPreview60 ---- fontPreview60.setBaseSize(14); fontPreview60.setFontType("h300 / h200"); fontPreview60.setFontSize(12); fontPreview60.setSemibold(true); add(fontPreview60, "cell 9 14"); //---- fontPreview68 ---- fontPreview68.setBaseSize(16); fontPreview68.setFontType("Small"); fontPreview68.setFontSize(14); add(fontPreview68, "cell 10 14"); //---- fontPreview10 ---- fontPreview10.setFontType("Mini"); fontPreview10.setFontSize(9); fontPreview10.setBaseSize(12); add(fontPreview10, "cell 0 15"); //---- fontPreview34 ---- fontPreview34.setFontSize(10); fontPreview34.setFontType("Footnote / Caption 1+2"); fontPreview34.setBaseSize(13); add(fontPreview34, "cell 3 15"); //---- fontPreview78 ---- fontPreview78.setFontType("Overline"); fontPreview78.setFontSize(10); fontPreview78.setBaseSize(16); add(fontPreview78, "cell 6 15"); //---- fontPreview94 ---- fontPreview94.setFontSize(11); fontPreview94.setFontType("Label S"); fontPreview94.setBaseSize(16); fontPreview94.setSemibold(true); add(fontPreview94, "cell 7 15"); //---- fontPreview61 ---- fontPreview61.setBaseSize(14); fontPreview61.setFontSize(11); fontPreview61.setFontType("h100"); fontPreview61.setSemibold(true); add(fontPreview61, "cell 9 15"); // JFormDesigner - End of component initialization //GEN-END:initComponents }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initComponents() {\n\n\t\tsetName(\"Form\"); // NOI18N\n\t\tsetLayout(new java.awt.BorderLayout());\n\t}", "public FormCompra() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Design...
[ "0.7980227", "0.79100174", "0.78056455", "0.77578115", "0.766456", "0.7656488", "0.76562065", "0.7628607", "0.76191956", "0.75570554", "0.75570554", "0.75570554", "0.75432783", "0.75121176", "0.74882853", "0.748563", "0.7464314", "0.7459073", "0.7452996", "0.7452996", "0.7448...
0.0
-1
JFormDesigner Component initialization DO NOT MODIFY //GENBEGIN:initComponents
private void initComponents() { previewLabel = new JLabel(); preview2Label = new JLabel(); descLabel = new JLabel(); //======== this ======== setLayout(new MigLayout( "insets 0,hidemode 3", // columns "[left]", // rows "[]0" + "[]")); //---- previewLabel ---- previewLabel.setText("preview"); add(previewLabel, "cell 0 0"); add(preview2Label, "cell 0 0"); //---- descLabel ---- descLabel.setText("description"); descLabel.putClientProperty("FlatLaf.styleClass", "small"); descLabel.setEnabled(false); add(descLabel, "cell 0 1"); // JFormDesigner - End of component initialization //GEN-END:initComponents }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initComponents() {\n\n\t\tsetName(\"Form\"); // NOI18N\n\t\tsetLayout(new java.awt.BorderLayout());\n\t}", "public FormCompra() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Design...
[ "0.7980227", "0.79100174", "0.78056455", "0.77578115", "0.766456", "0.7656488", "0.76562065", "0.7628607", "0.76191956", "0.75570554", "0.75570554", "0.75570554", "0.75432783", "0.75121176", "0.74882853", "0.748563", "0.7464314", "0.7459073", "0.7452996", "0.7452996", "0.7448...
0.0
-1
TODO Autogenerated method stub
public int totalScore() { return 0; }
{ "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
The property in the plugin config with the URL fragment to be used to access the IRWebView cab file and IR_Viewer.jsp files
public void setParameters(Map parameters) { super.setParameters(parameters); if (parameters != null) { _displayURL = (String) parameters.get(PROP_IR_DISPLAY_URL); _serverIP = (String) parameters.get(PROP_IR_SERVER_IP); _importDir = (String) parameters.get(PROP_IR_COLD_IMPORT); _displayMode = (String) parameters.get(PROP_IR_DISPLAY_MODE); _urlPrefix = (String) parameters.get(PROP_IR_URL_PREFIX); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getPreViewUrl();", "private String initUrlParameter() {\n StringBuffer url = new StringBuffer();\n url.append(URL).append(initPathParameter());\n return url.toString();\n }", "public String getURL(){\r\n\t\t \r\n\t\t\r\n\t\treturn rb.getProperty(\"url\");\r\n\t}", "publi...
[ "0.5933072", "0.57590276", "0.5707753", "0.5548112", "0.5516458", "0.55049783", "0.54934967", "0.54700315", "0.5470027", "0.5437496", "0.5429139", "0.5404275", "0.5398999", "0.53949785", "0.53946394", "0.538595", "0.5371075", "0.5350698", "0.53480715", "0.5343408", "0.5336776...
0.0
-1
TODO: do something smarter BHJ: In theory, this should really reuse the info in the mimetypes configuration in config.xml, but currently that code is unavailable, since it's in PL and this is in toolkit. This class isn't really used, so it's not a big deal now, but keep an eye on it down the line.
private String getFileExtension(String mimeType) { mimeType = mimeType.toLowerCase(); if (mimeType.equals("application/msword")) { return ".doc"; } if (mimeType.equals("application/vnd.ms-excel")) { return ".xls"; } if (mimeType.equals("application/pdf")) { return ".pdf"; } if (mimeType.equals("text/plain")) { return ".txt"; } return ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static HashMap<String, String> getMimeTypes() {\r\n if (mimeTypesInitCompleted) return mimeTypes;\r\n\r\n // Bilder\r\n mimeTypes.put(\".gif\", \"image/gif\");\r\n mimeTypes.put(\".jpg\", \"image/jpeg\");\r\n mimeTypes.put(\".jpeg\", \"image/jpeg\");\r\n mimeTypes.p...
[ "0.7502563", "0.7247787", "0.7241084", "0.7186027", "0.7124809", "0.7088814", "0.7088814", "0.7040891", "0.697771", "0.6948977", "0.6929814", "0.6861987", "0.6828386", "0.68240345", "0.68240345", "0.67922384", "0.67922384", "0.6779978", "0.6748882", "0.67191255", "0.6684582",...
0.0
-1
The IRCC integration currently doesn't use this feature.
public boolean updateDocument(Document document, InputStream isDocument) { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "protected void mo6255a() {\n }", "private USI_ADRC() {}", "@Override\n\tpublic void ccc() {\n\t\t\n\t}", "public void mo6081a() {\n }", "C1458cs mo7613iS();", "public static String getIccid() {\n\t\treturn null;\n\t}", "public void m...
[ "0.681994", "0.6116161", "0.60627854", "0.60615975", "0.60173", "0.6010082", "0.6006672", "0.5979819", "0.5979819", "0.5979819", "0.5979819", "0.5979819", "0.5979819", "0.5979819", "0.59713244", "0.5931471", "0.5931412", "0.5892163", "0.58839256", "0.58605754", "0.58457154", ...
0.0
-1
The documents stored in ImageRight via this api are gaurenteed to be unique. Besides, there's no api to check against anyway.
public boolean isDocument(Document document) { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getRightImageId() {\n return rightImageId;\n }", "private void validateDuplicateDocuments(Noc noc) {\n\t\tif (!ObjectUtils.isEmpty(noc.getDocuments())) {\n\t\t\tList<String> documentFileStoreIds = new LinkedList<String>();\n\t\t\tnoc.getDocuments().forEach(document -> {\n\t\t\t\tif (document...
[ "0.61383855", "0.56338", "0.5492992", "0.54015315", "0.52120066", "0.51960474", "0.5135021", "0.51328415", "0.5114875", "0.5109631", "0.50952864", "0.5077613", "0.50443625", "0.50442654", "0.50183624", "0.50121385", "0.5007546", "0.49988574", "0.49781364", "0.49695128", "0.49...
0.0
-1
BHJ: Not currently supported by this implementation of IDocumentSource, because there doesn't appear to be a way to communicate to the ImageRight system that the document should be removed (or figure out if it should be, if the system is also used for other purposes
public boolean removeDocument(Document document) { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Boolean deleteDocument(Document document) {\n\t\treturn null;\n\t}", "boolean removeDocument(String path);", "public boolean removeDocument(long arg0) throws ContestManagementException {\r\n return false;\r\n }", "void documentRemoved(SingleDocumentModel model);", "public void...
[ "0.64876544", "0.6466235", "0.6297158", "0.62448275", "0.6147821", "0.6147821", "0.60432667", "0.59284246", "0.5925481", "0.5924603", "0.5919131", "0.5893345", "0.5883481", "0.58381104", "0.58176994", "0.5807848", "0.58055574", "0.5800693", "0.5794303", "0.5783217", "0.578321...
0.61814845
4
Stores a document in a "central" place and returns the UID for it.
private String addDocument(String strName, String strClaimNumber, int iExposureID, int iClaimantID, InputStream content) { try { if (strName == null) { throw new IllegalArgumentException("Document name is null."); } if (strClaimNumber == null) { throw new IllegalArgumentException("Claim Number is null."); } String strId = String.valueOf(System.currentTimeMillis()); int iSuffixMax = 40 - strId.length() - 5; // Reserve room for the .idx extension and underscore String strSuffix = strName.length() <= iSuffixMax ? strName : strName.substring(strName.length() - iSuffixMax); strId += '_' + strSuffix; File file = new File(getDocumentsDir() + File.separator + strId); if (FileUtil.isFile(file)) { throw new RuntimeException(getDocumentsDir() + File.separator + strId + " already exists."); } copyToFile(content, file); generateAndCopyIndexFile(strId, strClaimNumber, iExposureID, iClaimantID); return strId; } catch (Throwable t) { throw new RuntimeException(t); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean store(UserDoc userdoc);", "@Override\n\tpublic String getDocumentKey() {\n\t\treturn uid.toString();\n\t}", "java.lang.String getDocumentId();", "UploadResponse uploadDocumentSync(Path documentFilePath, long systemId, String password,\n String documentPool,...
[ "0.6121205", "0.5947745", "0.5862951", "0.5741777", "0.57202584", "0.5624315", "0.561715", "0.55629706", "0.55272084", "0.55203557", "0.5474064", "0.544022", "0.54261297", "0.54261297", "0.54162663", "0.54162234", "0.5410457", "0.5410457", "0.54056257", "0.5403244", "0.537758...
0.0
-1
Example: abc123blahblahblah_test.doc $IY$ABC123 CLMS EXPS 600011 FILENAMEHERE 20030213 YClaimant 123 : 00000126 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ abc123blahblahblah_test.doc The name of the file to import (variable length, but at least 15 chars long) (1) A space to separate the variable length file name $IY$ (6) Index info ABC123 (40) Claim Number CLMS (4) Drawer (always CLMS, for Claims) (1) EXPS (4) Document Type (one of: EXPS for Exposure related doc, CLMT for claimant related doc, or CLAM for entire claim related doc) (5) 60001 (5) Folder Type (one of: 60000 for Exposure related documents folder, 60001 for Claimant related folder, 60002 for entire claim related) 1 (5) Workflow Id. This is the id of the ClaimCenter defined ImageRight workflow. See it via the Workflow definer. (17) FILENAMEHERE (30) The name of the document to store in the imageright folder 20030213 (8) Date. The date associated with the document. (8) Y (1) Must be Y E2355621: (50) Document Description. Must begin with an asterisk (). Encode exposure id, claimant id or whatever here, plus add the Reference number of the document. The reference number must be globally unique.
private String generateIndexFileContent(String strImportFileName, String strClaimNumber, int iExposureID, int iClaimantID) { boolean bExposure = iExposureID >= 0; boolean bClaimant = iClaimantID >= 0; return /* Import Name */ strImportFileName + /* Space */ ' ' + /* $#IY#$ */ INDEX_INFO + /* Claim Number */ pad(strClaimNumber, 40) + /* CLMS Drawer */ DRAWER + /* <unused> (1) */ pad(1) + /* Document Type */ (bExposure ? "EXPS" : (bClaimant ? "CLMT" : "CLAM")) + /* <unused> (5) */ pad(5) + /* Folder Type */ (bExposure ? "60000" : (bClaimant ? "60001" : "60002")) + /* Workflow Id */ pad("1", 5) + /* <unused> (17) */ pad(17) + /* Document Name */ pad(strImportFileName, 30) + /* Date */ getFormattedDate() + /* <unused> (8) */ pad(8) + /* Y */ "Y" + /* Document Description */ pad(encodeDocumentDescription(iExposureID, iClaimantID, strImportFileName), 50); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String addDocument(String strName,\n String strClaimNumber,\n int iExposureID,\n int iClaimantID,\n InputStream content) {\n try {\n if (strName == null) {\n throw new IllegalArgum...
[ "0.5268137", "0.51199025", "0.48941645", "0.48844865", "0.48554695", "0.48507085", "0.48117402", "0.47837955", "0.47682184", "0.47482657", "0.47383833", "0.47192597", "0.47121656", "0.47048584", "0.47046512", "0.47041264", "0.4702882", "0.47007126", "0.46942118", "0.46914622", ...
0.5951104
0
Encodes the document description (aka 'reason'). The description is encodes like so: + E|C + Id + ":" + docId or + entireclaim + ":" + docId where E = exposure, C = claimant, id = exposure or claimant id. For example, E2355621:345663223433_whatever.doc encodes docUID 345663223433_whatever.doc with the exposure 2355621. Another example: entireclaim:345663223433_whatever.doc encodes docUID 345663223433_whatever.doc with the entire claim (not exposure/claimant specific).
private String encodeDocumentDescription(int iExposureID, int iClaimantID, String strDocId) { // Adding a '!' to avoid perpetual syncing. See the imageright-to-cc workflow. String strReason = "*!"; if (iExposureID >= 0) { strReason += "E" + String.valueOf(iExposureID); } else if (iClaimantID > -0) { strReason += "C" + String.valueOf(iClaimantID); } else { strReason += "entireclaim"; } return strReason + ":" + strDocId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getDescription() {\n\t\tif (iDescription == null) {\n\n\t\t\tif (iExtendedReason != null) {\n\t\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\t\tint i = 0;\n\n\t\t\t\tsb.append('(');\n\t\t\t\tsb.append(iReason);\n\t\t\t\tsb.append(\": \");\n\t\t\t\tfor (; i < iExtendedReason.length - 1; i++) {\n\t...
[ "0.55609024", "0.5405347", "0.5393029", "0.53816134", "0.5341214", "0.523918", "0.51778746", "0.5110283", "0.5102316", "0.5048879", "0.5008227", "0.4992141", "0.49867606", "0.4983254", "0.49805996", "0.49695382", "0.49659342", "0.49602497", "0.49556133", "0.49531576", "0.4950...
0.7994742
0
Reads a file's content as an array of bytes.
public static byte[] readBytes(File file) throws IOException { FileInputStream is = new FileInputStream(file); byte[] bytes = new byte[(int) file.length()]; int read = is.read(bytes); for (int totalRead = read; read > 0; ) { read = is.read(bytes, totalRead, bytes.length - totalRead); } is.close(); return bytes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static byte[] readContents(File file) {\n if (!file.isFile()) {\n throw new IllegalArgumentException(\"must be a normal file\");\n }\n try {\n return Files.readAllBytes(file.toPath());\n } catch (IOException excp) {\n throw new IllegalArgumentException(e...
[ "0.7557858", "0.7444033", "0.7423217", "0.7256699", "0.720379", "0.7160307", "0.71186715", "0.70796627", "0.70716745", "0.70664835", "0.7037115", "0.702431", "0.7016498", "0.6979533", "0.6944503", "0.6922214", "0.69190437", "0.69092643", "0.68060523", "0.6780685", "0.6709834"...
0.7242862
4
Map delectPushTemplate(String pushTemplateId); Map updatePushTemplate(String pushTemplateId);
List<PushTemplate> selectPushTemplate(String taskDefKey);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void updatePushApplication(PushApplication pushApp);", "@Mapper(componentModel = \"spring\", uses = {NotificationTemplatesMapper.class})\npublic interface UserNotificationsMapper extends EntityMapper<UserNotificationsDTO, UserNotifications> {\n\n @Mapping(source = \"notificationTemplates.id\", target = \"noti...
[ "0.5568477", "0.5135421", "0.50951934", "0.5086337", "0.5009775", "0.49819183", "0.48800424", "0.481726", "0.4813241", "0.48073924", "0.4787711", "0.47780648", "0.47232953", "0.47001547", "0.46597844", "0.46509737", "0.46208745", "0.46159616", "0.4615699", "0.46083456", "0.46...
0.62724376
0
onClick Listener for view
@Override public void onClick(View v) { if (v.getId() == rateBtn.getId()) { Intent intent = new Intent(mContext, Rating.class); mContext.startActivity(intent); }else if (v.getId() == commentBtn.getId()) { Intent intent = new Intent(mContext, CommentList.class); intent.putExtra(MsgAdapter.MESSAGE_ID, itemList.get(getAdapterPosition()).getUID()); mContext.startActivity(intent); } else { Toast.makeText(v.getContext(), "ROW PRESSED = " + String.valueOf(getAdapterPosition()), Toast.LENGTH_SHORT).show(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View view) {\n\n }", "@Override\n public void onClick(View view) {\n switch (view.getId()) {\n case R.id.rc_view:\n break;\n\n }\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n ...
[ "0.80640393", "0.8049755", "0.8039284", "0.8039284", "0.8039284", "0.8039284", "0.8039284", "0.8039284", "0.8039284", "0.8017347", "0.8017347", "0.8017347", "0.8017347", "0.79312474", "0.79312474", "0.79312474", "0.79312474", "0.79312474", "0.79312474", "0.79312474", "0.79312...
0.0
-1
Provide a suitable constructor (depends on the kind of dataset)
public MsgAdapter(List<Msg> myItemList, Context mContext) { this.itemList = myItemList; this.mContext = mContext; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DataSet() {\r\n \r\n }", "public abstract DataType<T> newInstance();", "public abstract DataType<T> newInstance(String format);", "public AzureDataLakeStoreDataset() {\n }", "public DoubleMatrixDataset() {\r\n }", "protected abstract D createData();", "public AnalysisDatasets() ...
[ "0.6981147", "0.68636614", "0.6713765", "0.6621146", "0.6554576", "0.64229256", "0.63745624", "0.6371747", "0.63448906", "0.63158935", "0.62947685", "0.62431633", "0.61987746", "0.61536974", "0.61206126", "0.6116652", "0.6116652", "0.6093656", "0.6058667", "0.6027514", "0.601...
0.0
-1
Create new views (invoked by the layout manager)
@Override public MsgAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { // create a new view View v = LayoutInflater.from(parent.getContext()) .inflate(R.layout.msg_view, parent, false); // set the view's size, margins, paddings and layout parameters ViewHolder vh = new ViewHolder(v); return vh; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "View createView();", "private void addViews() {\n\t}", "@Override\n public void Create() {\n\n initView();\n }", "ViewContainer createViewContainer();", "private void createView() {\n\t\tTabWidget tWidget = (TabWidget) findViewById(android.R.id.tabs);\r\n\t\tshowLayout = (LinearLayout) LayoutI...
[ "0.73328626", "0.72904646", "0.72535104", "0.6896283", "0.6842287", "0.6789703", "0.67565185", "0.669897", "0.66757303", "0.66693926", "0.65974694", "0.6590284", "0.657908", "0.6563214", "0.65365493", "0.64850044", "0.64722437", "0.64562106", "0.6448075", "0.6448075", "0.6396...
0.0
-1
Replace the contents of a view (invoked by the layout manager)
@Override public void onBindViewHolder(MsgAdapter.ViewHolder holder, int position) { // - get element from your dataset at this position // - replace the contents of the view with that element holder.mTextView.setText(itemList.get(position).getText()); holder.mRatingBar.setRating(itemList.get(position).getRank()); if(itemList.get(position).getImage()!= null) { Log.e("INFO", itemList.get(position).getImage()); String encodedImage = itemList.get(position).getImage(); byte[] decodedString = Base64.decode(encodedImage, Base64.DEFAULT); Bitmap decodedByte = BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length); holder.mImageView.setImageBitmap(decodedByte); } else{ holder.mImageView.setVisibility(View.GONE); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setView(View view);", "void updateView();", "void updateView();", "void setView(View v);", "@Override\n\tpublic void setView(View view) {\n\n\t}", "public void refreshView(){\n\t\tView v = getView();\n\t\tif(v != null){\n\t\t\tv.invalidate();\n\t\t}\n\t}", "public void replaceView(){\n ...
[ "0.70212805", "0.69806224", "0.69806224", "0.69289434", "0.68319106", "0.67423284", "0.6719235", "0.66682535", "0.6551954", "0.65405315", "0.64150465", "0.6410784", "0.6404721", "0.6383419", "0.6347588", "0.62931347", "0.62602854", "0.6247691", "0.6201184", "0.6193189", "0.61...
0.0
-1
Return the size of your dataset (invoked by the layout manager)
@Override public int getItemCount() { return itemList.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int dimensions() {\n return this.data[0].length;\n }", "Dimension getSize();", "Dimension getSize();", "public int getDataSize() {\n\t\treturn (int)this.getSize(data);\n\t}", "public int getSize() {\n\t\treturn width + length;\n\t}", "public int get_size() {\r\n return this.dimens...
[ "0.7193386", "0.71875966", "0.71875966", "0.7131573", "0.7046541", "0.7036978", "0.70349944", "0.70336044", "0.69905853", "0.69406134", "0.6937759", "0.6907996", "0.6904331", "0.6874467", "0.6849123", "0.6834903", "0.6814243", "0.67925316", "0.6785474", "0.67618626", "0.67610...
0.0
-1
Created by deepanshu on 3/5/18.
@Singleton @Component(modules = AppModule.class) public interface AppComponent { void inject(App app); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Over...
[ "0.60423476", "0.59349287", "0.5820698", "0.57965946", "0.5787081", "0.57641083", "0.5760594", "0.5760594", "0.5741292", "0.56942964", "0.56931263", "0.5679238", "0.56765324", "0.5674411", "0.56615394", "0.5649142", "0.56363636", "0.5633834", "0.5625252", "0.5625252", "0.5625...
0.0
-1
/ i| 1 2 3 4 05 06 07 08 09 10 STOP sum| 0 1 3 6 10 15 21 28 36 45 55
public static void main(String[] args) { Scanner keyboard = new Scanner(System.in); System.out.println("Enter a number greater than 1 and less than 100"); int num = keyboard.nextInt(); int sum = 0; // sum is set to 0 index set to equal to or less than user input. sum increases with each pass with index plus current sum for (int i = 1; i <= num; i++) { sum += i; System.out.println(sum); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\nint array[]= {13, 25, 9,56,54,89,17};\r\nint sum =0;\r\n\r\nfor (int i=0; i<=6; i++) {\r\n\tsum = sum + array[i];\r\n}\r\nSystem.out.println(\"the sume of the numbers is \" +sum);\r\n\t}", "static long sumOfGroup(int k) {\n long start = 1;\n long sum = 0;\n...
[ "0.6790396", "0.66556627", "0.658402", "0.6547529", "0.65274817", "0.651786", "0.649403", "0.6488867", "0.6416695", "0.6406739", "0.63795507", "0.63618124", "0.634565", "0.6345523", "0.6309377", "0.63060683", "0.6290133", "0.6290133", "0.62783325", "0.62645155", "0.62259823",...
0.0
-1
An util method to extract date value out from the field and parse it using the given date format.
protected Date handleDateExtractionAndParsing(String dateField, String dateFormat, Map<String, Object> data, String base, PreprocessChainContext chainContext) throws DataProblemException { if (dateField == null) return null; Date resultDate = null; Object dateFieldData = null; if (dateField.contains(".")) { dateFieldData = XContentMapValues.extractValue(dateField, data); } else { dateFieldData = data.get(dateField); } if (dateFieldData != null) { if (!(dateFieldData instanceof String)) { String msg = "Value for field '" + dateField + "' is not a String, so can't be parsed to the date object."; addDataWarning(chainContext, msg); throw new DataProblemException(); } else { String dateStr = dateFieldData.toString(); if (dateStr != null && !dateStr.isEmpty()) { synchronized(dateFormatter) { dateFormatter.applyPattern(dateFormat); try { resultDate = dateFormatter.parse(dateStr); } catch (ParseException e) { String msg = dateField + " parameter value of " + dateStr + " could not be parsed using " + dateFormat + " format."; addDataWarning(chainContext, msg); throw new DataProblemException(); } } } } } return resultDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void parseDateTextFieldHelper() {\n\t\tyear = Integer.parseInt(textFieldDate.getText().substring(0, 4));\n\t\tmonth = Integer.parseInt(textFieldDate.getText().substring(5, 7));\n\t\tdayOfMonth = Integer.parseInt(textFieldDate.getText().substring(8, 10));\n\t}", "public Date getDate(String format){\n ...
[ "0.6494907", "0.6325688", "0.6270123", "0.6233985", "0.61325413", "0.6121767", "0.60802925", "0.6075957", "0.60651714", "0.60575145", "0.60234964", "0.5952942", "0.5918211", "0.58840543", "0.58780396", "0.58780384", "0.5865736", "0.58525157", "0.5844879", "0.582797", "0.58189...
0.63983405
1
Overrided warnings handler helps to save the information that any data parsing was problematic. If anything wrong happened during the processing of data, we don't want to preprocess on it further on.
protected void addDataWarning(PreprocessChainContext chainContext, String message) { super.addDataWarning(chainContext, message); logger.debug(message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void warning(SAXParseException e) throws SAXException\r\n {\r\n System.out.println(\"Warning: \"); \r\n printInfo(e);\r\n }", "@Override\n public void warning(SAXParseException saxpe) throws SAXException {\n }", "@Override\n ...
[ "0.6447022", "0.6432273", "0.6366669", "0.63332117", "0.63332117", "0.63132924", "0.6309895", "0.6298916", "0.6179034", "0.6134215", "0.6134215", "0.61126566", "0.6110827", "0.6107762", "0.60985863", "0.6039351", "0.6039351", "0.6009554", "0.59951305", "0.5993565", "0.5975518...
0.6090478
15
loop that runs for 1 second and prints X times
public static void OneSecondDelay (int MSG_RATE) { long timer = System.currentTimeMillis(); if (MSG_RATE == 0) { //If transfer rate is 0 print once and close try { SendAndReceive(); } catch (IOException e) { e.printStackTrace(); } try { socket.close(); } catch (IOException e) { e.printStackTrace(); } System.exit(1); } else{ while((System.currentTimeMillis()- timer)<1000) {//Until the timer difference is less than 1 second the loop runs for (int i = 0; i < MSG_RATE; i++) { try { SendAndReceive(); } catch (IOException e) { e.printStackTrace(); } } MSG_RATE = 0; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void run() {\n try {\r\n for (int x = 1; x <= 10500; x++) {\r\n System.out.println(x);\r\n sleep(5000);\r\n if (x % 50 == 0) {\r\n System.out.println(\"counting\");\r\n }\r\n }\r\n\r\...
[ "0.74821246", "0.742094", "0.7402625", "0.7328805", "0.72609794", "0.72322017", "0.7086488", "0.70505244", "0.6989915", "0.6978654", "0.6918279", "0.6770792", "0.6719118", "0.67191166", "0.6701569", "0.66925764", "0.6670651", "0.66589516", "0.6644603", "0.6640818", "0.6622731...
0.0
-1
4 parameter expected, IP,PORT,BUFFER_SIZE,MSG_RATE
public static void CheckIfParametersAreValid(String args[]) { if (args.length != 4) { System.err.printf("usage: %s server_name port\n", args[1]); System.exit(1); } IP = args[0]; PORT = Integer.parseInt(args[1]); BUFFER_SIZE = Integer.parseInt(args[2]); MSG_RATE = Integer.parseInt(args[3]); String[] ipSeparated = args[0].split("\\."); if(ipSeparated.length<4){ System.out.println("Invalid IP format."); System.exit(1); } if (ipSeparated.length == 4) { for (int i = 0; i < ipSeparated.length; i++) { if (Integer.valueOf(ipSeparated[i]) < 0 || Integer.valueOf(ipSeparated[i]) > 255 ) {//if ip is not complete i get error System.out.println("Invalid IP format."); System.exit(1); }else { IP = args[0]; } } } if (Integer.parseInt(args[1])>= 0 && Integer.parseInt(args[1]) < 65535) { PORT = Integer.parseInt((args[1])); } else { System.out.println("Invalid PORT Number."); System.exit(1); } if (Integer.parseInt(args[2]) > 0 || Integer.parseInt(args[2]) < 2048) { BUFFER_SIZE = Integer.parseInt((args[2])); } else { System.out.println("Invalid Buffer Size."); System.exit(1); } if (Integer.parseInt(args[3]) >= 0) { MSG_RATE = Integer.parseInt(args[3]); } else { System.out.println("Message RATE Invalid."); System.exit(1); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void CheckIfParametersAreValid(String args[]) {\n\t\tif (args.length != 4) {\n\t\t\tSystem.err.printf(\"usage: %s server_name port\\n\", args[1]);\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\tIP = args[0];\n\t\tPORT = Integer.parseInt(args[1]);\n\t\tBUFFER_SIZE = Integer.parseInt(args[2]);\n\t\tMSG_RATE = I...
[ "0.61159796", "0.58882755", "0.5745175", "0.5534317", "0.5458545", "0.54314214", "0.5415469", "0.54033154", "0.53854877", "0.53751767", "0.53688294", "0.533357", "0.52955025", "0.526106", "0.5259806", "0.5258516", "0.5253562", "0.5250384", "0.5221732", "0.5221325", "0.5200102...
0.6209891
0
ClientSocketInsert cst = new ClientSocketInsert();
public static void main(String [] args) { ClientSocketInsert cst1 = new ClientSocketInsert("data2.txt"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ClientHandle(Socket cs) {\r\n \t\r\n this.threadSocket = cs;\r\n\r\n }", "Boolean insertClient(Client client){\n return true;\n }", "public ClientHandler(Socket s){\r\n mySocket = s;\r\n }", "public ClientThread(Socket socket){\n this.socket = socket;\n }"...
[ "0.7003707", "0.6933697", "0.67671335", "0.6606481", "0.6380879", "0.63777524", "0.6183724", "0.61231434", "0.6060146", "0.60238296", "0.6013654", "0.60027814", "0.59737915", "0.5954431", "0.59539753", "0.59403044", "0.5933914", "0.59172755", "0.59127057", "0.5906406", "0.590...
0.63672125
6
Creates an instance of the Profile Manager, that uses the Dao specified in the constructor to Create Read Update Delete
public ProfileManager() { this.profileDAO = DAOFactory.getProfileDAOInstance(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic int createProfileDAO() {\n\t\treturn 1;\r\n\t}", "ProfileStatusManager create( ProfileConfiguration profileConfiguration ) throws ProfileCreationException;", "public Profile() {}", "public static ProfileManager getInstance() {\n if (instance == null) {\n instance = new...
[ "0.6715749", "0.64856595", "0.6401243", "0.62966776", "0.62815833", "0.6071354", "0.5980161", "0.57632667", "0.57489806", "0.5744871", "0.56839913", "0.56542474", "0.5648237", "0.563156", "0.5582398", "0.5542993", "0.55382335", "0.5476827", "0.54540795", "0.5433241", "0.54118...
0.8114849
0
Returns all Profiles by the data storage layer provided.
@Override public List<Profile> getAllProfiles() { return profileDAO.getAllProfiles(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<T> getProfiles();", "public String[] getProfiles();", "public abstract List<String> getRequiredProfiles();", "@Override\n\tpublic List<Profile> getAllProfiles() {\n\t\treturn null;\n\t}", "java.util.List<org.beangle.security.session.protobuf.Model.Profile>\n getProfilesList();", "public L...
[ "0.6261915", "0.6048114", "0.6043567", "0.5900028", "0.58887655", "0.5868402", "0.57565206", "0.5741418", "0.5736571", "0.5727298", "0.57192177", "0.5512489", "0.5503978", "0.55012006", "0.54684365", "0.5411362", "0.5403093", "0.54025275", "0.54020506", "0.53264713", "0.52545...
0.5896869
4
Returns all profiles from the owners account.
@Override public List<Profile> getProfilesFromOwner(Account owner) { return profileDAO.getProfilesFromOwner(owner); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public List<Profile> getAllProfiles() {\r\n\r\n return profileDAO.getAllProfiles();\r\n }", "@Transactional(readOnly = true)\n public List<DiscordUserProfile> findAll() {\n log.debug(\"Request to get all DiscordUserProfiles\");\n return discordUserProfileRepository.fin...
[ "0.7193682", "0.7004793", "0.6994409", "0.68590426", "0.67406905", "0.6661027", "0.6595454", "0.6580552", "0.6522961", "0.64915323", "0.648164", "0.6462767", "0.6439077", "0.63334906", "0.6324991", "0.6314855", "0.6298557", "0.62769586", "0.6255979", "0.62141603", "0.61495984...
0.8265864
0
Returns Profile associated by the provided id, from the storage layer provided.
@Override public Profile getProfileById(int id) { return profileDAO.getProfileById(id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Profile getProfile( String profileId );", "public Optional<CredentialProfile> get(StructuredTableContext context, CredentialProfileId id)\n throws IOException {\n StructuredTable table = context.getTable(CredentialProviderStore.CREDENTIAL_PROFILES);\n Collection<Field<?>> key = Arrays.asList(\n ...
[ "0.69804186", "0.6698235", "0.6658897", "0.62786144", "0.62230253", "0.6172697", "0.6164764", "0.59750706", "0.58441263", "0.58125776", "0.57877785", "0.5762154", "0.5747548", "0.57023317", "0.56407064", "0.558966", "0.5550448", "0.5500185", "0.5474688", "0.5413837", "0.54005...
0.68885124
1
Adds an profile to the data storage layer provided
@Override public int addProfile(Profile newProfile) { return profileDAO.addProfile(newProfile); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addProfile(Profile profile) {\n\t\tprofiles.put(profile.getProfileOwner(), profile.getProfileText());\n\t\tpersistentStorageAgent.writeThrough(profile);\n\t}", "public void addProfile(SQLDatabase database, Profile profile)\n\t{\n\t\tprofiles.put(profile.getName(), profile);\n\t\tsave(database);\n\t}"...
[ "0.71751225", "0.6945781", "0.65638053", "0.6440812", "0.6169958", "0.6120099", "0.61158425", "0.6103946", "0.6070591", "0.60011333", "0.5989321", "0.5975492", "0.5775059", "0.57663155", "0.5689513", "0.5622826", "0.5606691", "0.5589728", "0.5516049", "0.5478502", "0.54666084...
0.6581774
2
Updates an profile by specifying the new and old profile. Old profile is used to find the 'old ' profile so we can replace those values within the Data storage
@Override public void updateProfile(Profile newProfile, Profile oldProfile) { profileDAO.updateProfile(oldProfile, newProfile); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateProfile(Profile newProfile) throws Exception {\n // If the two profiles are exactly the same, an update isn't required\n if (this.equals(newProfile))\n return;\n\n String logString = newProfile.getImei() + \": \";\n // Check all attributes, updating them whe...
[ "0.7513891", "0.72619164", "0.70216936", "0.6812915", "0.6789839", "0.66732484", "0.6629052", "0.6488669", "0.6488625", "0.6404183", "0.6381144", "0.6271621", "0.6254473", "0.62509173", "0.6232614", "0.62242544", "0.620483", "0.6204175", "0.6199231", "0.6157354", "0.610515", ...
0.8012834
0
Deletes an Profile by specifying the to be deleted profile.
@Override public void deleteProfile(Profile deleteProfile) { profileDAO.deleteProfile(deleteProfile); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void deleteProfile(long profileId) {\n\t\t\n\t}", "@Override\n public DeleteServiceProfileResult deleteServiceProfile(DeleteServiceProfileRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteServiceProfile(request);\n }", "@Override\n p...
[ "0.7966413", "0.7633236", "0.7512449", "0.7232427", "0.7181557", "0.6744527", "0.67067367", "0.6659412", "0.6646312", "0.66144377", "0.6558712", "0.64467406", "0.62241536", "0.6139065", "0.6138376", "0.5992701", "0.5984987", "0.5974764", "0.59607977", "0.5928683", "0.5918707"...
0.779897
1
judge how to handle the received message
public MessageInfo() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void handleMessage(Message msg) {}", "private int handleMessage (String msg)\n {\n \tif (state == STATE_CONNECTION_OPEN && msg.equals (expectedRequest))\n \t\t\treturn STATE_REQUEST_RECEIVED;\n \t\n \tif (state == STATE_REQUEST_RECEIVED && msg.matches (expectedUserAge...
[ "0.7598098", "0.75102675", "0.7412914", "0.7330632", "0.7244218", "0.7239615", "0.72103024", "0.72100705", "0.7143804", "0.7091962", "0.7088458", "0.7083788", "0.70495546", "0.6969505", "0.695103", "0.6900747", "0.6878983", "0.6859436", "0.68540007", "0.68503094", "0.6833838"...
0.0
-1
the following approach can be used if you are lazy to do factory. so take the actor creation inside the parent actor, into a separate function and mock that function during tests like below
@Test public void testActorByMockingInsideActorMultiThreaded(@Capturing final Logger LOGGER) throws InterruptedException { final TestKit childActor1 = new TestKit(system); final TestKit scheduledChildActor = new TestKit(system); final TestKit genericActor = new TestKit(system); new Expectations() {{ new MockUp<Router>() { @Mock private ActorRef createChildIfNull() { return childActor1.testActor(); } @Mock private ActorRef createScheduledChildIfNull() { return scheduledChildActor.testActor(); } }; }}; new TestKit(system) {{ RouterState routerInitialState = new RouterState(0); ActorRefCreatorFactory factory = new ActorRefCreatorFactory(); ActorRef router = system.actorOf(Router.props(routerInitialState, factory), "router"); router.tell(new CommunicateWithActorMessage(4), router); childActor1.expectMsg(new ChildActor1Message(11111)); scheduledChildActor.expectMsg(new StartSchedulerMessage(0)); }}; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Actor createActor();", "ActorRef self() {\n return getTestActor();\n }", "public interface ActorFactory {\n\n public static final String REF_SUFFIX = \"Ref\";\n\n /**\n * Creates an ActorRef bean from {@link ImportActor} and sets {@link Service} as the business logic class.\n * ActorRef bean ...
[ "0.6765221", "0.644075", "0.63400453", "0.5888784", "0.5798687", "0.55961764", "0.5594188", "0.5523165", "0.55077326", "0.54979455", "0.5476545", "0.54647106", "0.5435847", "0.54331064", "0.5260122", "0.5259819", "0.5257791", "0.5226056", "0.51858056", "0.5185588", "0.5165934...
0.6910138
0
inserta el objeto en el arbol
public static void insertar (tcus_clientes info){ NodoArbol nuevo = new NodoArbol (info); if (raiz == null) { raiz = nuevo; } else { NodoArbol anterior = null, reco; reco = raiz; while (reco != null) { anterior = reco; if (info.getNmid() < reco.getNodo().getNmid()) reco = reco.getIzq(); else reco = reco.getDer(); } if (info.getNmid() < anterior.getNodo().getNmid())//50<100 anterior.setIzq(nuevo); else anterior.setDer(nuevo); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void insert(Unidade obj) {\n\n\t}", "public abstract String insert(Object obj) ;", "@Override\r\n\tpublic Ngo insert(Ngo obj) {\n\t\treturn null;\r\n\t}", "public void inserir(Comentario c);", "@Override\n\tpublic void insertar() {\n\t\t\n\t}", "public void insert(TdiaryArticle obj) t...
[ "0.75660443", "0.73335856", "0.7080373", "0.68884724", "0.6884807", "0.67281806", "0.6718239", "0.6646058", "0.65932405", "0.6568451", "0.6553714", "0.65322834", "0.6522334", "0.6510342", "0.6507866", "0.64534295", "0.64453894", "0.6427153", "0.6409387", "0.6402161", "0.63936...
0.0
-1
Created by Prueba on 23may17.
public interface TipoVehiculoService { @Headers("Cache-Control: max-age=1") //eso es para limpiar la cache @POST("tipoVeh") Call<TipoVehiculo> getTiposVeh(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpubl...
[ "0.58933055", "0.5765841", "0.5764301", "0.56959975", "0.5694999", "0.5679377", "0.5679377", "0.56739706", "0.5660553", "0.5647869", "0.56330645", "0.55882615", "0.5579564", "0.55772597", "0.55772156", "0.5560481", "0.55600125", "0.55502355", "0.5547249", "0.5497684", "0.5474...
0.0
-1
If running from the command line...
@Override public int run(String[] args) throws Exception { if (args.length != 6) { System.out.println("Usage: " + this.getClass().getCanonicalName() + " <in> <out> <k> <stages> <key_length> <key_characters>"); return 1; } in = args[0]; out = args[1]; k = Integer.valueOf(args[2]); stages = Integer.valueOf(args[3]); key_length = Integer.valueOf(args[4]); key_characters = Integer.valueOf(args[5]); string_parser = new DefaultStringParser(); similarity = new DefaultSimilarity(); Run(getConf()); Print(); return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {}", "public static void main(String[] args) {}", "public static void main(String args[]) {}", "public static void main(String args[]) {}", "public static void main(String args[]) {}", "public static void main(String[]args) {\n\t\n\t\t\n\n}", "public static void m...
[ "0.6641086", "0.6641086", "0.659437", "0.659437", "0.659437", "0.6524667", "0.6407055", "0.64060104", "0.6390282", "0.63871455", "0.63836056", "0.63442415", "0.63237566", "0.63150334", "0.63135093", "0.63105994", "0.6303882", "0.6303882", "0.6303882", "0.6303882", "0.6303882"...
0.0
-1
Created by dengzhiming on 2019/3/24
public interface StudentMapper { int add(Student student); int update(Student student); int deleteBysno(String sno); List<Map<String, Object>> queryStudentsListMap(); Student queryStudentBySno(String sno); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n public void func_104112_b() {\n \n }", "public final void mo51373a() {\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}", "...
[ "0.58464825", "0.5647896", "0.55987126", "0.5509232", "0.5499154", "0.5499154", "0.54579306", "0.5443961", "0.5431416", "0.54192114", "0.53616333", "0.53582233", "0.53447616", "0.53140974", "0.5303787", "0.52912474", "0.5280261", "0.52736557", "0.5267908", "0.52659804", "0.52...
0.0
-1
TODO Autogenerated method stub int min= getMin2(3,4); System.out.println(min);
public static void main(String[] args) { int min1 = getMin3(3,1,1); System.out.println(min1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getMin( int min );", "int min();", "int min() {\n return min;\r\n }", "public int GetMinVal();", "private static int min(int d1,int d2){\n\t\treturn d1<d2?d1:d2;\n\t}", "public int getMinIntValue();", "double getMin();", "double getMin();", "public int getMinimumInteger() {\n/...
[ "0.7768467", "0.77227855", "0.7459834", "0.7415329", "0.73519766", "0.7258556", "0.721875", "0.721875", "0.7193251", "0.7120476", "0.7118659", "0.7088881", "0.70545256", "0.69645643", "0.6931091", "0.6904627", "0.6903591", "0.68650645", "0.6864388", "0.6851064", "0.6808628", ...
0.7098427
11
SHA256HEXhash the string with salt.
public static String encrypt(String string) { if(string == null) { return null; } else { return DigestUtils.sha256Hex(string + salt); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String saltedSha256(String password, String salt) throws Exception {\n\t\treturn sha256(password + salt);\n\t}", "public Sha256Hash(String hexString) {\n checkArgument(hexString.length() == 64);\n this.bytes = Hex.decode(hexString);\n }", "@Override\r\n\tpublic String hashFuncti...
[ "0.74458724", "0.73168683", "0.7154166", "0.7090752", "0.69541", "0.6800232", "0.678257", "0.6760477", "0.6752238", "0.67273074", "0.67009574", "0.66758066", "0.66678655", "0.6651624", "0.66217107", "0.6604645", "0.65899616", "0.65855354", "0.6582525", "0.6567414", "0.6513867...
0.0
-1
Check if a given string matches given encrypted string.
public static boolean check(String plainString, String encryptedString) { if(plainString == null || encryptedString == null) { return false; } else { return (encryptedString.equals(DigestUtils.sha256Hex(plainString + salt))); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean verifyString(String s) {\n\t\t\n\t\tfor (int i = 0; i<s.length();i++) {\n\t\t\tif (!alphabet.contains(s.charAt(i))) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t\t\n\t}", "boolean compare(String hash, String input) throws IllegalArgumentException, EncryptionException;", "public ...
[ "0.6706483", "0.6455997", "0.6305583", "0.62691855", "0.6139895", "0.61378145", "0.61048496", "0.6083976", "0.6007825", "0.5974958", "0.5941392", "0.5936747", "0.59258366", "0.5899118", "0.5857066", "0.5838003", "0.57786065", "0.57477576", "0.5747302", "0.57422733", "0.571391...
0.7218874
0
IMPLEMENT THE METHODS BELOW! Method 1.
public Node findNode(E val) { if (val == null) return null; return findNode(root, val); }
{ "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\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}...
[ "0.7109251", "0.68488175", "0.67352647", "0.6682992", "0.66004384", "0.65307444", "0.64868474", "0.64868474", "0.64829594", "0.64799935", "0.64799935", "0.6383593", "0.6343543", "0.63203883", "0.6276151", "0.6246898", "0.622211", "0.62177145", "0.6214203", "0.62121546", "0.62...
0.0
-1
Tree t = Tree(1,Tree(2,Tree(4),Tree(5)),Tree(3));
int get_height(Node node) { if (node == null) return 0; else if (node.leftChild == null && node.rightChild == null) return 0; else return 1 + max(get_height(node.leftChild), get_height(node.rightChild)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void makeTree()\n \t{\n \t\t\t \n \t\tobj.insert(5,\"spandu\");\n \tobj.insert(4,\"anshu\");\n \tobj.insert(3,\"anu\");\n \tobj.insert(6,\"himani\");\n \t\t\n \t}", "private static Node getTree()\r\n {\r\n Node node1 = new Node( 1 );\r\n Node node2 = ne...
[ "0.69134533", "0.6848027", "0.66879785", "0.6640718", "0.65740895", "0.65733707", "0.6543457", "0.6532934", "0.65320873", "0.6473362", "0.647225", "0.64696914", "0.64662284", "0.63887346", "0.63539624", "0.6293257", "0.62820125", "0.62718165", "0.62594616", "0.6253874", "0.62...
0.0
-1
/ Base case Tree is empty
public int computeHeight(Node root){ if(root == null) return 0; /* Calculate recursively */ return Math.max(computeHeight(root.leftChild), computeHeight(root.rightChild)) + 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isEmpty()\r\n\t{\r\n\t\treturn getRoot() == null;\r\n\t}", "public boolean empty() {\r\n\t\t return(this.root == null);\r\n\t }", "@Override\n public boolean isEmpty() {\n return root == null;\n }", "public boolean isEmpty() \n\t{\n\t\treturn root == null;//if root is null, tree is emp...
[ "0.81033653", "0.8036154", "0.79870075", "0.7973487", "0.7950579", "0.79208374", "0.7850987", "0.7800295", "0.77755374", "0.77643514", "0.7751478", "0.7730519", "0.7690204", "0.76858747", "0.7678824", "0.76378745", "0.7633383", "0.76217127", "0.76182216", "0.7581606", "0.7581...
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
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); if (id == R.id.action_settings) { return true; } if (id == R.id.action_login) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ...
[ "0.79044175", "0.7806529", "0.77667165", "0.772694", "0.76315796", "0.76219255", "0.75851756", "0.75312436", "0.7488551", "0.7458599", "0.7458599", "0.74389243", "0.74213", "0.7403157", "0.7392013", "0.73872125", "0.73794484", "0.73704696", "0.73621285", "0.7356082", "0.73457...
0.0
-1
Obtain a connection, reusing an existing transaction if possible. This is done to reduce the risk of deadlock between two connections within the same transaction.
public Connection getConnection(String dataSourceName) throws PersistenceException { Connection conn; DataSource ds = DatabaseCache.getDataSource(dataSourceName); if (ds == null) { throw new IllegalStateException("DataSource " + dataSourceName + " not found."); } if (connections.containsKey(dataSourceName)) { conn = (Connection) connections.get(dataSourceName); } else { try { conn = new TransConnection(ds.getConnection()); connections.put(dataSourceName, conn); setDefaults(conn); } catch (SQLException ex) { throw new PersistenceException(ex.getMessage(), ex); } } return conn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Connection getTransactionConnection(){\n try {\n return rawDataSource.getConnection();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return null;\n }", "private static Connection getConnection(){\n Connection conn = THREAD_CONNECTION....
[ "0.70452845", "0.69932747", "0.69628257", "0.6933338", "0.6872224", "0.6844283", "0.6842563", "0.6828217", "0.67796046", "0.6748318", "0.672825", "0.6707084", "0.66830766", "0.66700387", "0.6643198", "0.6634098", "0.6605848", "0.66016704", "0.65538067", "0.6533432", "0.652583...
0.6149839
63
Defines the applied defaults for all new connections.
private void setDefaults(Connection conn) throws SQLException { conn.setAutoCommit(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setDefaultOnRawConn(Connection rawConn) {\r\n try {\r\n rawConn.setAutoCommit(poolConfig.isDefaultAutoCommit());\r\n } catch (Throwable e) {\r\n if (commonLog.isDebugEnabled())\r\n commonLog.debug(\"BeeCP({})failed to set default on executing 'setAuto...
[ "0.693802", "0.69044536", "0.6301385", "0.62917674", "0.62276036", "0.6140169", "0.60526764", "0.59451336", "0.5849084", "0.58131903", "0.57999325", "0.5755403", "0.5738437", "0.5726644", "0.56964415", "0.56451887", "0.5634163", "0.55928004", "0.55801946", "0.5561382", "0.550...
0.5624844
17
Rollback all transactions on all managed connections.
public void rollback() { for (Iterator<Connection> it = connections.values().iterator(); it.hasNext();) { Connection conn = it.next(); try { conn.rollback(); } catch (SQLException ex) { log.severe("Partial rollback failure: " + ex.getMessage()); } } closeConnections(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void rollBackAll() {\n\t\ttry {\n\t\t\t// rollback JMS\n\t\t\trollBackJMS();\n\t\t\t// rollback application data\n\t\t\trollBackApplication();\n\t\t} catch (Exception e) {\n\n\t\t\tlog(\"rollback failed. closing JMS connection ...\");\n\n\t\t\t// application may decide NOT to close connection if rollback f...
[ "0.77462536", "0.65946704", "0.6571322", "0.6442026", "0.6428978", "0.6428715", "0.63559735", "0.6326575", "0.63215274", "0.6239995", "0.62318534", "0.61749315", "0.61748165", "0.6166794", "0.60590523", "0.6044843", "0.6036178", "0.6012565", "0.5989238", "0.5979213", "0.59562...
0.79019755
0
Commit all transactions on all managed connections.
public void commit() { for (Iterator<Connection> it = connections.values().iterator(); it.hasNext();) { Connection conn = it.next(); try { conn.commit(); } catch (SQLException ex) { log.severe("Partial commit failure: " + ex.getMessage()); } } closeConnections(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void commit() {\n if (vote != Vote.COMMIT) {\n throw new IllegalStateException(\"Cannot commit transaction with vote: \" + vote);\n }\n\n for (ObjectVersion<V> objectVersion : objectVersions.values()) {\n objectVersion.commit();\n }\n }", "private void...
[ "0.6407651", "0.6365826", "0.6286594", "0.6216789", "0.6134616", "0.6127329", "0.60900456", "0.60478735", "0.6027087", "0.602345", "0.6012714", "0.60100526", "0.60100526", "0.5994796", "0.59726334", "0.59615296", "0.5949568", "0.59421635", "0.5929082", "0.59250206", "0.586620...
0.7676066
0
This actually does close the connections (or returns them to a pool).
private void closeConnections() { for (Iterator<Connection> it = connections.values().iterator(); it.hasNext();) { TransConnection conn = (TransConnection) it.next(); try { conn.setCloseAllowed(true); conn.close(); } catch (SQLException ex) { log.severe("Connection close failure: " + ex.getMessage()); } } connections.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void closeConnectionsPool();", "@Override\r\n @SuppressWarnings(\"empty-statement\")\r\n public void close()\r\n {\r\n curDb_ = null;\r\n curConnection_ = null;\r\n try\r\n {\r\n for(Map.Entry<Db_db, Connection> entry: connections_.entrySet())\r\n {\r\n ...
[ "0.8017209", "0.7415848", "0.7230271", "0.7119508", "0.7092106", "0.7031782", "0.7026", "0.70155627", "0.69828296", "0.69118285", "0.6879297", "0.6797305", "0.67953146", "0.66737884", "0.66271937", "0.6615071", "0.6599755", "0.6590956", "0.6583046", "0.6576161", "0.6575837", ...
0.68278927
11