blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
390
content_id
stringlengths
40
40
detected_licenses
listlengths
0
35
license_type
stringclasses
2 values
repo_name
stringlengths
6
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
539 values
visit_date
timestamp[us]date
2016-08-02 21:09:20
2023-09-06 10:10:07
revision_date
timestamp[us]date
1990-01-30 01:55:47
2023-09-05 21:45:37
committer_date
timestamp[us]date
2003-07-12 18:48:29
2023-09-05 21:45:37
github_id
int64
7.28k
684M
star_events_count
int64
0
77.7k
fork_events_count
int64
0
48k
gha_license_id
stringclasses
13 values
gha_event_created_at
timestamp[us]date
2012-06-11 04:05:37
2023-09-14 21:59:18
gha_created_at
timestamp[us]date
2008-05-22 07:58:19
2023-08-28 02:39:21
gha_language
stringclasses
62 values
src_encoding
stringclasses
26 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
128
12.8k
extension
stringclasses
11 values
content
stringlengths
128
8.19k
authors
listlengths
1
1
author_id
stringlengths
1
79
24b91f0bc3068f576530a2f53c426031eca256af
6c28eca2c33a275fb0008a51b8e5776a82f5904d
/Code/Hierarchy/src/net/unconventionalthinking/hierarchy/grammar/node/AExpressionThrowStatement.java
1dd99b54fa0d8cf2cc2edff3e7adbb6d8b826e43
[]
no_license
UnconventionalThinking/hierarchy
17dc9e224595f13702b9763829e12fbce2c48cfe
de8590a29c19202c01d1a6e62ca92e91aa9fc6ab
refs/heads/master
2021-01-19T21:28:29.793371
2014-12-19T03:16:24
2014-12-19T03:16:24
13,262,291
0
1
null
null
null
null
UTF-8
Java
false
false
4,443
java
/* Copyright 2012, 2013 Unconventional Thinking * * This file is part of Hierarchy. * * Hierarchy is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * * Hierarchy is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with Hierarchy. * If not, see <http://www.gnu.org/licenses/>. */ /* This file was generated by SableCC (http://www.sablecc.org/). */ package net.unconventionalthinking.hierarchy.grammar.node; import net.unconventionalthinking.hierarchy.grammar.analysis.*; @SuppressWarnings("nls") public final class AExpressionThrowStatement extends PThrowStatement { private TThrow _throw_; private PExpression _expression_; private TSemi _semi_; public AExpressionThrowStatement() { // Constructor } public AExpressionThrowStatement( @SuppressWarnings("hiding") TThrow _throw_, @SuppressWarnings("hiding") PExpression _expression_, @SuppressWarnings("hiding") TSemi _semi_) { // Constructor setThrow(_throw_); setExpression(_expression_); setSemi(_semi_); } @Override public Object clone() { return new AExpressionThrowStatement( cloneNode(this._throw_), cloneNode(this._expression_), cloneNode(this._semi_)); } public void apply(Switch sw) { ((Analysis) sw).caseAExpressionThrowStatement(this); } public TThrow getThrow() { return this._throw_; } public void setThrow(TThrow node) { if(this._throw_ != null) { this._throw_.parent(null); } if(node != null) { if(node.parent() != null) { node.parent().removeChild(node); } node.parent(this); } this._throw_ = node; } public PExpression getExpression() { return this._expression_; } public void setExpression(PExpression node) { if(this._expression_ != null) { this._expression_.parent(null); } if(node != null) { if(node.parent() != null) { node.parent().removeChild(node); } node.parent(this); } this._expression_ = node; } public TSemi getSemi() { return this._semi_; } public void setSemi(TSemi node) { if(this._semi_ != null) { this._semi_.parent(null); } if(node != null) { if(node.parent() != null) { node.parent().removeChild(node); } node.parent(this); } this._semi_ = node; } @Override public String toString() { return "" + toString(this._throw_) + toString(this._expression_) + toString(this._semi_); } @Override void removeChild(@SuppressWarnings("unused") Node child) { // Remove child if(this._throw_ == child) { this._throw_ = null; return; } if(this._expression_ == child) { this._expression_ = null; return; } if(this._semi_ == child) { this._semi_ = null; return; } throw new RuntimeException("Not a child."); } @Override void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) { // Replace child if(this._throw_ == oldChild) { setThrow((TThrow) newChild); return; } if(this._expression_ == oldChild) { setExpression((PExpression) newChild); return; } if(this._semi_ == oldChild) { setSemi((TSemi) newChild); return; } throw new RuntimeException("Not a child."); } }
93a5c677b355e37d3b2133feb47a5dba819ca1f3
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/bazelbuild--bazel/74f24c1cee9e0522b3a0fdcfe40e47191f3c3973/after/ZipDecompressor.java
cc47ae280d75898a3bbb8aa14da20fd86fa63ccf
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
6,650
java
// Copyright 2015 The Bazel Authors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.devtools.build.lib.bazel.repository; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Optional; import com.google.devtools.build.lib.bazel.repository.DecompressorValue.Decompressor; import com.google.devtools.build.lib.rules.repository.RepositoryFunction.RepositoryFunctionException; import com.google.devtools.build.lib.vfs.FileSystemUtils; import com.google.devtools.build.lib.vfs.Path; import com.google.devtools.build.lib.vfs.PathFragment; import com.google.devtools.build.skyframe.SkyFunctionException.Transience; import com.google.devtools.build.zip.ZipFileEntry; import com.google.devtools.build.zip.ZipReader; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; import java.nio.file.StandardCopyOption; import java.util.Collection; import javax.annotation.Nullable; /** * Creates a repository by decompressing a zip file. */ public class ZipDecompressor implements Decompressor { public static final Decompressor INSTANCE = new ZipDecompressor(); private ZipDecompressor() { } private static final int S_IFDIR = 040000; private static final int S_IFREG = 0100000; private static final int EXECUTABLE_MASK = 0755; @VisibleForTesting static final int WINDOWS_DIRECTORY = 0x10; @VisibleForTesting static final int WINDOWS_FILE = 0x20; /** * This unzips the zip file to a sibling directory of {@link DecompressorDescriptor#archivePath}. * The zip file is expected to have the WORKSPACE file at the top level, e.g.: * * <pre> * $ unzip -lf some-repo.zip * Archive: ../repo.zip * Length Date Time Name * --------- ---------- ----- ---- * 0 2014-11-20 15:50 WORKSPACE * 0 2014-11-20 16:10 foo/ * 236 2014-11-20 15:52 foo/BUILD * ... * </pre> */ @Override @Nullable public Path decompress(DecompressorDescriptor descriptor) throws RepositoryFunctionException { Path destinationDirectory = descriptor.archivePath().getParentDirectory(); Optional<String> prefix = descriptor.prefix(); boolean foundPrefix = false; try (ZipReader reader = new ZipReader(descriptor.archivePath().getPathFile())) { Collection<ZipFileEntry> entries = reader.entries(); for (ZipFileEntry entry : entries) { StripPrefixedPath entryPath = StripPrefixedPath.maybeDeprefix(entry.getName(), prefix); foundPrefix = foundPrefix || entryPath.foundPrefix(); if (entryPath.skip()) { continue; } extractZipEntry(reader, entry, destinationDirectory, entryPath.getPathFragment()); } } catch (IOException e) { throw new RepositoryFunctionException(new IOException( String.format("Error extracting %s to %s: %s", descriptor.archivePath(), destinationDirectory, e.getMessage())), Transience.TRANSIENT); } if (prefix.isPresent() && !foundPrefix) { throw new RepositoryFunctionException( new IOException("Prefix " + prefix.get() + " was given, but not found in the zip"), Transience.PERSISTENT); } return destinationDirectory; } private void extractZipEntry( ZipReader reader, ZipFileEntry entry, Path destinationDirectory, PathFragment strippedRelativePath) throws IOException { if (strippedRelativePath.isAbsolute()) { throw new IOException( String.format( "Failed to extract %s, zipped paths cannot be absolute", strippedRelativePath)); } Path outputPath = destinationDirectory.getRelative(strippedRelativePath); int permissions = getPermissions(entry.getExternalAttributes(), entry.getName()); FileSystemUtils.createDirectoryAndParents(outputPath.getParentDirectory()); boolean isDirectory = (permissions & 040000) == 040000; if (isDirectory) { FileSystemUtils.createDirectoryAndParents(outputPath); } else { // TODO(kchodorow): should be able to be removed when issue #236 is resolved, but for now // this delete+rewrite is required or the build will error out if outputPath exists here. // The zip file is not re-unzipped when the WORKSPACE file is changed (because it is assumed // to be immutable) but is on server restart (which is a bug). File outputFile = outputPath.getPathFile(); try (InputStream input = reader.getInputStream(entry)) { Files.copy(input, outputFile.toPath(), StandardCopyOption.REPLACE_EXISTING); } outputPath.chmod(permissions); } } @VisibleForTesting static int getPermissions(int permissions, String path) throws IOException { // Sometimes zip files list directories as being "regular" executable files (i.e., 0100755). // I'm looking at you, Go AppEngine SDK 1.9.37 (see #1263 for details). if (path.endsWith("/")) { return S_IFDIR | EXECUTABLE_MASK; } // Posix permissions are in the high-order 2 bytes of the external attributes. After this // operation, permissions holds 0100755 (or 040755 for directories). int shiftedPermissions = permissions >>> 16; if (shiftedPermissions != 0) { return shiftedPermissions; } // If this was zipped up on FAT, it won't have posix permissions set. Instead, this // checks if extra attributes is set to 0 for files. From // https://github.com/miloyip/rapidjson/archive/v1.0.2.zip, it looks like executables end up // with "normal" (posix) permissions (oddly), so they'll be handled above. int windowsPermission = permissions & 0xff; if ((windowsPermission & WINDOWS_DIRECTORY) == WINDOWS_DIRECTORY) { // Directory. return S_IFDIR | EXECUTABLE_MASK; } else if (permissions == 0 || (windowsPermission & WINDOWS_FILE) == WINDOWS_FILE) { // File. return S_IFREG | EXECUTABLE_MASK; } // No idea. throw new IOException("Unrecognized file mode for " + path + ": 0x" + Integer.toHexString(permissions)); } }
e33c2dfdffdbc3ed513e00d3b3d5e0b39f7d379d
9254e7279570ac8ef687c416a79bb472146e9b35
/pai-dlc-20201203/src/main/java/com/aliyun/pai_dlc20201203/models/GetDataSourceResponseBody.java
38e4fe53a0448bc1095bec728af43b9ce44f05fa
[ "Apache-2.0" ]
permissive
lquterqtd/alibabacloud-java-sdk
3eaa17276dd28004dae6f87e763e13eb90c30032
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
refs/heads/master
2023-08-12T13:56:26.379027
2021-10-19T07:22:15
2021-10-19T07:22:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,308
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.pai_dlc20201203.models; import com.aliyun.tea.*; public class GetDataSourceResponseBody extends TeaModel { // 数据源类型 @NameInMap("DataSourceType") public String dataSourceType; // 数据源Id @NameInMap("DataSourceId") public String dataSourceId; // 数据源显示名称 @NameInMap("DisplayName") public String displayName; // 数据源描述 @NameInMap("Description") public String description; // 阿里云NAS文件系统Id @NameInMap("FileSystemId") public String fileSystemId; // 阿里云OSS文件系统路径 @NameInMap("Path") public String path; // 阿里云OSS文件系统服务端点 @NameInMap("Endpoint") public String endpoint; // 阿里云OSS文件系统配置选项 @NameInMap("Options") public String options; // 本地挂载目录 @NameInMap("MountPath") public String mountPath; // 创建人Id @NameInMap("UserId") public String userId; // 创建时间(UTC) @NameInMap("GmtCreateTime") public String gmtCreateTime; // 修改时间(UTC) @NameInMap("GmtModifyTime") public String gmtModifyTime; // 请求Id @NameInMap("RequestId") public String requestId; public static GetDataSourceResponseBody build(java.util.Map<String, ?> map) throws Exception { GetDataSourceResponseBody self = new GetDataSourceResponseBody(); return TeaModel.build(map, self); } public GetDataSourceResponseBody setDataSourceType(String dataSourceType) { this.dataSourceType = dataSourceType; return this; } public String getDataSourceType() { return this.dataSourceType; } public GetDataSourceResponseBody setDataSourceId(String dataSourceId) { this.dataSourceId = dataSourceId; return this; } public String getDataSourceId() { return this.dataSourceId; } public GetDataSourceResponseBody setDisplayName(String displayName) { this.displayName = displayName; return this; } public String getDisplayName() { return this.displayName; } public GetDataSourceResponseBody setDescription(String description) { this.description = description; return this; } public String getDescription() { return this.description; } public GetDataSourceResponseBody setFileSystemId(String fileSystemId) { this.fileSystemId = fileSystemId; return this; } public String getFileSystemId() { return this.fileSystemId; } public GetDataSourceResponseBody setPath(String path) { this.path = path; return this; } public String getPath() { return this.path; } public GetDataSourceResponseBody setEndpoint(String endpoint) { this.endpoint = endpoint; return this; } public String getEndpoint() { return this.endpoint; } public GetDataSourceResponseBody setOptions(String options) { this.options = options; return this; } public String getOptions() { return this.options; } public GetDataSourceResponseBody setMountPath(String mountPath) { this.mountPath = mountPath; return this; } public String getMountPath() { return this.mountPath; } public GetDataSourceResponseBody setUserId(String userId) { this.userId = userId; return this; } public String getUserId() { return this.userId; } public GetDataSourceResponseBody setGmtCreateTime(String gmtCreateTime) { this.gmtCreateTime = gmtCreateTime; return this; } public String getGmtCreateTime() { return this.gmtCreateTime; } public GetDataSourceResponseBody setGmtModifyTime(String gmtModifyTime) { this.gmtModifyTime = gmtModifyTime; return this; } public String getGmtModifyTime() { return this.gmtModifyTime; } public GetDataSourceResponseBody setRequestId(String requestId) { this.requestId = requestId; return this; } public String getRequestId() { return this.requestId; } }
2b5ba21217695405e06948eb6a4ec5e4aef591eb
4aa90348abcb2119011728dc067afd501f275374
/app/src/main/java/com/tencent/mm/plugin/appbrand/jsapi/ac.java
e2888ae83bfc5a74366e06659b10026c9d0f3ed7
[]
no_license
jambestwick/HackWechat
0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6
6a34899c8bfd50d19e5a5ec36a58218598172a6b
refs/heads/master
2022-01-27T12:48:43.446804
2021-12-29T10:36:30
2021-12-29T10:36:30
249,366,791
0
0
null
2020-03-23T07:48:32
2020-03-23T07:48:32
null
UTF-8
Java
false
false
1,469
java
package com.tencent.mm.plugin.appbrand.jsapi; import android.content.Context; import android.provider.Settings.SettingNotFoundException; import android.provider.Settings.System; import com.tencent.mm.plugin.appbrand.j; import com.tencent.mm.sdk.platformtools.x; import com.tencent.tmassistantsdk.storage.table.DownloadSettingTable$Columns; import java.util.HashMap; import java.util.Map; import org.json.JSONObject; public final class ac extends a { public static final int CTRL_INDEX = 232; public static final String NAME = "getScreenBrightness"; public final void a(j jVar, JSONObject jSONObject, int i) { x.d("MicroMsg.JsApiGetScreenBrightness", "JsApiGetScreenBrightness!"); Context a = a(jVar); if (a == null) { jVar.E(i, e("fail", null)); x.e("MicroMsg.JsApiGetScreenBrightness", "context is null, invoke fail!"); return; } float f = a.getWindow().getAttributes().screenBrightness; if (f < 0.0f) { f = bT(a); } Map hashMap = new HashMap(); hashMap.put(DownloadSettingTable$Columns.VALUE, Float.valueOf(f)); jVar.E(i, e("ok", hashMap)); } private static float bT(Context context) { float f = 0.0f; try { return ((float) System.getInt(context.getContentResolver(), "screen_brightness")) / 255.0f; } catch (SettingNotFoundException e) { return f; } } }
e6518fbbc6a1aba791c1ebcefcc4a3238a99abd1
b2f07f3e27b2162b5ee6896814f96c59c2c17405
/com/sun/corba/se/impl/oa/toa/Element.java
8f70703e66133969796f13475c818d9f50563d95
[]
no_license
weiju-xi/RT-JAR-CODE
e33d4ccd9306d9e63029ddb0c145e620921d2dbd
d5b2590518ffb83596a3aa3849249cf871ab6d4e
refs/heads/master
2021-09-08T02:36:06.675911
2018-03-06T05:27:49
2018-03-06T05:27:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,702
java
/* */ package com.sun.corba.se.impl.oa.toa; /* */ /* */ import com.sun.corba.se.impl.orbutil.ORBUtility; /* */ /* */ final class Element /* */ { /* 156 */ Object servant = null; /* 157 */ Object servantData = null; /* 158 */ int index = -1; /* 159 */ int counter = 0; /* 160 */ boolean valid = false; /* */ /* */ Element(int paramInt, Object paramObject) /* */ { /* 165 */ this.servant = paramObject; /* 166 */ this.index = paramInt; /* */ } /* */ /* */ byte[] getKey(Object paramObject1, Object paramObject2) /* */ { /* 171 */ this.servant = paramObject1; /* 172 */ this.servantData = paramObject2; /* 173 */ this.valid = true; /* */ /* 175 */ return toBytes(); /* */ } /* */ /* */ byte[] toBytes() /* */ { /* 182 */ byte[] arrayOfByte = new byte[8]; /* 183 */ ORBUtility.intToBytes(this.index, arrayOfByte, 0); /* 184 */ ORBUtility.intToBytes(this.counter, arrayOfByte, 4); /* */ /* 186 */ return arrayOfByte; /* */ } /* */ /* */ void delete(Element paramElement) /* */ { /* 191 */ if (!this.valid) /* 192 */ return; /* 193 */ this.counter += 1; /* 194 */ this.servantData = null; /* 195 */ this.valid = false; /* */ /* 198 */ this.servant = paramElement; /* */ } /* */ /* */ public String toString() /* */ { /* 203 */ return "Element[" + this.index + ", " + this.counter + "]"; /* */ } /* */ } /* Location: C:\Program Files\Java\jdk1.7.0_79\jre\lib\rt.jar * Qualified Name: com.sun.corba.se.impl.oa.toa.Element * JD-Core Version: 0.6.2 */
7aee7cab590d361dfe347f9ed11c57d57d5786bc
280da3630f692c94472f2c42abd1051fb73d1344
/src/net/minecraft/client/gui/GuiErrorScreen.java
f7a6be74cd04b9e5b7a87ba7f9a18ca9d4d128df
[]
no_license
MicrowaveClient/Clarinet
7c35206c671eb28bc139ee52e503f405a14ccb5b
bd387bc30329e0febb6c1c1b06a836d9013093b5
refs/heads/master
2020-04-02T18:47:52.047731
2016-07-14T03:21:46
2016-07-14T03:21:46
63,297,767
1
0
null
null
null
null
UTF-8
Java
false
false
1,913
java
package net.minecraft.client.gui; import net.minecraft.client.resources.I18n; import java.io.IOException; public class GuiErrorScreen extends GuiScreen { private String field_146313_a; private String field_146312_f; public GuiErrorScreen(String p_i46319_1_, String p_i46319_2_) { this.field_146313_a = p_i46319_1_; this.field_146312_f = p_i46319_2_; } /** * Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the * window resizes, the buttonList is cleared beforehand. */ public void initGui() { super.initGui(); this.buttonList.add(new GuiButton(0, this.width / 2 - 100, 140, I18n.format("gui.cancel", new Object[0]))); } /** * Draws the screen and all the components in it. Args : mouseX, mouseY, renderPartialTicks */ public void drawScreen(int mouseX, int mouseY, float partialTicks) { this.drawGradientRect(0, 0, this.width, this.height, -12574688, -11530224); this.drawCenteredString(this.fontRendererObj, this.field_146313_a, this.width / 2, 90, 16777215); this.drawCenteredString(this.fontRendererObj, this.field_146312_f, this.width / 2, 110, 16777215); super.drawScreen(mouseX, mouseY, partialTicks); } /** * Fired when a key is typed (except F11 which toggles full screen). This is the equivalent of * KeyListener.keyTyped(KeyEvent e). Args : character (character on the key), keyCode (lwjgl Keyboard key code) */ protected void keyTyped(char typedChar, int keyCode) throws IOException { } /** * Called by the controls from the buttonList when activated. (Mouse pressed for buttons) */ protected void actionPerformed(GuiButton button) throws IOException { this.mc.displayGuiScreen((GuiScreen) null); } }
[ "justanormalpcnoghostclientoranyt@justanormalpcnoghostclientoranyt-Aspire-XC-704" ]
justanormalpcnoghostclientoranyt@justanormalpcnoghostclientoranyt-Aspire-XC-704
ab1e5465724d60727cd432f1aed4542f29d94d53
370aae4bdc2fae261b38e3e819696005b218f2a8
/android-crmtab/app/src/main/java/fr/pds/isintheair/crmtab/jbide/uc/registercall/database/dao/CallEndedDAO.java
6cc7678fa0cee6159833253cea2244f5947cd60f
[]
no_license
balamuthu1/CRM-Android
535fd7a80f88afe3dfdedb334d57a0a917aeec18
5dfe30a17bafbca4f9e74b1301ff23ac9e94eb56
refs/heads/master
2021-01-01T04:04:37.946795
2016-05-13T22:40:25
2016-05-13T22:40:25
58,776,231
1
0
null
null
null
null
UTF-8
Java
false
false
734
java
package fr.pds.isintheair.crmtab.jbide.uc.registercall.database.dao; import com.raizlabs.android.dbflow.sql.language.Delete; import com.raizlabs.android.dbflow.sql.language.Select; import java.util.List; import fr.pds.isintheair.crmtab.jbide.uc.registercall.database.entity.CallEndedEvent; import fr.pds.isintheair.crmtab.jbide.uc.registercall.database.entity.CallEndedEvent_Table; /** * Created by jbide on 22/01/2016. */ public class CallEndedDAO { public static List<CallEndedEvent> getAll() { return new Select().from(CallEndedEvent.class).queryList(); } public static void delete(Long idcall) { new Delete().from(CallEndedEvent.class).where(CallEndedEvent_Table.id.eq(idcall)).query(); } }
fcd2ff798c6c5a97ed5aeaeb53c9ab610a50699d
039ec44770c6bb429a5ab2686ddb0dbae4bc9097
/shop/src/main/java/com/zds/controller/GoodsController.java
7d4c3f4ee605920cecdf57e61af5969f5f323122
[]
no_license
zhongds01/zhongds01
302f214c05c85e119d9bd32aeba7a64aa43eb2b8
084a95e094297c8130bfa40adfe49c6a9bbf872f
refs/heads/master
2022-12-23T13:57:53.232174
2020-11-12T14:23:02
2020-11-12T14:23:02
157,668,851
4
1
null
2022-12-16T09:43:00
2018-11-15T07:18:16
Java
UTF-8
Java
false
false
5,224
java
package com.zds.controller; import com.zds.bean.Goods; import com.zds.service.GoodsService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; import java.io.File; import java.io.IOException; import java.util.*; /** * description: please add the description * author: ZDS * create_date : 2019/4/19 * create_time : 1:13 */ @Controller public class GoodsController { private Logger log = LoggerFactory.getLogger("GoodsController.class"); @Resource(name = "goodsServiceImpl") private GoodsService goodsService; @RequestMapping("/getAllGoods.action") @ResponseBody public List<Goods> getAllGoods(){ List<Goods> goods = goodsService.getAllGoods(); for (int i=0;i<goods.size();i++){ String url = goods.get(i).getGoodsPic(); url = url.replaceAll("\\\\","/"); System.out.println(url); goods.get(i).setGoodsPic(url); } return goods; } @RequestMapping("/commentGoods.action") @ResponseBody public Map<String,String> commentGoods(Goods goods){ Map<String,String> map = new HashMap<String, String>(); System.out.println(goods.getGoodsId()); System.out.println(goods.getGoodsComment()); int row = goodsService.commentGoods(goods); if (row>0){ map.put("msg","ok"); }else { map.put("msg","error"); } return map; } @RequestMapping("/goodsAdd.action") public String goodsAdd(String goodsName,Double goodsPrice,String goodsCata,Integer goodsStock,String goodsDesc,String goodsComment, MultipartFile goodsPic){ //System.out.println(goodsName); String originalName = goodsPic.getOriginalFilename(); String dirPath = "D:"+File.separator+"upload"+File.separator+ Calendar.getInstance().get(Calendar.YEAR)+File.separator+(Calendar.getInstance().get(Calendar.MONTH)+1)+File.separator+Calendar.getInstance().get(Calendar.DATE)+File.separator; File filePath = new File(dirPath); if (!filePath.exists()){ filePath.mkdirs(); } String newName = UUID.randomUUID()+"_"+originalName; try { goodsPic.transferTo(new File(dirPath + newName )); } catch (IOException e) { e.printStackTrace(); } String goodsPicURL = Calendar.getInstance().get(Calendar.YEAR)+File.separator+(Calendar.getInstance().get(Calendar.MONTH)+1)+File.separator+Calendar.getInstance().get(Calendar.DATE)+File.separator+newName; Goods goods = new Goods(); System.out.println(goodsPrice); goods.setGoodsStock(goodsStock); goods.setGoodsCata(goodsCata); goods.setGoodsDesc(goodsDesc); goods.setGoodsName(goodsName); goods.setGoodsPrice(goodsPrice); goods.setGoodsComment(goodsComment); goods.setState("U"); goods.setGoodsPic(goodsPicURL); int row = goodsService.insert(goods); if (row>0){ return "ok"; }else { return "error"; } } @RequestMapping("/recommend.action") @ResponseBody public List<Goods> recommend(){ return goodsService.recommend(); } @RequestMapping("/searchGoods.action") @ResponseBody public List<Goods> searchGoods(String goodsName){ return goodsService.searchGoods(goodsName); } @RequestMapping("/searchGoodsByCata.action") @ResponseBody public List<Goods> searchGoodsByCata (String goodsCata){ return goodsService.searchGoodsByCata(goodsCata); } @RequestMapping("/searchGoodsByNameOrCata.action") @ResponseBody public List<Goods> searchGoodsByNameOrCata (String goodsName,String goodsCata){ return goodsService.searchGoodsByNameOrCata(goodsName,goodsCata); } @RequestMapping("/modifyGoods.action") @ResponseBody public Map<String,String> modifyGoods(String modifyGoods){ Map<String,String> map = new HashMap<String, String>(); int row = goodsService.modifyGoods(modifyGoods); if (row>0){ map.put("msg","ok"); }else { map.put("msg","error"); } return map; } @RequestMapping("/reduceMounts.action") @ResponseBody public Map<String,String> reduceMounts(String shopCars){ Map<String,String> map = new HashMap<String, String>(); int row = goodsService.reduceMounts(shopCars); if (row>0){ map.put("msg","ok"); }else { map.put("msg","error"); } return map; } @RequestMapping("/deleteGoods.action") @ResponseBody public Map<String,String> deleteGoods(Integer goodsId){ Map<String,String> map = new HashMap<String, String>(); int row = goodsService.deleteGoods(goodsId); if (row>0){ map.put("msg","ok"); }else { map.put("msg","error"); } return map; } }
4dd081029831973b9ebd13d680fdae66a2fbb76f
8cb1d16152258c4cabaa73f57ce1eb9baf34d56b
/src/warmup/page8/excelsheetcolumntitle/ExcelSheetColumnTitle.java
18d10c4b3f194d2a918fe7597da3ee70cfca7a78
[]
no_license
ZhaoPeixiao/leetcode
9361638a78b064000e36becaadf5643577178caf
16266b9653433c48d43f2c09ef919b2fda497832
refs/heads/master
2023-01-04T14:59:26.856814
2020-10-19T06:03:12
2020-10-19T06:03:12
282,442,039
0
0
null
null
null
null
UTF-8
Java
false
false
634
java
package warmup.page8.excelsheetcolumntitle; /** * @author Peixiao Zhao * @date 2020/9/10 */ class Solution { public String convertToTitle(int n) { StringBuilder stringBuilder = new StringBuilder(); while (n > 26){ int i = n % 26; if (i == 0){ stringBuilder.append((char)('Z')); n /= 26; -- n; } else{ stringBuilder.append((char)(i+'A' - 1)); n/= 26; } } stringBuilder.append((char)(n+'A' - 1)); return stringBuilder.reverse().toString(); } }
150ca0e1947f66e9160115e01b09e7de76302e91
6b0aaf9a71a3c5c919ebc3bda684bbf384c1228d
/bankCard/src/bankCard/How_To_Use_Token.java
eac23e51f7b77765a31219ace0331d09fa931511
[]
no_license
sushilpokharel2009/java-basics
ae3c6858384e0d0f6c2fee7c5654e9fdff9a99ff
ccf854990542e2331a912472bc5df043364ab1e5
refs/heads/master
2021-03-30T21:29:45.706219
2018-03-11T17:47:35
2018-03-11T17:47:35
124,782,489
0
0
null
null
null
null
UTF-8
Java
false
false
1,619
java
package bankCard; import java.util.HashMap; public class How_To_Use_Token { public static void main(String[] args) { String ACCOUNT_ID = "Merchant's Account ID Here"; String SECRET_KEY = "Merchant's Secret Key Here"; String MODE = "TEST"; String TOKEN = "Transaction ID here"; BluePay payment = new BluePay( ACCOUNT_ID, SECRET_KEY, MODE ); // Sale Amount: $3.00 HashMap<String, String> saleParams = new HashMap<>(); saleParams.put("amount", "3.00"); saleParams.put("transactionID", TOKEN); // The transaction ID of a previous sale payment.sale(saleParams); // Makes the API Request with BluePay try { payment.process(); } catch (Exception ex) { System.out.println("Exception: " + ex.toString()); System.exit(1); } // If transaction was successful reads the responses from BluePay if (payment.isSuccessful()) { System.out.println("Transaction Status: " + payment.getStatus()); System.out.println("Transaction ID: " + payment.getTransID()); System.out.println("Transaction Message: " + payment.getMessage()); System.out.println("AVS Result: " + payment.getAVS()); System.out.println("CVV2: " + payment.getCVV2()); System.out.println("Masked Payment Account: " + payment.getMaskedPaymentAccount()); System.out.println("Card Type: " + payment.getCardType()); System.out.println("Authorization Code: " + payment.getAuthCode()); } else { System.out.println("Error: " + payment.getMessage()); } } }
8926175e367ded6cedf1fb3c96c79db3d1911d0a
dc15e59b5baa26178c02561308afde41c315bbb4
/swift-study/src/main/java/com/swift/sr18/mt564/SeqE1F90AOFFRType.java
c482ce1e79c66b98e6807aa996cba8332724da8d
[]
no_license
zbdy20061001/swift
0e7014e2986a8f6fc04ad22f2505b7f05d67d7b8
260e942b848175d1e8d12571a3d32efecaa3d437
refs/heads/master
2020-04-26T19:16:05.954125
2019-03-04T15:12:27
2019-03-04T15:12:27
173,768,829
0
0
null
null
null
null
GB18030
Java
false
false
4,630
java
// // 此文件是由 JavaTM Architecture for XML Binding (JAXB) 引用实现 v2.2.8-b130911.1802 生成的 // 请访问 <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // 在重新编译源模式时, 对此文件的所有修改都将丢失。 // 生成时间: 2018.12.05 时间 12:24:35 AM CST // package com.swift.sr18.mt564; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>SeqE1_F90a_OFFR_Type complex type的 Java 类。 * * <p>以下模式片段指定包含在此类中的预期内容。 * * <pre> * &lt;complexType name="SeqE1_F90a_OFFR_Type"> * &lt;complexContent> * &lt;extension base="{urn:swift:xsd:fin.564.2018}Qualifier"> * &lt;choice> * &lt;element name="F90A" type="{urn:swift:xsd:fin.564.2018}F90A_2_Type"/> * &lt;element name="F90B" type="{urn:swift:xsd:fin.564.2018}F90B_7_Type"/> * &lt;element name="F90E" type="{urn:swift:xsd:fin.564.2018}F90E_9_Type"/> * &lt;element name="F90F" type="{urn:swift:xsd:fin.564.2018}F90F_2_Type"/> * &lt;element name="F90J" type="{urn:swift:xsd:fin.564.2018}F90J_2_Type"/> * &lt;element name="F90L" type="{urn:swift:xsd:fin.564.2018}F90L_Type"/> * &lt;/choice> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "SeqE1_F90a_OFFR_Type", propOrder = { "f90A", "f90B", "f90E", "f90F", "f90J", "f90L" }) public class SeqE1F90AOFFRType extends Qualifier { @XmlElement(name = "F90A") protected F90A2Type f90A; @XmlElement(name = "F90B") protected F90B7Type f90B; @XmlElement(name = "F90E") protected F90E9Type f90E; @XmlElement(name = "F90F") protected F90F2Type f90F; @XmlElement(name = "F90J") protected F90J2Type f90J; @XmlElement(name = "F90L") protected F90LType f90L; /** * 获取f90A属性的值。 * * @return * possible object is * {@link F90A2Type } * */ public F90A2Type getF90A() { return f90A; } /** * 设置f90A属性的值。 * * @param value * allowed object is * {@link F90A2Type } * */ public void setF90A(F90A2Type value) { this.f90A = value; } /** * 获取f90B属性的值。 * * @return * possible object is * {@link F90B7Type } * */ public F90B7Type getF90B() { return f90B; } /** * 设置f90B属性的值。 * * @param value * allowed object is * {@link F90B7Type } * */ public void setF90B(F90B7Type value) { this.f90B = value; } /** * 获取f90E属性的值。 * * @return * possible object is * {@link F90E9Type } * */ public F90E9Type getF90E() { return f90E; } /** * 设置f90E属性的值。 * * @param value * allowed object is * {@link F90E9Type } * */ public void setF90E(F90E9Type value) { this.f90E = value; } /** * 获取f90F属性的值。 * * @return * possible object is * {@link F90F2Type } * */ public F90F2Type getF90F() { return f90F; } /** * 设置f90F属性的值。 * * @param value * allowed object is * {@link F90F2Type } * */ public void setF90F(F90F2Type value) { this.f90F = value; } /** * 获取f90J属性的值。 * * @return * possible object is * {@link F90J2Type } * */ public F90J2Type getF90J() { return f90J; } /** * 设置f90J属性的值。 * * @param value * allowed object is * {@link F90J2Type } * */ public void setF90J(F90J2Type value) { this.f90J = value; } /** * 获取f90L属性的值。 * * @return * possible object is * {@link F90LType } * */ public F90LType getF90L() { return f90L; } /** * 设置f90L属性的值。 * * @param value * allowed object is * {@link F90LType } * */ public void setF90L(F90LType value) { this.f90L = value; } }
c3d9ecb9ff6fb53686c6ebf93ebc2a2a2faccc01
863052231309e164f187ec5d0f5b515602a9e8e2
/microservices/authorization-services/authorization-service/src/main/java/org/mddarr/ui/request/service/models/AuthenticationRequest.java
81797921d168974bb6d61f1a54ad56840e62bdfa
[]
no_license
MathiasDarr/event-driven-kafka-microservices
a46b52c5cb6f6135aebe624bb0e6fd32bf7171e1
fbb1d8ce1ec303d33f7994092f24f83df9e0ee81
refs/heads/master
2023-02-23T15:03:47.281347
2021-01-26T03:32:31
2021-01-26T03:32:31
329,455,570
0
0
null
null
null
null
UTF-8
Java
false
false
753
java
package org.mddarr.ui.request.service.models; import java.io.Serializable; public class AuthenticationRequest implements Serializable { private String username; private String password; public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } //need default constructor for JSON Parsing public AuthenticationRequest() { } public AuthenticationRequest(String username, String password) { this.setUsername(username); this.setPassword(password); } }
ded36a59bca2717d9e76dbdbebd4667deda9c88a
3446120c21c6da9653ca410da7f26f30f0061189
/Test2OOPTasks/src/recap/Child.java
3de371f81fb0c863028f954f88be79873df32a11
[]
no_license
BlagoyNikolov/ITTalentsWorkspace
32eed3c9fc88b241dd92c92334da153a3636100c
af7bd75d444cfc4274a641354788ca7cd2e77068
refs/heads/master
2021-01-23T05:35:30.607462
2018-01-18T20:05:29
2018-01-18T20:05:29
92,970,410
0
0
null
null
null
null
UTF-8
Java
false
false
422
java
package recap; public class Child extends Parent { public Child() { // TODO Auto-generated constructor stub } @Override public void Speak(String word) { // TODO Auto-generated method stub super.Speak(word); } public void Speak(String word, int itmes) { int x = 5; System.out.println(x); } // @Override // public void Speak(String word, int itmes) { // int y = 5; // System.out.println(y); // } }
ef5b41ca58771e7401b70972a4e1150a6fbc3366
2f57e8c430fce1bfecf5345ac9b53bab1e2deb9c
/jtransc-main/test/jtransc/rt/test/JTranscCollectionsTest.java
040501c2afcf3b4a1c500a166bfe0a25286d26b5
[ "Apache-2.0" ]
permissive
GMadorell/jtransc
35f10c90b4ba58105a0ac56e579c3e1073db4f40
8298d6a74903842e5027a44bbd98b2c74e33c927
refs/heads/master
2021-01-14T10:23:37.171690
2016-03-06T19:39:41
2016-03-06T19:39:41
53,316,788
0
0
null
2016-03-07T10:27:53
2016-03-07T10:27:53
null
UTF-8
Java
false
false
1,911
java
package jtransc.rt.test; import java.util.*; public class JTranscCollectionsTest { static public void main(String[] args) { testArrayList(); testHashSet(); } static public void testArrayList() { System.out.println("ArrayList:"); ArrayList<Integer> list = new ArrayList<>(); list.add(1); System.out.println(list.size()); list.add(2); list.add(3); list.add(99999); list.add(null); list.add(2); System.out.println(list.size()); System.out.println(Arrays.toString(list.toArray())); System.out.println(Arrays.toString(list.toArray(new Integer[0]))); System.out.println(Arrays.toString(list.toArray(new Integer[6]))); System.out.println(Arrays.toString(list.toArray(new Integer[10]))); System.out.println(list.indexOf(2)); System.out.println(list.indexOf(null)); System.out.println(list.lastIndexOf(2)); System.out.println(list.indexOf(99999)); System.out.println(list.indexOf(-7)); ListIterator<Integer> iterator = list.listIterator(); while (iterator.hasNext()) { Integer value = iterator.next(); if (value != null && value == 2) iterator.remove(); } System.out.println(Arrays.toString(list.toArray())); } static public void testHashSet() { System.out.println("HashSet:"); HashSet<String> set = new HashSet<>(); String s1 = new String("s"); String s2 = new String("s"); String a1 = new String("a"); set.add(s1); set.add(s2); set.add(a1); System.out.println(set.size()); System.out.println(set.contains(s1)); System.out.println(set.contains(s2)); System.out.println(set.contains(a1)); System.out.println(set.contains("b")); System.out.println(toSortedList(set)); set.remove(s2); System.out.println(set.size()); System.out.println(toSortedList(set)); } static public <T extends Comparable<T>> List<T> toSortedList(Collection<T> c) { ArrayList<T> l = new ArrayList<T>(c); Collections.sort(l); return l; } }
a8fa01f7730de83e9f832361945232985866e4c4
cea3fe1ae551bf2f81b431876d15563d6347119b
/case Cloud Demo/case SpringCloudHystrix/product-server/src/main/java/com/gang/cloud/template/demo/client/OrderFeignClient.java
45a801cca136fa2e318b086a9e6f5206ecd83608
[]
no_license
black-ant/case
2e33cbd74b559924d3a53092a8b070edea4d143d
589598bb41398b330bc29b2ca61757296b55b579
refs/heads/master
2023-07-31T23:22:51.168312
2022-07-24T06:15:53
2022-07-24T06:15:53
137,761,384
86
26
null
2023-07-17T01:03:21
2018-06-18T14:22:01
Java
UTF-8
Java
false
false
701
java
package com.gang.cloud.template.demo.client; import com.gang.cloud.template.to.CommonOrderTO; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.stereotype.Component; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import java.util.Collection; /** * @Classname SampleFeignClient * @Description TODO * @Date 2021/3/4 21:21 * @Created by zengzg */ @FeignClient("order-server") @Component public interface OrderFeignClient { @GetMapping("/order/list") Collection<CommonOrderTO> list(); @GetMapping("/order/get/{id}") CommonOrderTO getById(@PathVariable("id") String id); }
94b83c95f4c0ec50e3a6512b3ccd6afaaac3436e
f12da240ee793afdaf485524b86afcda2e0b02b4
/banner/src/main/java/com/king/lib/banner/BannerLog.java
83bd9cc4cd801ebf5c7c3d752e6fa7ab00fd11fc
[]
no_license
AidenKing/CoolBanner
82e9fb93d9a1fdad817f446f34e4a5c82f0ae007
53d587f8bef4962247213685a13374e4c34744c3
refs/heads/master
2020-04-26T11:36:58.995791
2019-03-04T09:42:30
2019-03-04T09:42:30
173,464,897
0
0
null
null
null
null
UTF-8
Java
false
false
1,005
java
package com.king.lib.banner; import android.util.Log; /** * Desc: * * @author:Jing Yang * @date: 2019/3/1 10:16 */ public class BannerLog { private static boolean isDebug=false; /**类名**/ private static String className; /**方法名**/ private static String methodName; public static void e(String message){ if (!isDebug) return; // Throwable instance must be created before any methods getMethodNames(new Throwable().getStackTrace()); Log.e(className, createLog(message)); } private static void getMethodNames(StackTraceElement[] sElements){ className = sElements[1].getFileName(); methodName = sElements[1].getMethodName(); } private static String createLog(String log){ StringBuffer buffer = new StringBuffer(); buffer.append("["); buffer.append(methodName); buffer.append("]"); buffer.append(log); return buffer.toString(); } }
a34505723a6c74b4466f1d46d38792ab15a0bd6a
9af5abe79a9d2d38b2d6d34c4d821a07935e3339
/src/main/java/com/phonemetra/turbo/internal/binary/BinaryReaderHandles.java
0eb093004e1ce66836c06832008792c76f036a3a
[ "Apache-2.0" ]
permissive
Global-localhost/TurboSQL
a66b70a8fdb4cd67642dda0dad132986f2b9165c
10dd81a36a0e25b1f786e366eb3ed9af0e5e325b
refs/heads/master
2022-12-17T05:48:16.652086
2019-04-16T23:02:00
2019-04-16T23:02:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,883
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.phonemetra.turbo.internal.binary; import org.jetbrains.annotations.Nullable; import java.util.HashMap; import java.util.Map; /** * Reader handles. */ public class BinaryReaderHandles { /** Mode: empty. */ private static final int MODE_EMPTY = 0; /** Mode: single object. */ private static final int MODE_SINGLE = 1; /** Mode: multiple objects. */ private static final int MODE_MULTIPLE = 2; /** Position. */ private int singlePos; /** Data. This is either an object or a map. */ private Object data; /** Mode. */ private int mode = MODE_EMPTY; /** * Get object by position. * * @param pos Position. * @return Object. */ @Nullable public <T> T get(int pos) { switch (mode) { case MODE_EMPTY: return null; case MODE_SINGLE: return pos == singlePos ? (T)data : null; default: assert mode == MODE_MULTIPLE; return (T)((Map<Integer, Object>)data).get(pos); } } /** * Put object to registry and return previous position (if any). * * @param pos Position. * @param obj Object. */ @SuppressWarnings("unchecked") public void put(int pos, Object obj) { assert pos >= 0; assert obj != null; switch (mode) { case MODE_EMPTY: this.singlePos = pos; this.data = obj; this.mode = MODE_SINGLE; break; case MODE_SINGLE: Map<Integer, Object> newData = new HashMap(3, 1.0f); newData.put(singlePos, data); newData.put(pos, obj); this.singlePos = -1; this.data = newData; this.mode = MODE_MULTIPLE; break; default: assert mode == MODE_MULTIPLE; Map<Integer, Object> data0 = (Map<Integer, Object>)data; data0.put(pos, obj); } } }
582bceb7df5c7b1b05f6ab0781685a68f50d40fc
63f579466b611ead556cb7a257d846fc88d582ed
/XDRValidator/src/main/java/generated/ADXP.java
a420c981531bc30521efbb9cde27c13bd672abec
[]
no_license
svalluripalli/soap
14f47b711d63d4890de22a9f915aed1bef755e0b
37d7ea683d610ab05477a1fdb4e329b5feb05381
refs/heads/master
2021-01-18T20:42:09.095152
2014-05-07T21:16:36
2014-05-07T21:16:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,395
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2014.05.07 at 05:07:17 PM EDT // package generated; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlType; /** * * A character string that may have a type-tag signifying its * role in the address. Typical parts that exist in about * every address are street, house number, or post box, * postal code, city, country but other roles may be defined * regionally, nationally, or on an enterprise level (e.g. in * military addresses). Addresses are usually broken up into * lines, which are indicated by special line-breaking * delimiter elements (e.g., DEL). * * * <p>Java class for ADXP complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="ADXP"> * &lt;complexContent> * &lt;extension base="{}ST"> * &lt;attribute name="partType" type="{}AddressPartType" /> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ADXP") @XmlSeeAlso({ AdxpDeliveryInstallationType.class, AdxpPrecinct.class, AdxpUnitID.class, AdxpCensusTract.class, AdxpDeliveryAddressLine.class, AdxpPostBox.class, AdxpDeliveryInstallationArea.class, AdxpDeliveryMode.class, AdxpHouseNumber.class, AdxpStreetNameType.class, AdxpDirection.class, AdxpPostalCode.class, AdxpStreetNameBase.class, AdxpDeliveryInstallationQualifier.class, AdxpBuildingNumberSuffix.class, AdxpCity.class, AdxpState.class, AdxpDelimiter.class, AdxpStreetAddressLine.class, AdxpUnitType.class, AdxpCountry.class, AdxpHouseNumberNumeric.class, AdxpCareOf.class, AdxpCounty.class, AdxpDeliveryModeIdentifier.class, AdxpStreetName.class, AdxpAdditionalLocator.class }) public class ADXP extends ST { @XmlAttribute(name = "partType") protected List<String> partType; /** * Gets the value of the partType property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the partType property. * * <p> * For example, to add a new item, do as follows: * <pre> * getPartType().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link String } * * */ public List<String> getPartType() { if (partType == null) { partType = new ArrayList<String>(); } return this.partType; } }
c2c2e1db04f265c2587afe054fa15c6195a3ef72
5741045375dcbbafcf7288d65a11c44de2e56484
/reddit-decompilada/com/reddit/frontpage/presentation/listing/PopularListingScreen$customizeDecorationStrategy$1.java
79d30bc33d0447f11c50fd0b6362e9d3a93221f3
[]
no_license
miarevalo10/ReporteReddit
18dd19bcec46c42ff933bb330ba65280615c281c
a0db5538e85e9a081bf268cb1590f0eeb113ed77
refs/heads/master
2020-03-16T17:42:34.840154
2018-05-11T10:16:04
2018-05-11T10:16:04
132,843,706
0
0
null
null
null
null
UTF-8
Java
false
false
1,025
java
package com.reddit.frontpage.presentation.listing; import kotlin.Metadata; import kotlin.jvm.functions.Function1; import kotlin.jvm.internal.Lambda; @Metadata(bv = {1, 0, 2}, d1 = {"\u0000\u000e\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\b\n\u0000\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\n¢\u0006\u0002\b\u0004"}, d2 = {"<anonymous>", "", "it", "", "invoke"}, k = 3, mv = {1, 1, 9}) /* compiled from: PopularListingScreen.kt */ final class PopularListingScreen$customizeDecorationStrategy$1 extends Lambda implements Function1<Integer, Boolean> { public static final PopularListingScreen$customizeDecorationStrategy$1 f36525a = new PopularListingScreen$customizeDecorationStrategy$1(); PopularListingScreen$customizeDecorationStrategy$1() { super(1); } public final /* synthetic */ Object mo6492a(Object obj) { boolean z = true; if (((Number) obj).intValue() <= 1) { z = false; } return Boolean.valueOf(z); } }
8f29ef390da3b8274b593bd5774b404e2b4fce6c
f07946e772638403c47cc3e865fd8a5e976c0ce6
/leetcode_java/src/1986.minimum-number-of-work-sessions-to-finish-the-tasks.java
c87edc250811156970478e619b216722f166ce9a
[]
no_license
yuan-fei/Coding
2faf4f87c72694d56ac082778cfc81c6ff8ec793
2c64b53c5ec1926002d6e4236c4a41a676aa9472
refs/heads/master
2023-07-23T07:32:33.776398
2023-07-21T15:34:25
2023-07-21T15:34:25
113,255,839
0
0
null
null
null
null
UTF-8
Java
false
false
2,884
java
/* * @lc app=leetcode id=1986 lang=java * * [1986] Minimum Number of Work Sessions to Finish the Tasks * * https://leetcode.com/problems/minimum-number-of-work-sessions-to-finish-the-tasks/description/ * * algorithms * Medium (29.53%) * Likes: 254 * Dislikes: 16 * Total Accepted: 6.2K * Total Submissions: 21.1K * Testcase Example: '[1,2,3]\n3' * * There are n tasks assigned to you. The task times are represented as an * integer array tasks of length n, where the i^th task takes tasks[i] hours to * finish. A work session is when you work for at most sessionTime consecutive * hours and then take a break. * * You should finish the given tasks in a way that satisfies the following * conditions: * * * If you start a task in a work session, you must complete it in the same work * session. * You can start a new task immediately after finishing the previous one. * You may complete the tasks in any order. * * * Given tasks and sessionTime, return the minimum number of work sessions * needed to finish all the tasks following the conditions above. * * The tests are generated such that sessionTime is greater than or equal to * the maximum element in tasks[i]. * * * Example 1: * * * Input: tasks = [1,2,3], sessionTime = 3 * Output: 2 * Explanation: You can finish the tasks in two work sessions. * - First work session: finish the first and the second tasks in 1 + 2 = 3 * hours. * - Second work session: finish the third task in 3 hours. * * * Example 2: * * * Input: tasks = [3,1,3,1,1], sessionTime = 8 * Output: 2 * Explanation: You can finish the tasks in two work sessions. * - First work session: finish all the tasks except the last one in 3 + 1 + 3 * + 1 = 8 hours. * - Second work session: finish the last task in 1 hour. * * * Example 3: * * * Input: tasks = [1,2,3,4,5], sessionTime = 15 * Output: 1 * Explanation: You can finish all the tasks in one work session. * * * * Constraints: * * * n == tasks.length * 1 <= n <= 14 * 1 <= tasks[i] <= 10 * max(tasks[i]) <= sessionTime <= 15 * * */ // @lc code=start class Solution { public int minSessions(int[] tasks, int sessionTime) { int n = tasks.length; int[] dp = new int[1 << n]; for(int m = 0; m < (1 << n); m++){ dp[m] = n; int total = 0; for(int i = 0; i < n; i++){ if(((m >> i) & 1) != 0){ total += tasks[i]; } } if(total <= sessionTime){ dp[m] = 1; } int x = m; while(x != 0){ x = (x-1) & m; dp[m] = Math.min(dp[m], dp[x] + dp[m ^ x]); } } // System.out.println(Arrays.toString(dp)); return dp[(1 << n) - 1]; } } // @lc code=end
f813de46406527ae81751f0b66ad063f412fdfe0
d66a4cbb0bb425b3d1bef9054e421a9ac1bf784b
/gmsc-app/app/src/main/java/cn/gmuni/sc/module/me/MeFragment.java
50694d25a7092360f8b08559210cbba3d2bc6555
[]
no_license
zhuxin3230213/android
a0300e991189ba87d3617b8e2e316b1b616b9b1c
21c3faf7650de9c90cfe53e9af9bf200308e4282
refs/heads/master
2020-04-13T18:18:53.258699
2019-01-21T03:13:53
2019-01-21T03:13:53
161,720,843
0
0
null
null
null
null
UTF-8
Java
false
false
6,534
java
package cn.gmuni.sc.module.me; import android.content.Intent; import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.View; import android.widget.RelativeLayout; import android.widget.TextView; import java.util.Map; import butterknife.BindView; import butterknife.OnClick; import cn.gmuni.sc.R; import cn.gmuni.sc.base.BaseFragment; import cn.gmuni.sc.model.entities.UserInfoEntity; import cn.gmuni.sc.module.me.SignIn.SignInActivity; import cn.gmuni.sc.module.me.me_market.MeMarketActivity; import cn.gmuni.sc.module.me.message.MessageActivity; import cn.gmuni.sc.module.me.personal_details.PersionalDetailsActivity; import cn.gmuni.sc.module.schoolcard.SchoolCardActivity; import cn.gmuni.sc.network.Network; import cn.gmuni.sc.network.api.IMessageApi; import cn.gmuni.sc.utils.BitMapUtil; import cn.gmuni.sc.utils.ClickShake; import cn.gmuni.sc.utils.MToast; import cn.gmuni.sc.utils.SecurityUtils; import cn.gmuni.sc.widget.CustomImageView; /** * A simple {@link Fragment} subclass. */ public class MeFragment extends BaseFragment { @BindView(R.id.me_setting) RelativeLayout settingView; @BindView(R.id.me_school_card) RelativeLayout schoolCardView; @BindView(R.id.me_pay_fanpiao) RelativeLayout fanpiaoView; @BindView(R.id.me_pay_detail) RelativeLayout payDetailView; @BindView(R.id.me_school_name) TextView schoolNameView; @BindView(R.id.me_user_name) TextView userNameView; @BindView(R.id.me_avatar_img) CustomImageView avatarView; @BindView(R.id.me_school_information_icon_circular_round) TextView me_school_information_icon_circular_round; public static final int UPDATE_USERINFO_CODE = 1; public static final int READ_MESSAGE_STATE = 2; public MeFragment() { // Required empty public constructor } @Override public int getLayoutRes() { return R.layout.fragment_me; } @Override public void initView() { UserInfoEntity entity = SecurityUtils.getUserInfo(); if (entity != null) { schoolNameView.setText(entity.getSchoolName()); userNameView.setText(entity.getName()); if (null != entity.getAvatar() && !"".equals(entity.getAvatar())) { avatarView.setImageBitmap(BitMapUtil.base64ToBitmap(entity.getAvatar())); } } //获取消息列表有未读状态 getMessageState(); } //获取消息列表状态 private void getMessageState() { Network.request(Network.createApi(IMessageApi.class).getMessageState(), new Network.IResponseListener<Map<String, Object>>() { @Override public void onSuccess(Map<String, Object> data) { if (data != null) { if ("true".equals(String.valueOf(data.get("flag")))) { //有未读消息,则显示小圆点 me_school_information_icon_circular_round.setVisibility(View.VISIBLE); } else { me_school_information_icon_circular_round.setVisibility(View.GONE); } } else { me_school_information_icon_circular_round.setVisibility(View.GONE); } } @Override public void onFail(int code, String message) { MToast.showShortToast("获取消息状态失败"); } }); } @OnClick({R.id.me_school_message, R.id.me_school_market, R.id.me_school_card, R.id.me_pay_fanpiao, R.id.me_pay_detail, R.id.me_setting, R.id.me_school_xueji}) protected void OnItemClick(RelativeLayout view) { if (!ClickShake.check(view.getId())) { return; } switch (view.getId()) { case R.id.me_school_message: { startActivityForResult(new Intent(getContext(), MessageActivity.class), READ_MESSAGE_STATE); break; } case R.id.me_school_market:{ startActivity(new Intent(getContext(),MeMarketActivity.class)); break; } case R.id.me_setting: { startActivity(new Intent(getContext(), MeSettingActivity.class)); break; } case R.id.me_school_xueji: { startActivity(new Intent(getContext(), StudentRollActivity.class)); break; } case R.id.me_school_card: { startActivitySecurity(new Intent(getContext(), SchoolCardActivity.class)); break; } case R.id.me_pay_fanpiao: { MToast.showLongToast("正在开发中"); break; } case R.id.me_pay_detail: { MToast.showLongToast("正在开发中"); break; } } } @OnClick(R.id.me_edit) protected void onEditClick(CustomImageView edit) { startActivityForResult(new Intent(getContext(), PersionalDetailsActivity.class), UPDATE_USERINFO_CODE); } @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { //如果修改了数据 if (requestCode == UPDATE_USERINFO_CODE) { UserInfoEntity userInfo = SecurityUtils.getUserInfo(); userNameView.setText(userInfo.getName()); schoolNameView.setText(userInfo.getSchoolName()); if (null != userInfo.getAvatar() && !"".equals(userInfo.getAvatar())) { avatarView.setImageBitmap(BitMapUtil.base64ToBitmap(userInfo.getAvatar())); } } //消息阅读状态 if (resultCode == READ_MESSAGE_STATE) { String iState = data.getStringExtra("iState"); if ("true".equals(iState)) { me_school_information_icon_circular_round.setVisibility(View.VISIBLE); } else { me_school_information_icon_circular_round.setVisibility(View.GONE); } } } @OnClick({R.id.me_sign_in, R.id.me_sign_in_bt}) protected void onSignInClick(View v) { startActivity(new Intent(getContext(), SignInActivity.class)); } @Override protected void managerArguments() { } public static MeFragment newInstance() { MeFragment fragment = new MeFragment(); Bundle bundle = new Bundle(); fragment.setArguments(bundle); return fragment; } }
[ "zhuxin_123" ]
zhuxin_123
1f5c7779fffff543c0fb607413d8b6b625fcf5d4
d36d5b620e7c999b7b62af27df46f62828e8cbb3
/app/src/main/java/com/extra/saas/WelcomeAty.java
5f503bb12b2b7a4477eb4e001db2aabc20c67e86
[]
no_license
CNHTT/ENGNINETWOTWOZERO
6aa5e4a4b3ec489877df7dea94f4438f47ca1b38
f13d50bbcd0985ba123cd52486fb6839789501b0
refs/heads/master
2021-08-16T08:59:40.653651
2017-11-19T13:03:36
2017-11-19T13:03:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,377
java
package com.extra.saas; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.Window; import android.view.WindowManager; import android.widget.ImageView; import com.bumptech.glide.Glide; import java.util.concurrent.TimeUnit; import butterknife.BindView; import butterknife.ButterKnife; import io.reactivex.Observable; import io.reactivex.Observer; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.disposables.Disposable; public class WelcomeAty extends AppCompatActivity { @BindView(R.id.imageView) ImageView imageView; Disposable dis; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE);//隐藏标题 getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);//设置全屏 setContentView(R.layout.activity_welcome_aty); ButterKnife.bind(this); Glide.with(this).load("https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1511102993009&di=453775d011b9612599b9e7a7c98c5724&imgtype=0&src=http%3A%2F%2Fimg4q.duitang.com%2Fuploads%2Fitem%2F201504%2F23%2F20150423H4547_NSyJn.thumb.700_0.jpeg").into(imageView); Observable.timer(3, TimeUnit.SECONDS) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new Observer<Long>() { @Override public void onSubscribe(Disposable d) { dis=d; } @Override public void onNext(Long value) { } @Override public void onError(Throwable e) { cancel(); } @Override public void onComplete() { //完成时调用 toLogin(); } }); } private void toLogin() { finish(); startActivity(new Intent(this,MainActivity.class)); } /** * 取消订阅 */ public void cancel(){ if(dis!=null&&!dis.isDisposed()){ dis.dispose(); } } }
fcd1f882e8694de96c0f6fe45cdecca5aa68fb49
982f6c3a3c006d2b03f4f53c695461455bee64e9
/src/main/java/com/alipay/api/domain/AlipayInsMarketingCampaignPrizeSendModel.java
000ff6ccdb5f7a41cb9a614444ed2738b770d417
[ "Apache-2.0" ]
permissive
zhaomain/Alipay-Sdk
80ffc0505fe81cc7dd8869d2bf9a894b823db150
552f68a2e7c10f9ffb33cd8e0036b0643c7c2bb3
refs/heads/master
2022-11-15T03:31:47.418847
2020-07-09T12:18:59
2020-07-09T12:18:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,007
java
package com.alipay.api.domain; import java.util.List; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; /** * 保险营销活动发奖接口 * * @author auto create * @since 1.0, 2017-12-14 18:04:02 */ public class AlipayInsMarketingCampaignPrizeSendModel extends AlipayObject { private static final long serialVersionUID = 2521667421146469676L; /** * 账户id,如支付宝userId:2088102161835009 */ @ApiField("account_id") private String accountId; /** * 账号类型 */ @ApiField("account_type") private Long accountType; /** * 营销保险活动Id */ @ApiField("campaign_id") private String campaignId; /** * 发奖规则因子 */ @ApiListField("factors") @ApiField("ins_mkt_factor_d_t_o") private List<InsMktFactorDTO> factors; /** * 发奖接口幂等字段 */ @ApiField("out_biz_no") private String outBizNo; /** * 请求流水Id */ @ApiField("request_id") private String requestId; public String getAccountId() { return this.accountId; } public void setAccountId(String accountId) { this.accountId = accountId; } public Long getAccountType() { return this.accountType; } public void setAccountType(Long accountType) { this.accountType = accountType; } public String getCampaignId() { return this.campaignId; } public void setCampaignId(String campaignId) { this.campaignId = campaignId; } public List<InsMktFactorDTO> getFactors() { return this.factors; } public void setFactors(List<InsMktFactorDTO> factors) { this.factors = factors; } public String getOutBizNo() { return this.outBizNo; } public void setOutBizNo(String outBizNo) { this.outBizNo = outBizNo; } public String getRequestId() { return this.requestId; } public void setRequestId(String requestId) { this.requestId = requestId; } }
db87fcc2c30157c9d3cf5b8316d5faee0dd3bb44
57edb737df8e9de3822d4f08d0de81f028403209
/spring-web/src/main/java/org/springframework/web/util/pattern/CaptureTheRestPathElement.java
0a38c3b16f8723a3bc7c4648a43b1de31749368a
[ "Apache-2.0" ]
permissive
haoxianrui/spring-framework
20d904fffe7ddddcd7d78445537f66e0b4cf65f5
e5163351c47feb69483e79fa782eec3e4d8613e8
refs/heads/master
2023-05-25T14:27:18.935575
2020-10-23T01:04:05
2020-10-23T01:04:05
260,652,424
1
1
null
null
null
null
UTF-8
Java
false
false
3,968
java
/* * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.web.util.pattern; import java.util.List; import org.springframework.http.server.PathContainer.Element; import org.springframework.http.server.PathContainer.PathSegment; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.util.pattern.PathPattern.MatchingContext; /** * A path element representing capturing the rest of a path. In the pattern * '/foo/{*foobar}' the /{*foobar} is represented as a {@link CaptureTheRestPathElement}. * * @author Andy Clement * @since 5.0 */ class CaptureTheRestPathElement extends PathElement { private final String variableName; /** * Create a new {@link CaptureTheRestPathElement} instance. * * @param pos position of the path element within the path pattern text * @param captureDescriptor a character array containing contents like '{' '*' 'a' 'b' '}' * @param separator the separator used in the path pattern */ CaptureTheRestPathElement(int pos, char[] captureDescriptor, char separator) { super(pos, separator); this.variableName = new String(captureDescriptor, 2, captureDescriptor.length - 3); } @Override public boolean matches(int pathIndex, MatchingContext matchingContext) { // No need to handle 'match start' checking as this captures everything // anyway and cannot be followed by anything else // assert next == null // If there is more data, it must start with the separator if (pathIndex < matchingContext.pathLength && !matchingContext.isSeparator(pathIndex)) { return false; } if (matchingContext.determineRemainingPath) { matchingContext.remainingPathIndex = matchingContext.pathLength; } if (matchingContext.extractingVariables) { // Collect the parameters from all the remaining segments MultiValueMap<String, String> parametersCollector = null; for (int i = pathIndex; i < matchingContext.pathLength; i++) { Element element = matchingContext.pathElements.get(i); if (element instanceof PathSegment) { MultiValueMap<String, String> parameters = ((PathSegment) element).parameters(); if (!parameters.isEmpty()) { if (parametersCollector == null) { parametersCollector = new LinkedMultiValueMap<>(); } parametersCollector.addAll(parameters); } } } matchingContext.set(this.variableName, pathToString(pathIndex, matchingContext.pathElements), parametersCollector == null ? NO_PARAMETERS : parametersCollector); } return true; } private String pathToString(int fromSegment, List<Element> pathElements) { StringBuilder buf = new StringBuilder(); for (int i = fromSegment, max = pathElements.size(); i < max; i++) { Element element = pathElements.get(i); if (element instanceof PathSegment) { buf.append(((PathSegment) element).valueToMatch()); } else { buf.append(element.value()); } } return buf.toString(); } @Override public int getNormalizedLength() { return 1; } @Override public int getWildcardCount() { return 0; } @Override public int getCaptureCount() { return 1; } @Override public String toString() { return "CaptureTheRest(/{*" + this.variableName + "})"; } @Override public char[] getChars() { return ("/{*" + this.variableName + "}").toCharArray(); } }
e946bb2d350ee54cdb610f504975ebe005d63197
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/6/6_b504608e8b8bcc3425818940c19ce6d9416879ae/Grid/6_b504608e8b8bcc3425818940c19ce6d9416879ae_Grid_s.java
3dde96e2942f74509afd56df8fae3c07cf0623a5
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,621
java
package ep.common; import ucar.ma2.Array; import ucar.ma2.Index; public class Grid { public Array surface; public float baseLon; public float baseLat; public float resLon; public float resLat; public long getSize() { return surface.getSize(); } public Array getSurface() { return surface; } public void setSurface(Array surface) { this.surface = surface; } public int[] getShape() { return surface.getShape(); } public Index getIndex() { return surface.getIndex(); } public void globalize() { baseLon = 0; baseLat = 0; int[] shape = getShape(); resLat = 180.0f / shape[0]; resLon = 360.0f / shape[1]; } private Grid cloneWithProperties() { Grid ng = new Grid(); ng.baseLat = baseLat; ng.baseLon = baseLon; ng.resLat = resLat; ng.resLon = resLon; return ng; } public Grid empty() { Grid ng = cloneWithProperties(); ng.surface = Array.factory(surface.getElementType(), surface.getShape()); return ng; } public Grid copy() { Grid ng = cloneWithProperties(); ng.surface = surface.copy(); return ng; } public void floatScale(Grid g) { if (g.getSize() != getSize()) { throw new IllegalArgumentException("not equal gridding added: " + getSize() + " + " + g.getSize()); } long size = getSize(); float[] faciend = (float[])getSurface().getStorage(); float[] factor = (float[])g.getSurface().getStorage(); for (int i = 0; i < size; ++i) { faciend[i] *= factor[i]; } } public void floatPlusWithFactor(Grid g, Grid factor) { if (g.getSize() != getSize()) { throw new IllegalArgumentException("not equal gridding added: " + getSize() + " + " + g.getSize()); } float[] addend = (float[])g.getSurface().getStorage(); float[] augend = (float[])g.getSurface().getStorage(); float[] f = (float[])g.getSurface().getStorage(); int size = addend.length; for (int i = 0; i < size; ++i) { augend[i] += addend[i] * f[i]; } } public void floatPlus(Grid g) { if (g.getSize() != getSize()) { throw new IllegalArgumentException("not equal gridding added: " + getSize() + " + " + g.getSize()); } long size = getSize(); float[] addend = (float[])g.getSurface().getStorage(); float[] augend = (float[])surface.getStorage(); for (int i = 0; i < size; ++i) { augend[i] += addend[i]; } } public void floatScale(float f) { long size = getSize(); float[] array = (float[])surface.getStorage(); for (int i = 0; i < size; ++i) { array[i] *= f; } } public void floatScale2(Grid baseFactor, Grid targetFactor) { if (getSize() != baseFactor.getSize()) throw new IllegalArgumentException("not equal grid added (base): " + getSize() + " + " + baseFactor.getSize()); if (getSize() != targetFactor.getSize()) throw new IllegalArgumentException("not equal grid added (target): " + getSize() + " + " + targetFactor.getSize()); int size = (int)getSize(); float[] cur = (float[])getSurface().getStorage(); float[] base = (float[])baseFactor.getSurface().getStorage(); float[] target = (float[])targetFactor.getSurface().getStorage(); for (int i = 0; i < size; ++i) { if (base[i] == 0) continue; if (target[i] == 0) { cur[i] = 0; continue; } cur[i] = cur[i] * target[i] / base[i]; } } }
1fcf699b14cd9755433974c991734208df0e9a81
4aa90348abcb2119011728dc067afd501f275374
/app/src/main/java/com/tencent/mm/protocal/c/bpj.java
383da6118f644e53bb604bf2e1f7d18cff6a6653
[]
no_license
jambestwick/HackWechat
0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6
6a34899c8bfd50d19e5a5ec36a58218598172a6b
refs/heads/master
2022-01-27T12:48:43.446804
2021-12-29T10:36:30
2021-12-29T10:36:30
249,366,791
0
0
null
2020-03-23T07:48:32
2020-03-23T07:48:32
null
UTF-8
Java
false
false
2,234
java
package com.tencent.mm.protocal.c; import e.a.a.b; import e.a.a.c.a; import java.util.LinkedList; public final class bpj extends bdf { protected final int a(int i, Object... objArr) { if (i == 0) { a aVar = (a) objArr[0]; if (this.wJr == null) { throw new b("Not all required fields were included: BaseResponse"); } else if (this.wJr == null) { return 0; } else { aVar.fW(1, this.wJr.bke()); this.wJr.a(aVar); return 0; } } else if (i == 1) { if (this.wJr != null) { r0 = e.a.a.a.fT(1, this.wJr.bke()) + 0; } else { r0 = 0; } return r0; } else if (i == 2) { e.a.a.a.a aVar2 = new e.a.a.a.a((byte[]) objArr[0], unknownTagHandler); for (r0 = bdf.a(aVar2); r0 > 0; r0 = bdf.a(aVar2)) { if (!super.a(aVar2, this, r0)) { aVar2.cJE(); } } if (this.wJr != null) { return 0; } throw new b("Not all required fields were included: BaseResponse"); } else if (i != 3) { return -1; } else { e.a.a.a.a aVar3 = (e.a.a.a.a) objArr[0]; bpj com_tencent_mm_protocal_c_bpj = (bpj) objArr[1]; int intValue = ((Integer) objArr[2]).intValue(); switch (intValue) { case 1: LinkedList Jl = aVar3.Jl(intValue); int size = Jl.size(); for (intValue = 0; intValue < size; intValue++) { byte[] bArr = (byte[]) Jl.get(intValue); com.tencent.mm.bq.a feVar = new fe(); e.a.a.a.a aVar4 = new e.a.a.a.a(bArr, unknownTagHandler); for (boolean z = true; z; z = feVar.a(aVar4, feVar, bdf.a(aVar4))) { } com_tencent_mm_protocal_c_bpj.wJr = feVar; } return 0; default: return -1; } } } }
99735a5675b00096dd0ec541923ad8e9af5a4981
2bdb52ddba36fcd1f8e6c1e0c928ed9cc3b58f8e
/gzzhwl/.svn/pristine/99/99735a5675b00096dd0ec541923ad8e9af5a4981.svn-base
3ae905828d0f191dfdddab98a2cd2cc15c44644c
[]
no_license
tongcrane/gzzhwl
844ba46bb1a05651ca099d819b0c83a3280f688c
518aee3a8713c298897dd65910662fd771810109
refs/heads/master
2020-06-21T04:14:01.487055
2016-11-26T15:49:39
2016-11-26T15:49:39
74,811,586
1
1
null
null
null
null
UTF-8
Java
false
false
512
package com.gzzhwl.core.data.dao; import java.util.List; import java.util.Map; import com.gzzhwl.core.data.model.PushDevice; import com.gzzhwl.core.data.model.PushInfo; /** * 数据访问接口 * */ public interface PushInfoDao { public final static String PREFIX = PushInfoDao.class.getName(); public <T, K, V> List<T> find(Map<String, Object> params); public int insert(PushInfo pushInfo); public int updateSelective(PushInfo pushInfo); public int delInfoByToken(Map<String, Object> params); }
b0ef3d5823fd975c366a7b3cf3f5871797b7a6f9
5b644e2fc7d5616364df77683c7d838f208754bd
/src/main/java/com/mitch/gamem/blocks/BoxBlock.java
6f1b4d8258ce01e68a773c79f46e9f2c46324a5b
[]
no_license
insou22/GameM
2168eaddd616d07691b5ad67b595cf78396d9fd8
55052ee8532448a29aca5914841c4311dcaec6f8
refs/heads/master
2020-12-24T18:22:40.852360
2016-05-16T00:37:24
2016-05-16T00:37:24
58,463,223
0
0
null
null
null
null
UTF-8
Java
false
false
609
java
package com.mitch.gamem.blocks; import static org.fusesource.jansi.Ansi.Color.*; import static org.fusesource.jansi.Ansi.ansi; public class BoxBlock extends Block { public void render(int line, boolean player) { switch (line) { case 1: System.out.print(ansi().fg(YELLOW).a("┏━━━┓")); break; case 2: System.out.print(ansi().fg(YELLOW).a("┃ ╳ ┃")); break; case 3: System.out.print(ansi().fg(YELLOW).a("┗━━━┛")); break; } } }
c1ce565ff8de63d50a080392282f80a0c085a57f
78f284cd59ae5795f0717173f50e0ebe96228e96
/factura-negocio/src/cl/stotomas/factura/negocio/ia_20/copy2/copy/TestingHab.java
1769dd64168f244d184e501267fa0542ba71ec54
[]
no_license
Pattricio/Factura
ebb394e525dfebc97ee2225ffc5fca10962ff477
eae66593ac653f85d05071b6ccb97fb1e058502d
refs/heads/master
2020-03-16T03:08:45.822070
2018-05-07T15:29:25
2018-05-07T15:29:25
132,481,305
0
0
null
null
null
null
ISO-8859-1
Java
false
false
2,150
java
package cl.stotomas.factura.negocio.ia_20.copy2.copy; import java.util.*; public class TestingHab { private int id; private String nombre; private String apellido; private int edad; /** * Constructor vacío */ public TestingHab() { id = 1; nombre = "Edward"; apellido = "Dammus"; edad = 22; } /** * Constructor con parametros */ public TestingHab(int id, String nombre, String apellido, int edad) { this.id = id; this.nombre = nombre; this.apellido = apellido; setEdad(edad); } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getNombre() { return nombre; } public void setNombre(String nombre) { this.nombre = nombre; } public String getApellido() { return apellido; } public void setApellido(String apellido) { this.apellido = apellido; } public int getEdad() { return edad; } public void setEdad(int edad) { this.edad = edad; } /** * Método que acepte que la edad debe ser mayor a 15 */ public void edadMayor(int edad) { if(edad > 15) { System.out.println("Admitido"); } else { System.out.println("Edad debe ser mayor a 15"); } } /** * Método que me valide el segundo nombre */ public void validarNombre(String nombre) { StringTokenizer token = new StringTokenizer(nombre); if(token.countTokens() == 2) { System.out.println("Ingresaste 2 nombres"); }else { System.out.println("Error"); } } /** * Método que me pregunte por la edad y por el nombre */ public void NombreEdad(String nombre, int edad) { System.out.println("Cual es tu nombre y tu edad"); if(nombre.equals(nombre)) { System.out.println("Su nombre es: " +getNombre()); }else if(edad == 13) { this.edad = 100; // cambia la edad a 100 System.out.println("Su edad es:" +getEdad()); } } /** * Instanciar una persona */ public void Persona(Object o) { if(o.getClass() == TestingHab.class) { System.out.println(o); } } }
[ "Adriana Molano@DESKTOP-GQ96FK8" ]
Adriana Molano@DESKTOP-GQ96FK8
2adae27a96a85fd750ac17bbc9224cf45bf65d93
c317b527ee695f5f4a33763e3e6b23b767fcae03
/and_week2_1/src/com/example/and_week2_1/CustomAdapter.java
688da41e22ff29fee4e197945fe083ef8d2eca03
[]
no_license
cocagolau/NEXT_13-03_Development-Experience-Project_Android
79c5e475462137212a84b9910e591776444ef0fb
582ed987df54e3a9ffbd0e1cd4f0a0f15af2ebcb
refs/heads/master
2016-09-05T09:09:23.029846
2014-07-07T12:29:09
2014-07-07T12:29:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,758
java
package com.example.and_week2_1; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import android.app.Activity; import android.content.Context; import android.graphics.drawable.Drawable; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.ImageView; import android.widget.TextView; public class CustomAdapter extends ArrayAdapter<ListData>{ private Context context; private int layoutResourseId; private ArrayList<ListData> listData; public CustomAdapter (Context context, int layoutResourseId, ArrayList<ListData> listData) { super(context, layoutResourseId, listData); this.context = context; this.layoutResourseId = layoutResourseId; this.listData = listData; } @Override public View getView (int position, View convertView, ViewGroup parent) { View row = convertView; if (row == null) { LayoutInflater inflater = ((Activity)context).getLayoutInflater(); row = inflater.inflate(layoutResourseId, parent, false); } TextView tvText1 = (TextView) row.findViewById(R.id.custom_row_textView1); TextView tvText2 = (TextView) row.findViewById(R.id.custom_row_textView2); tvText1.setText(listData.get(position).getTitle()); tvText2.setText(listData.get(position).getText()); ImageView imgView = (ImageView) row.findViewById(R.id.custom_row_imageView); try { InputStream is = context.getAssets().open("sam/"+listData.get(position).getImage()); Drawable d = Drawable.createFromStream(is, null); imgView.setImageDrawable(d); } catch (IOException e) { Log.e("customAdapter", e.getMessage()); } return row; } }
14dcfe99be81cc6a1fe59f4befcc77732b21269e
464fc564f5053a605a5930cf3161f93d3489001e
/src/main/java/com/fun/project/admin/system/entity/user/UserRole.java
678d194e30e8a34bb1a8414031534e5a18bbdaee
[]
no_license
yukaril/fun-boot
25825c0ee34918186518fad1853d573b20651f53
eac13bbde765264733d0f6894a8d7754baa76407
refs/heads/master
2020-09-26T09:18:05.607317
2019-12-03T12:46:10
2019-12-03T12:46:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
258
java
package com.fun.project.admin.system.entity.user; import lombok.Data; /** * 用户和角色关联 sys_user_role * @author DJun */ @Data public class UserRole { /** 用户ID */ private Long userId; /** 角色ID */ private Long roleId; }
b76a91f4cffa4e1a82bd872857807b570b261f20
48f0b3e029b304bf2cfb64419aad795445862856
/Coral/dk.itu.sdg.language.xwpf.resource.xwpf/src-gen/dk/itu/sdg/language/xwpf/resource/xwpf/IXwpfHoverTextProvider.java
3f65438daab0ca4e29882f024b1ab9ebb9ec65b7
[]
no_license
jreimone/refactory
09dda0718d5d8117f858d3e4497e8c1371530518
837f1ca3d8537250d024ead3be3ba95f7845409e
refs/heads/master
2021-07-18T15:34:02.469855
2021-02-23T07:55:25
2021-02-23T07:55:25
56,208,480
2
1
null
2020-10-13T06:52:33
2016-04-14T05:01:02
Java
UTF-8
Java
false
false
1,320
java
/** * Copyright 2012 * Rolf-Helge Pfeiffer (IT University Copenhagen) * Jan Reimann (TU Dresden, Software Technology Group) * Mirko Seifert (DevBoost GmbH) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package dk.itu.sdg.language.xwpf.resource.xwpf; public interface IXwpfHoverTextProvider { /** * Returns the hoves text that is shown when the mouse pointer rests over the * given object. The hover text can contain HTML. */ public String getHoverText(org.eclipse.emf.ecore.EObject object); /** * Returns the hoves text that is shown when the mouse pointer rests over a * reference to the given object. The hover text can contain HTML. */ public String getHoverText(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EObject referencedObject); }
09dbe2afb4fa2b4cb623fa9cf1c4e7320240c1ed
1a01f79f50066c6faf3718b541bd7c7c5fa63f1f
/minecraft_server/pixelmon/comm/PixelmonDataPacket.java
1ea0a48f009b22743fd4a96b025a3ddbcd512e1a
[]
no_license
Tashafi/Pixelmon
01a799d470ab4e105538e5df3f91ca582e8ed91c
9b3c8858fc2d3b9db4a621ebffc1b6fc0565776e
refs/heads/master
2020-04-07T19:08:40.778999
2012-07-29T04:37:06
2012-07-29T04:37:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,657
java
package pixelmon.comm; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import pixelmon.database.BaseStats; import pixelmon.database.DatabaseStats; import pixelmon.entities.pixelmon.helpers.PixelmonEntityHelper; import pixelmon.enums.EnumType; import net.minecraft.src.Entity; import net.minecraft.src.EntityLiving; import net.minecraft.src.DataWatcher; import net.minecraft.src.MathHelper; import net.minecraft.src.NBTTagCompound; import net.minecraft.src.Packet; import net.minecraft.src.forge.ISpawnHandler; import net.minecraft.src.forge.IThrowableEntity; import net.minecraft.src.forge.MinecraftForge; import net.minecraft.src.forge.NetworkMod; public class PixelmonDataPacket extends PixelmonPacket { public int modID; public int pokemonID; public int nationalPokedexNumber; public String name; public String nickname; public int lvl; public int hp; public int health; public boolean isMale; public boolean isFainted; public int order; public int numMoves; public EnumType type1; public EnumType type2; public int HP; public int Speed; public int Attack; public int Defence; public int SpecialAttack; public int SpecialDefence; public int nextLvlXP; public int boxNumber=0; public boolean isShiny; public PixelmonMovesetDataPacket[] moveset = new PixelmonMovesetDataPacket[4]; public PixelmonDataPacket() { } public PixelmonDataPacket(NBTTagCompound p, NetworkMod mod, EnumPackets packetType) { this.packetType = packetType; modID = MinecraftForge.getModID(mod); pokemonID = p.getInteger("pixelmonID"); BaseStats b = DatabaseStats.GetBaseStats(p.getString("Name")); nationalPokedexNumber = b.nationalPokedexNumber; name = p.getString("Name"); nickname = p.getString("Nickname"); lvl = p.getInteger("Level"); nextLvlXP = p.getInteger("EXPToNextLevel"); hp = p.getInteger("StatsHP"); health = p.getShort("Health"); isMale = p.getBoolean("IsMale"); isFainted = p.getBoolean("IsFainted"); isShiny = p.getBoolean("IsShiny"); order = p.getInteger("PixelmonOrder"); numMoves = p.getInteger("PixelmonNumberMoves"); for (int i =0; i < numMoves; i++){ moveset[i] = PixelmonMovesetDataPacket.createPacket(p,i); } type1 = b.Type1; type2 = b.Type2; HP = p.getInteger("StatsHP"); Speed = p.getInteger("StatsSpeed"); Attack = p.getInteger("StatsAttack"); Defence = p.getInteger("StatsDefence"); SpecialAttack = p.getInteger("StatsSpecialAttack"); SpecialDefence = p.getInteger("StatsSpecialDefence"); if (p.hasKey("BoxNumber")) boxNumber = p.getInteger("BoxNumber"); } public PixelmonDataPacket(PixelmonEntityHelper p, NetworkMod mod, EnumPackets packetType) { this.packetType = packetType; modID = MinecraftForge.getModID(mod); pokemonID = p.getPokemonId(); nationalPokedexNumber = p.stats.BaseStats.nationalPokedexNumber; name = p.getName(); nickname = p.nickname; lvl = p.getLvl().getLevel(); nextLvlXP = p.getLvl().getExpToNextLevel(); hp = p.stats.HP; health = p.getHealth(); isMale = p.isMale; isFainted = p.isFainted; isShiny = p.getIsShiny(); order = 0; if (p.moveset.size() ==0) p.loadMoveset(); numMoves = p.moveset.size(); for (int i =0; i < numMoves; i++){ moveset[i] = PixelmonMovesetDataPacket.createPacket(p.moveset,i); } type1 = p.getType().get(0); if (p.getType().size()==1) type2 = EnumType.Mystery; else type2 = p.getType().get(1); HP = p.stats.HP; Speed = p.stats.Speed; Attack = p.stats.Attack; Defence = p.stats.Defence; SpecialAttack = p.stats.SpecialAttack; SpecialDefence = p.stats.SpecialDefence; } public void writeData(DataOutputStream data) throws IOException { data.writeInt(modID); data.writeInt(pokemonID); data.writeShort(nationalPokedexNumber); Packet.writeString(name, data); Packet.writeString(nickname, data); data.writeShort(lvl); data.writeShort(nextLvlXP); data.writeShort(hp); data.writeShort(health); data.writeBoolean(isMale); data.writeBoolean(isFainted); data.writeShort(order); data.writeShort(numMoves); for (int i=0; i < numMoves; i++){ moveset[i].writeData(data); } data.writeShort(type1.getIndex()); data.writeShort(type2.getIndex()); data.writeShort(HP); data.writeShort(Speed); data.writeShort(Attack); data.writeShort(Defence); data.writeShort(SpecialAttack); data.writeShort(SpecialDefence); data.writeShort(boxNumber); data.writeBoolean(isShiny); } public void readData(DataInputStream data) throws IOException { modID = data.readInt(); pokemonID = data.readInt(); nationalPokedexNumber = data.readShort(); name = Packet.readString(data, 64); nickname = Packet.readString(data, 64); lvl = data.readShort(); nextLvlXP = data.readShort(); hp = data.readShort(); health = data.readShort(); isMale = data.readBoolean(); isFainted = data.readBoolean(); order = data.readShort(); numMoves = data.readShort(); for (int i=0; i < numMoves; i++){ moveset[i] = new PixelmonMovesetDataPacket(); moveset[i].readData(data); } type1 = EnumType.parseType(data.readShort()); type2 = EnumType.parseType(data.readShort()); HP = data.readShort(); Speed = data.readShort(); Attack = data.readShort(); Defence = data.readShort(); SpecialAttack = data.readShort(); SpecialDefence = data.readShort(); boxNumber = data.readShort(); isShiny = data.readBoolean(); } @Override public int getID() { return packetType.getIndex(); } }
bf09aa16d497c9d5d93429c9f761971e4430e7f6
4f2ed6dd839c6bf3fcc0ba7df0b8a601c17a601b
/include_KLU/app/src/main/java/com/klef/includeklu/de1.java
40b1ade96893f9ec1b021d337d8ef4fc8a9af30f
[]
no_license
hemanth-431/Sample-Android-App-WorkSpace
78addb2bd8921c0dd928af277dfc9200055c4882
a6546d651dde2d403f7983390f1e5395b4b17fe5
refs/heads/master
2023-06-16T03:28:13.142502
2021-07-14T15:42:21
2021-07-14T15:42:21
385,994,765
0
0
null
null
null
null
UTF-8
Java
false
false
323
java
package com.klef.includeklu; import android.os.Bundle; import androidx.appcompat.app.AppCompatActivity; public class de1 extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_de1); } }
513036b47c8ac739892576d2008ed17473d8812b
4e5d61b632c452dafbfbe2bf47cfb1247877c729
/Java Repository/Servlet/src/_08_Listener/request/ServletRequestListenMe.java
1c1bc5853b8ab322dc444912e5de43ff91472b79
[]
no_license
tugcankoparan/Java-EE-Spring-Framework
520c943d472afe6266ddf15ed91dd3120c1768c0
ca565dfd29287b33d61acfe477d6980ad69c0866
refs/heads/master
2020-03-30T11:16:10.432834
2018-10-18T17:19:46
2018-10-18T17:19:46
151,164,255
0
1
null
null
null
null
UTF-8
Java
false
false
468
java
package _08_Listener.request; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class ServletRequestListenMe extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { System.out.println("Check Eclipse Console!"); } }
748b13cd538f34085dee57ecdbcbb45daae93457
445c3cf84dd4bbcbbccf787b2d3c9eb8ed805602
/aliyun-java-sdk-config/src/main/java/com/aliyuncs/config/model/v20190108/GetDiscoveredResourceCountsRequest.java
c0dc35496da09a111e951952f984636bf9ba9167
[ "Apache-2.0" ]
permissive
caojiele/aliyun-openapi-java-sdk
b6367cc95469ac32249c3d9c119474bf76fe6db2
ecc1c949681276b3eed2500ec230637b039771b8
refs/heads/master
2023-06-02T02:30:02.232397
2021-06-18T04:08:36
2021-06-18T04:08:36
172,076,930
0
0
NOASSERTION
2019-02-22T14:08:29
2019-02-22T14:08:29
null
UTF-8
Java
false
false
2,243
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.config.model.v20190108; import com.aliyuncs.RpcAcsRequest; import com.aliyuncs.http.MethodType; import com.aliyuncs.config.Endpoint; /** * @author auto create * @version */ public class GetDiscoveredResourceCountsRequest extends RpcAcsRequest<GetDiscoveredResourceCountsResponse> { private Boolean multiAccount; private String groupByKey; private Long memberId; public GetDiscoveredResourceCountsRequest() { super("Config", "2019-01-08", "GetDiscoveredResourceCounts", "Config"); setMethod(MethodType.GET); try { com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); } catch (Exception e) {} } public Boolean getMultiAccount() { return this.multiAccount; } public void setMultiAccount(Boolean multiAccount) { this.multiAccount = multiAccount; if(multiAccount != null){ putQueryParameter("MultiAccount", multiAccount.toString()); } } public String getGroupByKey() { return this.groupByKey; } public void setGroupByKey(String groupByKey) { this.groupByKey = groupByKey; if(groupByKey != null){ putQueryParameter("GroupByKey", groupByKey); } } public Long getMemberId() { return this.memberId; } public void setMemberId(Long memberId) { this.memberId = memberId; if(memberId != null){ putQueryParameter("MemberId", memberId.toString()); } } @Override public Class<GetDiscoveredResourceCountsResponse> getResponseClass() { return GetDiscoveredResourceCountsResponse.class; } }
0f26723f2ed3c56575d65f9afa157de16d0d1888
4c5b20875aaf3dc3dba56902e1a805d43ef0b3a5
/demo-2.4.16/src/main/java/examples/WebControl.java
5b389b4c4f37dea68629661f1cdfc5095c93ba11
[]
no_license
ev3dev-lang-java/examples
c85e25350569dc790038ed09ef142790a5060b8d
73d207511fa027699b9ad9fcb7223a5418eb2875
refs/heads/master
2021-06-01T17:25:29.684532
2021-04-23T19:55:37
2021-04-23T19:55:37
57,417,352
7
8
null
2021-04-23T19:55:38
2016-04-29T22:49:25
Java
UTF-8
Java
false
false
2,493
java
package examples; import lombok.extern.slf4j.Slf4j; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.*; import java.net.ServerSocket; import java.net.Socket; @Slf4j public class WebControl { //public static Logger LOGGER = LoggerFactory.getLogger(WebControl.class); public static final int PORT = 9000; private ServerSocket ss; private Socket sock; private final DisplayAnimations displayAnimations; public WebControl(DisplayAnimations displayAnimations) throws IOException { LOGGER.info("Creating a simple API"); ss = new ServerSocket(PORT); this.displayAnimations = displayAnimations; } public void run() throws IOException { for (;;) { sock = ss.accept(); InputStream is = sock.getInputStream(); OutputStream os = sock.getOutputStream(); BufferedReader br = new BufferedReader(new InputStreamReader(is)); PrintStream ps = new PrintStream(os); for (;;) { String cmd = br.readLine(); if (cmd == null) break; String reply = execute(cmd); if (reply != null) ps.println(reply); else { br.close(); ps.close(); break; } } } } public String execute(String cmd) { String[] tokens = cmd.split(" "); if (tokens.length > 1 && tokens[0].equals("GET")) { if (tokens[1].equals("/stop")) { LOGGER.info("{}", tokens[1]); System.exit(0); } else if (tokens[1].equals("/left")) { LOGGER.info("{}", tokens[1]); displayAnimations.sin(); displayAnimations.clear(); displayAnimations.showJavaLogo(); } else if (tokens[1].equals("/right")) { LOGGER.info("{}", tokens[1]); displayAnimations.sin2(); displayAnimations.clear(); displayAnimations.showJavaLogo(); } return "HTTP/1.1 200 OK\r\n\r\n" + readFile() + "\r\n"; } return null; } private String readFile() { StringBuffer document = new StringBuffer(); try { InputStream in = this.getClass().getClassLoader().getResourceAsStream("index.html"); BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(in), 1); String line; while ((line = bufferedReader.readLine()) != null) { document.append(line); } in.close(); }catch (IOException io) { LOGGER.error(io.getLocalizedMessage()); } return document.toString(); } }
fdf2dff590e2e838885b7b0d294f88e8f6fa2234
2d3542fae28c21e5b635b4ecf3b5a24fdf3f1e7a
/DictionaryPro/src/main/java/com/dictionary/codebhak/data/subdict/SubdictSection.java
12efb671f5f2381d004d3dfde86dddb8299d0f53
[ "Apache-2.0" ]
permissive
basriumar12/DictionaryOpenSource
70c76b49409bbe8b272995a91579fb5803845d2b
1beab3a82fe8862892efc11885ba22b4237e3a7b
refs/heads/master
2020-04-24T07:34:38.036144
2019-02-21T05:02:30
2019-02-21T05:02:30
171,803,072
1
0
null
null
null
null
UTF-8
Java
false
false
1,871
java
package com.dictionary.codebhak.data.subdict; import java.util.LinkedList; /** * A class to hold data for a section of the Overview of Lang Subdict text. * <p> * Each section contains a heading and some intro text followed by a series of list items. */ public class SubdictSection { private String mHeading = "heading"; private String mIntro = "intro"; private final LinkedList<String> mList; // Represents bulleted list of items. /* NOTE: I'm leaving the construction of the string with formatting information to the XML * parser here. This is easier, but it would be cleaner to do all of the text construction * here. On the other hand, the parser and this class are so closely coupled that this might * not be a problem. */ /** * Class constructor. */ public SubdictSection() { mList = new LinkedList<>(); } /** * Returns a string containing HTML formatting tags. * * @return a string containing HTML formatting tags */ @Override public String toString() { StringBuilder buffer = new StringBuilder(); buffer.append("<em>"); buffer.append(mHeading); buffer.append("</em><br><br>"); buffer.append(mIntro); /* TODO: Improve list. Subsequent paragraphs don't align at the moment. * May need to use spans to do this. */ for (String item : mList) { buffer.append("&#8226 "); // Add a bullet buffer.append(item); } return buffer.toString(); } public void setHeading(String heading) { this.mHeading = heading; } public void setIntro(String intro) { this.mIntro = intro; } public void addListItem(String item) { mList.add(item); } public String getHeading() { return mHeading; } }
d5075351f93e03980b87eb800b8e0d8428b355f7
c3101515ddde8a6e6ddc4294a4739256d1600df0
/GeneralApp__2.20_1.0(1)_source_from_JADX/sources/com/google/android/gms/measurement/internal/zzo.java
4a0b742c38eb0e4727cf0077f8ae1331cbd23d79
[]
no_license
Aelshazly/Carty
b56fdb1be58a6d12f26d51b46f435ea4a73c8168
d13f3a4ad80e8a7d0ed1c6a5720efb4d1ca721ee
refs/heads/master
2022-11-14T23:29:53.547694
2020-07-08T19:23:39
2020-07-08T19:23:39
278,175,183
0
0
null
null
null
null
UTF-8
Java
false
false
4,594
java
package com.google.android.gms.measurement.internal; import android.os.Parcel; import android.os.Parcelable.Creator; import com.google.android.gms.common.internal.safeparcel.SafeParcelReader; import java.util.List; /* compiled from: com.google.android.gms:play-services-measurement-impl@@17.3.0 */ public final class zzo implements Creator<zzm> { public final /* synthetic */ Object[] newArray(int i) { return new zzm[i]; } public final /* synthetic */ Object createFromParcel(Parcel parcel) { Parcel parcel2 = parcel; int validateObjectHeader = SafeParcelReader.validateObjectHeader(parcel); long j = 0; long j2 = 0; long j3 = 0; long j4 = 0; long j5 = 0; String str = null; String str2 = null; String str3 = null; String str4 = null; String str5 = null; String str6 = null; String str7 = null; Boolean bool = null; List list = null; String str8 = null; long j6 = -2147483648L; boolean z = true; boolean z2 = false; int i = 0; boolean z3 = true; boolean z4 = true; boolean z5 = false; while (parcel.dataPosition() < validateObjectHeader) { int readHeader = SafeParcelReader.readHeader(parcel); switch (SafeParcelReader.getFieldId(readHeader)) { case 2: str = SafeParcelReader.createString(parcel2, readHeader); break; case 3: str2 = SafeParcelReader.createString(parcel2, readHeader); break; case 4: str3 = SafeParcelReader.createString(parcel2, readHeader); break; case 5: str4 = SafeParcelReader.createString(parcel2, readHeader); break; case 6: j = SafeParcelReader.readLong(parcel2, readHeader); break; case 7: j2 = SafeParcelReader.readLong(parcel2, readHeader); break; case 8: str5 = SafeParcelReader.createString(parcel2, readHeader); break; case 9: z = SafeParcelReader.readBoolean(parcel2, readHeader); break; case 10: z2 = SafeParcelReader.readBoolean(parcel2, readHeader); break; case 11: j6 = SafeParcelReader.readLong(parcel2, readHeader); break; case 12: str6 = SafeParcelReader.createString(parcel2, readHeader); break; case 13: j3 = SafeParcelReader.readLong(parcel2, readHeader); break; case 14: j4 = SafeParcelReader.readLong(parcel2, readHeader); break; case 15: i = SafeParcelReader.readInt(parcel2, readHeader); break; case 16: z3 = SafeParcelReader.readBoolean(parcel2, readHeader); break; case 17: z4 = SafeParcelReader.readBoolean(parcel2, readHeader); break; case 18: z5 = SafeParcelReader.readBoolean(parcel2, readHeader); break; case 19: str7 = SafeParcelReader.createString(parcel2, readHeader); break; case 21: bool = SafeParcelReader.readBooleanObject(parcel2, readHeader); break; case 22: j5 = SafeParcelReader.readLong(parcel2, readHeader); break; case 23: list = SafeParcelReader.createStringList(parcel2, readHeader); break; case 24: str8 = SafeParcelReader.createString(parcel2, readHeader); break; default: SafeParcelReader.skipUnknownField(parcel2, readHeader); break; } } SafeParcelReader.ensureAtEnd(parcel2, validateObjectHeader); zzm zzm = new zzm(str, str2, str3, str4, j, j2, str5, z, z2, j6, str6, j3, j4, i, z3, z4, z5, str7, bool, j5, list, str8); return zzm; } }
1ebb6f0d5b16a9e48d7db765bec364350b61ad42
92459cdb854868e182b4c269a0fcbe8d6e3ad117
/src/main/java/com/iandtop/utils/excel/User.java
8ba812eb452c2cec701b7f6c7add71cf300da8a0
[ "Apache-2.0" ]
permissive
hoeoy/wwj
81516361f6154a7d52ff7c1e06f1a122796b5b4e
f89d8e78bd1c50904c2ac8d4cc4ff2f90ee5929c
refs/heads/master
2018-11-23T23:54:16.287744
2018-10-09T07:48:10
2018-10-09T07:48:10
119,341,704
0
0
null
null
null
null
UTF-8
Java
false
false
1,477
java
package com.iandtop.utils.excel; import java.math.BigDecimal; import java.util.Date; /** * Created by lz on 2017/4/12. */ public class User { public User(){ } @Excel(name = "姓名", width = 30) private String name; @Excel(name = "年龄", width = 60) private String age; @Excel(skip = true) private String password; @Excel(name = "xx") private Double xx; @Excel(name = "yy") private Date yy; @Excel(name = "锁定") private Boolean locked; @Excel(name = "金额") private BigDecimal db; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getAge() { return age; } public void setAge(String age) { this.age = age; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public Double getXx() { return xx; } public void setXx(Double xx) { this.xx = xx; } public Date getYy() { return yy; } public void setYy(Date yy) { this.yy = yy; } public Boolean getLocked() { return locked; } public void setLocked(Boolean locked) { this.locked = locked; } public BigDecimal getDb() { return db; } public void setDb(BigDecimal db) { this.db = db; } }
b6db94071140e65579e7438f9159745f9c87c2ae
aa16fbdb35227576bdc3e177c578d001c19428a5
/src/main/java/org/durcframework/autocode/entity/BackUserSch.java
d68d9bce68d1cdd5e49e6404d179439b39b1bb38
[]
no_license
AndyYHL/autoCode
ee11a7e84cfae3962d880f754367de9b812acaba
a3c21de042aa5687e69e4fa8364b93e8c9c42ba7
refs/heads/master
2023-04-27T08:02:13.693929
2023-04-20T02:26:48
2023-04-20T02:26:48
124,502,502
3
0
null
2022-06-20T23:01:57
2018-03-09T07:12:24
JavaScript
UTF-8
Java
false
false
1,033
java
package org.durcframework.autocode.entity; import java.util.Date; import org.durcframework.core.SearchEntity; import org.durcframework.core.expression.annotation.LikeDoubleField; import org.durcframework.core.expression.annotation.ValueField; public class BackUserSch extends SearchEntity{ private String usernameSch; private String passwordSch; private Date addTimeSch; public void setUsernameSch(String usernameSch){ this.usernameSch = usernameSch; } @LikeDoubleField(column = "username") public String getUsernameSch(){ return this.usernameSch; } public void setPasswordSch(String passwordSch){ this.passwordSch = passwordSch; } @ValueField(column = "password") public String getPasswordSch(){ return this.passwordSch; } public void setAddTimeSch(Date addTimeSch){ this.addTimeSch = addTimeSch; } @ValueField(column = "add_time") public Date getAddTimeSch(){ return this.addTimeSch; } }
459f59118a1038041ddfb9d3de404111eaed4328
ffcbd3d2d7e23bc6a811fc8f29ed65d882453c2c
/han-core/src/main/java/org/hanframework/env/annotation/Profile.java
419d666c906f2eec50b46655a33b9a70369d2f95
[ "Apache-2.0", "ICU" ]
permissive
hanframework/han
59c78e8227638b4c82eb1202d68937d70109b78b
4043e5a450ddc6923233ee5326436bcdf5b947a3
refs/heads/master
2022-12-22T21:37:04.635758
2019-10-14T08:59:36
2019-10-14T08:59:36
185,520,022
0
1
Apache-2.0
2022-12-14T20:30:16
2019-05-08T03:19:23
Java
UTF-8
Java
false
false
689
java
package org.hanframework.env.annotation; import java.lang.annotation.*; /** * 在一个应用中可能有多套配置环境。 * 当我们在一个组件中使用@Value注解时候,默认会从已经激活的配置文件中来读取, * 但是也可以通过@Profile来指定。 * * @author liuxin * @version Id: Profile.java, v 0.1 2018-12-13 16:08 * @see Value */ @Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE}) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface Profile { /** * 激活的配置文件名 * * @return 读取配置的文件名 */ String[] value() default "default"; }
95eb21f1753379d00ee6ef9deaa31c194fba1270
b137ef81bb7f355aed2256c07d1b4ab2397269de
/src/main/java/tb/common/itemblock/ItemBlockTBLeaves.java
b91d0ce6d3ab39690493ce4e5c7d64e7bd4ff71e
[ "CC0-1.0", "CC-BY-SA-4.0" ]
permissive
Kiwi233/ThaumicBases
2f649febfc4a73b12e8df8d5607c47ba05505859
654342af75f4240c11180e1f1f0cd7dd5e1a7985
refs/heads/master
2023-06-30T22:28:26.439587
2021-08-02T12:32:22
2021-08-02T12:32:22
266,516,248
0
0
CC0-1.0
2020-05-24T10:18:26
2020-05-24T10:18:25
null
UTF-8
Java
false
false
556
java
package tb.common.itemblock; import tb.common.block.BlockTBLeaves; import net.minecraft.block.Block; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; public class ItemBlockTBLeaves extends ItemBlock{ public ItemBlockTBLeaves(Block b) { super(b); this.setHasSubtypes(true); } public String getUnlocalizedName(ItemStack stk) { return "tile."+BlockTBLeaves.names[Math.min(BlockTBLeaves.names.length-1,stk.getItemDamage()%8)]; } public int getMetadata(int meta) { return meta; } }
85c53ec62a13e87e61689648d30466a35737de63
60c87e28ffb644c45501a20c779077000c77b640
/src/main/java/org/jeecgframework/web/system/service/NoticeAuthorityUserServiceI.java
583bfc2bbf5aff3f010c5920445edcdd96f47bee
[]
no_license
chenzhenguo/nx
3fa76e5e05f7425882382cdfbb1816e2e485f38b
cf19205ea35a7718bc0b71b370b330353df5d956
refs/heads/master
2021-07-22T02:23:45.199383
2017-11-01T13:21:51
2017-11-01T13:21:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,026
java
package org.jeecgframework.web.system.service; import java.io.Serializable; import org.jeecgframework.core.common.service.CommonService; import org.jeecgframework.web.system.pojo.base.TSNoticeAuthorityUser; public abstract interface NoticeAuthorityUserServiceI extends CommonService { public abstract <T> void delete(T paramT); public abstract <T> Serializable save(T paramT); public abstract <T> void saveOrUpdate(T paramT); public abstract boolean doAddSql(TSNoticeAuthorityUser paramTSNoticeAuthorityUser); public abstract boolean doUpdateSql(TSNoticeAuthorityUser paramTSNoticeAuthorityUser); public abstract boolean doDelSql(TSNoticeAuthorityUser paramTSNoticeAuthorityUser); public abstract boolean checkAuthorityUser(String paramString1, String paramString2); } /* Location: D:\用户目录\我的文档\Tencent Files\863916185\FileRecv\nx.zip * Qualified Name: ROOT.WEB-INF.classes.org.jeecgframework.web.system.service.NoticeAuthorityUserServiceI * JD-Core Version: 0.6.2 */
f7b8542d281b247511393a3540e308b4b9936c18
beb903bcbce21195107987e602658f138f2ea48b
/vanstone-centralserver-common/src/main/java/com/vanstone/centralserver/common/weixin/wrap/msg/CCMsg4Text.java
c37fb8e63db8aa0e540425d22233cad22105dc17
[]
no_license
soltex/centralserver
6a47db0e5c9fe33d3ed89cb31c7b2869fffebb35
12a1c8b7638a54551b7a8ae19f7cc767ce21cdd2
refs/heads/master
2016-09-05T23:56:41.543299
2016-01-11T09:47:16
2016-01-11T09:47:16
26,172,552
1
4
null
null
null
null
UTF-8
Java
false
false
1,095
java
/** * */ package com.vanstone.centralserver.common.weixin.wrap.msg; import java.util.LinkedHashMap; import java.util.Map; import com.vanstone.centralserver.common.JsonUtil; /** * 发送文本消息 { "touser":"OPENID", "msgtype":"text", "text": { "content":"Hello World" } } * @author shipeng * */ public class CCMsg4Text extends AbstractCustomerServiceMsg { /**文本消息内容*/ private String content; public CCMsg4Text() { this.setMsgtype(AbstractMsg.COMMON_TYPE_TEXT); } public String getContent() { return content; } public void setContent(String content) { this.content = content; } @Override public String toJson() { Map<String, Object> map = new LinkedHashMap<String, Object>(); map.put("touser", this.getTouser()); map.put("msgtype", this.getMsgtype()); Map<String, Object> textMap = new LinkedHashMap<String, Object>(); textMap.put("content", this.getContent()); map.put("text", textMap); return JsonUtil.object2PrettyString(map,false); } }
a427cdb587d9ed5c3e715b36c6d782ed41a4db14
20ab305409120f5b5441023f754435b4d1938748
/src/main/java/org/blockartistry/mod/ThermalRecycling/machines/entity/NoInventoryComponent.java
3a4d23e69a9cfb80c5aa81b548f5ce6414466381
[ "MIT" ]
permissive
WeCodingNow/ThermalRecycling
360b7f152324856856bde414500686e7eb2f206c
c0b2cbe652e580aa4d563540350b96ba6e27d5dc
refs/heads/master
2021-05-28T15:24:28.814563
2015-05-15T22:46:48
2015-05-15T22:46:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,178
java
/* * This file is part of ThermalRecycling, licensed under the MIT License (MIT). * * Copyright (c) OreCruncher * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package org.blockartistry.mod.ThermalRecycling.machines.entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; public class NoInventoryComponent implements IMachineInventory { @Override public int getSizeInventory() { return 0; } @Override public ItemStack getStackInSlot(int p_70301_1_) { return null; } @Override public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_) { return null; } @Override public ItemStack getStackInSlotOnClosing(int p_70304_1_) { return null; } @Override public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) { } @Override public String getInventoryName() { return "container.empty"; } @Override public boolean hasCustomInventoryName() { return false; } @Override public int getInventoryStackLimit() { return 0; } @Override public void markDirty() { } @Override public boolean isUseableByPlayer(EntityPlayer p_70300_1_) { return false; } @Override public void openInventory() { } @Override public void closeInventory() { } @Override public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) { return false; } @Override public int[] getAccessibleSlotsFromSide(int p_94128_1_) { return null; } @Override public boolean canInsertItem(int p_102007_1_, ItemStack p_102007_2_, int p_102007_3_) { return false; } @Override public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_) { return false; } @Override public void readFromNBT(NBTTagCompound nbt) { } @Override public void writeToNBT(NBTTagCompound nbt) { } @Override public boolean addStackToOutput(ItemStack stack) { return false; } @Override public void dropInventory(World world, int x, int y, int z) { } @Override public boolean isStackAlreadyInSlot(int slot, ItemStack stack) { return false; } }
31b57bdf8f9609ac82b96bf6e1e047168979a936
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_df0387fd856380bbefdbc708d0258dfae2c971a0/TableScrollPane/2_df0387fd856380bbefdbc708d0258dfae2c971a0_TableScrollPane_s.java
7f730da9c5d54ca3e6195aa543f8677832f3b437
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,856
java
package net.karlmartens.ui.widget; import java.awt.Color; import java.awt.Point; import java.awt.event.KeyListener; import java.awt.event.MouseListener; import java.util.Arrays; import java.util.Enumeration; import java.util.TreeSet; import javax.swing.JTable; import javax.swing.table.TableColumn; import javax.swing.table.TableModel; import net.karlmartens.platform.util.UiThreadUtil; import com.jidesoft.grid.AutoFilterTableHeader; import com.jidesoft.grid.CachedTableModel; import com.jidesoft.grid.CellStyleTable; import com.jidesoft.grid.ColumnStripeTableStyleProvider; import com.jidesoft.grid.FilterableTableModel; import com.jidesoft.grid.JideTable; import com.jidesoft.grid.MultiTableModel; import com.jidesoft.grid.SortableTable; import com.jidesoft.grid.SortableTableModel; import com.jidesoft.grid.TableModelWrapperUtils; import com.jidesoft.grid.TableSelectionListener; final class TableScrollPane extends com.jidesoft.grid.TableScrollPane { private static final long serialVersionUID = 1L; TableScrollPane(MultiTableModel model) { super(new FilterableTableModel(new CachedTableModel(model)), true); UiThreadUtil.assertSwingThread(); setAutoscrolls(true); setAllowMultiSelectionInDifferentTable(true); setCellSelectionEnabled(true); setColumnSelectionAllowed(true); setRowSelectionAllowed(true); setHorizontalScrollBarCoversWholeWidth(true); setVerticalScrollBarCoversWholeHeight(true); setKeepCornerVisible(false); setNonContiguousCellSelectionAllowed(true); setWheelScrollingEnabled(true); initHeaderTableOptions(); initSeriesTableOptions(); } public void addTableSelectionListener(TableSelectionListener listener) { ((JideTable)getMainTable()).getTableSelectionModel().addTableSelectionListener(listener); ((JideTable)getRowHeaderTable()).getTableSelectionModel().addTableSelectionListener(listener); } public void removeTableSelectionListener( TableSelectionListener listener) { ((JideTable)getMainTable()).getTableSelectionModel().removeTableSelectionListener(listener); ((JideTable)getRowHeaderTable()).getTableSelectionModel().removeTableSelectionListener(listener); } public void addKeyListener(KeyListener listener) { getMainTable().addKeyListener(listener); getRowHeaderTable().addKeyListener(listener); } public void removeKeyListener(KeyListener listener) { getMainTable().removeKeyListener(listener); getRowHeaderTable().removeKeyListener(listener); } public void addMouseListener(MouseListener listener) { getMainTable().addMouseListener(listener); getRowHeaderTable().addMouseListener(listener); } public void removeMouseListener(MouseListener listener) { getMainTable().removeMouseListener(listener); getRowHeaderTable().removeMouseListener(listener); } public int[] getSelectionIndices() { UiThreadUtil.assertSwingThread(); // retrieve selected indices final int mCount = getMainTable().getSelectedRowCount(); final int hCount = getRowHeaderTable().getSelectedRowCount(); final int[] selected = new int[mCount + hCount]; System.arraycopy(getMainTable().getSelectedRows(), 0, selected, 0, mCount); System.arraycopy(getRowHeaderTable().getSelectedRows(), 0, selected, mCount, hCount); Arrays.sort(selected); // Convert to model index and remove duplicates final TreeSet<Integer> actualSelected = new TreeSet<Integer>(); for (int index : selected) { actualSelected.add(TableModelWrapperUtils.getActualRowAt(getModel(), index)); } // Convert to int array final Integer[] is = actualSelected.toArray(new Integer[] {}); final int[] result = new int[is.length]; for (int i=0; i<is.length; i++) { result[i] = is[i].intValue(); } return result; } public int getRowAt(int x, int y) { final Point mPoint = new Point(x - getMainTable().getX(), y - getMainTable().getY()); int rowIndex = getMainTable().rowAtPoint(mPoint); if (rowIndex < 0) { final Point hPoint = new Point(x - getRowHeaderTable().getX(), y - getRowHeaderTable().getY()); rowIndex = getRowHeaderTable().rowAtPoint(hPoint); } if (rowIndex < 0) return -1; return TableModelWrapperUtils.getActualRowAt(getModel(), rowIndex); } public void scrollToRow(int index) { final int rowIndex = TableModelWrapperUtils.getRowAt(getModel(), index); if (rowIndex < 0) return; scrollToRow(rowIndex); } @Override protected JTable createTable(TableModel model, boolean sortable) { final SortableTableModel sortableModel = (SortableTableModel) model; sortableModel.setAutoResort(false); final SortableTable table = new SortableTable(model); Enumeration<TableColumn> columns = table.getColumnModel().getColumns(); while (columns.hasMoreElements()) columns.nextElement().setMaxWidth(600); final AutoFilterTableHeader header = new AutoFilterTableHeader(table); header.setAutoFilterEnabled(true); header.setShowFilterName(false); header.setShowFilterNameAsToolTip(true); header.setShowFilterIcon(true); table.setTableHeader(header); return table; } private void initHeaderTableOptions() { final CellStyleTable headerTable = (CellStyleTable) getRowHeaderTable(); headerTable.setTableStyleProvider(new ColumnStripeTableStyleProvider( new Color[] { new Color(253, 253, 244) })); } private void initSeriesTableOptions() { final JideTable mainTable = (JideTable) getMainTable(); mainTable.getTableHeader().setReorderingAllowed(false); mainTable.setClickCountToStart(2); } }
0280d49873a2d41f527a00ad11c8e540c2a28b02
4fae46cd30e0e3c42562d61dc2efd3837df55b13
/yesway-pay-order-service/src/main/java/cn/yesway/pay/order/dao/OrdersDao.java
c3323c1c8b68dd9aa4a2bfd1a67072b325dc6eec
[]
no_license
Pancratius/fzt-pay
2b4937e185038909b6d6fde1a9b168a92ce91738
7414615604f9f29860e97c5c07dfd148e009257a
refs/heads/master
2021-10-21T14:01:31.799564
2019-03-04T10:28:32
2019-03-04T10:28:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
620
java
package cn.yesway.pay.order.dao; import java.util.List; import cn.yesway.pay.order.entity.Orders; public interface OrdersDao { int deleteByPrimaryKey(String orderid); int insert(Orders record); int insertSelective(Orders record); List<Orders> selectByPrimaryKey(String outTradeNo); int updateByPrimaryKeySelective(Orders record); int updateByPrimaryKey(Orders record); Orders orderQuery(String outTradeNo); int closeOrder(String outTradeNo); int queryOrdersCount(String outTradeNo); int updateStatusByCode(Orders record); }
40c296ec07c1eea2bd21964cebab29b26e1cd3f2
0c50c4bb815d277369a41b010f5c50a17bbd1373
/Board/app/src/main/java/de/cisha/android/board/video/model/FuzzyEloRange.java
ec1bfcb3307305f2cd10427a249415571e778612
[]
no_license
korkies22/ReporteMoviles
645b830b018c1eabbd5b6c9b1ab281ea65ff4045
e708d4aa313477b644b0485c14682611d6086229
refs/heads/master
2022-03-04T14:18:12.406700
2022-02-17T03:11:01
2022-02-17T03:11:01
157,728,106
0
0
null
null
null
null
UTF-8
Java
false
false
465
java
// // Decompiled by Procyon v0.5.30 // package de.cisha.android.board.video.model; import android.content.res.Resources; public class FuzzyEloRange implements EloRangeRepresentation { private int _stringResId; public FuzzyEloRange(final int stringResId) { this._stringResId = stringResId; } @Override public String getRangeString(final Resources resources) { return resources.getString(this._stringResId); } }
d4f01e8ffea58052159bc2c7688b375960cc2708
b97a2385059daed51b13b097721bebb438313ecd
/app/src/main/java/com/storyshu/storyshu/widget/dialog/LocationDialog.java
f1d4eb60214ec040cd73c4a5a0095c47a85142bc
[]
no_license
Luomingbear/StoryShu
4e181379ed1956a713dbaa315020380d10c5ea9e
0dd5cb47290b87e3c22caabdaaa9c115855538c9
refs/heads/master
2021-01-11T10:06:07.888777
2017-12-06T06:45:25
2017-12-06T06:45:25
77,517,737
0
0
null
null
null
null
UTF-8
Java
false
false
2,850
java
package com.storyshu.storyshu.widget.dialog; import android.content.Context; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.Display; import android.view.WindowManager; import com.amap.api.services.core.PoiItem; import com.storyshu.storyshu.R; import com.storyshu.storyshu.adapter.poi.PoiAdapter; import com.storyshu.storyshu.utils.SysUtils; import java.util.List; /** * 选择位置的弹窗 * Created by bear on 2017/3/29. */ public class LocationDialog extends IBaseDialog { private static final String TAG = "LocationDialog"; private RecyclerView recyclerView; private OnLocationChooseListener onLocationChooseListener; /** * 设置数据并且显示 * * @param poiList */ public void setDataAndShow(final List<PoiItem> poiList, OnLocationChooseListener locationChooseListener) { this.onLocationChooseListener = locationChooseListener; PoiAdapter poiAdapter = new PoiAdapter(getContext(), poiList); Log.i(TAG, "setDataAndShow: 位置是!!!!!+" + poiList); poiAdapter.setPoiItemClickListener(new PoiAdapter.OnPoiItemClickListener() { @Override public void onClick(int position) { if (onLocationChooseListener != null) onLocationChooseListener.onClick(poiList.get(position)); dismiss(); } }); recyclerView.setAdapter(poiAdapter); show(); } public void setOnLocationChooseListener(OnLocationChooseListener onLocationChooseListener) { this.onLocationChooseListener = onLocationChooseListener; } /** * 位置选择的回调 */ public interface OnLocationChooseListener { void onClick(PoiItem poiItem); } public LocationDialog(Context context) { super(context); } public LocationDialog(Context context, int themeResId) { super(context, themeResId); } public LocationDialog(Context context, boolean cancelable, OnCancelListener cancelListener) { super(context, cancelable, cancelListener); } @Override public int getLayoutRes() { return R.layout.choose_poi_layout; } @Override public void initView() { recyclerView = (RecyclerView) findViewById(R.id.choose_location_list); recyclerView.setLayoutManager(new LinearLayoutManager(getContext())); } @Override public void Create() { Display display = SysUtils.getScreenDisplay(getContext()); WindowManager.LayoutParams params = getWindow().getAttributes(); params.width = (int) (display.getWidth() * 0.85f); params.height = (int) (display.getHeight() * 0.85f); getWindow().setAttributes(params); } }
0927690cc3d5daef350d9a8cd989944db871d0e9
66f5b9d0a6ef4c21ebdb2f0bcd82f21594129a60
/Pokecube Core/src/main/java/pokecube/modelloader/client/render/tabula/model/TabulaModelRenderer.java
b950fb12b73308f25e688646aa770d6975d2eb19
[]
no_license
MartijnTielemans/Pokecube
4fee4dd4512fd821c52a91a4ec314b11a8dd1acd
3618d37ca56d9c3df2e3022782fba42bb8e6f751
refs/heads/master
2021-05-31T03:22:47.590067
2016-02-28T13:41:14
2016-02-28T13:41:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,500
java
package pokecube.modelloader.client.render.tabula.model; import org.lwjgl.opengl.GL11; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.entity.RendererLivingEntity; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.client.FMLClientHandler; import pokecube.core.client.render.entity.RenderPokemobs; import pokecube.core.database.PokedexEntry; import pokecube.core.interfaces.IMoveConstants; import pokecube.core.interfaces.IPokemob; import pokecube.modelloader.client.render.model.IModelRenderer; import pokecube.modelloader.client.render.model.IPartTexturer; import pokecube.modelloader.client.render.tabula.TabulaPackLoader; import pokecube.modelloader.client.render.tabula.TabulaPackLoader.TabulaModelSet; import pokecube.modelloader.client.render.tabula.components.ModelJson; import pokecube.modelloader.client.render.tabula.model.tabula.TabulaModel; import pokecube.modelloader.client.render.tabula.model.tabula.TabulaModelParser; public class TabulaModelRenderer<T extends EntityLiving> extends RendererLivingEntity<T> implements IModelRenderer<T> { private String phase = ""; public TabulaModelSet set; private boolean statusRender = false; public TabulaModelRenderer(TabulaModelSet set) { super(Minecraft.getMinecraft().getRenderManager(), null, 0); this.set = set; } @Override public void doRender(T entity, double d, double d1, double d2, float f, float partialTick) { PokedexEntry entry = null; if (entity instanceof IPokemob) entry = ((IPokemob) entity).getPokedexEntry(); else return; float f2 = this.interpolateRotation(entity.prevRenderYawOffset, entity.renderYawOffset, partialTick); float f3 = this.interpolateRotation(entity.prevRotationYawHead, entity.rotationYawHead, partialTick); float f4; if (entity.isRiding() && entity.ridingEntity instanceof EntityLivingBase) { EntityLivingBase entitylivingbase1 = (EntityLivingBase) entity.ridingEntity; f2 = this.interpolateRotation(entitylivingbase1.prevRenderYawOffset, entitylivingbase1.renderYawOffset, partialTick); f4 = MathHelper.wrapAngleTo180_float(f3 - f2); if (f4 < -85.0F) { f4 = -85.0F; } if (f4 >= 85.0F) { f4 = 85.0F; } f2 = f3 - f4; if (f4 * f4 > 2500.0F) { f2 += f4 * 0.2F; } } f4 = this.handleRotationFloat(entity, partialTick); if (set == null) { System.err.println(entry); set = TabulaPackLoader.modelMap.get(entry.baseForme); } TabulaModel model = set.model; IModelParser<TabulaModel> parser = set.parser; if (model == null || parser == null) { return; } GlStateManager.pushMatrix(); GlStateManager.disableCull(); TabulaModelParser pars = ((TabulaModelParser) parser); ModelJson modelj = pars.modelMap.get(model); if (!statusRender) modelj.texturer = set.texturer; else modelj.texturer = null; if (set.animator != null) { phase = set.animator.modifyAnimation(entity, partialTick, phase); } boolean inSet = false; if (modelj.animationMap.containsKey(phase) || (inSet = set.loadedAnimations.containsKey(phase))) { if (!inSet) modelj.startAnimation(phase); else modelj.startAnimation(set.loadedAnimations.get(phase)); } else if (modelj.isAnimationInProgress()) { modelj.stopAnimation(); } GlStateManager.rotate(180f, 0f, 0f, 1f); GlStateManager.rotate(entity.rotationYaw + 180, 0, 1, 0); set.rotation.rotations.glRotate(); GlStateManager.translate(set.shift.x, set.shift.y, set.shift.z); GlStateManager.scale(set.scale.x, set.scale.y, set.scale.z); parser.render(model, entity); GlStateManager.enableCull(); GlStateManager.popMatrix(); } @Override protected ResourceLocation getEntityTexture(T entity) { return RenderPokemobs.getInstance().getEntityTexturePublic(entity); } @Override public void setPhase(String phase) { this.phase = phase; } @Override public void renderStatus(T entity, double d0, double d1, double d2, float f, float partialTick) { IPokemob pokemob = (IPokemob) entity; byte status; if ((status = pokemob.getStatus()) == IMoveConstants.STATUS_NON) return; ResourceLocation texture = null; if (status == IMoveConstants.STATUS_FRZ) { texture = FRZ; } else if (status == IMoveConstants.STATUS_PAR) { texture = PAR; } if (texture == null) return; FMLClientHandler.instance().getClient().renderEngine.bindTexture(texture); float time = (((Entity) pokemob).ticksExisted + partialTick); GL11.glPushMatrix(); float speed = status == IMoveConstants.STATUS_FRZ ? 0.001f : 0.005f; GL11.glMatrixMode(GL11.GL_TEXTURE); GL11.glLoadIdentity(); float var5 = time * speed; float var6 = time * speed; GL11.glTranslatef(var5, var6, 0.0F); GL11.glMatrixMode(GL11.GL_MODELVIEW); float var7 = status == IMoveConstants.STATUS_FRZ ? 0.5f : 1F; GL11.glColor4f(var7, var7, var7, 0.5F); var7 = status == IMoveConstants.STATUS_FRZ ? 1.08f : 1.05F; GL11.glScalef(var7, var7, var7); preRenderStatus(); doRender(entity, d0, d1, d2, f, partialTick); postRenderStatus(); GL11.glMatrixMode(GL11.GL_TEXTURE); GL11.glLoadIdentity(); GL11.glMatrixMode(GL11.GL_MODELVIEW); GL11.glPopMatrix(); } boolean blend; boolean light; int src; int dst; private void preRenderStatus() { blend = GL11.glGetBoolean(GL11.GL_BLEND); light = GL11.glGetBoolean(GL11.GL_LIGHTING); src = GL11.glGetInteger(GL11.GL_BLEND_SRC); dst = GL11.glGetInteger(GL11.GL_BLEND_DST); GL11.glEnable(GL11.GL_BLEND); GL11.glDisable(GL11.GL_LIGHTING); GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE); statusRender = true; } private void postRenderStatus() { if (light) GL11.glEnable(GL11.GL_LIGHTING); if (!blend) GL11.glDisable(GL11.GL_BLEND); GL11.glBlendFunc(src, dst); statusRender = false; } @Override public IPartTexturer getTexturer() { return set.texturer; } @Override public boolean hasPhase(String phase) { ModelJson modelj = null; if (set != null) modelj = set.parser.modelMap.get(set.model); return set.loadedAnimations.containsKey(phase) || (modelj != null && modelj.animationMap.containsKey(phase)); } }
68baed3f888d86e2dc798d18e20a27a7dd116e20
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/13/13_19c6fac79b7d7ee4374582136eb9dba4a281e819/WaterFeature/13_19c6fac79b7d7ee4374582136eb9dba4a281e819_WaterFeature_s.java
30e66d809a973b3b5956200630ddb443c834361a
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,138
java
/******************************************************************************* * Copyright (c) 2013 RiverBaSim - River Basin scenario Simulator * * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Luis Oliva - Created class and main functionalities ******************************************************************************/ package riverbasim; import java.util.HashMap; import repast.simphony.engine.environment.RunEnvironment; /** * This class represents the data structure describing a feature of water * (e.g., amount, solid concentration...). It is used internally to implement * a basic structure to store historical data about a feature, thus allowing * decoupling agents logic with regards to the order of execution of their behaviors * @author Luis * */ public class WaterFeature { private HashMap<Integer,Double> feature; public WaterFeature(Number tick, Double amount){ this.feature = new HashMap<Integer, Double>(); this.feature.put(0, amount); this.feature.put(tick.intValue(), amount); this.feature.put(tick.intValue()+1, amount); } public WaterFeature(){ this.feature = new HashMap<Integer, Double>(); } public HashMap<Integer,Double> getFeature(){ return this.feature; } public Double get(Integer tick){ return this.feature.get(tick); } public void put(Integer tick, Double amount){ this.feature.put(tick, amount); } public String toString(){ /* Set<Integer> keys = this.feature.keySet(); Iterator<Integer> itr = keys.iterator(); String result = ""; while (itr.hasNext()){ Integer tick = itr.next(); result += tick+":"+this.feature.get(tick)+"|"; } return result; */ Double tick = RunEnvironment.getInstance().getCurrentSchedule().getTickCount(); String result = this.feature.get(tick.intValue()).toString(); return result; } }
9aa96add4c17987d71f237bab8c61b6db2dd0a03
ce0e785348eccfbe071648e1a32ba7b9b74ead60
/exchange-restweb-starter/src/main/java/com/gop/web/base/controlleradvice/FaultBarrier.java
0628e2f6902e597447bc26818361d5a960111651
[]
no_license
littleOrange8023/market
0c279e8dd92db4dd23e20aeff037e4b2998f9e0e
093ce8850624061bb6e51dd064b606c82fccbadd
refs/heads/master
2020-04-19T11:05:11.191298
2019-01-25T07:04:27
2019-01-25T07:04:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,190
java
package com.gop.web.base.controlleradvice; import java.util.Locale; import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.http.converter.HttpMessageNotReadableException; import org.springframework.web.HttpRequestMethodNotSupportedException; import org.springframework.web.bind.MethodArgumentNotValidException; import org.springframework.web.bind.MissingPathVariableException; import org.springframework.web.bind.MissingServletRequestParameterException; import org.springframework.web.bind.UnsatisfiedServletRequestParameterException; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException; import org.springframework.web.servlet.NoHandlerFoundException; import com.google.common.collect.ImmutableMap; import com.gop.code.consts.CommonCodeConst; import com.gop.conetxt.WebApiResponseFactory; import com.gop.exception.AppException; import lombok.extern.slf4j.Slf4j; @Slf4j @ControllerAdvice public class FaultBarrier { @Autowired @Qualifier("webApiResponseFactory") WebApiResponseFactory webApiResponseFactory; private static final ImmutableMap<Class<? extends Throwable>, String> EXCEPTION_MAPPINGS; static { final ImmutableMap.Builder<Class<? extends Throwable>, String> builder = ImmutableMap.builder(); // SpringMVC中参数类型转换异常,常见于String找不到对应的ENUM而抛出的异常 builder.put(UnsatisfiedServletRequestParameterException.class, CommonCodeConst.FIELD_ERROR); builder.put(IllegalArgumentException.class, CommonCodeConst.FIELD_ERROR); // HTTP Request Method不存在 builder.put(NoHandlerFoundException.class, CommonCodeConst.INVALID_REQUEST); builder.put(MethodArgumentNotValidException.class, CommonCodeConst.FIELD_ERROR); builder.put(HttpRequestMethodNotSupportedException.class, CommonCodeConst.FIELD_ERROR); builder.put(MissingServletRequestParameterException.class, CommonCodeConst.FIELD_ERROR); builder.put(MissingPathVariableException.class, CommonCodeConst.FIELD_ERROR); builder.put(MethodArgumentTypeMismatchException.class, CommonCodeConst.FIELD_ERROR); // 要求有RequestBody的地方却传入了NULL builder.put(HttpMessageNotReadableException.class, CommonCodeConst.FIELD_ERROR); // 其他未被发现的异常 builder.put(Exception.class, CommonCodeConst.FIELD_ERROR); EXCEPTION_MAPPINGS = builder.build(); } @ExceptionHandler(AppException.class) @ResponseBody public Object exp(HttpServletRequest request, AppException ex) { Locale locale = LocaleContextHolder.getLocale(); try { /**原来的代码逻辑里不会返回异常信息*/ // if (StringUtils.isNotBlank(ex.getMessage())){ // return webApiResponseFactory.get(ex.getErrCode(), ex.getAttach(), ex.getMessage()); // } return webApiResponseFactory.get(ex.getErrCode(), ex.getFormat(), ex.getAttach(), locale); } catch (Exception e) { log.error("获取错误代码异常:", e); return webApiResponseFactory.get(CommonCodeConst.SERVICE_ERROR, null, null, locale); } } @ExceptionHandler(Exception.class) @ResponseBody public Object noHandlerexp(HttpServletRequest request, Exception ex) { String url = ""; url += request.getServletPath(); if (request.getQueryString() != null) { url += "?" + request.getQueryString(); } Locale locale = LocaleContextHolder.getLocale(); String code = EXCEPTION_MAPPINGS.get(ex.getClass()); if (null != code) { return webApiResponseFactory.get(code, null, null, locale); } log.error("发现没有处理的异常url:{},e:{}", url, ex); log.error("stack", ex); return webApiResponseFactory.get(CommonCodeConst.SERVICE_ERROR, null, null, locale); } }
f9c0559ea4155bad5f1e1abfbda6fd09c7a045ef
08a3d3ec5c8aef609c66ccd052f51f8e84e47f22
/febs-gateway/src/main/java/cc/mrbird/febs/gateway/enhance/service/RouteLogService.java
d6bf8ff68c08a1ac119644f05564c32e3be60531
[ "Apache-2.0" ]
permissive
wx7614140/FEBS-Cloud
4be3e36708fab687ba520973182c1629783350a4
82640fefe5c674116f237021da2d6fccfbcc7bae
refs/heads/master
2021-09-23T18:21:24.010334
2021-09-10T06:23:50
2021-09-10T06:23:50
207,196,363
2
0
Apache-2.0
2020-10-31T12:40:06
2019-09-09T01:08:50
Java
UTF-8
Java
false
false
1,132
java
package cc.mrbird.febs.gateway.enhance.service; import cc.mrbird.febs.common.core.entity.QueryRequest; import cc.mrbird.febs.gateway.enhance.entity.RouteLog; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** * @author MrBird */ public interface RouteLogService { /** * 查找所有路由日志 * * @return 路有日志列表 */ Flux<RouteLog> findAll(); /** * 创建路由日志 * * @param routeLog 路由日志 * @return 路由日志 */ Mono<RouteLog> create(RouteLog routeLog); /** * 删除路由日志 * * @param ids 路由日志id * @return 被删除的路由日志 */ Flux<RouteLog> delete(String ids); /** * 查找路由日志分页数据 * * @param request request * @param routeLog routeLog * @return 路由日志分页数据 */ Flux<RouteLog> findPages(QueryRequest request, RouteLog routeLog); /** * 查找路由分页数据count * * @param routeLog routeLog * @return count */ Mono<Long> findCount(RouteLog routeLog); }
0dd5a064a7032ed82ff1c3fac448ebbe2142418e
2b3f6663a28f129b679d6e73f23ef82eeca08db4
/src/ficherosDirectorio/A1_159_AccesoFicheros.java
4971422cc720e6c2ad0d341ca7c91a0f5e9b8dd8
[]
no_license
AxelCCp/JAVA5-PILDORAS-INFORMATICAS-STREAMS
7e67db5344d5b62d523b09c35d5da7e30f506ff8
ee1d25ed34f2739264a73fd659a16ab42c7a4705
refs/heads/master
2023-03-06T03:15:34.833688
2021-02-17T20:01:48
2021-02-17T20:01:48
339,841,735
0
0
null
null
null
null
ISO-8859-1
Java
false
false
1,207
java
package ficherosDirectorio; import java.io.File; public class A1_159_AccesoFicheros { public static void main(String[]args) { //VER UNA LISTA DE ARCHIVOS QUE HAY EN UN DIRECTORIO. File ruta = new File("C:/Users/Fantasma/OneDrive/1.-DOCUMENTOS/1.-CURSOS"); //NOS DEVUELVE LA RUTA ESPECIFICADA System.out.println(ruta.getAbsolutePath()); //list() NOS DEVUELVE UN ARRAY DE STRINGS, CON LOS NOMBRES DE LAS CARPETAS Y ARCHIVOS QUE ESTÁN EN LA RUTA ESPECIFICADA. String[]nombresArchivos=ruta.list(); //IMPRIMIMOS LOS ARCHIVOS CON UN FOR for(int i=0;i<nombresArchivos.length;i++) { System.out.println(""); System.out.println(nombresArchivos[i]); //CREAMOS UNA NUEVA INSTANCIA DE FILE, PARA VER LOS ARCHIVOS QUE PUEDEN HABER EN UN DIRECTORIO. //EL 1ER PARÁMETRO NOS DEVUELVE LA RUTA Y EL 2DO PARÁMETRO EXAMINA LOS ARCHIVOS File f = new File(ruta.getAbsolutePath(), nombresArchivos[i]); //LE PREGUNTAMOS A JAVA, SI ENTRE LOS ARCHIVOS EXAMINADOS HAY ALGÚN DIRECTORIO. if(f.isDirectory()) { String[]subcarpetas = f.list(); for(int j=0; j<subcarpetas.length;j++) { System.out.println(" " + subcarpetas[j]); } } } } }
02d60c718516d778b42b2f7ca6d230e02abfee64
00aedf19d85690033544d35f10841d8838c38ed3
/ProductIOManager/src/business/Product.java
08343089e4ba1d49502cd826f2628e66ea2bb7f2
[]
no_license
sean-blessing/java-instruction-bc201901
a8bd0bb29490dd856ff2776b6b460c96f106140b
11cc2d14e8181c064a56bfb6f9fd4f1a4d3ae925
refs/heads/master
2020-05-16T19:24:40.560070
2019-05-22T20:43:25
2019-05-22T20:43:25
183,259,228
0
1
null
null
null
null
UTF-8
Java
false
false
1,488
java
package business; public class Product { private String code; private String description; private double price; public Product() { code = ""; description = ""; price = 0.0; } // we wrote this one in class public Product(String inCode, String inDesc, double inPrice) { code = inCode; description = inDesc; price = inPrice; } // this constructor was generated by eclipse // public Product(String code, String description, double price) { // this.code = code; // this.description = description; // this.price = price; // } // I wrote this getter/setter // public String getCode() { // return code; // } // // public void setCode(String c) { // code = c; // } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public double getPrice() { return price; } public void setPrice(double price) { this.price = price; } @Override public String toString() { return "Product [code=" + code + ", description=" + description + ", price=" + price + "]"; } public static void aStaticMethod() { System.out.println("an arbitrary static method"); } @Override public boolean equals(Object obj) { // TODO Auto-generated method stub return super.equals(obj); } }
9f329045843e31bf8460a1ee6fb1fd8578e5d8a8
70375ad64773d74e8882e45b2f7351b7739fa629
/src/test/java/org/apache/ibatis/submitted/call_setters_on_nulls_again/MyBatisTest.java
0d2855f7534315eb4e1c6a42e8e373abaab896ca
[ "Apache-2.0", "BSD-3-Clause" ]
permissive
yangfancoming/mybatis
104e64e3f1659ebe1228413f16c4a373e8bedd1c
7cd9c6093a608a0e0da32155e75d1fddd090c8d5
refs/heads/master
2022-09-22T21:09:10.430995
2021-05-30T10:37:34
2021-05-30T10:37:34
195,225,348
0
0
Apache-2.0
2022-09-08T01:01:18
2019-07-04T11:00:52
Java
UTF-8
Java
false
false
970
java
package org.apache.ibatis.submitted.call_setters_on_nulls_again; import org.apache.ibatis.io.Resources; import org.apache.ibatis.session.SqlSession; import org.apache.ibatis.session.SqlSessionFactory; import org.apache.ibatis.session.SqlSessionFactoryBuilder; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import java.io.Reader; class MyBatisTest { private static SqlSessionFactory sqlSessionFactory; @BeforeAll static void setUp() throws Exception { try (Reader reader = Resources.getResourceAsReader("org/apache/ibatis/submitted/call_setters_on_nulls_again/mybatis-config.xml")) { sqlSessionFactory = new SqlSessionFactoryBuilder().build(reader); } } @Test void test() { try (SqlSession session = sqlSessionFactory.openSession()) { ParentBean parentBean = session.selectOne("test"); Assertions.assertEquals("p1", parentBean.getName()); } } }
02f6923bb0d9091ff9725fb76bc4c9d60ebc17bc
a07f5ac20bec8e0daa33f7d157035907d1ba1440
/bizcore/WEB-INF/demodata_core_src/com/test/demodata/formaction/FormActionManagerException.java
b3229ea6a14af68bc836cc729b6182639e0ec45c
[]
no_license
retail-ecommerce/demodata-biz-suite
8da63ae11ce5effe644840f91d3aa94b9a51346b
a4325887a5abcad9ec78273235bfad29b6c13334
refs/heads/master
2020-07-13T09:04:34.887504
2019-02-21T09:42:59
2019-02-21T09:42:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
562
java
package com.test.demodata.formaction; //import com.test.demodata.EntityNotFoundException; import com.test.demodata.DemodataException; import com.test.demodata.Message; import java.util.List; public class FormActionManagerException extends DemodataException { private static final long serialVersionUID = 1L; public FormActionManagerException(String string) { super(string); } public FormActionManagerException(Message message) { super(message); } public FormActionManagerException(List<Message> messageList) { super(messageList); } }
59cc83f3e910ee7ee4bbbb72c5b321f207389806
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/2/org/jfree/chart/axis/CategoryAxis_refreshTicks_1082.java
1bde4daef3e3c29bc0beaa700e1fd5c3d01a3d09
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
3,342
java
org jfree chart axi axi displai categori categori axi categoryaxi axi cloneabl serializ creat temporari list tick draw axi param graphic devic font measur param state axi state param data area dataarea area insid ax param edg locat axi list tick list refresh tick refreshtick graphics2 graphics2d axi state axisst state rectangle2 rectangle2d data area dataarea rectangl edg rectangleedg edg list tick java util arrai list arraylist saniti check data area data area dataarea height getheight data area dataarea width getwidth tick categori plot categoryplot plot categori plot categoryplot plot getplot list categori plot categori axi getcategoriesforaxi max categori categori label posit categorylabelposit posit categori label posit categorylabelposit label posit getlabelposit edg maximum categori label width ratio maximumcategorylabelwidthratio posit width ratio getwidthratio posit width type getwidthtyp categori label width type categorylabelwidthtyp categori calcul categori size calculatecategorys categori size data area dataarea edg rectangl edg rectangleedg left isleftorright edg data area dataarea width getwidth data area dataarea height getheight categori index categoryindex iter iter categori iter iter hasnext compar categori compar iter set font setfont tick label font getticklabelfont categori text block textblock label creat label createlabel categori edg edg rectangl edg rectangleedg top edg rectangl edg rectangleedg bottom max math max max calcul text block height calculatetextblockheight label posit edg rectangl edg rectangleedg left edg rectangl edg rectangleedg max math max max calcul text block width calculatetextblockwidth label posit tick tick categori tick categorytick categori label posit label anchor getlabelanchor posit rotat anchor getrotationanchor posit angl getangl tick add tick categori index categoryindex categori index categoryindex state set max setmax max tick
2e0b3f46155a197fe75e73eba4c2810862ab64e4
3219d84e62ef3d5cc4bb30014e6d7e6f9e0c60e0
/src/main/java/com/zzz/designPatterns/prototype/Main.java
8d261eceeb951e7f5578a8bfa8aa0bec7c5624f6
[]
no_license
KeKeKuKi/DesignPatterns
59f7bf92e4b1b16e116ba7f2586c34c3d954a8c1
1c312ce7bcd8494d1e62a48214f4616eb06c4f17
refs/heads/main
2023-06-25T01:33:41.975775
2021-08-02T01:23:00
2021-08-02T01:23:00
391,781,660
1
0
null
null
null
null
UTF-8
Java
false
false
3,304
java
package com.zzz.designPatterns.prototype; import java.util.Date; /** * @author ZhaoZezhong * date 2021/7/28 18:37 * * 原型模式 * * 意图:用原型实例指定创建对象的种类,并且通过拷贝这些原型创建新的对象。 * 主要解决:在运行期建立和删除原型。 * 何时使用: * 1、当一个系统应该独立于它的产品创建,构成和表示时。 * 2、当要实例化的类是在运行时刻指定时,例如,通过动态装载。 * 3、为了避免创建一个与产品类层次平行的工厂类层次时。 * 4、当一个类的实例只能有几个不同状态组合中的一种时。建立相应数目的原型并克隆它们可能比每次用合适的状态手工实例化该类更方便一些。 * 如何解决:利用已有的一个原型对象,快速地生成和原型对象一样的实例。 * 关键代码: * 1、实现克隆操作,在 JAVA 继承 Cloneable,重写 clone(),实现深拷贝 * 2、原型模式同样用于隔离类对象的使用者和具体类型(易变类)之间的耦合关系,它同样要求这些"易变类"拥有稳定的接口。 * 应用实例: 1、细胞分裂。 2、JAVA 中的 Object clone() 方法。 * 优点: 1、性能提高。 2、逃避构造函数的约束。 * 缺点: * 1、配备克隆方法需要对类的功能进行通盘考虑,这对于全新的类不是很难,但对于已有的类不一定很容易, * 特别当一个类引用不支持串行化的间接对象,或者引用含有循环结构的时候。 * 2、必须实现 Cloneable 接口。 * 使用场景: * 1、资源优化场景。 * 2、类初始化需要消化非常多的资源,这个资源包括数据、硬件资源等。 * 3、性能和安全要求的场景。 * 4、通过 new 产生一个对象需要非常繁琐的数据准备或访问权限,则可以使用原型模式。 * 5、一个对象多个修改者的场景。 * 6、一个对象需要提供给其他对象访问,而且各个调用者可能都需要修改其值时,可以考虑使用原型模式拷贝多个对象供调用者使用。 * 7、在实际项目中,原型模式很少单独出现,一般是和工厂方法模式一起出现,通过 clone 的方法创建一个对象,然后由工厂方法提供给调用者。 * 原型模式已经与 Java 融为浑然一体,大家可以随手拿来使用。 * 注意事项: * 与通过对一个类进行实例化来构造新对象不同的是,原型模式是通过拷贝一个现有对象生成新对象的。 * 浅拷贝实现 Cloneable,重写,深拷贝是通过实现 Serializable 读取二进制流。 */ public class Main { public static void main(String[] args) throws CloneNotSupportedException { Video video = new Video(); video.setName("hello"); video.setCreatedDate(new Date(54654544)); Video video1 = (Video)video.clone(); System.out.println("video :" + video.toString()); System.out.println("video1 :" + video1.toString()); video.setCreatedDate(new Date(11111)); System.out.println("------------------------"); System.out.println("video :" + video.toString()); System.out.println("video1 :" + video1.toString()); } }
e6d8ac3393275f6f71a580f0d515572fae8a0aa4
750915fe2d94e2f7b5bc3470de5a310450045aca
/feature/setting/touchcapture/src/com/freeme/camera/feature/setting/touchcapture/TouchCaptureSettingView.java
a16b6fd8ffb4949b0ca1b022b22a1ee5800ba574
[]
no_license
AllenZhang2019/Camera2-refect
8e1533042898711391e7217fb03482b501ade68a
f029e6eb9f561c9ce560104d72a1a6c5e9fde93e
refs/heads/master
2021-01-02T15:56:54.630751
2018-10-15T02:11:43
2018-10-15T02:11:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,529
java
/* * Copyright Statement: * * This software/firmware and related documentation ("MediaTek Software") are * protected under relevant copyright laws. The information contained herein is * confidential and proprietary to MediaTek Inc. and/or its licensors. Without * the prior written permission of MediaTek inc. and/or its licensors, any * reproduction, modification, use or disclosure of MediaTek Software, and * information contained herein, in whole or in part, shall be strictly * prohibited. * * MediaTek Inc. (C) 2016. All rights reserved. * * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER * ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL * WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR * NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH * RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, * INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES * TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. * RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO * OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK * SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE * RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S * ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE * RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE * MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE * CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. * * The following software/firmware and/or related documentation ("MediaTek * Software") have been modified by MediaTek Inc. All revisions are subject to * any receiver's applicable license agreements with MediaTek Inc. */ package com.freeme.camera.feature.setting.touchcapture; import android.preference.Preference; import android.preference.PreferenceFragment; import android.preference.PreferenceGroup; import com.freeme.camera.R; import com.freeme.camera.common.debug.LogHelper; import com.freeme.camera.common.debug.LogUtil; import com.freeme.camera.common.preference.SwitchPreference; import com.freeme.camera.common.setting.ICameraSettingView; import java.util.List; /** * EIS setting view. */ public class TouchCaptureSettingView implements ICameraSettingView { private static final LogUtil.Tag TAG = new LogUtil.Tag(TouchCaptureSettingView.class.getSimpleName()); private OnVolumeCaptureClickListener mListener; private SwitchPreference mPref; private boolean mChecked; private String mKey; private boolean mEnabled; /** * Listener to listen zsd is clicked. */ public interface OnVolumeCaptureClickListener { /** * Callback when zsd item is clicked by user. * * @param checked True means zsd is opened, false means zsd is closed. */ void onVolumeCaptureClicked(boolean checked); } /** * Zsd setting view constructor. * * @param key The key of setting. */ public TouchCaptureSettingView(String key) { mKey = key; } @Override public void loadView(PreferenceFragment fragment) { fragment.addPreferencesFromResource(R.xml.touch_capture_preference); mPref = (SwitchPreference) fragment.findPreference(mKey); mPref.setRootPreference(fragment.getPreferenceScreen()); mPref.setId(R.id.touchcapture_setting); mPref.setContentDescription(fragment.getActivity().getResources() .getString(R.string.touch_capture_content_description)); mPref.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() { @Override public boolean onPreferenceChange(Preference preference, Object o) { boolean checked = (Boolean) o; mChecked = checked; mListener.onVolumeCaptureClicked(checked); return true; } }); mPref.setEnabled(mEnabled); } @Override public void refreshView() { if (mPref != null) { mPref.setChecked(mChecked); mPref.setEnabled(mEnabled); } } @Override public void unloadView() { LogHelper.d(TAG, "[unloadView]"); } @Override public void setEnabled(boolean enabled) { mEnabled = enabled; } @Override public boolean isEnabled() { return mEnabled; } @Override public String getKey() { return mKey; } /** * Set listener to listen zsd is clicked. * * @param listener The instance of {@link OnVolumeCaptureClickListener}. */ public void setTouchCaptureOnClickListener(OnVolumeCaptureClickListener listener) { mListener = listener; } /** * Set zsd state. * * @param checked True means zsd is opened, false means zsd is closed. */ public void setChecked(boolean checked) { mChecked = checked; } }
db53ab8a13350f61e3ce0a97f9dd40ba3ba751ac
a0b732448e08291c894e7edf73a2d0c01124016a
/templates/jshvarts-offline/app/src/main/java/com/example/offline/domain/services/jobs/GcmJobService.java
c4dd15284b38d684a831917b7a4c78c3b4a801b4
[ "MIT", "Apache-2.0" ]
permissive
androidstarters/androidstarters.com
5c29f99ccd696118f75bedb41783347077db388a
010258565bc3e941d73f9ab3950f8bae0ad38e7b
refs/heads/develop
2023-08-22T11:56:29.637058
2018-09-27T05:13:01
2018-09-27T05:13:01
95,357,887
299
28
MIT
2021-01-07T13:41:32
2017-06-25T12:18:07
Java
UTF-8
Java
false
false
399
java
package <%= appPackage %>.domain.services.jobs; import android.support.annotation.NonNull; import com.birbit.android.jobqueue.JobManager; import com.birbit.android.jobqueue.scheduling.GcmJobSchedulerService; public class GcmJobService extends GcmJobSchedulerService { @NonNull @Override protected JobManager getJobManager() { return JobManagerFactory.getJobManager(); } }
f71de2cc0df0dbeedb0fc893fd0332e49e0f693a
a744882fb7cf18944bd6719408e5a9f2f0d6c0dd
/sourcecode8/src/java/lang/management/MemoryManagerMXBean.java
c01b6d02b07b42e9281159fabafa432c76b4b55a
[ "Apache-2.0" ]
permissive
hanekawasann/learn
a39b8d17fd50fa8438baaa5b41fdbe8bd299ab33
eef678f1b8e14b7aab966e79a8b5a777cfc7ab14
refs/heads/master
2022-09-13T02:18:07.127489
2020-04-26T07:58:35
2020-04-26T07:58:35
176,686,231
0
0
Apache-2.0
2022-09-01T23:21:38
2019-03-20T08:16:05
Java
UTF-8
Java
false
false
3,281
java
/* * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package java.lang.management; /** * The management interface for a memory manager. * A memory manager manages one or more memory pools of the * Java virtual machine. * * <p> A Java virtual machine has one or more memory managers. * An instance implementing this interface is * an <a href="ManagementFactory.html#MXBean">MXBean</a> * that can be obtained by calling * the {@link ManagementFactory#getMemoryManagerMXBeans} method or * from the {@link ManagementFactory#getPlatformMBeanServer * platform <tt>MBeanServer</tt>} method. * * <p>The <tt>ObjectName</tt> for uniquely identifying the MXBean for * a memory manager within an MBeanServer is: * <blockquote> * {@link ManagementFactory#MEMORY_MANAGER_MXBEAN_DOMAIN_TYPE * <tt>java.lang:type=MemoryManager</tt>}<tt>,name=</tt><i>manager's name</i> * </blockquote> * <p> * It can be obtained by calling the * {@link PlatformManagedObject#getObjectName} method. * * @author Mandy Chung * @see ManagementFactory#getPlatformMXBeans(Class) * @see MemoryMXBean * @see <a href="../../../javax/management/package-summary.html"> * JMX Specification.</a> * @see <a href="package-summary.html#examples"> * Ways to Access MXBeans</a> * @since 1.5 */ public interface MemoryManagerMXBean extends PlatformManagedObject { /** * Returns the name representing this memory manager. * * @return the name of this memory manager. */ String getName(); /** * Tests if this memory manager is valid in the Java virtual * machine. A memory manager becomes invalid once the Java virtual * machine removes it from the memory system. * * @return <tt>true</tt> if the memory manager is valid in the * Java virtual machine; * <tt>false</tt> otherwise. */ boolean isValid(); /** * Returns the name of memory pools that this memory manager manages. * * @return an array of <tt>String</tt> objects, each is * the name of a memory pool that this memory manager manages. */ String[] getMemoryPoolNames(); }
7e17339d19cf2c11f8032caec109dbdbb974ddbb
37515a0a63e3e6e62ba5104567201d2f14360f13
/edu.fudan.langlab.edl.domain/src/main/java/edu/fudan/langlab/domain/organization/RoleManager.java
d08300d809f816238865548c3befb8ccdbf0ffa0
[]
no_license
rockguo2015/newmed
9d95e161ba7cb9c59b24c4fb0bec2eb328214831
b4818912e5bbc6e0147d47e8ba475c0ac5c80c2e
refs/heads/master
2021-01-10T05:16:25.491087
2015-05-29T10:03:23
2015-05-29T10:03:23
36,384,873
0
0
null
null
null
null
UTF-8
Java
false
false
198
java
package edu.fudan.langlab.domain.organization; import java.util.Collection; import edu.fudan.langlab.domain.security.AppRole; public interface RoleManager { Collection<AppRole> getAllRoles(); }
d432bcd036cdc7b45f2483d85dc1b612a624898f
d73d945ed709876cf2aca87ed3a120cd589084e9
/app/src/main/java/com/qq986945193/androidbaseproject/utils/ToastUtils.java
4cf080e3a77aa8650fc65e9d0c5815ba0dbbb62e
[]
no_license
yesEric/AndroidBaseProject
08b81160ab17476442450fe120eb1ff3a06bcfa3
425c82337bf8ed4846817fdf37ea06a0937ed563
refs/heads/master
2021-04-06T08:17:18.808013
2017-01-17T02:14:47
2017-01-17T02:14:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,535
java
package com.qq986945193.androidbaseproject.utils; import android.content.Context; import android.view.Gravity; import android.widget.Toast; /** * @author :程序员小冰 * @新浪微博 :http://weibo.com/mcxiaobing * @CSDN博客: http://blog.csdn.net/qq_21376985 * @交流Qq :986945193 * @GitHub: https://github.com/QQ986945193 */ /** * 弹出Toast 封装类 */ public class ToastUtils { private ToastUtils() { /* cannot be instantiated */ throw new UnsupportedOperationException("cannot be instantiated"); } public static boolean isShow = true; /** * 短时间显示Toast */ public static void showShort(Context context, CharSequence message) { if (isShow) Toast.makeText(context, message, Toast.LENGTH_SHORT).show(); } /** * 短时间显示Toast 这里message 代表的是的CharSequence路径 */ public static void showShort(Context context, int message) { if (isShow) Toast.makeText(context, message, Toast.LENGTH_SHORT).show(); } /** * 长时间显示Toast */ public static void showLong(Context context, CharSequence message) { if (isShow) Toast.makeText(context, message, Toast.LENGTH_LONG).show(); } /** * 长时间显示Toast 这里message 代表的是的CharSequence路径 */ public static void showLong(Context context, int message) { if (isShow) Toast.makeText(context, message, Toast.LENGTH_LONG).show(); } /** * 自定义显示Toast时间 */ public static void show(Context context, CharSequence message, int duration) { if (isShow) Toast.makeText(context, message, duration).show(); } /** * 自定义显示Toast时间 这里message 代表的是的CharSequence路径 */ public static void show(Context context, int message, int duration) { if (isShow) Toast.makeText(context, message, duration).show(); } /** * Toast中间显示 **/ public static void middleShow(Context content, String message) { Toast toast = Toast.makeText(content, message, Toast.LENGTH_SHORT); toast.setGravity(Gravity.CENTER, 0, 0); /* LinearLayout toastView = (LinearLayout) toast.getView(); ImageView imageCodeProject = new ImageView(getApplicationContext()); imageCodeProject.setImageResource(R.drawable.icon); toastView.addView(imageCodeProject, 0);*/ toast.show(); } }
f86fca72907679134cda9b60d57ff71a7fa61827
071a9fa7cfee0d1bf784f6591cd8d07c6b2a2495
/corpus/class/log4j/265.java
7e5d3caa11e4351716c2a7b55f12f007f82b01c1
[ "MIT" ]
permissive
masud-technope/ACER-Replication-Package-ASE2017
41a7603117f01382e7e16f2f6ae899e6ff3ad6bb
cb7318a729eb1403004d451a164c851af2d81f7a
refs/heads/master
2021-06-21T02:19:43.602864
2021-02-13T20:44:09
2021-02-13T20:44:09
187,748,164
0
0
null
null
null
null
UTF-8
Java
false
false
4,068
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.log4j; import org.apache.log4j.spi.ErrorHandler; import org.apache.log4j.spi.LoggingEvent; import java.util.Vector; /** * Utility class used in testing to capture errors dispatched * by appenders. * * @author Curt Arnold */ public final class VectorErrorHandler implements ErrorHandler { /** * Logger. */ private Logger logger; /** * Appender. */ private Appender appender; /** * Backup appender. */ private Appender backupAppender; /** * Array of processed errors. */ private final Vector errors = new Vector(); /** * Default constructor. */ public VectorErrorHandler() { } /** * {@inheritDoc} */ public void setLogger(final Logger logger) { this.logger = logger; } /** * Gets last logger specified by setLogger. * @return logger. */ public Logger getLogger() { return logger; } /** * {@inheritDoc} */ public void activateOptions() { } /** * {@inheritDoc} */ public void error(final String message, final Exception e, final int errorCode) { error(message, e, errorCode, null); } /** * {@inheritDoc} */ public void error(final String message) { error(message, null, -1, null); } /** * {@inheritDoc} */ public void error(final String message, final Exception e, final int errorCode, final LoggingEvent event) { errors.addElement(new Object[] { message, e, new Integer(errorCode), event }); } /** * Gets message from specified error. * * @param index index. * @return message, may be null. */ public String getMessage(final int index) { return (String) ((Object[]) errors.elementAt(index))[0]; } /** * Gets exception from specified error. * * @param index index. * @return exception. */ public Exception getException(final int index) { return (Exception) ((Object[]) errors.elementAt(index))[1]; } /** * Gets error code from specified error. * * @param index index. * @return error code, -1 if not specified. */ public int getErrorCode(final int index) { return ((Integer) ((Object[]) errors.elementAt(index))[2]).intValue(); } /** * Gets logging event from specified error. * * @param index index. * @return exception. */ public LoggingEvent getEvent(final int index) { return (LoggingEvent) ((Object[]) errors.elementAt(index))[3]; } /** * Gets number of errors captured. * @return number of errors captured. */ public int size() { return errors.size(); } /** * {@inheritDoc} */ public void setAppender(final Appender appender) { this.appender = appender; } /** * Get appender. * @return appender, may be null. */ public Appender getAppender() { return appender; } /** * {@inheritDoc} */ public void setBackupAppender(final Appender appender) { this.backupAppender = appender; } /** * Get backup appender. * @return backup appender, may be null. */ public Appender getBackupAppender() { return backupAppender; } }
de1ece111beba113e4074546bf8b3d41bdc35be8
19e89ed0e966d7f9e1cf93ff17a7622e205c82c2
/DesignPatternsJava/src/main/java/com/memento/Memento.java
f5ac849e1d6e3437fd79c8afc7440edc420d03c6
[]
no_license
sarkershantonu/blog-projects
511bd04c6c192994ef59edfcc3ae7d8a2a32c17e
16929bdf619d9a8ee7822081d474b97e09379436
refs/heads/master
2021-07-03T03:01:55.583879
2020-05-18T03:06:30
2020-05-18T03:06:30
55,711,975
1
0
null
2020-10-13T06:48:44
2016-04-07T16:53:52
Java
UTF-8
Java
false
false
286
java
package com.memento; public class Memento { private String state = "Not initiated"; public Memento(String aState){ state=aState; System.out.println("A memento is created"); } public String getState(){ System.out.println("State from Memento "+ state); return state; } }
4b834eb16202213dac6ca7019c5c84cfb4a1ce13
d7c5121237c705b5847e374974b39f47fae13e10
/airspan.netspan/src/main/java/Netspan/NBI_15_2/Backhaul/RelayProfileUpdateResponse.java
52518aecdd5fd3b44aa5693800f096ba59e3078e
[]
no_license
AirspanNetworks/SWITModules
8ae768e0b864fa57dcb17168d015f6585d4455aa
7089a4b6456621a3abd601cc4592d4b52a948b57
refs/heads/master
2022-11-24T11:20:29.041478
2020-08-09T07:20:03
2020-08-09T07:20:03
184,545,627
1
0
null
2022-11-16T12:35:12
2019-05-02T08:21:55
Java
UTF-8
Java
false
false
1,823
java
package Netspan.NBI_15_2.Backhaul; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;sequence&gt; * &lt;element name="RelayProfileUpdateResult" type="{http://Airspan.Netspan.WebServices}ProfileResponse" minOccurs="0"/&gt; * &lt;/sequence&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "relayProfileUpdateResult" }) @XmlRootElement(name = "RelayProfileUpdateResponse") public class RelayProfileUpdateResponse { @XmlElement(name = "RelayProfileUpdateResult") protected ProfileResponse relayProfileUpdateResult; /** * Gets the value of the relayProfileUpdateResult property. * * @return * possible object is * {@link ProfileResponse } * */ public ProfileResponse getRelayProfileUpdateResult() { return relayProfileUpdateResult; } /** * Sets the value of the relayProfileUpdateResult property. * * @param value * allowed object is * {@link ProfileResponse } * */ public void setRelayProfileUpdateResult(ProfileResponse value) { this.relayProfileUpdateResult = value; } }
92895bc67fe7cb61257a66d0beae9e1ee7181b71
ceac2e2348b3d9f1b45f5a9c93f826d82f712d7b
/RegisterService-master/src/main/java/com/im/server/dao/PersonMgtServiceDao.java
747364b98bb84da8620f4eb3b3c9b17ef75484fb
[]
no_license
jma19/IMServer
aeba9aafdaa418d0ab800dab112abef762d33a57
2658cc302b7b56cf8a0765264a7ff44ff65c9e45
refs/heads/master
2021-01-10T09:50:53.627710
2017-02-17T00:55:51
2017-02-17T00:55:51
48,745,733
0
1
null
null
null
null
UTF-8
Java
false
false
2,238
java
package com.im.server.dao; import com.im.server.mode.ClassInfo; import com.im.server.mode.GroupInfo; import com.im.server.mode.LoginResponse; import com.im.server.mode.db.Student; import com.im.server.mode.notice.ContactEntity; import org.apache.ibatis.annotations.Param; import java.util.List; /** * Created by majun on 16/3/1. */ public interface PersonMgtServiceDao { Long queryStudentPid(String phone); Long queryAssistantPid(String phone); LoginResponse queryStuInfo(Long pid); LoginResponse queryStuInfoByPhone(String phone); //根据辅导员id获取辅导员的信息 LoginResponse queryAssInfo(Long pid); LoginResponse queryAssInfoByPhone(String phone); //根据班级获取班级中的所有学生 List<ContactEntity> queryStudentsByClassIds(List<Integer> classId); //获取pid同班同学 List<ContactEntity> queryStuContactListOfSameClass(Long pid); //获取pid的同年级同学 List<ContactEntity> queryStuContactListOfSameGrade(Long pid); //获取辅导员下关联的所有学生列表 List<ContactEntity> queryStudentsByAssistantId(Long assistantId); //获取辅导员的联系班级 List<GroupInfo> queryClassInfoByAssistantId(Long assistantId); //获取pid的同年级同学 List<ContactEntity> queryStuContactListOfSameUniv(Long pid); //获取pid的同学同学 List<ContactEntity> queryStuContactListOfSameCollege(Long pid); //获取学生对应的辅导员信息 List<ContactEntity> queryAssistant(Long pid); //获取辅导员管理的所有学生 List<ContactEntity> queryStudentsByClassIds(Long assistantId); GroupInfo queryGroupInfoByStudentPid(Long pid); //获取学生所在班级的信息 ContactEntity queryGroupInfoByPid(Long pid); Student queryStudent(Long pid); //获取classId Long queryClassId(Long pid); //获取collegeId Long queryCollegeId(Long pid); //获取GradeId Long queryGradeId(Long pid); //univId Long queryUnivId(Long pid); void insertStudentHeadPicUrl(@Param("pid") Long pid, @Param("headUrl") String headUrl); void insertAssistantHeadPicUrl(@Param("pid") Long pid, @Param("headUrl") String headUrl); }
fcf257d078e0382f431d66e52517682257ebca7a
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/7/7_70f592e50c3e81b6e02120a3afb8faf07320b68b/MediaSink/7_70f592e50c3e81b6e02120a3afb8faf07320b68b_MediaSink_s.java
8f5a437039ac1a3bd8fa8a2261596069568934d9
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,326
java
/* * Mobicents Media Gateway * * The source code contained in this file is in in the public domain. * It can be used in any project or product without prior permission, * license or royalty payments. There is NO WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR STATUTORY, INCLUDING, WITHOUT LIMITATION, * THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, * AND DATA ACCURACY. We do not warrant or make any representations * regarding the use of the software or the results thereof, including * but not limited to the correctness, accuracy, reliability or * usefulness of the software. */ package org.mobicents.media.server.spi; import org.mobicents.media.format.UnsupportedFormatException; import org.mobicents.media.protocol.PushBufferStream; /** * * @author Oleg Kulikov */ public interface MediaSink extends MediaResource { /** * Prepares this media resource. * * @param mediaStream the media stream. */ public void prepare(Endpoint endpoint, PushBufferStream mediaStream) throws UnsupportedFormatException; /** * Spllits media sink. * * @param branchID the ID of new stream * @return the new copy of the original stream. */ public PushBufferStream newBranch(String branchID); }
fad0c80d54c270bfbee1430ee8ed5bf264a6ec4c
d1ca36ccea050f7b9660d3db8b6ea1ff9b2953c1
/dousnl-parent/dousnl-web/dousnl-web-protal/src/main/java/com/dousnl/web/activiti/TaskListenerImpl.java
eb7f7be6f49b7cdd48063199100d76bb966631a6
[]
no_license
dousnl-han/dousnl-parent
59fdf3608c28821f4331568272354ab8b3518786
7d1f82fceaa71fbbc227a035da831ba18979263b
refs/heads/master
2022-12-11T08:35:30.266097
2019-08-29T06:55:30
2019-08-29T06:55:41
148,433,046
0
0
null
2022-12-06T00:03:18
2018-09-12T06:33:49
Java
UTF-8
Java
false
false
1,050
java
package com.dousnl.web.activiti; /*package com.dousnl.web.activiti; import java.util.List; import java.util.Map; import org.activiti.engine.delegate.DelegateTask; import org.activiti.engine.delegate.TaskListener; public class TaskListenerImpl implements TaskListener{ public void notify(DelegateTask arg0) { // TODO Auto-generated method stub } *//**����ָ������İ�����*//* public void notify(DelegateTask delegateTask) { //�������ĸ�������1�Ļ�����IDΪRoleID String sql = "select * From tb_relation where intershipid='" + processDefId + "' and childCode='" + lastassignee + "'"; Dbhelper dbCourseCurrentadd = new Dbhelper(); dbCourseCurrentadd.setSql(sql.toString()); List<Map<String,Object>> listmap = dbCourseCurrentadd.findItemById(); if(listmap.size() > 0 && listmap!=null){ Map<String, Object> m = listmap.get(0); nextLevel = (String) m.get("fatherCode"); } } } */
53e48967073a8ba21b09711abe0fadc7c579dca4
f6b90fae50ea0cd37c457994efadbd5560a5d663
/android/nut-dex2jar.src/com/nut/blehunter/ui/dn.java
387f4ab2de6a104f40d751f1bc0635c14b986cb6
[]
no_license
dykdykdyk/decompileTools
5925ae91f588fefa7c703925e4629c782174cd68
4de5c1a23f931008fa82b85046f733c1439f06cf
refs/heads/master
2020-01-27T09:56:48.099821
2016-09-14T02:47:11
2016-09-14T02:47:11
66,894,502
1
0
null
null
null
null
UTF-8
Java
false
false
468
java
package com.nut.blehunter.ui; import android.support.v4.app.s; import com.nut.blehunter.ui.b.a.d; final class dn implements d { dn(ResetPasswordActivity paramResetPasswordActivity) { } public final void a(s params, int paramInt) { this.a.setResult(-1); this.a.finish(); } } /* Location: C:\crazyd\work\ustone\odm2016031702\baidu\android\nut-dex2jar.jar * Qualified Name: com.nut.blehunter.ui.dn * JD-Core Version: 0.6.2 */
7b9a4fb33a4e6ac10d3f1fec87196bb3b43255b4
3adc99579f53ee8f56e37c4a9e9107b4438abe8f
/2.JavaCore/src/main/java/com/jr/level/level19/task1905/Solution.java
6e75049585bffbae619f22ec88d751fc49d6ee71
[]
no_license
Qventeen/JavaLearn
3fa87b7b48c968f3c3813816c524e14702786f6b
9157dae1be1c73da587457c17906bcb3a75e54ec
refs/heads/master
2023-02-04T16:24:59.982269
2020-12-18T16:17:58
2020-12-18T16:17:58
322,562,417
0
0
null
null
null
null
UTF-8
Java
false
false
2,506
java
package com.jr.level.level19.task1905; import java.util.HashMap; import java.util.Map; /* Закрепляем адаптер */ public class Solution { public static Map<String,String> countries = new HashMap<String,String>(); static { countries.put("UA","Ukraine"); countries.put("RU","Russia"); countries.put("CA","Canada"); } public static void main(String[] args) { } public static class DataAdapter implements RowItem { private Customer customer; private Contact contact; public DataAdapter(Customer customer, Contact contact) { this.customer = customer; this.contact = contact; } @Override public String getCountryCode() { for(Map.Entry<String,String> pair: countries.entrySet()){ String str = customer.getCountryName(); if(pair.getValue() == str){ return pair.getKey(); } } throw new RuntimeException("Некорректное название страны"); } @Override public String getCompany() { return customer.getCompanyName(); } @Override public String getContactFirstName() { return contact.getName().split(", ")[1]; } @Override public String getContactLastName() { return contact.getName().split(", ")[0]; } @Override public String getDialString() { StringBuffer sb = new StringBuffer("callto://+"); for(char ch: contact.getPhoneNumber().toCharArray()){ if(Character.isDigit(ch)){ sb.append(ch); } } return sb.toString(); } } public static interface RowItem { String getCountryCode(); //example UA String getCompany(); //example JR Ltd. String getContactFirstName(); //example Ivan String getContactLastName(); //example Ivanov String getDialString(); //example callto://+380501234567 } public static interface Customer { String getCompanyName(); //example JR Ltd. String getCountryName(); //example Ukraine } public static interface Contact { String getName(); //example Ivanov, Ivan String getPhoneNumber(); //example +38(050)123-45-67 } }
3b7a72f50848d8a9d3deb9ea4b676569cd550e52
c156bf50086becbca180f9c1c9fbfcef7f5dc42c
/src/main/java/com/waterelephant/utils/JsonDataProcessorImpl.java
6ecabf150254f509a6ddaf5d81df456ed8355104
[]
no_license
zhanght86/beadwalletloanapp
9e3def26370efd327dade99694006a6e8b18a48f
66d0ae7b0861f40a75b8228e3a3b67009a1cf7b8
refs/heads/master
2020-12-02T15:01:55.982023
2019-11-20T09:27:24
2019-11-20T09:27:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,740
java
/****************************************************************************** * Copyright (C) 2016 Wuhan Water Elephant Co.Ltd All Rights Reserved. * 本软件为武汉水象科技有限公司开发研制。 未经本公司正式书面同意,其他任何个人、 * 团体不得使用、复制、修改或发布本软件. *****************************************************************************/ package com.waterelephant.utils; import java.text.SimpleDateFormat; import java.util.Date; import net.sf.json.JsonConfig; import net.sf.json.processors.JsonValueProcessor; /** * * * Module: * * JsonDataProcessorImpl.java * * @author 程盼 * @since JDK 1.8 * @version 1.0 * @description: <描述> */ public class JsonDataProcessorImpl implements JsonValueProcessor { private String format = "yyyy-MM-dd HH:mm:ss"; public JsonDataProcessorImpl() { super(); } public JsonDataProcessorImpl(String format) { super(); this.format = format; } @Override public Object processArrayValue(Object value, JsonConfig jsonConfig) { String[] obj = {}; if (value instanceof Date[]) { SimpleDateFormat sf = new SimpleDateFormat(format); Date[] dates = (Date[]) value; obj = new String[dates.length]; for (int i = 0; i < dates.length; i++) { obj[i] = sf.format(dates[i]); } } return obj; } @Override public Object processObjectValue(String key, Object value, JsonConfig jsonConfig) { if (value instanceof java.util.Date) { String str = new SimpleDateFormat(format).format((Date) value); return str; } return null == value ? "" : value.toString(); } public String getFormat() { return format; } public void setFormat(String format) { this.format = format; } }
08d21f00fea097162423439d49bedd1fcabd4995
7bda7971c5953d65e33bdf054360bdf4488aa7eb
/src/com/arcsoft/office/fc/hssf/formula/eval/NameXEval.java
b9503ac02d5f8948c410dbeb5fa19abb9ee0e33b
[ "Apache-2.0" ]
permissive
daddybh/iOffice
ee5dd5938f258d7dcfc0757b1809d31662dd07ef
d1d6b57fb0d496db5c5649f5bc3751b2a1539f83
refs/heads/master
2021-12-10T20:47:15.238083
2016-09-20T12:14:17
2016-09-20T12:14:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,501
java
/* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ package com.arcsoft.office.fc.hssf.formula.eval; import com.arcsoft.office.fc.hssf.formula.ptg.NameXPtg; /** * @author Josh Micich */ public final class NameXEval implements ValueEval { private final NameXPtg _ptg; public NameXEval(NameXPtg ptg) { _ptg = ptg; } public NameXPtg getPtg() { return _ptg; } public String toString() { StringBuffer sb = new StringBuffer(64); sb.append(getClass().getName()).append(" ["); sb.append(_ptg.getSheetRefIndex()).append(", ").append(_ptg.getNameIndex()); sb.append("]"); return sb.toString(); } }
3710eb84ece889691ca27e76949aba75dd8e1184
68a19507f18acff18aa4fa67d6611f5b8ac8913c
/hg-standard/hg-system/src/main/java/hg/system/dto/album/AlbumDTO.java
a0bd5c71262c7278fb399cf423593e7e72e6d31a
[]
no_license
ksksks2222/pl-workspace
cf0d0be2dfeaa62c0d4d5437f85401f60be0eadd
6146e3e3c2384c91cac459d25b27ffeb4f970dcd
refs/heads/master
2021-09-13T08:59:17.177105
2018-04-27T09:46:42
2018-04-27T09:46:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,720
java
package hg.system.dto.album; import hg.system.dto.EmbeddDTO; /** * @类功能说明: * @类修改者: * @修改日期: * @修改说明: * @公司名称:浙江汇购科技有限公司 * @部门:技术部 * @作者:yuxx * @创建时间:2014年9月1日下午2:44:35 */ @SuppressWarnings("serial") public class AlbumDTO extends EmbeddDTO { /** * 相册id */ private String id; /** * 相册标题 */ private String title; /** * 相册备注 */ private String remark; /** * 所有者id */ private String ownerId; /** * 例 景区联盟:JQLM */ private String projectId; /** * 例 联盟主站相册:001 景点专属相册:002 */ private Integer useType; /** * 上级节点 */ private AlbumDTO parent; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } public String getOwnerId() { return ownerId; } public void setOwnerId(String ownerId) { this.ownerId = ownerId; } public String getProjectId() { return projectId; } public void setProjectId(String projectId) { this.projectId = projectId; } public Integer getUseType() { return useType; } public void setUseType(Integer useType) { this.useType = useType; } public AlbumDTO getParent() { return parent; } public void setParent(AlbumDTO parent) { this.parent = parent; } }
55a1761c40fe4bb256e21ba0d90bb4b20bc4d802
92237641f61e9b35ff6af6294153a75074757bec
/SPRING/SpringMVC_Basic03_Annotation/src/com/controller/HelloController.java
3ba6a11bfe44672f3b9654937f65b0d5eb46dc31
[]
no_license
taepd/study
8ded115765c4f804813e255d9272b727bf41ec80
846d3f2a5a4100225b750f00f992a640e9287d9c
refs/heads/master
2023-03-08T13:56:57.366577
2022-05-08T15:24:35
2022-05-08T15:24:35
245,838,600
0
1
null
2023-03-05T23:54:41
2020-03-08T15:25:15
JavaScript
UTF-8
Java
false
false
1,782
java
package com.controller; import java.util.Calendar; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; /* public class HelloController implements Controller { @Override public ModelAndView handleRequest(HttpServletRequest arg0, HttpServletResponse arg1) throws Exception { // TODO Auto-generated method stub return null; } 1. implements Controller 단점 : 10개의 요청이 오면 .... Controller 10개 생성 ex) ListController , DeleteController ..... 2. @Controller 사용하면 method 단위로 매핑을 할 수 있다 @Controller 함수 단위 매핑 하나의 컨트롤러가 여러개의 요청을 처리 할 수 있다 */ @Controller public class HelloController { public HelloController() { System.out.println("HelloController 생성자"); } @RequestMapping("/hello.do") //<a href="hello.do">hello.do</a> public ModelAndView hello() { System.out.println("[hello.do method call]"); ModelAndView mv = new ModelAndView(); mv.addObject("greeting", getGreeting()); mv.setViewName("Hello"); return mv; } //@RequestMapping 를 가지지 않는 별도의 함수는 필요시 생성해서 사용 private String getGreeting() { int hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY); String data=""; if(hour >= 6 && hour <= 10) { data="학습시간"; }else if(hour >= 11 && hour <= 13) { data="배고픈 시간"; }else if(hour >= 14 && hour <= 18) { data="졸려운 시간"; }else { data = "go home"; } return data; } @RequestMapping("/hello2.do") public ModelAndView hello2() { return null; } }
e5e7d6d3f999c903da7254481eab159867ffbed6
efceccd784003d47d022c48338d836fe39f9136c
/thinking-in-java/src/main/java/chapter22/gui/MonitoredLongRunningCallable.java
7ca9c24fba23e18b603795abc9399883ecbfe47d
[]
no_license
jackode/most-java
2be3f3a43c7b5f993c2d2eb5137ff1cf04134b2f
b4c4117a75a1829f076771b0a9e86ed4b3baf06f
refs/heads/master
2021-01-10T10:27:36.638351
2015-09-23T15:10:09
2015-09-23T15:10:09
43,008,509
3
0
null
null
null
null
UTF-8
Java
false
false
2,874
java
//: chapter22.gui/MonitoredLongRunningCallable.java // Displaying task progress with ProgressMonitors. import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.concurrent.*; import chapter07.net.mindview.util.*; import static chapter07.net.mindview.util.SwingConsole.*; class MonitoredCallable implements Callable<String> { private static int counter = 0; private final int id = counter++; private final ProgressMonitor monitor; private final static int MAX = 8; public MonitoredCallable(ProgressMonitor monitor) { this.monitor = monitor; monitor.setNote(toString()); monitor.setMaximum(MAX - 1); monitor.setMillisToPopup(500); } public String call() { System.out.println(this + " started"); try { for(int i = 0; i < MAX; i++) { TimeUnit.MILLISECONDS.sleep(500); if(monitor.isCanceled()) Thread.currentThread().interrupt(); final int progress = i; SwingUtilities.invokeLater( new Runnable() { public void run() { monitor.setProgress(progress); } } ); } } catch(InterruptedException e) { monitor.close(); System.out.println(this + " interrupted"); return "Result: " + this + " interrupted"; } System.out.println(this + " completed"); return "Result: " + this + " completed"; } public String toString() { return "Task " + id; } }; public class MonitoredLongRunningCallable extends JFrame { private JButton b1 = new JButton("Start Long Running Task"), b2 = new JButton("End Long Running Task"), b3 = new JButton("Get results"); private TaskManager<String,MonitoredCallable> manager = new TaskManager<String,MonitoredCallable>(); public MonitoredLongRunningCallable() { b1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { MonitoredCallable task = new MonitoredCallable( new ProgressMonitor( MonitoredLongRunningCallable.this, "Long-Running Task", "", 0, 0) ); manager.add(task); System.out.println(task + " added to the queue"); } }); b2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { for(String result : manager.purge()) System.out.println(result); } }); b3.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { for(String result : manager.getResults()) System.out.println(result); } }); setLayout(new FlowLayout()); add(b1); add(b2); add(b3); } public static void main(String[] args) { run(new MonitoredLongRunningCallable(), 200, 500); } } ///:~
1261ff815d17f0299b2f08279fe83ad272ff11e1
85c7d74a116fd9128657035b77a11472f7795518
/Javaee-tutorial/src/main/java/com/giit/www/entity/custom/ReviewedBookVo.java
3893c22647c97ac99e86a0a6798caa643e4af166
[ "Apache-2.0" ]
permissive
oniubi/github-repositories
3773b96a38720b33f085a759dcad81a2236f6168
5c8e58ce2da7e2d8c38683f06cdbcb150422d896
refs/heads/master
2023-03-16T07:59:59.466661
2019-03-02T09:55:04
2019-03-02T09:55:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
955
java
package com.giit.www.entity.custom; /** * Created by c0de8ug on 16-2-16. */ public class ReviewedBookVo { String bookTitle; String isbn; String dateOfPrinting; String author; String press; int count; public int getCount() { return count; } public void setCount(int count) { this.count = count; } public String getBookTitle() { return bookTitle; } public void setBookTitle(String bookTitle) { this.bookTitle = bookTitle; } public String getIsbn() { return isbn; } public void setIsbn(String isbn) { this.isbn = isbn; } public String getDateOfPrinting() { return dateOfPrinting; } public void setDateOfPrinting(String dateOfPrinting) { this.dateOfPrinting = dateOfPrinting; } public String getAuthor() { return author; } public void setAuthor(String author) { this.author = author; } public String getPress() { return press; } public void setPress(String press) { this.press = press; } }
479e31240f5b84494a7f10b2c6ff3a93d50ba870
e77a541a6e5d48f830d48a7338ff4aceef8d15f6
/core/src/main/java/org/kuali/kra/committee/bo/businessLogic/impl/IrbCommitteeBusinessLogicImpl.java
cf77d1d150f8b129b96b050ec0c5fa7ef4ce9e3f
[]
no_license
r351574nc3/kc-release
a9c4f78b922005ecbfbc9aba36366e0c90f72857
d5b9ad58e906dbafa553de777207ef5cd4addc54
refs/heads/master
2021-01-02T15:33:46.583309
2012-03-17T05:38:02
2012-03-17T05:38:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,685
java
/* * Copyright 2005-2010 The Kuali Foundation * * Licensed under the Educational Community License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/licenses/ecl1.php * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.kuali.kra.committee.bo.businessLogic.impl; import java.util.List; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang.StringUtils; import org.kuali.kra.committee.bo.Committee; import org.kuali.kra.committee.bo.CommitteeResearchArea; import org.kuali.kra.committee.bo.businessLogic.CommitteeCollaboratorBusinessLogicFactoryGroup; import org.kuali.kra.committee.bo.businessLogic.CommitteeResearchAreaBusinessLogic; import org.kuali.kra.infrastructure.KeyConstants; import org.kuali.kra.rules.ErrorReporter; public class IrbCommitteeBusinessLogicImpl extends CommitteeBusinessLogicImpl { private static final String SEPERATOR = "."; private static final String INACTIVE_RESEARCH_AREAS_PREFIX = "document.committeeList[0].committeeResearchAreas.inactive"; public IrbCommitteeBusinessLogicImpl(Committee businessObject, CommitteeCollaboratorBusinessLogicFactoryGroup committeeCollaborators) { super(businessObject, committeeCollaborators); } /** * This method will check if all the research areas that have been added to the committee are indeed active. * It is declared public because it will be invoked from the action class for committee as well. * @param document * @return */ @Override public boolean validateCommitteeResearchAreas() { boolean inactiveFound = false; StringBuffer inactiveResearchAreaIndices = new StringBuffer(); // iterate over all the research areas for the committee BO looking for inactive research areas List<CommitteeResearchArea> cras = this.getCommitteeBusinessObject().getCommitteeResearchAreas(); if(CollectionUtils.isNotEmpty(cras)) { int raIndex = 0; for (CommitteeResearchArea cra : cras) { // get collaborator for the CommitteeResearchArea BO CommitteeResearchAreaBusinessLogic craLogic = getCommitteeCollaboratorBusinessLogicFactoryGroup().getCommitteeReserachAreaBusinessLogic(cra); if(!(craLogic.isEnclosedResearchAreaActive())) { inactiveFound = true; inactiveResearchAreaIndices.append(raIndex).append(SEPERATOR); } raIndex++; } } // if we found any inactive research areas in the above loop, report as a single error key suffixed by the list of indices of the inactive areas if(inactiveFound) { String committeeResearchAreaInactiveErrorPropertyKey = INACTIVE_RESEARCH_AREAS_PREFIX + SEPERATOR + inactiveResearchAreaIndices.toString(); new ErrorReporter().reportError(committeeResearchAreaInactiveErrorPropertyKey, KeyConstants.ERROR_COMMITTEE_RESEARCH_AREA_INACTIVE); } return !inactiveFound; } @Override public boolean checkReviewType() { return !StringUtils.isBlank(getCommitteeBusinessObject().getReviewTypeCode()); } }
1e012ac9eabd4819dbcd920d3fbdb1954a721e86
f8e300aa04370f8836393455b8a10da6ca1837e5
/CounselorAPP/app/src/main/java/com/cesaas/android/counselor/order/label/net/GetAllTagListNet.java
b6b2931797c8d804fd2ae9bfc56d8184258c6f88
[]
no_license
FlyBiao/CounselorAPP
d36f56ee1d5989c279167064442d9ea3e0c3a3ae
b724c1457d7544844ea8b4f6f5a9205021c33ae3
refs/heads/master
2020-03-22T21:30:14.904322
2018-07-12T12:21:37
2018-07-12T12:21:37
140,691,614
0
1
null
null
null
null
UTF-8
Java
false
false
1,700
java
package com.cesaas.android.counselor.order.label.net; import io.rong.eventbus.EventBus; import android.content.Context; import android.util.Log; import com.cesaas.android.counselor.order.global.BaseNet; import com.cesaas.android.counselor.order.global.Constant; import com.cesaas.android.counselor.order.label.bean.ResultGetAllTagListBean; import com.cesaas.android.counselor.order.utils.AbPrefsUtil; import com.google.gson.Gson; import com.lidroid.xutils.exception.HttpException; /** * 获取当前店家所有标签 * @author FGB * */ public class GetAllTagListNet extends BaseNet{ public GetAllTagListNet(Context context) { super(context, true); this.uri="User/Sw/Tag/GetAllTagList"; } public void setData(){ try { data.put("UserTicket",AbPrefsUtil.getInstance().getString(Constant.SPF_TOKEN)); } catch (Exception e) { e.printStackTrace(); } //开始请求网络 mPostNet(); } public void setData(int PageSize,int PageIndex){ try { data.put("PageSize",PageSize); data.put("PageIndex",PageIndex); data.put("UserTicket",AbPrefsUtil.getInstance().getString(Constant.SPF_TOKEN)); } catch (Exception e) { e.printStackTrace(); } //开始请求网络 mPostNet(); } @Override protected void mSuccess(String rJson) { super.mSuccess(rJson); Log.i(Constant.TAG, "label===" + rJson); Gson gson=new Gson(); ResultGetAllTagListBean bean=gson.fromJson(rJson, ResultGetAllTagListBean.class); //通过EventBus发送消息事件 EventBus.getDefault().post(bean); } @Override protected void mFail(HttpException e, String err) { super.mFail(e, err); Log.i(Constant.TAG, "Fans===" + e + "********=err==" + err); } }
dbcc090436dcbad944fef3042ced4b576ca8b9c0
d560f0c81d0286f04242e2862e04828afe31943c
/src/net/minecraft/server/class_so.java
aab275b39f2b66f582573b481efa8acab8c2a94f
[]
no_license
Aust1n46/MinecraftServerDec19
133fad79a68bc11392b35b67b1b178f88aaaa555
15dfa7c50a158c3f91add8276c9abbd6887925e0
refs/heads/master
2020-12-25T09:27:25.516834
2015-08-04T23:34:32
2015-08-04T23:34:32
40,213,641
0
0
null
2015-08-04T23:15:54
2015-08-04T23:15:54
null
UTF-8
Java
false
false
883
java
package net.minecraft.server; import net.minecraft.server.EntityLiving; import net.minecraft.server.class_qj; import net.minecraft.server.class_rm; public class class_so extends class_rm { private class_qj a; private boolean b; public class_so(class_qj var1) { this.a = var1; this.a(5); } public boolean a() { if(!this.a.cA()) { return false; } else if(this.a.V()) { return false; } else if(!this.a.C) { return false; } else { EntityLiving var1 = this.a.cD(); return var1 == null?true:(this.a.h(var1) < 144.0D && var1.be() != null?false:this.b); } } public void c() { this.a.u().n(); this.a.o(true); } public void d() { this.a.o(false); } public void a(boolean var1) { this.b = var1; } }
633c267224672cca18f7f5fb19afe6eeb99fdaa8
d1c35b77ced39d225473d6737f27699b3e7d8db1
/springboot/springboot-dubbo-client/src/main/java/com/springboot/yzhao/springbootdubboclient/SpringbootDubboClientApplication.java
477858998a5d76f71a56a42341355ef9ae441d77
[]
no_license
kenzhaoyihui/javase_L
f5ec3635f99a41c75da9d6a89299507f03df65b6
1dd7dee3486c0cb9dadd41ae6f2e178848bb69a3
refs/heads/master
2020-03-16T00:27:24.139875
2018-07-30T17:04:12
2018-07-30T17:04:12
132,417,067
0
0
null
null
null
null
UTF-8
Java
false
false
782
java
package com.springboot.yzhao.springbootdubboclient; import com.springboot.yzhao.springbootdubboclient.dubbo.CityDubboConsumerService; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.ConfigurableApplicationContext; @SpringBootApplication public class SpringbootDubboClientApplication { public static void main(String[] args) { ConfigurableApplicationContext context = SpringApplication.run(SpringbootDubboClientApplication.class, args); CityDubboConsumerService cityDubboConsumerService = context.getBean(CityDubboConsumerService.class); cityDubboConsumerService.printCity("Nanjing"); //SpringApplication.run(SpringbootDubboClientApplication.class, args); } }
47ffa562d5f01dc360882aaf61f79405195a6f25
129f58086770fc74c171e9c1edfd63b4257210f3
/src/testcases/CWE690_NULL_Deref_From_Return/CWE690_NULL_Deref_From_Return__getParameter_Servlet_equals_54b.java
8892a6c03c02eeb630b833d99c2141bbfdcc28dc
[]
no_license
glopezGitHub/Android23
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
refs/heads/master
2023-03-07T15:14:59.447795
2023-02-06T13:59:49
2023-02-06T13:59:49
6,856,387
0
3
null
2023-02-06T18:38:17
2012-11-25T22:04:23
Java
UTF-8
Java
false
false
1,818
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE690_NULL_Deref_From_Return__getParameter_Servlet_equals_54b.java Label Definition File: CWE690_NULL_Deref_From_Return.label.xml Template File: sources-sinks-54b.tmpl.java */ /* * @description * CWE: 690 Unchecked return value is null, leading to a null pointer dereference. * BadSource: getParameter_Servlet Set data to return of getParameter_Servlet * GoodSource: Set data to fixed, non-null String * Sinks: equals * GoodSink: Call equals() on string literal (that is not null) * BadSink : Call equals() on possibly null object * Flow Variant: 54 Data flow: data passed as an argument from one method through three others to a fifth; all five functions are in different classes in the same package * * */ package testcases.CWE690_NULL_Deref_From_Return; import testcasesupport.*; import java.sql.*; import javax.servlet.http.*; public class CWE690_NULL_Deref_From_Return__getParameter_Servlet_equals_54b { public void bad_sink(String data , HttpServletRequest request, HttpServletResponse response) throws Throwable { (new CWE690_NULL_Deref_From_Return__getParameter_Servlet_equals_54c()).bad_sink(data , request, response); } /* goodG2B() - use goodsource and badsink */ public void goodG2B_sink(String data , HttpServletRequest request, HttpServletResponse response) throws Throwable { (new CWE690_NULL_Deref_From_Return__getParameter_Servlet_equals_54c()).goodG2B_sink(data , request, response); } /* goodB2G() - use badsource and goodsink */ public void goodB2G_sink(String data , HttpServletRequest request, HttpServletResponse response) throws Throwable { (new CWE690_NULL_Deref_From_Return__getParameter_Servlet_equals_54c()).goodB2G_sink(data , request, response); } }
241a905019b144639f35abd68ed637c51079ca37
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
/ast_results/OpenWatch_OpenWatch-Android/app/OpenWatch/src/org/ale/openwatch/OWMissionAdapter.java
e3f6afab8338f34ca0a1fcbb3a36863ead26fbdb
[]
no_license
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
0564143d92f8024ff5fa6b659c2baebf827582b1
refs/heads/master
2020-07-13T13:53:40.297493
2019-01-11T11:51:18
2019-01-11T11:51:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,752
java
// isComment package org.ale.openwatch; import android.content.Context; import android.database.Cursor; import android.support.v4.widget.SimpleCursorAdapter; import android.text.format.DateUtils; import android.text.util.Linkify; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import com.nostra13.universalimageloader.core.ImageLoader; import org.ale.openwatch.constants.Constants; import org.ale.openwatch.constants.DBConstants; import java.text.ParseException; import java.util.regex.Matcher; import java.util.regex.Pattern; public class isClassOrIsInterface extends SimpleCursorAdapter { // isComment // isComment Linkify.TransformFilter isVariable = new Linkify.TransformFilter() { public final String isMethod(final Matcher isParameter, String isParameter) { return isNameExpr.isMethod(isIntegerConstant); } }; // isComment Pattern isVariable = isNameExpr.isMethod("isStringConstant"); String isVariable = "isStringConstant"; public isConstructor(Context isParameter, Cursor isParameter) { super(isNameExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr, new String[] {}, new int[] {}, isIntegerConstant); } @Override public void isMethod(View isParameter, Context isParameter, Cursor isParameter) { // isComment ViewCache isVariable = (ViewCache) isNameExpr.isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr); if (isNameExpr == null) { isNameExpr = new ViewCache(); isNameExpr.isFieldAccessExpr = (TextView) isNameExpr.isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr); isNameExpr.isFieldAccessExpr = (ImageView) isNameExpr.isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr); isNameExpr.isFieldAccessExpr = (TextView) isNameExpr.isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr); isNameExpr.isFieldAccessExpr = isNameExpr.isMethod(isNameExpr.isFieldAccessExpr); isNameExpr.isFieldAccessExpr = isNameExpr.isMethod(isNameExpr.isFieldAccessExpr); isNameExpr.isFieldAccessExpr = isNameExpr.isMethod(isNameExpr.isFieldAccessExpr); isNameExpr.isFieldAccessExpr = isNameExpr.isMethod(isNameExpr.isFieldAccessExpr); isNameExpr.isFieldAccessExpr = isNameExpr.isMethod(isNameExpr.isFieldAccessExpr); isNameExpr.isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr); } if (isNameExpr.isMethod(isNameExpr.isFieldAccessExpr) == null || isNameExpr.isMethod(isNameExpr.isFieldAccessExpr).isMethod("isStringConstant") == isIntegerConstant) isNameExpr.isFieldAccessExpr.isMethod(isNameExpr.isFieldAccessExpr); else { isNameExpr.isFieldAccessExpr.isMethod(isNameExpr.isMethod(isNameExpr.isFieldAccessExpr)); isNameExpr.isMethod(isNameExpr.isFieldAccessExpr, isNameExpr, isNameExpr, null, isNameExpr); isNameExpr.isFieldAccessExpr.isMethod(isNameExpr.isFieldAccessExpr); // isComment isNameExpr.isFieldAccessExpr.isMethod(null); } try { isNameExpr.isFieldAccessExpr.isMethod("isStringConstant" + isNameExpr.isMethod(isNameExpr.isFieldAccessExpr.isMethod(isNameExpr.isMethod(isNameExpr.isFieldAccessExpr)).isMethod())); } catch (ParseException isParameter) { isNameExpr.isMethod(); } isNameExpr.isFieldAccessExpr.isMethod(); if (isNameExpr.isFieldAccessExpr != isNameExpr.isMethod(isNameExpr.isMethod(isNameExpr.isFieldAccessExpr)) && isNameExpr.isMethod(isNameExpr.isFieldAccessExpr) != null && isNameExpr.isMethod(isNameExpr.isFieldAccessExpr).isMethod("isStringConstant") != isIntegerConstant) { isNameExpr.isMethod().isMethod(isNameExpr.isMethod(isNameExpr.isFieldAccessExpr), isNameExpr.isFieldAccessExpr); } else if (isNameExpr.isMethod(isNameExpr.isFieldAccessExpr) == null || isNameExpr.isMethod(isNameExpr.isFieldAccessExpr).isMethod("isStringConstant") == isIntegerConstant) { isNameExpr.isFieldAccessExpr.isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr); } isNameExpr.isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr.isMethod(isNameExpr.isFieldAccessExpr)); isNameExpr.isFieldAccessExpr = isNameExpr.isMethod(isNameExpr.isMethod(isNameExpr.isFieldAccessExpr)); } // isComment static class isClassOrIsInterface { TextView isVariable; TextView isVariable; ImageView isVariable; int isVariable; int isVariable; int isVariable; int isVariable; int isVariable; int isVariable; } }
e77470955860de6fba48adb17ba3efc9c72dd418
9282591635f3cf5a640800f2b643cd57048ed29f
/app/src/main/java/com/android/p2pflowernet/project/view/fragments/platformdata/rebatedata/DayAxisValueFormatter.java
1316aa7582c44257167b153296e22897de16042b
[]
no_license
AHGZ/B2CFlowerNetProject
de5dcbf2cbb67809b00f86639d592309d84b3283
b1556c4b633fa7c0c1463af94db9f91285070714
refs/heads/master
2020-03-09T17:27:14.889919
2018-04-10T09:36:33
2018-04-10T09:36:33
128,908,791
1
0
null
null
null
null
UTF-8
Java
false
false
837
java
package com.android.p2pflowernet.project.view.fragments.platformdata.rebatedata; import com.github.mikephil.charting.charts.BarLineChartBase; import com.github.mikephil.charting.components.AxisBase; import com.github.mikephil.charting.formatter.IAxisValueFormatter; import java.util.List; /** * Created by philipp on 02/06/16. */ public class DayAxisValueFormatter implements IAxisValueFormatter { private BarLineChartBase<?> chart; private String flag; private List<String> names; public DayAxisValueFormatter(BarLineChartBase<?> chart, String flag, List<String> name) { this.chart = chart; this.flag = flag; this.names = name; } @Override public String getFormattedValue(float value, AxisBase axis) { int index = (int) value; return names.get(index); } }
8862607ae82140273602bd9cfe36c66f69c8bc31
32ada64601dca2faf2ad0dae2dd5a080fd9ecc04
/timesheet/src/test/java/com/fastcode/timesheet/restcontrollers/extended/RolepermissionControllerTestExtended.java
f1f96a5269dc564703d2c287c77d8dd48cbf0017
[]
no_license
fastcoderepos/tbuchner-sampleApplication1
d61cb323aeafd65e3cfc310c88fc371e2344847d
0880d4ef63b6aeece6f4a715e24bfa94de178664
refs/heads/master
2023-07-09T02:59:47.254443
2021-08-11T16:48:27
2021-08-11T16:48:27
395,057,379
0
0
null
null
null
null
UTF-8
Java
false
false
594
java
package com.fastcode.timesheet.restcontrollers.extended; import com.fastcode.timesheet.restcontrollers.core.RolepermissionControllerTest; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @RunWith(SpringJUnit4ClassRunner.class) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, properties = "spring.profiles.active=test") public class RolepermissionControllerTestExtended extends RolepermissionControllerTest { //Add your custom code here }
dc622f6c739e678fe9a8b9bd55e8f8d423c52ae0
de3e295b4430a4f49edbed938dcad22f445d2911
/ResizableComponents/src/java/example/ResizeMouseListener.java
a5caa9c9ae5a94196843f0c2d7cd9975ffb56d43
[ "MIT" ]
permissive
kansasSamurai/java-swing-tips
5fd5e8dfada438e730ca4f440cc2c082b32cce56
649a738acf2a2560649ad8bd3634cb7042e1fa13
refs/heads/master
2022-11-17T14:44:13.562782
2022-10-30T15:05:02
2022-10-30T15:05:02
204,076,715
0
0
null
2019-08-23T22:15:06
2019-08-23T22:15:06
null
UTF-8
Java
false
false
7,483
java
// -*- mode:java; encoding:utf-8 -*- // vim:set fileencoding=utf-8: // @homepage@ package example; import java.awt.*; import java.awt.event.MouseEvent; import java.util.EnumSet; import java.util.Optional; import javax.swing.*; import javax.swing.event.MouseInputAdapter; public final class ResizeMouseListener extends MouseInputAdapter { private static final Dimension MIN = new Dimension(50, 50); private static final Dimension MAX = new Dimension(500, 500); private final Point startPos = new Point(); private final Rectangle startRect = new Rectangle(); private Cursor cursor; @Override public void mouseMoved(MouseEvent e) { JComponent c = (JComponent) e.getComponent(); ResizableBorder border = (ResizableBorder) c.getBorder(); c.setCursor(border.getResizeCursor(e)); } @Override public void mouseExited(MouseEvent e) { e.getComponent().setCursor(Cursor.getDefaultCursor()); } @Override public void mousePressed(MouseEvent e) { JComponent c = (JComponent) e.getComponent(); ResizableBorder border = (ResizableBorder) c.getBorder(); cursor = border.getResizeCursor(e); startPos.setLocation(SwingUtilities.convertPoint(c, e.getX(), e.getY(), null)); startRect.setBounds(c.getBounds()); Container parent = SwingUtilities.getAncestorOfClass(JLayeredPane.class, c); if (parent instanceof JLayeredPane) { ((JLayeredPane) parent).moveToFront(c); } } @Override public void mouseReleased(MouseEvent e) { startRect.setSize(0, 0); } // @see %JAVA_HOME%/src/javax/swing/plaf/basic/BasicInternalFrameUI.java @Override public void mouseDragged(MouseEvent e) { if (startRect.isEmpty()) { return; } Component c = e.getComponent(); Point p = SwingUtilities.convertPoint(c, e.getX(), e.getY(), null); int deltaX = startPos.x - p.x; int deltaY = startPos.y - p.y; Container parent = SwingUtilities.getUnwrappedParent(c); int cursorType = Optional.ofNullable(cursor).map(Cursor::getType).orElse(Cursor.DEFAULT_CURSOR); Directions.getByCursorType(cursorType).ifPresent(dir -> { Point delta = getLimitedDelta(cursorType, parent.getBounds(), deltaX, deltaY); c.setBounds(dir.getBounds(startRect, delta)); }); parent.revalidate(); } private int getDeltaX(int dx) { int left = Math.min(MAX.width - startRect.width, startRect.x); return Math.max(Math.min(dx, left), MIN.width - startRect.width); // int deltaX = dx; // if (deltaX < MIN.width - startingBounds.width) { // deltaX = MIN.width - startingBounds.width; // } else if (deltaX > MAX.width - startingBounds.width) { // deltaX = MAX.width - startingBounds.width; // } // if (startingBounds.x < deltaX) { // deltaX = startingBounds.x; // } // return deltaX; } private int getDeltaX(int dx, Rectangle pr) { int right = Math.max(startRect.width - MAX.width, startRect.x + startRect.width - pr.width); return Math.min(Math.max(dx, right), startRect.width - MIN.width); // int deltaX = dx; // if (startingBounds.width - MIN.width < deltaX) { // deltaX = startingBounds.width - MIN.width; // } else if (startingBounds.width - MAX.width > deltaX) { // deltaX = startingBounds.width - MAX.width; // } // if (startingBounds.x + startingBounds.width - pr.width > deltaX) { // deltaX = startingBounds.x + startingBounds.width - pr.width; // } // return deltaX; } private int getDeltaY(int dy) { int top = Math.min(MAX.height - startRect.height, startRect.y); return Math.max(Math.min(dy, top), MIN.height - startRect.height); // int deltaY = dy; // if (deltaY < MIN.height - startingBounds.height) { // deltaY = MIN.height - startingBounds.height; // } else if (deltaY > MAX.height - startingBounds.height) { // deltaY = MAX.height - startingBounds.height; // } // if (deltaY < startingBounds.y) { // deltaY = startingBounds.y; // } // return deltaY; } private int getDeltaY(int dy, Rectangle pr) { int maxHeight = startRect.height - MAX.height; int bottom = Math.max(maxHeight, startRect.y + startRect.height - pr.height); return Math.min(Math.max(dy, bottom), startRect.height - MIN.height); // int deltaY = dy; // if (startingBounds.height - MIN.height < deltaY) { // deltaY = startingBounds.height - MIN.height; // } else if (startingBounds.height - MAX.height > deltaY) { // deltaY = startingBounds.height - MAX.height; // } // if (startingBounds.y + startingBounds.height - deltaY > pr.height) { // deltaY = startingBounds.y + startingBounds.height - pr.height; // } // return deltaY; } private Point getLimitedDelta(int cursorType, Rectangle pr, int deltaX, int deltaY) { switch (cursorType) { case Cursor.N_RESIZE_CURSOR: return new Point(0, getDeltaY(deltaY)); case Cursor.S_RESIZE_CURSOR: return new Point(0, getDeltaY(deltaY, pr)); case Cursor.W_RESIZE_CURSOR: return new Point(getDeltaX(deltaX), 0); case Cursor.E_RESIZE_CURSOR: return new Point(getDeltaX(deltaX, pr), 0); case Cursor.NW_RESIZE_CURSOR: return new Point(getDeltaX(deltaX), getDeltaY(deltaY)); case Cursor.SW_RESIZE_CURSOR: return new Point(getDeltaX(deltaX), getDeltaY(deltaY, pr)); case Cursor.NE_RESIZE_CURSOR: return new Point(getDeltaX(deltaX, pr), getDeltaY(deltaY)); case Cursor.SE_RESIZE_CURSOR: return new Point(getDeltaX(deltaX, pr), getDeltaY(deltaY, pr)); default: return new Point(deltaX, deltaY); } } } enum Directions { NORTH(Cursor.N_RESIZE_CURSOR) { @Override Rectangle getBounds(Rectangle r, Point d) { return new Rectangle(r.x, r.y - d.y, r.width, r.height + d.y); } }, SOUTH(Cursor.S_RESIZE_CURSOR) { @Override Rectangle getBounds(Rectangle r, Point d) { return new Rectangle(r.x, r.y, r.width, r.height - d.y); } }, WEST(Cursor.W_RESIZE_CURSOR) { @Override Rectangle getBounds(Rectangle r, Point d) { return new Rectangle(r.x - d.x, r.y, r.width + d.x, r.height); } }, EAST(Cursor.E_RESIZE_CURSOR) { @Override Rectangle getBounds(Rectangle r, Point d) { return new Rectangle(r.x, r.y, r.width - d.x, r.height); } }, NORTH_WEST(Cursor.NW_RESIZE_CURSOR) { @Override Rectangle getBounds(Rectangle r, Point d) { return new Rectangle(r.x - d.x, r.y - d.y, r.width + d.x, r.height + d.y); } }, NORTH_EAST(Cursor.NE_RESIZE_CURSOR) { @Override Rectangle getBounds(Rectangle r, Point d) { return new Rectangle(r.x, r.y - d.y, r.width - d.x, r.height + d.y); } }, SOUTH_WEST(Cursor.SW_RESIZE_CURSOR) { @Override Rectangle getBounds(Rectangle r, Point d) { return new Rectangle(r.x, r.y, r.width, r.height); } }, SOUTH_EAST(Cursor.SE_RESIZE_CURSOR) { @Override Rectangle getBounds(Rectangle r, Point d) { return new Rectangle(r.x, r.y, r.width - d.x, r.height - d.y); } }, MOVE(Cursor.MOVE_CURSOR) { @Override Rectangle getBounds(Rectangle r, Point d) { return new Rectangle(r.x - d.x, r.y - d.y, r.width, r.height); } }; private final int cursor; Directions(int cursor) { this.cursor = cursor; } abstract Rectangle getBounds(Rectangle rect, Point delta); public static Optional<Directions> getByCursorType(int cursor) { return EnumSet.allOf(Directions.class).stream().filter(d -> d.cursor == cursor).findFirst(); } }
025f3ee4393e248483f9410781e3821706c0e97b
4165b5504e596ca7a93d8e9fe03d3e7b67c19701
/app/src/main/java/com/example/christianescobar/myapplication/PDFCreator.java
e01f4ce5866e1fb979e8e8be444ac764665c95fd
[]
no_license
Cd246810/SAAndroid
9af5c3a680067adef5e218e159e6995de200c21f
0195e13c0d104b5d35c00eaca81ba23ba236bf9c
refs/heads/master
2021-07-25T09:16:56.613617
2017-10-28T16:40:25
2017-10-28T16:40:25
106,592,101
0
0
null
null
null
null
UTF-8
Java
false
false
517
java
package com.example.christianescobar.myapplication; import com.itextpdf.text.BaseColor; import com.itextpdf.text.Document; import com.itextpdf.text.DocumentException; import com.itextpdf.text.Font; import com.itextpdf.text.Paragraph; import com.itextpdf.text.pdf.PdfWriter; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.text.SimpleDateFormat; import java.util.Date; /** * Created by kevinj on 27/10/17. */ public class PDFCreator { }
3eff8a4033e550980701142e8813a83863a25e2b
d3edc0eabe676683b7d795a5c8aec638d6ff6245
/branches/mockz/anacom/src/main/java/pt/ist/anacom/replication/quorumresponse/QuorumVersionResponse.java
5e28cfb6de7b4e8e602bc566fcf2b8d40c77f36c
[]
no_license
jfloff/ANA.COM
4cef8e3b2871e90aa8c89bf44cec5ecfa34d11fb
30506dcafa92bcd0189281fefb0bf4d7427d27d4
refs/heads/master
2021-01-22T03:14:10.824984
2013-03-28T12:44:09
2013-03-28T12:44:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,093
java
package pt.ist.anacom.replication.quorumresponse; import java.util.concurrent.ExecutionException; import javax.xml.ws.AsyncHandler; import javax.xml.ws.Response; import pt.ist.anacom.replication.CommandStrategy; public class QuorumVersionResponse extends QuorumResponse implements AsyncHandler<Integer> { public QuorumVersionResponse(String replicaURL, CommandStrategy command) { super(replicaURL, command); } @Override public void handleResponse(Response<Integer> res) { try { // TODO devolver esta versao e fazer qq coisa com ela Integer replicaResponse = res.get(); System.out.println(">>>> [LOG]REPLICA VERSION AFTER: " + replicaResponse); } catch (InterruptedException e) { System.out.println("[QUORUM] Throwing original exception type is " + e.getCause().getClass().getName()); super.setException(e); } catch (ExecutionException e) { super.setException(e); } finally { CommandStrategy.quorumCounter.incrementAndGet(); } } }
f4a13c7abb50a92c595c1611fb66d04073a77edb
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
/project101/src/main/java/org/gradle/test/performance/largejavamultiproject/project101/p506/Production10137.java
1ca0c4d9cc55be03125402ad9daf0a8befd21d28
[]
no_license
big-guy/largeJavaMultiProject
405cc7f55301e1fd87cee5878a165ec5d4a071aa
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
refs/heads/main
2023-03-17T10:59:53.226128
2021-03-04T01:01:39
2021-03-04T01:01:39
344,307,977
0
0
null
null
null
null
UTF-8
Java
false
false
1,970
java
package org.gradle.test.performance.largejavamultiproject.project101.p506; public class Production10137 { private Production10134 property0; public Production10134 getProperty0() { return property0; } public void setProperty0(Production10134 value) { property0 = value; } private Production10135 property1; public Production10135 getProperty1() { return property1; } public void setProperty1(Production10135 value) { property1 = value; } private Production10136 property2; public Production10136 getProperty2() { return property2; } public void setProperty2(Production10136 value) { property2 = value; } private String property3; public String getProperty3() { return property3; } public void setProperty3(String value) { property3 = value; } private String property4; public String getProperty4() { return property4; } public void setProperty4(String value) { property4 = value; } private String property5; public String getProperty5() { return property5; } public void setProperty5(String value) { property5 = value; } private String property6; public String getProperty6() { return property6; } public void setProperty6(String value) { property6 = value; } private String property7; public String getProperty7() { return property7; } public void setProperty7(String value) { property7 = value; } private String property8; public String getProperty8() { return property8; } public void setProperty8(String value) { property8 = value; } private String property9; public String getProperty9() { return property9; } public void setProperty9(String value) { property9 = value; } }
37bce384a1eed6ef775bb2f7324e89aaa79a83bb
8979fc82ea7b34410b935fbea0151977a0d46439
/src/all_problems/P1238_CircularPermutationInBinaryRepresentation.java
a36c15c5de76989256fda818da8575bce4f4670c
[ "MIT" ]
permissive
YC-S/LeetCode
6fa3f4e46c952b3c6bf5462a8ee0c1186ee792bd
452bb10e45de53217bca52f8c81b3034316ffc1b
refs/heads/master
2021-11-06T20:51:31.554936
2021-10-31T03:39:38
2021-10-31T03:39:38
235,529,949
1
0
null
null
null
null
UTF-8
Java
false
false
360
java
package all_problems; import java.util.ArrayList; import java.util.List; public class P1238_CircularPermutationInBinaryRepresentation { public List<Integer> circularPermutation(int n, int start) { List<Integer> res = new ArrayList<>(); for (int i = 0; i < 1 << n; ++i) res.add(start ^ i ^ i >> 1); return res; } }
15c05835c03361785100c0535ce80221c12224d3
b9c4ecc88aa5a63f553086632b1ff9ab9194b29a
/Chapter02/Recipe2-17/src/main/java/net/homenet/s1/ArithmeticCalculatorImpl.java
7e9d68ac7ceff1ba98cbea6a9c09c66909714959
[]
no_license
mousesd/Spring5Recipe
69c2fcf719274fb1f53de59289684734fff0225e
fa3cbcb83de41ab02150443c14068954fa0ab9f0
refs/heads/master
2020-03-31T01:59:05.007582
2019-02-13T15:33:42
2019-02-13T15:33:42
151,796,669
0
0
null
null
null
null
UTF-8
Java
false
false
1,068
java
package net.homenet.s1; import org.springframework.stereotype.Component; @Component("arithmeticCalculator") public class ArithmeticCalculatorImpl implements ArithmeticCalculator { @Override @LoggingRequired public double add(double x, double y) { double result = x + y; System.out.println(x + "+" + y + "=" + result); return result; } @Override @LoggingRequired public double sub(double x, double y) { double result = x - y; System.out.println(x + "-" + y + "=" + result); return result; } @Override @LoggingRequired public double mul(double x, double y) { double result = x * y; System.out.println(x + "*" + y + "=" + result); return result; } @Override @LoggingRequired public double div(double x, double y) { if (y == 0) { throw new IllegalArgumentException("Division by zero"); } double result = x / y; System.out.println(x + "/" + y + "=" + result); return result; } }
998b563101d6ed805d4806515c0632a02dee466b
1132cef0ea0246b0ef505ee8daa3cdb342499fbc
/LeetCode/src/Top100/Serialize_and_Deserialize_Binary_Tree.java
0018d9befb0b3393815d9696da3bb17453c3fa35
[]
no_license
zhhaochen/Algorithm
fd92a748fd727700abba8ad92db0d72663058666
509a8f29f00ed665182c8314c11c5a67b023701f
refs/heads/master
2023-07-02T08:14:13.918245
2021-08-05T16:31:08
2021-08-05T16:31:08
288,951,652
0
0
null
null
null
null
UTF-8
Java
false
false
1,301
java
package Top100; /** * 2020.11.26 * 对一棵二叉树编码为字符串,然后能将字符串解码一棵二叉树 */ public class Serialize_and_Deserialize_Binary_Tree { String SEP = ","; String NULL = "#"; int index; // Encodes a tree to a single string. public String serialize(TreeNode root) { StringBuilder sb = new StringBuilder(); serialize(root, sb); return sb.toString(); } private void serialize(TreeNode root, StringBuilder sb){ if (root == null){ sb.append(NULL).append(SEP); return; } sb.append(root.val).append(SEP); serialize(root.left, sb); serialize(root.right, sb); } // Decodes your encoded data to tree. public TreeNode deserialize(String data) { String[] nodes = data.split(SEP); index = 0; return deserialize(nodes); } public TreeNode deserialize(String[] nodes){ if (index >= nodes.length){ return null; } if (nodes[index].equals("#")){ index++; return null; } TreeNode root = new TreeNode(Integer.valueOf(nodes[index++])); root.left = deserialize(nodes); root.right = deserialize(nodes); return root; } }
20dc43196cc5d75610e1fa02bb622964385ab355
8862f7c427e4aeb0b2648bfc04f239df6e1c0f9c
/src/main/java/org/thinkium/blockchain/web3j/abi/datatypes/generated/Uint256.java
49148ecb8848bad075d278656e39cd04863f11bb
[]
no_license
ThinkiumGroup/web3j
7f35b98c9d472087ec052397fb0d135efb7d23d8
ca411412acb9f0ed112c51abeb43f4a6e6e84d04
refs/heads/master
2023-05-30T10:20:35.635076
2021-06-25T11:24:51
2021-06-25T11:24:51
335,264,176
2
0
null
null
null
null
UTF-8
Java
false
false
649
java
package org.thinkium.blockchain.web3j.abi.datatypes.generated; import org.thinkium.blockchain.web3j.abi.datatypes.Uint; import java.math.BigInteger; /** * Auto generated code. * <p><strong>Do not modifiy!</strong> * <p>Please use org.web3j.codegen.AbiTypesGenerator in the * <a href="https://github.com/web3j/web3j/tree/master/codegen">codegen module</a> to update. */ public class Uint256 extends Uint { public static final Uint256 DEFAULT = new Uint256(BigInteger.ZERO); public Uint256(BigInteger value) { super(256, value); } public Uint256(long value) { this(BigInteger.valueOf(value)); } }
c0e1a241a98987e9a6ec8197eded3f481168f40f
6fa701cdaa0d83caa0d3cbffe39b40e54bf3d386
/google/cloud/documentai/v1beta3/google-cloud-documentai-v1beta3-java/proto-google-cloud-documentai-v1beta3-java/src/main/java/com/google/cloud/documentai/v1beta3/FetchProcessorTypesResponseOrBuilder.java
e7f2e096ab1f45cc05cceeb49e8dfdaa7c64d8c8
[ "Apache-2.0" ]
permissive
oltoco/googleapis-gen
bf40cfad61b4217aca07068bd4922a86e3bbd2d5
00ca50bdde80906d6f62314ef4f7630b8cdb6e15
refs/heads/master
2023-07-17T22:11:47.848185
2021-08-29T20:39:47
2021-08-29T20:39:47
null
0
0
null
null
null
null
UTF-8
Java
false
true
1,696
java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/documentai/v1beta3/document_processor_service.proto package com.google.cloud.documentai.v1beta3; public interface FetchProcessorTypesResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.FetchProcessorTypesResponse) com.google.protobuf.MessageOrBuilder { /** * <pre> * The list of processor types. * </pre> * * <code>repeated .google.cloud.documentai.v1beta3.ProcessorType processor_types = 1;</code> */ java.util.List<com.google.cloud.documentai.v1beta3.ProcessorType> getProcessorTypesList(); /** * <pre> * The list of processor types. * </pre> * * <code>repeated .google.cloud.documentai.v1beta3.ProcessorType processor_types = 1;</code> */ com.google.cloud.documentai.v1beta3.ProcessorType getProcessorTypes(int index); /** * <pre> * The list of processor types. * </pre> * * <code>repeated .google.cloud.documentai.v1beta3.ProcessorType processor_types = 1;</code> */ int getProcessorTypesCount(); /** * <pre> * The list of processor types. * </pre> * * <code>repeated .google.cloud.documentai.v1beta3.ProcessorType processor_types = 1;</code> */ java.util.List<? extends com.google.cloud.documentai.v1beta3.ProcessorTypeOrBuilder> getProcessorTypesOrBuilderList(); /** * <pre> * The list of processor types. * </pre> * * <code>repeated .google.cloud.documentai.v1beta3.ProcessorType processor_types = 1;</code> */ com.google.cloud.documentai.v1beta3.ProcessorTypeOrBuilder getProcessorTypesOrBuilder( int index); }
[ "bazel-bot-development[bot]@users.noreply.github.com" ]
bazel-bot-development[bot]@users.noreply.github.com
585e2cd166a0676992d21eaf98896eb4d69f66f5
d1f18a98261ef1d870afb5b705387a34fa1ae8d4
/offer-algorithm/src/main/java/leetcode/problems/Test0973_最接近原点的K个点.java
5ff098dda1093e2ac489ea86ceaae0aa6643dd7a
[]
no_license
luguanxing/Offer-Algorithm
6472cca1bcd4b51a9b603226a787f18acfe521a9
7ec579a5359295b4f1b23f0afd551f434184a61e
refs/heads/master
2023-09-01T05:36:46.417275
2023-09-01T02:18:56
2023-09-01T02:18:56
244,928,773
0
0
null
null
null
null
UTF-8
Java
false
false
1,485
java
package leetcode.problems; import java.util.Arrays; import java.util.Comparator; import java.util.List; import java.util.stream.Collectors; public class Test0973_最接近原点的K个点 { public static void main(String[] args) { for (int[] nums : new Solution().kClosest( new int[][]{{1, 3}, {-2, 2}}, 1 )) { System.out.println(Arrays.toString(nums)); } System.out.println(); for (int[] nums : new Solution().kClosest( new int[][]{{3, 3}, {5, -1}, {-2, 4}}, 2 )) { System.out.println(Arrays.toString(nums)); } } static class Solution { public int[][] kClosest(int[][] points, int K) { List<Point> pointList = Arrays .stream(points) .map(Point::new) .collect(Collectors.toList()); pointList.sort(Comparator.comparingDouble(o -> o.distance)); int[][] res = new int[K][2]; for (int i = 0; i < K; i++) { res[i][0] = pointList.get(i).point[0]; res[i][1] = pointList.get(i).point[1]; } return res; } static class Point { int[] point; double distance; public Point(int[] point) { this.point = point; this.distance = Math.sqrt(point[0] * point[0] + point[1] * point[1]); } } } }
ad5e744b6a51ae0a9883582589999b67c3d1911f
76c4bcdf127c0109e899ccaba8ce80bd4bbe0fe7
/src/com/situ/mall/common/ServerResponse.java
387a0ed61928c312466dc1c4c196b83e5ed7ef33
[]
no_license
GaoChengQuan/Java1711Mall
77ef0f4e18992e45eafb3368b1e353f108e65ce9
59c10b5b8370e6a563d419e7b7d9dc86cf79e187
refs/heads/master
2021-05-04T15:55:23.497085
2018-02-27T08:47:35
2018-02-27T08:47:35
120,240,746
0
0
null
null
null
null
UTF-8
Java
false
false
2,689
java
package com.situ.mall.common; import java.io.Serializable; public class ServerResponse<T> implements Serializable { //当前状态(程序员判断状态):成功、失败、未登录、没有权限 private Integer code; //描述信息(主要是给用户看的提示信息) private String msg; //总数量 private Integer count; //后台返回给前端的数据 private T data; private ServerResponse() { } private ServerResponse(Integer code) { this.code = code; } private ServerResponse(Integer code, String msg) { this.code = code; this.msg = msg; } private ServerResponse(Integer code, String msg, T data) { this.code = code; this.msg = msg; this.data = data; } private ServerResponse(Integer code, String msg, Integer count, T data) { this.code = code; this.msg = msg; this.count = count; this.data = data; } //只是告诉前台:成功这种状态 public static <T> ServerResponse<T> createSuccess() { return new ServerResponse<>(ResponseCode.SUCCESS.getCode()); } //告诉前台:code,msg public static <T> ServerResponse<T> createSuccess(String msg) { return new ServerResponse<>(ResponseCode.SUCCESS.getCode(), msg); } //告诉前台:code,msg,data public static <T> ServerResponse<T> createSuccess(String msg, T data) { return new ServerResponse<>(ResponseCode.SUCCESS.getCode(), msg, data); } //告诉前台:code,msg,count,data public static <T> ServerResponse<T> createSuccess(String msg, Integer count, T data) { return new ServerResponse<>(ResponseCode.SUCCESS.getCode(), msg, count, data); } //只是告诉前台:失败这种状态 public static <T> ServerResponse<T> createError() { return new ServerResponse<>(ResponseCode.ERROR.getCode()); } //告诉前台:code,msg public static <T> ServerResponse<T> createError(String msg) { return new ServerResponse<>(ResponseCode.ERROR.getCode(), msg); } //告诉前台:code,msg,data public static <T> ServerResponse<T> createError(String msg, T data) { return new ServerResponse<>(ResponseCode.ERROR.getCode(), msg, data); } public boolean isSuccess() { return code == ResponseCode.SUCCESS.getCode(); } public Integer getCode() { return code; } public void setCode(Integer code) { this.code = code; } public String getMsg() { return msg; } public void setMsg(String msg) { this.msg = msg; } public T getData() { return data; } public void setData(T data) { this.data = data; } public Integer getCount() { return count; } public void setCount(Integer count) { this.count = count; } public static void main(String[] args) { System.out.println(ResponseCode.ERROR.getCode()); } }
ac88792c7ecc7fc18c0544c6c9578f46de9dc8b7
09b7f281818832efb89617d6f6cab89478d49930
/root/projects/repository/source/java/org/alfresco/repo/avm/FileNodeImpl.java
1051cca39d5a5bbadfd264c9048ae90eb371d8a1
[]
no_license
verve111/alfresco3.4.d
54611ab8371a6e644fcafc72dc37cdc3d5d8eeea
20d581984c2d22d5fae92e1c1674552c1427119b
refs/heads/master
2023-02-07T14:00:19.637248
2020-12-25T10:19:17
2020-12-25T10:19:17
323,932,520
1
1
null
null
null
null
UTF-8
Java
false
false
1,176
java
/* * Copyright (C) 2005-2010 Alfresco Software Limited. * * This file is part of Alfresco * * Alfresco is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Alfresco is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with Alfresco. If not, see <http://www.gnu.org/licenses/>. */ package org.alfresco.repo.avm; /** * Base class for file objects. * @author britt */ abstract class FileNodeImpl extends AVMNodeImpl implements FileNode { /** * Default constructor. */ protected FileNodeImpl() { } /** * Pass through constructor. * @param store The AVMStore we belong to. */ public FileNodeImpl(AVMStore store) { super(store); } }
e5943be16b1bfcfc1a835ab05827bde79937df05
0f499ceae729734a0f5a17e4e1e26e393e6ede19
/ITvKurzeSources/webinar 31/src/sk/itvkurze/swing/_34_dialogove_okna_a_formulare/gui/Aplikacia.java
e8d01d182899ae939d1f00942386473ba1e87f22
[]
no_license
marekpatarak/personal-workspace
5dbd7f50463c33cc151f8c8a9536949e72c7db58
95374b842e925531ea20bd7ff3fb342d9561e0fb
refs/heads/master
2022-12-23T09:12:02.659254
2019-10-02T14:09:29
2019-10-02T14:09:29
149,508,965
0
0
null
2022-12-16T00:40:38
2018-09-19T20:33:44
Java
UTF-8
Java
false
false
292
java
package sk.itvkurze.swing._34_dialogove_okna_a_formulare.gui; import javax.swing.SwingUtilities; public class Aplikacia { public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { new HlavneOkno(); } }); } }