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
This interface must be implemented by activities that contain this fragment to allow an interaction in this fragment to be communicated to the activity and potentially other fragments contained in that activity. See the Android Training lesson Communicating with Other Fragments for more information.
public interface OnFragmentInteractionListener { void onFragmentInteraction(Uri uri); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface OnFragmentInteractionListener {\n void onFragmentMessage(String TAG, Object data);\n}", "public interface FragmentInteraction {\n void switchToBoardView();\n void switchToPinsView();\n void switchToPins(PDKBoard pdkBoard);\n void switchToDescription(PDKPin pin);\n}", "public int...
[ "0.73235685", "0.720846", "0.71351564", "0.71232235", "0.71222746", "0.70140475", "0.69755626", "0.69755626", "0.69755626", "0.69729954", "0.6966197", "0.696411", "0.6959307", "0.6952445", "0.6942727", "0.6933436", "0.6929703", "0.6927678", "0.6921319", "0.69094676", "0.69028...
0.0
-1
TODO Autogenerated method stub
@Override public void setBoard(Board board) { }
{ "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
public static final Path RES_DIR = PathUtils.getPath("res/modules/dna"); Instantiates a new reads info.
public HTSViewInfo() { super("HTS View", new AppVersion(15), "Copyright (C) 2014-${year} Antony Holmes", new HTSViewIcon(), "View read track data at multiple resolutions."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public KunKunInfo() {\n\t\t// ring = this.getClass().getResourceAsStream(\"/ring.mid\");\n\t\tsuper();\n\t}", "public void init() throws IOException\n\t{\n\t\tString pth = \"\";\n\t\tif(normal)\n\t\t{\n\t\t\tpth = \"Assets\\\\Art\\\\Tiles\\\\\";\n\t\t}\n\t\ttry\n\t\t{\n\t\t\ttexture = TextureLoader.getTexture(\"...
[ "0.5483583", "0.5449347", "0.53486145", "0.53259695", "0.5321394", "0.52485204", "0.5240959", "0.51759195", "0.5130789", "0.5130114", "0.50693166", "0.50627625", "0.5047244", "0.5040378", "0.50051886", "0.50042856", "0.49914423", "0.4987345", "0.49524236", "0.49394435", "0.49...
0.0
-1
Default constructor creates a new instance with no values set.
public Persona() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "private Default()\n {}", "defaultConstructor(){}", "void DefaultConstructor(){}", "public Car() {\r\n this(\"\", \"\", \"\", 0, Category.EMPTY, 0.00, \"\", 0, \"\", 0.00, \"\", DriveTrain.EMPTY...
[ "0.7847632", "0.73204243", "0.726055", "0.71855", "0.70877004", "0.70003885", "0.6945574", "0.6880735", "0.68676746", "0.6814107", "0.68006265", "0.67998546", "0.67769885", "0.67546123", "0.6734374", "0.6731437", "0.6703083", "0.668936", "0.6684683", "0.66735095", "0.6669275"...
0.0
-1
log off the previous account first
public void SetCurrent(Account a) { if(current != null) current.SetStatus(AccountStatus.LOGOFF); //log in current current = a; current.SetStatus(AccountStatus.LOGIN); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void logoff();", "private void logOut() {\n mApi.getSession().unlink();\n\n // Clear our stored keys\n clearKeys();\n // Change UI state to display logged out version\n setLoggedIn(false);\n }", "public void logoff() {\n CNHudsonUtil.logoff(this.cna);\n this.cna = null;\n }...
[ "0.70595336", "0.68463856", "0.6616835", "0.65695465", "0.65653384", "0.65516746", "0.65269643", "0.6521564", "0.6515701", "0.64994967", "0.64774996", "0.64701563", "0.6464838", "0.6416397", "0.64098173", "0.6406644", "0.6383664", "0.6381106", "0.63385993", "0.6283439", "0.62...
0.5770342
91
TODO Autogenerated method stub
public static void main(String[] args) { IShopCarService shopCarService = new ShopCarServiceImpl(); Msg msg= shopCarService.getNum(333333); System.out.println(msg.getObj()); }
{ "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
Created by Akexorcist on 10/6/2017 AD.
public interface HeroService { @GET("/heroes") LiveData<ApiResponse<HeroResult>> getHeroes(); @POST("/vote") LiveData<ApiResponse<VoteResult>> vote(VoteBody body); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void mo51373a() {\n }", "@Override\n public void perish() {\n \n }", "private void m50366E() {\n }", "@Override\n public void func_104112_b() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void mo3811...
[ "0.6070262", "0.5984005", "0.57881725", "0.5760182", "0.57212204", "0.5701828", "0.56391007", "0.55749804", "0.55592173", "0.5538274", "0.5523909", "0.55183864", "0.5518292", "0.5501861", "0.54958135", "0.54787475", "0.54787475", "0.5466132", "0.5463187", "0.5463187", "0.5463...
0.0
-1
/ Used internally to build the graph.
void add(PEMaker pem, StreamMaker stream) { pe2stream.put(pem, stream); logger.debug("Adding pe [{}] to stream [{}].", pem != null ? pem.getType().getName() : "null", stream != null ? stream.getName() : "null"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void buildGraph(){\n\t}", "private void buildGraph()\n\t{\n\t\taddVerticesToGraph();\n\t\taddLinkesToGraph();\n\t}", "private void buildGraph() {\n\t\tfor (Map<String, Channel> map: this.channels.values()) {\n\t\t\t// Add all channels\n\t\t\t\n\t\t\t// TODO: deal with channels spread over multiple redis...
[ "0.8596838", "0.85154", "0.7356267", "0.72955525", "0.7182194", "0.6904431", "0.67416894", "0.6718706", "0.6695906", "0.66043097", "0.65516806", "0.6549262", "0.6547512", "0.6530971", "0.65258473", "0.6522959", "0.6512858", "0.65125996", "0.64858806", "0.6464556", "0.64568996...
0.0
-1
/ Used internally to build the graph.
void add(StreamMaker stream, PEMaker pem) { stream2pe.put(stream, pem); logger.debug("Adding stream [{}] to pe [{}].", stream != null ? stream.getName() : "null", pem != null ? pem .getType().getName() : "null"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void buildGraph(){\n\t}", "private void buildGraph()\n\t{\n\t\taddVerticesToGraph();\n\t\taddLinkesToGraph();\n\t}", "private void buildGraph() {\n\t\tfor (Map<String, Channel> map: this.channels.values()) {\n\t\t\t// Add all channels\n\t\t\t\n\t\t\t// TODO: deal with channels spread over multiple redis...
[ "0.8595678", "0.85141426", "0.73541445", "0.7294701", "0.7180704", "0.6904934", "0.6741729", "0.67177296", "0.66945183", "0.6603639", "0.65525526", "0.65488154", "0.65480596", "0.6530017", "0.6524398", "0.6521845", "0.65122557", "0.6511638", "0.6485677", "0.6463368", "0.64549...
0.0
-1
/ Do the magic to create a Stream from a StreamMaker.
@SuppressWarnings("unchecked") private <T extends Event> Stream<T> makeStream(StreamMaker sm, Class<T> type) { Stream<T> stream = app.createStream(type); stream.setName(sm.getName()); if (sm.getKeyFinder() != null) stream.setKey((KeyFinder<T>) sm.getKeyFinder()); else if (sm.getKeyDescriptor() != null) stream.setKey(sm.getKeyDescriptor()); return stream; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Stream getStream(Streamable type){\n return Stream.builder().add(type).build() ;\n }", "DataStreams createDataStreams();", "<R> Streamlet<R> newSource(IRichSpout spout);", "OutputStream createStream(String location);", "protected void sequence_DEFINE_DefinitionStream_STREAM(ISerialization...
[ "0.66152614", "0.6363908", "0.602208", "0.60082835", "0.59722316", "0.59692657", "0.5864601", "0.5850363", "0.581463", "0.57148427", "0.57130617", "0.570611", "0.56895816", "0.55998063", "0.5551189", "0.5507161", "0.54803544", "0.5403466", "0.5367978", "0.5307426", "0.5306849...
0.7460854
0
/ Do the magic to create a PE from a PEMaker.
private <T extends ProcessingElement> T makePE(PEMaker pem, Class<T> type) throws NoSuchFieldException, IllegalAccessException { T pe = app.createPE(type); pe.setSingleton(pem.isSingleton()); if (pem.getCacheMaximumSize() > 0) pe.setPECache(pem.getCacheMaximumSize(), pem.getCacheDuration(), TimeUnit.MILLISECONDS); if (pem.getTimerInterval() > 0) pe.setTimerInterval(pem.getTimerInterval(), TimeUnit.MILLISECONDS); if (pem.getTriggerEventType() != null) { if (pem.getTriggerNumEvents() > 0 || pem.getTriggerInterval() > 0) { pe.setTrigger(pem.getTriggerEventType(), pem.getTriggerNumEvents(), pem.getTriggerInterval(), TimeUnit.MILLISECONDS); } } /* Use introspection to match properties to class fields. */ setPEAttributes(pe, pem, type); return pe; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PESection(PEFile pef, long baseoffset) {\n m_pe = pef;\n m_baseoffset = baseoffset;\n }", "public void testParseAndCreate() throws Exception {\r\n byte[] keydata = FileHelper.loadFile(new File(\"./src/test/resources/PUBLIC_KEY_RSA1024.cvc\"));\r\n CVCPublicKey publicKey1 = (CVCPublicKey)C...
[ "0.56054634", "0.5310349", "0.51986456", "0.5179425", "0.51172304", "0.50957924", "0.5054632", "0.5037072", "0.5013759", "0.49828106", "0.4952984", "0.49359688", "0.49232578", "0.4904551", "0.4867523", "0.48648924", "0.48236415", "0.4803512", "0.48012596", "0.47914058", "0.47...
0.63781554
0
/ Set the stream fields in PE classes. Infer the field by checking the stream parameter type .
private void setStreamField(PEMaker pm, Collection<StreamMaker> streams) throws Exception { /* * Create a map of the stream fields to the corresponding generic type. We will use this info to assign the * streams. If the field type matches the stream type and there is no ambiguity, then the assignment is easy. If * more than one field has the same type, then then we need to do more work. */ Field[] fields = pm.getPe().getClass().getDeclaredFields(); Multimap<String, Field> typeMap = LinkedListMultimap.create(); logger.debug("Analyzing PE [{}].", pm.getPe().getClass().getName()); for (Field field : fields) { logger.trace("Field [{}] is of generic type [{}].", field.getName(), field.getGenericType()); if (field.getType() == Stream[].class) { logger.debug("Found stream field: {}", field.getGenericType()); /* Track what fields have streams with the same event type. */ String key = field.getGenericType().toString(); typeMap.put(key, field); } } /* Assign streams to stream fields. */ Multimap<Field, Stream<? extends Event>> assignment = LinkedListMultimap.create(); for (StreamMaker sm : streams) { if (sm == null) continue; Stream<? extends Event> stream = sm.getStream(); Class<? extends Event> eventType = sm.getType(); String key = Stream.class.getCanonicalName() + "<" + eventType.getCanonicalName() + ">[]"; if (typeMap.containsKey(key)) { String fieldName; Field field; Collection<Field> streamFields = typeMap.get(key); int numStreamFields = streamFields.size(); logger.debug("Found [{}] stream fields for type [{}].", numStreamFields, key); if (numStreamFields > 1) { /* * There is more than one field that can be used for this stream type. To resolve the ambiguity we * need additional information. The app graph should include the name of the field that should be * used to assign this stream. If the name is missing we bail out. */ fieldName = sm.getFieldName(); /* Bail out. */ if (fieldName == null) { String msg = String .format("There are [%d] stream fields in PE [%s]. To assign stream [%s] you need to provide the field name in the application graph using the method withFiled(). See Javadocs for an example.", numStreamFields, pm.getPe().getClass().getName(), stream.getName()); logger.error(msg); throw new Exception(msg); } /* Use the provided field name to choose the PE field. */ field = pm.getPe().getClass().getDeclaredField(fieldName); } else { /* * The easy case, no ambiguity, we don't need an explicit field name to be provided. We have the * field that matches the stream type. */ Iterator<Field> iter = streamFields.iterator(); field = iter.next(); // Note that numStreamFields == 1, the size of this collection is 1. logger.debug("Using field [{}].", field.getName()); } /* * By now, we found the field to use for this stream or we bailed out. We are not ready to finish yet. * There may be more than one stream that needs to be assigned to this field. The stream fields must be * arrays by convention and there may be more than one stream assigned to this fields. For now we create * a multimap from field to streams so we can construct the array in the next pass. */ assignment.put(field, stream); } else { /* We couldn't find a match. Tell user to fix the application. */ String msg = String.format( "There is no stream of type [%s] in PE [%s]. I was unable to assign stream [%s].", key, pm .getPe().getClass().getName(), stream.getName()); logger.error(msg); throw new Exception(msg); } } /* Now we construct the array and do the final assignment. */ Map<Field, Collection<Stream<? extends Event>>> assignmentMap = assignment.asMap(); for (Map.Entry<Field, Collection<Stream<? extends Event>>> entry : assignmentMap.entrySet()) { Field f = entry.getKey(); int arraySize = entry.getValue().size(); @SuppressWarnings("unchecked") Stream<? extends Event> streamArray[] = (Stream<? extends Event>[]) Array.newInstance(Stream.class, arraySize); int i = 0; for (Stream<? extends Event> s : entry.getValue()) { streamArray[i++] = s; f.setAccessible(true); f.set(pm.getPe(), streamArray); logger.debug("Assigned [{}] streams to field [{}].", streamArray.length, f.getName()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void readObject(ObjectInputStream paramObjectInputStream) throws IOException, ClassNotFoundException {\n/* 91 */ paramObjectInputStream.defaultReadObject();\n/* 92 */ this.types = null;\n/* */ }", "private void readFields() throws IOException, ClassFormatException {\n final int fields...
[ "0.57849294", "0.5760469", "0.5733509", "0.56149286", "0.5409664", "0.53990316", "0.53450686", "0.5183439", "0.5163477", "0.5154824", "0.5147357", "0.51140887", "0.5091098", "0.50825953", "0.50421363", "0.5025489", "0.5010779", "0.5005165", "0.50038713", "0.4987228", "0.49726...
0.69299805
0
A printable representation of the application graph.
public String toString() { StringBuilder sb = new StringBuilder(); sb.append("\nApplication Graph for " + this.getClass().getCanonicalName() + "\n"); Map<PEMaker, Collection<StreamMaker>> pe2streamMap = pe2stream.asMap(); for (Map.Entry<PEMaker, Collection<StreamMaker>> entry : pe2streamMap.entrySet()) { sb.append(toString(entry.getKey()) + "=> "); for (StreamMaker sm : entry.getValue()) { sb.append(toString(sm)); } sb.append("\n"); } Map<StreamMaker, Collection<PEMaker>> stream2peMap = stream2pe.asMap(); for (Map.Entry<StreamMaker, Collection<PEMaker>> entry : stream2peMap.entrySet()) { sb.append(toString(entry.getKey()) + "=> "); for (PEMaker pm : entry.getValue()) { sb.append(toString(pm)); } sb.append("\n"); } return sb.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic String toString() {\n\t\treturn this.app.toString();\n\t}", "public String toString () {\n StringBuffer s = new StringBuffer();\n for (V v: dag.keySet()) s.append(\"\\n \" + v + \" -> \" + dag.get(v));\n return s.toString(); \n }", "public String apG...
[ "0.71075076", "0.7038332", "0.6950721", "0.6849496", "0.6791192", "0.67302644", "0.66972893", "0.66719323", "0.6624454", "0.6569243", "0.65586853", "0.65209275", "0.64729553", "0.647183", "0.64683014", "0.64611727", "0.6402436", "0.63892186", "0.63811827", "0.63056195", "0.62...
0.8051269
0
/ O(n) n is the sum of the nodes of the tree.
public List<Integer> findMinHeightTrees(int n, int[][] edges) { List<Integer> ans = new ArrayList<>(); if (n == 0) return ans; if (n == 1) { ans.add(0); return ans; } if (n == 2) { ans.add(0); ans.add(1); return ans; } //build graph List<Integer>[] graph = new ArrayList[n]; for (int i = 0; i < n; i++) { graph[i] = new ArrayList<>(); } for (int i = 0; i < edges.length; i++) { int v1 = edges[i][0]; int v2 = edges[i][1]; graph[v1].add(v2); graph[v2].add(v1); } //initial leaves List<Integer> leaves = new ArrayList<>(); for (int i = 0; i < n; i++) { if (graph[i].size() == 1) { leaves.add(i); } } int count = n; while (count > 2) { int leasize = leaves.size(); count -= leasize; List<Integer> newleaves = new ArrayList<Integer>(); for (int i = 0; i < leasize; i++) { int leavenode = leaves.get(i); int verToleave = graph[leavenode].get(0); graph[verToleave].remove(Integer.valueOf(leavenode)); if (graph[verToleave].size() == 1) { newleaves.add(verToleave); } } leaves = newleaves; } return leaves; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int totalNodes(Node<T> n)\n\t{\n\t\tif (n == null) \n return 0; \n else \n { \n \t\n int lTotal = totalNodes(n.left); \n int rTotal = totalNodes(n.right); \n \n return (lTotal + rTotal + 1); \n \n \n ...
[ "0.76542324", "0.7155179", "0.70993507", "0.69936913", "0.6971386", "0.6957434", "0.6954655", "0.69285804", "0.6894139", "0.68354404", "0.681569", "0.6814753", "0.6796503", "0.6787625", "0.6696126", "0.6662751", "0.66570944", "0.6620685", "0.66014117", "0.6584667", "0.6560671...
0.0
-1
used on items with Hunger Storage
public interface IHungerStore { /** * for adding/remove hunger from the item */ void transferHunger(int transfer, ItemStack stack, ProcessType process); /** * total stored hunger points */ int getHungerPoints(ItemStack stack); /** * total stored hunger points */ int getMaxHungerPoints(ItemStack stack); /** * sets maximum hunger */ void setHunger(ItemStack stack, int health); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getItemStorage();", "OStorage getStorage();", "boolean hasItemStorage();", "@Override\r\n\tpublic void addStorageUnit() {\r\n\t}", "@Override\n public void executeStorage(TaskList items, Ui ui, Storage storage) {\n }", "@Override\n public void executeStorage(TaskList items, Ui ui, Storage st...
[ "0.63691163", "0.57508916", "0.57351375", "0.5688425", "0.5639597", "0.5639597", "0.5639518", "0.5630227", "0.5622024", "0.55758786", "0.5539229", "0.551503", "0.55126625", "0.54511887", "0.54455674", "0.53979814", "0.53757685", "0.5352245", "0.5328788", "0.532796", "0.531752...
0.6605703
0
for adding/remove hunger from the item
void transferHunger(int transfer, ItemStack stack, ProcessType process);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface IHungerStore {\n /**\n * for adding/remove hunger from the item\n */\n void transferHunger(int transfer, ItemStack stack, ProcessType process);\n\n /**\n * total stored hunger points\n */\n int getHungerPoints(ItemStack stack);\n\t\n /**\n * total stored hunger p...
[ "0.6495778", "0.6489846", "0.5951107", "0.5947186", "0.589332", "0.58732396", "0.5837925", "0.57595825", "0.5741812", "0.5731294", "0.57151675", "0.5644583", "0.56419384", "0.5625699", "0.55900043", "0.55767375", "0.55388534", "0.55388534", "0.5527743", "0.55175513", "0.55080...
0.0
-1
total stored hunger points
int getHungerPoints(ItemStack stack);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getPointsTotal()\n {\n return pointsTotal;\n }", "public int getPoints()\n {\n return (10000 - this.points);\n }", "Float getTotalPoints();", "int getUsedPoints();", "int getUsedPoints();", "int getUsedPoints();", "public int calculateSumOfHouse() {\n int su...
[ "0.7259761", "0.725096", "0.7224042", "0.7187139", "0.7187139", "0.7187139", "0.6929441", "0.68654704", "0.6768405", "0.66843987", "0.66428095", "0.6623451", "0.6623451", "0.6623451", "0.6616984", "0.65905166", "0.6578973", "0.65606856", "0.65437746", "0.6531867", "0.6531867"...
0.65436566
19
total stored hunger points
int getMaxHungerPoints(ItemStack stack);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getPointsTotal()\n {\n return pointsTotal;\n }", "public int getPoints()\n {\n return (10000 - this.points);\n }", "Float getTotalPoints();", "int getUsedPoints();", "int getUsedPoints();", "int getUsedPoints();", "public int calculateSumOfHouse() {\n int su...
[ "0.72603196", "0.7248685", "0.72218966", "0.71852237", "0.71852237", "0.71852237", "0.69304186", "0.6865308", "0.6768372", "0.66821253", "0.6641907", "0.6621667", "0.6621667", "0.6621667", "0.66154575", "0.65905327", "0.6580464", "0.65591455", "0.65426934", "0.6542548", "0.65...
0.0
-1
Created by fangjiang on 2018/3/27.
@Repository public interface ActorMapper { /** *@description 删除角色 *@author fangjiang *@date 2018/3/27 15:45 */ Integer deleteActor(List<String> list); /** *@description 新增角色 *@author fangjiang *@date 2018/3/27 15:46 */ Integer insertActor(Actor actor); /** *@description 查询角色分页数据 *@author fangjiang *@date 2018/3/27 15:48 */ List<Actor> findActorByPage(Map<String,String> paraMap); /** *@description 更改角色信息 *@author fangjiang *@date 2018/3/27 15:49 */ Integer updateActor(Actor actor); /** *@description 根据ID查找角色信息 *@author fangjiang *@date 2018/3/27 15:50 */ Actor findActorById(String id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpubli...
[ "0.60096616", "0.58827007", "0.57985365", "0.579682", "0.5763242", "0.572924", "0.572924", "0.56910783", "0.567796", "0.5674691", "0.56502897", "0.56358093", "0.56238514", "0.56062585", "0.5605223", "0.55974436", "0.55553645", "0.5555161", "0.5553326", "0.5553326", "0.5553326...
0.0
-1
/\ |Methodes Private| \
private void changeFont(Component component, int fontSize) { Font f = component.getFont(); component.setFont(new Font(f.getName(), f.getStyle(), f.getSize() + fontSize)); if (component instanceof Container) { for(Component child:((Container)component).getComponents()) { changeFont(child, fontSize); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void myPublicMethod() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private void some...
[ "0.7450248", "0.74162525", "0.7294023", "0.7294023", "0.71616054", "0.71493816", "0.71493816", "0.7074084", "0.7001548", "0.6945984", "0.6915887", "0.68728137", "0.68461025", "0.68461025", "0.6842654", "0.6835825", "0.68266463", "0.6791283", "0.67848605", "0.6779816", "0.6774...
0.0
-1
Remplissage de la matrice matrix = new Matrix(n, m + 1);
@Override public void actionPerformed(ActionEvent e) { for(int i = 0; i < rows; i++) { for(int j = 0; j < cols; j++) // m + 1; j++) { //System.out.println(Float.parseFloat(tabTextField[i][j].getText())); float value = (tabTextField[i][j].getText().isEmpty()) ? 0 : Float.parseFloat(tabTextField[i][j].getText()); matrix.set(i, j, value); } } choice = 1; JDialogSetMatrix jdialog = (JDialogSetMatrix)getRootPane().getParent(); jdialog.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Matrix(int m, int n) {\n this.m = m;\n this.n = n;\n data = new double[m][n];\n }", "public Matrix(int n) {\n\t\tsize = n;\n\t\tm = new int[size][size];\n\t}", "public Matrix(int n) {\n\t\tif (n < 1) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tthis.n = n;\n\t\tthis.content = new...
[ "0.78562903", "0.7841529", "0.7248938", "0.7203929", "0.71951866", "0.7143567", "0.70401984", "0.6999021", "0.68427694", "0.67898095", "0.67833275", "0.67684704", "0.6763233", "0.6727901", "0.672214", "0.67023474", "0.6679263", "0.66075695", "0.6593551", "0.65665746", "0.6565...
0.0
-1
TODO Autogenerated method stub
@Override public void mouseWheelMoved(MouseWheelEvent e) { changeFont(JPanelSetMatrix.this, e.getWheelRotation()); }
{ "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
Opens up Main Menu activity from Timer class
public void goBack(){ startActivity(new Intent(this, MainMenu.class)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void run() {\n // This method will be executed once the timer is over\n // Start your app main activity\n Intent i = new Intent(SplashScreen.this, MainActivity.class);\n startActivity(i);\n\n ...
[ "0.70286655", "0.6997727", "0.69484806", "0.6869316", "0.68264484", "0.6815359", "0.6765977", "0.6651367", "0.66218954", "0.66218954", "0.65922123", "0.6580617", "0.6553404", "0.6515764", "0.6513056", "0.64639163", "0.64338136", "0.64143556", "0.64133275", "0.64022094", "0.63...
0.0
-1
Starts a stopwatchlike app on the activity screen starting from 00:00
public void startChronometer(View v){ if (!running) { chronometer.setBase(SystemClock.elapsedRealtime() - totalTime); chronometer.start(); running = true; dateStart = new Date(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void start()\n\t{\n\t\t//do nothing if the stopwatch is already running\n\t\tif (m_running)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tm_running = true;\n\n\t\t//get the time information as last part for better precision\n\t\tm_lastMs = SystemClock.elapsedRealtime();\n\t}", "public void onClickStart(View v) {\n\t\...
[ "0.68718725", "0.67814195", "0.65366626", "0.64774436", "0.6380399", "0.6379326", "0.6363718", "0.63515365", "0.6266056", "0.6262337", "0.62305254", "0.6226965", "0.62244844", "0.62080836", "0.6199519", "0.61651164", "0.6161056", "0.61389774", "0.6125562", "0.61249185", "0.61...
0.5852979
46
Pauses the stopwatch app, time will be calculated when paused
public void stopChronometer(View v) { if (running == true) { chronometer.stop(); totalTime = SystemClock.elapsedRealtime() - chronometer.getBase(); running = false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void pauseClock(boolean stop)\n {\n\tlong now = System.currentTimeMillis();\n\n\tif (stop) {\n\t pauseTime = now;\n\t} else {\n\t startTime += now - pauseTime;\n\t}\n }", "public void pause() {\n cancelCallback();\n mStartTimeMillis *= -1;\n }", "public static void pauseTiming() {\n ...
[ "0.76976985", "0.75868714", "0.7559577", "0.754774", "0.75244457", "0.7455518", "0.7438713", "0.74016815", "0.73932755", "0.72992253", "0.7221892", "0.7194074", "0.7188045", "0.7188045", "0.71749634", "0.71433717", "0.70944494", "0.7093516", "0.70875114", "0.7029261", "0.7014...
0.0
-1
Reset the stopwatch to 00:00, will give tickets to the client based on specific criteria
public void resetChronometer (View v){ chronometer.setBase(SystemClock.elapsedRealtime()); tempTime = totalTime; totalTime = 0; dateEnd = new Date(); addTimer(); grantTickets(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void reset()\n {\n this.timeToCook = 0;\n this.startTime = 0;\n }", "public synchronized void resetTime() {\n }", "public void resetClock()\n {\n startingTime = System.currentTimeMillis();\n }", "public void reset() {\n\t\tthis.startTime = 0;\n\t\tthis.stopTime ...
[ "0.68788403", "0.6854855", "0.682389", "0.67990106", "0.6692741", "0.6661462", "0.6644805", "0.65842456", "0.653969", "0.64944416", "0.6349045", "0.6307256", "0.62300605", "0.62270105", "0.6218222", "0.620254", "0.61987555", "0.61906594", "0.6125477", "0.6062285", "0.6061296"...
0.66111505
7
Uses post requests to add the stopwatch total time of the current user to a database to be stored
public void addTimer(){ RequestQueue rq = Volley.newRequestQueue(getApplicationContext()); StringRequest request = new StringRequest(Request.Method.POST, URL, new Response.Listener<String>() { @Override public void onResponse(String response) { //display } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { error.printStackTrace(); } }) { @Override public String getBodyContentType() { return "application/json; charset=utf-8"; } @Override public byte[] getBody() { Gson gson = new Gson(); String json = gson.toJson(dateStart); json = json.concat(",").concat(gson.toJson(dateEnd)); try{ return (json).getBytes("utf-8"); } catch (UnsupportedEncodingException e) { return null; } } }; rq.add(request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void doTaskWorkPostSave(HttpServletRequest request,\n\t\t\tHttpServletResponse response, User user, Db db)\n\t{\n\t\t// time to update sampling timepoints\n\t\tString cultureType = ItemType.STRAINCULTURE;\n\t\tculture = getServerItemValue(ItemType.STRAINCULTURE);\n\t\tif(WtUtils.isNullOrBlank(c...
[ "0.582335", "0.57226014", "0.57174534", "0.5701228", "0.5483956", "0.543445", "0.5399357", "0.53651875", "0.53324926", "0.52336144", "0.52275026", "0.5224346", "0.5157195", "0.5155546", "0.5141004", "0.513951", "0.51362413", "0.51271355", "0.5084009", "0.50827605", "0.5074883...
0.59245837
0
Method to calculate if the current user will obtain a ticket based on stopwatch time
public void timeLogic(int time){ //Add logic to decide time increments at which tickets will be granted }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasDesiredTime();", "boolean hasUseTime();", "boolean hasUseTime();", "public boolean isTicketable();", "boolean hasVotingStartTime();", "boolean hasVotingEndTime();", "boolean hasSubmitTime();", "if (exitDateTime == adhocTicket.getExitDateTime()) {\n System.out.println(\"Exit Date...
[ "0.6533463", "0.6529724", "0.6529724", "0.6477358", "0.6471985", "0.6463094", "0.6217994", "0.6085948", "0.606862", "0.6006508", "0.59889305", "0.598432", "0.58789456", "0.5847155", "0.5833128", "0.5764667", "0.5756856", "0.5752546", "0.5752546", "0.5739791", "0.5716601", "...
0.651679
3
Method to add a ticket to the current user
public void grantTickets(){ //45mins if (tempTime >= 10){ addTicket(); } tempTime = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addTicket(Ticket ticket) {\n\t\ttickets.add(ticket);\n\t\tticket.setUser(this);\n\t}", "int createTicket(Ticket ticket, int userId);", "public void addTicket(LotteryTicket ticket)\r\n\t{\r\n\t\tlotteryTickets.add(ticket);\r\n\t}", "public void insertTicket(Ticket t){if(!this.inProgress()){this.cu...
[ "0.7838005", "0.7265545", "0.70858496", "0.6377685", "0.62588114", "0.62438875", "0.62077695", "0.6104181", "0.61036974", "0.60830617", "0.6075427", "0.60576797", "0.60551107", "0.6005298", "0.6005298", "0.59371835", "0.591339", "0.5893901", "0.5854217", "0.58536047", "0.5851...
0.5653781
32
Uses post requests to add a ticket object to the database for storage for the current user
public void addTicket(){ RequestQueue rq = Volley.newRequestQueue(getApplicationContext()); StringRequest request = new StringRequest(Request.Method.POST, ticketURL, new Response.Listener<String>() { @Override public void onResponse(String response) { //display } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { error.printStackTrace(); } }) { @Override public String getBodyContentType() { return "application/json; charset=utf-8"; } @Override public byte[] getBody() { Gson gson = new Gson(); String json = gson.toJson(1); try{ return (json).getBytes("utf-8"); } catch (UnsupportedEncodingException e) { return null; } } }; rq.add(request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int createTicket(Ticket ticket, int userId);", "@PostMapping(value=\"/create\")\n\tpublic Ticket creatTicket(@RequestBody Ticket ticket){\n\t\treturn ticketBookingService.createTicket(ticket);\n\t}", "@PostMapping(\"/tickets\")\n @Timed\n public ResponseEntity<Ticket> createTicket(@Valid @RequestBody Tic...
[ "0.7016225", "0.68143326", "0.66339463", "0.6585046", "0.65636575", "0.6475507", "0.6454161", "0.6286726", "0.62854695", "0.62348735", "0.6036884", "0.60298425", "0.60252523", "0.59886336", "0.59753364", "0.596498", "0.5912387", "0.5866523", "0.5783603", "0.57770765", "0.5682...
0.6718892
2
This method was generated by MyBatis Generator. This method corresponds to the database table tb_sys_data
public SysDataExample() { oredCriteria = new ArrayList<Criteria>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List getSysListBySQL() {\n\t\treturn jsysListKeyDao.getSysListBySQL();\n\t}", "public String getTableDbName() { return \"t_trxtypes\"; }", "public interface SysTableKindDao extends GenericDao<SysTableKind, String> {\n\tpublic JQueryPager getSysTableKindCriteria(final JQueryPager paginatedLi...
[ "0.6123984", "0.58423716", "0.55056596", "0.5419456", "0.5397133", "0.53586", "0.52834105", "0.52620196", "0.5243546", "0.51945996", "0.5186949", "0.51646143", "0.5156763", "0.51476955", "0.5146247", "0.5115323", "0.5106713", "0.5104016", "0.5095973", "0.5082114", "0.50803643...
0.51843596
11
This method was generated by MyBatis Generator. This method corresponds to the database table tb_sys_data
public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List getSysListBySQL() {\n\t\treturn jsysListKeyDao.getSysListBySQL();\n\t}", "public String getTableDbName() { return \"t_trxtypes\"; }", "public interface SysTableKindDao extends GenericDao<SysTableKind, String> {\n\tpublic JQueryPager getSysTableKindCriteria(final JQueryPager paginatedLi...
[ "0.6124971", "0.58429414", "0.5504945", "0.5418824", "0.53956527", "0.5359798", "0.5284078", "0.52618295", "0.5244653", "0.51948786", "0.5187576", "0.5181886", "0.51673037", "0.5158282", "0.51498586", "0.51466906", "0.51133174", "0.5108772", "0.5103953", "0.5096624", "0.50804...
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table tb_sys_data
public String getOrderByClause() { return orderByClause; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List getSysListBySQL() {\n\t\treturn jsysListKeyDao.getSysListBySQL();\n\t}", "public String getTableDbName() { return \"t_trxtypes\"; }", "public interface SysTableKindDao extends GenericDao<SysTableKind, String> {\n\tpublic JQueryPager getSysTableKindCriteria(final JQueryPager paginatedLi...
[ "0.6124535", "0.5842648", "0.55057126", "0.541927", "0.5396749", "0.536229", "0.52852285", "0.5260689", "0.5245233", "0.51956636", "0.5187659", "0.518394", "0.51676565", "0.5159761", "0.51504123", "0.51459646", "0.51132524", "0.5108084", "0.5105226", "0.50974417", "0.5080329"...
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table tb_sys_data
public void setDistinct(boolean distinct) { this.distinct = distinct; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List getSysListBySQL() {\n\t\treturn jsysListKeyDao.getSysListBySQL();\n\t}", "public String getTableDbName() { return \"t_trxtypes\"; }", "public interface SysTableKindDao extends GenericDao<SysTableKind, String> {\n\tpublic JQueryPager getSysTableKindCriteria(final JQueryPager paginatedLi...
[ "0.61224407", "0.5842504", "0.5505103", "0.5417034", "0.53943473", "0.5359971", "0.5284789", "0.52621794", "0.5242965", "0.5195462", "0.5188013", "0.51846105", "0.51649195", "0.515867", "0.51503235", "0.5145288", "0.51131296", "0.5105603", "0.5105503", "0.5096846", "0.5082232...
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table tb_sys_data
public boolean isDistinct() { return distinct; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List getSysListBySQL() {\n\t\treturn jsysListKeyDao.getSysListBySQL();\n\t}", "public String getTableDbName() { return \"t_trxtypes\"; }", "public interface SysTableKindDao extends GenericDao<SysTableKind, String> {\n\tpublic JQueryPager getSysTableKindCriteria(final JQueryPager paginatedLi...
[ "0.6123984", "0.58423716", "0.55056596", "0.5419456", "0.5397133", "0.53586", "0.52834105", "0.52620196", "0.5243546", "0.51945996", "0.5186949", "0.51843596", "0.51646143", "0.5156763", "0.51476955", "0.5146247", "0.5115323", "0.5106713", "0.5104016", "0.5095973", "0.5082114...
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table tb_sys_data
public List<Criteria> getOredCriteria() { return oredCriteria; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List getSysListBySQL() {\n\t\treturn jsysListKeyDao.getSysListBySQL();\n\t}", "public String getTableDbName() { return \"t_trxtypes\"; }", "public interface SysTableKindDao extends GenericDao<SysTableKind, String> {\n\tpublic JQueryPager getSysTableKindCriteria(final JQueryPager paginatedLi...
[ "0.6124971", "0.58429414", "0.5504945", "0.5418824", "0.53956527", "0.5359798", "0.5284078", "0.52618295", "0.5244653", "0.51948786", "0.5187576", "0.5181886", "0.51673037", "0.5158282", "0.51498586", "0.51466906", "0.51133174", "0.5108772", "0.5103953", "0.5096624", "0.50804...
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table tb_sys_data
public void or(Criteria criteria) { oredCriteria.add(criteria); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List getSysListBySQL() {\n\t\treturn jsysListKeyDao.getSysListBySQL();\n\t}", "public String getTableDbName() { return \"t_trxtypes\"; }", "public interface SysTableKindDao extends GenericDao<SysTableKind, String> {\n\tpublic JQueryPager getSysTableKindCriteria(final JQueryPager paginatedLi...
[ "0.6124535", "0.5842648", "0.55057126", "0.541927", "0.5396749", "0.536229", "0.52852285", "0.5260689", "0.5245233", "0.51956636", "0.5187659", "0.518394", "0.51676565", "0.5159761", "0.51504123", "0.51459646", "0.51132524", "0.5108084", "0.5105226", "0.50974417", "0.5080329"...
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table tb_sys_data
public Criteria or() { Criteria criteria = createCriteriaInternal(); oredCriteria.add(criteria); return criteria; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List getSysListBySQL() {\n\t\treturn jsysListKeyDao.getSysListBySQL();\n\t}", "public String getTableDbName() { return \"t_trxtypes\"; }", "public interface SysTableKindDao extends GenericDao<SysTableKind, String> {\n\tpublic JQueryPager getSysTableKindCriteria(final JQueryPager paginatedLi...
[ "0.61224407", "0.5842504", "0.5505103", "0.5417034", "0.53943473", "0.5359971", "0.5284789", "0.52621794", "0.5242965", "0.5195462", "0.5188013", "0.51846105", "0.51649195", "0.515867", "0.51503235", "0.5145288", "0.51131296", "0.5105603", "0.5105503", "0.5096846", "0.5082232...
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table tb_sys_data
public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); if (oredCriteria.size() == 0) { oredCriteria.add(criteria); } return criteria; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List getSysListBySQL() {\n\t\treturn jsysListKeyDao.getSysListBySQL();\n\t}", "public String getTableDbName() { return \"t_trxtypes\"; }", "public interface SysTableKindDao extends GenericDao<SysTableKind, String> {\n\tpublic JQueryPager getSysTableKindCriteria(final JQueryPager paginatedLi...
[ "0.6123984", "0.58423716", "0.55056596", "0.5419456", "0.5397133", "0.53586", "0.52834105", "0.52620196", "0.5243546", "0.51945996", "0.5186949", "0.51843596", "0.51646143", "0.5156763", "0.51476955", "0.5146247", "0.5115323", "0.5106713", "0.5104016", "0.5095973", "0.5082114...
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table tb_sys_data
protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); return criteria; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List getSysListBySQL() {\n\t\treturn jsysListKeyDao.getSysListBySQL();\n\t}", "public String getTableDbName() { return \"t_trxtypes\"; }", "public interface SysTableKindDao extends GenericDao<SysTableKind, String> {\n\tpublic JQueryPager getSysTableKindCriteria(final JQueryPager paginatedLi...
[ "0.6124971", "0.58429414", "0.5504945", "0.5418824", "0.53956527", "0.5359798", "0.5284078", "0.52618295", "0.5244653", "0.51948786", "0.5187576", "0.5181886", "0.51673037", "0.5158282", "0.51498586", "0.51466906", "0.51133174", "0.5108772", "0.5103953", "0.5096624", "0.50804...
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table tb_sys_data
public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List getSysListBySQL() {\n\t\treturn jsysListKeyDao.getSysListBySQL();\n\t}", "public String getTableDbName() { return \"t_trxtypes\"; }", "public interface SysTableKindDao extends GenericDao<SysTableKind, String> {\n\tpublic JQueryPager getSysTableKindCriteria(final JQueryPager paginatedLi...
[ "0.6124535", "0.5842648", "0.55057126", "0.541927", "0.5396749", "0.536229", "0.52852285", "0.5260689", "0.5245233", "0.51956636", "0.5187659", "0.518394", "0.51676565", "0.5159761", "0.51504123", "0.51459646", "0.51132524", "0.5108084", "0.5105226", "0.50974417", "0.5080329"...
0.0
-1
Code to compare values of Treemap for ordering
public static <K, V extends Comparable<V>> Map<K, V> sortByValues(final Map<K, V> map) { Comparator<K> valueComparator = new Comparator<K>() { public int compare(K k1, K k2) { int compare = map.get(k1).compareTo(map.get(k2)); if (compare == 0) { return 1; } else { return compare; } } }; Map<K, V> sortedByValues = new TreeMap<K, V>(valueComparator); sortedByValues.putAll(map); return sortedByValues; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\t\t\tpublic int compare(Map.Entry<String, Integer> o1, Map.Entry<String, Integer> o2) {\n\t\t\t\t\treturn (o2.getValue()).compareTo(o1.getValue());\r\n\t\t\t\t}", "@Override\n public int compare(Map.Entry<String, Integer> o1,\n Map.Entry<String, Integer> o...
[ "0.67980826", "0.6660912", "0.6648859", "0.6640569", "0.6626582", "0.6625438", "0.6538376", "0.64998114", "0.6466567", "0.6465819", "0.64179415", "0.64108187", "0.6391069", "0.63865274", "0.6370088", "0.636786", "0.6310486", "0.6297103", "0.6270688", "0.62657475", "0.62628824...
0.0
-1
Returns the total number of items in the data set held by the adapter.
@Override public int getItemCount() { return items.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getItemCount() {\n\t\treturn this.getSize(data);\n\t}", "@Override\n\tpublic Integer getItemCount() {\n\t\t\n\t\tInteger countRows = 0;\n\t\t\n\t\t/*\n\t\t * Count of items will be retrieved from MainQuery.xml\n\t\t */\n\t\ttry {\n\t\t\tconnection = DBConnectionUtil.getDBConnection();\n\t\t\tprepared...
[ "0.80776125", "0.78835154", "0.78835154", "0.7844944", "0.7841309", "0.78299797", "0.78299797", "0.78092974", "0.7780888", "0.77403176", "0.77322376", "0.7681005", "0.76685655", "0.76488805", "0.7619788", "0.76115274", "0.76115274", "0.7604848", "0.760056", "0.7597352", "0.75...
0.0
-1
display() method creates completely new window. We must have here creation of completely new Stage object
public void display() { Stage messageStage = new Stage(); messageStage.initModality(Modality.APPLICATION_MODAL); messageStage.setTitle(title); messageStage.setMinWidth(350); messageStage.setMinHeight(200); Label messageLabel = new Label(); messageLabel.setText(message); Button closeButton = new Button("OK"); closeButton.setOnAction(e -> messageStage.close()); VBox vBox = new VBox(10); vBox.getChildren().addAll(messageLabel, closeButton); vBox.setAlignment(Pos.CENTER); Scene scene = new Scene(vBox); messageStage.setScene(scene); messageStage.showAndWait(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showWindow() {\n Stage stage = new Stage();\n stage.setScene(new Scene(this.root));\n stage.setAlwaysOnTop(true);\n//\t\tstage.initStyle(StageStyle.UTILITY);\n stage.setOnCloseRequest((e) -> onCancelButtonClick());\n LOGGER.info(\"Show HydraulicSimulationResultWindow....
[ "0.75589037", "0.73827857", "0.72913337", "0.7156839", "0.7122837", "0.69557834", "0.692602", "0.6924621", "0.6904641", "0.690232", "0.68796444", "0.6825009", "0.6769049", "0.6751306", "0.66961503", "0.66948956", "0.66665816", "0.65899664", "0.6585615", "0.6578911", "0.657805...
0.71802485
3
default constructor that takes the list of grades and adds them to the rbt
public Backend(Reader r) throws IOException { GradeDataReader reader = new GradeDataReader(); List<Grade> data = null; // read data try { data = reader.readDataSet(r); } catch (IOException | DataFormatException e) { System.out.println("Error parsing file"); } // input into rbt for (int i = 0; i < data.size(); i++) { rbt.insert(data.get(i)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public grade(){}", "public GradeRubric() {\r\n\t}", "public GradeBook(String courseName, int[][] grades){\n this.courseName = courseName;\n this.grades = grades;\n }", "public GradeEstimator(ScoreList scores, String[] letterGrades,\n\t\t\tdouble[] letterVal, String[] categories, String[] ca...
[ "0.7055993", "0.66144705", "0.6555791", "0.6297676", "0.6282768", "0.62080806", "0.61639184", "0.61592466", "0.60429025", "0.60151434", "0.5949216", "0.59074825", "0.5883773", "0.5865972", "0.5839491", "0.5833816", "0.5824367", "0.5783253", "0.5755182", "0.5738019", "0.571475...
0.54390794
42
Adds student name to the grade node specified
public boolean add(int grade, String student) { Grade toInsert = new Grade(student, grade); boolean ret = rbt.insert(toInsert); if (ret == true) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void addGrade(String firstName, String lastName, int pID, String grade) {\n Student s = new Student(firstName, lastName, pID);\n Grade g = new Grade(grade);\n\n for (Student key : map.keySet()) {\n if (key.compareTo(s) == 0) {\n map.replace(key, ...
[ "0.6649995", "0.6550943", "0.642618", "0.64013135", "0.6371814", "0.6304164", "0.6254325", "0.61283374", "0.61274886", "0.6102759", "0.6019179", "0.60127705", "0.6007829", "0.5978574", "0.59713066", "0.5960417", "0.5937354", "0.5917524", "0.5885046", "0.5880592", "0.58803123"...
0.60050184
13
Gets the median of the rbt dataset
public float getMedian() { // if empty tree if (rbt.root == null) { return 0; } int count = rbt.size(); int currCount = 0; // current node, inorder direct predecessor (87 -> 88), and previous node RedBlackTree.Node<Grade> curr = rbt.root, pre = null, prev = null; while (curr != null) { if (curr.leftChild == null) { currCount++; // if current node is the median // middle node if ((count % 2) != 0 && currCount == (count + 1) / 2) { return prev.data.getGrade(); } // split middle node else if ((count % 2) == 0 && currCount == (count / 2) + 1) { return (prev.data.getGrade() + curr.data.getGrade()) / 2; } prev = curr; curr = curr.rightChild; } else { // get inorder predecessor pre = curr.leftChild; while (pre.rightChild != null && pre.rightChild != curr) { pre = pre.rightChild; } if (pre.rightChild == null) { pre.rightChild = curr; curr = curr.leftChild; } else { pre.rightChild = null; prev = pre; currCount++; // if node is middle of set if ((count % 2) != 0 && currCount == (count + 1) / 2) { return curr.data.getGrade(); } else if ((count % 2) == 0 && currCount == (count / 2) + 1) { return (prev.data.getGrade() + curr.data.getGrade()) / 2; } prev = curr; curr = curr.rightChild; } } } return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T median();", "public static double getMedian()\n {\n // add your code here\n if(s.size()==g.size()){\n return (double) ((s.peek()+g.peek())/2);\n }\n else if(s.size() > g.size()) {\n return (double) s.peek();\n }\n else {\n re...
[ "0.80509275", "0.72869766", "0.6968605", "0.6948431", "0.68821776", "0.68145293", "0.6804478", "0.67047995", "0.66791207", "0.66687036", "0.6660179", "0.66282177", "0.65784", "0.65639526", "0.65617716", "0.6528955", "0.64717793", "0.645961", "0.64558184", "0.64512473", "0.644...
0.63418084
24
Gets the mean of the rbt dataset x_bar = SIGMA(x_i) / size
public float getMean() { int sum = getSum(rbt.root); float mean = sum / rbt.size(); return mean; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double mean()\n {\n double sum = 0.0;\n for(int t = 0; t<size; t++)\n sum += x[t];\n return sum/size;\n }", "public static double mean(double[] x){\n\n //Declares and intializes mean and total to 0;\n double mean = 0;\n double total = 0;\n\n ...
[ "0.7066412", "0.6455839", "0.6335748", "0.61757237", "0.61639273", "0.61639273", "0.61599237", "0.6085146", "0.60744154", "0.6071515", "0.60212225", "0.6017622", "0.6003318", "0.6002753", "0.5997571", "0.5993067", "0.5961411", "0.59539557", "0.5949667", "0.5933735", "0.592008...
0.6715132
1
Gets the min value of the rbt dataset
public int getMin() { // get root RedBlackTree.Node<Grade> min = rbt.root; // loop to left of tree while (min.leftChild != null) { min = min.leftChild; } return min.data.getGrade(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double min(){\r\n\t\t//variable for min val\r\n\t\tdouble min = this.data[0];\r\n\t\t\r\n\t\tfor (int i = 1; i < this.data.length; i++){\r\n\t\t\t//if the minimum is more than the current index, change min to that value\r\n\t\t\tif (min > this.data[i]){\r\n\t\t\t\tmin = this.data[i];\r\n\t\t\t}\r\n\t\t}\r\n...
[ "0.7467327", "0.7338068", "0.72885966", "0.7171559", "0.7106177", "0.7101119", "0.7101119", "0.70812905", "0.70611876", "0.70419633", "0.70295054", "0.70260787", "0.70208347", "0.7019743", "0.6990463", "0.6959256", "0.6943075", "0.6892681", "0.68903273", "0.68695015", "0.6869...
0.6971565
15
Gets the max value of the rbt dataset
public int getMax() { // get root RedBlackTree.Node<Grade> max = rbt.root; // loop to right of tree while (max.rightChild != null) { max = max.rightChild; } return max.data.getGrade(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double max(){\r\n\t\t//variable for max val\r\n\t\tdouble max = this.data[0];\r\n\t\t\r\n\t\tfor (int i = 1; i < this.data.length; i++){\r\n\t\t\t//if the maximum is less than the current index, change max to that value\r\n\t\t\tif (max < this.data[i]){\r\n\t\t\t\tmax = this.data[i];\r\n\t\t\t}\r\n\t\t}\r\n...
[ "0.7545599", "0.7423159", "0.73402095", "0.7330855", "0.7327295", "0.7257863", "0.7220068", "0.72166455", "0.71662813", "0.71235055", "0.7106292", "0.7102903", "0.7101096", "0.7085038", "0.7079933", "0.7079933", "0.70699984", "0.7064111", "0.70552874", "0.69962204", "0.69836"...
0.69991523
19
Gets the mode of the rbt dataset
public int getMode() { List<Integer> rbtList = createArray(rbt.root); int n = rbtList.size(); int max = 0; int maxCount = 0; for (int i = 0; i < n; i++) { int count = 0; for (int j = 0; j < n; j++) { if (rbtList.get(j) == rbtList.get(i)) { count++; } } if (count > maxCount) { maxCount = count; max = rbtList.get(i); } } return max; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getMode() {\n\t\treturn this.mode;\n\t}", "public int getMode() {\n return this.mode;\n }", "public double mode(){\r\n\t\t\r\n\t\t//make a double to return the mode\r\n\t\tdouble mode = 0.0;\r\n\t\t\r\n\t\t//make 2 possible mode doubles\r\n\t\tdouble maybeMode;\r\n\t\t\r\n\t\t//mak...
[ "0.68609965", "0.68302125", "0.6801613", "0.679336", "0.6792584", "0.6788399", "0.6788076", "0.6705534", "0.66342396", "0.66342396", "0.66333896", "0.66177905", "0.6578103", "0.6575136", "0.6572187", "0.6522588", "0.6502451", "0.6500278", "0.6489903", "0.64803797", "0.6463927...
0.7426207
0
Gets the standard deviation of the dataset stdDev = sqrt( (SIGMA(x_i x_bar)^2) / (n1) )
public float getSDev() { int sumStdError = 0; // SIGMA(x_i - x_bar) int size = rbt.size() - 1; float mean = getMean(); List<Integer> rbtArray = createArray(rbt.root); // calculate sumStdError for (int i = 0; i < rbtArray.size(); i++) { float gradeData = rbtArray.get(i); float error = gradeData - mean; sumStdError += error; } return (float) Math.sqrt((sumStdError ^ 2) / size); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double stddev() {\n\t\tdouble sum = 0;\n\t\tdouble mean = mean();\n\t\tfor(int i = 0; i<myData.length;i++)\n\t\t\tsum+=(myData[i]-mean)*(myData[i]-mean);\n\t\treturn (double) Math.sqrt(sum/(myData.length-1));\n\t}", "public double stddev() {\n double sum = sampleMean;\n sum = 0;\n for...
[ "0.79789066", "0.76872784", "0.7649783", "0.7622463", "0.7620297", "0.76152307", "0.75622857", "0.75300163", "0.75040466", "0.74913496", "0.7480804", "0.7475071", "0.7353319", "0.72520113", "0.7196327", "0.7185082", "0.7127383", "0.71044403", "0.7096134", "0.7096134", "0.7085...
0.7956712
1
creates an inorder array of the rbt for stat analysis
public List<Integer> createArray(RedBlackTree.Node<Grade> n) { List<Integer> result = new ArrayList<>(); if (n.leftChild != null) { result.addAll(createArray(n.leftChild)); } if (n.rightChild != null) { result.addAll(createArray(n.rightChild)); } result.add(n.data.getGrade()); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double[] getXTBT() {\n return xTBT;\n }", "private Countable[] generateArray(int rank){\n var numbers = new Countable[rank];\n for (int i = 0; i < rank; i++) {\n numbers[i] = getRandomCountable();\n }\n return numbers;\n }", "public double[] getYTBT()...
[ "0.5935407", "0.5799119", "0.57274634", "0.5251055", "0.5216755", "0.5208127", "0.51914763", "0.5188241", "0.51844305", "0.51384366", "0.5110785", "0.50392216", "0.5032419", "0.50289285", "0.50216997", "0.5015234", "0.49793556", "0.49583605", "0.49506435", "0.49433547", "0.49...
0.0
-1
returns the sum of the rbt
public int getSum(RedBlackTree.Node<Grade> root) { int sum, leftSum, rightSum; if (root == null) { sum = 0; return sum; } else { leftSum = getSum(root.leftChild); rightSum = getSum(root.rightChild); sum = root.data.getGrade() + leftSum + rightSum; return sum; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double getSum();", "double getSum();", "public long sum() {\n\t\tlong result = 0;\n\t\tfor (int i=0; i<numElements; i++) {\n\t\t\tresult += theElements[i];\n\t\t}\n\t\treturn result;\n\t}", "protected double t_weight_sum(int t) throws Exception\n\t{\n\t\tdouble sum = 0;\n\t\tint i, j;\n\t\tfor (i = 0; i < us...
[ "0.72815806", "0.72815806", "0.66178703", "0.66150814", "0.6559946", "0.6484806", "0.64720035", "0.6444395", "0.64154357", "0.6401702", "0.6361174", "0.6352429", "0.634397", "0.63335395", "0.63309425", "0.6301074", "0.6281039", "0.6258355", "0.6247553", "0.62400514", "0.62173...
0.6171125
23
Created by zuo81 on 2017/11/2.
public interface BaiDuApis { /** * http://tingapi.ting.baidu.com/v1/restserver/ting?method=baidu.ting.search.common&query=%E7%88%B1%E6%88%91%E8%BF%98%E6%98%AF%E4%BB%96&page_size=30&page_no=1&format=xml */ String Host = "http://tingapi.ting.baidu.com/v1/restserver/"; String Method_search = "baidu.ting.search.catalogSug"; //String Method_search = "baidu.ting.search.common"; String Method_lrc=""; String Method_play = "baidu.ting.song.play"; @GET("ting") Flowable<BaiDuMusicSearchBean> fetchMusicListInfo(@Query("method") String method, @Query("query") String query); @GET("ting") Flowable<BaiDuPlayBean> playMusicLink(@Query("method") String method, @Query("songid") String songId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private sta...
[ "0.6176789", "0.60350525", "0.59130424", "0.5902201", "0.5851774", "0.5851774", "0.5779596", "0.57728374", "0.57636034", "0.57563055", "0.57256424", "0.57205915", "0.57187176", "0.57044363", "0.5684619", "0.56841403", "0.5675412", "0.56746334", "0.5668198", "0.56631637", "0.5...
0.0
-1
if (opcode != 1)
@Override public boolean inventory(Player player, Item item, int opcode) { return false; // Clan channel = ClanRepository.get(player.clan); // if (channel == null) { // player.send(new SendMessage("You need to be in a clan to do this!")); // return true; // } // player.inventory.remove(item); // Item showcaseReward = new Item(Utility.randomElement(ClanUtility.getRewardItems(channel))); // channel.showcaseItems.add(showcaseReward.getId()); // player.send(new SendMessage("Inside the box you found " + showcaseReward.getName() + "! Showcase size: " + channel.showcaseItems.size() + "/28", SendMessage.MessageColor.DARK_PURPLE)); // return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic int getOpcode() {\n\t\treturn 0;\n\t}", "public boolean isRaw() {\n\t\treturn opcode == -1;\n\t}", "public int getOpcode();", "@Test\n public void testGetOpcodeOutOfBounds() {\n ProgramArea pa = new ProgramArea();\n\n Assert.assertEquals((char) 0, pa.getOpCode(10000, 1000...
[ "0.68995994", "0.6248813", "0.6104164", "0.598488", "0.5943446", "0.5879744", "0.585732", "0.5831113", "0.5799009", "0.5735142", "0.57147175", "0.5707415", "0.5696683", "0.5680226", "0.56739724", "0.5666925", "0.565286", "0.5631736", "0.5602061", "0.5601238", "0.5596838", "...
0.0
-1
User Defined Class to convert timestamp to date for EPL
public static String evaluteEventDate(String eventdate){ return eventdate.substring(0,10).replaceAll("-", ""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Timestamp getDate();", "Date getTimestamp();", "public Timestamp getDateTrx() \n{\nreturn (Timestamp)get_Value(\"DateTrx\");\n}", "@Override\n\tpublic Timestamp convert(Date source) {\n\t\treturn new Timestamp(source.getTime());\n\t}", "private TimestampUtils(){}", "public Timestamp() {}"...
[ "0.6918974", "0.6786316", "0.6705997", "0.6584736", "0.6542085", "0.65172446", "0.6416247", "0.6375941", "0.63594556", "0.63594556", "0.6223786", "0.6182695", "0.6182695", "0.6144844", "0.61262524", "0.61207616", "0.61079615", "0.60705197", "0.60705197", "0.60705197", "0.6070...
0.0
-1
Para barra de busqueda
public static int calcularCantPag(String productName, int idBodega) { try { Class.forName("com.mysql.cj.jdbc.Driver"); } catch (ClassNotFoundException e) { e.printStackTrace(); } String sql = "select * from producto where idBodega=? and lower(nombreProducto) like ? and estado='Existente';"; // numero de paginas int cantPag = 0; try (Connection conn = getConnection(); PreparedStatement pstmt = conn.prepareStatement(sql);) { pstmt.setInt(1, idBodega); pstmt.setString(2, "%"+productName+"%"); try (ResultSet rs = pstmt.executeQuery();) { while (rs.next()) { cantPag++; } } } catch (SQLException throwables) { throwables.printStackTrace(); } return (int) Math.ceil((double) cantPag / 5); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void busqueda() {\r\n\r\n try {\r\n\r\n String preg = JOptionPane.showInputDialog(\"Buscar:\");\r\n Query query = new Query(preg);\r\n QueryResult result = twitter.search(query);\r\n for (Status status : result.getTweets()) {\r\n System.out.p...
[ "0.74265087", "0.6297759", "0.628908", "0.6121721", "0.6058093", "0.5994586", "0.59661806", "0.58913374", "0.5862915", "0.586177", "0.5831649", "0.57134676", "0.5594367", "0.55827826", "0.5572099", "0.5530464", "0.5512699", "0.5477999", "0.5457421", "0.5453343", "0.54522526",...
0.0
-1
Para barra de busqueda
public static ArrayList<ProductoBean> listarProductoBodega(int pagina, String productName, int idBodega){ ArrayList<ProductoBean> listaProductos = new ArrayList<>(); int limit = (pagina-1)*5; String sql = "select idProducto, nombreProducto,descripcion,stock,precioUnitario from producto WHERE idBodega=? AND lower(nombreProducto) like ? AND estado='Existente' order by nombreProducto asc limit ?,5;"; // numero de paginas try (Connection conn = getConnection(); PreparedStatement pstmt = conn.prepareStatement(sql);) { pstmt.setInt(1, idBodega); pstmt.setString(2, "%"+productName+"%"); pstmt.setInt(3, limit); try(ResultSet rs = pstmt.executeQuery();){ while (rs.next()) { ProductoBean producto = new ProductoBean(); producto.setId(rs.getInt("idProducto")); producto.setNombreProducto(rs.getString("nombreProducto")); producto.setDescripcion(rs.getString("descripcion")); producto.setStock(rs.getInt("stock")); producto.setPrecioProducto(rs.getBigDecimal("precioUnitario")); listaProductos.add(producto); } } } catch (SQLException throwables) { throwables.printStackTrace(); } return listaProductos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void busqueda() {\r\n\r\n try {\r\n\r\n String preg = JOptionPane.showInputDialog(\"Buscar:\");\r\n Query query = new Query(preg);\r\n QueryResult result = twitter.search(query);\r\n for (Status status : result.getTweets()) {\r\n System.out.p...
[ "0.74268913", "0.63009197", "0.62898874", "0.61221474", "0.6060446", "0.5997728", "0.5967017", "0.58928037", "0.58667135", "0.5861851", "0.58317983", "0.5714243", "0.5596249", "0.55846286", "0.5572035", "0.5531256", "0.55133533", "0.5479468", "0.54602695", "0.5455972", "0.545...
0.0
-1
devuelve imagen por ID
public void listarImg(int id, HttpServletResponse response) { String sql = "select foto from producto where idProducto=?;"; InputStream inputStream = null; OutputStream outputStream = null; BufferedInputStream bufferedInputStream = null; BufferedOutputStream bufferedOutputStream = null; response.setContentType("image/*"); //que hace esto?? uu try (Connection conn = getConnection(); PreparedStatement pstmt = conn.prepareStatement(sql);) { outputStream = response.getOutputStream(); pstmt.setInt(1, id); try (ResultSet rs = pstmt.executeQuery()) { if (rs.next()) { inputStream = rs.getBinaryStream("foto"); } } bufferedInputStream = new BufferedInputStream(inputStream); bufferedOutputStream = new BufferedOutputStream(outputStream); int i = 0; while ((i = bufferedInputStream.read()) != -1) { bufferedOutputStream.write(i); } bufferedOutputStream.flush(); } catch (SQLException | IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setIdImagen(int idImagen) {\n this.idImagen = idImagen;\n }", "Receta getByIdWithImages(long id);", "@Override\n\tpublic Serializable getId() {\n\t\treturn imageId;\n\t}", "public Img getImage(long id){\n\n Img imageObj = null;\n\n List<Img> imgList = null;\n imgLis...
[ "0.7899682", "0.7026273", "0.68207836", "0.6755107", "0.67241037", "0.6718166", "0.67171675", "0.66526234", "0.6593473", "0.6520434", "0.6518734", "0.65025806", "0.63658273", "0.6354393", "0.6330008", "0.6312163", "0.6300024", "0.6253861", "0.6196979", "0.61956537", "0.617451...
0.62052757
18
WebElement element = driver.findElement(By.id("idlstib")); element.sendKeys(searchText);
public void doSearch(String searchText){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static WebElement textbox_search(WebDriver driver) {\n\t\treturn driver.findElement(By.name(searchBoxame));\n\t}", "private void enterCriteriaToSerachField(String text) {\n WebElement searchField = findElementWithWait(By.id(\"gh-ac\"));\n searchField.clear();\n searchField.sendKeys(te...
[ "0.7550838", "0.74796766", "0.72368234", "0.7013279", "0.70092946", "0.6975142", "0.6951811", "0.6834149", "0.6818684", "0.6814131", "0.6745402", "0.6739115", "0.6723523", "0.6696286", "0.65986", "0.6584224", "0.6564263", "0.65637314", "0.65614355", "0.65414304", "0.6535831",...
0.6187332
48
listDienTu = listdienTu; recyclerView.setHasFixedSize(true); DienTuAdapter dienTuAdapter = new DienTuAdapter(getContext(), listDienTu); RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getContext()); recyclerView.setLayoutManager(layoutManager); recyclerView.setAdapter(dienTuAdapter); dienTuAdapter.notifyDataSetChanged();
@Override public void HienThiDanhSach(List<DienTu> listdienTu) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setDataInRecyclerView(){\n KorisniciAdapter adapter = new KorisniciAdapter(this, korisniciList);\n recyclerView.setAdapter(adapter); // set the Adapter to RecyclerView\n }", "public void updateList(){\r\n preyFragmentAdapter=new PreyFragmentAdapter(CPreyArrayList,this);\r\n ...
[ "0.8043453", "0.76948285", "0.760445", "0.76038027", "0.7371197", "0.7350049", "0.7348287", "0.7257361", "0.72334206", "0.720633", "0.7163184", "0.7126515", "0.710096", "0.70947134", "0.7033039", "0.70305485", "0.69999266", "0.6991944", "0.6966989", "0.6931161", "0.69157284",...
0.0
-1
SQL must include a single bind variable. Of course it can be a join or a view.
public void setSql(String sql) { this.sql = sql; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String bind(Object value, ArrayList params) {\n if (value == null) {\n return bindNull();\n } else if (value instanceof String &&\n ((String) value).length() < 100) {\n \n // Use prepared statement parameters sparingly,\n ...
[ "0.5923541", "0.5582661", "0.55802524", "0.5350856", "0.52693534", "0.525487", "0.52449745", "0.52359825", "0.5224593", "0.5208767", "0.51709753", "0.5168279", "0.51557237", "0.5135506", "0.5120768", "0.5116174", "0.5096399", "0.50805986", "0.50684726", "0.5056208", "0.504308...
0.0
-1
Subclasses must implement this method to return an instance of the persistentClass based on this row in the database. The SQL can come from a join or a view.
protected abstract Object mapRow(ResultSet rs) throws SQLException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Clazz selectByPrimaryKey(Integer id);", "public Object getPersistedObject(Class myClass) {\n return this.queryDatabaseMasterSingle(myClass);\n }", "SpecialCircumstance selectByPrimaryKey(Long id);", "public <E extends Retrievable> E getObject(String sql, Class<E> clazz);", "public IMDBBaseEntity ...
[ "0.61504936", "0.6073048", "0.60392714", "0.5977644", "0.59429663", "0.5935045", "0.5902389", "0.58601415", "0.58222324", "0.5810269", "0.5780433", "0.5766537", "0.5757292", "0.5749621", "0.5716479", "0.56780845", "0.5676154", "0.5664123", "0.56610185", "0.56515485", "0.56472...
0.0
-1
Adds the given element to this list.
boolean add(T element);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void add(T element) {\n\t\tthis._list.add(element);\r\n\t}", "public @Override boolean add(E element) {\n \tappend(element);\n \treturn true;\n }", "@Override\n public void add(T element) {\n add(size(), element);\n }", "public void add(E element) {\n\t\t// your co...
[ "0.8227089", "0.7758959", "0.77291036", "0.7678395", "0.7546696", "0.7515114", "0.75057554", "0.74977493", "0.74977493", "0.74787366", "0.7454779", "0.7424897", "0.7424578", "0.7383371", "0.7331614", "0.7324593", "0.73225075", "0.7295723", "0.7274045", "0.72362995", "0.719746...
0.6275458
98
Saves the current timestamp as last contacts update.
public void setLastContactsUpdate() { long time = new Date().getTime(); preferences.edit() .putLong(LAST_CONTACTS_UPDATE, time) .apply(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getLastContact() {\r\n\t\treturn lastContactTimestamp.get();\r\n\t}", "void setLastUpdatedTime();", "void saveLastServerUpdate(Date date);", "public Long getLastContactsUpdate() {\n return preferences.getLong(LAST_CONTACTS_UPDATE, 0);\n }", "public void updateLastSeenTime() {\n\t\tset...
[ "0.63897043", "0.63576984", "0.6104169", "0.6101263", "0.60902333", "0.60322434", "0.5876753", "0.58443224", "0.5832012", "0.58185434", "0.5790274", "0.5756266", "0.5754455", "0.5719827", "0.57041603", "0.567363", "0.5672372", "0.5668678", "0.56494844", "0.56456065", "0.56215...
0.77040744
0
Returns the timestamp of the last contacts update.
public Long getLastContactsUpdate() { return preferences.getLong(LAST_CONTACTS_UPDATE, 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getLastContact() {\r\n\t\treturn lastContactTimestamp.get();\r\n\t}", "long getLastUpdatedTime();", "@SuppressWarnings(\"unused\")\n Date getLastUpdateTime();", "public long getLastUpdateTs() {\n return lastUpdateTs;\n }", "public long getLastUpdateDate() {\n return (Long)content....
[ "0.77531934", "0.76753753", "0.75546145", "0.75265676", "0.73718905", "0.7225474", "0.7192681", "0.7179965", "0.71786857", "0.7156033", "0.7143417", "0.7135736", "0.712326", "0.7101145", "0.7101145", "0.7094795", "0.7071427", "0.705129", "0.705129", "0.705129", "0.70338476", ...
0.7780933
0
/ access modifiers changed from: protected
public abstract String getChildTitle();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.73744047", "0.7040692", "0.692117", "0.69076973", "0.6844561", "0.68277687", "0.68048066", "0.6581614", "0.653803", "0.6500888", "0.64905626", "0.64905626", "0.6471316", "0.64376974", "0.64308083", "0.64308083", "0.642771", "0.6424499", "0.6419003", "0.64083034", "0.640539...
0.0
-1
/ access modifiers changed from: protected
public abstract int getLayoutId();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.7375753", "0.70422196", "0.69218373", "0.6907941", "0.6845266", "0.68283623", "0.6805162", "0.6583373", "0.653852", "0.6502129", "0.64900213", "0.64900213", "0.6471215", "0.64374804", "0.6431033", "0.6431033", "0.6428289", "0.642479", "0.6418873", "0.6408808", "0.64064246"...
0.0
-1
/ access modifiers changed from: protected
public int getThemeId() { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.7375959", "0.70425177", "0.69218665", "0.6908857", "0.68462455", "0.68293995", "0.6805953", "0.6583417", "0.65397364", "0.65014184", "0.6491877", "0.6491877", "0.6472813", "0.64386034", "0.6432003", "0.6432003", "0.64291835", "0.6425716", "0.6419082", "0.6409203", "0.64066...
0.0
-1
/ access modifiers changed from: protected
public abstract void initView();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.640...
0.0
-1
/ access modifiers changed from: protected
public boolean useBaseLayout() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.73744047", "0.7040692", "0.692117", "0.69076973", "0.6844561", "0.68277687", "0.68048066", "0.6581614", "0.653803", "0.6500888", "0.64905626", "0.64905626", "0.6471316", "0.64376974", "0.64308083", "0.64308083", "0.642771", "0.6424499", "0.6419003", "0.64083034", "0.640539...
0.0
-1
/ access modifiers changed from: protected
public void onCreate(@Nullable Bundle bundle) { this.loadingDialog = new LoadingDialog(this); setTheme(getThemeId() == 0 ? R.style.XportsTheme : getThemeId()); super.onCreate(bundle); BarUtils.setStatusBarLightMode(this, true); BarUtils.setStatusBarColor(this, -1); if (useBaseLayout()) { setContentView(R.layout.activity_buss_base); this.rlRoot = findViewById(R.id.rl_base); this.mIvBack = (ImageView) findViewById(R.id.iv_back); this.mIvRight = (ImageView) findViewById(R.id.iv_right); this.mIvBack.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { BaseBussActivity.this.finish(); } }); this.topSpace = findViewById(R.id.v_top_space); this.rlTitleBar = findViewById(R.id.rl_bar); this.mTvTitle = (TextView) findViewById(R.id.tv_title); this.mTvRight = (TextView) findViewById(R.id.tv_right); this.llNoData = findViewById(R.id.ll_no_data); this.loadingView = findViewById(R.id.ll_loading); this.tvTip = (TextView) findViewById(R.id.tv_tip); this.mTvTitle.setText(getChildTitle() == null ? "" : getChildTitle()); this.mContainer = (FrameLayout) findViewById(R.id.container); View inflate = View.inflate(this, getLayoutId(), (ViewGroup) null); if (this.mContainer.getChildCount() > 0) { this.mContainer.removeAllViews(); } this.mContainer.addView(inflate); } else { setContentView(getLayoutId()); } initView(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.7375753", "0.70422196", "0.69218373", "0.6907941", "0.6845266", "0.68283623", "0.6805162", "0.6583373", "0.653852", "0.6502129", "0.64900213", "0.64900213", "0.6471215", "0.64374804", "0.6431033", "0.6431033", "0.6428289", "0.642479", "0.6418873", "0.6408808", "0.64064246"...
0.0
-1
/ access modifiers changed from: protected
public void useBlackTitle(boolean z) { if (this.mIvBack != null) { this.mIvBack.setImageResource(z ? R.drawable.ic_back_black : R.drawable.ic_back_white); } if (this.mTvTitle != null) { this.mTvTitle.setTextColor(z ? getResources().getColor(R.color.black_353) : -1); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.7375959", "0.70425177", "0.69218665", "0.6908857", "0.68462455", "0.68293995", "0.6805953", "0.6583417", "0.65397364", "0.65014184", "0.6491877", "0.6491877", "0.6472813", "0.64386034", "0.6432003", "0.6432003", "0.64291835", "0.6425716", "0.6419082", "0.6409203", "0.64066...
0.0
-1
/ access modifiers changed from: protected
public void underStatusBar(boolean z, boolean z2) { if (this.topSpace != null) { this.topSpace.setVisibility(z ? 8 : 0); } if (this.rlRoot != null) { this.rlRoot.setFitsSystemWindows(false); BarUtils.setStatusBarLightMode(this, !z2); useBlackTitle(!z2); RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) this.rlTitleBar.getLayoutParams(); layoutParams.setMargins(0, BarUtils.getStatusBarHeight(), 0, 0); this.rlTitleBar.setLayoutParams(layoutParams); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.640...
0.0
-1
/ access modifiers changed from: protected
public void setTitleBarColor(int i) { if (this.rlTitleBar != null) { this.rlTitleBar.setBackgroundColor(i); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.73744047", "0.7040692", "0.692117", "0.69076973", "0.6844561", "0.68277687", "0.68048066", "0.6581614", "0.653803", "0.6500888", "0.64905626", "0.64905626", "0.6471316", "0.64376974", "0.64308083", "0.64308083", "0.642771", "0.6424499", "0.6419003", "0.64083034", "0.640539...
0.0
-1
/ access modifiers changed from: protected
public void onStop() { if (this.loadingCount > 0) { this.loadingCount = 1; hideLoading(); } super.onStop(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.7375753", "0.70422196", "0.69218373", "0.6907941", "0.6845266", "0.68283623", "0.6805162", "0.6583373", "0.653852", "0.6502129", "0.64900213", "0.64900213", "0.6471215", "0.64374804", "0.6431033", "0.6431033", "0.6428289", "0.642479", "0.6418873", "0.6408808", "0.64064246"...
0.0
-1
/ access modifiers changed from: protected
public View getEmptyView(String str) { View inflate = View.inflate(this, R.layout.empty_view, (ViewGroup) null); ((TextView) inflate.findViewById(R.id.tv_tip)).setText(str); return inflate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.7375959", "0.70425177", "0.69218665", "0.6908857", "0.68462455", "0.68293995", "0.6805953", "0.6583417", "0.65397364", "0.65014184", "0.6491877", "0.6491877", "0.6472813", "0.64386034", "0.6432003", "0.6432003", "0.64291835", "0.6425716", "0.6419082", "0.6409203", "0.64066...
0.0
-1
Created by JCM on 18.11.2018.
public interface ShopItem { Drawable getIcon(); String getDisplayName(); String getDescription(); String getDataName(); BigDecimal getCost(int count); void init(GameResources resources, AtomicInteger progress); int getProgressCount(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpubl...
[ "0.5878899", "0.57911754", "0.5610446", "0.55861413", "0.55798686", "0.55587196", "0.5538971", "0.5538971", "0.5521804", "0.5521804", "0.5521804", "0.5521804", "0.5521804", "0.5521804", "0.5521718", "0.55193204", "0.5509597", "0.54954475", "0.54675", "0.54604375", "0.54599625...
0.0
-1
endregion region User Interface On button pressed listener for new face enrollment.
private void onButtonPressedEnrollNewFaceId() { // Do proper action based on current state. if (CMain.sharedInstance().getFaceIdState() == CMain.GemaloFaceIdState.GemaloFaceIdStateInited) { enroll(); } else { unenroll(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\tmCurriculumVitaeInterface.onAddPersonEducation();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\tmCurriculumVitaeInterface.onAddPersonEducation();\n\t\t\t\t\t}", "private void enroll() {\n final Enroll...
[ "0.6611502", "0.6611502", "0.62455326", "0.6233416", "0.61880773", "0.61880773", "0.5999359", "0.5999359", "0.5984535", "0.5984535", "0.592286", "0.5900516", "0.58774155", "0.5829845", "0.57969826", "0.5795091", "0.5792503", "0.5708887", "0.5696943", "0.56911117", "0.56645477...
0.79367477
0
endregion region Private Helpers Enrolls new face.
private void enroll() { final EnrollFragment enrollmentFragment = FaceManager.getInstance().getEnrollmentFragment(10, 1); enrollmentFragment.setEnrollmentCallback(new EnrollmentCallback() { @Override public void onEnrollmentSuccess() { CMain.sharedInstance().updateGemaltoFaceIdStatus(); } @Override public void onCancel() { getMainActivity().hideLastStackFragment(); } @Override public void onEnrollmentFailed(final FaceAuthStatus status) { getMainActivity().showErrorIfExists(status.toString()); } @Override public void onEnrollmentRetry(final FaceAuthStatus status, final int remainingRetries) { // Unused } @Override public void onError(final IdpException exception) { getMainActivity().showErrorIfExists(exception.getLocalizedMessage()); } }); getActivity().getSupportFragmentManager().beginTransaction() .setCustomAnimations(R.anim.fade_in, R.anim.fade_out) .replace(R.id.fragment_container, enrollmentFragment, null) .addToBackStack(null) .commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void onButtonPressedEnrollNewFaceId() {\n // Do proper action based on current state.\n if (CMain.sharedInstance().getFaceIdState() == CMain.GemaloFaceIdState.GemaloFaceIdStateInited) {\n enroll();\n } else {\n unenroll();\n }\n }", "@Override\n pub...
[ "0.6608037", "0.6338823", "0.6213574", "0.60711616", "0.59589124", "0.5878369", "0.5872045", "0.58694726", "0.582577", "0.5810828", "0.58022267", "0.5791728", "0.57552576", "0.5754856", "0.5754856", "0.57467204", "0.57302743", "0.57138187", "0.5634004", "0.5630731", "0.561232...
0.6003522
4
Use the Builder class for convenient dialog construction
public Dialog onCreateDialog(Bundle savedInstanceState) { AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); LayoutInflater inflater = getActivity().getLayoutInflater(); View layout = inflater.inflate(R.layout.add_item_layout, null); builder.setView(layout) .setPositiveButton("Add", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { int price = (int) (Float.parseFloat(((EditText)layout.findViewById(R.id.price)).getText().toString())*100); Group g = Group.getCurrentGroup(); for(int i = 0; i < Integer.parseInt(((EditText) layout.findViewById(R.id.quantity)).getText().toString()); i++) { g.addItem( new Item( ((EditText)layout.findViewById(R.id.item_name)).getText().toString(), price ) ); } getDialog().dismiss(); } }) .setNegativeButton("Cancel", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { getDialog().dismiss(); } }) .setTitle("Add Items"); // Create the AlertDialog object and return it return builder.create(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Dialog() {\n\t}", "public abstract Dialog createDialog(DialogDescriptor descriptor);", "void makeDialog()\n\t{\n\t\tfDialog = new ViewOptionsDialog(this.getTopLevelAncestor());\n\t}", "public Dialog<String> createDialog() {\n\t\t// Creating a dialog\n\t\tDialog<String> dialog = new Dialog<String>();\n...
[ "0.7059678", "0.69778734", "0.6928614", "0.69230276", "0.68658495", "0.6728831", "0.66788745", "0.66785765", "0.66378874", "0.6618399", "0.6550773", "0.65402544", "0.6524975", "0.6515765", "0.6467635", "0.6463968", "0.64518505", "0.64262044", "0.64194524", "0.64194524", "0.63...
0.0
-1
this method will return the list item
@Override public View getView(int position, View convertView, ViewGroup parent) { //getting the layoutinflater ViewHolder viewHolder = new ViewHolder(); if(convertView==null) { LayoutInflater inflater = LayoutInflater.from(mCtx); //creating a view with our xml layout convertView = inflater.inflate(R.layout.list_item, null, true); //getting text views viewHolder.productcat = convertView.findViewById(R.id.text_pro_cat); viewHolder.productname = convertView.findViewById(R.id.pro_name11); viewHolder.productQ = convertView.findViewById(R.id.pro_price); viewHolder.productbidP = convertView.findViewById(R.id.text_b_price); convertView.setTag(viewHolder); }else{ viewHolder = (ViewHolder)convertView.getTag(); } Product pro = ProductList.get(position); viewHolder.productcat.setText(pro.getPcategory()); viewHolder.productname.setText(pro.getPname()); viewHolder.productQ.setText(pro.getPquntity()); viewHolder.productbidP.setText(pro.getPbidprice()); //returning the listitem return convertView; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Object getItem(int arg0) {\n return list.get(arg0);\n }", "@Override\r\n\tpublic Object getItem(int posstion) {\n\t\treturn list.get(posstion);\r\n\t}", "@Override\n public Object getItem(int index) {\n return internalList.get(index);\n }", "@Override\r\n\tpub...
[ "0.7364503", "0.7217083", "0.71966565", "0.7171675", "0.71384525", "0.71384525", "0.71384525", "0.71384525", "0.7110048", "0.7053029", "0.7026571", "0.69809425", "0.69707894", "0.69476265", "0.69343317", "0.69199723", "0.6909549", "0.69018805", "0.68784946", "0.6863704", "0.6...
0.0
-1
Method that generates a random amount of gas to be used for acceleration (between minx10 and maxx10)
static int createInjection(int min, int max){ int myInjection = (int)(Math.random() * 10 * (Math.random() > 0.5 ? max : min)); return myInjection; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getRandom() {\n return 20*Math.random() - 10;\n }", "public int randomGQ() {\n\t\treturn(getRandomInteger(10,100));\n\t}", "public static int getRandomAmount(){\n return rand.nextInt(1000);\n }", "private static double randomGenerator(double min, double max) {\n retur...
[ "0.6274865", "0.62444675", "0.6217049", "0.61659837", "0.6074636", "0.60106254", "0.60011625", "0.59829104", "0.5969683", "0.59613955", "0.59191954", "0.5912804", "0.59079254", "0.58759487", "0.585301", "0.58482814", "0.58469003", "0.582991", "0.5803956", "0.5795203", "0.5782...
0.53247046
92
TODO Autogenerated method stub
public static void main(String[] args) { System.out.println("enter n"); Scanner sc =new Scanner(System.in); int n=sc.nextInt(); int arr[]=new int[n]; problem2 pb=new problem2(arr,n); pb.read(); pb.display(); pb.sort(); pb.search(); }
{ "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
Check Coupon Stock Check User's Assigments (Check Max Coupons Per User)
public Assigment createAssigment(Assigment newAssigment){ Assigment tempAssigment = null; if (assigmentRepo.findAssigmentsByClientId(newAssigment.getClientId()).size()<newAssigment.getCoupon().getMaxPerUser() && newAssigment.getCoupon().getStock()>0){ // Create Assigment tempAssigment = assigmentRepo.save(newAssigment); // Update Coupon Stock Coupon tempCoupon = newAssigment.getCoupon(); tempCoupon.setStock(tempCoupon.getStock()-1); couponRepo.save(tempCoupon); } return tempAssigment; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getPurchasedCouponsByMaxPriceValidation(long userId, float maxPrice) throws ApplicationException {\n\t\tif(maxPrice<=0) {\n\t\t\tthrow new ApplicationException(ExceptionType.INVALID_PRICE, \"Invalid price: \"+maxPrice);\n\t\t}\n\t}", "public void consume (User user) {\n \n for ...
[ "0.57182837", "0.56227833", "0.55128384", "0.54929215", "0.5384238", "0.53750426", "0.5373167", "0.533748", "0.5307374", "0.5294597", "0.5257419", "0.5255587", "0.52423257", "0.5234337", "0.5212647", "0.52013606", "0.5155957", "0.5107028", "0.5072857", "0.50586337", "0.504513...
0.0
-1
store the UserList into DB
public void insertUserListFromStatusList(List<Status> statusList) { Iterator<Status> it = statusList.iterator(); while (it.hasNext()) { Status st = it.next(); User user = st.getUser(); InsertUser(user); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void saveRealtimeListUsers(final RealtimeList realtimeList) {\n deleteRealtimeListUsers(realtimeList.getId());\n\n // Add in all of the entries.\n ejt.batchUpdate(\"insert into realtime_list_users values (?,?,?)\", new BatchPreparedStatementSetter() {\n @Override\n public...
[ "0.72582513", "0.7002883", "0.6896397", "0.68731284", "0.67802614", "0.67521495", "0.6730171", "0.66945666", "0.6682132", "0.6621859", "0.6603017", "0.65857446", "0.6525294", "0.64362484", "0.6429528", "0.642429", "0.6420439", "0.63764626", "0.6373", "0.6370366", "0.6351594",...
0.58630073
65
Run the UserAPI() constructor test.
@Test public final void testUserAPICreateUserAPI() { UserAPI result = new UserAPI(); assertNotNull(result); // add additional test code here }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testCtor() {\n instance = new User();\n\n assertNull(\"'username' should be correct.\", TestsHelper.getField(instance, \"username\"));\n assertNull(\"'defaultTab' should be correct.\", TestsHelper.getField(instance, \"defaultTab\"));\n assertNull(\"'networkId' sho...
[ "0.70301044", "0.69909", "0.69628674", "0.6864888", "0.6825367", "0.67191964", "0.6646407", "0.6631769", "0.6629641", "0.6615913", "0.6605696", "0.66049117", "0.6584917", "0.6576174", "0.65434575", "0.65434575", "0.65434575", "0.6541131", "0.65314126", "0.65268254", "0.650809...
0.7794997
0
Run the Response createUserInJSON(String) method test.
@Test public final void testCreateUserInJSONCorrectValues() throws Exception { UserAPI fixture = new UserAPI(); String input = "{\"userName\":\"Rodolfo\", \"password\": \"213\"}"; Response result = fixture.createUserInJSON(input); assertNotNull(result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testCreate(){\n\t\t\n\t\tString jsonStr = \"{'companyName':'Lejia', 'companyNameLocal':'Lejia', 'companyAddress':'Guangdong', 'txtEmail':'qpsandy@126.com', 'telephone':'17721217320', 'contactPerson':'Molly'}\";\n\t\tcreateUser.createUserMain(jsonStr);\n\t\t\n\t}", "@Test\n public final void...
[ "0.76051474", "0.75289625", "0.70839137", "0.6963308", "0.6836087", "0.67726374", "0.6681655", "0.66138154", "0.66107154", "0.6606037", "0.6604275", "0.64799446", "0.6438539", "0.63786167", "0.63369256", "0.63171047", "0.6287508", "0.62601644", "0.62437385", "0.62399304", "0....
0.778677
0
Run the Response createUserInJSON(String) method test.
@Test public final void testCreateUserInJSONNullUsername() { try { String input = "{\"userName\":\"\", \"password\": \"123\"}"; UserAPI fixture = new UserAPI(); fixture.createUserInJSON(input); } catch (WebApplicationException e) { assertNotNull(Response.Status.NOT_ACCEPTABLE.getStatusCode()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public final void testCreateUserInJSONCorrectValues()\n throws Exception {\n UserAPI fixture = new UserAPI();\n String input = \"{\\\"userName\\\":\\\"Rodolfo\\\", \\\"password\\\": \\\"213\\\"}\";\n Response result = fixture.createUserInJSON(input);\n assertNotNull(result);\n }", "@Test...
[ "0.7787556", "0.76061", "0.75301325", "0.70851046", "0.6963875", "0.6771514", "0.66813284", "0.66148293", "0.66097546", "0.66076833", "0.66057175", "0.6480459", "0.644025", "0.6380692", "0.6338281", "0.63172984", "0.62886274", "0.6259959", "0.62459236", "0.6241918", "0.622891...
0.68377733
5
Run the Response createUserInJSON(String) method test.
@Test public final void testCreateUserInJSONNullPassword() { try { String input = "{\"userName\":\"Rodolfo\", \"password\": \"\"}"; UserAPI fixture = new UserAPI(); fixture.createUserInJSON(input); } catch (WebApplicationException e) { assertNotNull(Response.Status.NOT_ACCEPTABLE.getStatusCode()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public final void testCreateUserInJSONCorrectValues()\n throws Exception {\n UserAPI fixture = new UserAPI();\n String input = \"{\\\"userName\\\":\\\"Rodolfo\\\", \\\"password\\\": \\\"213\\\"}\";\n Response result = fixture.createUserInJSON(input);\n assertNotNull(result);\n }", "@Test...
[ "0.7786716", "0.7605901", "0.75286883", "0.7084648", "0.69661707", "0.6835771", "0.6772077", "0.66825265", "0.66095597", "0.66080785", "0.66048115", "0.64811504", "0.6440878", "0.637991", "0.6339571", "0.6316681", "0.62866694", "0.62606055", "0.6246766", "0.6241312", "0.62293...
0.6613088
8
Run the Response createUserInJSON(String) method test.
@Test public final void testCreateUserInJSONUserAlreadyExists() { try { UserAPI fixture = new UserAPI(); String input = "{\"userName\":\"Txuso\", \"password\": \"213\"}"; fixture.createUserInJSON(input); } catch (WebApplicationException e) { assertNotNull(Response.Status.NOT_ACCEPTABLE.getStatusCode()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public final void testCreateUserInJSONCorrectValues()\n throws Exception {\n UserAPI fixture = new UserAPI();\n String input = \"{\\\"userName\\\":\\\"Rodolfo\\\", \\\"password\\\": \\\"213\\\"}\";\n Response result = fixture.createUserInJSON(input);\n assertNotNull(result);\n }", "@Test...
[ "0.77878577", "0.76063615", "0.7085481", "0.6963861", "0.68372935", "0.6773126", "0.66820353", "0.66145265", "0.6610297", "0.66062194", "0.66059613", "0.64795965", "0.6438826", "0.6381037", "0.6336425", "0.63187987", "0.6287596", "0.6261734", "0.624429", "0.62417483", "0.6230...
0.75301814
2
TODO Autogenerated method stub
@Override public void horario() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void crearVehiculo() { }
{ "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
does not use base 1 indexing, converts at end, uses 1 indexing
public static void main(String[] args) throws Exception{ final int source = 224; final int end = 6; //filereader/writer File outputFile = new File("output.txt"); String inputFile = "/Users/admin/Desktop/test_input_2.txt"; FileWriter writer = new FileWriter(outputFile); FileParser parser = new FileParser(); //231 Hexagon array int[] lattice = parser.parseFile(inputFile); //array of nodes creating a 'map' of the hexagonal lattice Map map = new Map(lattice); //create map of only valid nodes Dijkstras shortPath = new Dijkstras(); ArrayList<Integer> path = shortPath.dijkstra(map.map, source,end); //sort map int sum = 0; // + 2 because its base 0 and because its only 231 in length, not 233 for(int i = 0; i < path.size();i++){ writer.write((path.get(i).intValue() + 2) + " Value: " + lattice[path.get(i)] + "\n"); sum+= lattice[path.get(i)]; } writer.write("MINIMAL-COST PATH COSTS: " + sum); writer.close(); System.out.print("File is located at: " + outputFile.getAbsolutePath()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private short toDec(byte[] source, short index){\r\n \treturn (short)(source[index] - (short)48);\r\n }", "private int xyTo1D(int i, int j) {\n int result = j + number * (i - 1) - 1;\n return result;\n }", "public void convert(){\n afterValue = firstValue * 1000;\n }", "priva...
[ "0.5677112", "0.5642137", "0.5556897", "0.5556661", "0.55255455", "0.5475084", "0.5403359", "0.53421026", "0.5304736", "0.5225564", "0.5175659", "0.5166062", "0.51525635", "0.5146398", "0.51293075", "0.51285595", "0.5100142", "0.50930923", "0.5088595", "0.50831693", "0.506926...
0.0
-1
When image is choosen get data as uri and set placeholder image
@Override public void OnActivityResult(int requestCode, int ResultCode, Intent resultData) { if(requestCode == READ_REQUEST_CODE && resultCode == Activity.RESULT_OK) { Uri uri = null; if(resultData != null) { uri = resultData.getData(); imagePlaceholder.setImageUri(null); imagePlaceholder.setImageUri(uri); } else { //trow an exception and catch it with sentry } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if(resultCode == RESULT_OK && requestCode ==200){\n Uri uri_img=data.getData();\n try{\n ...
[ "0.68719625", "0.6865074", "0.68272656", "0.6785519", "0.6783037", "0.67107695", "0.670734", "0.6701065", "0.6625924", "0.6602422", "0.65900373", "0.65417284", "0.65324146", "0.65296483", "0.6525018", "0.6518786", "0.6490943", "0.6465136", "0.6464288", "0.64582", "0.6437702",...
0.6019138
86
place to add "save that constructed picture" function TODO:make directory or helper class for all kind of functions that can be used into other classes except of parent's
public static void savePictureToDeviceStorage(File file) { //check file format String file_extension = getFileExtension(file); if(file_extension.equals("png") || file_extension.equals("jpg")) { } else { throw new Exception("format not supported"); } //screate intent with file //create dialog "where to save it?" //create Lambda? in case "OK" is clicked //create Lambda? in case "Calncel" is clicked }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void save(Images image);", "private void saveFile() {\r\n\t\tFile file = new File(this.picture.getFileName());\r\n\r\n\t\ttry {\r\n\t\t\tImageIO.write(this.picture.getBufferedImage(),\r\n\t\t\t\t\tthis.picture.getExtension(), file);\r\n\t\t} catch (IOException e) {\r\n\t\t\tJOptionPane.showMessageDialog(this.pic...
[ "0.71454525", "0.6383509", "0.6314995", "0.60973155", "0.6029533", "0.594481", "0.5932056", "0.5925817", "0.5890173", "0.5869071", "0.5853863", "0.582556", "0.5822972", "0.58195", "0.58119416", "0.58062", "0.5804051", "0.5802839", "0.5802015", "0.57972836", "0.57865626", "0...
0.0
-1
place to add "share picture you made" function
public static List<File> getAllFonts(string dir) { File d_file = new File(dir); if(dir != null && d_file != null) { List<File> fl = (List<File>) (FileUtils.listFiles(d_file, TrueFileFilter.INSTANCE, TrueFileFilter.INSTANCE)); return fl; } else { //if nothing is founded return list that contains only null return new List<File>(null); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addShareAction() {\n\t\t// TODO Auto-generated method stub\n\t\tWindow window = getWindow();\n\t\tint width = getWindowManager().getDefaultDisplay().getWidth();\n\t\tint height = getWindowManager().getDefaultDisplay().getHeight();\n\t\tString shareContent = \"\" + 100 * mRightResultCount/mImagesID.siz...
[ "0.7454517", "0.7165976", "0.69674194", "0.6956904", "0.68801826", "0.68285596", "0.68212336", "0.67874056", "0.67296576", "0.6674543", "0.6667659", "0.66642797", "0.66410106", "0.6578734", "0.6554298", "0.65264887", "0.65183127", "0.64872974", "0.6483907", "0.6473988", "0.64...
0.0
-1
Constructor: creates 2 mat objects: 1 for the raw image; other for the processed image
public CaptureImage() { System.loadLibrary(Core.NATIVE_LIBRARY_NAME); capturedFrame = new Mat(); processedFrame = new Mat(); board = new byte[32]; for (int i=0;i<board.length;i++){ board[i] = 0; } captured = new byte[12]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Mat2Image() {\n }", "public CArrayFacade<CArrayFacade<Float>> getMat() throws IOException\n\t{\n\t\tClass<?>[] __dna__targetTypes = new Class[]{CArrayFacade.class, Float.class};\n\t\tint[] __dna__dimensions = new int[]{\n\t\t\t4,\n\t\t\t4\n\t\t};\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn new C...
[ "0.6651327", "0.59921104", "0.5882632", "0.58635604", "0.57510495", "0.56905705", "0.5612386", "0.5588766", "0.55601096", "0.5558853", "0.55513597", "0.5545821", "0.55192345", "0.55006343", "0.546405", "0.5456735", "0.54565656", "0.54321074", "0.5428775", "0.5381529", "0.5379...
0.58157766
4
Determines where captured pieces are
public void findCaptured(Mat in) { int vsegment = in.rows() / 8; // only accounts 8 playable int hsegment = in.cols() / 12; // 8 playable, 2 capture, 2 extra int offset; // offset for playable board int capSquares = 12; // number of capture squares int rowNum = 1; // starting row number for capture squares int rightdx = 48; int leftdx = 0; offset = hsegment; int count = 0; // keep track of captured squares // left: end user, right: system for (int i = 0; i < capSquares; i++) { // find where roi should be Point p1 = new Point(offset + count * hsegment, rowNum * vsegment); // top left point of rectangle (x,y) Point p2 = new Point(offset + (count + 1) * hsegment, (rowNum + 1) * vsegment); // bottom right point of rectangle (x,y) // create rectangle that is board square Rect bound = new Rect(p1, p2); char color; // frame only includes rectangle Mat roi = new Mat(in, bound); // get the color color = identifyColor(roi); switch(color) { case COLOR_BLUE: //Imgproc.rectangle(in, p1, p2, new Scalar(255, 0, 0), 3); Core.rectangle(in, p1, p2, new Scalar(255, 0, 0), 2); captured[i] = 1; break; case COLOR_ORANGE: //Imgproc.rectangle(in, p1, p2, new Scalar(0, 128, 255), 3); Core.rectangle(in, p1, p2, new Scalar(0, 128, 255), 2); captured[i] = 1; break; case COLOR_WHITE: //Imgproc.rectangle(in, p1, p2, new Scalar(255, 255, 255), 3); Core.rectangle(in, p1, p2, new Scalar(255, 255, 255), 2); captured[i] = 0; break; case COLOR_BLACK: //Imgproc.rectangle(in, p1, p2, new Scalar(0, 0, 0), 3); Core.rectangle(in, p1, p2, new Scalar(255, 255, 255), 2); captured[i] = 0; break; } count++; if (count == 1) { offset = hsegment * 10 - rightdx; } else if (count == 2) { count = 0; rightdx -= 6; leftdx += 6; offset = hsegment - leftdx; rowNum++; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void startCapturing() {\n //YOUR CODE HERE\n\t if (hasCaptured() == false) {\n\t\t pieceCaptured = true;\n\t }\n }", "public boolean hasCaptured() {\n //YOUR CODE HERE\n\t return pieceCaptured;\n }", "public void finishCapturing() {\n //YOUR CODE HERE\n\t pieceCaptured = false;\n\t \n }", "...
[ "0.67262185", "0.632495", "0.62690675", "0.6188067", "0.59315616", "0.5861053", "0.57942736", "0.5731045", "0.5699853", "0.5690396", "0.5688186", "0.56852245", "0.56687844", "0.56564635", "0.5644066", "0.5635285", "0.56254995", "0.5617616", "0.55944145", "0.5590013", "0.55713...
0.60089964
4