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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6ca8ffd178be618daec4de9c8c5cc9705cce5371 | 449fa9d6c2a31395231c074a45d17b9a3d63e174 | /seria-protobuf-server/src/main/java/com/yicj/study/handler/SubReqServerHandler.java | d83b433828be1a8fbb8edc4465e1b9b4ab0cc9c7 | [] | no_license | yichengjie/netty-study | 6d3f477331d7be7628a3f1bba3884c0d8b954f21 | 23333079a3231167169791a88bc50e5a47799efa | refs/heads/master | 2022-10-20T14:34:52.428901 | 2019-10-21T13:36:11 | 2019-10-21T13:36:11 | 206,328,508 | 1 | 0 | null | 2022-10-04T23:55:20 | 2019-09-04T13:40:52 | Java | UTF-8 | Java | false | false | 1,403 | java | package com.yicj.study.handler;
import com.yicj.study.proto.SubscribeReqProto;
import com.yicj.study.proto.SubscribeRespProto;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class SubReqServerHandler extends ChannelInboundHandlerAdapter {
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
//log.info("SubReqServerHandler channelRead method is call ...");
//经过解码器handler ObjectDecoder的解码
//SubReqServerHandler接收到的请求消息已经被自动解码为SubscribeReq对象,可以直接使用
SubscribeReqProto.SubscribeReq req = (SubscribeReqProto.SubscribeReq)msg ;
log.info("服务器接收客户端消息是 : " + req.toString());
ctx.writeAndFlush(resp(req.getSubReqId())) ;
}
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
log.error("出错 : " ,cause);
ctx.close() ;
}
private SubscribeRespProto.SubscribeResp resp (int subReqId){
SubscribeRespProto.SubscribeResp.Builder builder =
SubscribeRespProto.SubscribeResp.newBuilder() ;
builder.setSubReqId(subReqId) ;
builder.setRespCode(200) ;
builder.setDesc("网上预订成功3天后,发送到指定的地址") ;
return builder.build() ;
}
}
| [
"626659321@qq.com"
] | 626659321@qq.com |
cf27e5cd8bd83deeec2ff4960c1b69859d288ca6 | 92225460ebca1bb6a594d77b6559b3629b7a94fa | /src/com/kingdee/eas/fdc/schedule/app/AbstractScheduleBizTypeListUIHandler.java | 4acd9d3b4b45f915dab2bd34ac36d17ff3fdc532 | [] | no_license | yangfan0725/sd | 45182d34575381be3bbdd55f3f68854a6900a362 | 39ebad6e2eb76286d551a9e21967f3f5dc4880da | refs/heads/master | 2023-04-29T01:56:43.770005 | 2023-04-24T05:41:13 | 2023-04-24T05:41:13 | 512,073,641 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 391 | java | /**
* output package name
*/
package com.kingdee.eas.fdc.schedule.app;
import com.kingdee.bos.Context;
import com.kingdee.eas.framework.batchHandler.RequestContext;
import com.kingdee.eas.framework.batchHandler.ResponseContext;
/**
* output class name
*/
public abstract class AbstractScheduleBizTypeListUIHandler extends com.kingdee.eas.fdc.basedata.app.FDCBaseDataListUIHandler
{
} | [
"yfsmile@qq.com"
] | yfsmile@qq.com |
84e7ee8b44e5c0017c6bc7472949f26b0f24270a | d07afaf5c031f6ea88f04370dad8444721b2b3bd | /basiclib/src/main/java/com/jnyilin/basiclib/utils/webViewUtils/MiddleWareChromeClient.java | 07e3899dc67e44ac82ece87294b8f69308e15b20 | [] | no_license | Akoasm/aichediandianBussiness | 4aee383de61a2b36dc39dd92eb3189c960ece202 | 0d9abdccf1aa55753d41c8fe185f8b5f6b0097b2 | refs/heads/master | 2020-03-18T11:19:46.516911 | 2018-05-24T05:21:37 | 2018-05-24T05:21:37 | 134,664,513 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 777 | java | package com.jnyilin.basiclib.utils.webViewUtils;
import android.util.Log;
import android.webkit.JsResult;
import android.webkit.WebView;
import com.just.agentweb.MiddleWareWebChromeBase;
/**
* @author HRR
* @datetime 2018/2/2
* @describe
* @modifyRecord
*/
public class MiddleWareChromeClient extends MiddleWareWebChromeBase {
public MiddleWareChromeClient() {
}
@Override
public boolean onJsAlert(WebView view, String url, String message, JsResult result) {
Log.i("Info","onJsAlert:"+url);
return super.onJsAlert(view, url, message, result);
}
@Override
public void onProgressChanged(WebView view, int newProgress) {
super.onProgressChanged(view, newProgress);
Log.i("Info","onProgressChanged:");
}
}
| [
"837578092@qq.com"
] | 837578092@qq.com |
96b511cb5dc6edb2c00ad439ceaf352d1ddc4262 | 5d7c8d78e72ae3ea6e61154711fdd23248c19614 | /sources/com/google/zxing/oned/UPCAWriter.java | 01019783e1a38cf516b1deaf94262c69e466d52f | [] | no_license | activeliang/tv.taobao.android | 8058497bbb45a6090313e8445107d987d676aff6 | bb741de1cca9a6281f4c84a6d384333b6630113c | refs/heads/master | 2022-11-28T10:12:53.137874 | 2020-08-06T05:43:15 | 2020-08-06T05:43:15 | 285,483,760 | 7 | 6 | null | null | null | null | UTF-8 | Java | false | false | 968 | java | package com.google.zxing.oned;
import com.google.zxing.BarcodeFormat;
import com.google.zxing.EncodeHintType;
import com.google.zxing.Writer;
import com.google.zxing.WriterException;
import com.google.zxing.common.BitMatrix;
import java.util.Map;
public final class UPCAWriter implements Writer {
private final EAN13Writer subWriter = new EAN13Writer();
public BitMatrix encode(String contents, BarcodeFormat format, int width, int height) throws WriterException {
return encode(contents, format, width, height, (Map<EncodeHintType, ?>) null);
}
public BitMatrix encode(String contents, BarcodeFormat format, int width, int height, Map<EncodeHintType, ?> hints) throws WriterException {
if (format == BarcodeFormat.UPC_A) {
return this.subWriter.encode("0" + contents, BarcodeFormat.EAN_13, width, height, hints);
}
throw new IllegalArgumentException("Can only encode UPC-A, but got " + format);
}
}
| [
"activeliang@gmail.com"
] | activeliang@gmail.com |
94338b052d36a48acf68f39744b1fa0473d5b005 | aeedb1c5d4e4d82f01c78df95fe8606030f1c5ed | /java/vernacular/semantics/dev/d03/src/main/java/org/ppwcode/i18n_I/ResourceBundleLoadStrategy.java | 82bedbcb86786fdaabb76107735ce8c767e08d9a | [
"Apache-2.0"
] | permissive | jandppw/ppwcode-recovered-from-google-code | 8cca772cbd76d4fcf97e5f98422039ec56b73b98 | 7878d1c1c9efff2982d73e4b10fd141f78e7c200 | refs/heads/master | 2021-01-10T08:53:28.688114 | 2015-04-05T14:24:28 | 2015-04-05T14:24:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,228 | java | /*<license>
Copyright 2004 - $Date$ by PeopleWare n.v..
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.
</license>*/
package org.ppwcode.i18n_I;
import static org.ppwcode.metainfo_I.License.Type.APACHE_V2;
import java.util.ResourceBundle;
import org.ppwcode.metainfo_I.Copyright;
import org.ppwcode.metainfo_I.License;
import org.ppwcode.metainfo_I.vcs.SvnInfo;
import org.toryt.annotations_I.Expression;
import org.toryt.annotations_I.MethodContract;
/**
* <p>Strategy pattern to load i18n resource bundles.</p>
* <p>The strategy to find a resource bundle in an i18n context is different in
* different deployments environments. E.g., the strategy is different for
* general Swing applications, JSTL <code>fmt</code> tags, Struts and JSF.</p>
* <p> Classes that need to access resources based on a
* {@link java.util.Locale locale}, can use an instance of this strategy at
* runtime to have it load a resource bundle for them.</p>
*
* @author Jan Dockx
* @author PeopleWare n.v.
*/
@Copyright("2004 - $Date$, PeopleWare n.v.")
@License(APACHE_V2)
@SvnInfo(revision = "$Revision$",
date = "$Date$")
public interface ResourceBundleLoadStrategy {
/**
* Try to load the resource bundle with name <code>basename</code>,
* according to the strategy implemented in this type. If no matching
* resource bundle can be found with this strategy, <code>null</code>
* is returned.
*
* @param basename
* The basename of the resource bundle that should be loaded.
*/
@MethodContract(
post = {
@Expression("_basename == null ? result == null"),
@Expression("_basename == EMPTY ? result == null")
}
)
ResourceBundle loadResourceBundle(final String basename);
}
| [
"jandockx@463e38ab-4f4e-0410-907a-65d2b3888964"
] | jandockx@463e38ab-4f4e-0410-907a-65d2b3888964 |
dfaa2fe345a163ac3247a7a2120d0b8ba9a16b71 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/33/33_9b1b5239629d8e6282f94693a643193e9deae4ef/BaseApplicationModelWizard/33_9b1b5239629d8e6282f94693a643193e9deae4ef_BaseApplicationModelWizard_s.java | 77af7fa83ae99b4dfbe324d44d13505ee1529bf3 | [] | 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 | 6,603 | java | /*******************************************************************************
* Copyright (c) 2010 BestSolution.at and others.
* 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:
* Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
******************************************************************************/
package org.eclipse.e4.internal.tools.wizards.model;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.IWorkbenchWizard;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.actions.WorkspaceModifyOperation;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.part.ISetSelectionTarget;
public abstract class BaseApplicationModelWizard extends Wizard implements INewWizard {
private NewModelFilePage page;
private ISelection selection;
protected IWorkbench workbench;
/**
* Constructor for NewApplicationModelWizard.
*/
public BaseApplicationModelWizard() {
super();
setNeedsProgressMonitor(true);
}
/**
* Adding the page to the wizard.
*/
public void addPages() {
page = createWizardPage(selection);
addPage(page);
}
protected abstract NewModelFilePage createWizardPage(ISelection selection);
public abstract String getDefaultFileName();
@Override
public boolean performFinish() {
try {
// Remember the file.
//
final IFile modelFile = getModelFile();
if( modelFile.exists() ) {
if( ! MessageDialog.openQuestion(getShell(), "File exists", "The file already exists. Would you like to overwrite?")) {
return false;
}
}
// Do the work within an operation.
//
WorkspaceModifyOperation operation =
new WorkspaceModifyOperation() {
@Override
protected void execute(IProgressMonitor progressMonitor) {
try {
// Create a resource set
//
ResourceSet resourceSet = new ResourceSetImpl();
// Get the URI of the model file.
//
URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true);
// Create a resource for this file.
//
Resource resource = resourceSet.createResource(fileURI);
// Add the initial model object to the contents.
//
EObject rootObject = createInitialModel();
if (rootObject != null) {
resource.getContents().add(rootObject);
}
// Save the contents of the resource to the file system.
//
Map<Object, Object> options = new HashMap<Object, Object>();
resource.save(options);
}
catch (Exception exception) {
throw new RuntimeException(exception);
}
finally {
progressMonitor.done();
}
}
};
getContainer().run(false, false, operation);
// Select the new file resource in the current view.
//
IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow();
IWorkbenchPage page = workbenchWindow.getActivePage();
final IWorkbenchPart activePart = page.getActivePart();
if (activePart instanceof ISetSelectionTarget) {
final ISelection targetSelection = new StructuredSelection(modelFile);
getShell().getDisplay().asyncExec
(new Runnable() {
public void run() {
((ISetSelectionTarget)activePart).selectReveal(targetSelection);
}
});
}
// Open an editor on the new file.
//
try {
page.openEditor
(new FileEditorInput(modelFile),
workbench.getEditorRegistry().getDefaultEditor(modelFile.getFullPath().toString()).getId());
}
catch (PartInitException exception) {
MessageDialog.openError(workbenchWindow.getShell(), "Could not init editor", exception.getMessage()); //$NON-NLS-1$
return false;
}
return true;
}
catch (Exception exception) {
exception.printStackTrace();
MessageDialog.openError(getShell(), "Error", exception.getMessage());
return false;
}
}
protected abstract EObject createInitialModel();
protected IFile getModelFile() throws CoreException {
String containerName = page.getContainerName();
String fileName = page.getFileName();
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
IResource resource = root.findMember(new Path(containerName));
if (!resource.exists() || !(resource instanceof IContainer)) {
throwCoreException("Container \"" + containerName
+ "\" does not exist.");
}
IContainer container = (IContainer) resource;
return container.getFile(new Path(fileName));
}
private void throwCoreException(String message) throws CoreException {
IStatus status = new Status(IStatus.ERROR,
"org.eclipse.e4.tools.emf.editor3x", IStatus.OK, message, null);
throw new CoreException(status);
}
/**
* We will accept the selection in the workbench to see if we can initialize
* from it.
*
* @see IWorkbenchWizard#init(IWorkbench, IStructuredSelection)
*/
public void init(IWorkbench workbench, IStructuredSelection selection) {
this.workbench = workbench;
this.selection = selection;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
e67633a3bc0bd5d49a7ec3fd0f31ba481c0ad4d9 | 96d7ceb6335c17433f29985a71a55e0cc66fb187 | /cspuuid/src/main/java/com/fintech/modules/uuid/service/UuidService.java | 8b655df9558e260c24a5b84159f2b85078e63cd4 | [] | no_license | EADjava/docker | e78e3c4e74e1f0fd2bb3e7ac453d8e2a5eb57dfc | acc06155cce1934a1bdb644b389c3e09e22f2963 | refs/heads/master | 2020-03-15T10:32:35.884053 | 2018-05-11T05:01:38 | 2018-05-11T05:01:38 | 132,101,175 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,964 | java | package com.fintech.modules.uuid.service;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* @author xujunqi
* @date: 2018/1/20 15:19
* @description: uuid 生成服务
*/
@Service
public class UuidService {
private Logger logger = LoggerFactory.getLogger(getClass());
// uuid redis 命名空间前缀
private final static String UUID_REDIS_KEY_PREFIX = "CSPUUID:BIZ:";
// 默认业务前缀, 也是rediskey的最后一位
private final static String DEFAULT_BIZ_PREFIX_KEY = "JY";
// uuid redis 默认KEY名称
private final static String DEFAULT_KEY = UUID_REDIS_KEY_PREFIX + DEFAULT_BIZ_PREFIX_KEY;
// 默认增量
private final static char PAD_CHAR = '0';
// 最大补齐长度
private final static int MAX_PAD_SIZE_8 = 8;
// 默认增量
private final static int DEFAULT_DELTA = 1;
@Autowired
private RedisTemplate<String, Object> redisTemplate;
public long generate() {
return generate(DEFAULT_KEY);
}
public Long generate(String key) {
if (StringUtils.isBlank(key)) {
key = DEFAULT_BIZ_PREFIX_KEY;
}
return generate(key, DEFAULT_DELTA);
}
public Long generate(String key, int delta) {
Assert.notNull(key, "key为空");
Assert.notNull(delta, "delta为空");
logger.debug("请求生成UUID-Long key={} delta={}", key, delta);
Long uuid = null;
try {
uuid = redisTemplate.opsForValue().increment(key, delta);
logger.debug("UUID-Long生成成功 key={} delta={} uuid={}", key, delta, uuid);
} catch (Exception e) {
logger.error("请求生成UUID-Long异常", e);
}
return uuid;
}
/**
* 生产UUID时是否追加bizKey
* @param key
* @param appendKey
* @return
*/
public String generateBizUuid(String key,boolean appendKey) {
String redisKey = key;
int padSize = MAX_PAD_SIZE_8;
if (StringUtils.isBlank(key)) {
key = "";
redisKey = DEFAULT_BIZ_PREFIX_KEY;
padSize = MAX_PAD_SIZE_8;
}
if(appendKey){
return this.generateBizUuid(key, redisKey, DEFAULT_DELTA, padSize);
}else{
return this.generateBizUuid("", redisKey, DEFAULT_DELTA, padSize);
}
}
public String generateBizUuid(String key, String redisKey, int delta, int padSize) {
Assert.notNull(redisKey, "redisKey为空");
Assert.notNull(delta, "delta为空");
logger.debug("请求生成UUID-Long key={} delta={}", key, delta);
String bizUuid = null;
try {
DateFormat df = new SimpleDateFormat("yyMMdd");
String dateStr = df.format(new Date());
String bizRedisKey = new StringBuffer(UUID_REDIS_KEY_PREFIX).append(redisKey).append(":").append("ID").toString();
String bizDateRedisKey = new StringBuffer(UUID_REDIS_KEY_PREFIX).append(redisKey).append(":").append("DATE").toString();
ValueOperations<String, Object> valueOps = redisTemplate.opsForValue();
Object redisDateObject = valueOps.get(bizDateRedisKey);
if (redisDateObject != null) {
String redisDateStr = (String) redisDateObject;
if (!dateStr.equals(redisDateStr)) {
logger.debug("生成UUID-Biz, 日切换[{}]开始", dateStr);
try {
redisTemplate.multi();
valueOps.set(bizDateRedisKey, dateStr);
valueOps.set(bizRedisKey, 0);
redisTemplate.exec();
logger.debug("生成UUID-Biz, 日成功切换为: {}", dateStr);
} catch (Exception e) {
logger.error("生成UUID-Biz, 日切换异常", e);
redisTemplate.discard();
}
}
} else {
valueOps.set(bizDateRedisKey, dateStr);
}
Long nextUuid = valueOps.increment(bizRedisKey, delta);
bizUuid = new StringBuilder(key)
.append(dateStr)
.append(StringUtils.leftPad(nextUuid + "", padSize, PAD_CHAR))
.toString();
logger.debug("UUID-Biz生成成功 key={} delta={} bizUuid={}", key, delta, bizUuid);
} catch (Exception e) {
logger.error("请求生成UUID-Biz异常", e);
}
return bizUuid;
}
}
| [
"gangchen1@jieyuechina.com"
] | gangchen1@jieyuechina.com |
7d1c835f669d348616c522077ba0f97d69a9a601 | 9e5a398d20e1a7d485c0767fd38aca1ca6a1d7fb | /1_6.h12_dev/sonos.jad/src/ch/qos/logback/core/rolling/TriggeringPolicy.java | b9da9fd0a98ea71e5e12f37c8ee8442adf1b5b32 | [] | no_license | witokondoria/OpenWrt_Luci_Lua | 6690e0f9cce38676ea93d176a7966546fd03fd32 | 07d1a20e1a950a330b51625b89cb6466ffaec84b | refs/heads/master | 2021-06-01T18:25:09.937542 | 2016-08-26T13:14:10 | 2016-08-26T13:14:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 399 | java | // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
package ch.qos.logback.core.rolling;
import ch.qos.logback.core.spi.LifeCycle;
import java.io.File;
public interface TriggeringPolicy
extends LifeCycle
{
public abstract boolean isTriggeringEvent(File file, Object obj);
}
| [
"huangruohai2010@gmail.com"
] | huangruohai2010@gmail.com |
d268d08fe01bb95625c0ed527b730e0d133b238d | 522db0ab1d3183efaf4be1f68b5f02895e65eb24 | /designpattern/src/main/java/org/example/designpattern/zen/factory/simplefactory/section4/WhiteHumanFactory.java | 7ba4afdafa62b23e0621c010f98e3fc425d55abd | [
"Apache-2.0"
] | permissive | zkzong/java | 036ab8c2312f1496f59ea551be8581b3a5e13808 | 9ace636f83234d204383d9b5f43dc86139552d93 | refs/heads/master | 2023-06-24T17:13:05.957929 | 2023-06-15T14:35:03 | 2023-06-15T14:35:03 | 190,161,389 | 0 | 1 | Apache-2.0 | 2022-12-16T11:11:26 | 2019-06-04T08:31:44 | Java | UTF-8 | Java | false | false | 263 | java | package org.example.designpattern.zen.factory.simplefactory.section4;
/**
* Created by Zong on 2016/10/15.
*/
public class WhiteHumanFactory extends AbstractHumanFactory {
@Override
public Human createHuman() {
return new WhiteHuman();
}
}
| [
"zongzhankui@hotmail.com"
] | zongzhankui@hotmail.com |
fcaf7c7f87058d145001d9e1069ca88ef303a2a3 | 0b3d3fe39bcc6cef447903da987c55b7927815ca | /hello-mvc-jdbc/src/main/java/com/example/demo/UserDao.java | 895bf9f1fda1bc18c34fb93cdcba3466a3044c08 | [] | no_license | junkbin/spring-junk | 5452bc4004a8dded9e91dcf7f006d35dbcc47e54 | 52b970b5880ddb0ddd5f92c42294759b76417e43 | refs/heads/master | 2022-06-25T05:49:40.454839 | 2019-12-01T15:45:00 | 2019-12-01T15:45:00 | 225,174,196 | 0 | 0 | null | 2022-06-21T02:21:03 | 2019-12-01T14:23:01 | Java | UTF-8 | Java | false | false | 452 | java | package com.example.demo;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;
@Component
public class UserDao {
@Autowired
private JdbcTemplate jdbcTemplate;
public List readAll() {
List<Map<String, Object>> list = jdbcTemplate.queryForList("SELECT * FROM USER");
return list;
}
}
| [
"santosh.ece06@gmail.com"
] | santosh.ece06@gmail.com |
866fa523fa9573d5270f075163f0db0ede3985c9 | 730422a28abdfc5da35d5d8675fffc23056c8894 | /spf4j-core/src/main/java/org/spf4j/failsafe/DefaultRetryPredicate.java | b16e8070d2b6653c6467ada46ddcccc19bb6884d | [] | no_license | danieledipompeo/spf4j | aa203b208cce6c8e08a2ffa1b0d6b4cd41474717 | eda11a913be34f14cf5a2bbf9a6bd2af65f71950 | refs/heads/master | 2023-01-12T08:09:49.624204 | 2020-11-18T11:23:42 | 2020-11-18T11:23:42 | 109,676,840 | 0 | 0 | null | 2020-11-18T11:23:43 | 2017-11-06T09:53:08 | Java | UTF-8 | Java | false | false | 5,392 | java | /*
* Copyright 2017 SPF4J.
*
* 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 org.spf4j.failsafe;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.Arrays;
import java.util.concurrent.Callable;
import java.util.function.Function;
import java.util.function.Supplier;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.annotation.concurrent.ThreadSafe;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.spf4j.log.Level;
import org.spf4j.log.SLf4jXLogAdapter;
import org.spf4j.log.XLog;
/**
* @author Zoltan Farkas
*/
@SuppressFBWarnings("AI_ANNOTATION_ISSUES_NEEDS_NULLABLE") // false positive...
@ThreadSafe
final class DefaultRetryPredicate<T> implements RetryPredicate<T, Callable<T>> {
private static final Level RETRY_LOG_LEVEL =
Level.valueOf(System.getProperty("spf4j.failsafe.retryLogLevel", "WARN"));
private static final PartialResultRetryPredicate[] NO_RP = new PartialResultRetryPredicate[0];
private static final PartialExceptionRetryPredicate[] NO_EP = new PartialExceptionRetryPredicate[0];
private static final Logger LOG = LoggerFactory.getLogger(DefaultRetryPredicate.class);
private final Function<Object, RetryDelaySupplier> defaultBackoffSupplier;
private final PartialResultRetryPredicate<T, Callable<T>>[] resultPredicates;
private final PartialExceptionRetryPredicate<T, Callable<T>>[] exceptionPredicates;
private final XLog log;
@SuppressFBWarnings("LO_SUSPECT_LOG_PARAMETER") // not suspect if you want to customize logging behavior.
DefaultRetryPredicate(@Nullable final Logger log, final long startNanos, final long deadlineNanos,
final Supplier<Function<Object, RetryDelaySupplier>> defaultBackoffSupplierSupplier,
final TimedSupplier<PartialResultRetryPredicate<T, Callable<T>>>[] resultPredicates,
final TimedSupplier<PartialExceptionRetryPredicate<T, Callable<T>>>... exceptionPredicates) {
this.log = new SLf4jXLogAdapter(log == null ? LOG : log);
this.defaultBackoffSupplier = defaultBackoffSupplierSupplier.get();
int rpl = resultPredicates.length;
if (rpl > 0) {
this.resultPredicates = new PartialResultRetryPredicate[rpl];
for (int i = 0; i < rpl; i++) {
this.resultPredicates[i] = resultPredicates[i].get(startNanos, deadlineNanos);
}
} else {
this.resultPredicates = NO_RP;
}
int epl = exceptionPredicates.length;
if (epl > 0) {
this.exceptionPredicates = new PartialExceptionRetryPredicate[epl];
for (int i = 0; i < epl; i++) {
this.exceptionPredicates[i] = exceptionPredicates[i].get(startNanos, deadlineNanos);
}
} else {
this.exceptionPredicates = NO_EP;
}
}
@Override
@Nonnull
public RetryDecision<T, Callable<T>> getDecision(final T value, final Callable<T> what) {
for (PartialResultRetryPredicate<T, Callable<T>> predicate : resultPredicates) {
RetryDecision<T, Callable<T>> decision = predicate.getDecision(value, what);
if (decision != null) {
if (decision.getDecisionType() == RetryDecision.Type.Retry) {
Callable<?> newCallable = decision.getNewCallable();
if (decision.getDelayNanos() < 0) {
RetryDelaySupplier backoff = defaultBackoffSupplier.apply(value);
decision = (RetryDecision) RetryDecision.retry(backoff.nextDelay(), newCallable);
}
log.log(null, RETRY_LOG_LEVEL, "Result {}, retrying {} with {}", value, newCallable, decision);
}
return decision;
}
}
return RetryDecision.abort();
}
@Override
@Nonnull
public RetryDecision<T, Callable<T>> getExceptionDecision(final Throwable value, final Callable<T> what) {
for (PartialExceptionRetryPredicate<T, Callable<T>> predicate : exceptionPredicates) {
RetryDecision<T, Callable<T>> decision = predicate.getExceptionDecision(value, what);
if (decision != null) {
if (decision.getDecisionType() == RetryDecision.Type.Retry) {
Callable<?> newCallable = decision.getNewCallable();
if (decision.getDelayNanos() < 0) {
RetryDelaySupplier backoff = defaultBackoffSupplier.apply(value);
decision = (RetryDecision) RetryDecision.retry(backoff.nextDelay(), newCallable);
}
log.log(null, RETRY_LOG_LEVEL,
"Result {}, retrying {} with {}", value.getClass().getName(), newCallable, decision, value);
}
return decision;
}
}
return RetryDecision.abort();
}
@Override
public String toString() {
return "DefaultRetryPredicate{" + "defaultBackoffSupplier=" + defaultBackoffSupplier
+ ", resultPredicates=" + Arrays.toString(resultPredicates)
+ ", exceptionPredicates=" + Arrays.toString(exceptionPredicates) + '}';
}
}
| [
"zolyfarkas@yahoo.com"
] | zolyfarkas@yahoo.com |
d4f8dfaf3e185de546576dbbb80229548233b078 | c152434ac93f46e24e73506b9669e5b835927a89 | /pet-clinic-data/src/test/java/guru/springframework/petclinicdata/services/springdatajpa/VetSDJpaServiceTest.java | 9a3a857d0e966d4ca75a5ae547bd6aa09275ead3 | [] | no_license | theagoliveira/spring5-pet-clinic | 06d2faf11d3edec166844ac4f732a3e64e5d3793 | 0ff4618c148a672293513f1f052824e553d3c8fd | refs/heads/main | 2023-08-07T20:47:01.900550 | 2021-09-16T05:55:42 | 2021-09-16T05:55:42 | 364,473,268 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,066 | java | package guru.springframework.petclinicdata.services.springdatajpa;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Optional;
import java.util.Set;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import guru.springframework.sfgpetclinic.model.Vet;
import guru.springframework.sfgpetclinic.repositories.VetRepository;
import guru.springframework.sfgpetclinic.services.springdatajpa.VetSDJpaService;
@ExtendWith(MockitoExtension.class)
class VetSDJpaServiceTest {
@Mock
VetRepository vetRepository;
@InjectMocks
VetSDJpaService vetService;
private static final Long vetId = 1L;
private static final Vet returnVet = Vet.builder().id(vetId).build();
@Test
void findAll() {
Set<Vet> returnVetsSet = new HashSet<>((List<Vet>) Arrays.asList(returnVet));
when(vetRepository.findAll()).thenReturn(returnVetsSet);
Set<Vet> vets = vetService.findAll();
assertNotNull(vets);
assertEquals(1, vets.size());
}
@Test
void findById() {
when(vetRepository.findById(anyLong())).thenReturn(Optional.of(returnVet));
Vet vet = vetService.findById(vetId);
assertEquals(vetId, vet.getId());
}
@Test
void findByIdNotFound() {
when(vetRepository.findById(anyLong())).thenReturn(Optional.empty());
Vet vet = vetService.findById(vetId);
assertNull(vet);
}
@Test
void saveWithId() {
when(vetRepository.save(any(Vet.class))).thenReturn(returnVet);
Vet savedVet = vetService.save(returnVet);
assertNotNull(savedVet);
assertEquals(vetId, savedVet.getId());
verify(vetRepository).save(any(Vet.class));
}
@Test
void saveWithoutId() {
when(vetRepository.save(any(Vet.class))).thenReturn(returnVet);
Vet savedVet = vetService.save(Vet.builder().build());
assertNotNull(savedVet);
assertEquals(vetId, savedVet.getId());
verify(vetRepository).save(any(Vet.class));
}
@Test
void deleteById() {
vetService.deleteById(vetId);
when(vetRepository.findAll()).thenReturn(new HashSet<Vet>());
assertEquals(0, vetService.findAll().size());
verify(vetRepository).deleteById(anyLong());
}
@Test
void delete() {
vetService.delete(returnVet);
when(vetRepository.findAll()).thenReturn(new HashSet<Vet>());
assertEquals(0, vetService.findAll().size());
verify(vetRepository).delete(any(Vet.class));
}
}
| [
"thiago.kun@gmail.com"
] | thiago.kun@gmail.com |
9250194307cf7043614f3bda065d12bdc1e03053 | b60da22bc192211b3978764e63af23e2e24081f5 | /cdc/src/share/classes/sun/net/www/protocol/jar/Handler.java | ff425a3cbc3088c604e60616a19e118a13e2006c | [] | no_license | clamp03/JavaAOTC | 44d566927c057c013538ab51e086c42c6348554e | 0ade633837ed9698cd74a3f6928ebde3d96bd3e3 | refs/heads/master | 2021-01-01T19:33:51.612033 | 2014-12-02T14:29:58 | 2014-12-02T14:29:58 | 27,435,591 | 5 | 4 | null | null | null | null | UTF-8 | Java | false | false | 4,416 | java | /*
* @(#)Handler.java 1.24 06/10/10
*
* Copyright 1990-2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
*
* This program 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.
*
* This program 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 at /legal/license.txt).
*
* 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 Sun Microsystems, Inc., 4150 Network Circle, Santa
* Clara, CA 95054 or visit www.sun.com if you need additional
* information or have any questions.
*
*/
package sun.net.www.protocol.jar;
import java.io.*;
import java.net.*;
import java.util.*;
import sun.net.www.ParseUtil;
/*
* Jar URL Handler
*/
public class Handler extends java.net.URLStreamHandler {
private static final String separator = "!/";
protected java.net.URLConnection openConnection(URL u)
throws IOException {
return new JarURLConnection(u, this);
}
private int indexOfBangSlash(String spec) {
int indexOfBang = spec.length();
while((indexOfBang = spec.lastIndexOf('!', indexOfBang)) != -1) {
if ((indexOfBang != (spec.length() - 1)) &&
(spec.charAt(indexOfBang + 1) == '/')) {
return indexOfBang + 1;
} else {
indexOfBang--;
}
}
return -1;
}
protected void parseURL(URL url, String spec,
int start, int limit) {
String file = null;
String ref = null;
// first figure out if there is an anchor
int refPos = spec.indexOf('#', limit);
boolean refOnly = refPos == start;
if (refPos > -1) {
ref = spec.substring(refPos + 1, spec.length());
if (refOnly) {
file = url.getFile();
}
}
// then figure out if the spec is
// 1. absolute (jar:)
// 2. relative (i.e. url + foo/bar/baz.ext)
// 3. anchor-only (i.e. url + #foo), which we already did (refOnly)
boolean absoluteSpec = false;
if (spec.length() >= 4) {
absoluteSpec = spec.substring(0, 4).equalsIgnoreCase("jar:");
}
spec = spec.substring(start, limit);
if (absoluteSpec) {
file = parseAbsoluteSpec(spec);
} else if (!refOnly) {
file = parseContextSpec(url, spec);
// Canonize the result after the bangslash
int bangSlash = indexOfBangSlash(file);
String toBangSlash = file.substring(0, bangSlash);
String afterBangSlash = file.substring(bangSlash);
sun.net.www.ParseUtil canonizer = new ParseUtil();
afterBangSlash = canonizer.canonizeString(afterBangSlash);
file = toBangSlash + afterBangSlash;
}
setURL(url, "jar", "", -1, null, null, file, null, ref);
}
private String parseAbsoluteSpec(String spec) {
URL url = null;
int index = -1;
// check for !/
if ((index = indexOfBangSlash(spec)) == -1) {
throw new NullPointerException("no !/ in spec");
}
// test the inner URL
try {
String innerSpec = spec.substring(0, index - 1);
url = new URL(innerSpec);
} catch (MalformedURLException e) {
throw new NullPointerException("invalid url: " +
spec + " (" + e + ")");
}
return spec;
}
private String parseContextSpec(URL url, String spec) {
String ctxFile = url.getFile();
// if the spec begins with /, chop up the jar back !/
if (spec.startsWith("/")) {
int bangSlash = indexOfBangSlash(ctxFile);
if (bangSlash == -1) {
throw new NullPointerException("malformed " +
"context url:" +
url +
": no !/");
}
ctxFile = ctxFile.substring(0, bangSlash);
}
if (!ctxFile.endsWith("/") && (!spec.startsWith("/"))){
// chop up the last component
int lastSlash = ctxFile.lastIndexOf('/');
if (lastSlash == -1) {
throw new NullPointerException("malformed " +
"context url:" +
url);
}
ctxFile = ctxFile.substring(0, lastSlash + 1);
}
return (ctxFile + spec);
}
}
| [
"clamp03@gmail.com"
] | clamp03@gmail.com |
631670f7c88a7c26bf02063e46be0bd3f1beb99e | a1390c4f370035a5b04189e6cb2284e9c51d3ef4 | /src/main/java/com/javaPlus/designpattern/decorator/DecoratorPatternDemo.java | 34f81d074bbac3517163c1beb336849333bd6581 | [] | no_license | bohenmian/leetcode | 763b2bcc5b39ddd6892f548b26831f8ea66cee14 | 1ab7f180c4f722fde28289ba89b61d77c7c09b06 | refs/heads/master | 2021-06-13T14:56:24.364524 | 2021-02-01T12:31:24 | 2021-02-01T12:31:24 | 102,922,737 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 596 | java | package com.javaPlus.designpattern.decorator;
/**
* 装饰器模式的好处: 可以动态的为对象添加一些额外的职责和行为,减少为了给对象增加职责造成的硬编码(如果按照传统的方式增加对象的职责是采用继承)
* 传统的继承方式会只能静态的加入职责,不能控制增加行为的方式和时机
*/
public class DecoratorPatternDemo {
public static void main(String[] args) {
Hero victor = new Victor();
GalacticWarriors galacticWarriors = new GalacticWarriors(victor);
galacticWarriors.init();
}
}
| [
"bohenmian@gmail.com"
] | bohenmian@gmail.com |
101174b1b4fe1a61a9fbf6c2dcb8568e4e499464 | 8c04eb9ced9df604fbff618e9cdc5fb568ac6a47 | /ballcat-common/ballcat-common-core/src/test/java/com/ballcat/core/validation/Car.java | c8d805d4c54f14ebd5b58750f7b97d4e14c9a533 | [
"MIT"
] | permissive | Hccake/ballcat | 1a18e87cde9d5afde3805375dbe73486e9def011 | c8cfa47a3f19a323a37cfbac1a1449cc610da8af | refs/heads/master | 2022-12-03T04:07:37.854718 | 2022-11-16T15:19:50 | 2022-11-16T15:20:20 | 451,449,652 | 2 | 4 | MIT | 2022-01-24T12:10:39 | 2022-01-24T12:10:38 | null | UTF-8 | Java | false | false | 411 | java | package com.ballcat.core.validation;
import lombok.AllArgsConstructor;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
@Data
@AllArgsConstructor
public class Car {
@NotNull
private String manufacturer;
@NotNull
@Size(min = 2, max = 14)
private String licensePlate;
@Min(2)
private int seatCount;
} | [
"chengbohua@foxmail.com"
] | chengbohua@foxmail.com |
c67a6b84d5dfa03a77f08f95c5f7ba7cf8f216f5 | 0fcad5bf77b3d981442cb0e2f475143053fd2b11 | /dubbo-common/src/main/java/com/alibaba/dubbo/common/threadpool/support/fixed/FixedThreadPool.java | bcd2b850dbf2eca3b8d08ffc4807cd8a09aec680 | [
"Apache-2.0",
"GPL-1.0-or-later",
"GPL-2.0-only",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | Shaoxubao/incubator-dubbo-study | 67171f58170b6cbbcb17eca1a7005f00c0c52a16 | f53956b5c179e5d35c7b4bd03b97e4b383199a2e | refs/heads/master | 2022-12-28T10:59:16.111317 | 2019-05-21T08:18:58 | 2019-05-21T08:18:58 | 187,791,582 | 2 | 0 | Apache-2.0 | 2022-12-10T03:06:37 | 2019-05-21T08:10:33 | Java | UTF-8 | Java | false | false | 2,257 | 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.alibaba.dubbo.common.threadpool.support.fixed;
import com.alibaba.dubbo.common.Constants;
import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.common.threadpool.ThreadPool;
import com.alibaba.dubbo.common.threadpool.support.AbortPolicyWithReport;
import com.alibaba.dubbo.common.utils.NamedThreadFactory;
import java.util.concurrent.Executor;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
/**
* Creates a thread pool that reuses a fixed number of threads
*
* @see java.util.concurrent.Executors#newFixedThreadPool(int)
*/
public class FixedThreadPool implements ThreadPool {
public Executor getExecutor(URL url) {
String name = url.getParameter(Constants.THREAD_NAME_KEY, Constants.DEFAULT_THREAD_NAME);
int threads = url.getParameter(Constants.THREADS_KEY, Constants.DEFAULT_THREADS);
int queues = url.getParameter(Constants.QUEUES_KEY, Constants.DEFAULT_QUEUES);
return new ThreadPoolExecutor(threads, threads, 0, TimeUnit.MILLISECONDS,
queues == 0 ? new SynchronousQueue<Runnable>() :
(queues < 0 ? new LinkedBlockingQueue<Runnable>()
: new LinkedBlockingQueue<Runnable>(queues)),
new NamedThreadFactory(name, true), new AbortPolicyWithReport(name, url));
}
} | [
"shaoxb@yunjiglobal.com"
] | shaoxb@yunjiglobal.com |
2dca5b87b242c859a0c6ec8a661f16d77063048e | 27f6a988ec638a1db9a59cf271f24bf8f77b9056 | /Code-Hunt-data/users/User055/Sector2-Level4/attempt026-20140920-233702.java | 555e1b348eb44d0e0ac1b218cdc700ab315fde92 | [] | no_license | liiabutler/Refazer | 38eaf72ed876b4cfc5f39153956775f2123eed7f | 991d15e05701a0a8582a41bf4cfb857bf6ef47c3 | refs/heads/master | 2021-07-22T06:44:46.453717 | 2017-10-31T01:43:42 | 2017-10-31T01:43:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 323 | java |
public class Program {
public static int Puzzle(int a, int b) {
int i;
if (a<b){
for (i=a; i>0; i--){
if (a%i==0&b%i==0) break;
}
return (a*b)/i;
}
if (b<a){
for (i=b; i>0; i--){
if (a%i==0&bb=%i==0) break;
}
return (b*a)/i;
}
return a*b;
}
} | [
"liiabiia@yahoo.com"
] | liiabiia@yahoo.com |
cc3d946f286c999e2ad5bd97abb04f6271fdb05d | 50181b7dfa52152e2139f7e045aed6dd26a3543e | /src/main/java/com/wj/jdbc/JdbcDemo.java | de2093962aaef9abbf4fbdc3ec08fc6aca994e1e | [] | no_license | wj1996/springdemo | 18dda1c545a3ad19aff44e342c7280cfe139e5db | 74cc0bd67c594276fa201f3b7837d5c2ea06a8fd | refs/heads/master | 2022-06-22T09:26:17.239445 | 2019-05-28T11:49:21 | 2019-05-28T11:49:21 | 188,197,405 | 0 | 0 | null | 2020-07-01T23:11:07 | 2019-05-23T08:54:48 | Java | UTF-8 | Java | false | false | 1,542 | java | package com.wj.jdbc;
import java.sql.*;
/**
* 程序的耦合
* 耦合:程序间的依赖关系
* 包括:
* 类之间的依赖
* 方法间的依赖
* 解耦:
* 降低程序间的依赖关系
* 实际开发中:
* 编译期不依赖,运行时才依赖
* 解耦的思路:
* 第一步:使用反射来创建对象,而避免使用new关键字
* 第二步:通过读取配置文件来获取要创建的对象全限定名
*
* 配置文件可以是xml也可以是properties
*/
public class JdbcDemo {
public static void main(String[] args) throws ClassNotFoundException {
//1.注册驱动
Class.forName("com.mysql.jdbc.Driver");
try {
//2.获取连接
Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3307/my?useSSL=false","root","root");
//3.获取操作数据的预处理对象
PreparedStatement preparedStatement = connection.prepareStatement("select * from my");
//4.遍历处理
ResultSet resultSet = preparedStatement.executeQuery();
while (resultSet.next()) {
System.out.println(resultSet.getInt(1) + "," + resultSet.getString(2));
}
//5.释放连接
resultSet.close();
preparedStatement.close();
connection.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
}
| [
"15236730688@163.com"
] | 15236730688@163.com |
e10b90d32bfb40e882bb6377a201676440a4b14a | 0689f3b456ddce965659abcd4d2de68903de59a1 | /src/main/java/com/example/jooq/demo_jooq/introduction/db/pg_catalog/routines/JsonbObjectAggFinalfn.java | cbc543c4b143131d372b24fd6de5d012fdece04c | [] | no_license | vic0692/demo_spring_jooq | c92d2d188bbbb4aa851adab5cc301d1051c2f209 | a5c1fd1cb915f313f40e6f4404fdc894fffc8e70 | refs/heads/master | 2022-09-18T09:38:30.362573 | 2020-01-23T17:09:40 | 2020-01-23T17:09:40 | 220,638,715 | 0 | 0 | null | 2022-09-08T01:04:47 | 2019-11-09T12:25:46 | Java | UTF-8 | Java | false | true | 2,088 | java | /*
* This file is generated by jOOQ.
*/
package com.example.jooq.demo_jooq.introduction.db.pg_catalog.routines;
import com.example.jooq.demo_jooq.introduction.db.pg_catalog.PgCatalog;
import javax.annotation.Generated;
import org.jooq.Field;
import org.jooq.JSONB;
import org.jooq.Parameter;
import org.jooq.impl.AbstractRoutine;
import org.jooq.impl.Internal;
/**
* This class is generated by jOOQ.
*/
@Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.12.3"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class JsonbObjectAggFinalfn extends AbstractRoutine<JSONB> {
private static final long serialVersionUID = -2019693612;
/**
* The parameter <code>pg_catalog.jsonb_object_agg_finalfn.RETURN_VALUE</code>.
*/
public static final Parameter<JSONB> RETURN_VALUE = Internal.createParameter("RETURN_VALUE", org.jooq.impl.SQLDataType.JSONB, false, false);
/**
* @deprecated Unknown data type. Please define an explicit {@link org.jooq.Binding} to specify how this type should be handled. Deprecation can be turned off using {@literal <deprecationOnUnknownTypes/>} in your code generator configuration.
*/
@java.lang.Deprecated
public static final Parameter<Object> _1 = Internal.createParameter("_1", org.jooq.impl.DefaultDataType.getDefaultDataType("\"pg_catalog\".\"internal\""), false, true);
/**
* Create a new routine call instance
*/
public JsonbObjectAggFinalfn() {
super("jsonb_object_agg_finalfn", PgCatalog.PG_CATALOG, org.jooq.impl.SQLDataType.JSONB);
setReturnParameter(RETURN_VALUE);
addInParameter(_1);
}
/**
* Set the <code>_1</code> parameter IN value to the routine
*/
public void set__1(Object value) {
setValue(_1, value);
}
/**
* Set the <code>_1</code> parameter to the function to be used with a {@link org.jooq.Select} statement
*/
public void set__1(Field<Object> field) {
setField(_1, field);
}
}
| [
"vic0692@gmail.com"
] | vic0692@gmail.com |
90411b407bc5ef35029da0cd90e74b7812378743 | 62b18494ae5cf79a83398d9624b704bbee7c1415 | /migrations/wildfly17.0/wildfly9.0/src/main/java/org/jboss/migration/wfly/WildFly9ToWildFly17_0UpdateUndertowSubsystem.java | 0890549af13aecdf8ecb70528dcdf2423c2320f8 | [
"Apache-2.0"
] | permissive | klearchos/wildfly-server-migration | 3de9eb5498fa3740007937046af9a1d80d522bbd | ded2072734f5effe51265110fc09c60241eb03e4 | refs/heads/master | 2021-01-16T11:30:31.914485 | 2020-02-13T12:46:41 | 2020-02-13T12:46:41 | 243,102,771 | 0 | 0 | Apache-2.0 | 2020-02-25T21:07:36 | 2020-02-25T21:07:34 | null | UTF-8 | Java | false | false | 1,700 | java | /*
* Copyright 2019 Red Hat, Inc.
*
* 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 org.jboss.migration.wfly;
import org.jboss.migration.core.jboss.JBossSubsystemNames;
import org.jboss.migration.wfly10.config.task.management.subsystem.UpdateSubsystemResources;
import org.jboss.migration.wfly10.config.task.subsystem.undertow.AddHttpsListener;
import org.jboss.migration.wfly10.config.task.subsystem.undertow.EnableHttp2;
import org.jboss.migration.wfly11.task.subsystem.undertow.AddHttpInvoker;
import org.jboss.migration.wfly13.task.subsystem.undertow.UnsetDefaultHostResponseHeaderServer;
import org.jboss.migration.wfly13.task.subsystem.undertow.UnsetDefaultHostResponseHeaderXPoweredBy;
/**
* @author emmartins
*/
public class WildFly9ToWildFly17_0UpdateUndertowSubsystem<S> extends UpdateSubsystemResources<S> {
public WildFly9ToWildFly17_0UpdateUndertowSubsystem() {
super(JBossSubsystemNames.UNDERTOW,
new AddHttpsListener<>(),
new EnableHttp2<>(),
new UnsetDefaultHostResponseHeaderServer<>(),
new UnsetDefaultHostResponseHeaderXPoweredBy<>(),
new AddHttpInvoker<>());
}
}
| [
"emartins@redhat.com"
] | emartins@redhat.com |
ee69068852bcc5d21801419e1f313d3c45fb6d7c | b45683d3130a937cd0262c960e1155a327ef4872 | /fyber/ios/src/main/java/org/robovm/pods/fyber/core/IAMediationAdMob.java | 2206a565b5031fcb566072db798733d021201691 | [] | no_license | CoderBaron/robovm-robopods | 33324ccb54dcbf54c3716c7ec6e049a330261df9 | 346437b7b90798e4c9671cad2bae62b7e07b88a2 | refs/heads/master | 2023-08-04T08:55:11.971573 | 2023-07-23T00:36:21 | 2023-07-23T00:36:21 | 66,114,160 | 0 | 0 | null | 2016-08-19T21:42:07 | 2016-08-19T21:42:07 | null | UTF-8 | Java | false | false | 2,076 | java | /*
* Copyright (C) 2013-2015 RoboVM AB
*
* 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 org.robovm.pods.fyber.core;
/*<imports>*/
import java.io.*;
import java.nio.*;
import java.util.*;
import org.robovm.objc.*;
import org.robovm.objc.annotation.*;
import org.robovm.objc.block.*;
import org.robovm.rt.*;
import org.robovm.rt.annotation.*;
import org.robovm.rt.bro.*;
import org.robovm.rt.bro.annotation.*;
import org.robovm.rt.bro.ptr.*;
import org.robovm.apple.foundation.*;
import org.robovm.apple.uikit.*;
import org.robovm.apple.corelocation.*;
import org.robovm.apple.coreanimation.*;
import org.robovm.apple.dispatch.*;
import org.robovm.apple.coregraphics.*;
/*</imports>*/
/*<javadoc>*/
/*</javadoc>*/
/*<annotations>*/@Library(Library.INTERNAL) @NativeClass/*</annotations>*/
/*<visibility>*/public/*</visibility>*/ class /*<name>*/IAMediationAdMob/*</name>*/
extends /*<extends>*/IAMediation/*</extends>*/
/*<implements>*//*</implements>*/ {
/*<ptr>*/public static class IAMediationAdMobPtr extends Ptr<IAMediationAdMob, IAMediationAdMobPtr> {}/*</ptr>*/
/*<bind>*/static { ObjCRuntime.bind(IAMediationAdMob.class); }/*</bind>*/
/*<constants>*//*</constants>*/
/*<constructors>*/
public IAMediationAdMob() {}
protected IAMediationAdMob(Handle h, long handle) { super(h, handle); }
protected IAMediationAdMob(SkipInit skipInit) { super(skipInit); }
/*</constructors>*/
/*<properties>*/
/*</properties>*/
/*<members>*//*</members>*/
/*<methods>*/
/*</methods>*/
}
| [
"demyan.kimitsa@gmail.com"
] | demyan.kimitsa@gmail.com |
b5ffe07073d485d61db33cd1c81c110d43a49473 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/2/2_e4d0174c9be11908840af81ab8586e680cc2f9c1/PopularPrefixes/2_e4d0174c9be11908840af81ab8586e680cc2f9c1_PopularPrefixes_t.java | 5afe57324b16b4bcd6c379b8338d5902f0f0e7d7 | [] | 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 | 4,057 | java | /*
* Copyright 2008-2010 Digital Enterprise Research Institute (DERI)
*
* 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 org.deri.any23.rdf;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Map;
import java.util.Properties;
/**
* This class act as a container for various well-known and adopted <i>RDF</i> Vocabulary prefixes.
*/
public class PopularPrefixes {
private static final Logger logger = LoggerFactory.getLogger(PopularPrefixes.class);
private static final String RESOURCE_NAME = "/org/deri/any23/prefixes/prefixes.properties";
private static Prefixes popularPrefixes = getPrefixes();
private static Prefixes getPrefixes() {
Prefixes prefixes = new Prefixes();
Properties properties = new Properties();
try {
logger.info(String.format("Loading prefixes from %s", RESOURCE_NAME));
properties.load(getResourceAsStream());
} catch (IOException e) {
logger.error(String.format("Error while loading prefixes from %s", RESOURCE_NAME), e);
throw new RuntimeException(String.format("Error while loading prefixes from %s", RESOURCE_NAME));
}
popularPrefixes = new Prefixes();
for (Map.Entry entry : properties.entrySet()) {
if (testURICompliance((String) entry.getValue())) {
prefixes.add(
(String) entry.getKey(),
(String) entry.getValue()
);
} else {
logger.warn(String.format("Prefixes entry '%s' is not a well-formad URI. Skipped.", entry.getValue()));
}
}
return prefixes;
}
/**
* This method perform a prefix lookup. Given a set of prefixes it returns {@link org.deri.any23.rdf.Prefixes} bag
* class containing them.
*
* @param prefixes the input prefixes where perform the lookup
* @return a {@link org.deri.any23.rdf.Prefixes} containing all the prefixes mathing the input parameter
*/
public static Prefixes createSubset(String... prefixes) {
return popularPrefixes.createSubset(prefixes);
}
/**
* @return a {@link org.deri.any23.rdf.Prefixes} with a set of well-known prefixes
*/
public static Prefixes get() {
return popularPrefixes;
}
/**
* Checks the compliance of the <i>URI</i>.
*
* @param stringUri the string of the URI to be checked
* @return
*/
private static boolean testURICompliance(String stringUri) {
try {
new URI(stringUri);
} catch (URISyntaxException e) {
return false;
}
return true;
}
/**
* Loads the prefixes list configuration file.
*
* @return the input stream containing the configuration.
*/
private static InputStream getResourceAsStream() {
InputStream result;
result = PopularPrefixes.class.getResourceAsStream(RESOURCE_NAME);
if (result == null) {
result = PopularPrefixes.class.getClassLoader().getResourceAsStream(RESOURCE_NAME);
if (result == null) {
result = ClassLoader.getSystemResourceAsStream(RESOURCE_NAME);
}
}
return result;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
a4862cd94feea967d76fb8d390146a0d473ee3bd | 42e94aa09fe8d979f77449e08c67fa7175a3e6eb | /src/net/Hb.java | 08afcbf423948e8eecd0743601021b0c92a7e860 | [
"Unlicense"
] | permissive | HausemasterIssue/novoline | 6fa90b89d5ebf6b7ae8f1d1404a80a057593ea91 | 9146c4add3aa518d9aa40560158e50be1b076cf0 | refs/heads/main | 2023-09-05T00:20:17.943347 | 2021-11-26T02:35:25 | 2021-11-26T02:35:25 | 432,312,803 | 1 | 0 | Unlicense | 2021-11-26T22:12:46 | 2021-11-26T22:12:45 | null | UTF-8 | Java | false | false | 525 | java | package net;
import net.minecraft.block.Block$SoundType;
public class Hb {
public static String b(Block$SoundType var0) {
return var0.getStepSound();
}
public static float c(Block$SoundType var0) {
return var0.getVolume();
}
public static float e(Block$SoundType var0) {
return var0.getFrequency();
}
public static String d(Block$SoundType var0) {
return var0.getPlaceSound();
}
public static String a(Block$SoundType var0) {
return var0.getBreakSound();
}
}
| [
"91408199+jeremypelletier@users.noreply.github.com"
] | 91408199+jeremypelletier@users.noreply.github.com |
31da0d3d06620ffa3f322d678caa33822585b256 | 065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be | /eclipseswt_cluster/47517/tar_0.java | b15f280b163f110db8d2c84a184b2287669a42f1 | [] | no_license | martinezmatias/GenPat-data-C3 | 63cfe27efee2946831139747e6c20cf952f1d6f6 | b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4 | refs/heads/master | 2022-04-25T17:59:03.905613 | 2020-04-15T14:41:34 | 2020-04-15T14:41:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,076 | java | /*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.swt.dnd;
import org.eclipse.swt.internal.carbon.CFRange;
import org.eclipse.swt.internal.carbon.OS;
/**
* The class <code>TextTransfer</code> provides a platform specific mechanism
* for converting plain text represented as a java <code>String</code>
* to a platform specific representation of the data and vice versa. See
* <code>Transfer</code> for additional information.
*
* <p>An example of a java <code>String</code> containing plain text is shown
* below:</p>
*
* <code><pre>
* String textData = "Hello World";
* </code></pre>
*/
public class TextTransfer extends ByteArrayTransfer {
private static TextTransfer _instance = new TextTransfer();
private static final String TEXT = "TEXT";
private static final String UTEXT = "utxt";
private static final int TEXTID = OS.kScrapFlavorTypeText;
private static final int UTEXTID = OS.kScrapFlavorTypeUnicode;
private TextTransfer() {
}
/**
* Returns the singleton instance of the TextTransfer class.
*
* @return the singleton instance of the TextTransfer class
*/
public static TextTransfer getInstance () {
return _instance;
}
/**
* This implementation of <code>javaToNative</code> converts plain text
* represented by a java <code>String</code> to a platform specific representation.
* For additional information see <code>Transfer#javaToNative</code>.
*
* @param object a java <code>String</code> containing text
* @param transferData an empty <code>TransferData</code> object; this
* object will be filled in on return with the platform specific format of the data
*/
public void javaToNative (Object object, TransferData transferData){
transferData.result = -1;
if (object == null || !(object instanceof String) || !isSupportedType(transferData)) return;
String string = (String)object;
char[] chars = new char[string.length()];
string.getChars (0, chars.length, chars, 0);
switch (transferData.type) {
case TEXTID: {
int cfstring = OS.CFStringCreateWithCharacters(OS.kCFAllocatorDefault, chars, chars.length);
if (cfstring == 0) return;
byte[] buffer = null;
try {
CFRange range = new CFRange();
range.length = chars.length;
int encoding = OS.CFStringGetSystemEncoding();
int[] size = new int[1];
int numChars = OS.CFStringGetBytes(cfstring, range, encoding, (byte)'?', true, null, 0, size);
if (numChars == 0) return;
buffer = new byte[size[0]];
numChars = OS.CFStringGetBytes(cfstring, range, encoding, (byte)'?', true, buffer, size [0], size);
if (numChars == 0) return;
} finally {
OS.CFRelease(cfstring);
}
transferData.data = new byte[1][];
transferData.data[0] = buffer;
transferData.result = OS.noErr;
break;
}
case UTEXTID: {
byte[] buffer = new byte[chars.length * 2];
OS.memcpy(buffer, chars, buffer.length);
transferData.data = new byte[1][];
transferData.data[0] = buffer;
transferData.result = OS.noErr;
break;
}
}
}
/**
* This implementation of <code>nativeToJava</code> converts a platform specific
* representation of plain text to a java <code>String</code>.
* For additional information see <code>Transfer#nativeToJava</code>.
*
* @param transferData the platform specific representation of the data to be
* been converted
* @return a java <code>String</code> containing text if the
* conversion was successful; otherwise null
*/
public Object nativeToJava(TransferData transferData){
if (!isSupportedType(transferData) || transferData.data == null) return null;
if (transferData.data.length == 0 || transferData.data[0].length == 0) return null;
byte[] buffer = transferData.data[0];
switch (transferData.type) {
case TEXTID: {
int encoding = OS.CFStringGetSystemEncoding();
int cfstring = OS.CFStringCreateWithBytes(OS.kCFAllocatorDefault, buffer, buffer.length, encoding, true);
if (cfstring == 0) return null;
try {
int length = OS.CFStringGetLength(cfstring);
if (length == 0) return null;
char[] chars = new char[length];
CFRange range = new CFRange();
range.length = length;
OS.CFStringGetCharacters(cfstring, range, chars);
return new String(chars);
} finally {
OS.CFRelease(cfstring);
}
}
case UTEXTID: {
char[] chars = new char[(buffer.length + 1) / 2];
OS.memcpy(chars, buffer, buffer.length);
return new String(chars);
}
}
return null;
}
protected String[] getTypeNames() {
return new String[] {UTEXT, TEXT};
}
protected int[] getTypeIds() {
return new int[] {UTEXTID, TEXTID};
}
}
| [
"375833274@qq.com"
] | 375833274@qq.com |
fff9862081770023b99b77353f8557f7cdcd4ab8 | 3acfb6df11412013c50520e812b2183e07c1a8e5 | /investharyana/src/main/java/com/hartron/investharyana/service/dto/UserDTO.java | 981fd246e86db03a6d8ce4d44ae64d0bdc57be68 | [] | no_license | ramanrai1981/investharyana | ad2e5b1d622564a23930d578b25155d5cc9ec97a | b8f359c120f6dae456ec0490156cf34fd0125a30 | refs/heads/master | 2021-01-19T08:29:32.042236 | 2017-04-14T18:34:50 | 2017-04-14T18:34:50 | 87,635,613 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,605 | java | package com.hartron.investharyana.service.dto;
import com.hartron.investharyana.config.Constants;
import com.hartron.investharyana.domain.User;
import org.hibernate.validator.constraints.Email;
import javax.validation.constraints.*;
import java.util.Set;
import java.util.stream.Collectors;
/**
* A DTO representing a user, with his authorities.
*/
public class UserDTO {
private String id;
@Pattern(regexp = Constants.LOGIN_REGEX)
@Size(min = 1, max = 50)
private String login;
@Size(max = 50)
private String firstName;
@Size(max = 50)
private String lastName;
@Email
@Size(min = 5, max = 100)
private String email;
private boolean activated = false;
@Size(min = 2, max = 5)
private String langKey;
private Set<String> authorities;
public UserDTO() {
// Empty constructor needed for MapStruct.
}
public UserDTO(User user) {
this(user.getId(), user.getLogin(), user.getFirstName(), user.getLastName(),
user.getEmail(), user.getActivated(),user.getLangKey(),
user.getAuthorities());
}
public UserDTO(String id, String login, String firstName, String lastName,
String email, boolean activated,String langKey,Set<String> authorities) {
this.id = id;
this.login = login;
this.firstName = firstName;
this.lastName = lastName;
this.email = email;
this.activated = activated;
this.langKey = langKey;
this.authorities = authorities;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getLogin() {
return login;
}
public void setLogin(String login) {
this.login = login;
}
public String getFirstName() {
return firstName;
}
public String getLastName() {
return lastName;
}
public String getEmail() {
return email;
}
public boolean isActivated() {
return activated;
}
public String getLangKey() {
return langKey;
}
public Set<String> getAuthorities() {
return authorities;
}
@Override
public String toString() {
return "UserDTO{" +
"login='" + login + '\'' +
", firstName='" + firstName + '\'' +
", lastName='" + lastName + '\'' +
", email='" + email + '\'' +
", activated=" + activated +
", langKey='" + langKey + '\'' +
", authorities=" + authorities +
"}";
}
}
| [
"raman.kumar.rai@gmail.com"
] | raman.kumar.rai@gmail.com |
02a6a6e1713fb2dacbec20996646490f84929fdf | 93408941ff5990d3ae1dff2facfb7a0fa515c0e0 | /service_client_common_src_business/com/path/vo/core/facilitytypeclass/FacilityTypeClassSC.java | 8378472627a9ef784877009c54ddb8db49dec080 | [] | no_license | aleemkhowaja/imal_common_business_code | d210d4e585095d1a27ffb85912bc787eb5552a37 | 1b34da83d546ca1bad02788763dc927bcb3237b0 | refs/heads/master | 2023-02-17T09:58:24.419658 | 2021-01-11T07:10:34 | 2021-01-11T07:10:34 | 328,573,717 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,200 | java | package com.path.vo.core.facilitytypeclass;
import java.math.BigDecimal;
import com.path.dbmaps.vo.V_DRAWDOWN_CLASSVO;
import com.path.struts2.lib.common.GridParamsSC;
public class FacilityTypeClassSC extends GridParamsSC
{
private V_DRAWDOWN_CLASSVO viewDrawDownClassVO;
private String ivCrud;
private String langCode;
private BigDecimal categoryCode;
private String classType;
private String appType;
private String generalFacilityType;
//used to use as cloumn instead of generalFacilityType
private String facilityType;
private BigDecimal facilityCode;
private BigDecimal facilityBr;
private BigDecimal generalFacTypeLovType;
public String getIvCrud()
{
return ivCrud;
}
public void setIvCrud(String ivCrud)
{
this.ivCrud = ivCrud;
}
public BigDecimal getCategoryCode()
{
return categoryCode;
}
public void setCategoryCode(BigDecimal categoryCode)
{
this.categoryCode = categoryCode;
}
public String getLangCode()
{
return langCode;
}
public void setLangCode(String langCode)
{
this.langCode = langCode;
}
public V_DRAWDOWN_CLASSVO getViewDrawDownClassVO()
{
return viewDrawDownClassVO;
}
public void setViewDrawDownClassVO(V_DRAWDOWN_CLASSVO viewDrawDownClassVO)
{
this.viewDrawDownClassVO = viewDrawDownClassVO;
}
public BigDecimal getFacilityCode()
{
return facilityCode;
}
public void setFacilityCode(BigDecimal facilityCode)
{
this.facilityCode = facilityCode;
}
public String getClassType()
{
return classType;
}
public void setClassType(String classType)
{
this.classType = classType;
}
public String getAppType()
{
return appType;
}
public void setAppType(String appType)
{
this.appType = appType;
}
public String getGeneralFacilityType()
{
return generalFacilityType;
}
public void setGeneralFacilityType(String generalFacilityType)
{
this.generalFacilityType = generalFacilityType;
}
/**
* @return the facilityBr
*/
public BigDecimal getFacilityBr()
{
return facilityBr;
}
/**
* @param facilityBr the facilityBr to set
*/
public void setFacilityBr(BigDecimal facilityBr)
{
this.facilityBr = facilityBr;
}
/**
* @return the generalFacTypeLovType
*/
public BigDecimal getGeneralFacTypeLovType()
{
return generalFacTypeLovType;
}
/**
* @param generalFacTypeLovType the generalFacTypeLovType to set
*/
public void setGeneralFacTypeLovType(BigDecimal generalFacTypeLovType)
{
this.generalFacTypeLovType = generalFacTypeLovType;
}
public String getFacilityType()
{
return facilityType;
}
public void setFacilityType(String facilityType)
{
this.facilityType = facilityType;
}
}
| [
"aleem2k11@gmail.com"
] | aleem2k11@gmail.com |
a0068530405520f5299169c9ca10d9b95070fb06 | f53b37575f2b005b3ac43537755664770fc60cab | /src/main/java/com/microwise/proxima/imagesync/ext/InfraredAnalyzerListener.java | e34c482c31eb506ae4b5710d265dda371604ce26 | [] | no_license | algsun/proxima-daemon | e81fe6432ab4deb03b844a7e866b86bfedb64268 | caddb83264f15745d0306d37be1f8718376fee3e | refs/heads/master | 2020-03-16T00:36:56.012811 | 2018-05-07T08:19:18 | 2018-05-07T08:19:18 | 132,419,356 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,040 | java | package com.microwise.proxima.imagesync.ext;
import com.microwise.proxima.bean.*;
import com.microwise.proxima.infraredImageResolution.ColorWheel;
import com.microwise.proxima.infraredImageResolution.InfraredAnalyzer;
import com.microwise.proxima.service.InfraredMarkRegionService;
import com.microwise.proxima.service.InfraredPictureDataService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import java.io.File;
import java.util.List;
/**
* 红外分析图片监听.
*
* @author wang.geng
* @date 14-4-2 上午9:49
* @check li.jianfei liu.zhu 2014-4-15 #8263
*/
@Component
@Scope("prototype")
public class InfraredAnalyzerListener implements ImageSyncListener {
private static final Logger log = LoggerFactory.getLogger(InfraredAnalyzerListener.class);
/**
* 红外图片解析类
*/
@Autowired
private InfraredAnalyzer infraredAnalyzer;
/**
* 红外图片数据信息服务层
*/
@Autowired
private InfraredPictureDataService infraredPictureDataService;
/**
* 红外标记区域 service
*/
@Autowired
private InfraredMarkRegionService infraredMarkRegionService;
@Override
public void onImageSync(File newImage, DVType dvType, DVPlaceBean dvPlace, PictureBean pictureBean) {
//如果不是红外图片,直接返回
if (dvType != DVType.INFRARED) {
return;
}
//分析原图的图片温度
InfraredPictureDataBean infraredPictureDataBean = this.infraredPictureDataService
.findByPicId(pictureBean.getId());
//判断高低温度是否温控,为空则解析图片的高低温
if (infraredPictureDataBean == null) {
try {
infraredPictureDataBean = this.infraredAnalyzer.saveInfraredPicData(pictureBean, newImage);
} catch (Exception e) {
log.error(String.format("解析文物图片(%s/%s)高、低、平均温度失败.",
pictureBean.getPath(), pictureBean.getName()), e);
}
}
//获取摄像机点位区域
List<InfraredMarkRegionBean> infraredList = this.infraredMarkRegionService
.findInfraredMarkRegions(dvPlace.getId());
//判断是否有区域
if (infraredList == null) {
return;
}
for (InfraredMarkRegionBean infraredMark : infraredList) {
ColorWheel colorWheel = this.infraredAnalyzer.getColorWheel();
//解析图片
try {
this.infraredAnalyzer.infraredSingleRegionAnalyzer(
infraredMark, infraredPictureDataBean, newImage, colorWheel, pictureBean
);
} catch (Exception e) {
log.error("解析图片失败", e);
}
}
log.info("执行完成");
}
}
| [
"algtrue@163.com"
] | algtrue@163.com |
42fada2b66d33b5e637fdf01682885ec7b6a0b49 | 8c16ff651bfa23072745503856ca8c43d515294b | /aeron-cluster/src/test/java/io/aeron/cluster/ClusterServiceIpcIngressTest.java | 74236b108d5ceef62b119d7db5bdc5e955a5ea3d | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | Diffblue-benchmarks/Real-logic-aeron | d3a57db60aa3666078c85c3078e8a562ab69ce01 | b4bcbf3ed40cd9ea184ce4959dfaa2a3c9d20d65 | refs/heads/master | 2020-06-02T23:25:08.168053 | 2019-06-10T19:07:51 | 2019-06-10T19:07:51 | 191,341,966 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,605 | java | /*
* Copyright 2014-2019 Real Logic Ltd.
*
* 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 io.aeron.cluster;
import org.junit.Test;
import static io.aeron.Aeron.NULL_VALUE;
public class ClusterServiceIpcIngressTest
{
@Test(timeout = 10_000L)
public void shouldEchoIpcMessages() throws Exception
{
try (TestCluster cluster = TestCluster.startThreeNodeStaticCluster(NULL_VALUE))
{
cluster.awaitLeader();
cluster.connectClient();
final int messageCount = 10;
for (int i = 0; i < messageCount; i++)
{
cluster.msgBuffer().putStringWithoutLengthAscii(0, TestMessages.ECHO_IPC_INGRESS);
cluster.sendMessage(TestMessages.ECHO_IPC_INGRESS.length());
}
cluster.awaitResponses(messageCount);
cluster.awaitMessageCountForService(cluster.node(0), messageCount);
cluster.awaitMessageCountForService(cluster.node(1), messageCount);
cluster.awaitMessageCountForService(cluster.node(2), messageCount);
}
}
}
| [
"mjpt777@gmail.com"
] | mjpt777@gmail.com |
b1a762623637546065bfe5cd8f606f5114018bb4 | eb70c1b311c82a282fd744eb89b983a26a939ea0 | /src/main/java/com/arjjs/ccm/tool/WordUtils.java | 8c890d790708e3c5555dc0411f37c3a52bf31599 | [] | no_license | arjccm/arjccm_std | dbf0e11fbc536cc3222628d2e96d03b319adacd3 | 10c58d5db58fbfa95d4f8ba6b6490276ad464486 | refs/heads/master | 2022-12-23T16:56:49.462938 | 2021-02-03T07:51:11 | 2021-02-03T07:51:11 | 239,068,652 | 2 | 4 | null | 2022-12-16T15:24:51 | 2020-02-08T04:25:37 | JavaScript | UTF-8 | Java | false | false | 3,704 | java | package com.arjjs.ccm.tool;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import com.lowagie.text.Cell;
import com.lowagie.text.Document;
import com.lowagie.text.DocumentException;
import com.lowagie.text.Element;
import com.lowagie.text.Font;
import com.lowagie.text.Image;
import com.lowagie.text.Paragraph;
import com.lowagie.text.Table;
import com.lowagie.text.pdf.BaseFont;
public class WordUtils {
/**
* 方法说明:单元格内添加一行
* @param cell
* @param content
* @param bfChinese
* @param font
* @param location
*/
public static void addLineInCell(Cell cell,String content,BaseFont bfChinese,Font font,int location){
Paragraph paragraph = new Paragraph(content);
paragraph.setFont(font);
paragraph.setAlignment(location);
cell.add(paragraph);
}
/**
* 方法说明:添加一行
* @param document
* @param content
* @param bfChinese
* @param font
* @param location
* @throws DocumentException
*/
public static void addLine(Document document, String content,BaseFont bfChinese,Font font,int location) throws DocumentException{
Paragraph paragraph = new Paragraph(content);
paragraph.setFont(font);
paragraph.setAlignment(location);
document.add(paragraph);
}
/**
* 方法说明:一行添加一张图片
* @param URL
* @return
* @throws Exception
*/
@SuppressWarnings("unused")
public static Table ONEPNG(String URL) throws Exception {
Table table = new Table(1);
//表格的主体
table.setAutoFillEmptyCells(true);
table.setBorder(0);
table.disableBorderSide(0);
table.setBorderWidth(0);
int width[] = {100};//设置每列宽度比例
table.setWidths(width);
table.setWidth(100);
String suffix = null;
Cell cell = new Cell();
cell.setHorizontalAlignment(Element.ALIGN_CENTER);
cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
table.addCell(cell);
String picName = URL;
suffix = picName.substring(picName.lastIndexOf("."));
Image png = Image.getInstance(picName);
png.scaleAbsolute(200f, 200f);
cell.add(png);
return table;
}
/**
* 文件转存(不修改文件名)
* @param path
* @param name
* @param targetPath
* @return
*/
public static String unloadingFile_New(String path,String name,String targetPath){
if (path == null) {
return null;
}
File f=new File(path);
if(f.exists()) {
File fileNewPatn = new File(targetPath+"/"+name);
//判断服务器文件夹是否存在,如果不存则创建目录
File realFilePath = new File(targetPath);
if (!realFilePath.exists()) {
realFilePath.mkdirs();//创建目录
}
try {
FileOutputStream fos = new FileOutputStream(fileNewPatn);//新文件路径
FileInputStream fis = new FileInputStream(path);//要转存的文件路径
byte[] buf = new byte[1024];
int len = 0;
while((len=fis.read(buf))!=-1)
{
fos.write(buf,0,len);
}
fos.close();
fis.close();
} catch (IOException e) {
e.printStackTrace();
throw new RuntimeException("复制文件失败");
}
return name;
}
return null;
}
/**
* 方法说明:转化时间,时间为null时转换成空字符
* @param date
* @return
*/
public static String DateUtils(Date date) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String dateTime = "";
if(date != null) {
dateTime = dateFormat.format(date);
}else {
dateTime = " ";
}
return dateTime;
}
} | [
"pymxb1991@163.com"
] | pymxb1991@163.com |
23667d0c6af4449d00881a60c7aca83310224db9 | 4bd27fa82e3204f9822fa9499376e6649ac3eb6a | /translator/src/main/java/info/dgjones/abora/ug2java/javatoken/StringLiteral.java | 67d764a8fb8655b2136af1fe0ec5059bc45bc038 | [
"MIT"
] | permissive | jonesd/udanax-gold2java | 089007df1b48272ef85f3b615e4d5180ff41c35e | def868447736dcf0928d5e3322ceeaa056463731 | refs/heads/master | 2022-01-25T11:45:24.907299 | 2022-01-07T03:07:41 | 2022-01-07T03:33:35 | 16,194,337 | 6 | 18 | MIT | 2022-01-07T03:42:40 | 2014-01-24T03:51:32 | Java | UTF-8 | Java | false | false | 1,552 | java | /**
* The MIT License
* Copyright (c) 2003 David G Jones
*
* 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 info.dgjones.abora.ug2java.javatoken;
public class StringLiteral extends JavaLiteral {
private final String stringValue;
public StringLiteral(String stringValue) {
super(generateValue(stringValue));
this.stringValue = stringValue;
}
private static String generateValue(String stringValue) {
return "\""+stringValue+"\"";
}
public String getStringValue() {
return stringValue;
}
}
| [
"david@dgjones.info"
] | david@dgjones.info |
2d1bf0b2b72054b786295cc40055400b2281e3b1 | e75be673baeeddee986ece49ef6e1c718a8e7a5d | /submissions/blizzard/Corpus/eclipse.jdt.ui/6892.java | 8178df7043ffb6d670759b0975b2c5414d22eafb | [
"MIT"
] | permissive | zhendong2050/fse18 | edbea132be9122b57e272a20c20fae2bb949e63e | f0f016140489961c9e3c2e837577f698c2d4cf44 | refs/heads/master | 2020-12-21T11:31:53.800358 | 2018-07-23T10:10:57 | 2018-07-23T10:10:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 222 | java | package p;
class A implements I {
int f;
public void m() {
}
public void m1() {
}
protected A f() {
return this;
}
void test() {
f().f = 0;
}
}
| [
"tim.menzies@gmail.com"
] | tim.menzies@gmail.com |
26a5f14887517111018136727cd02efa9f93d27f | d3034d8c27d96144651827a7b1b5e80daf10fd6a | /amap-data-cp-theater/src/main/java/com/amap/theater/crawl/GetTheaterType.java | deb816fd0420c61d134e2bc6e04f0d9398a78b91 | [] | no_license | javaxiaomangren/amap-data-cp | 5274b724dca9d95f3c3c55c1fc765ebbfdb583c6 | d3924a1765eb1e3d635338962c621fbd60e34223 | refs/heads/master | 2021-01-10T22:12:44.724500 | 2014-01-07T09:41:22 | 2014-01-07T09:41:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,691 | java | /**
* 2013-9-2
*/
package com.amap.theater.crawl;
import com.amap.base.data.DBDataReader;
import com.amap.base.http.HttpclientUtil;
import com.mongodb.util.JSON;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 通过分类接口,获取大麦网对应的分类
*/
public class GetTheaterType {
// private static String urlString = "http://10.2.134.101:8079/acs/getMiddleType";
//10.2.167.92
private static String urlString = "http://10.2.167.92:8080/acs/getMiddleType";
@SuppressWarnings({ "unchecked", "rawtypes" })
public static void main(String[] args) throws IOException {
// 输出信息:用于保存大类正确的信息
String path = "E:/rightType.txt";
File f0 = new File(path);
try {
f0.createNewFile();
System.out.println(f0.getName());
} catch (IOException e) {
e.printStackTrace();
}
OutputStreamWriter writer = new OutputStreamWriter(
new FileOutputStream(f0), "gbk");
// 输出信息:用于保存大类错误的信息
String path1 = "E:/wrongType.txt";
File f1 = new File(path1);
try {
f1.createNewFile();
System.out.println(f1.getName());
} catch (IOException e) {
e.printStackTrace();
}
OutputStreamWriter writer1 = new OutputStreamWriter(
new FileOutputStream(f1), "gbk");
// get data from sql
String sql = "select distinct name from theatre_damai";
DBDataReader ddr = new DBDataReader(sql);
ddr.setDbenv(null);
List<Map> datas = ddr.readAll();
for (Map data : datas) {
Map n = new HashMap();
n.put("str", data.get("name"));
String result = HttpclientUtil.get(urlString, n, "GBK");
List<Map> resultMap = (List<Map>) JSON.parse(result);
if(resultMap != null && resultMap.size() != 0){
if(assertRight(getType(resultMap))){
writer.write(data.get("name") + "," + getType(resultMap));
writer.write("\n");
writer.flush();
}else{
writer1.write(data.get("name") + "," + getType(resultMap));
writer1.write("\n");
writer1.flush();
}
}else{
writer1.write(data.get("name") + "," + "");
writer1.write("\n");
writer1.flush();
}
}
writer.close();
}
/**
* 判断是否包含指定大类,如果不包含的话,就返回第一个,否则返回指定的大类
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
private static String getType(List<Map> resultMap){
//赋初值
List<Map> types = (List<Map>) resultMap.get(0).get("types");
int i = 0;
while(i <= resultMap.size()){
if(types.size() == 0){
i ++;
if(i < resultMap.size()){
types = (List<Map>) resultMap.get(i).get("types");
}else{
i = resultMap.size() + 1;
}
}else{
types = (List<Map>) resultMap.get(i).get("types");
i = resultMap.size() + 1;
}
}
if(types.size() == 0){
return null;
}
String type = null;
try{
type = types.get(0).get("mtype") + "";
for(Map m : resultMap){
List<Map> temp = (List<Map>) m.get("types");
if(temp.size() == 0){
continue;
}
String t = temp.get(0).get("mtype") + "";
if(t.startsWith("08") || t.startsWith("11") || t.startsWith("14")){
return t;
}
}
}catch (Exception e) {
System.out.println();
}
return type;
}
//判断type是否在指定的大类中
private static boolean assertRight(String t){
if(t != null && (t.startsWith("08") || t.startsWith("11") || t.startsWith("14"))){
return true;
}
return false;
}
}
| [
"yang.hua@YH-E5430.autonavi.com"
] | yang.hua@YH-E5430.autonavi.com |
e2ac9f4e1a254e28312228fd3e406bf573610332 | 09230457b70c9ccf976618b1002505a5678feb3c | /app/src/main/java/com/renyu/carclient/activity/my/MyAddressChoiceActivity.java | 20e83ea78780bdfbf172a82e897cb0adf2158abe | [] | no_license | AlaricNorris/CarClient | 02502f3b01915765294157739ca7718888397d6f | 0fd8efbacd09feda7c44174ce466fe645d64a83e | refs/heads/master | 2021-05-03T20:52:29.064372 | 2016-04-03T00:17:16 | 2016-04-03T00:17:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,985 | java | package com.renyu.carclient.activity.my;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.TextView;
import com.renyu.carclient.R;
import com.renyu.carclient.adapter.MyAddressAdapter;
import com.renyu.carclient.base.BaseActivity;
import com.renyu.carclient.commons.ACache;
import com.renyu.carclient.commons.OKHttpHelper;
import com.renyu.carclient.commons.ParamUtils;
import com.renyu.carclient.model.AddressModel;
import com.renyu.carclient.model.JsonParse;
import com.renyu.carclient.model.UserModel;
import java.util.ArrayList;
import java.util.HashMap;
import butterknife.Bind;
import butterknife.OnClick;
/**
* Created by renyu on 16/1/5.
*/
public class MyAddressChoiceActivity extends BaseActivity {
@Bind(R.id.my_address_add)
TextView my_address_add;
@Bind(R.id.my_address_rv)
RecyclerView my_address_rv;
MyAddressAdapter adapter=null;
ArrayList<AddressModel> models;
UserModel userModel=null;
int addr_id=-1;
@Override
public int initContentView() {
return R.layout.activity_myaddress;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
userModel= ACache.get(this).getAsObject("user")!=null?(UserModel) ACache.get(this).getAsObject("user"):null;
addr_id=getIntent().getExtras().getInt("addr_id");
models=new ArrayList<>();
initViews();
}
private void initViews() {
my_address_rv.setHasFixedSize(true);
my_address_rv.setLayoutManager(new LinearLayoutManager(this));
adapter=new MyAddressAdapter(this, models, new MyAddressAdapter.OnItemClickListener() {
@Override
public void itemClick(int position) {
Intent intent=new Intent();
Bundle bundle=new Bundle();
bundle.putSerializable("addr_id", models.get(position));
intent.putExtras(bundle);
setResult(RESULT_OK, intent);
finish();
}
});
my_address_rv.setAdapter(adapter);
my_address_add.setText("管理我的收货地址");
}
@OnClick({R.id.my_address_add})
public void onClick(View view) {
switch (view.getId()) {
case R.id.my_address_add:
Intent intent=new Intent(MyAddressChoiceActivity.this, MyAddressActivity.class);
startActivity(intent);
break;
}
}
private void getAddressList() {
HashMap<String, String> params= ParamUtils.getSignParams("app.user.address.list", "28062e40a8b27e26ba3be45330ebcb0133bc1d1cf03e17673872331e859d2cd4");
params.put("user_id", ""+userModel.getUser_id());
httpHelper.commonPostRequest(ParamUtils.api, params, null, new OKHttpHelper.RequestListener() {
@Override
public void onSuccess(String string) {
models.clear();
ArrayList<AddressModel> temp= JsonParse.getAddressModels(string);
if (temp!=null) {
models.addAll(temp);
adapter.notifyDataSetChanged();
}
else {
showToast("未知错误");
}
}
@Override
public void onError() {
showToast(getResources().getString(R.string.network_error));
}
});
}
@Override
protected void onResume() {
super.onResume();
getAddressList();
}
@Override
public void onBackPressed() {
super.onBackPressed();
Intent intent=new Intent();
Bundle bundle=new Bundle();
bundle.putSerializable("addr_id", null);
intent.putExtras(bundle);
setResult(RESULT_OK, intent);
finish();
}
}
| [
"Yuren2@hotmail.com"
] | Yuren2@hotmail.com |
df965803f58190dcf8af7f98dca9336435916c2c | fba8af31d5d36d8a6cf0c341faed98b6cd5ec0cb | /src/main/java/com/alipay/api/response/AlipayOpenAppLingqierwuLingqierquQueryResponse.java | 2dd2bb38cf2a8db085d4ab6f46db21463185d0bb | [
"Apache-2.0"
] | permissive | planesweep/alipay-sdk-java-all | b60ea1437e3377582bd08c61f942018891ce7762 | 637edbcc5ed137c2b55064521f24b675c3080e37 | refs/heads/master | 2020-12-12T09:23:19.133661 | 2020-01-09T11:04:31 | 2020-01-09T11:04:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 396 | java | package com.alipay.api.response;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.open.app.lingqierwu.lingqierqu.query response.
*
* @author auto create
* @since 1.0, 2019-01-07 20:51:15
*/
public class AlipayOpenAppLingqierwuLingqierquQueryResponse extends AlipayResponse {
private static final long serialVersionUID = 8313916428429191315L;
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
51626ddbd88acb8ec991d592adac7d182deb454b | 6cd756bf890b53b748d41d14d6c460349a898c99 | /fr-designer-report-8.0/com/fr/design/actions/cell/ConditionAttributesAction.java | 839726edfcf5fd900d6e1d2cde994f838fcf94b2 | [] | no_license | jiangzhenjian/FineReport | 4208b347f3b7fe839fec97cc0cb67bd33d761ba8 | ca34e419b4f117684ecbfafdd6a1178cc94ce5c6 | refs/heads/master | 2021-01-07T20:53:20.460962 | 2017-01-22T03:25:11 | 2017-01-22T03:25:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,603 | java | // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi
package com.fr.design.actions.cell;
import com.fr.base.BaseUtils;
import com.fr.design.dialog.BasicPane;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.menu.KeySetUtils;
import com.fr.design.menu.MenuKeySet;
import com.fr.design.present.ConditionAttributesGroupPane;
import com.fr.report.cell.TemplateCellElement;
// Referenced classes of package com.fr.design.actions.cell:
// AbstractCellElementAction
public class ConditionAttributesAction extends AbstractCellElementAction
{
public ConditionAttributesAction(ElementCasePane elementcasepane)
{
super(elementcasepane);
setMenuKeySet(KeySetUtils.CONDITION_ATTR);
setName(getMenuKeySet().getMenuKeySetName());
setMnemonic(getMenuKeySet().getMnemonic());
setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_format/highlight.png"));
}
protected BasicPane populateBasicPane(TemplateCellElement templatecellelement)
{
ConditionAttributesGroupPane conditionattributesgrouppane = new ConditionAttributesGroupPane();
conditionattributesgrouppane.populate(templatecellelement.getHighlightGroup());
return conditionattributesgrouppane;
}
protected void updateBasicPane(BasicPane basicpane, TemplateCellElement templatecellelement)
{
templatecellelement.setHighlightGroup(((ConditionAttributesGroupPane)basicpane).updateHighlightGroup());
}
}
| [
"hao01@hao"
] | hao01@hao |
608900a2e4954f7881cbd91ee68f49e71a1e286f | f009dc33f9624aac592cb66c71a461270f932ffa | /src/main/java/com/alipay/api/domain/AlipayBossProdElecsealOrderApplyModel.java | b7b3a64e547300984ac5a4dde41fbf54c80a8fa7 | [
"Apache-2.0"
] | permissive | 1093445609/alipay-sdk-java-all | d685f635af9ac587bb8288def54d94e399412542 | 6bb77665389ba27f47d71cb7fa747109fe713f04 | refs/heads/master | 2021-04-02T16:49:18.593902 | 2020-03-06T03:04:53 | 2020-03-06T03:04:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,210 | 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, 2019-12-27 17:47:25
*/
public class AlipayBossProdElecsealOrderApplyModel extends AlipayObject {
private static final long serialVersionUID = 1278667422338919417L;
/**
* 接入法务中台电子应用服务的主体,一般为app名称
*/
@ApiField("app_name")
private String appName;
/**
* 请求版本号,由法务中台技术提供值
*/
@ApiField("app_version")
private Long appVersion;
/**
* 业务幂等字段,用于唯一标示一条业务记录
*/
@ApiField("business_unique_id")
private String businessUniqueId;
/**
* 业务方上传到法务中台oss,待进行电子签章的pdf文件地址
*/
@ApiField("file_oss_key")
private String fileOssKey;
/**
* 甲方签约主体信息
*/
@ApiField("first_party")
private AntlawSignOperator firstParty;
/**
* 根据请求值生成的hash值,用于法务中台进行鉴权
*/
@ApiField("hash_value")
private String hashValue;
/**
* 按页定义模式下的用印申请信息,每一页单独定义
*/
@ApiListField("seal_page_info_list")
@ApiField("seal_page_info")
private List<SealPageInfo> sealPageInfoList;
/**
* 电子用印申请类型,包括按页申请(PAGE_MODE)和统一模式申请(UNIFIED)
*/
@ApiField("seal_request_mode")
private String sealRequestMode;
/**
* 乙方签约企业列表
*/
@ApiListField("second_parties")
@ApiField("antlaw_sign_operator")
private List<AntlawSignOperator> secondParties;
/**
* 统一模式下需要用印的页码列表
*/
@ApiListField("unified_page_index_list")
@ApiField("number")
private List<Long> unifiedPageIndexList;
/**
* 统一模式下用印请求信息的定义,需要用印的所有页面都会使用此用印信息
*/
@ApiField("unified_seal_request_info")
private SealRequestInfo unifiedSealRequestInfo;
public String getAppName() {
return this.appName;
}
public void setAppName(String appName) {
this.appName = appName;
}
public Long getAppVersion() {
return this.appVersion;
}
public void setAppVersion(Long appVersion) {
this.appVersion = appVersion;
}
public String getBusinessUniqueId() {
return this.businessUniqueId;
}
public void setBusinessUniqueId(String businessUniqueId) {
this.businessUniqueId = businessUniqueId;
}
public String getFileOssKey() {
return this.fileOssKey;
}
public void setFileOssKey(String fileOssKey) {
this.fileOssKey = fileOssKey;
}
public AntlawSignOperator getFirstParty() {
return this.firstParty;
}
public void setFirstParty(AntlawSignOperator firstParty) {
this.firstParty = firstParty;
}
public String getHashValue() {
return this.hashValue;
}
public void setHashValue(String hashValue) {
this.hashValue = hashValue;
}
public List<SealPageInfo> getSealPageInfoList() {
return this.sealPageInfoList;
}
public void setSealPageInfoList(List<SealPageInfo> sealPageInfoList) {
this.sealPageInfoList = sealPageInfoList;
}
public String getSealRequestMode() {
return this.sealRequestMode;
}
public void setSealRequestMode(String sealRequestMode) {
this.sealRequestMode = sealRequestMode;
}
public List<AntlawSignOperator> getSecondParties() {
return this.secondParties;
}
public void setSecondParties(List<AntlawSignOperator> secondParties) {
this.secondParties = secondParties;
}
public List<Long> getUnifiedPageIndexList() {
return this.unifiedPageIndexList;
}
public void setUnifiedPageIndexList(List<Long> unifiedPageIndexList) {
this.unifiedPageIndexList = unifiedPageIndexList;
}
public SealRequestInfo getUnifiedSealRequestInfo() {
return this.unifiedSealRequestInfo;
}
public void setUnifiedSealRequestInfo(SealRequestInfo unifiedSealRequestInfo) {
this.unifiedSealRequestInfo = unifiedSealRequestInfo;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
7328c34993895b3c490a462c79fe6f97f1f30fe9 | 35dc1578e6c7030929b82952e66f37cd7a10aa51 | /chapter_001/src/main/java/ru/job4j/it/MatrixIt.java | f29f0ffcc071bf2d347fff771cf31c90df583114 | [] | no_license | RamonOga/job4j_design | fbebab3162b61190f3968a66db5b1d011d1d620a | 09cb914e54caf35a48cf614393a5e46d4ecb97e8 | refs/heads/master | 2023-05-29T08:56:52.270618 | 2021-06-15T06:40:22 | 2021-06-15T06:40:22 | 312,775,485 | 7 | 0 | null | null | null | null | UTF-8 | Java | false | false | 745 | java | package ru.job4j.it;
import java.util.Iterator;
import java.util.NoSuchElementException;
public class MatrixIt implements Iterator<Integer> {
private final int[][] data;
private int row = 0;
private int column = 0;
public MatrixIt(int[][] data) {
this.data = data;
}
@Override
public boolean hasNext() {
while ((data[row].length == 0 || column >= data[row].length)
&& row < data.length - 1) {
row++;
column = 0;
}
return column < data[row].length;
}
@Override
public Integer next() {
if (!hasNext()) {
throw new NoSuchElementException();
}
return data[row][column++];
}
} | [
"roman.sercent@gmail.com"
] | roman.sercent@gmail.com |
52bbe4092d550cf047bdff2e2c9776917f90df83 | 13b57812c558a02cb145119c1d7e7106686add16 | /src/main/java/com/mtsmda/keygen/desktop/repository/StatusRepository.java | 82d5e7f6134ee45658e4a99ecd9a4dd629591cef | [] | no_license | akbars95/keygen | d8cca45100ec869ad58c9ec4376a1ce6a55c3afc | 5394b2414db959da9c3b4e796dea308e8fcc0f1e | refs/heads/master | 2021-01-11T02:57:26.936971 | 2016-10-14T05:32:32 | 2016-10-14T05:32:32 | 70,876,931 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 687 | java | package com.mtsmda.keygen.desktop.repository;
import com.mtsmda.keygen.desktop.model.Status;
import com.mtsmda.keygen.desktop.object.response.CommonResponse;
import java.util.List;
/**
* Created by dminzat on 9/22/2016.
*/
public interface StatusRepository {
String T_STATUSES = "statuses";
String T_STATUSES_F_STATUS_ID = "status_id";
String T_STATUSES_F_STATUS_VALUE = "status_value";
String T_STATUSES_F_STATUS_STAGE = "status_stage";
CommonResponse<Status> getStatusByName(String name);
CommonResponse<Status> getStatusById(String id);
CommonResponse<Status> getStatusByStage(Integer stage);
CommonResponse<List<Status>> getAllStatuses();
} | [
"mynzat.dmitrii@gmail.com"
] | mynzat.dmitrii@gmail.com |
3cf9d09280d9e681cc45f0826f016a89894b9df8 | 35c3542337f8999921c50dc0533427d5de140841 | /core/src/io/anuke/myri/animation/WalkAnimation.java | 897a103f07c68e3d29d431d5a6fe8a8890f2dd9d | [] | no_license | Anuken/Myri | b4472154e16f72b85a58aa80a5dec81406efb08c | 8247e29824b92e88be70ed074183ff68271dcffc | refs/heads/master | 2020-05-30T07:11:28.905268 | 2017-05-16T16:46:08 | 2017-05-16T16:46:08 | 69,305,829 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,758 | java | package io.anuke.myri.animation;
import static com.badlogic.gdx.math.MathUtils.*;
import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.math.Vector2;
import io.anuke.myri.graphics.SoftModel;
public class WalkAnimation extends ModelAnimation{
int i = 0;
float speed = 1f;
float tailwag = 1f;
float bodymove = 1f;
float legmove = 1f;
float legraise = 1.5f;
float earmove = 1f;
@Override
public void animate(SoftModel model){
i = 0;
float t = time / 10f * speed;
model.forEachChild("leg", (leg) -> {
float step = ((i == 2 || i == 1) ? 0 : 10) + i * 3;
int index = 0;
float b = 0;
for(Vector2 bone : leg.getBones()){
index++;
float si = (b += 2.1f) / 10f + t + step;
bone.y = (0.1f + sin(si)) * b / 2f * legmove;
if(index == leg.getBones().length){
bone.y = MathUtils.lerp(bone.y, leg.getBones()[index - 2].y, Math.abs(si % PI2 - PI) / (PI * 0.6f));//leg.getBones()[index-2].y;
}
bone.x = leg.defaultX(index - 1) + sin(t + step) * legraise;
}
i++;
});
SoftModel tail = model.getChild("tail");
int b = 0;
for(int i = tail.getBones().length - 1; i >= 0; i--){
tail.getBones()[i].y = (sin((b += 1f) / 10f + t)) * b / 3f * tailwag;
}
SoftModel body = model;
b = 0;
for(Vector2 bone : body.getBones()){
bone.y = (sin((b += 2f) / 10f + t)) * b / 9f * bodymove;
}
SoftModel ear1 = model.findChild("earf");
b = ear1.getBones().length-1;
for(Vector2 bone : ear1.getBones()){
bone.y = sin(t)*b/5f*earmove;
b --;
}
SoftModel ear2 = model.findChild("earb");
b = ear1.getBones().length-2;
for(Vector2 bone : ear2.getBones()){
bone.y = -sin(t)*b/5f*earmove;
b --;
}
model.updateTransformedPosition();
model.updateAll();
}
}
| [
"arnukren@gmail.com"
] | arnukren@gmail.com |
6257d0a5d897f0b8672f339e79d65b3948a5f3ab | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/JetBrains--intellij-community/1ee00c7d85b7aba1609ddebae9d7ebfd7406961f/after/PsiProximityComparator.java | 5702bec5c0b8e2f6bca8b22e6ecdf7dc8297dfec | [] | 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 | 2,326 | java | /*
* Created by IntelliJ IDEA.
* User: cdr
* Date: Jul 13, 2007
* Time: 2:09:28 PM
*/
package com.intellij.psi.util.proximity;
import com.intellij.extapi.psi.MetadataPsiElementBase;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.module.ModuleUtil;
import com.intellij.psi.PsiElement;
import com.intellij.psi.WeighingComparable;
import com.intellij.psi.statistics.StatisticsManager;
import com.intellij.psi.util.ProximityWeigherExtension;
import com.intellij.psi.util.ProximityWeighingLocation;
import org.jetbrains.annotations.Nullable;
import java.util.Comparator;
public class PsiProximityComparator implements Comparator<Object> {
private final PsiElement myContext;
public PsiProximityComparator(PsiElement context) {
myContext = context;
}
public int compare(final Object o1, final Object o2) {
PsiElement element1 = o1 instanceof PsiElement ? (PsiElement)o1 : null;
PsiElement element2 = o2 instanceof PsiElement ? (PsiElement)o2 : null;
if (element1 == null) return element2 == null ? 0 : 1;
if (element2 == null) return -1;
final WeighingComparable<PsiElement,ProximityWeighingLocation> proximity1 = getProximity(element1, getContext());
final WeighingComparable<PsiElement,ProximityWeighingLocation> proximity2 = getProximity(element2, getContext());
if (proximity1 == null || proximity2 == null) {
return 0;
}
if (!proximity1.equals(proximity2)) {
return proximity1.compareTo(proximity2);
}
StatisticsManager statisticsManager = StatisticsManager.getInstance();
int count1 = statisticsManager.getMemberUseCount(element1);
int count2 = statisticsManager.getMemberUseCount(element2);
return count2 - count1;
}
public PsiElement getContext() {
return myContext;
}
@Nullable
public static WeighingComparable<PsiElement, ProximityWeighingLocation> getProximity(final PsiElement element, final PsiElement context) {
if (element == null) return null;
if (element instanceof MetadataPsiElementBase) return null;
if (context == null) return null;
Module contextModule = ModuleUtil.findModuleForPsiElement(context);
if (contextModule == null) return null;
return ProximityWeigherExtension.KEY.weigh(element, new ProximityWeighingLocation(context, contextModule));
}
} | [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
848dadb110f3acc31ca82ca62886d7915613944f | 74b2e8708cfe013527704c257e680020aaf8eb3c | /src/org/jfree/chart/plot/Pannable.java | 15810ed0fb876e918b2b2389a38429cc825938ef | [] | no_license | elfkingw/caipiao | 7d9768683d50fa92d62f14dc19905eba45a90eba | 65a0ee0722765ba359e1e88263384b20f3272bcf | refs/heads/master | 2021-06-04T05:40:46.490377 | 2019-02-02T09:10:07 | 2019-02-02T09:10:07 | 10,156,520 | 1 | 1 | null | 2013-05-20T14:41:26 | 2013-05-19T14:26:25 | Java | UTF-8 | Java | false | false | 3,180 | java | /* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2011, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/index.html
*
* This library 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 2.1 of the License, or
* (at your option) any later version.
*
* This library 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 this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA.
*
* [Oracle and Java are registered trademarks of Oracle and/or its affiliates.
* Other names may be trademarks of their respective owners.]
*
* -------------
* Pannable.java
* -------------
*
* (C) Copyright 2009, by Object Refinery Limited and Contributors.
*
* Original Author: Ulrich Voigt - patch 2686040;
* Contributor(s): David Gilbert (for Object Refinery Limited);
*
* Changes
* -------
* 19-Mar-2009 : Version 1, with modifications from patch by UV (DG);
*
*/
package org.jfree.chart.plot;
import java.awt.geom.Point2D;
import org.jfree.chart.ChartPanel;
/**
* An interface that the {@link ChartPanel} class uses to communicate with
* plots that support panning.
*
* @since 1.0.13
*/
public interface Pannable {
/**
* Returns the orientation of the plot.
*
* @return The orientation (never <code>null</code>).
*/
public PlotOrientation getOrientation();
/**
* Evaluates if the domain axis can be panned.
*
* @return <code>true</code> if the domain axis is pannable.
*/
public boolean isDomainPannable();
/**
* Evaluates if the range axis can be panned.
*
* @return <code>true</code> if the range axis is pannable.
*/
public boolean isRangePannable();
/**
* Pans the domain axes by the specified percentage.
*
* @param percent the distance to pan (as a percentage of the axis length).
* @param info the plot info
* @param source the source point where the pan action started.
*/
public void panDomainAxes(double percent, PlotRenderingInfo info,
Point2D source);
/**
* Pans the range axes by the specified percentage.
*
* @param percent the distance to pan (as a percentage of the axis length).
* @param info the plot info
* @param source the source point where the pan action started.
*/
public void panRangeAxes(double percent, PlotRenderingInfo info,
Point2D source);
}
| [
"elfkingw@gmail.com"
] | elfkingw@gmail.com |
3bcc57acd853d2bc1609a4780bc37bbbd2a91be0 | 9cdf4a803b5851915b53edaeead2546f788bddc6 | /machinelearning/5.0/drools-core/src/main/java/org/drools/rule/Collect.java | 01c4d42a594ed1a9d056f4bff3a54b02afef1765 | [
"Apache-2.0"
] | permissive | kiegroup/droolsjbpm-contributed-experiments | 8051a70cfa39f18bc3baa12ca819a44cc7146700 | 6f032d28323beedae711a91f70960bf06ee351e5 | refs/heads/master | 2023-06-01T06:11:42.641550 | 2020-07-15T15:09:02 | 2020-07-15T15:09:02 | 1,184,582 | 1 | 13 | null | 2021-06-24T08:45:52 | 2010-12-20T15:42:26 | Java | UTF-8 | Java | false | false | 3,624 | java | /*
* Copyright 2005 JBoss Inc
*
* 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 org.drools.rule;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.io.ObjectOutput;
import java.io.IOException;
import java.io.ObjectInput;
import org.drools.RuntimeDroolsException;
import org.drools.base.ClassObjectType;
/**
* @author etirelli
*
*/
public class Collect extends ConditionalElement
implements
PatternSource {
private static final long serialVersionUID = 400L;
private Pattern sourcePattern;
private Pattern resultPattern;
public Collect() {
}
public Collect(final Pattern sourcePattern,
final Pattern resultPattern) {
this.sourcePattern = sourcePattern;
this.resultPattern = resultPattern;
}
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
sourcePattern = (Pattern)in.readObject();
resultPattern = (Pattern)in.readObject();
}
public void writeExternal(ObjectOutput out) throws IOException {
out.writeObject(sourcePattern);
out.writeObject(resultPattern);
}
public Object clone() {
return new Collect( this.sourcePattern,
this.resultPattern );
}
public Pattern getResultPattern() {
return this.resultPattern;
}
public Pattern getSourcePattern() {
return this.sourcePattern;
}
public Collection instantiateResultObject() throws RuntimeDroolsException {
try {
// Collect can only be used with a Collection implementation, so
// FactTemplateObject type is not allowed
return (Collection) ((ClassObjectType) this.resultPattern.getObjectType()).getClassType().newInstance();
} catch ( final ClassCastException cce ) {
throw new RuntimeDroolsException( "Collect CE requires a Collection implementation as return type",
cce );
} catch ( final InstantiationException e ) {
throw new RuntimeDroolsException( "Collect CE requires a non-argument constructor for the return type",
e );
} catch ( final IllegalAccessException e ) {
throw new RuntimeDroolsException( "Collect CE requires an accessible constructor for the return type",
e );
}
}
public Map getInnerDeclarations() {
return this.sourcePattern.getInnerDeclarations();
}
public Map getOuterDeclarations() {
return Collections.EMPTY_MAP;
}
/**
* @inheritDoc
*/
public Declaration resolveDeclaration(final String identifier) {
return (Declaration) this.sourcePattern.getInnerDeclarations().get( identifier );
}
public List getNestedElements() {
return Collections.singletonList( this.sourcePattern );
}
public boolean isPatternScopeDelimiter() {
return true;
}
}
| [
"gizil.oguz@gmail.com"
] | gizil.oguz@gmail.com |
de0b07fd744c7b38ec10d96268320123e8cee624 | 4417b44f185966449a68b924e1a326a68db3be2c | /highdsa-common-parent/highdsa-common-entity/src/main/java/pers/husen/highdsa/common/entity/po/customer/CustNavigation.java | 60aa63827c08aabafff5a017614b3cefd0368e6e | [] | no_license | oneboat/highdsa | 38e2fe999c1237b1c10e94a7298b8b001a524941 | ec97827d95fcd118535050a5e96efb6735d11499 | refs/heads/master | 2020-05-29T16:34:20.191666 | 2018-06-20T09:59:24 | 2018-06-20T09:59:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,014 | java | package pers.husen.highdsa.common.entity.po.customer;
import java.io.Serializable;
import java.util.List;
/**
* @Desc 客户管理导航栏实体类
*
* @Author 何明胜
*
* @Created at 2018年4月24日 上午10:22:35
*
* @Version 1.0.0
*/
public class CustNavigation implements Serializable {
private static final long serialVersionUID = 1L;
/** 主菜单名称 */
private String navigationName;
/** 子菜单名称 列表 */
private List<CustPermission> childNavigations;
@Override
public String toString() {
return "Navigation [navigationName=" + navigationName + ", childNavigations=" + childNavigations + "]";
}
public String getNavigationName() {
return navigationName;
}
public void setNavigationName(String navigationName) {
this.navigationName = navigationName;
}
public List<CustPermission> getChildNavigations() {
return childNavigations;
}
public void setChildNavigations(List<CustPermission> childNavigations) {
this.childNavigations = childNavigations;
}
} | [
"husen@hemingsheng.cn"
] | husen@hemingsheng.cn |
c1940953c36bd2e8c59d7222fbf198d74e561447 | 082e26b011e30dc62a62fae95f375e4f87d9e99c | /docs/weixin_7.0.4_source/反编译源码/未反混淆/src/main/java/com/tencent/mm/plugin/appbrand/launching/ad.java | 88a9adfaaa4e8b514df669384ec373c171d90c46 | [] | no_license | xsren/AndroidReverseNotes | 9631a5aabc031006e795a112b7ac756a8edd4385 | 9202c276fe9f04a978e4e08b08e42645d97ca94b | refs/heads/master | 2021-04-07T22:50:51.072197 | 2019-07-16T02:24:43 | 2019-07-16T02:24:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,268 | java | package com.tencent.mm.plugin.appbrand.launching;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.bp.d;
import com.tencent.mm.m.g;
import com.tencent.mm.plugin.appbrand.v;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.ah;
final class ad {
final String appId;
ad(String str) {
this.appId = str;
}
/* Access modifiers changed, original: final */
public final boolean aHv() {
AppMethodBeat.i(131945);
if (g.Nu().getInt("WeAppForbiddenSwitch", 0) == 1) {
ab.i("MicroMsg.AppBrand.PreLaunchCheckForOversea", "startApp, WeAppForbiddenSwitch == 1, go webview, appId %s", this.appId);
Intent putExtra = new Intent().putExtra("rawUrl", v.xf(this.appId)).putExtra("forceHideShare", true);
Context context = ah.getContext();
if (!(context instanceof Activity)) {
putExtra.addFlags(268435456);
}
d.b(context, "webview", ".ui.tools.WebViewUI", putExtra);
AppMethodBeat.o(131945);
return true;
}
AppMethodBeat.o(131945);
return false;
}
}
| [
"alwangsisi@163.com"
] | alwangsisi@163.com |
bc1ca0dc9668969a79c800a03b679f52c421784f | 95bec9ea0a0e3b84f1722cd6bf1aa19349e6099e | /src/test/java/org/mockitousage/debugging/StubbingLookupListenerCallbackTest.java | 963b36c1f89790060f04454fb97176ff08cb0df6 | [
"MIT"
] | permissive | yangfancoming/mockito | fab90dbe69faf8958fc840208ed3e4a8801d7911 | 5aa9df3d4ffab02339081d1cf1a8fe691d1be20a | refs/heads/master | 2020-06-13T21:21:25.181334 | 2019-07-02T05:39:51 | 2019-07-02T05:39:51 | 194,789,228 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,601 | java |
package org.mockitousage.debugging;
import org.junit.Test;
import org.mockito.ArgumentMatcher;
import org.mockito.InOrder;
import org.mockito.listeners.StubbingLookupEvent;
import org.mockito.listeners.StubbingLookupListener;
import org.mockito.mock.MockCreationSettings;
import org.mockitousage.IMethods;
import org.mockitoutil.ConcurrentTesting;
import org.mockitoutil.TestBase;
import java.util.LinkedList;
import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.*;
public class StubbingLookupListenerCallbackTest extends TestBase {
StubbingLookupListener listener = mock(StubbingLookupListener.class);
StubbingLookupListener listener2 = mock(StubbingLookupListener.class);
Foo mock = mock(Foo.class, withSettings().stubbingLookupListeners(listener));
@Test
public void should_call_listener_when_mock_return_normally_with_stubbed_answer() {
// given
doReturn("coke").when(mock).giveMeSomeString("soda");
doReturn("java").when(mock).giveMeSomeString("coffee");
// when
mock.giveMeSomeString("soda");
// then
verify(listener).onStubbingLookup(argThat(new ArgumentMatcher<StubbingLookupEvent>() {
@Override
public boolean matches(StubbingLookupEvent argument) {
assertEquals("soda", argument.getInvocation().getArgument(0));
assertEquals("mock", argument.getMockSettings().getMockName().toString());
assertEquals(2, argument.getAllStubbings().size());
assertNotNull(argument.getStubbingFound());
return true;
}
}));
}
@Test
public void should_call_listener_when_mock_return_normally_with_default_answer() {
// given
doReturn("java").when(mock).giveMeSomeString("coffee");
// when
mock.giveMeSomeString("soda");
// then
verify(listener).onStubbingLookup(argThat(new ArgumentMatcher<StubbingLookupEvent>() {
@Override
public boolean matches(StubbingLookupEvent argument) {
assertEquals("soda", argument.getInvocation().getArgument(0));
assertEquals("mock", argument.getMockSettings().getMockName().toString());
assertEquals(1, argument.getAllStubbings().size());
assertNull(argument.getStubbingFound());
return true;
}
}));
}
@Test
public void should_not_call_listener_when_mock_is_not_called() {
// when stubbing is recorded
doReturn("java").when(mock).giveMeSomeString("coffee");
// then
verifyZeroInteractions(listener);
}
@Test
public void should_allow_same_listener() {
// given
Foo mock = mock(Foo.class, withSettings().stubbingLookupListeners(listener, listener));
// when
mock.giveMeSomeString("tea");
mock.giveMeSomeString("coke");
// then each listener was notified 2 times (notified 4 times in total)
verify(listener, times(4)).onStubbingLookup(any(StubbingLookupEvent.class));
}
@Test
public void should_call_all_listeners_in_order() {
// given
Foo mock = mock(Foo.class, withSettings().stubbingLookupListeners(listener, listener2));
doReturn("sprite").when(mock).giveMeSomeString("soda");
// when
mock.giveMeSomeString("soda");
// then
InOrder inOrder = inOrder(listener, listener2);
inOrder.verify(listener).onStubbingLookup(any(StubbingLookupEvent.class));
inOrder.verify(listener2).onStubbingLookup(any(StubbingLookupEvent.class));
}
@Test
public void should_call_all_listeners_when_mock_throws_exception() {
// given
Foo mock = mock(Foo.class, withSettings().stubbingLookupListeners(listener, listener2));
doThrow(new NoWater()).when(mock).giveMeSomeString("tea");
// when
try {
mock.giveMeSomeString("tea");
fail();
} catch (NoWater e) {
// then
verify(listener).onStubbingLookup(any(StubbingLookupEvent.class));
verify(listener2).onStubbingLookup(any(StubbingLookupEvent.class));
}
}
@Test
public void should_delete_listener() {
// given
Foo mock = mock(Foo.class, withSettings().stubbingLookupListeners(listener, listener2));
// when
mock.doSomething("1");
mockingDetails(mock).getMockCreationSettings().getStubbingLookupListeners().remove(listener2);
mock.doSomething("2");
// then
verify(listener, times(2)).onStubbingLookup(any(StubbingLookupEvent.class));
verify(listener2, times(1)).onStubbingLookup(any(StubbingLookupEvent.class));
}
@Test
public void should_clear_listeners() {
// given
Foo mock = mock(Foo.class, withSettings().stubbingLookupListeners(listener, listener2));
// when
mockingDetails(mock).getMockCreationSettings().getStubbingLookupListeners().clear();
mock.doSomething("foo");
// then
verifyZeroInteractions(listener, listener2);
}
@Test
public void add_listeners_concurrently_sanity_check() throws Exception {
//given
final IMethods mock = mock(IMethods.class);
final MockCreationSettings<?> settings = mockingDetails(mock).getMockCreationSettings();
List<Runnable> runnables = new LinkedList<Runnable>();
for (int i = 0; i < 50; i++) {
runnables.add(new Runnable() {
public void run() {
StubbingLookupListener listener1 = mock(StubbingLookupListener.class);
StubbingLookupListener listener2 = mock(StubbingLookupListener.class);
settings.getStubbingLookupListeners().add(listener1);
settings.getStubbingLookupListeners().add(listener2);
settings.getStubbingLookupListeners().remove(listener1);
}
});
}
//when
ConcurrentTesting.concurrently(runnables.toArray(new Runnable[runnables.size()]));
//then
//This assertion may be flaky. If it is let's fix it or remove the test. For now, I'm keeping the test.
assertEquals(50, settings.getStubbingLookupListeners().size());
}
private static class NoWater extends RuntimeException {}
}
| [
"34465021+jwfl724168@users.noreply.github.com"
] | 34465021+jwfl724168@users.noreply.github.com |
21197da549224d844b155f85cb1d6d5f7eb733d3 | 6e1f1af36bf3921018d587b6f72c35a7f07d8d67 | /src/main/java/com/sun/corba/se/impl/protocol/giopmsgheaders/LocateReplyMessage_1_1.java | 870e55ce833bd66549dd8997d56c71a546af6c98 | [] | no_license | yangfancoming/gdk | 09802bd6b37466b38bf96771a201e6193bb06172 | c20c38f018aa34e07cdf26a8899d3126129f5d6a | refs/heads/master | 2021-07-07T13:06:15.193492 | 2020-04-16T01:04:40 | 2020-04-16T01:04:40 | 200,798,650 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,273 | java |
package com.sun.corba.se.impl.protocol.giopmsgheaders;
import org.omg.CORBA.INTERNAL;
import org.omg.CORBA.CompletionStatus;
import org.omg.CORBA.SystemException;
import com.sun.corba.se.spi.ior.IOR;
import com.sun.corba.se.spi.ior.IORFactories;
import com.sun.corba.se.spi.orb.ORB;
import com.sun.corba.se.spi.ior.iiop.GIOPVersion;
import com.sun.corba.se.impl.encoding.CDRInputStream;
import com.sun.corba.se.spi.logging.CORBALogDomains ;
import com.sun.corba.se.impl.logging.ORBUtilSystemException ;
/**
* This implements the GIOP 1.1 LocateReply header.
*
* @author Ram Jeyaraman 05/14/2000
*/
public final class LocateReplyMessage_1_1 extends Message_1_1
implements LocateReplyMessage {
// Instance variables
private ORB orb = null;
private int request_id = (int) 0;
private int reply_status = (int) 0;
private IOR ior = null;
// Constructors
LocateReplyMessage_1_1(ORB orb) {
this.orb = orb;
}
LocateReplyMessage_1_1(ORB orb, int _request_id,
int _reply_status, IOR _ior) {
super(Message.GIOPBigMagic, GIOPVersion.V1_1, FLAG_NO_FRAG_BIG_ENDIAN,
Message.GIOPLocateReply, 0);
this.orb = orb;
request_id = _request_id;
reply_status = _reply_status;
ior = _ior;
}
// Accessor methods
public int getRequestId() {
return this.request_id;
}
public int getReplyStatus() {
return this.reply_status;
}
public short getAddrDisposition() {
return KeyAddr.value;
}
public SystemException getSystemException(String message) {
return null; // 1.0 LocateReply body does not contain SystemException
}
public IOR getIOR() {
return this.ior;
}
// IO methods
public void read(org.omg.CORBA.portable.InputStream istream) {
super.read(istream);
this.request_id = istream.read_ulong();
this.reply_status = istream.read_long();
isValidReplyStatus(this.reply_status); // raises exception on error
// The code below reads the reply body if status is OBJECT_FORWARD
if (this.reply_status == OBJECT_FORWARD) {
CDRInputStream cdr = (CDRInputStream) istream;
this.ior = IORFactories.makeIOR( cdr ) ;
}
}
// Note, this writes only the header information. SystemException or
// IOR may be written afterwards into the reply mesg body.
public void write(org.omg.CORBA.portable.OutputStream ostream) {
super.write(ostream);
ostream.write_ulong(this.request_id);
ostream.write_long(this.reply_status);
}
// Static methods
public static void isValidReplyStatus(int replyStatus) {
switch (replyStatus) {
case UNKNOWN_OBJECT :
case OBJECT_HERE :
case OBJECT_FORWARD :
break;
default :
ORBUtilSystemException localWrapper = ORBUtilSystemException.get(
CORBALogDomains.RPC_PROTOCOL ) ;
throw localWrapper.illegalReplyStatus( CompletionStatus.COMPLETED_MAYBE);
}
}
public void callback(MessageHandler handler)
throws java.io.IOException
{
handler.handleInput(this);
}
} // class LocateReplyMessage_1_1
| [
"34465021+jwfl724168@users.noreply.github.com"
] | 34465021+jwfl724168@users.noreply.github.com |
084935108eb53a67929748cb3ffd9383c35dfb77 | 98d23caf4d899d51c73c4944b71a7c50ad1a3683 | /main/src/main/java/com/dk/mp/main/ui/LockActivity.java | 36794eda1bb81b8a6bd8dfe990e2ac993e2b620a | [] | no_license | dataedu/jsly | 7c61d4f2316afa7a5a950f7a0899e056e452bfac | cfcb0bf19881c809d4a851f4fa9b1baf9c83f802 | refs/heads/master | 2021-08-24T06:04:01.109842 | 2017-12-08T09:54:40 | 2017-12-08T09:54:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,916 | java | package com.dk.mp.main.ui;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Color;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.dk.mp.core.dialog.AlertDialog;
import com.dk.mp.core.entity.User;
import com.dk.mp.core.login.LoginActivity;
import com.dk.mp.core.ui.BaseActivity;
import com.dk.mp.core.util.CoreSharedPreferencesHelper;
import com.dk.mp.core.util.SnackBarUtil;
import com.dk.mp.core.util.StringUtils;
import com.dk.mp.core.view.locus.LocusPassWordView;
import com.dk.mp.main.R;
import com.facebook.drawee.view.SimpleDraweeView;
/**
* 手势密码
* 作者:janabo on 2017/3/25 10:13
*/
public class LockActivity extends BaseActivity implements View.OnClickListener,LocusPassWordView.OnCompleteListener {
SimpleDraweeView loginMess;//用户头像
FrameLayout id_user_avatarView;
private TextView mUserName;
private TextView mLockHint;
private LocusPassWordView mLockView;
private TextView mForgetText;
private String from;
private String action;
private String pwd;
private int count = 10;
private LinearLayout lock_message;
public CoreSharedPreferencesHelper preference;
@Override
protected int getLayoutID() {
return R.layout.lock_activity;
}
// @Override
// protected void onCreate(Bundle savedInstanceState) {
// super.onCreate(savedInstanceState);
// setContentView();
// preference = new CoreSharedPreferencesHelper(this);
// initView();
// initialize();
// }
@Override
protected void initView() {
super.initView();
preference = new CoreSharedPreferencesHelper(this);
if(preference.getInt("lock_num")>-1){
count=preference.getInt("lock_num");
}
id_user_avatarView= (FrameLayout) findViewById(R.id.id_user_avatarView);
loginMess = (SimpleDraweeView) findViewById(R.id.loginMess);
mUserName = (TextView) findViewById(R.id.id_user_name);
mLockHint = (TextView) findViewById(R.id.id_lock_hint);
mLockView = (LocusPassWordView) findViewById(R.id.id_lock_view);
mForgetText = (TextView) findViewById(R.id.id_forget_pwd);
lock_message = (LinearLayout) findViewById(R.id.lock_message);
mForgetText.setOnClickListener(this);
mLockView.setOnCompleteListener(this);
initialize();
}
protected void initialize() {
from = getIntent().getStringExtra("from");
action = getIntent().getStringExtra("action");
if ("set".equals(action)) {
mLockHint.setText("请绘制解锁图像");
mForgetText.setVisibility(View.GONE);
LocusPassWordView.clearPassword(LockActivity.this);
id_user_avatarView.setVisibility(View.INVISIBLE);
mUserName.setVisibility(View.INVISIBLE);
} else if ("vertify".equals(action)) {
mLockHint.setVisibility(View.GONE);
mForgetText.setVisibility(View.VISIBLE);
}else{
mForgetText.setVisibility(View.VISIBLE);
}
showUser();
}
private void showUser() {
User user = preference.getUser();
if (user != null) {
if(StringUtils.isNotEmpty(user.getPhoto())){
// ImageUtil.setImageView(LockActivity.this, mUserAvatar, user.getPhoto(), R.drawable.touming, R.drawable.touming);
}
if (!TextUtils.isEmpty(user.getUserName())) {
mUserName.setText(user.getUserName());
}
}
}
@Override
public void onClick(View view) {
new AlertDialog(mContext).show("提示", "忘记手势密码,需重新登录", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
Intent intent = new Intent(LockActivity.this, LoginActivity.class);
intent.putExtra("from", "lock");
startActivity(intent);
}
});
}
@Override
public void onComplete(String password) {
if ("set".equals(action)) {
mLockHint.setText("请再次绘制解锁图像");
mLockView.clearPassword();
action = "repeat";
pwd = password;
} else if ("repeat".equals(action)) {
if (pwd.equals(password)) {
preference.setInt("lock_num", -1);
// 设置成功,保存,跳转
showErrorMsg(lock_message,"绘制成功");
LocusPassWordView.setPassword(LockActivity.this, password);
navigateToMain();
} else {
// 两次设置不一致
mLockHint.setText("绘制解锁图像与第一次不相同,请重新绘制");
mLockView.clearPassword();
action = "set";
}
} else if ("vertify".equals(action)) {
if (mLockView.getPassword().equals(password)) {
// 密码验证正确,跳转
preference.setInt("lock_num", -1);
navigateToMain();
} else {
// 验证不正确,继续
mLockHint.setVisibility(View.VISIBLE);
mForgetText.setVisibility(View.VISIBLE);
mLockHint.setTextColor(Color.RED);
int countt=--count;
mLockHint.setText("密码错误你还可以输入" + countt + "次");
preference.setInt("lock_num", countt);
if (count > 0) {
mLockView.clearPassword();
} else {
preference.setInt("lock_num", countt);
preference.cleanUser();
LocusPassWordView.clearPassword(LockActivity.this);
Intent intent = new Intent(LockActivity.this, LoginActivity.class);
intent.putExtra("from", "lock");
startActivity(intent);
finish();
}
}
}
}
private void navigateToMain() {
Intent intent = new Intent(LockActivity.this, MainActivity.class);
startActivity(intent);
finish();
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
AlertDialog alertDialog = new AlertDialog(mContext);
alertDialog.exitApp();
return true;
} else {
return super.onKeyDown(keyCode, event);
}
}
/**
* 显示snakebar 错误信息
* @param v
* @param msg
*/
public void showErrorMsg(View v,String msg){
SnackBarUtil.showShort(v,msg);
}
}
| [
"376921106@qq.com"
] | 376921106@qq.com |
e06760a1fc0ffaa4b020e760940a3dec03d11cb0 | f634ac0e874e3147407a352e43403168b373875f | /src-intf/eayun-monitor-intf/src/main/java/com/eayun/monitor/model/BaseAlarmObject.java | f9cc35e6d08a2a879726d8ffba495b7210967121 | [] | no_license | yapengsong/business | 82d49442c1d546029c3449909b37c772b17bbef1 | f876cf82e1c08a91770ea58582719cda4e7927aa | refs/heads/master | 2021-01-19T21:44:35.104690 | 2017-04-19T03:33:24 | 2017-04-19T03:33:24 | 88,695,172 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,934 | java | package com.eayun.monitor.model;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;
/**
* ECSC报警对象实体类
* 网络1.3新增监控项类型
*
* @Filename: BaseAlarmObject.java
* @Description:
* @Version: 1.0
* @Author: duanbinbin
* @Email: binbin.duan@eayun.com
* @History:<br>
*<li>Date: 2017年3月2日</li>
*<li>Version: 1.0</li>
*<li>Content: create</li>
*
*/
@Entity
@Table(name = "ecsc_alarmobject")
public class BaseAlarmObject implements Serializable {
private static final long serialVersionUID = 862749530526735012L;
@Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "uuid")
@Column(name = "ao_id", unique = true, nullable = false, length = 32)
private String id;
@Column(name = "ao_alarmruleid", length = 32)
private String alarmRuleId; //报警规则id
@Column(name = "ao_vmid", length = 64)
private String vmId; //报警对象资源id
@Column(name = "ao_monitortype", length = 100)
private String monitorType; //监控项类型nodeId(网络1.3新增监控项类型)
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getAlarmRuleId() {
return alarmRuleId;
}
public void setAlarmRuleId(String alarmRuleId) {
this.alarmRuleId = alarmRuleId;
}
public String getVmId() {
return vmId;
}
public void setVmId(String vmId) {
this.vmId = vmId;
}
public String getMonitorType() {
return monitorType;
}
public void setMonitorType(String monitorType) {
this.monitorType = monitorType;
}
}
| [
"yapeng.song@eayun.com"
] | yapeng.song@eayun.com |
761e4410ebf16338d7f5e60a57bfff633c924fba | c885ef92397be9d54b87741f01557f61d3f794f3 | /tests-without-trycatch/Closure-107/com.google.javascript.jscomp.CommandLineRunner/BBC-F0-opt-40/29/com/google/javascript/jscomp/CommandLineRunner_ESTest.java | 51f0269ca5dfed94c2a8e46f9686c082c6770aed | [
"CC-BY-4.0",
"MIT"
] | permissive | pderakhshanfar/EMSE-BBC-experiment | f60ac5f7664dd9a85f755a00a57ec12c7551e8c6 | fea1a92c2e7ba7080b8529e2052259c9b697bbda | refs/heads/main | 2022-11-25T00:39:58.983828 | 2022-04-12T16:04:26 | 2022-04-12T16:04:26 | 309,335,889 | 0 | 1 | null | 2021-11-05T11:18:43 | 2020-11-02T10:30:38 | null | UTF-8 | Java | false | false | 4,704 | java | /*
* This file was automatically generated by EvoSuite
* Sat Oct 23 14:27:35 GMT 2021
*/
package com.google.javascript.jscomp;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import com.google.javascript.jscomp.CommandLineRunner;
import com.google.protobuf.ByteString;
import java.util.NoSuchElementException;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.evosuite.runtime.mock.java.io.MockFile;
import org.evosuite.runtime.mock.java.io.MockPrintStream;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true)
public class CommandLineRunner_ESTest extends CommandLineRunner_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
String[] stringArray0 = new String[4];
MockFile mockFile0 = new MockFile("", "3#YiYQsW&G1>]PX4}");
MockPrintStream mockPrintStream0 = new MockPrintStream(mockFile0);
ByteString.Output byteString_Output0 = ByteString.newOutput(207);
MockPrintStream mockPrintStream1 = new MockPrintStream(byteString_Output0, false);
CommandLineRunner commandLineRunner0 = null;
// try {
commandLineRunner0 = new CommandLineRunner(stringArray0, mockPrintStream0, mockPrintStream1);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// }
}
@Test(timeout = 4000)
public void test1() throws Throwable {
CommandLineRunner commandLineRunner0 = null;
// try {
commandLineRunner0 = new CommandLineRunner((String[]) null);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.google.javascript.jscomp.CommandLineRunner", e);
// }
}
@Test(timeout = 4000)
public void test2() throws Throwable {
// Undeclared exception!
// try {
CommandLineRunner.getDefaultExterns();
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.google.common.base.Preconditions", e);
// }
}
@Test(timeout = 4000)
public void test3() throws Throwable {
String[] stringArray0 = new String[6];
stringArray0[0] = "4FR4<C\"]M#sbo([N3E2";
stringArray0[1] = "ECMASCRIPT3";
stringArray0[2] = "xO,[D]F-";
stringArray0[3] = "@`uG&jFJle.=";
stringArray0[4] = "-uLJx9<;`0$gwY";
stringArray0[5] = ") name=";
CommandLineRunner commandLineRunner0 = null;
// try {
commandLineRunner0 = new CommandLineRunner(stringArray0);
// // fail("Expecting exception: NoSuchElementException");
// Unstable assertion
// } catch(NoSuchElementException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("java.util.LinkedList", e);
// }
}
@Test(timeout = 4000)
public void test4() throws Throwable {
String[] stringArray0 = new String[4];
stringArray0[0] = "3#YiYQsW&G1>]PX4}";
stringArray0[1] = "C";
stringArray0[2] = "incompatible enum element types";
stringArray0[3] = "";
MockFile mockFile0 = new MockFile("", "3#YiYQsW&G1>]PX4}");
MockPrintStream mockPrintStream0 = new MockPrintStream(mockFile0);
CommandLineRunner commandLineRunner0 = null;
// try {
commandLineRunner0 = new CommandLineRunner(stringArray0, mockPrintStream0, mockPrintStream0);
// // fail("Expecting exception: NoSuchElementException");
// Unstable assertion
// } catch(NoSuchElementException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("java.util.LinkedList", e);
// }
}
@Test(timeout = 4000)
public void test5() throws Throwable {
String[] stringArray0 = new String[4];
// Undeclared exception!
// try {
CommandLineRunner.main(stringArray0);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// }
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
d1da00797044a5090254fdb26ba5d4f303bcdbf0 | 4431ea7e67ffc51f46a58ef87dd9d6f4bd3b3dd3 | /src/main/java/com/jkujami/ramtrading/config/LiquibaseConfiguration.java | 74185fad0c6f78275aef7aad0c726643e132ff81 | [] | no_license | jkujami/ramtrading | 133a6124e7121f55de02347a66a8efddf81b3cb1 | 6ec88a65dc90227c9a8644344fea00671de98d01 | refs/heads/master | 2020-03-22T09:23:09.734743 | 2018-07-05T10:28:15 | 2018-07-05T10:28:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,917 | java | package com.jkujami.ramtrading.config;
import javax.sql.DataSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.core.task.TaskExecutor;
import io.github.jhipster.config.JHipsterConstants;
import io.github.jhipster.config.liquibase.AsyncSpringLiquibase;
import liquibase.integration.spring.SpringLiquibase;
@Configuration
public class LiquibaseConfiguration {
private final Logger log = LoggerFactory.getLogger(LiquibaseConfiguration.class);
private final Environment env;
public LiquibaseConfiguration(Environment env) {
this.env = env;
}
@Bean
public SpringLiquibase liquibase(@Qualifier("taskExecutor") TaskExecutor taskExecutor,
DataSource dataSource, LiquibaseProperties liquibaseProperties) {
// Use liquibase.integration.spring.SpringLiquibase if you don't want Liquibase to start asynchronously
SpringLiquibase liquibase = new AsyncSpringLiquibase(taskExecutor, env);
liquibase.setDataSource(dataSource);
liquibase.setChangeLog("classpath:config/liquibase/master.xml");
liquibase.setContexts(liquibaseProperties.getContexts());
liquibase.setDefaultSchema(liquibaseProperties.getDefaultSchema());
liquibase.setDropFirst(liquibaseProperties.isDropFirst());
if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_NO_LIQUIBASE)) {
liquibase.setShouldRun(false);
} else {
liquibase.setShouldRun(liquibaseProperties.isEnabled());
log.debug("Configuring Liquibase");
}
return liquibase;
}
}
| [
"jhipster-bot@users.noreply.github.com"
] | jhipster-bot@users.noreply.github.com |
eff5b725eb2b115732a870bff24137ea2787921e | c5fdaad366d8679d0e131a63c40cf62f8d44b244 | /src/com/designmode/a08_decoretor/Test.java | 7967a802c9ba87ebffba98071da09251525f2682 | [] | no_license | mxdldev/designmode | ef66e33c161a7cd85d8f137d554ad12f5b97a712 | 93ead09f473fa0c08c3eb8b457cfcd2e8eec2b94 | refs/heads/master | 2020-03-26T21:26:48.148807 | 2018-08-20T08:35:28 | 2018-08-20T08:35:28 | 145,388,811 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 172 | java | package com.designmode.a08_decoretor;
public class Test {
public static void main(String[] args) {
PersonNew person = new PersonNew(new Person());
person.eat();
}
}
| [
"geduo_83@163.com"
] | geduo_83@163.com |
d77d1c7821751672fc66e144a6481a8b196cec37 | 58da62dfc6e145a3c836a6be8ee11e4b69ff1878 | /src/main/java/com/alipay/api/domain/ChildCertInfo.java | 3de783af868ebc740e70e57260fa94bac3a2bd28 | [
"Apache-2.0"
] | permissive | zhoujiangzi/alipay-sdk-java-all | 00ef60ed9501c74d337eb582cdc9606159a49837 | 560d30b6817a590fd9d2c53c3cecac0dca4449b3 | refs/heads/master | 2022-12-26T00:27:31.553428 | 2020-09-07T03:39:05 | 2020-09-07T03:39:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 765 | java | package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 小宝账户信息
*
* @author auto create
* @since 1.0, 2019-08-08 11:16:03
*/
public class ChildCertInfo extends AlipayObject {
private static final long serialVersionUID = 1385666187483917243L;
/**
* 儿童业务id
*/
@ApiField("child_id")
private String childId;
/**
* 小宝账户跳转链接
*/
@ApiField("url")
private NextUrl url;
public String getChildId() {
return this.childId;
}
public void setChildId(String childId) {
this.childId = childId;
}
public NextUrl getUrl() {
return this.url;
}
public void setUrl(NextUrl url) {
this.url = url;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
0c3632da926dcafb9dd621be0bb4d38b5da41106 | d85028f6a7c72c6e6daa1dd9c855d4720fc8b655 | /net/md_5/bungee/netty/PipelineUtils.java | a29660b25d87943135c555ea634d119bf7f521a9 | [] | no_license | RavenLeaks/Aegis-src-cfr | 85fb34c2b9437adf1631b103f555baca6353e5d5 | 9815c07b0468cbba8d1efbfe7643351b36665115 | refs/heads/master | 2022-10-13T02:09:08.049217 | 2020-06-09T15:31:27 | 2020-06-09T15:31:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,029 | java | /*
* Decompiled with CFR <Could not determine version>.
*/
package net.md_5.bungee.netty;
import io.netty.channel.Channel;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.MultithreadEventLoopGroup;
import io.netty.channel.ServerChannel;
import io.netty.channel.WriteBufferWaterMark;
import io.netty.channel.epoll.Epoll;
import io.netty.channel.epoll.EpollDatagramChannel;
import io.netty.channel.epoll.EpollEventLoopGroup;
import io.netty.channel.epoll.EpollServerSocketChannel;
import io.netty.channel.epoll.EpollSocketChannel;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioDatagramChannel;
import io.netty.channel.socket.nio.NioServerSocketChannel;
import io.netty.channel.socket.nio.NioSocketChannel;
import io.netty.util.AttributeKey;
import io.netty.util.internal.PlatformDependent;
import java.util.concurrent.ThreadFactory;
import java.util.logging.Level;
import java.util.logging.Logger;
import net.md_5.bungee.BungeeServerInfo;
import net.md_5.bungee.UserConnection;
import net.md_5.bungee.Util;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.config.ListenerInfo;
import net.md_5.bungee.netty.PipelineUtils;
import net.md_5.bungee.protocol.KickStringWriter;
import net.md_5.bungee.protocol.Varint21LengthFieldPrepender;
public class PipelineUtils {
public static final AttributeKey<ListenerInfo> LISTENER = AttributeKey.valueOf((String)"ListerInfo");
public static final AttributeKey<UserConnection> USER = AttributeKey.valueOf((String)"User");
public static final AttributeKey<BungeeServerInfo> TARGET = AttributeKey.valueOf((String)"Target");
public static final ChannelInitializer<Channel> SERVER_CHILD = new ChannelInitializer<Channel>(){
protected void initChannel(Channel ch) throws java.lang.Exception {
if (net.md_5.bungee.BungeeCord.getInstance().getConnectionThrottle() != null && net.md_5.bungee.BungeeCord.getInstance().getConnectionThrottle().throttle((java.net.InetAddress)((java.net.InetSocketAddress)ch.remoteAddress()).getAddress())) {
ch.close();
return;
}
ListenerInfo listener = ch.attr(LISTENER).get();
BASE.initChannel((Channel)ch);
ch.pipeline().addBefore((String)"frame-decoder", (String)"legacy-decoder", (io.netty.channel.ChannelHandler)new net.md_5.bungee.protocol.LegacyDecoder());
ch.pipeline().addAfter((String)"frame-decoder", (String)"packet-decoder", (io.netty.channel.ChannelHandler)new net.md_5.bungee.protocol.MinecraftDecoder((net.md_5.bungee.protocol.Protocol)net.md_5.bungee.protocol.Protocol.HANDSHAKE, (boolean)true, (int)ProxyServer.getInstance().getProtocolVersion()));
ch.pipeline().addAfter((String)"frame-prepender", (String)"packet-encoder", (io.netty.channel.ChannelHandler)new net.md_5.bungee.protocol.MinecraftEncoder((net.md_5.bungee.protocol.Protocol)net.md_5.bungee.protocol.Protocol.HANDSHAKE, (boolean)true, (int)ProxyServer.getInstance().getProtocolVersion()));
ch.pipeline().addBefore((String)"frame-prepender", (String)"legacy-kick", (io.netty.channel.ChannelHandler)PipelineUtils.access$000());
ch.pipeline().get(net.md_5.bungee.netty.HandlerBoss.class).setHandler((net.md_5.bungee.netty.PacketHandler)new net.md_5.bungee.connection.InitialHandler((net.md_5.bungee.BungeeCord)net.md_5.bungee.BungeeCord.getInstance(), (ListenerInfo)listener));
if (!listener.isProxyProtocol()) return;
ch.pipeline().addFirst((io.netty.channel.ChannelHandler[])new io.netty.channel.ChannelHandler[]{new io.netty.handler.codec.haproxy.HAProxyMessageDecoder()});
}
};
public static final Base BASE = new Base();
private static final KickStringWriter legacyKicker = new KickStringWriter();
private static final Varint21LengthFieldPrepender framePrepender = new Varint21LengthFieldPrepender();
public static final String TIMEOUT_HANDLER = "timeout";
public static final String PACKET_DECODER = "packet-decoder";
public static final String PACKET_ENCODER = "packet-encoder";
public static final String BOSS_HANDLER = "inbound-boss";
public static final String ENCRYPT_HANDLER = "encrypt";
public static final String DECRYPT_HANDLER = "decrypt";
public static final String FRAME_DECODER = "frame-decoder";
public static final String FRAME_PREPENDER = "frame-prepender";
public static final String LEGACY_DECODER = "legacy-decoder";
public static final String LEGACY_KICKER = "legacy-kick";
private static boolean epoll;
private static final int LOW_MARK;
private static final int HIGH_MARK;
private static final WriteBufferWaterMark MARK;
public static EventLoopGroup newEventLoopGroup(int threads, ThreadFactory factory) {
MultithreadEventLoopGroup multithreadEventLoopGroup;
if (epoll) {
multithreadEventLoopGroup = new EpollEventLoopGroup((int)threads, (ThreadFactory)factory);
return multithreadEventLoopGroup;
}
multithreadEventLoopGroup = new NioEventLoopGroup((int)threads, (ThreadFactory)factory);
return multithreadEventLoopGroup;
}
public static Class<? extends ServerChannel> getServerChannel() {
if (!epoll) return NioServerSocketChannel.class;
return EpollServerSocketChannel.class;
}
public static Class<? extends Channel> getChannel() {
if (!epoll) return NioSocketChannel.class;
return EpollSocketChannel.class;
}
public static Class<? extends Channel> getDatagramChannel() {
if (!epoll) return NioDatagramChannel.class;
return EpollDatagramChannel.class;
}
static /* synthetic */ KickStringWriter access$000() {
return legacyKicker;
}
static /* synthetic */ WriteBufferWaterMark access$100() {
return MARK;
}
static /* synthetic */ Varint21LengthFieldPrepender access$200() {
return framePrepender;
}
static {
if (!PlatformDependent.isWindows() && Boolean.parseBoolean((String)System.getProperty((String)"bungee.epoll", (String)"true"))) {
ProxyServer.getInstance().getLogger().info((String)"Not on Windows, attempting to use enhanced EpollEventLoop");
epoll = Epoll.isAvailable();
if (epoll) {
ProxyServer.getInstance().getLogger().info((String)"Epoll is working, utilising it!");
} else {
ProxyServer.getInstance().getLogger().log((Level)Level.WARNING, (String)"Epoll is not working, falling back to NIO: {0}", (Object)Util.exception((Throwable)Epoll.unavailabilityCause()));
}
}
LOW_MARK = Integer.getInteger((String)"net.md_5.bungee.low_mark", (int)524288).intValue();
HIGH_MARK = Integer.getInteger((String)"net.md_5.bungee.high_mark", (int)2097152).intValue();
MARK = new WriteBufferWaterMark((int)LOW_MARK, (int)HIGH_MARK);
}
}
| [
"emlin2021@gmail.com"
] | emlin2021@gmail.com |
ec4844a41f6212efc19426badb6aaf28e59bd910 | 6baf1fe00541560788e78de5244ae17a7a2b375a | /hollywood/com.oculus.socialplatform-base/sources/X/AbstractC05811Bb.java | c84267ea6c59a0db63c901def617ed38cda76387 | [] | no_license | phwd/quest-tracker | 286e605644fc05f00f4904e51f73d77444a78003 | 3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba | refs/heads/main | 2023-03-29T20:33:10.959529 | 2021-04-10T22:14:11 | 2021-04-10T22:14:11 | 357,185,040 | 4 | 2 | null | 2021-04-12T12:28:09 | 2021-04-12T12:28:08 | null | UTF-8 | Java | false | false | 141 | java | package X;
/* renamed from: X.1Bb reason: invalid class name and case insensitive filesystem */
public abstract class AbstractC05811Bb {
}
| [
"cyuubiapps@gmail.com"
] | cyuubiapps@gmail.com |
b1eac7f3815f927e1ca3660c7736444fcd9fe474 | 0cb9c1c3ea7c74fcdc412cdad84957b3b92473f0 | /src/cn0/day7/demo05/Thread/Person.java | 11e783fc070c84fb66c1e317d2cc29bacf6f0363 | [] | no_license | plusyou13/java_demo | 1c96dd4238ee50fb6325a25a417fd230b9560cff | 1d16ac9c5c5b94494a0962dcd2c7f0d08e46000f | refs/heads/master | 2022-11-17T06:49:24.818635 | 2020-07-17T07:01:15 | 2020-07-17T07:01:15 | 275,190,730 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 461 | java | package cn0.day7.demo05.Thread;
public class Person {
private String name;
public void run(){
//定义循环,执行20次
for(int i=0; i<20; i++){
System.out.println(name+"-->"+i);
}
}
public Person() {
}
public Person(String name) {
this.name = name;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
| [
"87831498@qq.com"
] | 87831498@qq.com |
0d696cf16619035e757122e983ccac0b590a7f30 | 345fedb01a883c98a55fbd2d96cfc89db161318d | /bin/custom/keyruspoc/keyruspocbackoffice/src/org/keyruspocbackoffice/jalo/YacceleratorbackofficeManager.java | 0ac17e75e006c2a28ca24375b917e87d9effe82f | [] | no_license | ironbats/keyrus-poc | 81d695be0fabfb3db28eb14100a37f8e0118eeca | 0f18b05c4c1aa02bb452e77ee7b366942058e9a9 | refs/heads/master | 2022-04-25T17:20:10.411146 | 2019-08-20T17:24:38 | 2019-08-20T17:24:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,189 | java | /*
* Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
*/
package org.keyruspocbackoffice.jalo;
import de.hybris.platform.core.Registry;
import de.hybris.platform.util.JspContext;
import java.util.Map;
import org.apache.log4j.Logger;
import org.keyruspocbackoffice.constants.YacceleratorbackofficeConstants;
/**
* This is the extension manager of the Ybackoffice extension.
*/
public class YacceleratorbackofficeManager extends GeneratedYacceleratorbackofficeManager
{
/** Edit the local|project.properties to change logging behavior (properties 'log4j.*'). */
private static final Logger LOG = Logger.getLogger(YacceleratorbackofficeManager.class.getName());
/*
* Some important tips for development:
*
* Do NEVER use the default constructor of manager's or items. => If you want to do something whenever the manger is
* created use the init() or destroy() methods described below
*
* Do NEVER use STATIC fields in your manager or items! => If you want to cache anything in a "static" way, use an
* instance variable in your manager, the manager is created only once in the lifetime of a "deployment" or tenant.
*/
/**
* Get the valid instance of this manager.
*
* @return the current instance of this manager
*/
public static YacceleratorbackofficeManager getInstance()
{
return (YacceleratorbackofficeManager) Registry.getCurrentTenant().getJaloConnection().getExtensionManager()
.getExtension(YacceleratorbackofficeConstants.EXTENSIONNAME);
}
/**
* Never call the constructor of any manager directly, call getInstance() You can place your business logic here -
* like registering a jalo session listener. Each manager is created once for each tenant.
*/
public YacceleratorbackofficeManager() // NOPMD
{
if (LOG.isDebugEnabled())
{
LOG.debug("constructor of YacceleratorbackofficeManager called.");
}
}
/**
* Use this method to do some basic work only ONCE in the lifetime of a tenant resp. "deployment". This method is
* called after manager creation (for example within startup of a tenant). Note that if you have more than one tenant
* you have a manager instance for each tenant.
*/
@Override
public void init()
{
if (LOG.isDebugEnabled())
{
LOG.debug("init() of YbackofficeManager called. " + getTenant().getTenantID());
}
}
/**
* Use this method as a callback when the manager instance is being destroyed (this happens before system
* initialization, at redeployment or if you shutdown your VM). Note that if you have more than one tenant you have a
* manager instance for each tenant.
*/
@Override
public void destroy()
{
if (LOG.isDebugEnabled())
{
LOG.debug("destroy() of YbackofficeManager called, current tenant: " + getTenant().getTenantID());
}
}
/**
* Implement this method to create initial objects. This method will be called by system creator during
* initialization and system update. Be sure that this method can be called repeatedly.
*
* An example usage of this method is to create required cronjobs or modifying the type system (setting e.g some
* default values)
*
* @param params
* the parameters provided by user for creation of objects for the extension
* @param jspc
* the jsp context; you can use it to write progress information to the jsp page during creation
*/
@Override
public void createEssentialData(final Map<String, String> params, final JspContext jspc)
{
// implement here code creating essential data
}
/**
* Implement this method to create data that is used in your project. This method will be called during the system
* initialization.
*
* An example use is to import initial data like currencies or languages for your project from an csv file.
*
* @param params
* the parameters provided by user for creation of objects for the extension
* @param jspc
* the jsp context; you can use it to write progress information to the jsp page during creation
*/
@Override
public void createProjectData(final Map<String, String> params, final JspContext jspc)
{
// implement here code creating project data
}
}
| [
"felipe.rodrigues@keyrus.com.br"
] | felipe.rodrigues@keyrus.com.br |
67781b87788ff0a0103067c2f30fa013b07f9c02 | 0529524c95045b3232f6553d18a7fef5a059545e | /app/src/androidTest/java/TestCase_com_aw_ldlogFree__641175360.java | 2d0e4f110721d817e65f77f3843e9ff51254e551 | [] | no_license | sunxiaobiu/BasicUnitAndroidTest | 432aa3e10f6a1ef5d674f269db50e2f1faad2096 | fed24f163d21408ef88588b8eaf7ce60d1809931 | refs/heads/main | 2023-02-11T21:02:03.784493 | 2021-01-03T10:07:07 | 2021-01-03T10:07:07 | 322,577,379 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 280 | java | import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(AndroidJUnit4.class)
public class TestCase_com_aw_ldlogFree__641175360 {
@Test
public void testCase() throws Exception {
// $FF: Couldn't be decompiled
}
}
| [
"sunxiaobiu@gmail.com"
] | sunxiaobiu@gmail.com |
4def16e76fd1529d7da250c61ded21c10bd24d92 | e4c36091dc08d17f6aca9a6985ae2143fa567a0e | /Albianj.UNID/src/org/albianj/unid/service/AlbianRemoteUNIDAttributeException.java | e847a0cdb3093fd9671f291689880e99a5f7fb92 | [
"BSD-3-Clause"
] | permissive | liuym89/Albianj2 | e628ce402de232ef5e221d26ef19b6608ef6d16c | 00469939b113651d224cdce16aac601b05a11a1d | refs/heads/master | 2020-12-03T02:12:09.880122 | 2016-05-09T09:00:03 | 2016-05-09T09:00:03 | 58,820,223 | 1 | 0 | null | 2016-05-14T17:14:44 | 2016-05-14T17:14:44 | null | UTF-8 | Java | false | false | 3,877 | java | /*
Copyright (c) 2016, Shanghai YUEWEN Information Technology Co., Ltd.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of Shanghai YUEWEN Information Technology Co., Ltd.
* nor the names of its contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY SHANGHAI YUEWEN INFORMATION TECHNOLOGY CO., LTD.
AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright (c) 2016 著作权由上海阅文信息技术有限公司所有。著作权人保留一切权利。
这份授权条款,在使用者符合以下三条件的情形下,授予使用者使用及再散播本软件包装原始码及二进位可执行形式的权利,无论此包装是否经改作皆然:
* 对于本软件源代码的再散播,必须保留上述的版权宣告、此三条件表列,以及下述的免责声明。
* 对于本套件二进位可执行形式的再散播,必须连带以文件以及/或者其他附于散播包装中的媒介方式,重制上述之版权宣告、此三条件表列,以及下述的免责声明。
* 未获事前取得书面许可,不得使用柏克莱加州大学或本软件贡献者之名称,来为本软件之衍生物做任何表示支持、认可或推广、促销之行为。
免责声明:本软件是由上海阅文信息技术有限公司及本软件之贡献者以现状提供,本软件包装不负任何明示或默示之担保责任,
包括但不限于就适售性以及特定目的的适用性为默示性担保。加州大学董事会及本软件之贡献者,无论任何条件、无论成因或任何责任主义、
无论此责任为因合约关系、无过失责任主义或因非违约之侵权(包括过失或其他原因等)而起,对于任何因使用本软件包装所产生的任何直接性、间接性、
偶发性、特殊性、惩罚性或任何结果的损害(包括但不限于替代商品或劳务之购用、使用损失、资料损失、利益损失、业务中断等等),
不负任何责任,即在该种使用已获事前告知可能会造成此类损害的情形下亦然。
*/
package org.albianj.unid.service;
public class AlbianRemoteUNIDAttributeException extends Exception {
private static final long serialVersionUID = -826864515616216400L;
public AlbianRemoteUNIDAttributeException() {
super();
}
/**
* @param msg
*/
public AlbianRemoteUNIDAttributeException(String msg) {
super(msg);
}
/**
* @param msg
* @param cause
*/
public AlbianRemoteUNIDAttributeException(String msg, Throwable cause) {
super(msg, cause);
}
/**
* @param cause
*/
public AlbianRemoteUNIDAttributeException(Throwable cause) {
super(cause);
}
}
| [
"xvhfeng@gmail.com"
] | xvhfeng@gmail.com |
8c46484cd9cd019188e405c9ed1dc70507c00c92 | 93278855ceb877f8d0496322a6abd640976e64bf | /src/main/java/pt/altran/script/db/StatementsVerifier.java | a6f0a80f6c702009722795f34c62b7373d347ea8 | [] | no_license | fabm/script.runner | dea38b0575f68783d3a4cb7bcf690b4119a058f4 | e96174f9343f94b5a151dcbfc0306d176f591eb0 | refs/heads/master | 2021-01-10T18:43:34.744210 | 2015-08-05T09:51:11 | 2015-08-05T09:51:11 | 38,566,958 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 733 | java | package pt.altran.script.db;
import org.junit.Assert;
import java.sql.ResultSet;
public class StatementsVerifier implements ResultListener{
private String statement;
public void startScript() {
//do nothing
}
public void currentStatement(String statement) {
this.statement = statement;
}
public void setIsNotEmpty(boolean hasResult) {
Assert.assertTrue("Statement:\n" + statement + "\n is empty!",hasResult);
}
public void currentResultSet(ResultSet resultSet) {
//do nothing
}
public boolean delegateIteration() {
return true;
}
public void setColumnsCount(int cols) {
//do nothing
}
public void afterRun() {
}
}
| [
"francisco.ab.monteiro@gmail.com"
] | francisco.ab.monteiro@gmail.com |
6587dde02e0b8cd21611a9329fc30aad2bc68c74 | 45e78a6d8dfcc9a0ac3e79c445da085e7864f185 | /src/main/java/me/travis/wurstplus/wurstplustwo/hacks/combat/WurstplusSocks.java | 6c09ba2c1ce37cc737c440cdbaa4ae0f5ce9c211 | [
"Apache-2.0"
] | permissive | GordsSleek/CheatBreakerPlus-src | 992efa51dec4632a60389fc942b5d0f401844579 | d1af903e5b15466cf78ae1a28cf8673c2b6b4e07 | refs/heads/main | 2023-05-27T08:05:06.033976 | 2021-04-24T21:22:33 | 2021-04-24T21:22:33 | 378,003,989 | 0 | 0 | Apache-2.0 | 2021-06-18T01:39:51 | 2021-06-18T01:39:50 | null | UTF-8 | Java | false | false | 4,126 | java | package me.travis.wurstplus.wurstplustwo.hacks.combat;
import me.travis.wurstplus.wurstplustwo.guiscreen.settings.WurstplusSetting;
import me.travis.wurstplus.wurstplustwo.hacks.WurstplusCategory;
import me.travis.wurstplus.wurstplustwo.hacks.WurstplusHack;
import me.travis.wurstplus.wurstplustwo.util.WurstplusBlockInteractHelper;
import me.travis.wurstplus.wurstplustwo.util.WurstplusBlockInteractHelper.ValidResult;
import me.travis.wurstplus.wurstplustwo.util.WurstplusBlockUtil;
import me.travis.wurstplus.wurstplustwo.util.WurstplusPlayerUtil;
import net.minecraft.block.Block;
import net.minecraft.block.BlockEnderChest;
import net.minecraft.block.BlockObsidian;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import java.util.ArrayList;
public class WurstplusSocks extends WurstplusHack {
// if you use this ur actually bad
public WurstplusSocks() {
super(WurstplusCategory.WURSTPLUS_COMBAT);
this.name = "Socks";
this.tag = "Socks";
this.description = "Protects your feet";
}
WurstplusSetting rotate = create("Rotate", "SocksRotate", false);
WurstplusSetting swing = create("Swing", "SocksSwing", "Mainhand", combobox("Mainhand", "Offhand", "Both", "None"));
@Override
protected void enable() {
if (find_in_hotbar() == -1) {
this.set_disable();
return;
}
}
@Override
public void update() {
final int slot = find_in_hotbar();
if (slot == -1) return;
BlockPos center_pos = WurstplusPlayerUtil.GetLocalPlayerPosFloored();
ArrayList<BlockPos> blocks_to_fill = new ArrayList<>();
switch (WurstplusPlayerUtil.GetFacing())
{
case East:
blocks_to_fill.add(center_pos.east().east());
blocks_to_fill.add(center_pos.east().east().up());
blocks_to_fill.add(center_pos.east().east().east());
blocks_to_fill.add(center_pos.east().east().east().up());
break;
case North:
blocks_to_fill.add(center_pos.north().north());
blocks_to_fill.add(center_pos.north().north().up());
blocks_to_fill.add(center_pos.north().north().north());
blocks_to_fill.add(center_pos.north().north().north().up());
break;
case South:
blocks_to_fill.add(center_pos.south().south());
blocks_to_fill.add(center_pos.south().south().up());
blocks_to_fill.add(center_pos.south().south().south());
blocks_to_fill.add(center_pos.south().south().south().up());
break;
case West:
blocks_to_fill.add(center_pos.west().west());
blocks_to_fill.add(center_pos.west().west().up());
blocks_to_fill.add(center_pos.west().west().west());
blocks_to_fill.add(center_pos.west().west().west().up());
break;
default:
break;
}
BlockPos pos_to_fill = null;
for (BlockPos pos : blocks_to_fill) {
ValidResult result = WurstplusBlockInteractHelper.valid(pos);
if (result != ValidResult.Ok) continue;
if (pos == null) continue;
pos_to_fill = pos;
break;
}
WurstplusBlockUtil.placeBlock(pos_to_fill, find_in_hotbar(), rotate.get_value(true), rotate.get_value(true), swing);
}
private int find_in_hotbar() {
for (int i = 0; i < 9; ++i) {
final ItemStack stack = mc.player.inventory.getStackInSlot(i);
if (stack != ItemStack.EMPTY && stack.getItem() instanceof ItemBlock) {
final Block block = ((ItemBlock) stack.getItem()).getBlock();
if (block instanceof BlockEnderChest)
return i;
else if (block instanceof BlockObsidian)
return i;
}
}
return -1;
}
} | [
"68621329+Warrior80@users.noreply.github.com"
] | 68621329+Warrior80@users.noreply.github.com |
e86ff5776725904d1abcadad6203eab909e358c1 | 16a0051e1bc6c168c512b6e705378ced6031a150 | /src/test/java/sh/ory/kratos/model/VersionTest.java | f338b144f3a97760a800f478b1388d6889c223fa | [] | no_license | loposkin/kratos-client-java | d09c42513bb67ef8401cfef9607519f56f868d0c | d2ee31edf34b2870eeb0535604991516fa9caa7d | refs/heads/master | 2023-07-28T07:35:20.863261 | 2021-09-12T10:33:59 | 2021-09-12T10:33:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,514 | java | /*
* Ory Kratos API
* Documentation for all public and administrative Ory Kratos APIs. Public and administrative APIs are exposed on different ports. Public APIs can face the public internet without any protection while administrative APIs should never be exposed without prior authorization. To protect the administative API port you should use something like Nginx, Ory Oathkeeper, or any other technology capable of authorizing incoming requests.
*
* The version of the OpenAPI document: v0.7.6-alpha.1
* Contact: hi@ory.sh
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package sh.ory.kratos.model;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for Version
*/
public class VersionTest {
private final Version model = new Version();
/**
* Model tests for Version
*/
@Test
public void testVersion() {
// TODO: test Version
}
/**
* Test the property 'version'
*/
@Test
public void versionTest() {
// TODO: test version
}
}
| [
"3372410+aeneasr@users.noreply.github.com"
] | 3372410+aeneasr@users.noreply.github.com |
914cd327fae5b9a05e1a2892b773b283753c4cec | 7219f75733d906ff930e1b6ba1be249d6007b582 | /src/com/vikings/sanguo/cache/HolyCategoryCache.java | b630ede2ac411135c26a6379e7b083e500b98a16 | [] | no_license | wongainia/sanguo | 9c9b528a3b4cfaf58f94badf71add1b8bb77e038 | 55e38be665f1b9e3a4dc7a1caaa09728563cf4b2 | refs/heads/master | 2020-05-23T09:51:26.455001 | 2019-05-14T22:44:06 | 2019-05-14T22:44:06 | 186,711,060 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 924 | java | /**
* CopyRight 2012 Shenzhen Viking NetWork Tech Co., Ltd
*
* All right reserved.
*
* Time : 2013-11-8 上午9:53:45
*
* Author : Kircheis Chen
*
* Comment :
*/
package com.vikings.sanguo.cache;
import java.util.ArrayList;
import java.util.List;
import com.vikings.sanguo.model.HolyCategory;
public class HolyCategoryCache extends FileCache{
final static String NAME = "holy_category.csv";
@Override
public String getName() {
return NAME;
}
@Override
public Object getKey(Object obj) {
return ((HolyCategory)obj).getId();
}
@Override
public Object fromString(String line) {
return HolyCategory.fromString(line);
}
public int size() {
return content.size();
}
public List<HolyCategory> getAll() {
Object[] keys = getSortedKey();
List<HolyCategory> ls = new ArrayList<HolyCategory>();
for (Object it : keys)
ls.add((HolyCategory) content.get(it));
return ls;
}
}
| [
"dengyuanming@dengyuanming"
] | dengyuanming@dengyuanming |
f33d0d45f079c3c0f7dd41bdda68fedbe47b93c3 | 2ad68028b831d8833d5896a5ec2aef9e85e3464d | /src/day44_Agustos_18_2021_dersi_Abstract_Classes/Volvo.java | 361ca8e51d7b4879d500493271e59fc41ac82063 | [] | no_license | AydinTokuslu/JAVA | aa9fb49956032a2aed199a2b383a644600b1a3b8 | 89c3c2c193f787a690fec0553e82ebe159eb537f | refs/heads/master | 2023-08-19T08:57:18.569795 | 2021-09-17T09:08:51 | 2021-09-17T09:08:51 | 407,475,612 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 311 | java | package day44_Agustos_18_2021_dersi_Abstract_Classes;
public abstract class Volvo {//abs class
public abstract void kapi();//abs meth
public abstract void motor();//abs meth
int fiyat;
public void sunroof() {//concrete method
System.out.println("sunroof ile geceleri mehtaba dalip yoldan cikma");
}
}
| [
"eposta@site.com"
] | eposta@site.com |
ee876098d2d9c75fb1157350812ff7d8073458f9 | 03e483531cd3f892781974e214e583784b3ce897 | /İdmanProgramıLog/src/idman_log/Idman.java | ed40b32b01786187ed2575261faa00e0f54a728b | [] | no_license | huseyinsaglam/Java-SE | 37f43b16c4785387d5e999667afa2365e5d7bbca | b5537a828e125341259f3779bd58be9d6aeae666 | refs/heads/master | 2021-01-27T01:02:54.220177 | 2020-08-14T10:25:57 | 2020-08-14T10:25:57 | 243,470,290 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,263 | java | package idman_log;
public class Idman {
private int burpee_sayisi;
private int pushup_sayisi;
private int situp_sayisi;
private int squat_sayisi;
public Idman(int burpee_sayisi, int pushup_sayisi, int situp_sayisi, int squat_sayisi) {
this.burpee_sayisi = burpee_sayisi;
this.pushup_sayisi = pushup_sayisi;
this.situp_sayisi = situp_sayisi;
this.squat_sayisi = squat_sayisi;
}
public int getBurpee_sayisi() {
return burpee_sayisi;
}
public void setBurpee_sayisi(int burpee_sayisi) {
this.burpee_sayisi = burpee_sayisi;
}
public int getPushup_sayisi() {
return pushup_sayisi;
}
public void setPushup_sayisi(int pushup_sayisi) {
this.pushup_sayisi = pushup_sayisi;
}
public int getSitup_sayisi() {
return situp_sayisi;
}
public void setSitup_sayisi(int situp_sayisi) {
this.situp_sayisi = situp_sayisi;
}
public int getSquat_sayisi() {
return squat_sayisi;
}
public void setSquat_sayisi(int squat_sayisi) {
this.squat_sayisi = squat_sayisi;
}
public void hareketYap(String hareketTuru,int sayi){
if (hareketTuru.equals("Burpee")){
burpeeYap(sayi);
}
else if (hareketTuru.equals("Pushup")){
pushupYap(sayi);
}
else if (hareketTuru.equals("Situp")){
situpYap(sayi);
}
else if (hareketTuru.equals("Squat")){
squatYap(sayi);
}
else {
System.out.println("Gecersiz Hareket...");
}
}
public void burpeeYap(int sayi) {
if (burpee_sayisi == 0) {
System.out.println("Yapacak burpee kalmadi...");
}
if (burpee_sayisi - sayi < 0) {
System.out.println("Hedefledigin burpee sayisini gectin.Tebrikler!");
burpee_sayisi = 0;
System.out.println("Kalan Burpee : " + burpee_sayisi);
}
else {
burpee_sayisi -= sayi;
System.out.println("Kalan Burpee Sayisi : " + burpee_sayisi);
}
}
public void pushupYap(int sayi) {
if (pushup_sayisi == 0) {
System.out.println("Yapacak pushup kalmadi...");
}
if (pushup_sayisi - sayi < 0) {
System.out.println("Hedefledigin pushup sayisini gectin.Tebrikler!");
pushup_sayisi = 0;
System.out.println("Kalan Pushup : " + pushup_sayisi);
}
else {
pushup_sayisi -= sayi;
System.out.println("Kalan Pushup Sayisini : " + pushup_sayisi);
}
}
public void situpYap(int sayi) {
if (situp_sayisi == 0) {
System.out.println("Yapacak Situp kalmadi...");
}
if (situp_sayisi - sayi < 0) {
System.out.println("Hedefledigin situp sayisisni gectin.Tebrikler!");
situp_sayisi = 0;
System.out.println("Kalan Situp : " + situp_sayisi);
}
else {
situp_sayisi -= sayi;
System.out.println("Kalan Situp Sayisini : " + situp_sayisi);
}
}
public void squatYap(int sayi) {
if (squat_sayisi == 0) {
System.out.println("Yapacak squat kalmadi...");
}
if (squat_sayisi - sayi < 0) {
System.out.println("Hedefledigin squat sayisini gectin.Tebrikler!");
squat_sayisi = 0;
System.out.println("Kalan Squat : " + squat_sayisi);
}
else {
squat_sayisi -= sayi;
System.out.println("Kalan Squat Sayisini : " + squat_sayisi);
}
}
public boolean idmanBittiMi() {
return (burpee_sayisi == 0 ) && (pushup_sayisi == 0 ) && (situp_sayisi == 0 ) && (squat_sayisi == 0 );
}
}
| [
"hsaglam001@gmail.com"
] | hsaglam001@gmail.com |
4e267e5e5bb9a0d91ef0fbdf2cf6aacc767a17ae | 43ea91f3ca050380e4c163129e92b771d7bf144a | /services/iam/src/main/java/com/huaweicloud/sdk/iam/v3/model/KeystoneListAuthDomainsResponse.java | 4301915c2250ac0e277d4931b106465de9539b3c | [
"Apache-2.0"
] | permissive | wxgsdwl/huaweicloud-sdk-java-v3 | 660602ca08f32dc897d3770995b496a82a1cc72d | ee001d706568fdc7b852792d2e9aefeb9d13fb1e | refs/heads/master | 2023-02-27T14:20:54.774327 | 2021-02-07T11:48:35 | 2021-02-07T11:48:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,606 | java | package com.huaweicloud.sdk.iam.v3.model;
import com.huaweicloud.sdk.core.SdkResponse;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.huaweicloud.sdk.iam.v3.model.Domains;
import com.huaweicloud.sdk.iam.v3.model.LinksSelf;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Consumer;
import java.util.Objects;
/**
* Response Object
*/
public class KeystoneListAuthDomainsResponse extends SdkResponse {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="domains")
private List<Domains> domains = null;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="links")
private LinksSelf links = null;
public KeystoneListAuthDomainsResponse withDomains(List<Domains> domains) {
this.domains = domains;
return this;
}
public KeystoneListAuthDomainsResponse addDomainsItem(Domains domainsItem) {
if (this.domains == null) {
this.domains = new ArrayList<>();
}
this.domains.add(domainsItem);
return this;
}
public KeystoneListAuthDomainsResponse withDomains(Consumer<List<Domains>> domainsSetter) {
if(this.domains == null ){
this.domains = new ArrayList<>();
}
domainsSetter.accept(this.domains);
return this;
}
/**
* 账号信息列表。
* @return domains
*/
public List<Domains> getDomains() {
return domains;
}
public void setDomains(List<Domains> domains) {
this.domains = domains;
}
public KeystoneListAuthDomainsResponse withLinks(LinksSelf links) {
this.links = links;
return this;
}
public KeystoneListAuthDomainsResponse withLinks(Consumer<LinksSelf> linksSetter) {
if(this.links == null ){
this.links = new LinksSelf();
linksSetter.accept(this.links);
}
return this;
}
/**
* Get links
* @return links
*/
public LinksSelf getLinks() {
return links;
}
public void setLinks(LinksSelf links) {
this.links = links;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
KeystoneListAuthDomainsResponse keystoneListAuthDomainsResponse = (KeystoneListAuthDomainsResponse) o;
return Objects.equals(this.domains, keystoneListAuthDomainsResponse.domains) &&
Objects.equals(this.links, keystoneListAuthDomainsResponse.links);
}
@Override
public int hashCode() {
return Objects.hash(domains, links);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class KeystoneListAuthDomainsResponse {\n");
sb.append(" domains: ").append(toIndentedString(domains)).append("\n");
sb.append(" links: ").append(toIndentedString(links)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
| [
"hwcloudsdk@huawei.com"
] | hwcloudsdk@huawei.com |
dfe13f89ae528f3ee4686ec59df0a5c082e5a0ab | e63363389e72c0822a171e450a41c094c0c1a49c | /Mate20_9_0_0/src/main/java/com/android/server/wifi/-$$Lambda$SupplicantStaNetworkHal$rwAunRMwc7t4KILZpqpRZsbXFtM.java | 9c7b7bef506dc91c9a4686dc58a77a4df8db263c | [] | no_license | solartcc/HwFrameWorkSource | fc23ca63bcf17865e99b607cc85d89e16ec1b177 | 5b92ed0f1ccb4bafc0fdb08b6fc4d98447b754ad | refs/heads/master | 2022-12-04T21:14:37.581438 | 2020-08-25T04:30:43 | 2020-08-25T04:30:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 942 | java | package com.android.server.wifi;
import android.hardware.wifi.supplicant.V1_0.ISupplicantStaNetwork.getGroupCipherCallback;
import android.hardware.wifi.supplicant.V1_0.SupplicantStatus;
import android.util.MutableBoolean;
/* compiled from: lambda */
public final /* synthetic */ class -$$Lambda$SupplicantStaNetworkHal$rwAunRMwc7t4KILZpqpRZsbXFtM implements getGroupCipherCallback {
private final /* synthetic */ SupplicantStaNetworkHal f$0;
private final /* synthetic */ MutableBoolean f$1;
public /* synthetic */ -$$Lambda$SupplicantStaNetworkHal$rwAunRMwc7t4KILZpqpRZsbXFtM(SupplicantStaNetworkHal supplicantStaNetworkHal, MutableBoolean mutableBoolean) {
this.f$0 = supplicantStaNetworkHal;
this.f$1 = mutableBoolean;
}
public final void onValues(SupplicantStatus supplicantStatus, int i) {
SupplicantStaNetworkHal.lambda$getGroupCipher$7(this.f$0, this.f$1, supplicantStatus, i);
}
}
| [
"lygforbs0@mail.com"
] | lygforbs0@mail.com |
762d4d6fbe42ba9b01d6659adbc3eda948b15d4e | 4ed12588edb5dabbc2f06a92c5f044bbee350a3d | /src/main/java/com/javaman/reflect/ObjectAnalyzerTest.java | a2bdccc3d2ec07c935f9fa2769d0b52c3fabc001 | [] | no_license | pengzhetech/Learing-SE | 1c3343954531994de9723b0c045950461b7c7474 | d7a968a19d2d029176179048f722be3b254272f0 | refs/heads/master | 2023-06-01T01:09:54.280470 | 2023-05-21T07:15:18 | 2023-05-21T07:15:18 | 158,576,054 | 0 | 0 | null | 2022-06-21T02:05:08 | 2018-11-21T16:22:06 | Java | UTF-8 | Java | false | false | 2,477 | java | package com.javaman.reflect;
import java.lang.reflect.*;
import java.util.*;
/**
* @author pengzhe
* @date 2019-03-03 11:20
* @description
*/
public class ObjectAnalyzerTest {
public static void main(String[] args)
{
ArrayList<Integer> squares = new ArrayList<Integer>();
for (int i = 1; i <= 5; i++)
squares.add(i * i);
System.out.println(new ObjectAnalyzer().toString(squares));
}
}
class ObjectAnalyzer
{
/**
* Converts an object to a string representation that lists all fields.
* @param obj an object
* @return a string with the object's class name and all field names and
* values
*/
public String toString(Object obj)
{
if (obj == null) return "null";
if (visited.contains(obj)) return "...";
visited.add(obj);
Class cl = obj.getClass();
if (cl == String.class) return (String) obj;
if (cl.isArray())
{
String r = cl.getComponentType() + "[]{";
for (int i = 0; i < Array.getLength(obj); i++)
{
if (i > 0) r += ",";
Object val = Array.get(obj, i);
if (cl.getComponentType().isPrimitive()) r += val;
else r += toString(val);
}
return r + "}";
}
String r = cl.getName();
// inspect the fields of this class and all superclasses
do
{
r += "[";
Field[] fields = cl.getDeclaredFields();
AccessibleObject.setAccessible(fields, true);
// get the names and values of all fields
for (Field f : fields)
{
if (!Modifier.isStatic(f.getModifiers()))
{
if (!r.endsWith("[")) r += ",";
r += f.getName() + "=";
try
{
Class t = f.getType();
Object val = f.get(obj);
if (t.isPrimitive()) r += val;
else r += toString(val);
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
r += "]";
cl = cl.getSuperclass();
}
while (cl != null);
return r;
}
private ArrayList<Object> visited = new ArrayList<Object>();
}
| [
"pengzhepost@sina.com"
] | pengzhepost@sina.com |
bf9965357a9c8388ae018d551f489c4ab7f36792 | 354f9bb6cba05fe1837f4409a5c3b41ecd443791 | /testprograms/gello-compilersource/Model/src/org/gello/model/HL7RIM/generated/ObservationDiagnosisTypes.java | a675efc71b7fa54d5b4144943f85a4131ef42da4 | [] | no_license | ingoha/pwdt-ss10 | 915fe8279657a4f7e0de6750fded85d3a0165a12 | fb40efa326cdda9051a28a09ce55b4d531e72813 | refs/heads/master | 2016-08-07T10:22:31.482185 | 2010-06-24T08:18:52 | 2010-06-24T08:18:52 | 32,255,798 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,304 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0-b26-ea3
// 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: 2006.11.08 at 12:07:49 PM PST
//
package org.gello.model.HL7RIM.generated;
import javax.xml.bind.annotation.XmlEnum;
import org.gello.model.HL7RIM.generated.ObservationDiagnosisTypes;
/**
* <p>Java class for ObservationDiagnosisTypes.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="ObservationDiagnosisTypes">
* <restriction base="{}cs">
* <enumeration value="DX"/>
* <enumeration value="ADMDX"/>
* <enumeration value="DISDX"/>
* <enumeration value="INTDX"/>
* <enumeration value="NOI"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlEnum
public enum ObservationDiagnosisTypes {
ADMDX,
DISDX,
DX,
INTDX,
NOI;
public String value() {
return name();
}
public ObservationDiagnosisTypes fromValue(String v) {
return valueOf(v);
}
}
| [
"ingoha@users.noreply.github.com"
] | ingoha@users.noreply.github.com |
3d4120811448305e97ebc7f4955bed1f67786362 | ee1654453ea7ad4fc7b3a9a55533bbf156b88cc0 | /souyunSJ/app/src/main/java/com/xrwl/driver/module/order/driver/ui/MainActivity.java | 08456883b7078cc80860a706bc09fc1d0e8bee7c | [] | no_license | l331258747/souyunSJ | 8c39ec380be9ea27ab0a639f3031b707f487a240 | f32588355138b90f77c75a1b21d78b37791ff1b9 | refs/heads/master | 2023-04-30T01:29:12.138307 | 2021-05-18T03:43:14 | 2021-05-18T03:43:14 | 323,581,898 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,123 | java | package com.xrwl.driver.module.order.driver.ui;
import android.content.Intent;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.Toast;
import com.xrwl.driver.R;
import com.xrwl.driver.module.order.driver.ui.ui.basic.LocationActivity;
import com.xrwl.driver.module.order.driver.ui.ui.polyline.PolylineActivity;
import com.xrwl.driver.module.order.driver.ui.ui.route.RouteActivity;
/**
* Created by zhangqie on 2017/3/12.
*
* 高德地图功能列表
*/
public class MainActivity extends AppCompatActivity {
private static final String[] strList =new String[]{
"定位数据,显示地图,标注位置","两点绘制路线",
"多点绘制路线"
};
private ListView listView;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_maindetu);
initView();
}
private void initView(){
listView = (ListView) findViewById(R.id.listview);
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1,strList);
listView.setAdapter(adapter);
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
showIntent(position);
}
});
}
private void showIntent(int index){
switch (index){
case 0:
startActivity(new Intent(MainActivity.this,LocationActivity.class));
break;
case 1:
startActivity(new Intent(MainActivity.this,RouteActivity.class));
break;
case 2:
startActivity(new Intent(MainActivity.this,PolylineActivity.class));
break;
}
}
}
| [
"331258747@qq.com"
] | 331258747@qq.com |
1ee4facdab32962026bd0ab177fa55df1e5e75f8 | 4edce2a17e0c0800cdfeaa4b111e0c2fbea4563b | /net/minecraft/src/FileResourcePack.java | 393af5d1446949754da4ac6296d07eb65a4489af | [] | no_license | zaices/minecraft | da9b99abd99ac56e787eef1b6fecbd06b2d4cd51 | 4a99d8295e7ce939663e90ba8f1899c491545cde | refs/heads/master | 2021-01-10T20:20:38.388578 | 2013-10-06T00:16:11 | 2013-10-06T00:18:48 | 13,142,359 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,127 | java | package net.minecraft.src;
import com.google.common.base.Splitter;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import java.io.Closeable;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.Set;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
public class FileResourcePack extends AbstractResourcePack implements Closeable
{
public static final Splitter field_110601_c = Splitter.on('/').omitEmptyStrings().limit(3);
private ZipFile field_110600_d;
public FileResourcePack(File par1File)
{
super(par1File);
}
private ZipFile func_110599_c() throws IOException
{
if (this.field_110600_d == null)
{
this.field_110600_d = new ZipFile(this.field_110597_b);
}
return this.field_110600_d;
}
protected InputStream func_110591_a(String par1Str) throws IOException
{
ZipFile var2 = this.func_110599_c();
ZipEntry var3 = var2.getEntry(par1Str);
if (var3 == null)
{
throw new ResourcePackFileNotFoundException(this.field_110597_b, par1Str);
}
else
{
return var2.getInputStream(var3);
}
}
public boolean func_110593_b(String par1Str)
{
try
{
return this.func_110599_c().getEntry(par1Str) != null;
}
catch (IOException var3)
{
return false;
}
}
public Set func_110587_b()
{
ZipFile var1;
try
{
var1 = this.func_110599_c();
}
catch (IOException var8)
{
return Collections.emptySet();
}
Enumeration var2 = var1.entries();
HashSet var3 = Sets.newHashSet();
while (var2.hasMoreElements())
{
ZipEntry var4 = (ZipEntry)var2.nextElement();
String var5 = var4.getName();
if (var5.startsWith("assets/"))
{
ArrayList var6 = Lists.newArrayList(field_110601_c.split(var5));
if (var6.size() > 1)
{
String var7 = (String)var6.get(1);
if (!var7.equals(var7.toLowerCase()))
{
this.func_110594_c(var7);
}
else
{
var3.add(var7);
}
}
}
}
return var3;
}
protected void finalize()
{
this.close();
try
{
super.finalize();
}
catch (Throwable t)
{
}
}
public void close()
{
if (this.field_110600_d != null)
{
try
{
this.field_110600_d.close();
}
catch (Exception ex)
{
}
this.field_110600_d = null;
}
}
}
| [
"chlumanog@gmail.com"
] | chlumanog@gmail.com |
0c559189ffb0d33d9b6b7b770a53ae133ad95498 | 30045fb00c68306841ef742d583ec341b23c3121 | /iwsc2017/decompile/tomcat/java/org/apache/catalina/core/StandardPipeline.java | 4eb54224a4b94df10b8f3892f3bc945b7f0c7641 | [] | no_license | cragkhit/crjk-iwsc17 | df9132738e88d6fe47c1963f32faa5a100d41299 | a2915433fd2173e215b8e13e8fa0779bd5ccfe99 | refs/heads/master | 2021-01-13T15:12:15.553582 | 2016-12-12T16:13:07 | 2016-12-12T16:13:07 | 76,252,648 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 8,188 | java | package org.apache.catalina.core;
import org.apache.juli.logging.LogFactory;
import org.apache.catalina.JmxEnabled;
import javax.management.ObjectName;
import java.util.ArrayList;
import org.apache.tomcat.util.ExceptionUtils;
import org.apache.catalina.LifecycleException;
import org.apache.catalina.LifecycleState;
import org.apache.catalina.Lifecycle;
import org.apache.catalina.Container;
import org.apache.catalina.Valve;
import org.apache.juli.logging.Log;
import org.apache.catalina.Contained;
import org.apache.catalina.Pipeline;
import org.apache.catalina.util.LifecycleBase;
public class StandardPipeline extends LifecycleBase implements Pipeline, Contained {
private static final Log log;
protected Valve basic;
protected Container container;
protected Valve first;
public StandardPipeline() {
this ( null );
}
public StandardPipeline ( final Container container ) {
this.basic = null;
this.container = null;
this.first = null;
this.setContainer ( container );
}
@Override
public boolean isAsyncSupported() {
Valve valve;
boolean supported;
for ( valve = ( ( this.first != null ) ? this.first : this.basic ), supported = true; supported && valve != null; supported &= valve.isAsyncSupported(), valve = valve.getNext() ) {}
return supported;
}
@Override
public Container getContainer() {
return this.container;
}
@Override
public void setContainer ( final Container container ) {
this.container = container;
}
@Override
protected void initInternal() {
}
@Override
protected synchronized void startInternal() throws LifecycleException {
Valve current = this.first;
if ( current == null ) {
current = this.basic;
}
while ( current != null ) {
if ( current instanceof Lifecycle ) {
( ( Lifecycle ) current ).start();
}
current = current.getNext();
}
this.setState ( LifecycleState.STARTING );
}
@Override
protected synchronized void stopInternal() throws LifecycleException {
this.setState ( LifecycleState.STOPPING );
Valve current = this.first;
if ( current == null ) {
current = this.basic;
}
while ( current != null ) {
if ( current instanceof Lifecycle ) {
( ( Lifecycle ) current ).stop();
}
current = current.getNext();
}
}
@Override
protected void destroyInternal() {
final Valve[] valves2;
final Valve[] valves = valves2 = this.getValves();
for ( final Valve valve : valves2 ) {
this.removeValve ( valve );
}
}
@Override
public String toString() {
final StringBuilder sb = new StringBuilder ( "Pipeline[" );
sb.append ( this.container );
sb.append ( ']' );
return sb.toString();
}
@Override
public Valve getBasic() {
return this.basic;
}
@Override
public void setBasic ( final Valve valve ) {
final Valve oldBasic = this.basic;
if ( oldBasic == valve ) {
return;
}
if ( oldBasic != null ) {
if ( this.getState().isAvailable() && oldBasic instanceof Lifecycle ) {
try {
( ( Lifecycle ) oldBasic ).stop();
} catch ( LifecycleException e ) {
StandardPipeline.log.error ( "StandardPipeline.setBasic: stop", e );
}
}
if ( oldBasic instanceof Contained ) {
try {
( ( Contained ) oldBasic ).setContainer ( null );
} catch ( Throwable t ) {
ExceptionUtils.handleThrowable ( t );
}
}
}
if ( valve == null ) {
return;
}
if ( valve instanceof Contained ) {
( ( Contained ) valve ).setContainer ( this.container );
}
if ( this.getState().isAvailable() && valve instanceof Lifecycle ) {
try {
( ( Lifecycle ) valve ).start();
} catch ( LifecycleException e ) {
StandardPipeline.log.error ( "StandardPipeline.setBasic: start", e );
return;
}
}
for ( Valve current = this.first; current != null; current = current.getNext() ) {
if ( current.getNext() == oldBasic ) {
current.setNext ( valve );
break;
}
}
this.basic = valve;
}
@Override
public void addValve ( final Valve valve ) {
if ( valve instanceof Contained ) {
( ( Contained ) valve ).setContainer ( this.container );
}
if ( this.getState().isAvailable() && valve instanceof Lifecycle ) {
try {
( ( Lifecycle ) valve ).start();
} catch ( LifecycleException e ) {
StandardPipeline.log.error ( "StandardPipeline.addValve: start: ", e );
}
}
if ( this.first == null ) {
( this.first = valve ).setNext ( this.basic );
} else {
for ( Valve current = this.first; current != null; current = current.getNext() ) {
if ( current.getNext() == this.basic ) {
current.setNext ( valve );
valve.setNext ( this.basic );
break;
}
}
}
this.container.fireContainerEvent ( "addValve", valve );
}
@Override
public Valve[] getValves() {
final ArrayList<Valve> valveList = new ArrayList<Valve>();
Valve current = this.first;
if ( current == null ) {
current = this.basic;
}
while ( current != null ) {
valveList.add ( current );
current = current.getNext();
}
return valveList.toArray ( new Valve[0] );
}
public ObjectName[] getValveObjectNames() {
final ArrayList<ObjectName> valveList = new ArrayList<ObjectName>();
Valve current = this.first;
if ( current == null ) {
current = this.basic;
}
while ( current != null ) {
if ( current instanceof JmxEnabled ) {
valveList.add ( ( ( JmxEnabled ) current ).getObjectName() );
}
current = current.getNext();
}
return valveList.toArray ( new ObjectName[0] );
}
@Override
public void removeValve ( final Valve valve ) {
Valve current;
if ( this.first == valve ) {
this.first = this.first.getNext();
current = null;
} else {
current = this.first;
}
while ( current != null ) {
if ( current.getNext() == valve ) {
current.setNext ( valve.getNext() );
break;
}
current = current.getNext();
}
if ( this.first == this.basic ) {
this.first = null;
}
if ( valve instanceof Contained ) {
( ( Contained ) valve ).setContainer ( null );
}
if ( valve instanceof Lifecycle ) {
if ( this.getState().isAvailable() ) {
try {
( ( Lifecycle ) valve ).stop();
} catch ( LifecycleException e ) {
StandardPipeline.log.error ( "StandardPipeline.removeValve: stop: ", e );
}
}
try {
( ( Lifecycle ) valve ).destroy();
} catch ( LifecycleException e ) {
StandardPipeline.log.error ( "StandardPipeline.removeValve: destroy: ", e );
}
}
this.container.fireContainerEvent ( "removeValve", valve );
}
@Override
public Valve getFirst() {
if ( this.first != null ) {
return this.first;
}
return this.basic;
}
static {
log = LogFactory.getLog ( StandardPipeline.class );
}
}
| [
"ucabagk@ucl.ac.uk"
] | ucabagk@ucl.ac.uk |
be91591cc68bb4b7e2562e5424556a8a5a19281e | b11248eb8d38355e10861c6c19750c55b4530e38 | /src/main/java/hu/akarnokd/rxjava2/expr/FlowableIfThen.java | ba51c82e5ff7c3c8424bc45e9a39e3475e6d6043 | [
"Apache-2.0"
] | permissive | tomdotbradshaw/RxJava2Extensions | 2d50d14aff39a1ddb4fe6a32352aebecc4e8d68d | 254fead58021bb8304aa1c343cc776e7b5a3168d | refs/heads/master | 2020-04-06T16:48:30.122024 | 2018-11-15T03:29:15 | 2018-11-15T03:30:42 | 157,635,134 | 0 | 0 | Apache-2.0 | 2018-11-15T01:36:50 | 2018-11-15T01:36:50 | null | UTF-8 | Java | false | false | 1,838 | java | /*
* Copyright 2016-2018 David Karnok
*
* 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 hu.akarnokd.rxjava2.expr;
import org.reactivestreams.*;
import io.reactivex.Flowable;
import io.reactivex.exceptions.Exceptions;
import io.reactivex.functions.BooleanSupplier;
import io.reactivex.internal.subscriptions.EmptySubscription;
/**
* When an Subscriber subscribes, the condition is evaluated and the appropriate
* Publisher is subscribed to.
*
* @param <T> the common value type of the Observables
*/
final class FlowableIfThen<T> extends Flowable<T> {
final BooleanSupplier condition;
final Publisher<? extends T> then;
final Publisher<? extends T> orElse;
FlowableIfThen(BooleanSupplier condition, Publisher<? extends T> then,
Publisher<? extends T> orElse) {
this.condition = condition;
this.then = then;
this.orElse = orElse;
}
@Override
protected void subscribeActual(Subscriber<? super T> s) {
boolean b;
try {
b = condition.getAsBoolean();
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
EmptySubscription.error(ex, s);
return;
}
if (b) {
then.subscribe(s);
} else {
orElse.subscribe(s);
}
}
}
| [
"akarnokd@gmail.com"
] | akarnokd@gmail.com |
4f57b49394b08770134662845e977d0c35edd79a | 647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4 | /com.tencent.mm/classes.jar/com/tencent/mm/plugin/finder/cgi/p.java | dd42c27888e41b81eaf189b6148fb7dc280b2007 | [] | no_license | tsuzcx/qq_apk | 0d5e792c3c7351ab781957bac465c55c505caf61 | afe46ef5640d0ba6850cdefd3c11badbd725a3f6 | refs/heads/main | 2022-07-02T10:32:11.651957 | 2022-02-01T12:41:38 | 2022-02-01T12:41:38 | 453,860,108 | 36 | 9 | null | 2022-01-31T09:46:26 | 2022-01-31T02:43:22 | Java | UTF-8 | Java | false | false | 7,246 | java | package com.tencent.mm.plugin.finder.cgi;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.ae.e;
import com.tencent.mm.ae.e.a;
import com.tencent.mm.am.c.a;
import com.tencent.mm.plugin.finder.report.z;
import com.tencent.mm.plugin.finder.upload.action.h;
import com.tencent.mm.plugin.findersdk.b.c;
import com.tencent.mm.protocal.protobuf.atz;
import com.tencent.mm.protocal.protobuf.axp;
import com.tencent.mm.protocal.protobuf.axq;
import com.tencent.mm.protocal.protobuf.bui;
import com.tencent.mm.protocal.protobuf.etl;
import com.tencent.mm.protocal.protobuf.gdd;
import com.tencent.mm.protocal.protobuf.gol;
import com.tencent.mm.protocal.protobuf.kd;
import com.tencent.mm.sdk.platformtools.Log;
import kotlin.Metadata;
import kotlin.g.b.u;
import kotlin.r;
@Metadata(d1={""}, d2={"Lcom/tencent/mm/plugin/finder/cgi/CgiFinderFollow;", "Lcom/tencent/mm/plugin/findersdk/cgi/FinderCgi;", "Lcom/tencent/mm/protocal/protobuf/FinderFollowResponse;", "action", "Lcom/tencent/mm/plugin/finder/upload/action/FollowAction;", "isFromTimeline", "", "isFromShareUI", "(Lcom/tencent/mm/plugin/finder/upload/action/FollowAction;ZZ)V", "TAG", "", "getAction", "()Lcom/tencent/mm/plugin/finder/upload/action/FollowAction;", "onCgiEnd", "", "errType", "", "errCode", "errMsg", "resp", "scene", "Lcom/tencent/mm/modelbase/NetSceneBase;", "Companion", "plugin-finder_release"}, k=1, mv={1, 5, 1}, xi=48)
public final class p
extends c<axq>
{
public static final a AyV;
private static final int AyX;
private static final int AyY;
private static final int AyZ;
private final h AyW;
private final String TAG;
static
{
AppMethodBeat.i(336468);
AyV = new a((byte)0);
bh localbh = bh.ABm;
AyX = bh.dVr();
localbh = bh.ABm;
AyY = bh.dVs();
localbh = bh.ABm;
AyZ = bh.dVt();
AppMethodBeat.o(336468);
}
public p(h paramh, boolean paramBoolean1, boolean paramBoolean2)
{
super(paramh.Auc);
AppMethodBeat.i(336447);
this.AyW = paramh;
this.TAG = "Finder.CgiFinderFollow";
axp localaxp = new axp();
localaxp.ZHf = this.AyW.hLI;
int i;
Object localObject2;
label169:
label207:
label215:
label345:
StringBuilder localStringBuilder;
if (((CharSequence)this.AyW.Gdc).length() > 0)
{
i = 1;
if (i != 0) {
localaxp.finderUsername = this.AyW.Gdc;
}
localaxp.opType = this.AyW.opType;
localaxp.refObjectId = this.AyW.feedId;
paramh = bi.ABn;
localaxp.CJv = bi.a(this.Auc);
localObject2 = localaxp.CJv;
if (localObject2 != null)
{
if ((paramBoolean2) || (paramBoolean1)) {
break label719;
}
paramh = this.Auc;
if (paramh != null) {
break label708;
}
paramh = null;
((atz)localObject2).scene = paramh.intValue();
}
paramh = (e)com.tencent.mm.plugin.findersdk.b.HbT;
localObject2 = this.Auc;
if ((localObject2 == null) || (((bui)localObject2).hLK != 0)) {
break label744;
}
i = 1;
if (i != 0) {
break label750;
}
paramBoolean2 = bool;
e.a.a(paramh, "NetSceneFinderFollow_fromCommentScene_0", paramBoolean2, null, false, (kotlin.g.a.a)1.Aza, 28);
paramh = z.FrZ;
long l = this.AyW.feedId;
paramh = localaxp.CJv;
if (paramh != null) {
break label755;
}
i = 0;
label258:
localaxp.sessionBuffer = z.p(l, i);
if (this.AyW.ACR <= 0) {
break label764;
}
i = this.AyW.ACR;
label289:
localaxp.ACR = i;
if (paramBoolean1) {
localaxp.ACR = 21;
}
localaxp.ZIR = this.AyW.Gdd;
paramh = bi.ABn;
paramh = localaxp.CJv;
localObject2 = localaxp.CJv;
if (localObject2 != null) {
break label788;
}
i = j;
bi.a(paramh, kotlin.a.p.listOf(new r(Integer.valueOf(i), Long.valueOf(this.AyW.feedId))), this.Auc);
if (this.AyW.opType == AyX)
{
paramh = new gdd();
paramh.acaW = new gol().df(com.tencent.mm.plugin.normsg.a.d.MtP.aQo("ce_feed_follow"));
paramh.acaX = new gol().df(com.tencent.mm.plugin.normsg.a.d.MtP.gtE());
localObject2 = localaxp.CJv;
if (localObject2 != null) {
((atz)localObject2).ZEq = new com.tencent.mm.bx.b(paramh.toByteArray());
}
paramh = com.tencent.mm.plugin.secinforeport.a.d.Pmb;
com.tencent.mm.plugin.secinforeport.a.d.asyncReportFinderSecurityInfoThroughCgi(540999688);
}
paramh = new c.a();
paramh.otE = ((com.tencent.mm.bx.a)localaxp);
localObject2 = new axq();
((axq)localObject2).setBaseResponse(new kd());
((axq)localObject2).getBaseResponse().akjO = new etl();
paramh.otF = ((com.tencent.mm.bx.a)localObject2);
paramh.uri = "/cgi-bin/micromsg-bin/finderfollow";
paramh.funcId = 3867;
c(paramh.bEF());
localObject2 = this.TAG;
localStringBuilder = new StringBuilder("CgiFinderFollow init, ").append(this.AyW.hLI).append(" opType ").append(this.AyW.opType).append(" scene ");
paramh = this.Auc;
if (paramh != null) {
break label798;
}
paramh = null;
label626:
localStringBuilder = localStringBuilder.append(paramh).append(" feedId ").append(this.AyW.feedId).append(" enterType");
paramh = this.Auc;
if (paramh != null) {
break label809;
}
}
label788:
label798:
label809:
for (paramh = localObject1;; paramh = Integer.valueOf(paramh.GST))
{
Log.i((String)localObject2, paramh + " finderUsername:" + localaxp.finderUsername);
AppMethodBeat.o(336447);
return;
i = 0;
break;
label708:
paramh = Integer.valueOf(paramh.hLK);
break label169;
label719:
paramh = this.Auc;
if (paramh == null)
{
paramh = null;
break label169;
}
paramh = Integer.valueOf(paramh.AJo);
break label169;
label744:
i = 0;
break label207;
label750:
paramBoolean2 = false;
break label215;
label755:
i = paramh.scene;
break label258;
label764:
paramh = this.Auc;
if (paramh == null)
{
i = 0;
break label289;
}
i = paramh.GST;
break label289;
i = ((atz)localObject2).scene;
break label345;
paramh = Integer.valueOf(paramh.hLK);
break label626;
}
}
@Metadata(d1={""}, d2={"Lcom/tencent/mm/plugin/finder/cgi/CgiFinderFollow$Companion;", "", "()V", "OP_TYPE_FOLLOW", "", "getOP_TYPE_FOLLOW", "()I", "OP_TYPE_UNAPPLY", "getOP_TYPE_UNAPPLY", "OP_TYPE_UNFOLLOW", "getOP_TYPE_UNFOLLOW", "plugin-finder_release"}, k=1, mv={1, 5, 1}, xi=48)
public static final class a {}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes13.jar
* Qualified Name: com.tencent.mm.plugin.finder.cgi.p
* JD-Core Version: 0.7.0.1
*/ | [
"98632993+tsuzcx@users.noreply.github.com"
] | 98632993+tsuzcx@users.noreply.github.com |
2bd73972e82558051d1d3538bc7fe78cc9c1c201 | 8e44a9366800872e6147a027b61b9e07636da2ad | /l2j_datapack/dist/game/data/scripts/quests/Q00622_SpecialtyLiquorDelivery/Q00622_SpecialtyLiquorDelivery.java | 0b1c5be02073d04dc0f3619a5dea52eef0760c62 | [
"MIT"
] | permissive | RollingSoftware/L2J_HighFive_Hardcore | 6980a5e0f8111418bdc2739dd9f8b8abbc22aeff | c80436c130c795c590ce454835b9323162bec52b | refs/heads/master | 2022-08-18T11:14:45.674987 | 2022-07-24T09:02:38 | 2022-07-24T09:02:38 | 120,417,466 | 0 | 0 | MIT | 2018-02-10T17:38:27 | 2018-02-06T07:25:26 | Java | UTF-8 | Java | false | false | 6,391 | java | /*
* Copyright (C) 2004-2016 L2J DataPack
*
* This file is part of L2J DataPack.
*
* L2J DataPack 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.
*
* L2J DataPack 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/
package quests.Q00622_SpecialtyLiquorDelivery;
import java.util.Arrays;
import java.util.List;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.quest.Quest;
import com.l2jserver.gameserver.model.quest.QuestState;
import com.l2jserver.gameserver.model.quest.State;
/**
* Specialty Liquor Delivery (622)
* @author Janiko
*/
public final class Q00622_SpecialtyLiquorDelivery extends Quest
{
// NPCs
private static final int JEREMY = 31521;
private static final int PULIN = 31543;
private static final int NAFF = 31544;
private static final int CROCUS = 31545;
private static final int KUBER = 31546;
private static final int BOELIN = 31547;
private static final int LIETTA = 31267;
// Items
private static final int SPECIAL_DRINK = 7197;
private static final int SPECIAL_DRINK_PRICE = 7198;
// Rewards
private static final int QUICK_STEP_POTION = 734;
private static final int SEALED_RING_OF_AURAKYRA = 6849;
private static final int SEALED_SANDDRAGONS_EARING = 6847;
private static final int SEALED_DRAGON_NECKLACE = 6851;
// Misc
private static final int MIN_LVL = 68;
// Talkers
private static final List<Integer> TALKERS = Arrays.asList(KUBER, CROCUS, NAFF, PULIN);
public Q00622_SpecialtyLiquorDelivery()
{
super(622, Q00622_SpecialtyLiquorDelivery.class.getSimpleName(), "Specialty Liquor Delivery");
addStartNpc(JEREMY);
addTalkId(JEREMY, BOELIN, LIETTA);
addTalkId(TALKERS);
registerQuestItems(SPECIAL_DRINK, SPECIAL_DRINK_PRICE);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, false);
String htmltext = null;
if (qs == null)
{
return htmltext;
}
switch (event)
{
case "31521-03.htm":
{
if (qs.isCreated())
{
qs.startQuest();
giveItems(player, SPECIAL_DRINK, 5);
htmltext = event;
}
break;
}
case "31521-06.html":
{
if (qs.isCond(6))
{
if (getQuestItemsCount(player, SPECIAL_DRINK_PRICE) >= 5)
{
qs.setCond(7, true);
takeItems(player, -1, SPECIAL_DRINK_PRICE);
htmltext = event;
}
else
{
htmltext = "31521-07.html";
}
}
break;
}
case "31547-02.html":
{
if (qs.isCond(1))
{
if (hasQuestItems(player, SPECIAL_DRINK))
{
qs.setCond(2, true);
takeItems(player, SPECIAL_DRINK, 1);
giveItems(player, SPECIAL_DRINK_PRICE, 1);
htmltext = event;
}
else
{
htmltext = "31547-03.html";
}
}
break;
}
case "31543-02.html":
case "31544-02.html":
case "31545-02.html":
case "31546-02.html":
{
if (TALKERS.contains(npc.getId()) && qs.isCond(TALKERS.indexOf(npc.getId()) + 2))
{
if (hasQuestItems(player, SPECIAL_DRINK))
{
qs.setCond(qs.getCond() + 1, true);
takeItems(player, SPECIAL_DRINK, 1);
giveItems(player, SPECIAL_DRINK_PRICE, 1);
htmltext = event;
}
else
{
htmltext = npc.getId() + "-03.html";
}
}
break;
}
case "31267-02.html":
{
if (qs.isCond(7))
{
int rnd = getRandom(1000);
if (rnd < 800)
{
rewardItems(player, QUICK_STEP_POTION, 1);
giveAdena(player, 18800, true);
}
else if (rnd < 880)
{
rewardItems(player, SEALED_RING_OF_AURAKYRA, 1);
}
else if (rnd < 960)
{
rewardItems(player, SEALED_SANDDRAGONS_EARING, 1);
}
else
{
rewardItems(player, SEALED_DRAGON_NECKLACE, 1);
}
qs.exitQuest(true, true);
htmltext = event;
}
break;
}
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance talker)
{
final QuestState qs = getQuestState(talker, true);
String htmltext = getNoQuestMsg(talker);
switch (npc.getId())
{
case JEREMY:
{
switch (qs.getState())
{
case State.CREATED:
{
htmltext = (talker.getLevel() >= MIN_LVL) ? "31521-01.htm" : "31521-02.htm";
break;
}
case State.STARTED:
{
switch (qs.getCond())
{
case 1:
{
htmltext = "31521-04.html";
break;
}
case 6:
{
if (hasQuestItems(talker, SPECIAL_DRINK_PRICE))
{
htmltext = "31521-05.html";
}
break;
}
case 7:
{
if (!hasQuestItems(talker, SPECIAL_DRINK))
{
htmltext = "31521-08.html";
}
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(talker);
break;
}
}
break;
}
case BOELIN:
{
if (qs.isStarted())
{
switch (qs.getCond())
{
case 1:
{
if (getQuestItemsCount(talker, SPECIAL_DRINK) >= 5)
{
htmltext = "31547-01.html";
}
break;
}
case 2:
{
htmltext = "31547-04.html";
break;
}
}
}
break;
}
case KUBER:
case CROCUS:
case NAFF:
case PULIN:
{
if (qs.isStarted())
{
final int cond = TALKERS.indexOf(npc.getId()) + 2;
if (qs.isCond(cond) && hasQuestItems(talker, SPECIAL_DRINK_PRICE)) // 2,3,4,5
{
htmltext = npc.getId() + "-01.html";
}
else if (qs.isCond(cond + 1)) // 3,4,5,6
{
htmltext = npc.getId() + "-04.html";
}
}
break;
}
case LIETTA:
{
if (qs.isStarted() && qs.isCond(7))
{
htmltext = "31267-01.html";
}
break;
}
}
return htmltext;
}
} | [
"zolotaryov.v.g@gmail.com"
] | zolotaryov.v.g@gmail.com |
b30fcffa472c73d18f2f73799b234b2de2630d3f | 9cb5b088e22c32734245e770f533e5b776eec053 | /spring-bean/src/main/java/chapter_06/spring/SpringAOP.java | c968182d32a506fa9484db8974ebaf6ae0f5e093 | [] | no_license | lxchinesszz/Spring-Framework-learn | 454dd7b5593c03ccba031c327874b1b18fe52002 | b8c22b200b532829c105f122c8b6c0d0d43c06ac | refs/heads/master | 2020-03-21T01:50:51.000951 | 2018-09-29T09:29:01 | 2018-09-29T09:29:01 | 137,966,051 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,806 | java | package chapter_06.spring;
import org.springframework.aop.AfterReturningAdvice;
import org.springframework.aop.MethodBeforeAdvice;
import org.springframework.aop.aspectj.AspectJAroundAdvice;
import org.springframework.aop.framework.ProxyFactory;
import org.springframework.aop.support.NameMatchMethodPointcutAdvisor;
import org.springframework.lang.Nullable;
import java.lang.reflect.Method;
/**
* @author liuxin
* @version Id: SpringAOP.java, v 0.1 2018/7/26 上午9:14
*/
public class SpringAOP {
public static void main(String[] args) {
//匹配器
NameMatchMethodPointcutAdvisor advisor = new NameMatchMethodPointcutAdvisor();
advisor.setMappedNames("say");
advisor.setAdvice(new JayHanler());
//不设置匹配器默认都拦截
ProxyFactory proxyFactory = new ProxyFactory();
//使用Cglib代理
proxyFactory.setTarget(new Jay());
//使用接口代理
proxyFactory.setInterfaces(JayInterface.class);
proxyFactory.addAdvice(new JayHanler());
JayInterface proxy = (JayInterface)proxyFactory.getProxy();
proxy.say("jay");
}
}
interface JayInterface{
void say(String sing);
}
class Jay implements JayInterface{
@Override
public void say(String sing) {
System.out.println("say...."+sing);
}
}
class JayHanler implements MethodBeforeAdvice,AfterReturningAdvice {
@Override
public void before(Method method, Object[] args, @Nullable Object target) throws Throwable {
System.out.println("before"+ (String.valueOf(args[0])));
args[0]="lx";
}
@Override
public void afterReturning(@Nullable Object returnValue, Method method, Object[] args, @Nullable Object target) throws Throwable {
System.out.println("after");
}
}
| [
"lxchinesszz@163.com"
] | lxchinesszz@163.com |
604cdc60d6a8545171420ea99f43138a71db1aad | 1e4788f838d7a703f6f15f80e230b08d889682e6 | /java/ru/privetdruk/l2jspace/gameserver/model/actor/instance/SymbolMakerInstance.java | 9bf537d4a5cf70c5c9027f997b092f595612d819 | [] | no_license | pr1vetdruk/l2jspace-c6-interlude | fbc5f0bea9fcf38c92172df15bde16ebb667fcdd | e0f701d4d87642887a3173a181de2037517f606d | refs/heads/master | 2023-07-14T13:32:16.250915 | 2021-08-30T08:31:55 | 2021-08-30T08:31:55 | 340,645,976 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,396 | java | /*
* This file is part of the L2jSpace project.
*
* This program 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.
*
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/
package ru.privetdruk.l2jspace.gameserver.model.actor.instance;
import ru.privetdruk.l2jspace.gameserver.datatables.xml.HennaData;
import ru.privetdruk.l2jspace.gameserver.model.actor.Creature;
import ru.privetdruk.l2jspace.gameserver.model.actor.templates.NpcTemplate;
import ru.privetdruk.l2jspace.gameserver.network.SystemMessageId;
import ru.privetdruk.l2jspace.gameserver.network.serverpackets.HennaEquipList;
import ru.privetdruk.l2jspace.gameserver.network.serverpackets.HennaRemoveList;
public class SymbolMakerInstance extends FolkInstance {
public SymbolMakerInstance(int objectID, NpcTemplate template) {
super(objectID, template);
}
@Override
public void onBypassFeedback(PlayerInstance player, String command) {
if (command.equals("Draw")) {
player.sendPacket(new HennaEquipList(player, HennaData.getInstance().getAvailableHennasFor(player)));
} else if (command.equals("RemoveList")) {
boolean hasHennas = false;
for (int i = 1; i <= 3; i++) {
if (player.getHenna(i) != null) {
hasHennas = true;
}
}
if (hasHennas) {
player.sendPacket(new HennaRemoveList(player));
} else {
player.sendPacket(SystemMessageId.THE_SYMBOL_INFORMATION_CANNOT_BE_FOUND);
}
} else {
super.onBypassFeedback(player, command);
}
}
@Override
public String getHtmlPath(int npcId, int value) {
return "data/html/symbolmaker/SymbolMaker.htm";
}
@Override
public boolean isAutoAttackable(Creature attacker) {
return false;
}
}
| [
"somsin@bryansk.softlab.ru"
] | somsin@bryansk.softlab.ru |
7a63631618850d3cff3788ba85e1b9ed49ef3cb8 | 8246da9a0ea49ef6e70bfb6bc05148fb6134ed89 | /dianping2/src/main/java/com/dianping/utn/ResponseChain.java | da78673955d3cef43e9e29eba72b7bd7d51ddc53 | [] | no_license | hezhongqiang/Dianping | 2708824e30339e1abfb85e028bd27778e26adb56 | b1a4641be06857fcf65466ce04f3de6b0b6f05ef | refs/heads/master | 2020-05-29T08:48:38.251791 | 2016-01-13T08:09:05 | 2016-01-13T08:09:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,298 | java | package com.dianping.utn;
import B;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;
import org.json.JSONObject;
public class ResponseChain
{
public ResponseBlock[] blocks;
public ResponseChain()
{
}
public ResponseChain(BaseRequest paramBaseRequest, UtnResponse paramUtnResponse)
{
ResponseBlock localResponseBlock = null;
try
{
localObject = new ByteArrayOutputStream();
localGZIPOutputStream = new GZIPOutputStream((OutputStream)localObject);
localJSONObject1 = new JSONObject();
localJSONObject1.put("c", paramUtnResponse.statusCode);
if (paramUtnResponse.headers != null)
{
localJSONObject2 = new JSONObject();
Iterator localIterator = paramUtnResponse.headers.entrySet().iterator();
while (localIterator.hasNext())
{
Map.Entry localEntry = (Map.Entry)localIterator.next();
localJSONObject2.put((String)localEntry.getKey(), localEntry.getValue());
}
}
}
catch (Exception paramUtnResponse)
{
Object localObject;
GZIPOutputStream localGZIPOutputStream;
JSONObject localJSONObject1;
JSONObject localJSONObject2;
paramUtnResponse = localResponseBlock;
int j = (paramUtnResponse.length + 1384 - 1) / 1384;
int i = j;
if (j == 0)
i = 1;
this.blocks = new ResponseBlock[i];
j = 0;
label168: if (j < i)
{
localResponseBlock = new ResponseBlock();
localResponseBlock.requestId = paramBaseRequest.requestId;
localResponseBlock.protocolVersion = paramBaseRequest.protocolVersion;
localResponseBlock.count = i;
localResponseBlock.index = j;
if (j < i - 1);
for (int k = 1384; ; k = paramUtnResponse.length - j * 1384)
{
localObject = new byte[k];
System.arraycopy(paramUtnResponse, j * 1384, localObject, 0, k);
localResponseBlock.fragment = ((B)localObject);
this.blocks[j] = localResponseBlock;
j += 1;
break label168;
localJSONObject1.put("h", localJSONObject2);
localGZIPOutputStream.write(localJSONObject1.toString().getBytes("utf-8"));
localGZIPOutputStream.write(0);
if (paramUtnResponse.body != null)
localGZIPOutputStream.write(paramUtnResponse.body);
localGZIPOutputStream.close();
((ByteArrayOutputStream)localObject).close();
paramUtnResponse = ((ByteArrayOutputStream)localObject).toByteArray();
break;
}
}
}
}
public void append(ResponseBlock paramResponseBlock)
{
if (this.blocks == null)
this.blocks = new ResponseBlock[paramResponseBlock.count];
this.blocks[paramResponseBlock.index] = paramResponseBlock;
}
public int finished()
{
int k;
if (this.blocks == null)
{
k = 0;
return k;
}
int i = 0;
int j = 0;
int m = this.blocks.length;
while (true)
{
k = i;
if (j >= m)
break;
k = i;
if (this.blocks[j] != null)
k = i + 1;
j += 1;
i = k;
}
}
public UtnResponse getResponse()
throws Exception
{
if (!isFinished())
throw new Exception("response chain not finished");
Object localObject1 = new ByteArrayOutputStream(this.blocks.length * 1384);
Object localObject2 = this.blocks;
int j = localObject2.length;
int i = 0;
while (i < j)
{
((ByteArrayOutputStream)localObject1).write(localObject2[i].fragment);
i += 1;
}
((ByteArrayOutputStream)localObject1).close();
localObject2 = new ByteArrayInputStream(((ByteArrayOutputStream)localObject1).toByteArray());
Object localObject3 = new GZIPInputStream((InputStream)localObject2);
((ByteArrayOutputStream)localObject1).reset();
Object localObject4 = new byte[4096];
while (true)
{
i = ((GZIPInputStream)localObject3).read(localObject4);
if (i == -1)
break;
((ByteArrayOutputStream)localObject1).write(localObject4, 0, i);
}
((GZIPInputStream)localObject3).close();
((ByteArrayInputStream)localObject2).close();
((ByteArrayOutputStream)localObject1).close();
localObject2 = ((ByteArrayOutputStream)localObject1).toByteArray();
j = localObject2.length;
i = 0;
while (true)
{
Iterator localIterator;
if ((i >= j) || (localObject2[i] == 0))
{
localObject3 = new JSONObject(new String(localObject2, 0, i, "utf-8"));
localObject1 = new byte[j - i - 1];
System.arraycopy(localObject2, i + 1, localObject1, 0, j - i - 1);
localObject2 = new UtnResponse();
((UtnResponse)localObject2).statusCode = ((JSONObject)localObject3).getInt("c");
localObject3 = ((JSONObject)localObject3).optJSONObject("h");
if (localObject3 == null)
break;
localObject4 = new HashMap();
localIterator = ((JSONObject)localObject3).keys();
}
else
{
while (true)
if (localIterator.hasNext())
{
String str = (String)localIterator.next();
((HashMap)localObject4).put(str, ((JSONObject)localObject3).getString(str));
continue;
i += 1;
break;
}
((UtnResponse)localObject2).headers = ((Map)localObject4);
}
}
((UtnResponse)localObject2).body = ((B)localObject1);
return (UtnResponse)(UtnResponse)(UtnResponse)(UtnResponse)localObject2;
}
public boolean isFinished()
{
int k = 0;
int i = total();
int j = k;
if (i > 0)
{
j = k;
if (finished() == i)
j = 1;
}
return j;
}
public int total()
{
if (this.blocks == null)
return 0;
return this.blocks.length;
}
}
/* Location: C:\Users\xuetong\Desktop\dazhongdianping7.9.6\ProjectSrc\classes-dex2jar.jar
* Qualified Name: com.dianping.utn.ResponseChain
* JD-Core Version: 0.6.0
*/ | [
"xuetong@dkhs.com"
] | xuetong@dkhs.com |
8dffce979824e92b915a25e29f88336986987d67 | 7af846ccf54082cd1832c282ccd3c98eae7ad69a | /ftmap/src/main/java/taxi/nicecode/com/ftmap/generated/package_26/Foo89.java | 2512e1f98a5319f1133f7a8a5754fbea0a1c686e | [] | no_license | Kadanza/TestModules | 821f216be53897d7255b8997b426b359ef53971f | 342b7b8930e9491251de972e45b16f85dcf91bd4 | refs/heads/master | 2020-03-25T08:13:09.316581 | 2018-08-08T10:47:25 | 2018-08-08T10:47:25 | 143,602,647 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 268 | java | package taxi.nicecode.com.ftmap.generated.package_26;
public class Foo89 {
public void foo0(){
new Foo88().foo5();
}
public void foo1(){
foo0();
}
public void foo2(){
foo1();
}
public void foo3(){
foo2();
}
public void foo4(){
foo3();
}
public void foo5(){
foo4();
}
} | [
"1"
] | 1 |
58d23d46fd9db711eb4e8fd8a65751e4f214242c | 4233bb5405f9fc02b39256babe5df78901ec14b2 | /src/fit/hrkj/exception/AutoCloseTest.java | 296716df7207bde1c3d2f5a2d3087de8459c55f9 | [] | no_license | yuandonghua/JavaBasedDemo | e7413b778317e0894549398e7a79bfc01ed02a28 | b1df4de7d9171e94e369074c6a373c7aeaa6824b | refs/heads/master | 2022-10-18T10:46:29.137990 | 2020-01-01T07:10:48 | 2020-01-01T07:10:48 | 193,418,921 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 909 | java | package fit.hrkj.exception;
import java.io.BufferedReader;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintStream;
/**
* <br>
* 2019年8月22日 上午11:28:43
*
* @author 华软科技
* @version 1.0
*/
public class AutoCloseTest {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
try (
// 声明、初始化两个可关闭的资源
// try语句会自动关闭这两个资源
BufferedReader br = new BufferedReader(new FileReader("src/fit/hrkj/exception/AutoCloseTest.java"));
PrintStream ps = new PrintStream(new FileOutputStream("b.txt"));) {
// 使用这两个资源
String content = br.readLine();
System.out.println(content);
ps.println(content);
} catch (Exception e) {
// TODO: handle exception
System.out.println("catch块");
}
}
}
| [
"1348474384@qq.com"
] | 1348474384@qq.com |
0a534a8901dace363a0cd54d13f51d674ad292af | c2057d42d68571b646532a027a4633edba5026e9 | /src/main/java/org/cyclops/evilcraft/tileentity/tickaction/bloodchest/BloodChestRepairActionRegistry.java | adb481a6989707263022811f23ea7d1b73cf019d | [
"CC-BY-4.0"
] | permissive | noobanidus/EvilCraft | d54c0612429030ef48389de7220cbfa9ca150347 | 20152bf3e2c61b90a37c0f2d0f96c06e903c7e96 | refs/heads/master-1.16 | 2023-02-21T16:38:00.933603 | 2021-01-09T15:47:14 | 2021-01-09T15:47:14 | 330,507,175 | 0 | 0 | null | 2021-01-26T05:06:00 | 2021-01-17T23:25:05 | null | UTF-8 | Java | false | false | 2,273 | java | package org.cyclops.evilcraft.tileentity.tickaction.bloodchest;
import net.minecraft.item.ItemStack;
import org.apache.commons.lang3.tuple.Pair;
import org.cyclops.evilcraft.api.tileentity.bloodchest.IBloodChestRepairAction;
import org.cyclops.evilcraft.api.tileentity.bloodchest.IBloodChestRepairActionRegistry;
import org.cyclops.evilcraft.block.BlockBloodChestConfig;
import java.util.LinkedList;
import java.util.List;
import java.util.Random;
/**
* Registry for {@link IBloodChestRepairAction} instances.
* @author rubensworks
*
*/
public class BloodChestRepairActionRegistry implements IBloodChestRepairActionRegistry {
private final List<IBloodChestRepairAction> repairActions =
new LinkedList<IBloodChestRepairAction>();
/**
* Make a new instance.
*/
public BloodChestRepairActionRegistry() {
register(new DamageableItemRepairAction());
register(new AnvilRepairAction());
}
@Override
public void register(IBloodChestRepairAction repairAction) {
repairActions.add(repairAction);
}
@Override
public boolean isItemValidForSlot(ItemStack itemStack) {
if(isNotBlacklisted(itemStack)) {
for (IBloodChestRepairAction action : repairActions) {
if (action.isItemValidForSlot(itemStack)) {
return true;
}
}
}
return false;
}
@Override
public int canRepair(ItemStack itemStack, int tick) {
for(int i = 0; i < repairActions.size(); i++) {
if(repairActions.get(i).canRepair(itemStack, tick)) {
return i;
}
}
return -1;
}
@Override
public Pair<Float, ItemStack> repair(ItemStack itemStack, Random random, int actionID, boolean doAction, boolean isBulk) {
return repairActions.get(actionID).repair(itemStack, random, doAction, isBulk);
}
protected boolean isNotBlacklisted(ItemStack itemStack) {
if(itemStack.isEmpty()) return false;
for(String name : BlockBloodChestConfig.itemBlacklist) {
if(itemStack.getItem().getRegistryName().toString().equals(name)) {
return false;
}
}
return true;
}
}
| [
"rubensworks@gmail.com"
] | rubensworks@gmail.com |
db38c9a3eef8cef62d33d52b8828b3322e19685f | 2438149ec110f08b985254ec6e609aa26ac14c48 | /app/src/main/java/com/gzsll/hupu/injector/component/ApplicationComponent.java | ff9152a0879c40c675f50224c1580b5a2ff20f45 | [
"Apache-2.0"
] | permissive | 1559727195/TLint-master | 2ecad64788e29ecf4de866692c5793b27680a20d | 10c3c8f0cfc4e894c00b5470a214fafa22c62129 | refs/heads/master | 2020-03-08T07:50:15.712353 | 2018-04-02T10:08:14 | 2018-04-02T10:08:14 | 128,004,762 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,967 | java | package com.gzsll.hupu.injector.component;
import android.app.NotificationManager;
import android.content.Context;
import com.gzsll.hupu.MyApplication;
import com.gzsll.hupu.api.forum.ForumApi;
import com.gzsll.hupu.api.game.GameApi;
import com.gzsll.hupu.components.okhttp.OkHttpHelper;
import com.gzsll.hupu.components.storage.UserStorage;
import com.gzsll.hupu.db.ForumDao;
import com.gzsll.hupu.db.ImageCacheDao;
import com.gzsll.hupu.db.ReadThreadDao;
import com.gzsll.hupu.db.ThreadDao;
import com.gzsll.hupu.db.ThreadInfoDao;
import com.gzsll.hupu.db.ThreadReplyDao;
import com.gzsll.hupu.db.UserDao;
import com.gzsll.hupu.injector.module.ApiModule;
import com.gzsll.hupu.injector.module.ApplicationModule;
import com.gzsll.hupu.injector.module.DBModule;
import com.gzsll.hupu.ui.BaseActivity;
import com.gzsll.hupu.ui.pmdetail.PmDetailModule;
import com.gzsll.hupu.widget.HuPuWebView;
import com.squareup.otto.Bus;
import javax.inject.Named;
import javax.inject.Singleton;
import dagger.Component;
/**
* Created by sll on 2016/3/8.
*/
@Singleton
@Component(modules = {
ApplicationModule.class, ApiModule.class, DBModule.class
})
public interface ApplicationComponent {
Context getContext();
Bus getBus();
ForumApi getForumApi();
GameApi getGameApi();
UserDao getUserDao();
ForumDao getForumDao();
ThreadDao getThreadDao();
ThreadInfoDao getThreadInfoDao();
ThreadReplyDao getThreadReplyDao();
ReadThreadDao getReadThreadDao();
ImageCacheDao getImageCacheDao();
OkHttpHelper getOkHttpHelper();
UserStorage getUserStorage();
NotificationManager getNotificationManager();
void inject(MyApplication mApplication);//ApplicationModule会将provider方法中的数据给MyApplication
void inject(BaseActivity mBaseActivity);
void inject(HuPuWebView mHupuWebView);
int getInt ();
@Named("string")String getString ();
@Named ("fei")String getstrings ();
}
| [
"zhu@gmail.com"
] | zhu@gmail.com |
96f4fcb730f3d8275666349abdbeb9105b9256f5 | 26e47d5bd61e685dd7b71c3ea03894937849e722 | /leetcode_0020/java/leetcode_0020.java | 7a52427fe26ba40ced358cc06195ed6ff63d4ea4 | [] | no_license | wangzy0327/Leetcode-Practice | 05196ed7a812b60cb6c8fbc94fb764871824f2d3 | 983998e7998e31395d2e19bd112462c6526bdf3e | refs/heads/master | 2022-08-27T23:20:44.517716 | 2022-08-18T08:16:25 | 2022-08-18T08:16:25 | 253,664,306 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,257 | java | import java.util.Deque;
import java.util.LinkedList;
public class leetcode_0020 {
class Solution {
public boolean isValid(String s) {
Deque<Character> stk = new LinkedList();
for(int i = 0;i < s.length();i++){
if(s.charAt(i) == '(' || s.charAt(i) == '[' || s.charAt(i) == '{' )
stk.offerLast(s.charAt(i));
else{
//否则 右边括号判断
if(stk.size() == 0)
return false;
else{
char topChar = stk.peekLast();
if(s.charAt(i) == ')' && topChar != '(' ||
s.charAt(i) == ']' && topChar != '[' ||
s.charAt(i) == '}' && topChar != '{' )
return false;
stk.pollLast();
}
}
}
return stk.isEmpty();
}
}
public static void main(String[] args) {
// String s = "{[]}";
// String s = "([)]";
String s = "()[]{}";
Solution solution = new leetcode_0020().new Solution();
System.out.println(solution.isValid(s));
}
}
| [
"wangzy0327@qq.com"
] | wangzy0327@qq.com |
d79db894069c2ff41bf579579bf6ed6c35eebf0e | 6249a2d3f342b1a29bbf01fbd2acea37af429b94 | /src/main/java/annotations/examples/Mongo.java | 61f39b204ca3d4f6a96c300bb7dc6453a9a8e3d5 | [] | no_license | Jeka1978/ebay | 7a6ad8d6b19f28b6daaa763107c42cb8ba10d781 | 34cd66c484cc000b5d62534ff8a3c0ebfe9248d0 | refs/heads/master | 2020-07-01T17:19:14.238155 | 2016-11-27T08:13:03 | 2016-11-27T08:13:03 | 74,265,514 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 435 | java | package annotations.examples;/**
* Created by Evegeny on 23/11/2016.
*/
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;
import java.lang.annotation.Retention;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Retention(RUNTIME)
@Qualifier
@Repository
@Autowired
public @interface Mongo {
}
| [
"papakita2009"
] | papakita2009 |
1a0cd4ead819054f59e3278d240072f9490cc33a | 651e9568ecc56bd71d6401074eb43fe072b2e363 | /JAVA/clases/EjemplosUML/src/edu/co/sena/uml/generalizacion/B.java | 3562f328e8b1f40855614ff2f52627cad4df9898 | [] | no_license | SENA-CLASS/595885G1_TRIM3-4 | b067c07993178b9af32d8f641cc7ffd5ebf9a75a | 03b1187f00125e7c1033b5df296ea5add9d20094 | refs/heads/master | 2022-12-21T22:54:01.050857 | 2015-03-03T15:36:37 | 2015-03-03T15:36:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 297 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package edu.co.sena.uml.generalizacion;
/**
*
* @author Enrique Moreno
*/
public class B extends A{
}
| [
"hemoreno33@misena.edu.co"
] | hemoreno33@misena.edu.co |
64447e53b4dc6c912de6ec1daa60ef91ddd5cfea | d1a6d1e511df6db8d8dd0912526e3875c7e1797d | /genny_JavaWithLambdas/applicationModule/src/main/java/applicationModulepackageJava9/Foo976.java | 89d228570b59bd014fe6cff2c37f49d965706eac | [] | no_license | NikitaKozlov/generated-project-for-desugaring | 0bc1443ab3ddc84cd289331c726761585766aea7 | 81506b3711004185070ca4bb9a93482b70011d36 | refs/heads/master | 2020-03-20T00:35:06.996525 | 2018-06-12T09:30:37 | 2018-06-12T09:30:37 | 137,049,317 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 575 | java | package applicationModulepackageJava9;
public class Foo976 {
public void foo0() {
final Runnable anything0 = () -> System.out.println("anything");
new applicationModulepackageJava9.Foo975().foo9();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
public void foo6() {
foo5();
}
public void foo7() {
foo6();
}
public void foo8() {
foo7();
}
public void foo9() {
foo8();
}
}
| [
"nikita.e.kozlov@gmail.com"
] | nikita.e.kozlov@gmail.com |
aeaae9d783f5af529bf44aea179a4c9102ff28d4 | 8da25747ba34441df0be39c62a38c7c5c9c768db | /com.io7m.ironpage.metadata.attribute.validator.vanilla/src/main/java/com/io7m/ironpage/metadata/attribute/validator/vanilla/MetaValidatorMessagesProvider.java | b673f24adee4d8f6974dbafd7cace6c7d99c8f9c | [] | no_license | io7m/ironpage | b50b5f0d0ba49a8a43e633e61bb4ba5e56b85d41 | 7b1272342df1ccc681f12b31568fcd877938a772 | refs/heads/develop | 2021-06-21T02:43:07.984481 | 2019-10-14T11:47:07 | 2019-10-14T11:47:07 | 210,135,338 | 0 | 0 | null | 2021-04-26T19:33:31 | 2019-09-22T11:24:35 | Java | UTF-8 | Java | false | false | 1,463 | java | /*
* Copyright © 2019 Mark Raynsford <code@io7m.com> http://io7m.com
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
package com.io7m.ironpage.metadata.attribute.validator.vanilla;
import com.io7m.ironpage.metadata.attribute.validator.api.MetaValidatorMessagesProviderType;
import com.io7m.ironpage.metadata.attribute.validator.api.MetaValidatorMessagesType;
import java.util.Locale;
/**
* A provider of validator messages.
*/
public final class MetaValidatorMessagesProvider implements MetaValidatorMessagesProviderType
{
/**
* Construct a message provider.
*/
public MetaValidatorMessagesProvider()
{
}
@Override
public MetaValidatorMessagesType createStrings(
final Locale locale)
{
return new MetaValidatorMessages(locale);
}
}
| [
"code@io7m.com"
] | code@io7m.com |
34498ff9329ea9490530d064a0710df5011fed4c | fe00b7236a8fcd0817420f5e2106a145324fdd1e | /source-diy-mybatis-support/src/main/java/cn/javadog/sd/mybatis/support/exceptions/ParsingException.java | 79cb54ef637b175a50bb821cc89d4eb96602b55a | [] | no_license | yuyong725/source-diy-mybatis | a0eefaded34aae24c9b9193bed0b7d8a04fed1ce | 15f0a93eead4e6dd5e02051212afb28572a9b579 | refs/heads/master | 2020-11-27T09:15:00.609224 | 2020-11-20T10:24:32 | 2020-11-20T10:24:32 | 229,382,296 | 0 | 0 | null | 2020-11-20T10:24:33 | 2019-12-21T05:41:15 | Java | UTF-8 | Java | false | false | 405 | java | package cn.javadog.sd.mybatis.support.exceptions;
/**
* @author 余勇
* @date 2019年11月29日 15:34:00
* XML解析异常
* todo:
* 1、源码中在此类的基础上,抽离了一个框架异常的基类,是否也如此操作,暂时保留
*/
public class ParsingException extends BaseException{
public ParsingException(String message, Throwable cause){
super(message, cause);
}
}
| [
"yuyong_material@163.com"
] | yuyong_material@163.com |
00c04443a124aa9af5f35b21804a9dd12e5bc45f | bb3ac3ed1c3a787aabd0d118abd1e523c9b53cb4 | /src/nez/x/nezvm/BasicBlock.java | 015f209645fae39bfecc9519f910965eafdffb1f | [] | no_license | peg4d/nez | ba18ed55caed70b903de3be2feac0b3bba212afa | 49c69c5cbeb203cd43cff139a014223e49945a8b | refs/heads/master | 2016-09-05T21:15:36.467308 | 2015-04-02T08:39:29 | 2015-04-02T08:39:29 | 25,847,889 | 4 | 8 | null | 2015-04-02T08:39:30 | 2014-10-28T01:38:52 | Java | UTF-8 | Java | false | false | 1,184 | java | package nez.x.nezvm;
import java.util.ArrayList;
import java.util.List;
public class BasicBlock {
Function func;
int codeIndex;
List<Instruction> instList;
public BasicBlock(Function func) {
this.func = func;
this.func.append(this);
this.instList = new ArrayList<Instruction>();
}
public BasicBlock() {
this.instList = new ArrayList<Instruction>();
}
public Instruction get(int index) {
return this.instList.get(index);
}
public BasicBlock append(Instruction inst) {
this.instList.add(inst);
return this;
}
public BasicBlock add(int index, Instruction inst) {
this.instList.add(index, inst);
return this;
}
public Instruction remove(int index) {
return this.instList.remove(index);
}
public void setInsertPoint(Function func) {
this.func = func;
this.func.append(this);
}
public int size() {
return this.instList.size();
}
public int indexOf(Instruction inst) {
return this.instList.indexOf(inst);
}
public String getBBName() {
return "bb" + this.func.indexOf(this);
}
public void stringfy(StringBuilder sb) {
for(int i = 0; i < this.size(); i++) {
this.get(i).stringfy(sb);
sb.append("\n");
}
}
} | [
"kimio@konohascript.org"
] | kimio@konohascript.org |
e2e18a7947d7cffb018e16c7939c5efa16e493c4 | 4e660ecd8dfea06ba2f530eb4589bf6bed669c0c | /src/org/tempuri/Gf_getYgdmResponse.java | fc10b3026d7ac5c58e841c8dac3e8bf31bd939c3 | [] | no_license | zhangity/SANMEN | 58820279f6ae2316d972c1c463ede671b1b2b468 | 3f5f7f48709ae8e53d66b30f9123aed3bcc598de | refs/heads/master | 2020-03-07T14:16:23.069709 | 2018-03-31T15:17:50 | 2018-03-31T15:17:50 | 127,522,589 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,907 | java | /**
* Gf_getYgdmResponse.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
*/
package org.tempuri;
public class Gf_getYgdmResponse implements java.io.Serializable {
private org.tempuri.ReturnExTable gf_getYgdmResult;
public Gf_getYgdmResponse() {
}
public Gf_getYgdmResponse(
org.tempuri.ReturnExTable gf_getYgdmResult) {
this.gf_getYgdmResult = gf_getYgdmResult;
}
/**
* Gets the gf_getYgdmResult value for this Gf_getYgdmResponse.
*
* @return gf_getYgdmResult
*/
public org.tempuri.ReturnExTable getGf_getYgdmResult() {
return gf_getYgdmResult;
}
/**
* Sets the gf_getYgdmResult value for this Gf_getYgdmResponse.
*
* @param gf_getYgdmResult
*/
public void setGf_getYgdmResult(org.tempuri.ReturnExTable gf_getYgdmResult) {
this.gf_getYgdmResult = gf_getYgdmResult;
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof Gf_getYgdmResponse)) return false;
Gf_getYgdmResponse other = (Gf_getYgdmResponse) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = true &&
((this.gf_getYgdmResult==null && other.getGf_getYgdmResult()==null) ||
(this.gf_getYgdmResult!=null &&
this.gf_getYgdmResult.equals(other.getGf_getYgdmResult())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = 1;
if (getGf_getYgdmResult() != null) {
_hashCode += getGf_getYgdmResult().hashCode();
}
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(Gf_getYgdmResponse.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("http://tempuri.org/", ">gf_getYgdmResponse"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("gf_getYgdmResult");
elemField.setXmlName(new javax.xml.namespace.QName("http://tempuri.org/", "gf_getYgdmResult"));
elemField.setXmlType(new javax.xml.namespace.QName("http://tempuri.org/", "ReturnExTable"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanSerializer(
_javaType, _xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanDeserializer(
_javaType, _xmlType, typeDesc);
}
}
| [
"dzyuting@163.com"
] | dzyuting@163.com |
8d9b1b7922469c8ce357a22eb77ac54722c4cef7 | 89972779259818d76e3d249a52153e4f42dd9501 | /old/vnm-selfcare-webapps-mega2-master/vnm-selfcare-core-2.0/src/main/java/com/gnv/vnm/selfcare/core/adapter/loyalty/ws/LoyaltyRedeempointReq.java | fe17bf197f575935fee67e109ec6e2f06c6d3913 | [] | no_license | SM-Tiwari/Spring-Security | 5514149eb7e082e04f04dab0cbcbf9fb1df5d84e | f0676d3a96748d476c226ba7e724896eab77fa71 | refs/heads/master | 2022-12-28T18:07:32.056655 | 2020-01-31T03:31:13 | 2020-01-31T03:31:13 | 237,351,143 | 0 | 0 | null | 2022-12-10T01:04:42 | 2020-01-31T03:10:35 | Java | UTF-8 | Java | false | false | 5,691 | java |
package com.gnv.vnm.selfcare.core.adapter.loyalty.ws;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for LoyaltyRedeempointReq complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="LoyaltyRedeempointReq">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="isdn" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="keyword" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="password" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="point" type="{http://www.w3.org/2001/XMLSchema}long" minOccurs="0"/>
* <element name="user" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "LoyaltyRedeempointReq", propOrder = {
"description",
"isdn",
"keyword",
"password",
"point",
"user"
})
public class LoyaltyRedeempointReq {
@XmlElementRef(name = "description", namespace = "http://loyalty.elcom.com", type = JAXBElement.class, required = false)
protected JAXBElement<String> description;
@XmlElementRef(name = "isdn", namespace = "http://loyalty.elcom.com", type = JAXBElement.class, required = false)
protected JAXBElement<String> isdn;
@XmlElementRef(name = "keyword", namespace = "http://loyalty.elcom.com", type = JAXBElement.class, required = false)
protected JAXBElement<String> keyword;
@XmlElementRef(name = "password", namespace = "http://loyalty.elcom.com", type = JAXBElement.class, required = false)
protected JAXBElement<String> password;
protected Long point;
@XmlElementRef(name = "user", namespace = "http://loyalty.elcom.com", type = JAXBElement.class, required = false)
protected JAXBElement<String> user;
/**
* Gets the value of the description property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public JAXBElement<String> getDescription() {
return description;
}
/**
* Sets the value of the description property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public void setDescription(JAXBElement<String> value) {
this.description = value;
}
/**
* Gets the value of the isdn property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public JAXBElement<String> getIsdn() {
return isdn;
}
/**
* Sets the value of the isdn property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public void setIsdn(JAXBElement<String> value) {
this.isdn = value;
}
/**
* Gets the value of the keyword property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public JAXBElement<String> getKeyword() {
return keyword;
}
/**
* Sets the value of the keyword property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public void setKeyword(JAXBElement<String> value) {
this.keyword = value;
}
/**
* Gets the value of the password property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public JAXBElement<String> getPassword() {
return password;
}
/**
* Sets the value of the password property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public void setPassword(JAXBElement<String> value) {
this.password = value;
}
/**
* Gets the value of the point property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getPoint() {
return point;
}
/**
* Sets the value of the point property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setPoint(Long value) {
this.point = value;
}
/**
* Gets the value of the user property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public JAXBElement<String> getUser() {
return user;
}
/**
* Sets the value of the user property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public void setUser(JAXBElement<String> value) {
this.user = value;
}
}
| [
"siddhesh.mani@infotelgroup.in"
] | siddhesh.mani@infotelgroup.in |
d95d076a17b6a7699c7d82708f1654bad4e01a50 | e461611c69fe9187a8e44609df182dd00d8f5875 | /algorithm/src/newcode_huawei/Demo46.java | 3b84860dea75a97e2933dd5f1d87121291fc2d57 | [] | no_license | songjiawang/myCoding | a704d8b94733f3591eb4150ff8658a17e0165cc0 | fa31efcba4816ca5b079a9dcff30c3f98dfad3e7 | refs/heads/master | 2020-03-29T01:01:05.200374 | 2018-09-19T00:08:47 | 2018-09-19T00:08:47 | 149,367,114 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 1,185 | java | package newcode_huawei;
import java.util.Scanner;
/**
* 从单链表中删除指定值得节点
* @author purple
*
*/
public class Demo46 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNextInt()){
int num = sc.nextInt();
ListNode pHead = new ListNode(sc.nextInt());
num--;
while(num-->0){
int key = sc.nextInt();
int pos = sc.nextInt();
ListNode newNode = new ListNode(key);
pHead = pHead.insert(newNode,pos,pHead);
}
int selectKey = sc.nextInt();
while(pHead!=null){
if(pHead.key!=selectKey)
System.out.print(pHead.key+" ");
pHead = pHead.next;
}
}
}
}
class ListNode{
int key;
ListNode next;
public ListNode(int key) {
// TODO Auto-generated constructor stub
this.key = key;
}
public ListNode insert(ListNode newNode,int pos,ListNode pHead){
int targetPos = pos-1;
ListNode index = new ListNode(0);
index.next = pHead;
while(index!=null && targetPos>0){
index= index.next;
targetPos--;
}
if(index==null){
System.out.println("index null");
}
newNode.next = index.next;
index.next = newNode;
return index.next;
}
} | [
"33470505+songjiawang@users.noreply.github.com"
] | 33470505+songjiawang@users.noreply.github.com |
c6a8498d5af6d6b7f21ce3b35052c6f21abe988d | 81d52386de544047c8c25bfd781c6b957031e149 | /gulimall-coupon/src/main/java/com/atguigu/gulimall/coupon/controller/SkuLadderController.java | e1f7316e554a9facd07e98cc8745651bd8d02a91 | [] | no_license | Archer-Fang/gulimall | 0a707ad95b0343e6f352ead78e3c7c6316798d55 | a363e0f6f9cb3fa6decb92135f22ec4dd5888212 | refs/heads/main | 2023-06-02T03:00:53.487121 | 2021-06-20T03:39:08 | 2021-06-20T03:39:08 | 371,892,223 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,979 | java | package com.atguigu.gulimall.coupon.controller;
import java.util.Arrays;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.atguigu.gulimall.coupon.entity.SkuLadderEntity;
import com.atguigu.gulimall.coupon.service.SkuLadderService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.common.utils.R;
/**
* 商品阶梯价格
*
* @author fzj
* @email 1091053002@qq.com
* @date 2021-06-02 22:18:43
*/
@RestController
@RequestMapping("coupon/skuladder")
public class SkuLadderController {
@Autowired
private SkuLadderService skuLadderService;
/**
* 列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params){
PageUtils page = skuLadderService.queryPage(params);
return R.ok().put("page", page);
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
SkuLadderEntity skuLadder = skuLadderService.getById(id);
return R.ok().put("skuLadder", skuLadder);
}
/**
* 保存
*/
@RequestMapping("/save")
public R save(@RequestBody SkuLadderEntity skuLadder){
skuLadderService.save(skuLadder);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody SkuLadderEntity skuLadder){
skuLadderService.updateById(skuLadder);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
skuLadderService.removeByIds(Arrays.asList(ids));
return R.ok();
}
}
| [
"1091053002@qq.com"
] | 1091053002@qq.com |
c365e28de3e93d577c538b1b8e72cc575421472a | 95f5e9a6401fb4ff57ed600b243e937f7cd16627 | /FitnessRoomBase/src/main/java/fitnessroom/base/model/Expectcourse.java | 87e9544dee5c8291bfcebc27eaa931b9f127f180 | [] | no_license | MyAuntIsPost90s/FitnessRoom | 50c97513c877552453a8562398d9146efb4d4244 | 703a37b37832cf84e19320fa9d9c7a3c12edba64 | refs/heads/master | 2021-01-24T04:13:19.484049 | 2018-05-31T12:26:54 | 2018-05-31T12:26:54 | 122,926,051 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 839 | java | package fitnessroom.base.model;
public class Expectcourse {
private String expectcourseid;
private String userid;
private String courseid;
private String note;
public String getExpectcourseid() {
return expectcourseid;
}
public void setExpectcourseid(String expectcourseid) {
this.expectcourseid = expectcourseid;
}
public String getUserid() {
return userid;
}
public void setUserid(String userid) {
this.userid = userid;
}
public String getCourseid() {
return courseid;
}
public void setCourseid(String courseid) {
this.courseid = courseid;
}
public String getNote() {
return note;
}
public void setNote(String note) {
this.note = note;
}
} | [
"1126670571@qq.com"
] | 1126670571@qq.com |
262ee30abb5502e7f193416725dc78dbc0f08cef | a87791f3d0ddacefbe5dcdacbf9d720eaeb95fa8 | /src/main/java/cn/comtom/cbs/model/StatsSecuritySummary.java | 09ffe54adafe9474daefd858a4faca16e48d7e0a | [] | no_license | liuhuayun/ebd-service | cb68bc45d30363cbc496b1b206f579155f28b75e | 6df085eb66c3734a15d95f4705710dbfac0c5ca4 | refs/heads/master | 2022-06-26T10:08:14.261463 | 2020-03-20T08:54:26 | 2020-03-20T08:54:26 | 248,708,859 | 0 | 0 | null | 2022-06-17T03:01:32 | 2020-03-20T08:50:52 | TSQL | UTF-8 | Java | false | false | 1,239 | java | package cn.comtom.cbs.model;
import java.util.Date;
import javax.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author gege
* Created by Mybatis Generator on 2018/12/31
*/
@Table(name = "stats_security_summary")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class StatsSecuritySummary {
@Id
@Column(name = "security_id")
private String securityId;
/**
* 病毒检测
*/
@Column(name = "virus_detection")
private String virusDetection;
/**
* 网络防御
*/
@Column(name = "network_defense")
private String networkDefense;
/**
* 功能服务
*/
@Column(name = "functional_service")
private String functionalService;
/**
* 证书授权
*/
@Column(name = "certificate_authorities")
private String certificateAuthorities;
/**
* 加解密机制
*/
@Column(name = "encipherment_mechanisms")
private String enciphermentMechanisms;
/**
* 扫描时间
*/
@Column(name = "scan_time")
private Date scanTime;
/**
* 操作人
*/
@Column(name = "op_user")
private String opUser;
} | [
"568656253@qq.com"
] | 568656253@qq.com |
6ad237c93fb0bdfbc45cf3eb82ab5d904a48df82 | 96f8d42c474f8dd42ecc6811b6e555363f168d3e | /zuiyou/sources/com/sina/weibo/sdk/api/WeiboMessage.java | 89563cc44cbd8003b95361002a6609e2095abaa2 | [] | no_license | aheadlcx/analyzeApk | 050b261595cecc85790558a02d79739a789ae3a3 | 25cecc394dde4ed7d4971baf0e9504dcb7fabaca | refs/heads/master | 2020-03-10T10:24:49.773318 | 2018-04-13T09:44:45 | 2018-04-13T09:44:45 | 129,332,351 | 6 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,300 | java | package com.sina.weibo.sdk.api;
import android.os.Bundle;
import com.sina.weibo.sdk.constant.WBConstants.Msg;
import com.sina.weibo.sdk.utils.LogUtil;
public final class WeiboMessage {
public BaseMediaObject mediaObject;
public WeiboMessage(Bundle bundle) {
toBundle(bundle);
}
public Bundle toBundle(Bundle bundle) {
if (this.mediaObject != null) {
bundle.putParcelable(Msg.MEDIA, this.mediaObject);
bundle.putString(Msg.MEDIA_EXTRA, this.mediaObject.toExtraMediaString());
}
return bundle;
}
public WeiboMessage toObject(Bundle bundle) {
this.mediaObject = (BaseMediaObject) bundle.getParcelable(Msg.MEDIA);
if (this.mediaObject != null) {
this.mediaObject.toExtraMediaObject(bundle.getString(Msg.MEDIA_EXTRA));
}
return this;
}
public boolean checkArgs() {
if (this.mediaObject == null) {
LogUtil.e("Weibo.WeiboMessage", "checkArgs fail, mediaObject is null");
return false;
} else if (this.mediaObject == null || this.mediaObject.checkArgs()) {
return true;
} else {
LogUtil.e("Weibo.WeiboMessage", "checkArgs fail, mediaObject is invalid");
return false;
}
}
}
| [
"aheadlcxzhang@gmail.com"
] | aheadlcxzhang@gmail.com |
38c6a85451a5ca8098c716d4849884b9a016f2fc | 6baf1fe00541560788e78de5244ae17a7a2b375a | /hollywood/com.oculus.assistant-base/sources/X/C0748gY.java | 8b235818a26aec2f76f32278e171e39ba9e8594b | [] | no_license | phwd/quest-tracker | 286e605644fc05f00f4904e51f73d77444a78003 | 3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba | refs/heads/main | 2023-03-29T20:33:10.959529 | 2021-04-10T22:14:11 | 2021-04-10T22:14:11 | 357,185,040 | 4 | 2 | null | 2021-04-12T12:28:09 | 2021-04-12T12:28:08 | null | UTF-8 | Java | false | false | 2,524 | java | package X;
import com.facebook.assistant.oacr.OacrConstants;
import java.util.concurrent.atomic.AtomicBoolean;
/* renamed from: X.gY reason: case insensitive filesystem */
public final class C0748gY implements AbstractC0105Aj {
public final /* synthetic */ C00608k A00;
public C0748gY(C00608k r1) {
this.A00 = r1;
}
@Override // X.AbstractC0105Aj
public final void A47(C0104Ai ai, AbstractC0106Ak ak) {
C00608k r2 = this.A00;
int i = ((C0772gy) ak.A2L()).A00;
synchronized (r2) {
C0139Dd.A09("KeyboardAssistant", r2.A02.toString());
hG hGVar = C00879r.A00;
hGVar.A06();
hGVar.A03(EnumC00899t.SERVICE, r2.A02.A05);
hGVar.A03(EnumC00899t.PROTOCOL, OacrConstants.OACR_PROTOCOL_NAME);
C0782hF hFVar = C00839n.A00;
C00568g r8 = r2.A08;
C00849o r1 = new C00849o(r2.A00);
hFVar.A00 = r1;
r8.A04 = new C0781hE(r1, hGVar);
FS fs = r2.A0F;
C00618l r12 = r2.A02;
fs.A0C = r12.A08;
C00799i.A00.logLocalEvent("DataForKeyboard", r12.toString());
C00618l r0 = r2.A02;
String str = r0.A06;
fs.A0A = str;
C00598j r5 = r2.A09;
r5.A02 = str;
fs.A06 = r0.A03;
if (r2.A00 > 0) {
r8.A06.set(true);
synchronized (r5) {
r5.A08.clear();
if (r5.A00 == null) {
RunnableC00578h r4 = new RunnableC00578h(r5);
r5.A00 = r4;
AtomicBoolean atomicBoolean = r4.A01;
if (atomicBoolean.get()) {
atomicBoolean.set(false);
r4.A00.add(new C0746gW(r4.A02));
}
atomicBoolean.set(true);
r4.A00.add(r4.A02.A04);
new Thread(r4).start();
} else {
C0139Dd.A0F("LastAudioLogger", "Already recording %s", r5.A07);
}
}
r8.A02 = new C0752gc(r2);
r8.A01 = new C0753gd(r2);
r2.A03.A01(new iF(r8, "transcription", r2.A00, str, r2.A02.A08, "not_required", r2.A07, 0, null, r2.A04, i));
} else {
throw new IllegalStateException("Microphone Sample Rate not set");
}
}
}
}
| [
"cyuubiapps@gmail.com"
] | cyuubiapps@gmail.com |
4396248c795db7c0ca660f7021dcec372c08591a | dc81649732414dee4d552a240b25cb3d055799b1 | /src/test/java/org/assertj/core/api/bytearray/ByteArrayAssert_containsSubsequence_with_Integer_Arguments_Test.java | 9780df80c9b984e041712a3a867ecbb0fe7cacbf | [
"Apache-2.0"
] | permissive | darkliang/assertj-core | e40de697a5ac19db7a652178963a523dfe6f89ff | 4a25dab7b99f292d158dc8118ac84dc7b4933731 | refs/heads/integration | 2021-05-16T23:22:49.013854 | 2020-05-31T12:36:31 | 2020-05-31T12:36:31 | 250,513,505 | 1 | 0 | Apache-2.0 | 2020-06-02T09:25:54 | 2020-03-27T11:11:36 | Java | UTF-8 | Java | false | false | 1,534 | 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.
*
* Copyright 2012-2020 the original author or authors.
*/
package org.assertj.core.api.bytearray;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.verify;
import org.assertj.core.api.ByteArrayAssert;
import org.assertj.core.api.ByteArrayAssertBaseTest;
import org.assertj.core.test.IntArrays;
import org.junit.jupiter.api.Test;
/**
* Tests for <code>{@link ByteArrayAssert#containsSubsequence(int...)}</code>.
*/
public class ByteArrayAssert_containsSubsequence_with_Integer_Arguments_Test extends ByteArrayAssertBaseTest {
@Override
protected ByteArrayAssert invoke_api_method() {
return assertions.containsSubsequence(6, 8);
}
@Override
protected void verify_internal_effects() {
verify(arrays).assertContainsSubsequence(getInfo(assertions), getActual(assertions), IntArrays.arrayOf(6, 8));
}
@Test
public void invoke_api_like_user() {
assertThat(new byte[] { 1, 2, 3 }).containsSubsequence(1, 3);
}
}
| [
"joel.costigliola@gmail.com"
] | joel.costigliola@gmail.com |
50af701a28d952a5f11cee10afeac1f684b47597 | 6e0fe0c6b38e4647172259d6c65c2e2c829cdbc5 | /modules/base/diff-api/src/main/java/com/intellij/diff/DiffManager.java | c7c95ddb0ff8997df39f23dc0409eccf567ab020 | [
"Apache-2.0",
"LicenseRef-scancode-jgraph"
] | permissive | TCROC/consulo | 3f9a6df84e0fbf2b6211457b8a5f5857303b3fa6 | cda24a03912102f916dc06ffce052892a83dd5a7 | refs/heads/master | 2023-01-30T13:19:04.216407 | 2020-12-06T16:57:00 | 2020-12-06T16:57:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,881 | java | /*
* Copyright 2000-2015 JetBrains s.r.o.
*
* 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.intellij.diff;
import com.intellij.diff.chains.DiffRequestChain;
import com.intellij.diff.merge.MergeRequest;
import com.intellij.diff.requests.DiffRequest;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.project.Project;
import consulo.disposer.Disposable;
import consulo.ui.annotation.RequiredUIAccess;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.awt.*;
public abstract class DiffManager {
@Nonnull
public static DiffManager getInstance() {
return ServiceManager.getService(DiffManager.class);
}
//
// Usage
//
@RequiredUIAccess
public abstract void showDiff(@Nullable Project project, @Nonnull DiffRequest request);
@RequiredUIAccess
public abstract void showDiff(@Nullable Project project, @Nonnull DiffRequest request, @Nonnull DiffDialogHints hints);
@RequiredUIAccess
public abstract void showDiff(@Nullable Project project, @Nonnull DiffRequestChain requests, @Nonnull DiffDialogHints hints);
@Nonnull
public abstract DiffRequestPanel createRequestPanel(@Nullable Project project, @Nonnull Disposable parent, @Nullable Window window);
@RequiredUIAccess
public abstract void showMerge(@Nullable Project project, @Nonnull MergeRequest request);
}
| [
"vistall.valeriy@gmail.com"
] | vistall.valeriy@gmail.com |
5f623f824851f18f24bb9b547fbcffb25f9cb5ff | a006be286d4482aecf4021f62edd8dd9bb600040 | /src/main/java/com/alipay/api/response/AlipayMobilePublicPushTextResponse.java | ca266ff0f3e6bfc7f160255b65cc133b1de11d73 | [] | no_license | zero-java/alipay-sdk | 16e520fbd69974f7a7491919909b24be9278f1b1 | aac34d987a424497d8e8b1fd67b19546a6742132 | refs/heads/master | 2021-07-19T12:34:20.765988 | 2017-12-13T07:43:24 | 2017-12-13T07:43:24 | 96,759,166 | 0 | 0 | null | 2017-07-25T02:02:45 | 2017-07-10T09:20:13 | Java | UTF-8 | Java | false | false | 351 | java | package com.alipay.api.response;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.mobile.public.push.text response.
*
* @author auto create
* @since 1.0, 2014-06-12 17:16:13
*/
public class AlipayMobilePublicPushTextResponse extends AlipayResponse {
private static final long serialVersionUID = 5889289626996226863L;
}
| [
"443683059a"
] | 443683059a |
d01f8c178b8c51317ff1bc9eeaff9bce7e1dc3ae | 40ad7f3cbfcc711d0fe40c2becde9b726dd35d86 | /query/spark-2.2/q62/q62_jobid_5_stageid_5_taskid_1841_shuffleTask_4_execid_2_577296163.java | 2cbe69a0c0c297b502c914af9cc9e487e4254339 | [] | no_license | kmadhugit/spark-tpcds-99-generated-code | f2ed0f40f031b58b6af2396b7248e776706dcc18 | 8483bdf3d8477e63bce1bb65493d2af5c9207ae7 | refs/heads/master | 2020-05-30T19:39:55.759974 | 2017-11-14T09:54:56 | 2017-11-14T09:54:56 | 83,679,481 | 1 | 1 | null | 2017-11-14T10:45:07 | 2017-03-02T13:15:25 | Java | UTF-8 | Java | false | false | 2,582 | java | /* 001 */ public java.lang.Object generate(Object[] references) {
/* 002 */ return new SpecificUnsafeRowJoiner();
/* 003 */ }
/* 004 */
/* 005 */ class SpecificUnsafeRowJoiner extends org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowJoiner {
/* 006 */ private byte[] buf = new byte[64];
/* 007 */ private UnsafeRow out = new UnsafeRow(8);
/* 008 */
/* 009 */ public UnsafeRow join(UnsafeRow row1, UnsafeRow row2) {
/* 010 */ // row1: 3 fields, 1 words in bitset
/* 011 */ // row2: 5, 1 words in bitset
/* 012 */ // output: 8 fields, 1 words in bitset
/* 013 */ final int sizeInBytes = row1.getSizeInBytes() + row2.getSizeInBytes() - 8;
/* 014 */ if (sizeInBytes > buf.length) {
/* 015 */ buf = new byte[sizeInBytes];
/* 016 */ }
/* 017 */
/* 018 */ final java.lang.Object obj1 = row1.getBaseObject();
/* 019 */ final long offset1 = row1.getBaseOffset();
/* 020 */ final java.lang.Object obj2 = row2.getBaseObject();
/* 021 */ final long offset2 = row2.getBaseOffset();
/* 022 */
/* 023 */ Platform.putLong(buf, 16, Platform.getLong(obj1, offset1 + 0) | (Platform.getLong(obj2, offset2) << 3));
/* 024 */
/* 025 */ // Copy fixed length data for row1
/* 026 */ Platform.copyMemory(
/* 027 */ obj1, offset1 + 8,
/* 028 */ buf, 24,
/* 029 */ 24);
/* 030 */
/* 031 */
/* 032 */ // Copy fixed length data for row2
/* 033 */ Platform.copyMemory(
/* 034 */ obj2, offset2 + 8,
/* 035 */ buf, 48,
/* 036 */ 40);
/* 037 */
/* 038 */
/* 039 */ // Copy variable length data for row1
/* 040 */ long numBytesVariableRow1 = row1.getSizeInBytes() - 32;
/* 041 */ Platform.copyMemory(
/* 042 */ obj1, offset1 + 32,
/* 043 */ buf, 88,
/* 044 */ numBytesVariableRow1);
/* 045 */
/* 046 */
/* 047 */ // Copy variable length data for row2
/* 048 */ long numBytesVariableRow2 = row2.getSizeInBytes() - 48;
/* 049 */ Platform.copyMemory(
/* 050 */ obj2, offset2 + 48,
/* 051 */ buf, 88 + numBytesVariableRow1,
/* 052 */ numBytesVariableRow2);
/* 053 */
/* 054 */
/* 055 */ Platform.putLong(buf, 24, Platform.getLong(buf, 24) + (40L << 32));
/* 056 */
/* 057 */
/* 058 */ Platform.putLong(buf, 32, Platform.getLong(buf, 32) + (40L << 32));
/* 059 */
/* 060 */
/* 061 */ Platform.putLong(buf, 40, Platform.getLong(buf, 40) + (40L << 32));
/* 062 */
/* 063 */
/* 064 */
/* 065 */
/* 066 */
/* 067 */
/* 068 */
/* 069 */ out.pointTo(buf, sizeInBytes);
/* 070 */
/* 071 */ return out;
/* 072 */ }
/* 073 */ }
| [
"kavana.bhat@in.ibm.com"
] | kavana.bhat@in.ibm.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.