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
Registers dynamic metrics sources that collect metrics in each metrics collection cycle.
void registerDynamicMetricsProvider(DynamicMetricsProvider metricsProvider);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RefreshScope\n @Bean\n public MetricRegistry metrics() {\n final MetricRegistry metrics = new MetricRegistry();\n metrics.register(\"jvm.gc\", new GarbageCollectorMetricSet());\n metrics.register(\"jvm.memory\", new MemoryUsageGaugeSet());\n metrics.register(\"thread-states\", ne...
[ "0.55436873", "0.55184567", "0.5461645", "0.54273015", "0.5370312", "0.52429014", "0.520336", "0.50914913", "0.5053112", "0.5029102", "0.501772", "0.5010736", "0.50086033", "0.49872833", "0.49747908", "0.4954576", "0.4889185", "0.48823902", "0.48113513", "0.48060358", "0.4787...
0.69791794
0
Deregisters the given dynamic metrics provider. The metrics collection cycles after this call will not call the given metrics provider until it is registered again.
void deregisterDynamicMetricsProvider(DynamicMetricsProvider metricsProvider);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void registerDynamicMetricsProvider(DynamicMetricsProvider metricsProvider);", "private void metricUnregistering (ServiceReference srefMetric) {\n // Retrieve the service ID\n Long serviceId =\n (Long) srefMetric.getProperty(Constants.SERVICE_ID);\n logInfo(\n ...
[ "0.65925914", "0.6286833", "0.5847112", "0.55177337", "0.5371794", "0.5203837", "0.5143103", "0.5111942", "0.5046652", "0.49941134", "0.4979351", "0.49665987", "0.49543938", "0.49235937", "0.49128512", "0.49117503", "0.4865559", "0.4861426", "0.48588753", "0.4833708", "0.4786...
0.8796114
0
Registers a probe. If a probe for the given name exists, it will be overwritten.
<S> void registerStaticProbe(S source, MetricDescriptor descriptor, String name, ProbeLevel level, ProbeUnit unit, ProbeFunction function);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addProbe(IProbe p) {\n\t\tthis.probes.put(p.getProbeName(), p);\n\t\tp.attachQueue(this.queue);\n\t\tp.attachLogger(this.logger);\n\t}", "public void insertProbe(RadioProbe p) {\n probes.add(p);\n }", "<S> void registerStaticProbe(S source, String name, ProbeLevel level, ProbeUnit unit,...
[ "0.64716804", "0.63866746", "0.635722", "0.6300919", "0.6253267", "0.59713084", "0.5791431", "0.5788306", "0.5646523", "0.5638123", "0.5453322", "0.5205911", "0.515622", "0.5141216", "0.51320237", "0.5113913", "0.5111678", "0.50694585", "0.50520885", "0.504041", "0.49419662",...
0.58107
6
Registers a probe. If a probe for the given name exists, it will be overwritten.
<S> void registerStaticProbe(S source, String name, ProbeLevel level, LongProbeFunction<S> function);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addProbe(IProbe p) {\n\t\tthis.probes.put(p.getProbeName(), p);\n\t\tp.attachQueue(this.queue);\n\t\tp.attachLogger(this.logger);\n\t}", "public void insertProbe(RadioProbe p) {\n probes.add(p);\n }", "<S> void registerStaticProbe(S source, String name, ProbeLevel level, ProbeUnit unit,...
[ "0.64716804", "0.63866746", "0.635722", "0.6300919", "0.6253267", "0.59713084", "0.58107", "0.5788306", "0.5646523", "0.5638123", "0.5453322", "0.5205911", "0.515622", "0.5141216", "0.51320237", "0.5113913", "0.5111678", "0.50694585", "0.50520885", "0.504041", "0.49419662", ...
0.5791431
7
Registers a probe. If a probe for the given name exists, it will be overwritten.
<S> void registerStaticProbe(S source, String name, ProbeLevel level, ProbeUnit unit, LongProbeFunction<S> probe);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addProbe(IProbe p) {\n\t\tthis.probes.put(p.getProbeName(), p);\n\t\tp.attachQueue(this.queue);\n\t\tp.attachLogger(this.logger);\n\t}", "public void insertProbe(RadioProbe p) {\n probes.add(p);\n }", "<S> void registerStaticProbe(S source, String name, ProbeLevel level, ProbeUnit unit,...
[ "0.64694697", "0.6383709", "0.635662", "0.63004285", "0.5970581", "0.5809895", "0.5791225", "0.57872796", "0.5644602", "0.56369996", "0.54512376", "0.5205304", "0.5154759", "0.51416445", "0.5132631", "0.51143885", "0.51119363", "0.50675154", "0.5053072", "0.5039661", "0.49421...
0.62526625
4
Registers a probe. If a probe for the given name exists, it will be overwritten.
<S> void registerStaticProbe(S source, MetricDescriptor descriptor, String name, ProbeLevel level, ProbeUnit unit, LongProbeFunction<S> probe);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addProbe(IProbe p) {\n\t\tthis.probes.put(p.getProbeName(), p);\n\t\tp.attachQueue(this.queue);\n\t\tp.attachLogger(this.logger);\n\t}", "public void insertProbe(RadioProbe p) {\n probes.add(p);\n }", "<S> void registerStaticProbe(S source, String name, ProbeLevel level, ProbeUnit unit,...
[ "0.6471445", "0.63856804", "0.6356063", "0.6299321", "0.6252032", "0.5971004", "0.5809581", "0.579003", "0.57865727", "0.5644672", "0.5451244", "0.52044034", "0.5155135", "0.5141603", "0.51306", "0.51142603", "0.51110566", "0.50674903", "0.5053046", "0.503988", "0.49432695", ...
0.56362104
10
Registers a probe. If a probe for the given name exists, it will be overwritten.
<S> void registerStaticProbe(S source, String name, ProbeLevel level, DoubleProbeFunction<S> probe);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addProbe(IProbe p) {\n\t\tthis.probes.put(p.getProbeName(), p);\n\t\tp.attachQueue(this.queue);\n\t\tp.attachLogger(this.logger);\n\t}", "public void insertProbe(RadioProbe p) {\n probes.add(p);\n }", "<S> void registerStaticProbe(S source, String name, ProbeLevel level, ProbeUnit unit,...
[ "0.64716804", "0.63866746", "0.635722", "0.6253267", "0.59713084", "0.58107", "0.5791431", "0.5788306", "0.5646523", "0.5638123", "0.5453322", "0.5205911", "0.515622", "0.5141216", "0.51320237", "0.5113913", "0.5111678", "0.50694585", "0.50520885", "0.504041", "0.49419662", ...
0.6300919
3
Registers a probe. If a probe for the given name exists, it will be overwritten.
<S> void registerStaticProbe(S source, String name, ProbeLevel level, ProbeUnit unit, DoubleProbeFunction<S> probe);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addProbe(IProbe p) {\n\t\tthis.probes.put(p.getProbeName(), p);\n\t\tp.attachQueue(this.queue);\n\t\tp.attachLogger(this.logger);\n\t}", "public void insertProbe(RadioProbe p) {\n probes.add(p);\n }", "<S> void registerStaticProbe(S source, String name, ProbeLevel level, DoubleProbeFunc...
[ "0.64716804", "0.63866746", "0.6300919", "0.6253267", "0.59713084", "0.58107", "0.5791431", "0.5788306", "0.5646523", "0.5638123", "0.5453322", "0.5205911", "0.515622", "0.5141216", "0.51320237", "0.5113913", "0.5111678", "0.50694585", "0.50520885", "0.504041", "0.49419662", ...
0.635722
2
Registers a probe. If a probe for the given name exists, it will be overwritten.
<S> void registerStaticProbe(S source, MetricDescriptor descriptor, String name, ProbeLevel level, ProbeUnit unit, DoubleProbeFunction<S> probe);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addProbe(IProbe p) {\n\t\tthis.probes.put(p.getProbeName(), p);\n\t\tp.attachQueue(this.queue);\n\t\tp.attachLogger(this.logger);\n\t}", "public void insertProbe(RadioProbe p) {\n probes.add(p);\n }", "<S> void registerStaticProbe(S source, String name, ProbeLevel level, ProbeUnit unit,...
[ "0.64694697", "0.6383709", "0.635662", "0.63004285", "0.62526625", "0.5970581", "0.5809895", "0.5791225", "0.5644602", "0.56369996", "0.54512376", "0.5205304", "0.5154759", "0.51416445", "0.5132631", "0.51143885", "0.51119363", "0.50675154", "0.5053072", "0.5039661", "0.49421...
0.57872796
8
Schedules a publisher to be executed at a fixed rate. Probably this method will be removed in the future, but we need a mechanism for complex gauges that require some calculation to provide their values.
ScheduledFuture<?> scheduleAtFixedRate(Runnable publisher, long period, TimeUnit timeUnit, ProbeLevel probeLevel);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Publisher<StockPrice> stockPrice(String symbol) {\n\n\n Publisher<StockPrice> publisher = s -> {\n ScheduledExecutorService executorService = Executors.newScheduledThreadPool(1);\n executorService.scheduleAtFixedRate(() -> {\n StockPrice ret = new StockPrice(symbo...
[ "0.6217986", "0.60866076", "0.58828634", "0.5688676", "0.5572188", "0.5564258", "0.5546626", "0.5546626", "0.5546626", "0.5546626", "0.5525598", "0.5492168", "0.54707956", "0.5455871", "0.54274446", "0.54156566", "0.54140544", "0.5402431", "0.5390175", "0.5388297", "0.5376744...
0.7642896
0
Collects the content of the MetricsRegistry.
void collect(MetricsCollector collector);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void collectMetricsInfo() {\n // Retrieve a list of all references to registered metric services\n ServiceReference[] metricsList = null;\n try {\n metricsList = bc.getServiceReferences(null, SREF_FILTER_METRIC);\n } catch (InvalidSyntaxException e) {\n ...
[ "0.6809611", "0.63840884", "0.63048244", "0.6109271", "0.61034054", "0.603595", "0.59398067", "0.5885361", "0.56975496", "0.5651527", "0.55542064", "0.55211353", "0.54675364", "0.5433385", "0.5390601", "0.5367973", "0.5286175", "0.5268636", "0.5256654", "0.5240666", "0.521953...
0.6892535
0
When the folder changes, set the selected resource to the new folder.
private void onFolderChange(FolderChangeEvent event) { this.currentResource = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void changeFolder(Folder newFolder, AjaxRequestTarget target) {\n\t\tcurrentFolder = newFolder;\n\t\tcurrentResource = null;\n\t\tsend(getPage(), Broadcast.BREADTH, new FolderChangeEvent(target));\n\t}", "@Override\n public void folderChanged(IProject project, ResourceFolder folder, int eventTyp...
[ "0.7174574", "0.6291772", "0.6176848", "0.6157703", "0.609162", "0.5955551", "0.5745424", "0.5723532", "0.56228185", "0.56176573", "0.55301744", "0.5514247", "0.55105376", "0.5494029", "0.5491208", "0.5486382", "0.548039", "0.547092", "0.5452195", "0.54519385", "0.538704", ...
0.6465876
1
Show the modal for updating the resource.
private void onResourceUpdateClicked(UpdateClickedEvent event) { UpdateResourceModal updateResourceModal2 = new UpdateResourceModal("update-resource-modal"); updateResourceModal.replaceWith(updateResourceModal2); updateResourceModal = updateResourceModal2; updateResourceModal.show(event.getTarget()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void updateBuildingButtonClicked() {\n Building building = tableBuilding.getSelectionModel().getSelectedItem();\n\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"Information Dialog\");\n alert.setHeaderText(null);\n String success = Buildi...
[ "0.6075182", "0.60536253", "0.59730035", "0.58975023", "0.58873", "0.5878605", "0.58303976", "0.5811436", "0.5806055", "0.5792296", "0.578338", "0.5777656", "0.57614636", "0.57588005", "0.57274395", "0.568441", "0.5663582", "0.5652618", "0.5627921", "0.56272733", "0.56140536"...
0.68084645
0
Delete the selected resource.
private void onDeleteResourceClicked(ResourceDeleteClickedEvent event) throws ROSRSException { if (currentResource != null) { boolean isSketch = updateSketch(event); currentResource.delete(); if (currentResource != currentFolder) { currentResource = currentFolder; } else { List<Folder> list = folderHierarchyModel.getObject(); list.remove(currentFolder); if (list.isEmpty()) { changeFolder(null, event.getTarget()); } else { changeFolder(list.get(list.size() - 1), event.getTarget()); } } if (isSketch) send(getPage(), Broadcast.BREADTH, new SketchEvent(event.getTarget())); } send(getPage(), Broadcast.BREADTH, new ResourceDeletedEvent(event.getTarget())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void deleteResource() {\n }", "@Override\n \tpublic Representation deleteResource() {\n \t\tString interId = (String) this.getRequestAttributes().get(\"interId\");\n \t\tString srcId = (String) this.getRequestAttributes().get(\"sourceId\");\n \t\t\n \t\t// On s'assure qu'il n'est plus prsent en base d...
[ "0.7853644", "0.7008316", "0.6939397", "0.69213814", "0.69013333", "0.6814237", "0.67280596", "0.6711602", "0.67067873", "0.6658446", "0.6652106", "0.66513014", "0.6646631", "0.6606007", "0.65107477", "0.6503246", "0.6503246", "0.6500649", "0.6486571", "0.6477172", "0.6477172...
0.7015833
1
Move a resource to a folder.
private void onResourceMove(ResourceMoveEvent event) throws ROSRSException, ROException { if (currentFolder != null) { FolderEntry entry = null; for (FolderEntry e : currentFolder.getFolderEntries().values()) { if (e.getResource().equals(currentResource)) { entry = e; break; } } if (entry != null) { entry.delete(); } } if (!event.getFolder().isLoaded()) { event.getFolder().load(); } event.getFolder().addEntry(currentResource, null); send(getPage(), Broadcast.BREADTH, new ResourceMovedEvent(event.getTarget())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void moveFile(String pathToFile, String pathDirectory);", "void move(Path repoRoot, Path source, Path target);", "private Promise<Void> moveResource(final Resource resource, final Path destination) {\n return resource.move(destination)\n .thenPromise((Function<Resource, Promise<Voi...
[ "0.67341363", "0.6530072", "0.6447382", "0.6370003", "0.6115273", "0.60455966", "0.604236", "0.60416365", "0.6036027", "0.5888894", "0.5876218", "0.58552545", "0.5768491", "0.5764526", "0.57420594", "0.5674655", "0.55952287", "0.55560154", "0.5555777", "0.555497", "0.5495476"...
0.69029087
0
Change the current folder, set the current resource to it and post events.
protected void changeFolder(Folder newFolder, AjaxRequestTarget target) { currentFolder = newFolder; currentResource = null; send(getPage(), Broadcast.BREADTH, new FolderChangeEvent(target)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void onFolderChange(FolderChangeEvent event) {\n\t\tthis.currentResource = null;\n\t}", "@Override\n public void folderChanged(IProject project, ResourceFolder folder, int eventType) {\n }", "public static void start_write_action_from_ui_thread_and_refresh_folder_sync(VirtualFile folder) ...
[ "0.61425346", "0.5991641", "0.5409528", "0.538474", "0.53631", "0.5270301", "0.52652544", "0.52483976", "0.5239075", "0.51599854", "0.5152803", "0.5134882", "0.5124947", "0.50697", "0.505497", "0.50155866", "0.5007563", "0.50005627", "0.4984811", "0.4975315", "0.4970255", "...
0.65861875
0
Creates a new InstrumentedClassInfo
public InstrumentedClassInfo(String binaryClassName, ClassLoader classLoader, ProtectionDomain protectionDomain, byte[] originalClassByteCode, byte[] instrumentedClassByteCode) { super(); this.binaryClassName = binaryClassName; this.classLoader = classLoader; this.protectionDomain = protectionDomain; originalClassBuffer = ByteBuffer.allocateDirect(originalClassByteCode.length); originalClassBuffer.put(originalClassByteCode); originalClassBuffer.flip(); instrumentedClassBuffer = ByteBuffer.allocateDirect(instrumentedClassByteCode.length); instrumentedClassBuffer.put(instrumentedClassByteCode); instrumentedClassBuffer.flip(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ClassInfo() {\n }", "public interface Instrumentor {\n\n InstrumentionClass getInstrucmentClass(ClassLoader loader, String className, byte[] classfileBuffer);\n\n}", "public PertFactory() {\n for (Object[] o : classTagArray) {\n addStorableClass((String) o[1], (Class) o[0]);\n ...
[ "0.5920404", "0.5610403", "0.55273044", "0.5466098", "0.5441897", "0.53097004", "0.52113664", "0.5179042", "0.5135595", "0.50568277", "0.5052726", "0.5044127", "0.50304496", "0.50303006", "0.5018491", "0.4971691", "0.4959423", "0.49471015", "0.49369115", "0.49309194", "0.4884...
0.5431373
5
Returns the binary name of the class that was instrumented
public String getBinaryClassName() { return binaryClassName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String getInstrumentationClass();", "public String getFullInstrumentationClass() {\n if (getInstrumentationClass().startsWith(\".\")) {\n return getAndroidPackage() + getInstrumentationClass();\n }\n return getInstrumentationClass();\n }", "public String getFullName() {\n retu...
[ "0.71945107", "0.69704044", "0.6933468", "0.68706185", "0.68378973", "0.68103385", "0.68103385", "0.6709548", "0.67008847", "0.6695651", "0.6640494", "0.65415525", "0.6526492", "0.6526492", "0.6526492", "0.6522108", "0.65139914", "0.651383", "0.65024686", "0.649234", "0.64901...
0.6615319
11
Returns the byte code of the original class
public byte[] getOriginalClassBuffer() { byte[] byteCode = new byte[originalClassBuffer.capacity()]; originalClassBuffer.get(byteCode); return byteCode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public byte getCode();", "com.google.protobuf.ByteString getByteCode();", "public String getClassCode() {\n\t\treturn classCode;\n\t}", "public byte[] getByteCode() {\n return byteCode;\n }", "public java.lang.String getClassCode()\n {\n synchronized (monitor())\n {\n ...
[ "0.7230562", "0.6946047", "0.69131535", "0.67431605", "0.664446", "0.6599575", "0.6588601", "0.6569918", "0.6468344", "0.6468344", "0.6458563", "0.64349407", "0.6421065", "0.6381965", "0.624759", "0.61296016", "0.60744554", "0.6052503", "0.6045192", "0.6017505", "0.60101765",...
0.71038383
1
Returns the byte code of the instrumented class
public byte[] getInstrumentedClassBuffer() { byte[] byteCode = new byte[instrumentedClassBuffer.capacity()]; instrumentedClassBuffer.get(byteCode); return byteCode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public byte getCode();", "public String getClassCode() {\n\t\treturn classCode;\n\t}", "com.google.protobuf.ByteString getByteCode();", "public byte[] code();", "@NonNull\n public byte[] getBytecode() {\n return mBytes;\n }", "public byte[] getByteCode() {\n return byteCode;\n }", ...
[ "0.743898", "0.708158", "0.7034043", "0.68495774", "0.68430024", "0.6771331", "0.6741911", "0.67243665", "0.6666667", "0.65910095", "0.6514984", "0.6504731", "0.6504731", "0.63931936", "0.63847786", "0.63786036", "0.63581765", "0.62825215", "0.62521005", "0.62261856", "0.6220...
0.71337426
1
Returns the classloader of the instrumented class
public ClassLoader getClassLoader() { return classLoader; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Loader getClassLoader() {\n\treturn this.classLoader;\n }", "public ClassLoader getClassLoader () { return _classLoader; }", "public IClassLoader getClassLoader();", "private ClassLoader getClassLoader() {\r\n return this.getClass().getClassLoader();\r\n }", "public Class...
[ "0.7524193", "0.7501548", "0.7468955", "0.7373747", "0.72975373", "0.72892565", "0.7267048", "0.7055763", "0.70113975", "0.6983072", "0.6939098", "0.6901579", "0.6860333", "0.6746931", "0.67125326", "0.66779256", "0.66468245", "0.6608109", "0.6605435", "0.6605435", "0.6601053...
0.68608457
13
Returns the protection domain of the instrumented class
public ProtectionDomain getProtectionDomain() { return protectionDomain; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object getDomain ();", "public Long getDomain()\n\t{\n\t\treturn domain;\n\t}", "public Domain getDomain() {\n return domain;\n }", "public Domain getDomain() {\n return this.domain;\n }", "public String getDomain() {\n return getProperty(DOMAIN);\n }", "public String...
[ "0.6817157", "0.64033", "0.6348151", "0.63140315", "0.61240077", "0.6115481", "0.60611475", "0.60611475", "0.6017861", "0.6004016", "0.598109", "0.58375853", "0.5731274", "0.5722316", "0.56425285", "0.5631073", "0.56030804", "0.5523381", "0.5510307", "0.55066514", "0.550368",...
0.71838254
0
Just for example, you can do this by OkHttp or something.
private void upgradeBundle(final net.wequick.small.Bundle bundle, final String urlStr, final File file, final OnUpgradeListener listener) { mHandler = new DownloadHandler(listener); new Thread() { @Override public void run() { try { URL url = new URL(urlStr); HttpURLConnection urlConn = (HttpURLConnection) url.openConnection(); InputStream is = urlConn.getInputStream(); // Save OutputStream os = new FileOutputStream(file); byte[] buffer = new byte[1024]; int length; while ((length = is.read(buffer)) != -1) { os.write(buffer, 0, length); } os.flush(); os.close(); is.close(); // While you finish downloading patch file, call this bundle.upgrade(); Message.obtain(mHandler, 1).sendToTarget(); } catch (IOException e) { e.printStackTrace(); } } }.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "OptimizeResponse() {\n\n\t}", "@Override\r\n\tpublic void onOk(HttpRequest paramHttpRequest, Object paramObject) {\n\r\n\t}", "void faild_response();", "@Override\n\t\t\tpublic void onResponseReceived(Request request, Response response) {\n\t\t\t\t\n\t\t\t}", "@Override\n public void...
[ "0.60324985", "0.60239255", "0.593208", "0.58638775", "0.5851314", "0.5844721", "0.581926", "0.5795757", "0.5786677", "0.57829237", "0.5776224", "0.5776224", "0.5776224", "0.57422984", "0.57058245", "0.5704216", "0.5649533", "0.5628874", "0.56063175", "0.5605984", "0.55933666...
0.0
-1
builds a new panel with the combo box chooser populated with the list of looks installed inthis machine.
public LookAndFeelChooser (LookAndFeelInfo [] looks , MainWindow mainWindow){ super(); this.mainWindow = mainWindow; this.setLayout(new FlowLayout()); String [] lookStrings = new String [looks.length]; for (int i = 0 ; i< looks.length ; i++){ lookStrings[i] = looks[i].getClassName(); System.out.println("look " + i + " = " + lookStrings[i]); } JComboBox lookPick = new JComboBox(lookStrings); lookPick.addActionListener(this); this.add(lookPick); this.setBorder( BorderFactory.createCompoundBorder( BorderFactory.createTitledBorder("Will Destroy Current MainWindow and rebuild"), BorderFactory.createEmptyBorder(5,5,5,5))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void buildComboPanel(){\n //Create the combo panel\n comboPanel = new JPanel();\n \n //Combo box\n laneType = new JComboBox(lanes);\n \n //Allow the user to type input into combo field\n laneType.setEditable(true);\n \n comboLabel = new ...
[ "0.7026598", "0.67470324", "0.64124537", "0.6391689", "0.63735324", "0.6372954", "0.6306446", "0.63000435", "0.6233967", "0.6170207", "0.6166062", "0.6161151", "0.61518615", "0.6083895", "0.6077401", "0.6047761", "0.60379046", "0.60340285", "0.5999413", "0.5990583", "0.598754...
0.62556326
8
responder to user menu selections
@Override public void actionPerformed(ActionEvent evt) { JComboBox cb = (JComboBox)evt.getSource(); String look = (String) cb.getSelectedItem(); System.out.println("picked = " + look); try { UIManager.setLookAndFeel(look); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (UnsupportedLookAndFeelException e) { e.printStackTrace(); } mainWindow.closeWindow(); mainWindow.drawMainWindow(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void userForm(){\n\t\tSystem.out.print(menu);\n\t\tScanner input = new Scanner(System.in);\n\t\tselection = input.nextInt();\n\t\tmenuActions(selection);\n\t\t}", "public void select() {\n \t\t\tString sinput = \"\";\r\n \t\t\tOption selected = null;\r\n \t\t\tErrorLog.debug(name + \" selected.\");\r\n \t...
[ "0.7426906", "0.74034745", "0.73765564", "0.7254162", "0.7235999", "0.71317387", "0.70554703", "0.70463496", "0.7022333", "0.7013675", "0.69444364", "0.6938606", "0.69273126", "0.69167435", "0.6890834", "0.6890834", "0.68847704", "0.6864365", "0.68516755", "0.6790325", "0.679...
0.0
-1
TODO Autogenerated method stub
@Override public List<ProductGroupMapDTO> getProductGroupCodeLists() throws PersistenceException { List<ProductGroupMapDTO> list=null; logger.info("Entry"); try { Criteria q=session.createCriteria(ProductGroupMapDTO.class); list=(List<ProductGroupMapDTO>)q.list(); } catch (Exception e) { e.printStackTrace(); logger.error(e); throw new PersistenceException(e, IPersistenceErrorCode.DATABASE_PROBLEM); } logger.info("Exit"); return list; }
{ "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
NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy, and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
public PrometheusTempModify(PrometheusTempModify source) { if (source.Name != null) { this.Name = new String(source.Name); } if (source.Describe != null) { this.Describe = new String(source.Describe); } if (source.ServiceMonitors != null) { this.ServiceMonitors = new PrometheusConfigItem[source.ServiceMonitors.length]; for (int i = 0; i < source.ServiceMonitors.length; i++) { this.ServiceMonitors[i] = new PrometheusConfigItem(source.ServiceMonitors[i]); } } if (source.PodMonitors != null) { this.PodMonitors = new PrometheusConfigItem[source.PodMonitors.length]; for (int i = 0; i < source.PodMonitors.length; i++) { this.PodMonitors[i] = new PrometheusConfigItem(source.PodMonitors[i]); } } if (source.RawJobs != null) { this.RawJobs = new PrometheusConfigItem[source.RawJobs.length]; for (int i = 0; i < source.RawJobs.length; i++) { this.RawJobs[i] = new PrometheusConfigItem(source.RawJobs[i]); } } if (source.RecordRules != null) { this.RecordRules = new PrometheusConfigItem[source.RecordRules.length]; for (int i = 0; i < source.RecordRules.length; i++) { this.RecordRules[i] = new PrometheusConfigItem(source.RecordRules[i]); } } if (source.AlertDetailRules != null) { this.AlertDetailRules = new PrometheusAlertPolicyItem[source.AlertDetailRules.length]; for (int i = 0; i < source.AlertDetailRules.length; i++) { this.AlertDetailRules[i] = new PrometheusAlertPolicyItem(source.AlertDetailRules[i]); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void set(String key, Object value);", "void set(K key, V value);", "public setKeyValue_args(setKeyValue_args other) {\n if (other.isSetKey()) {\n this.key = other.key;\n }\n if (other.isSetValue()) {\n this.value = other.value;\n }\n }", "public abstract void set(String k...
[ "0.6440425", "0.6415443", "0.6145525", "0.61172885", "0.609467", "0.60810256", "0.60422385", "0.5990364", "0.59736174", "0.59564006", "0.58394885", "0.58277106", "0.5790857", "0.5705316", "0.57027704", "0.56880087", "0.5686415", "0.56781363", "0.5608639", "0.5590083", "0.5582...
0.0
-1
Internal implementation, normal users should not use it.
public void toMap(HashMap<String, String> map, String prefix) { this.setParamSimple(map, prefix + "Name", this.Name); this.setParamSimple(map, prefix + "Describe", this.Describe); this.setParamArrayObj(map, prefix + "ServiceMonitors.", this.ServiceMonitors); this.setParamArrayObj(map, prefix + "PodMonitors.", this.PodMonitors); this.setParamArrayObj(map, prefix + "RawJobs.", this.RawJobs); this.setParamArrayObj(map, prefix + "RecordRules.", this.RecordRules); this.setParamArrayObj(map, prefix + "AlertDetailRules.", this.AlertDetailRules); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "public final void mo51373a() {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n public ...
[ "0.62574834", "0.6217662", "0.6024768", "0.5982239", "0.5965723", "0.59330684", "0.5920059", "0.58351564", "0.5781645", "0.57749504", "0.57749504", "0.57749504", "0.57749504", "0.57749504", "0.57749504", "0.57737285", "0.57054734", "0.5701363", "0.56510806", "0.56491816", "0....
0.0
-1
add short cut to home screen
public void addshortcut() { Intent addshort = new Intent(getApplicationContext(), ShortMaster.class); addshort.setAction(Intent.ACTION_MAIN); Intent addIntent = new Intent(); addIntent.putExtra(Intent.EXTRA_SHORTCUT_NAME, R.string.app_name); addIntent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, addshort); addIntent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, Intent.ShortcutIconResource.fromContext(getApplicationContext(), R.mipmap.ic_launcher)); getApplicationContext().sendBroadcast(addIntent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void attachFrontlineHUD() {\r\n\t\tResourceManager.getInstance().getCamera().setHUD(HUDRegion);\r\n\t}", "public void homeScreen(Graphics art)\n\t{\n\t\t\n\t\tart.setColor(Color.pink);\n\t\tart.setFont(newFont);\n\t\tart.drawString(\"Balloon Pop\", 200, 200);\n\t\tart.setFont(newFont2);\n\t\tart.drawStri...
[ "0.61774236", "0.61478025", "0.614599", "0.6115224", "0.580155", "0.5742916", "0.57314456", "0.57042646", "0.5656139", "0.56374085", "0.56349206", "0.5617429", "0.560244", "0.55673754", "0.5561942", "0.5557593", "0.5537439", "0.5510355", "0.5503802", "0.5494335", "0.5490485",...
0.5395492
28
TODO: queue as SfxAction instead of directly playing?
public static void playMapSelectSound() { int roll = MathUtils.random(3); switch (roll) { case 0: { CardCrawlGame.sound.play("MAP_SELECT_1"); break; } case 1: { CardCrawlGame.sound.play("MAP_SELECT_2"); break; } case 2: { CardCrawlGame.sound.play("MAP_SELECT_3"); break; } default: { CardCrawlGame.sound.play("MAP_SELECT_4"); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void play() {\n\t\t\r\n\t}", "public void play(){\n\t\t\n\t}", "@Override\n\tpublic void play() {\n\t\t\n\t}", "@Override\n\tpublic void play() {\n\n\t}", "private void play() {\n\t\tParcel pc = Parcel.obtain();\n\t\tParcel pc_reply = Parcel.obtain();\n\t\ttry {\n\t\t\tSystem.out.println(\"DEBUG>>>p...
[ "0.71655905", "0.7025742", "0.69866", "0.694244", "0.6802451", "0.6793108", "0.6773244", "0.6753181", "0.6724069", "0.66491693", "0.66464716", "0.66248536", "0.66169035", "0.6541281", "0.651461", "0.6512305", "0.64722687", "0.6463086", "0.64547884", "0.64161974", "0.64161974"...
0.0
-1
returns the similarity of the provided objects
public abstract Double get(T first, T second);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Double calculateSimilarity(OWLObject a, OWLObject b);", "public Future<List<Object>> evaluateSimilarity(Serializable objectUnderComparison, List<Serializable> referenceObjects);", "public double getSimilarity(Pair<String, String> representations);", "@Override\n public double similarity(double[] dat...
[ "0.8039057", "0.7596618", "0.7254353", "0.68127143", "0.657915", "0.6513976", "0.6500995", "0.6463974", "0.64397264", "0.6412153", "0.6362897", "0.6346652", "0.62581545", "0.6238575", "0.62360096", "0.61432654", "0.61239576", "0.6122549", "0.6093304", "0.6087472", "0.6087197"...
0.0
-1
sets the similarity of the provided objects
public abstract void set(T first, T second, Double similarity);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Double calculateSimilarity(OWLObject a, OWLObject b);", "public void setSimilarity(float value) {\n this.similarity = value;\n }", "public Future<List<Object>> evaluateSimilarity(Serializable objectUnderComparison, List<Serializable> referenceObjects);", "public Matrix2D executeSimilarity(Li...
[ "0.69896066", "0.6571762", "0.64868313", "0.58374214", "0.5817897", "0.57963794", "0.57953316", "0.5784681", "0.57765734", "0.5747937", "0.5744577", "0.57284045", "0.56142277", "0.55551255", "0.55409205", "0.5521603", "0.5515605", "0.5513213", "0.54069716", "0.5394864", "0.53...
0.73642373
0
returns the list of all objects in the first dimension (passed as 'first' parameter to the set() method)
public abstract Collection<T> getFirstDimension();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final ManagedElementList<VirtualMachine> getFirstSet() {\r\n return (ManagedElementList<VirtualMachine>) this.set1;\r\n }", "public Set<String>[] getFirst();", "public java.util.List<Dimension> getDimensionsAll();", "@Override\n public Shape[][] getInitialArray() {\n return allShapes;\n ...
[ "0.62858534", "0.606383", "0.6019345", "0.60091364", "0.56956506", "0.567629", "0.56606805", "0.56400204", "0.559018", "0.5529517", "0.5506714", "0.54800016", "0.5465883", "0.54648936", "0.54573697", "0.543651", "0.54299676", "0.5424618", "0.54205245", "0.53960115", "0.538179...
0.6968575
0
returns the list of all objects in the second dimension (passed as 'second' parameter to the set() method)
public abstract Collection<T> getSecondDimension();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final ManagedElementList<VirtualMachine> getSecondSet() {\r\n return (ManagedElementList<VirtualMachine>) this.set2;\r\n }", "Object[] getChildArray();", "@Override\r\n\tpublic Object[] toArray() {\n\t\treturn set.toArray();\r\n\t}", "public Object[] getElements() {\r\n\t\treturn elements.cl...
[ "0.61871", "0.57969606", "0.5758048", "0.5648886", "0.5614812", "0.5614614", "0.55819374", "0.55573213", "0.5537813", "0.5533697", "0.55150443", "0.5498966", "0.54670036", "0.54443765", "0.54420114", "0.5422361", "0.541957", "0.54147065", "0.5407978", "0.5395037", "0.5335493"...
0.6753196
0
returns all objects in the second dimension that have a similarity > 0
public abstract Collection<T> getMatches(T first);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Double calculateSimilarity(OWLObject a, OWLObject b);", "private Similarity getSimilarity(DisjointSets<Pixel> ds, int root1, int root2)\n {\n return null; //TODO: remove and replace this line\n }", "public float getSimilarity() {\n return similarity;\n }", "public double getSimila...
[ "0.5747694", "0.5747475", "0.57108265", "0.56623423", "0.5564646", "0.5337913", "0.5321401", "0.52820426", "0.5222959", "0.52225524", "0.5203099", "0.51714855", "0.51603144", "0.51501495", "0.5128301", "0.5120386", "0.50814563", "0.50797653", "0.50789934", "0.507898", "0.5072...
0.0
-1
returns all objects in the second dimension that have a similarity > similarityThreshold
public abstract Collection<T> getMatchesAboveThreshold(T first, double similarityThreshold);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void compareWithinClusters() {\n\t\tList<Cluster> clusterList = clusterDao.getClusterList();\n\n\t\tfor (Cluster cluster : clusterList) {\n\t\t\tList<Document> docList = documentDao.getDocListByClusterId(cluster.getId());\n\t\t\tint size = docList.size();\n\t\t\t\n\t\t\tdouble[][] matrix = new double[size][...
[ "0.5569936", "0.55035037", "0.54613674", "0.54145956", "0.5354457", "0.53092694", "0.52800345", "0.52381223", "0.51762676", "0.51369125", "0.513273", "0.49874327", "0.4983102", "0.4976546", "0.49557275", "0.49054086", "0.48823595", "0.48684484", "0.4839447", "0.4805532", "0.4...
0.6499161
0
Normalize all values in the matrix.
public void normalize(double normalizingFactor) { //System.out.println("norm: " + normalizingFactor); for (T value : getFirstDimension()) { for (T secondValue : getMatches(value)) { double d = get(value, secondValue) / normalizingFactor; set(value, secondValue, d); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void normalize()\n {\n int sum;\n\n for(int i=0;i<12;i++)\n {\n for(int j=0;j<12;j++) {\n sum = sumAll(i,j);\n if (sum != 0)\n for (int n = 0; n < 12; n++)\n weights[i][j][n] /= sum;\n ...
[ "0.7665906", "0.73001325", "0.7101657", "0.69884616", "0.6922154", "0.6844735", "0.67843485", "0.6742482", "0.67079955", "0.6619727", "0.66118455", "0.65699637", "0.6550168", "0.65180343", "0.64569354", "0.6454026", "0.63979924", "0.6378551", "0.6345437", "0.6339653", "0.6250...
0.6934502
4
Multiply the matrix with a scalar value
public void multiplyScalar(double scalar) { if(scalar==1.0) { return; } for (T value : getFirstDimension()) { for (T secondValue : getMatches(value)) { double d = get(value, secondValue) * scalar; set(value, secondValue, d); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void scalarMultiply(double s) {\n for (int i=0; i<rows; i++) {\n for (int j=0; j<cols; j++) {\n matrix.get(i)[j] *= s;\n }\n }\n }", "public Matrix multiply(double scalar) {\n Matrix result = new Matrix(this.rows, this.cols);\n for (int i...
[ "0.75967526", "0.7426141", "0.72259873", "0.7196905", "0.71659017", "0.7039678", "0.7031948", "0.68715525", "0.6759788", "0.67263305", "0.67162883", "0.667399", "0.66316336", "0.6624851", "0.6601764", "0.65781504", "0.6567293", "0.65287966", "0.6437157", "0.6404524", "0.63675...
0.7016802
7
Normalise all values in the matrix in the range between 0 and 1.
public void normalize() { // determine the maximum value Double max = getMaxValue(); if(max!=null) { normalize(max); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void normalize()\n {\n int sum;\n\n for(int i=0;i<12;i++)\n {\n for(int j=0;j<12;j++) {\n sum = sumAll(i,j);\n if (sum != 0)\n for (int n = 0; n < 12; n++)\n weights[i][j][n] /= sum;\n ...
[ "0.7131027", "0.6875127", "0.67674977", "0.66926336", "0.6688856", "0.6684296", "0.667518", "0.66524404", "0.65409404", "0.6458332", "0.64429337", "0.6442334", "0.640064", "0.6390301", "0.6361758", "0.63532996", "0.63196594", "0.62636715", "0.62440056", "0.6209142", "0.620193...
0.64164114
12
Changes the values of the matrix such that all values sum to 1, preserving the relative differences of the values
public void makeStochastic() { double sum = 0.0; for(T row : getFirstDimension()) { // sum all values for(T col : getMatches(row)) { if(get(row, col)!=null) { sum += get(row, col); } } } for(T row : getFirstDimension()) { // sum all values for(T col : getMatches(row)) { if(get(row, col)!=null) { set(row, col, get(row, col)/sum); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int[][] updateMatrix(int[][] matrix) {\n for(int i = 0; i < matrix.length; i++) {\n for(int j = 0; j < matrix[0].length; j++) {\n if(matrix[i][j] == 0) continue;\n matrix[i][j] = 10; // You can use any integer bigger than 1 except Integer.MAX_VALUE, overflow.\...
[ "0.6298712", "0.60110104", "0.577948", "0.56320226", "0.55723", "0.55377394", "0.5495121", "0.5455145", "0.5384571", "0.5375287", "0.5354568", "0.53533304", "0.5332296", "0.5314682", "0.5280479", "0.52502406", "0.52234614", "0.52162874", "0.51452297", "0.5143713", "0.5126355"...
0.460918
84
Changes the values of the matrix such that each row sums to 1, preserving the relative differences of the values in each row
public void makeRowStochastic() { for(T row : getFirstDimension()) { double sum = 0.0; // sum all values of the current row for(T col : getMatches(row)) { sum += get(row, col); } // divide each value by the sum for(T col : getMatches(row)) { set(row, col, get(row, col) / sum); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int[][] updateMatrix(int[][] matrix) {\n for(int i = 0; i < matrix.length; i++) {\n for(int j = 0; j < matrix[0].length; j++) {\n if(matrix[i][j] == 0) continue;\n matrix[i][j] = 10; // You can use any integer bigger than 1 except Integer.MAX_VALUE, overflow.\...
[ "0.6476286", "0.59915596", "0.59007823", "0.5780978", "0.5755143", "0.57137465", "0.55312574", "0.54701984", "0.541703", "0.5391173", "0.5358767", "0.5347729", "0.53202176", "0.5294637", "0.5271346", "0.5268816", "0.52601224", "0.5253896", "0.5253093", "0.52449304", "0.524214...
0.5123556
27
Changes the values of the matrix such that each column sums to 1, preserving the relative differences of the values in each column
public void makeColumnStochastic() { for(T col : getSecondDimension()) { double sum = 0.0; // sum all values of the current column for(T row : getFirstDimension()) { sum += get(row, col); } // divide each value by the sum for(T row : getFirstDimension()) { set(row, col, get(row, col) / sum); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int[][] updateMatrix(int[][] matrix) {\n for(int i = 0; i < matrix.length; i++) {\n for(int j = 0; j < matrix[0].length; j++) {\n if(matrix[i][j] == 0) continue;\n matrix[i][j] = 10; // You can use any integer bigger than 1 except Integer.MAX_VALUE, overflow.\...
[ "0.64276797", "0.6040256", "0.600995", "0.60059667", "0.58816737", "0.5712948", "0.5594243", "0.54852194", "0.5460857", "0.54240584", "0.5417672", "0.5401478", "0.5400236", "0.52935684", "0.5289466", "0.52881235", "0.52757263", "0.527161", "0.5257389", "0.5252812", "0.5217787...
0.4914108
51
inverts each value of the matrix x by replacing it with 1/x
public void invert() { for(T first : getFirstDimension()) { for(T second : getMatches(first)) { Double sim = get(first, second); if(sim!=null && sim > 0.0) { set(first, second, 1.0/sim); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void invert() {\n \n float[] result = new float[16];\n System.arraycopy(IDENTITY, 0, result, 0, 16);\n \n for(int i = 0; i < 4; i++){\n int i4 = i*4;\n \n // make sure[i,i] is != 0\n \n for(int j = 0; matrix[i4+i] == 0...
[ "0.7088552", "0.6996313", "0.66947055", "0.639802", "0.6074871", "0.6068334", "0.5989733", "0.5963447", "0.5963153", "0.59480166", "0.5893439", "0.58668596", "0.58319896", "0.582544", "0.5819787", "0.57521784", "0.57156605", "0.57116973", "0.5705485", "0.57005167", "0.5697924...
0.682248
2
Changes the values of the matrix such that each value is either 1 (if above the threshold) or 0. returns this instance
public SimilarityMatrix<T> makeBinary(double threshold) { for(T first : getFirstDimension()) { for(T second : getMatches(first)) { if(get(first, second)>threshold) { set(first, second, 1.0); } else { set(first, second, 0.0); } } } return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Grid filterSmallValues(int threshold) {\n\t\n\t\tassert(threshold > 0);\n\t\t\n\t\tint[][] newGrid = new int[width()][height()];\n\t\t\n\t\tfor (int j = 0; j < height(); j++) {\n\t\t\tfor (int i = 0; i < width(); i++) {\n\t\t\t\tif (Math.abs(valueAt(i, j)) < threshold) {\n\t\t\t\t\tnewGrid[i][j] = 0;\n\t\t\...
[ "0.5903197", "0.5795374", "0.57242054", "0.5615834", "0.555381", "0.54959595", "0.53504646", "0.53308445", "0.53031784", "0.52972424", "0.5243679", "0.522729", "0.5209822", "0.5186727", "0.5150065", "0.5144063", "0.5115986", "0.51108307", "0.51000905", "0.508195", "0.5072702"...
0.6983653
0
removes all elements below the given threshold
public void prune(double belowThreshold) { for(T first : getFirstDimension()) { for(T second : getMatches(first)) { if(get(first, second)<belowThreshold) { set(first, second, 0.0); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void removeSmallRoots(int threshold) {\n\t\tArrayList<Root> smallRoots = new ArrayList<Root>();\n\t\tfor (Root r: allRoots) {\n\t\t\tif (r.volume() < threshold) {\n\t\t\t\tsmallRoots.add(r);\n\t\t\t}\n\t\t}\n\t\tfor (Root r: smallRoots) {\n\t\t\tallRoots.remove(r);\n\t\t}\n\t}", "public Grid filterSmallV...
[ "0.71341497", "0.599843", "0.59401405", "0.5817138", "0.57376975", "0.5718247", "0.57146543", "0.5693097", "0.56883836", "0.56417704", "0.5523364", "0.5520942", "0.5469651", "0.54378676", "0.54375255", "0.5431291", "0.54241705", "0.5404881", "0.53486127", "0.5323508", "0.5307...
0.77027243
0
returns the label of an instance that is part of the first or second dimension
public Object getLabel(T instance) { if (labels.containsKey(instance)) { return labels.get(instance); } else { return ""; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "DatasetLabel getLabel();", "default String getLabel() { return ((TensorImpl<?>) this).find(NDFrame.class).map(NDFrame::getLabel).orElse(\"\"); }", "Label getLabel();", "Label getLabel();", "Label getLabel();", "java.lang.String getLabel();", "String getLabel();", "String getLabel();", "public int g...
[ "0.68461597", "0.66859806", "0.6536105", "0.6536105", "0.6536105", "0.6451124", "0.6441916", "0.6441916", "0.63729197", "0.63341206", "0.63341206", "0.63341206", "0.63341206", "0.632414", "0.6294165", "0.61182815", "0.6117993", "0.61065567", "0.60962003", "0.60606086", "0.604...
0.645129
5
Because if .isPresent() returns true, .getAnnotation is obviously null. Obviously
@SuppressWarnings({"argument.type.incompatible"}) protected static <T extends Metric> AnnotatedMetric<T> metricAnnotation(Method method, Class<? extends Annotation> clazz, MetricFactory<T> factory) { if (method.isAnnotationPresent(clazz)) { final Annotation annotation = method.getAnnotation(clazz); final @Nullable T metric = factory.metric(metricAnnotationName(annotation), metricAnnotationAbsolute(annotation)); if (metric != null) { return new AnnotatedMetric.IsPresent<>(metric, annotation); } } return new AnnotatedMetric.IsNotPresent<>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasAnnotationValue();", "boolean hasAnnotationMetadata();", "@Override\n\tpublic <T extends Annotation> T getAnnotation(Class<T> annotationClass) {\n\t\treturn null;\n\t}", "@Override\n\t\t\tpublic <T extends Annotation> T getAnnotation(Class<T> annotationClass) {\n\t\t\t\treturn null;\n\t\t\t}", "...
[ "0.6605087", "0.6515778", "0.62334013", "0.6211136", "0.61837924", "0.61837924", "0.60888684", "0.60888684", "0.59202456", "0.5905341", "0.5845325", "0.58420736", "0.57712996", "0.56814176", "0.56585515", "0.56328297", "0.5616458", "0.5598392", "0.5533657", "0.5517323", "0.55...
0.0
-1
if (Config.switch_log.equals(Config.OFF) || TextUtils.isEmpty(msg)) return;
private static void invokeLogMethod(String table, Level level, String msg) { MDC.put(MDC_TABLE, table); try { s_innerMethod.invoke(sLog, FQCN, null, level, msg, null, null); } catch (SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { sLog.error("execute s_innerMethod failed, Exception:" + e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void fixLoggingControls(){\n if((hardware==null || (hardware!=null && !hardware.isOpen())) && playMode!=playMode.PLAYBACK ){ // we can log from live input or from playing file (e.g. after refiltering it)\n loggingButton.setEnabled(false);\n loggingMenuItem.setEnabled(false);\n ...
[ "0.54554653", "0.5443868", "0.5407114", "0.5395305", "0.53735334", "0.5358448", "0.53492475", "0.5322807", "0.5320587", "0.52961004", "0.5197622", "0.51872885", "0.51867086", "0.51770234", "0.5172695", "0.5141041", "0.5122294", "0.51184934", "0.5114518", "0.5108191", "0.51024...
0.0
-1
number of vertices The main method for this program
public static void main(String[] args) { if(args.length != 1) { usage(); } Vertex[] vertices; int capital; // the rank of the capital city Cities cities = new Cities(); cities.readFile(args[0]); vertices = cities.minSpanningTree(0); V = vertices.length; populateNeighbors(vertices); List<SimpleEntry<Integer, Double>> bc = betweennessCent(vertices); MathContext mc = new MathContext(6); // to format numbers to 6 sig digs capital = -1; // should never be -1 one when trying to access it, and we want to know if it is. System.out.println("Rank\tVertex\tBetweenness"); for(int i = 0; i < V; i++) { if(i < 40) { System.out.println((i+1) + "\t" + bc.get(i).getKey() + "\t" + new BigDecimal(bc.get(i).getValue(), mc)); } if(bc.get(i).getKey() == 0) { capital = i; } } System.out.println("\nCapital city:"); System.out.println((capital+1) + "\t" + bc.get(capital).getKey() + "\t" + new BigDecimal(bc.get(capital).getValue(), mc)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getNumberOfVertexes();", "public int numVertices();", "public int numVertices();", "public int numVertices() { return numV; }", "public int getNumberOfVertices();", "public int getNumVertices();", "public int getNumVertices()\n\t{\n\t\t//TODO: Implement this method in WEEK 3\n\t\treturn numVertices...
[ "0.79435074", "0.7882393", "0.7882393", "0.78347355", "0.7817218", "0.77495426", "0.76550376", "0.7583614", "0.75277376", "0.7413618", "0.7398274", "0.73678845", "0.72019535", "0.7180756", "0.7179607", "0.7070744", "0.70427054", "0.69671124", "0.69639695", "0.68351865", "0.68...
0.0
-1
Populate the neighbor field for each vertex if there are no "e" lines in the graph file
public static void populateNeighbors(Vertex[] vertices) { for(int i = 1; i < vertices.length; i++) { vertices[i].addNeighbor(vertices[i].getPredecessor()); vertices[vertices[i].getPredecessor()].addNeighbor(i); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addNeighborEdge(Edge e) {\n\t\t\t_neighborEdges.put(e,false);\n\t\t}", "public void setVertices(){\n\t\tvertices = new ArrayList<V>();\n\t\tfor (E e : edges){\n\t\t\tV v1 = e.getOrigin();\n\t\t\tV v2 = e.getDestination();\n\t\t\tif (!vertices.contains(v1))\n\t\t\t\tvertices.add(v1);\n\t\t\tif (!vertices.con...
[ "0.64984", "0.63992894", "0.62327445", "0.6201069", "0.61966574", "0.61635864", "0.6106539", "0.5992693", "0.59597725", "0.59547895", "0.5953309", "0.59404117", "0.5794562", "0.5781659", "0.5753592", "0.57518065", "0.5730308", "0.57287437", "0.57008445", "0.5685278", "0.56833...
0.61235
6
Compute the betweenness centrality of every vertex
public static List<SimpleEntry<Integer, Double>> betweennessCent(Vertex[] vertices) { List<SimpleEntry<Integer, Double>> bc = new ArrayList<SimpleEntry<Integer, Double>>(); int countTotal = 0; for(int i = 0; i < V; i++) { for(int j = i; j < V; j++) { // if they are not the same vertex if(i != j) { bfs(vertices, i, j); countTotal++; } } } for(int i = 0; i < V; i++) { vertices[i].divideNumPaths(countTotal); bc.add(new SimpleEntry<Integer, Double>(i, vertices[i].getNumPaths())); } // sort the list according to the values (in this case, the betweenness) Collections.sort(bc, new Comparator<SimpleEntry<Integer, Double>>(){ /** * Compare the values of two of the entries of the comparator * @param arg0 * @param arg1 * @return a negative integer if arg0 < arg1 * zero if arg0 == arg1 * a positive integer if arg0 > arg1 */ @Override public int compare(SimpleEntry<Integer, Double> arg0, SimpleEntry<Integer, Double> arg1) { return arg1.getValue().compareTo(arg0.getValue()); } }); return bc; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static double clusterVerticesOneStep(Mesh mesh) {\n\t\t\n\t\t// for each pair of the vertices\n\t\tdouble mindis = 1.0e+30;\n\t\tfor(int i = 0; i < mesh.getNumVertices(); i++) {\n\t\t\tVertex v1 = mesh.getVertex(i);\n\t\t\tfor(int j = (i + 1); j < mesh.getNumVertices(); j++) {\n\t\t\t\tVertex v2 = mesh.getVertex(j...
[ "0.6419545", "0.5924837", "0.5618016", "0.558817", "0.55072", "0.5483494", "0.5439133", "0.5360266", "0.5315469", "0.5314519", "0.52891433", "0.52621806", "0.5261059", "0.5235556", "0.5202713", "0.5199867", "0.51828265", "0.51821077", "0.5174921", "0.5169872", "0.516605", "...
0.632739
1
Compare the values of two of the entries of the comparator
@Override public int compare(SimpleEntry<Integer, Double> arg0, SimpleEntry<Integer, Double> arg1) { return arg1.getValue().compareTo(arg0.getValue()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int compararEntradas (Entry<K,V> e1, Entry<K,V> e2)\r\n\t{\r\n\t\treturn (comp.compare(e1.getKey(),e2.getKey()));\r\n\t}", "@Override\r\n\tpublic int compare(Entry<Integer, Integer> o1, Entry<Integer, Integer> o2) {\n\t\treturn o2.getValue().compareTo(o1.getValue());\r\n\t}", "@SuppressWarnings(\"Compa...
[ "0.6853438", "0.6831916", "0.6815696", "0.67683715", "0.6715142", "0.6647788", "0.66365695", "0.6629542", "0.6609829", "0.6546332", "0.6543217", "0.6519625", "0.6505852", "0.649254", "0.6465775", "0.6442113", "0.6433019", "0.6430944", "0.6415773", "0.6364207", "0.63639754", ...
0.60858315
38
Perform a breadthfirst search on an array of vertices
public static void bfs(Vertex[] vertices, int start, int dest) { int[] parent = new int[vertices.length]; boolean[] seen = new boolean[vertices.length]; LinkedList<Integer> queue; queue = new LinkedList<Integer>(); seen[start] = true; queue.add(start); int current = Integer.MIN_VALUE; while(!queue.isEmpty()) { current = queue.poll(); ArrayList<Integer> neighbors = vertices[current].getNeighbors(); for(int n = 0; n < neighbors.size(); n++) { if(!seen[neighbors.get(n)]) { seen[neighbors.get(n)] = true; queue.add(neighbors.get(n)); parent[neighbors.get(n)] = current; } } } // backtrack to update number of paths int y = dest; while(y != start) { if(parent[y] != start) { vertices[parent[y]].incrementNumPaths(); } y = parent[y]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void breadthFirst(Vertex[] vertices ){\n\t\t\n\t\tVertex temp = vertices[0];\n\t\ttemp.state=1; //for tracking the visited nodes, visited/discovered A\n\t\tboolean[] seen = new boolean[vertices.length];\n\t\tQueue<Vertex> q = new LinkedList<Vertex>(); //queue for breadth first traversal\n\t\t\n\t\tq.add(tem...
[ "0.7219332", "0.71350074", "0.7027285", "0.6941065", "0.68927455", "0.6808603", "0.6679006", "0.65929", "0.6554381", "0.6510653", "0.64921385", "0.6458", "0.6372004", "0.6292312", "0.62628454", "0.6251247", "0.61886346", "0.612838", "0.6089639", "0.6074846", "0.6057227", "0...
0.5770181
34
Print a usage message and exit
public static void usage() { System.err.println("Usage: java BetweennessCentrality <fileName>\n" + "<fileName> = a file in Graph File Format"); System.exit(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final private static void usage () {\n\t\t usage_print () ;\n\t\t System.exit (0) ;\n }", "private static void printUsageExitError(){\n\t\tSystem.out.println(usage);\n\t\tSystem.exit(1);\n\t}", "private static void help() {\n System.out.println(USAGE); \n System.exit(0);\n }", "private static void ...
[ "0.84305817", "0.8264497", "0.8158998", "0.80784404", "0.80384886", "0.8006775", "0.79717654", "0.79506624", "0.7900636", "0.7852513", "0.77124363", "0.7690167", "0.7680084", "0.76622444", "0.76435363", "0.76122874", "0.75799316", "0.7484735", "0.74725044", "0.7456015", "0.74...
0.69999605
39
This method was generated by MyBatis Generator. This method returns the value of the database column public.file.file_path
public String getFilePath() { return filePath; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@JsonProperty(\"filePath\")\n public WbExpression<StringValue> getFilePath() {\n return filePath;\n }", "public UploadedFileDTO getFile() {\r\n\t\ttype(ConfigurationItemType.FILE);\r\n\t\treturn fileValue;\r\n\t}", "java.lang.String getFilePath();", "@java.lang.Override\n public com.google....
[ "0.68283397", "0.67804515", "0.6752396", "0.6535575", "0.65290236", "0.6528429", "0.6511548", "0.6482272", "0.6482272", "0.6482272", "0.6482272", "0.64568746", "0.6418579", "0.63722235", "0.63688165", "0.636299", "0.6357435", "0.6345597", "0.6342811", "0.63312227", "0.6331222...
0.63588756
21
This method was generated by MyBatis Generator. This method sets the value of the database column public.file.file_path
public void setFilePath(String filePath) { this.filePath = filePath; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFileRef() { this.fileRef = fileRef; }", "private void setFileNamePath(String value) {\n\t\tthis.fileNamePath = value;\n\t}", "public void setFile(UploadedFileDTO value) {\r\n\t\ttype(ConfigurationItemType.FILE);\r\n\t\tthis.fileValue = value;\r\n\t}", "public void setFile(String value){\n ...
[ "0.62666553", "0.62581676", "0.6248962", "0.62053764", "0.61771744", "0.6163227", "0.61452764", "0.61094713", "0.6098675", "0.60870516", "0.6083963", "0.602266", "0.5992987", "0.58856416", "0.5878645", "0.5876644", "0.58588284", "0.5850428", "0.584325", "0.5808662", "0.580044...
0.57764506
25
This method was generated by MyBatis Generator. This method returns the value of the database column public.file.file_name
public String getFileName() { return fileName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Column(length = 500, name = \"FILE_NAME\")\r\n public String getFileName() {\r\n return this.fileName == null ? null : this.fileName.substring(this.fileName.lastIndexOf(File.separator) + 1);\r\n }", "@Column(name = \"FILE_NAME\", nullable = false, length = 100 )\n public String getFileName() {\n...
[ "0.7672715", "0.7390731", "0.6948022", "0.6792555", "0.6775567", "0.67606604", "0.67210835", "0.67070866", "0.6702193", "0.66783214", "0.6651994", "0.663233", "0.65792954", "0.65651757", "0.6537188", "0.6537188", "0.6537188", "0.6537188", "0.6537188", "0.6537188", "0.6537188"...
0.6406011
54
This method was generated by MyBatis Generator. This method sets the value of the database column public.file.file_name
public void setFileName(String fileName) { this.fileName = fileName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Column(name = \"FILE_NAME\", nullable = false, length = 100 )\n public String getFileName() {\n return fileName;\n }", "@JsonSetter(\"fileName\")\r\n public void setFileName (String value) { \r\n this.fileName = value;\r\n }", "@Column(length = 500, name = \"FILE_NAME\")\r\n publi...
[ "0.69381505", "0.6655652", "0.65819174", "0.6458672", "0.6424122", "0.6384905", "0.6384905", "0.6384905", "0.6384905", "0.6384905", "0.6384905", "0.63108057", "0.62993526", "0.6220773", "0.6173804", "0.61692756", "0.6160137", "0.6145101", "0.6135878", "0.6111256", "0.6100761"...
0.59954304
32
This method was generated by MyBatis Generator. This method returns the value of the database column public.file.file_size
public String getFileSize() { return fileSize; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getFileSize();", "public long getFileSize();", "public long size() {\n return this.filePage.getSizeInfile();\n }", "private Long getFileSize() {\n\t\t// retornamos el tamano del fichero\n\t\treturn this.fileSize;\n\t}", "public long getSize()\n\t{\n\t\treturn file.length() ;\n\t}", ...
[ "0.74358034", "0.74358034", "0.7351095", "0.7304791", "0.7269765", "0.7233439", "0.72325003", "0.72240734", "0.72167337", "0.7189581", "0.71873367", "0.7184369", "0.7154835", "0.7120055", "0.7116198", "0.7114335", "0.7108855", "0.7080546", "0.7066696", "0.700694", "0.6972132"...
0.7228044
7
This method was generated by MyBatis Generator. This method sets the value of the database column public.file.file_size
public void setFileSize(String fileSize) { this.fileSize = fileSize; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFileSize(long fileSize) {\n this.fileSize = fileSize;\n }", "public void setFileSize(long fileSize)\r\n {\r\n lFileSize = fileSize;\r\n }", "public Builder setFileSize(long value) {\n \n fileSize_ = value;\n onChanged();\n return this;\n }"...
[ "0.71331996", "0.70443964", "0.70098555", "0.6668414", "0.65637934", "0.6402416", "0.637842", "0.6351219", "0.6350422", "0.6341058", "0.63283867", "0.63112456", "0.62884206", "0.6285594", "0.627234", "0.62716407", "0.6251834", "0.6251834", "0.6249672", "0.6228174", "0.6225137...
0.68077606
3
This method was generated by MyBatis Generator. This method returns the value of the database column public.file.file_title
public String getFileTitle() { return fileTitle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Column(length = 500, name = \"FILE_NAME\")\r\n public String getFileName() {\r\n return this.fileName == null ? null : this.fileName.substring(this.fileName.lastIndexOf(File.separator) + 1);\r\n }", "@Column(name = \"FILE_NAME\", nullable = false, length = 100 )\n public String getFileName() {\n...
[ "0.68734586", "0.66372985", "0.6599865", "0.6340317", "0.6320024", "0.62110263", "0.6149563", "0.61369056", "0.61360925", "0.60999966", "0.6052206", "0.6052206", "0.6023526", "0.6023094", "0.60223067", "0.6021505", "0.6021505", "0.5999234", "0.5992126", "0.5972752", "0.596033...
0.7303738
0
This method was generated by MyBatis Generator. This method sets the value of the database column public.file.file_title
public void setFileTitle(String fileTitle) { this.fileTitle = fileTitle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getFileTitle() {\n return fileTitle;\n }", "@Column(name = \"FILE_NAME\", nullable = false, length = 100 )\n public String getFileName() {\n return fileName;\n }", "public void setTitle(java.lang.String title)\n {\n synchronized (monitor())\n {\n ...
[ "0.63914764", "0.5906486", "0.58931464", "0.5882592", "0.58713955", "0.58114827", "0.5794053", "0.5776846", "0.57540965", "0.5733801", "0.57232904", "0.57034796", "0.5700487", "0.5691978", "0.5681685", "0.5677453", "0.56668824", "0.5655817", "0.5641099", "0.5631821", "0.56159...
0.72637963
0
This method was generated by MyBatis Generator. This method returns the value of the database column public.file.regist_dt
public Date getRegistDt() { return registDt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic Date getAttr_reg_dt() {\n\t\treturn super.getAttr_reg_dt();\r\n\t}", "public DTM getSystemEntryDateTime() { \r\n\t\tDTM retVal = this.getTypedField(22, 0);\r\n\t\treturn retVal;\r\n }", "public Date getFileDate()\r\n {\r\n return dFileDate;\r\n }", "public java.sql.Times...
[ "0.584179", "0.56644243", "0.5648647", "0.55710626", "0.55672884", "0.54837507", "0.54761404", "0.54342914", "0.5416175", "0.5393173", "0.5393173", "0.5392772", "0.5328485", "0.53131557", "0.53131557", "0.53069454", "0.52694464", "0.5266439", "0.5253683", "0.5240205", "0.5232...
0.56348956
3
This method was generated by MyBatis Generator. This method sets the value of the database column public.file.regist_dt
public void setRegistDt(Date registDt) { this.registDt = registDt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFileDate(Date fileDate)\r\n {\r\n dFileDate = fileDate;\r\n }", "public abstract void setFecha_fin(java.sql.Timestamp newFecha_fin);", "public abstract void setFecha_ingreso(java.sql.Timestamp newFecha_ingreso);", "public void setRegisterDateTime(Date dateTime) { this.registerDate...
[ "0.55643976", "0.5549245", "0.54154956", "0.5327553", "0.5312102", "0.5256455", "0.5241557", "0.5183512", "0.51776266", "0.5159197", "0.5159197", "0.5157202", "0.510044", "0.510044", "0.50867313", "0.5078921", "0.5071289", "0.5027402", "0.49528378", "0.4898043", "0.48573688",...
0.6208117
0
This method was generated by MyBatis Generator. This method returns the value of the database column public.file.update_dt
public Date getUpdateDt() { return updateDt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Date getFileupdate() {\n return fileupdate;\n }", "public Date getUpdateDatetime();", "public Long getUpdateDatetime() {\n return updateDatetime;\n }", "@JsonIgnore\n @DynamoDBAttribute(attributeName=\"updatedAt\")\n public Long getUpdatedAtDD() {\n return getUpdatedAt...
[ "0.7021968", "0.6709959", "0.6699826", "0.66170084", "0.66086966", "0.66086966", "0.66077185", "0.65447384", "0.65353817", "0.64641833", "0.6460455", "0.64320797", "0.6424721", "0.6424721", "0.636453", "0.632992", "0.62707853", "0.6270079", "0.6224299", "0.62072194", "0.62072...
0.6829909
2
This method was generated by MyBatis Generator. This method sets the value of the database column public.file.update_dt
public void setUpdateDt(Date updateDt) { this.updateDt = updateDt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFileupdate(Date fileupdate) {\n this.fileupdate = fileupdate;\n }", "public void setUpdateDatetime(Date updateDatetime);", "void setUpdatedDate(Date updatedDate);", "public void setUpdatedDt(Date updatedDt) {\n\t\tthis.updatedDt = updatedDt;\n\t}", "public void setUpdatedOn(Date up...
[ "0.7104507", "0.63442624", "0.62560016", "0.623093", "0.6172936", "0.61280346", "0.6126889", "0.61218065", "0.61218065", "0.611929", "0.61044437", "0.61044437", "0.60776055", "0.59593236", "0.59593236", "0.5836795", "0.5836795", "0.5822167", "0.58069867", "0.5799753", "0.5799...
0.6495357
2
must be overridden if there is a analytical Model part attached with the metamodel
protected void calibrateMetaModel(final int currentParamNo) { Calcfc optimization=new Calcfc() { @Override public double compute(int m, int n, double[] x, double[] constrains) { double objective=0; MetaModelParams=x; for(int i:params.keySet()) { objective+=Math.pow(calcMetaModel(0, params.get(i))-simData.get(i),2)*calcEuclDistanceBasedWeight(params, i,currentParamNo); } return objective; } }; double[] x=new double[this.noOfMetaModelParams]; for(int i=0;i<this.noOfMetaModelParams;i++) { x[i]=0; } CobylaExitStatus result = Cobyla.findMinimum(optimization, this.noOfMetaModelParams, 0, x,0.5,Math.pow(10, -6) ,3, 1500); this.MetaModelParams=x; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Metamodel getMetamodel() {\n\t\treturn null;\n\t}", "public ViewMetamodel getMetamodel();", "ArtefactModel getArtefactModel();", "public boolean hasModel() {\n return false;\r\n }", "@objid (\"bf65cf74-59fe-43b9-b422-4dece2593e95\")\npublic interface ISmMetamodelFragment extends ...
[ "0.63764906", "0.6175139", "0.61421996", "0.60329694", "0.60211295", "0.5892432", "0.5844643", "0.5809737", "0.57660884", "0.5746329", "0.5743047", "0.5711054", "0.5701966", "0.5684504", "0.5662658", "0.5645773", "0.5643004", "0.56225455", "0.5573552", "0.55291975", "0.552760...
0.0
-1
fast way to call Toast
private void msg(String s) { Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void showToast(String message);", "void showToast(String message);", "void toast(int resId);", "private void toast(String aToast) {\n Toast.makeText(getApplicationContext(), aToast, Toast.LENGTH_LONG).show();\n }", "void showToast(String value);", "void toast(CharSequence sequence);", "static...
[ "0.7793707", "0.7793707", "0.7672142", "0.7596303", "0.75449514", "0.74263334", "0.7406572", "0.73437905", "0.72883", "0.7261046", "0.71946245", "0.7184863", "0.7182005", "0.7181277", "0.7059539", "0.70503443", "0.7048384", "0.7027137", "0.70175326", "0.69915557", "0.6982247"...
0.6773143
50
Write code here that turns the phrase above into concrete actions
@When("I click on controlgroup") public void i_click_on_controlgroup() { System.out.println("inside when"); jQueryHPage.clickCtrlGroup(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected String performAction(String input);", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void visit(SimpleAction action)\r\n\t{\n\t\t\r\n\t}", "protected abstract Action stringToAction(String stringAction);", "@Override\n\tpublic void action() {\n\n\t}", "priv...
[ "0.6994023", "0.64688784", "0.64028573", "0.6357782", "0.6353246", "0.6340194", "0.6326519", "0.6326519", "0.6326519", "0.6320388", "0.6240435", "0.61786896", "0.61739427", "0.6157042", "0.6115433", "0.6075159", "0.6068293", "0.6063896", "0.6039428", "0.6039428", "0.6039428",...
0.0
-1
Write code here that turns the phrase above into concrete actions
@Then("I land on the controlgroup page") public void i_land_on_the_controlgroup_page() { System.out.println("inside then"); Assertions.assertEquals("https://jqueryui.com/controlgroup/", driver.getCurrentUrl()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected String performAction(String input);", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void visit(SimpleAction action)\r\n\t{\n\t\t\r\n\t}", "protected abstract Action stringToAction(String stringAction);", "@Override\n\tpublic void action() {\n\n\t}", "priv...
[ "0.6989324", "0.64658433", "0.6398834", "0.6353149", "0.63501525", "0.633518", "0.63232154", "0.63232154", "0.63232154", "0.6317274", "0.62379014", "0.61738145", "0.61690307", "0.61507595", "0.6110593", "0.6071837", "0.6065073", "0.6061467", "0.6035597", "0.6035597", "0.60355...
0.0
-1
Write code here that turns the phrase above into concrete actions
@When("I click on datepicker") public void i_click_on_datepicker() { System.out.println("inside date picker"); jQueryHPage.clickDatePicker(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected String performAction(String input);", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void visit(SimpleAction action)\r\n\t{\n\t\t\r\n\t}", "protected abstract Action stringToAction(String stringAction);", "@Override\n\tpublic void action() {\n\n\t}", "priv...
[ "0.6989324", "0.64658433", "0.6398834", "0.6353149", "0.63501525", "0.633518", "0.63232154", "0.63232154", "0.63232154", "0.6317274", "0.62379014", "0.61738145", "0.61690307", "0.61507595", "0.6110593", "0.6071837", "0.6065073", "0.6061467", "0.6035597", "0.6035597", "0.60355...
0.0
-1
Write code here that turns the phrase above into concrete actions
@Then("I land on the datepicker page") public void i_land_on_the_datepicker_page() { System.out.println("inside date picker landing page"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected String performAction(String input);", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void visit(SimpleAction action)\r\n\t{\n\t\t\r\n\t}", "protected abstract Action stringToAction(String stringAction);", "@Override\n\tpublic void action() {\n\n\t}", "priv...
[ "0.6989324", "0.64658433", "0.6398834", "0.6353149", "0.63501525", "0.633518", "0.63232154", "0.63232154", "0.63232154", "0.6317274", "0.62379014", "0.61738145", "0.61690307", "0.61507595", "0.6110593", "0.6071837", "0.6065073", "0.6061467", "0.6035597", "0.6035597", "0.60355...
0.0
-1
Feign client with ribbon and hystrix
@RibbonClient(value = "user-client") // load balancer @FeignClient(value = "user-client", fallback = UserClientFallback.class) public interface UserClient { @GetMapping("/user") User getUser(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@FeignClient(value = \"SERVICE-A\", fallback = BaseClientHystrix.class)\npublic interface BaseClient {\n @RequestMapping(method = RequestMethod.GET, value = \"/list\")\n String list();\n}", "@FeignClient(\n name = \"beispiel-hystrix-service\",\n url = \"http://localhost:8081\",\n fallb...
[ "0.7767895", "0.7568028", "0.75657964", "0.7500308", "0.7366679", "0.7271245", "0.71753323", "0.7166778", "0.7120861", "0.7119824", "0.70855933", "0.7067333", "0.7047105", "0.7006869", "0.6966778", "0.6952912", "0.6900848", "0.6884539", "0.6851142", "0.67502326", "0.6677918",...
0.79138947
0
Creates new form Feature3
public Feature3() { initComponents(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Action( ACTION_CREATE_FEATURE )\r\n public String doCreateFeature( HttpServletRequest request )\r\n {\r\n populate( _feature, request );\r\n\r\n // Check constraints\r\n if ( !validateBean( _feature, VALIDATION_ATTRIBUTES_PREFIX ) )\r\n {\r\n return redirectView( reque...
[ "0.6797952", "0.6656665", "0.6575248", "0.6441024", "0.63257235", "0.63257235", "0.6098268", "0.6006294", "0.5998294", "0.5998294", "0.59924394", "0.593293", "0.5900068", "0.5900068", "0.5837229", "0.5792767", "0.57695305", "0.5727766", "0.5723656", "0.5721574", "0.5710741", ...
0.6196459
6
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel8 = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jScrollPane3 = new javax.swing.JScrollPane(); jTextArea3 = new javax.swing.JTextArea(); jLabel2 = new javax.swing.JLabel(); jPanel1 = new javax.swing.JPanel(); jScrollPane2 = new javax.swing.JScrollPane(); jTextArea2 = new javax.swing.JTextArea(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); jTextArea1 = new javax.swing.JTextArea(); jLabel7 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jButton7 = new javax.swing.JButton(); jButton8 = new javax.swing.JButton(); l1 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Features"); jLabel8.setFont(new java.awt.Font("Algerian", 0, 24)); // NOI18N jLabel8.setForeground(new java.awt.Color(255, 51, 102)); jLabel8.setText("Features that you can stay without word - AWESOME!!"); jPanel2.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)); jLabel1.setFont(new java.awt.Font("Book Antiqua", 2, 24)); jLabel1.setForeground(new java.awt.Color(0, 102, 204)); jLabel1.setText("Workout Areas"); jTextArea3.setColumns(20); jTextArea3.setEditable(false); jTextArea3.setRows(5); jTextArea3.setText("Workout Areas Are Awesome..\nTHey Include A large No.\nOf Machines...\n"); jScrollPane3.setViewportView(jTextArea3); jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/finaltheoberoiproject/gym.png"))); // NOI18N jLabel2.setText("jLabel2"); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 267, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(58, 58, 58) .addComponent(jLabel1) .addContainerGap(82, Short.MAX_VALUE)) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 267, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 89, Short.MAX_VALUE) .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); jPanel1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)); jTextArea2.setColumns(20); jTextArea2.setEditable(false); jTextArea2.setRows(5); jTextArea2.setText("Beautiful Corridors that \nprovide us peace of Mind"); jScrollPane2.setViewportView(jTextArea2); jLabel3.setFont(new java.awt.Font("Candara", 2, 24)); jLabel3.setForeground(new java.awt.Color(255, 0, 102)); jLabel3.setText("Awesome Corridors"); jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/finaltheoberoiproject/corridors.png"))); // NOI18N javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(29, 29, 29) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 221, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(32, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addContainerGap(21, Short.MAX_VALUE) .addComponent(jLabel4)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addContainerGap(51, Short.MAX_VALUE) .addComponent(jLabel3) .addGap(39, 39, 39)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel3) .addGap(7, 7, 7) .addComponent(jLabel4) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 108, Short.MAX_VALUE) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); jPanel3.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)); jTextArea1.setColumns(20); jTextArea1.setEditable(false); jTextArea1.setRows(5); jTextArea1.setText("Vast Party Halls used for \nWedding , Engagement ,\nAnniverasry Celebration,\netc."); jScrollPane1.setViewportView(jTextArea1); jLabel7.setFont(new java.awt.Font("Arial Narrow", 2, 24)); jLabel7.setForeground(new java.awt.Color(51, 51, 255)); jLabel7.setText("Vast party Hall"); jLabel6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/finaltheoberoiproject/party hall.png"))); // NOI18N javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addGap(61, 61, 61) .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel3Layout.createSequentialGroup() .addGap(25, 25, 25) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 237, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel6)))) .addContainerGap(24, Short.MAX_VALUE)) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addComponent(jLabel7) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel6) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(25, 25, 25)) ); jButton7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/finaltheoberoiproject/back-arrow.png"))); // NOI18N jButton7.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton7ActionPerformed(evt); } }); jButton8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/finaltheoberoiproject/forward.png"))); // NOI18N jButton8.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton8ActionPerformed(evt); } }); new Thread () { public void run () {while(true) { Calendar cal= new GregorianCalendar(); int h = cal .get(Calendar.HOUR); int m = cal .get(Calendar.MINUTE); int s = cal .get(Calendar.SECOND); int a = cal .get(Calendar.AM_PM); String x=""; if (a==1 ){x="PM";} else{x="AM";} String net = h+":"+m+":"+s+" "+x; l1.setText(net); } } }.start(); l1.setFont(new java.awt.Font("DS-Digital", 0, 18)); // NOI18N l1.setText("jLabel1"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(19, 19, 19) .addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(50, 50, 50) .addComponent(jLabel8) .addGap(54, 54, 54) .addComponent(jButton8, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(32, 32, 32) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(35, 35, 35) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(874, Short.MAX_VALUE) .addComponent(l1, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap() .addComponent(l1, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(25, 25, 25) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jButton8, 0, 0, Short.MAX_VALUE) .addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jLabel8)) .addGap(74, 74, 74) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, 412, Short.MAX_VALUE) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(38, 38, 38)) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.73191476", "0.72906625", "0.72906625", "0.72906625", "0.72860986", "0.7248112", "0.7213479", "0.72078276", "0.7195841", "0.71899796", "0.71840525", "0.7158498", "0.71477973", "0.7092748", "0.70800966", "0.70558053", "0.69871384", "0.69773406", "0.69548076", "0.69533914", "...
0.0
-1
take the robot to the best fruit with shortestPath.
private void StepForRobot() { Iterator<Robot> itr = rob.iterator(); while(itr.hasNext()) { Robot r = itr.next(); Fruit fDest = null; double maxSum = 0; node_data v = null; Iterator<Fruit> it = fru.iterator(); while(it.hasNext()) { Fruit f = it.next(); double sum =0; int dest = f.e.getSrc(); List<node_data> list = Algo.shortestPath(r.src, dest); list.add(dgraph.getNode(f.e.getDest())); for(int i = 0;i<list.size()-1;i++) sum += dgraph.getEdge(list.get(i).getKey(), list.get(i+1).getKey()).getWeight(); sum = f.getValue() / sum; if(sum > maxSum && !f.isDest) { maxSum = sum; v = list.get(1); fDest = f; } } if(fDest != null) { fDest.setDest(true); game.chooseNextEdge(r.id, v.getKey()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Fruit findClosestFruit(Robot robot) {\n double min_dist = Double.MAX_VALUE;\n Fruit ans = null;\n for (int i = 0; i < my_game.getFruits().size(); i++) {\n Fruit fruit = my_game.getFruits().get(i);\n if(fruits_status.values().contains(fruit)) {\n con...
[ "0.7184688", "0.70780146", "0.63805777", "0.63105196", "0.6309875", "0.6255558", "0.6160665", "0.6149618", "0.61300796", "0.6089488", "0.6053086", "0.60138685", "0.5989306", "0.59640497", "0.5937861", "0.591326", "0.59128284", "0.5902536", "0.58804", "0.5833809", "0.58252853"...
0.6640544
2
find the best spot for all the robot to start.
public void changeRobot(int numR) { // game.addRobot(4); edge_data e=new EdgeData(); int numans=0; int i=0; double x=0; double y=Double.MAX_VALUE; while(i<numR) { double c=0; for(Fruit f: fru) { e=f.e; x=f.value/e.getWeight(); if(x>c && x<y) { c=x; numans=e.getSrc(); } } y=c; game.addRobot(numans); i++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void findBestPath(){\n\t\t// The method will try to find the best path for every starting point and will use the minimum\n\t\tfor(int start = 0; start < this.getDimension(); start++){\n\t\t\tfindBestPath(start);\t\n\t\t}\t\n\t}", "public void findRobotPosition(){\n targetVisible = false;\n ...
[ "0.66166466", "0.6445104", "0.6251839", "0.62365997", "0.60446966", "0.6019068", "0.59959465", "0.5924282", "0.59076107", "0.58786905", "0.5856816", "0.5806876", "0.57840747", "0.57226616", "0.5704022", "0.56726", "0.5667038", "0.5663249", "0.5660241", "0.5641468", "0.5638103...
0.0
-1
init and draw the robot.
public void DrawRobots(List<String> robots) { counter++; rob=new ArrayList<>(); List<String> r=game.getRobots(); String RJ=r.toString(); try { JSONArray j =new JSONArray(RJ); int i=0; int c=0; while(i<j.length()) { String help=""; JSONObject n=(JSONObject) j.get(i); JSONObject jr = n.getJSONObject("Robot"); String s=jr.getString("pos"); String p[]=new String[3]; for (int k = 0; k < s.length(); k++) { if(s.charAt(k)!=',') { help=help+s.charAt(k); } if(c<3&&s.charAt(k)==',') { p[c]=help; c++; help=""; } } p[c]=help; c=0; double x=Double.parseDouble(p[0]); double y=Double.parseDouble(p[1]); double z=Double.parseDouble(p[2]); Point3D p1=new Point3D(x,y,z); int id=jr.getInt("id"); double value=jr.getDouble("value"); int src=jr.getInt("src"); int dest=jr.getInt("dest"); double speed=jr.getDouble("speed"); Robot ro=new Robot(src,p1,id,dest,value,speed); rob.add(ro); i++; if(KMLbool) { try { KML_Logger.write(KmlName, ro.p.x(), ro.p.y(), "Robot", game.timeToEnd()); } catch (FileNotFoundException e) { e.printStackTrace(); } } } }catch(Exception error) { error.printStackTrace(); System.out.println("catch"); } int n=1; for (Robot r1: rob) { StdDraw.setPenRadius(0.030); StdDraw.setPenColor(Color.black); StdDraw.point(r1.p.x(), r1.p.y()); StdDraw.text(rx.get_max() - 0.001 - 0.0075*n, ry.get_max()-0.0005, "robot "+ (n++) + " score: " + r1.value); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void robotInit() {\n\n }", "public void robotInit() {\n\n }", "public void robotInit() {\n RobotMap.init();\n driveWithJoystick = new DriveTrain();\n \n oi = new OI();\n }", "public void robotInit() {\n\t\trightFront = new CANTalon(1);\n\t\tleftFront = new CANTalon(3);\n...
[ "0.7146422", "0.7146422", "0.71346927", "0.71073896", "0.70973456", "0.7059802", "0.70530117", "0.7044984", "0.70215774", "0.7019538", "0.7000149", "0.6956137", "0.6949273", "0.6943871", "0.6901065", "0.6879995", "0.68781596", "0.68781596", "0.68781596", "0.6870671", "0.68604...
0.0
-1
init and draw the fruit.
private void DrawFruit(game_service game) { fru=new ArrayList<Fruit>(); List<String> f= game.getFruits(); String FJ=f.toString(); try { JSONArray j =new JSONArray(FJ); int i=0; int c=0; while(i<j.length()) { String help=""; JSONObject n=(JSONObject) j.get(i); JSONObject jf = n.getJSONObject("Fruit"); String s=jf.getString("pos"); String p[]=new String[3]; for (int k = 0; k < s.length(); k++) { if(s.charAt(k)!=',') { help=help+s.charAt(k); } if(c<3&&s.charAt(k)==',') { p[c]=help; c++; help=""; } } p[c]=help; c=0; double x=Double.parseDouble(p[0]); double y=Double.parseDouble(p[1]); double z=Double.parseDouble(p[2]); Point3D p1=new Point3D(x,y,z); double value=jf.getDouble("value"); int type=jf.getInt("type"); Fruit fr=new Fruit(value,p1,type,findEdgeFruit(p1, type)); fru.add(fr); i++; if(KMLbool) { String objType = ""; if(fr.type == 1) objType="Apple"; else objType="Banana"; try { KML_Logger.write(KmlName, fr.p.x(), fr.p.y(), objType, game.timeToEnd()); } catch (FileNotFoundException e) { e.printStackTrace(); } } } }catch(Exception error) { error.printStackTrace(); System.out.println("catch"); } for (Fruit f1: fru) { String fruit_icon = ""; if(f1.type==1) fruit_icon="./apple.png"; if(f1.type==-1) fruit_icon="./banana.png"; StdDraw.picture(f1.p.x(), f1.p.y(), fruit_icon); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PaletteFruit(ImageView view, Fruit fruit)\n {\n this.fruit = fruit;\n this.paletteView = view;\n //this.section = section;\n //this.path = new VectorChildFinder(paletteView.getContext(), R.drawable.ic_colorblob, paletteView).findPathByName(\"blob\");\n //path.setFillCol...
[ "0.70240396", "0.66374546", "0.64212227", "0.6417759", "0.63980234", "0.6348057", "0.6218974", "0.6174409", "0.61616784", "0.61600304", "0.6127182", "0.61219865", "0.61042166", "0.61026144", "0.6089074", "0.6052917", "0.60444474", "0.6040785", "0.60357773", "0.60271096", "0.6...
0.62256265
6
find where is the fruit on the edge.
public edge_data findEdgeFruit(Point3D pf,int type) { edge_data e=new EdgeData(); Collection<node_data> nc = dgraph.getV(); for (node_data n: nc ) { Point3D p1=n.getLocation(); Collection<edge_data> ec = dgraph.getE(n.getKey()); for (edge_data e1: ec) { Point3D p2 = dgraph.getNode(e1.getDest()).getLocation(); if(p1.distance3D(pf)+pf.distance3D(p2)-p1.distance3D(p2)<epsilon) return e1; } } return e; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public edge_data edgeOfFruit(int fruit_id){\n Fruit f = getFruitbyID(fruit_id);\n Iterator<node_data> nodesIter = this.Graph.getV().iterator();\n\n while(nodesIter.hasNext()){\n node_data node = nodesIter.next();\n Iterator<edge_data> edges = Graph.getE(node.getKey()).ite...
[ "0.68533874", "0.6276935", "0.57412606", "0.56835234", "0.5663634", "0.56366533", "0.56283027", "0.556185", "0.55593365", "0.55381864", "0.5495632", "0.5480291", "0.5477135", "0.54686934", "0.5459437", "0.5451591", "0.5391647", "0.52844787", "0.52737033", "0.52509165", "0.522...
0.6108774
2
return the number of robots.
public int getnumR(game_service game) { int rn=0; String g=game.toString(); JSONObject l; try { l=new JSONObject(g); JSONObject t = l.getJSONObject("GameServer"); rn=t.getInt("robots"); } catch (JSONException e) {e.printStackTrace();} return rn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getNumRobots() {\n return ((Integer)numRobotsSpinner.getValue()).intValue();\n }", "public int getCantidadRobots();", "public int getNumberOfAgents()\n {\n return this.numberOfAgents;\n }", "public int numberOfOpenSites() {\n \treturn num;\r\n }", "public int getMoto...
[ "0.76840645", "0.71644956", "0.657302", "0.6572067", "0.6551966", "0.6537254", "0.6534422", "0.653226", "0.6527914", "0.65226734", "0.64607465", "0.64596176", "0.64523643", "0.6448446", "0.64267844", "0.6424147", "0.63886917", "0.6359016", "0.63569486", "0.6332073", "0.631040...
0.5999163
69
return the min and max of x point.
public Range FindXmaxmin(graph g) { double xmin=Double.MAX_VALUE; double xmax=Double.MIN_VALUE; Collection<node_data> nc = g.getV(); for(node_data n: nc) { double px=n.getLocation().x(); if(px>xmax) { xmax=px; } if(px<xmin) { xmin=px; } } return new Range(xmin-0.001,xmax+0.001); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getXRangeMax() {\n return xRangeMax;\n }", "public double getXRangeMin() {\n return xRangeMin;\n }", "public double getMaximumX () {\n return minimumX + width;\n }", "static public double lim(double x,double min,double max) {\r\n\t\t if(x<min) return min;\r\n\t\t if(x>max) ret...
[ "0.7140828", "0.70564806", "0.6815795", "0.6758679", "0.6718014", "0.6680131", "0.6649363", "0.6639074", "0.66274464", "0.6569357", "0.6553369", "0.6532331", "0.6517237", "0.6511465", "0.6474588", "0.64565676", "0.6438269", "0.64295167", "0.6412259", "0.63877535", "0.6386146"...
0.6775881
3
return the min and max of y point.
public Range FindYmaxmin(graph g) { double ymin=Double.MAX_VALUE; double ymax=Double.MIN_VALUE; Collection<node_data> nc = g.getV(); for(node_data n: nc) { double py=n.getLocation().y(); if(py>ymax) { ymax=py; } if(py<ymin) { ymin=py; } } return new Range(ymin-0.001,ymax+0.001); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getYRangeMin() {\n return yRangeMin;\n }", "float yMax();", "float yMin();", "public double getYRangeMax() {\n return yRangeMax;\n }", "public double getMaximumY () {\n return minimumY + height;\n }", "public double getMinY() {\n\treturn minY;\n }", "Coordinate getMin...
[ "0.7383032", "0.73279697", "0.72497994", "0.7226281", "0.7181038", "0.71809363", "0.7169811", "0.7168918", "0.71284807", "0.7117647", "0.7010043", "0.6972884", "0.69178367", "0.6906506", "0.69031996", "0.6885623", "0.6846478", "0.6788124", "0.6743504", "0.6715206", "0.6699751...
0.67077154
20
Pushes to String extension of .kml.
public static void startKML(String file_name) { if(!file_name.endsWith(".kml") && !file_name.endsWith(".KML")) file_name += ".kml"; KmlName = file_name; KML_Logger.createFile(file_name, numgame); KMLbool = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void makeKMLString(){\n kmlString = \"<Placemark><visibility>1</visibility>\";\n\n if(name != \"\" && name != null){\n\t\t kmlString +=\"<name>\"+name+\"</name>\";\n\t }\n\n //set time stamp\n //we may not always want this\n //TODO: need to add an UI option:...
[ "0.6666689", "0.66241044", "0.5862682", "0.5174357", "0.51199013", "0.51153874", "0.50224155", "0.49687177", "0.49236733", "0.4804317", "0.4787901", "0.47474366", "0.47358435", "0.46344", "0.46247986", "0.46128404", "0.459715", "0.45808676", "0.45774013", "0.45472544", "0.449...
0.56670123
3
/ Information about the games relation to myself or everyone.
public static void yourResults() { String[] options = {"In relation to myself", "In relation to everyone"}; Object panel = JOptionPane.showInputDialog(null, " I want to see where I am stand", "Message", JOptionPane.INFORMATION_MESSAGE, null, options, options[0]); if (panel == "In relation to myself") { String forID = ""; int ID; forID = JOptionPane.showInputDialog(null, " What is your ID ?"); try { ID = Integer.parseInt(forID); String forPrintAns = ""; Class.forName("com.mysql.jdbc.Driver"); Connection connect = DriverManager.getConnection(jdbcUrl, jdbcUser, jdbcUserPassword); Statement statement = connect.createStatement(); String query = "SELECT * FROM Logs WHERE UserID =" + ID + " ORDER BY levelID , moves;"; ResultSet result = statement.executeQuery(query); //my level now while (result.next()) { forPrintAns += result.getInt("UserID") + "," + result.getInt("levelID") + "," + result.getInt("moves") + "," + result.getInt("score")+"E"; } String forPrintRusults = ""; String[] arr; int numOfGames = 0; int level = 0; int moves = -1; int grade = 0; boolean flag=false; int maxGrade=Integer.MIN_VALUE; int saveMove=0; String for1="",for3="",for5="",for9="",for11="",for13="",for16="",for20="",for19="",for23=""; int index = 3; for (int i = 0; i < forPrintAns.length(); i++) { if (forPrintAns.charAt(i) == 'E') { numOfGames++; String help = forPrintAns.substring(index, i); index = i; arr = help.split(","); // System.out.println(Arrays.deepToString(arr)); switch(level) { case 0: if (grade >= 125 && moves <= 290) { if(!flag) { maxGrade=Integer.MIN_VALUE; saveMove=0; flag=true; } if(maxGrade<grade) { maxGrade=grade; saveMove=moves; } forPrintRusults= "Level: " + level + " moves: " + saveMove + " Grade: " + maxGrade + "\n"; } break; case 1: if (grade >= 436&& moves <= 580) { if(flag) { maxGrade=Integer.MIN_VALUE; saveMove=0; flag=false; } if(maxGrade<grade) { maxGrade=grade; saveMove=moves; } for1= "Level: " + level + " moves: " + saveMove + " Grade: " + maxGrade + "\n"; } break; case 3: if (grade >= 713&& moves <= 580) { if(!flag) { maxGrade=Integer.MIN_VALUE; saveMove=0; flag=true; } if(maxGrade<grade) { maxGrade=grade; saveMove=moves; } for3= "Level: " + level + " moves: " + saveMove + " Grade: " + maxGrade + "\n"; } break; case 5: if (grade >= 570&& moves <= 500) { if(flag) { maxGrade=Integer.MIN_VALUE; saveMove=0; flag=false; } if(maxGrade<grade) { maxGrade=grade; saveMove=moves; } for5= "Level: " + level + " moves: " + saveMove + " Grade: " + maxGrade + "\n"; } break; case 9: if (grade >= 480&& moves <= 580) { if(!flag) { maxGrade=Integer.MIN_VALUE; saveMove=0; flag=true; } if(maxGrade<grade) { maxGrade=grade; saveMove=moves; } for9= "Level: " + level + " moves: " + saveMove + " Grade: " + maxGrade + "\n"; } break; case 11: if (grade >= 1050&& moves <= 580) { if(flag) { maxGrade=Integer.MIN_VALUE; saveMove=0; flag=false; } if(maxGrade<grade) { maxGrade=grade; saveMove=moves; } for11= "Level: " + level + " moves: " + saveMove + " Grade: " + maxGrade + "\n"; } break; case 13: if (grade >= 310&& moves <= 580) { if(!flag) { maxGrade=Integer.MIN_VALUE; saveMove=0; flag=true; } if(maxGrade<grade) { maxGrade=grade; saveMove=moves; } for13= "Level: " + level + " moves: " + saveMove + " Grade: " + maxGrade + "\n"; } break; case 16: if (grade >= 235&& moves <= 290) { if(flag) { maxGrade=Integer.MIN_VALUE; saveMove=0; flag=false; } if(maxGrade<grade) { maxGrade=grade; saveMove=moves; } for16= "Level: " + level + " moves: " + saveMove + " Grade: " + maxGrade + "\n"; } break; case 19: if (grade >= 250&& moves <= 580) { if(!flag) { maxGrade=Integer.MIN_VALUE; saveMove=0; flag=true; } if(maxGrade<grade) { maxGrade=grade; saveMove=moves; } for19= "Level: " + level + " moves: " + saveMove + " Grade: " + maxGrade + "\n"; } break; case 20: if (grade >= 200&& moves <= 290) { if(flag) { maxGrade=Integer.MIN_VALUE; saveMove=0; flag=false; } if(maxGrade<grade) { maxGrade=grade; saveMove=moves; } for20= "Level: " + level + " moves: " + saveMove + " Grade: " + maxGrade + "\n"; } break; case 23: if (grade >= 1000&& moves <= 1140) { if(!flag) { maxGrade=Integer.MIN_VALUE; saveMove=0; flag=true; } if(maxGrade<grade) { maxGrade=grade; saveMove=moves; } for23= "Level: " + level + " moves: " + saveMove + " Grade: " + maxGrade + "\n"; } break; } level = Integer.parseInt(arr[1]); moves = Integer.parseInt(arr[2]); grade = Integer.parseInt(arr[3]); } } forPrintRusults +="\n"+for1+"\n"+for3+"\n"+for5+"\n"+for9+"\n"+for11+"\n"+for13+"\n"+for16+"\n"+for20+"\n"+for19+"\n"+for23+"\n"; forPrintRusults += "your level is " + level + " and so far you played " + numOfGames + " games."; JOptionPane.showMessageDialog(null, forPrintRusults); result.close(); statement.close(); connect.close(); } catch (SQLException e) { e.getMessage(); e.getErrorCode(); } catch (ClassNotFoundException e) { e.printStackTrace(); } } if (panel == "In relation to everyone") { String forPrintAns = ""; String StringID = JOptionPane.showInputDialog(null, "What is your ID ? "); try { int NumberID = Integer.parseInt(StringID); Connection connect =DriverManager.getConnection(jdbcUrl, jdbcUser, jdbcUserPassword); Statement statement = connect.createStatement(); String query = "SELECT * FROM Logs ORDER BY levelID , score;"; ResultSet result = statement.executeQuery(query); int myPlace = 1; int level = 0; int grade = 0; String forPrintRusults = ""; List<String> IDList = new ArrayList<>(); while (result.next()) { forPrintAns += ("Id: " + result.getInt("UserID") + "," + result.getInt("levelID") + "," + result.getInt("score") + "," + result.getDate("time") + "E"); } int index = 0; boolean weCanPrint = false; boolean notExistID = true; for (int i = 0; i < forPrintAns.length(); i++) { if (forPrintAns.charAt(i) == 'E') { notExistID = true; String help = forPrintAns.substring(index, i); index = i; String[] arr = help.split(","); for (int j = 0; j < IDList.size(); j++) { if (IDList.get(j).equals(arr[0])) //return id notExistID = false; } if (notExistID) { IDList.add(arr[0]); myPlace++; } if (Integer.parseInt(arr[1]) != level && weCanPrint) //we finished to check this level { forPrintRusults += "Level: " + level + " Grade: " + grade + " your Place is:" + myPlace + "\n"; myPlace = 1; level = Integer.parseInt(arr[1]); weCanPrint = false; IDList.clear(); } if (arr[0].contains("" + NumberID)) //the id it's my id { level = Integer.parseInt(arr[1]); weCanPrint = true; grade = Integer.parseInt(arr[2]); myPlace = 1; IDList.clear(); } } } JOptionPane.showMessageDialog(null, forPrintRusults); } catch (SQLException e) { e.getMessage(); e.getErrorCode(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getBelongToPlayer();", "@Override\n\tpublic GameInfo getGameInfo() {\n\t\treturn gameInfo;\n\t}", "public GameInfoDetails(Game g) {\n\t\tthis.matches = g.getNumberOfGames();\n\t\tfor(Player p: g.getPlayers()) {\n\t\t\tplayerWins.add(new GameInfoPlayer(p));\n\t\t}\n\t}", "public void printPersonStats(Stri...
[ "0.5688174", "0.5671722", "0.56358075", "0.5509267", "0.5434052", "0.5414866", "0.53759646", "0.53555536", "0.53349924", "0.5325674", "0.53237337", "0.5285799", "0.5285799", "0.5284006", "0.52696276", "0.52679336", "0.52674145", "0.5243686", "0.5145167", "0.5142306", "0.51371...
0.0
-1
Function to show a message,
private void showMessage(String TStr, String CStr) { Alert alert = new Alert(AlertType.INFORMATION); alert.setTitle(TStr); alert.setHeaderText(null); alert.setContentText(CStr); alert.showAndWait(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showMessage(String message);", "public void showMessage(String message) \r\n\t\t{\t\t\t\r\n\t\t}", "@Override\n\tpublic void showMessage(String message) {\n\n\t}", "@Override\r\n\t\tpublic void showMessage(String message) {\n\t\t\t\r\n\t\t}", "private void showMessage(String string) {\n\n ...
[ "0.86456037", "0.8338228", "0.8172832", "0.81722856", "0.8025376", "0.80161107", "0.79810405", "0.79718685", "0.7947782", "0.78937364", "0.77978104", "0.7777531", "0.7633983", "0.75879973", "0.75561476", "0.754165", "0.75101006", "0.75101006", "0.7506218", "0.7491108", "0.748...
0.6930142
81
Creating show about message
private void showAbout() { showMessage("About", " Curtis Baldwin's Intelligent Building"); // About message created when about button // pressed }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showAbout() {\n JOptionPane.showMessageDialog(this,\n \"TalkBox\\n\" + VERSION,\n \"About TalkBox\",\n JOptionPane.INFORMATION_MESSAGE);\n }", "public void showInformationMessage(String msg) {\r\n JOptionPane.showMessageDialog(this,\r\n\t\t\t...
[ "0.7284601", "0.7195401", "0.71522355", "0.71406406", "0.7135638", "0.7089317", "0.7088205", "0.70559996", "0.70382655", "0.7018538", "0.700761", "0.6953695", "0.6942984", "0.6909033", "0.6908956", "0.6890938", "0.6880758", "0.6879292", "0.6847416", "0.683139", "0.6828169", ...
0.7509576
0
set up the menu of commands for the GUI
MenuBar setMenu() { // initially set up the file chooser to look for cfg files in current directory MenuBar menuBar = new MenuBar(); // create main menu Menu mFile = new Menu("File"); // add File main menu MenuItem mExit = new MenuItem("Exit"); // whose sub menu has Exit mExit.setOnAction(new EventHandler<ActionEvent>() { public void handle(ActionEvent t) { // action on exit timer.stop(); // stop timer System.exit(0); // exit program } }); mFile.getItems().addAll(mExit); // add load, save and exit to File menu Menu mHelp = new Menu("Help"); // create Help menu MenuItem mAbout = new MenuItem("About"); // add Welcome sub menu item mAbout.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent actionEvent) { showAbout(); // whose action is to give welcome message } }); mHelp.getItems().addAll(mAbout); // add Welcome and About to Run main item menuBar.getMenus().addAll(mFile, mHelp); // set main menu with File, Config, Run, Help return menuBar; // return the menu }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initMenu() {\n \n JMenuBar menuBar = new JMenuBar();\n \n JMenu commands = new JMenu(\"Commands\");\n \n JMenuItem add = new JMenuItem(\"Add\");\n add.addActionListener((ActionEvent e) -> {\n changeState(\"Add\");\n });\n comman...
[ "0.7504776", "0.7466636", "0.73664683", "0.73168314", "0.72840613", "0.72344613", "0.71977323", "0.7160817", "0.71432084", "0.7120409", "0.70620435", "0.7055859", "0.7051564", "0.7050939", "0.7045184", "0.7040075", "0.7016573", "0.70144916", "0.698608", "0.6954109", "0.695266...
0.0
-1
set up the horizontal box for the bottom with relecvant buttons
private HBox setButtons() { Button btnNewBuild = new Button("First Building"); //button to select the first building btnNewBuild.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { theBuilding = new Building(buildingString()); drawBuilding(); // then redraw the building } }); Button btnNewBuild2 = new Button("Second Building"); //Button to select the second building btnNewBuild2.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { theBuilding = new Building(buildingString2()); drawBuilding(); // then redraw the building } }); Button btnStart = new Button("Start"); //button to start the animation btnStart.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { timer.start(); // whose action is to start the timer } }); Button btnStop = new Button("Pause"); //button to pause the animation btnStop.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { timer.stop(); // and its action to stop the timer } }); Button btnRestart = new Button("RstBuilding1"); // new button for restarting the first building btnRestart.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { theBuilding = new Building(buildingString()); //calling the first building timer.stop(); //setting the animation to stop drawBuilding(); //redrawing the building } }); Button btnRestart2 = new Button("RstBuilding2"); // new button for restarting building 2 btnRestart2.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { theBuilding = new Building(buildingString2()); //calling the second building timer.stop(); //setting the animation time to stop drawBuilding(); //redrawing the building } }); Button btnAdd = new Button("Another Person"); // new button for adding person btnAdd.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { theBuilding.addPerson(); // and its action to stop the timer drawBuilding(); //re drawing the building } }); Button btnRemove = new Button("Remove A Person"); // new button for removing person btnRemove.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { theBuilding.removePerson(); // and its action to stop the timer drawBuilding(); // redrawing the buildinf } }); // now add these buttons + labels to a HBox HBox hbox = new HBox(new Label("Config: "), btnNewBuild, btnNewBuild2, new Label("Run: "), btnStart, btnStop, new Label("Person: "), btnAdd, btnRemove, new Label("RstBuildings: "), btnRestart, btnRestart2); return hbox; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public HBox TableBottomBox()\n {\n HBox bottomBox = new HBox();\n bottomBox.setAlignment(Pos.BOTTOM_RIGHT);\n bottomBox.setSpacing(400);\n\n // add button to add to bottom box\n Button homeButton = new Button();\n homeButton.setPrefWidth(200);\n homeButton.setPre...
[ "0.71645886", "0.7104736", "0.7023208", "0.7014797", "0.6931384", "0.69083434", "0.6888835", "0.68021667", "0.6605172", "0.6578402", "0.6565779", "0.64511406", "0.6411884", "0.63814616", "0.63668597", "0.6365493", "0.6362252", "0.635152", "0.634858", "0.63284796", "0.6321", ...
0.0
-1
function to convert char c to actual colour used
Color colFromChar(char c) { Color ans = Color.BLACK; switch (c) { case 'y': ans = Color.YELLOW; break; case 'r': ans = Color.RED; break; case 'g': ans = Color.GREEN; break; case 'b': ans = Color.BLUE; break; case 'k': ans = Color.BLACK; break; case 'o': ans = Color.ORANGE; break; case 'p': ans = Color.PINK; break; case 'c': ans = Color.CYAN; break; } return ans; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public char getColor();", "public Color returnColorForCharacter(char c){\r\n\t\tif (c == 'r'){\r\n\t\t\treturn Color.red;\r\n\t\t}\r\n\t\telse if (c == 'g'){\r\n\t\t\treturn Color.green;\r\n\t\t}\r\n\t\telse if (c == 'b'){\r\n\t\t\treturn Color.blue;\r\n\t\t}\r\n\t\telse if (c == 'w'){\r\n\t\t\treturn Color.whit...
[ "0.7644888", "0.7196006", "0.70997965", "0.68429476", "0.67710876", "0.6752592", "0.6677115", "0.65754455", "0.6554449", "0.6468218", "0.6462816", "0.6434127", "0.64290106", "0.64290106", "0.64290106", "0.64290106", "0.64290106", "0.6423746", "0.6390009", "0.6378739", "0.6359...
0.72223747
1
show a Line from first xy point to second xy point, with given width and colour
void showLine(int[] xy1, int[] xy2, int width, char col) { gc.setStroke(colFromChar(col)); // set the stroke colour gc.setLineWidth(width); gc.strokeLine(xy1[0], xy1[1], xy2[0], xy2[1]); // draw line }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void drawLine(float x, float y, float x2, float y2, float width) {\n throw new NotImplementedException(); // TODO Implement\n }", "public void drawLine(int x, int y, int x2, int y2, int color);", "public void drawLine(float x, float y, float x2, float y2, float width, float u, float v, float t...
[ "0.7651861", "0.7529009", "0.7037254", "0.69506705", "0.6926378", "0.6914613", "0.6908096", "0.69059646", "0.6850482", "0.6775175", "0.6582606", "0.652036", "0.6512476", "0.6443262", "0.64078254", "0.6384383", "0.6362707", "0.63463575", "0.6318334", "0.63131666", "0.6300947",...
0.7776956
0
Show the entity of given size in the interface at position x,y Do so by drawing a circle in the colour specified by character c
public void showItem(int x, int y, int size, char col) { gc.setFill(colFromChar(col)); // set the fill colour gc.fillArc(x - size, y - size, size * 2, size * 2, 0, 360, ArcType.ROUND); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void show(int c) {\n noFill();\n stroke(255, c, 0);\n strokeWeight(5);\n ellipse(x, y, size, size);\n \n }", "private void drawPosition(Position pos, TextColor color, char c, boolean wide) {\n TextGraphics text = screen.newTextGraphics();\n text.setForegroundColor(color);\n ...
[ "0.73587143", "0.69951046", "0.67054987", "0.6659661", "0.65373063", "0.6489175", "0.64142966", "0.6410703", "0.63716805", "0.636548", "0.63316584", "0.63271207", "0.6266546", "0.6263887", "0.6262257", "0.62519336", "0.6239599", "0.6236449", "0.6230056", "0.62215894", "0.6218...
0.65365076
5
fill 360 degree arc
public void showItem2(int x, int y, int size, char col) { gc.setFill(colFromChar(col)); // set the fill colour gc.fillArc(x - size, y - size, size * 2, size * 2, 0, 180, ArcType.CHORD); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void fillArc(float x, float y, float radius, float startAngle, float endAngle);", "public void strokeArc(float x, float y, float radius, float startAngle, float endAngle);", "public void paint (Graphics g) {\n g.fillArc (20, 30, 150, 130, 240, 90);\n }", "public ResetArc(){}", "private void arc(...
[ "0.79873663", "0.7074346", "0.6906222", "0.6585227", "0.6399921", "0.6320027", "0.615386", "0.6140309", "0.60775316", "0.6045081", "0.6019712", "0.5948346", "0.59479725", "0.59478706", "0.5938456", "0.58678895", "0.5805557", "0.5776445", "0.5770993", "0.5765943", "0.5749016",...
0.0
-1
fill 360 degree arc draw the arena and its contents
void drawBuilding() { gc.setFill(Color.BEIGE); gc.fillRect(0, 0, theBuilding.getXSize(), theBuilding.getYSize()); // clear the canvas theBuilding.showBuilding(this); // draw all items String s = theBuilding.toString(); rtPane.getChildren().clear(); // clear rtpane Label l = new Label(s); // turn string to label rtPane.getChildren().add(l); // add label }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void fillArc(float x, float y, float radius, float startAngle, float endAngle);", "public void paint (Graphics g) {\n g.fillArc (20, 30, 150, 130, 240, 90);\n }", "public void strokeArc(float x, float y, float radius, float startAngle, float endAngle);", "public void draw()\n {\n canvas....
[ "0.6947974", "0.6841627", "0.6403331", "0.63699496", "0.63675404", "0.6307114", "0.6296748", "0.6268832", "0.6260394", "0.62165236", "0.62140065", "0.61981934", "0.6160322", "0.613004", "0.61073005", "0.61049366", "0.6071827", "0.60427946", "0.597116", "0.59411746", "0.591320...
0.0
-1
return as String definition of bOpt'th building
public String buildingString() { whichBuild = 1 - whichBuild; if (whichBuild == 1) { } return "420 400;10 10 140 60 60 60 10;140 10 240 60 180 60 10;240 10 400 60 320 60 20 ;10 90 120 180 40 90 15;120 90 280 180 160 90 10;280 90 400 180 340 90 10"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String build() {\n StringBuilder sb = new StringBuilder();\n\n appendColor(sb);\n sb.append(flagSymbol);\n appendIndentation(sb);\n appendProperty(sb);\n appendValue(sb);\n appendDefaultColor(sb);\n\n return sb.toString();\n }", "@Override\n pu...
[ "0.6412772", "0.62719595", "0.62039447", "0.6144383", "0.6093139", "0.6048385", "0.5930024", "0.5927403", "0.5927403", "0.5829111", "0.5805362", "0.57386446", "0.5734888", "0.567098", "0.56319535", "0.55870897", "0.55843747", "0.5583728", "0.5561451", "0.55516815", "0.5551474...
0.6060992
5
Returning the second building
public String buildingString2() { whichBuild = 1 - whichBuild; if (whichBuild == 1) { } return "400 400;10 10 90 140 70 140 20;90 10 320 70 220 70 10;10 180 100 380 60 180 15;100 180 320 380 200 180 20;320 10 400 380 320 110 25"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "T2 build();", "public static Builder<?> builder() {\n return new Builder2();\n }", "private BDD buildEndGame(){\n\t\tBDD res = factory.makeOne();\n\n\t\tfor(int i = 0; i < this.dimension; i++){\n\t\t\tfor(int j = 0; j < this.dimension; j++){\n\t\t\t\tres.andWith(board[i][j].not());\n\t\t\t}\n\t\t}\n\t\t\n\...
[ "0.6505593", "0.57511836", "0.5717202", "0.56210905", "0.5518668", "0.5512543", "0.5509886", "0.5497062", "0.54597485", "0.54368466", "0.54108316", "0.54108316", "0.539822", "0.5390375", "0.53870887", "0.538432", "0.53652275", "0.5357321", "0.5330798", "0.53095204", "0.529720...
0.5959453
1
adding everything into the canvas
@Override public void start(Stage primaryStage) throws Exception { stagePrimary = primaryStage; stagePrimary.setTitle("Intelligent Building By Curtis Baldwin"); BorderPane bp = new BorderPane(); bp.setPadding(new Insets(10, 20, 10, 20)); bp.setTop(setMenu()); // put menu at the top Group root = new Group(); // create group with canvas Canvas canvas = new Canvas(500, 500); root.getChildren().add(canvas); bp.setCenter(root); // load canvas to left area gc = canvas.getGraphicsContext2D(); // context for drawing timer = new AnimationTimer() { // set up timer public void handle(long currentNanoTime) { theBuilding.update(); theBuilding.updateHoover(); drawBuilding(); } }; rtPane = new VBox(); // set vBox on right to list items rtPane.setAlignment(Pos.TOP_LEFT); rtPane.setPadding(new Insets(5, 75, 75, 5)); bp.setRight(rtPane); bp.setBottom(setButtons()); // set bottom pane with buttons Scene scene = new Scene(bp, 800, 600); // set overall scene bp.prefHeightProperty().bind(scene.heightProperty()); bp.prefWidthProperty().bind(scene.widthProperty()); primaryStage.setScene(scene); primaryStage.show(); whichBuild = 0; theBuilding = new Building(buildingString()); showWelcome(); // set welcome message drawBuilding(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void newCanvas() {\n\t\timgCanvas = new ImageCanvas(1000, 563);\n\t\t//canvasJP.add(imgCanvas);\n\t}", "private void draw()\n {\n Canvas canvas = Canvas.getCanvas();\n canvas.draw(this, color, new Ellipse2D.Double(xPosition, yPosition, \n diameter, diameter));\n can...
[ "0.7089002", "0.661448", "0.66048384", "0.65501374", "0.651307", "0.6506853", "0.64831764", "0.6459638", "0.6459638", "0.64576", "0.6438966", "0.6415398", "0.6384151", "0.6334319", "0.632276", "0.6301599", "0.62640613", "0.6244325", "0.62422794", "0.6229003", "0.6221239", "...
0.0
-1
Method to write objects to disk
public static void writeObjectToDisk(Object obj, String name) throws IOException { // Create file output stream FileOutputStream fileOutStr = new FileOutputStream(name); // Create object output stream and write object ObjectOutputStream objOutStr = new ObjectOutputStream(fileOutStr); objOutStr.writeObject(obj); // Close all streams objOutStr.close(); fileOutStr.close(); System.out.printf("Serialized data is saved in a file - " + name); // Printing message and file name which is // saved }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void writeObject ();", "public void writeObject(Object obj) throws IOException;", "void writeObject(OutputSerializer out) throws java.io.IOException;", "private void writeToFile(String filename, Object object) {\n try {\n FileOutputStream fileOutputStream = openFileOutput(filename, M...
[ "0.7632874", "0.74707043", "0.744586", "0.7150272", "0.71467316", "0.7013641", "0.699752", "0.6990916", "0.6922481", "0.6896661", "0.688992", "0.68448174", "0.684217", "0.6842164", "0.67994326", "0.6777755", "0.6764031", "0.6718103", "0.6688675", "0.6684205", "0.66620564", ...
0.7181541
3
Method to load objects which have been written to disk
public static Object objectLoader(String filename) throws IOException, ClassNotFoundException { // Creat file input stream FileInputStream fileInStr = new FileInputStream(filename); // Create object input steam ObjectInputStream objInStr = new ObjectInputStream(fileInStr); Object obj = (Object) objInStr.readObject(); // Closing all streams objInStr.close(); fileInStr.close(); System.out.printf("Deserialized data - " + filename); // Printing message plus file name that was saved return obj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void load(ObjectIterator<T> objects) {\n }", "public void load() ;", "public void load();", "public void load();", "public void load() {\n }", "public void load() {\n\t}", "@Override\n\tpublic Stream<Path> loadAll() {\n\t\treturn null;\n\t}", "public void loadData () {\n ...
[ "0.69891256", "0.6743343", "0.66889435", "0.66889435", "0.6668106", "0.6654485", "0.65441763", "0.6506531", "0.6444232", "0.6444232", "0.63901126", "0.6335202", "0.6323955", "0.63227993", "0.63148403", "0.6310798", "0.62847805", "0.62815064", "0.6250605", "0.62131804", "0.621...
0.56506217
73
turns words into dashed words
public String dashGuess(String s, char guess) { StringBuilder r = new StringBuilder(s); //turn s to stringbuilder to change for (int i = 0; i < s.length(); i++) { //if (s.charAt(i) != guess) { if (!guessedLetters.contains(s.charAt(i))) { r.setCharAt(i, '-'); } } String v = r.toString(); return v; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addHyphens() {\n\t\tSystem.out.print(\" \");\n\t\tfor (int j = 0; j < 3; j++)\n\t\t\tSystem.out.print(\"+-----\");\n\t\tSystem.out.println(\"+\");\n\t}", "public String buildWord() {\n\t\tStringBuilder word = new StringBuilder();\n\t\t\n\t\tfor(int i = 0; i < letters.size(); i++) {\n\t\t\tLetter te...
[ "0.600316", "0.59535587", "0.5819227", "0.58119226", "0.57403284", "0.57136345", "0.5688623", "0.56581897", "0.5609617", "0.5607205", "0.55889916", "0.55359954", "0.55355847", "0.5508078", "0.54883605", "0.5478121", "0.54709023", "0.5465488", "0.5455435", "0.54418206", "0.543...
0.0
-1