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
299812271d37d6ff2a51c707f19193c63b581b29
b7bc6f1ed07c4912b8cae33e2b8b8ab65940228a
/services/user/src/main/java/com/yogu/services/store/base/dao/GoodsTagDao.java
938a32038abc1fc5dcd560d2bd5d37e0f63ad79a
[]
no_license
mazingHins/yogu_server
a783f0cb5ad1f939fca1dc41f9a4408b7b922eda
2ded593ab3e4964d534fb72ca96496c61632e558
refs/heads/master
2021-09-08T05:22:34.385346
2018-03-07T14:34:46
2018-03-07T14:34:46
59,449,844
1
2
null
null
null
null
UTF-8
Java
false
false
925
java
package com.yogu.services.store.base.dao; import java.util.List; import org.apache.ibatis.annotations.Param; import com.yogu.commons.datasource.annocation.TheDataDao; import com.yogu.services.store.base.entry.GoodsCategoryPO; import com.yogu.services.store.base.entry.GoodsTagPO; /** * yg_goods_tag 表的操作接口 * * @author JFan 2015-08-07 */ @TheDataDao public interface GoodsTagDao { /** * 保存数据 * * @param po 对象 */ public void save(GoodsTagPO po); /** * 根据主键读取记录 */ public GoodsTagPO getById(@Param("tagId") long tagId); /** * 通过分类id,获取改分类下所有的标签列表,结果按照sequence顺序排序 * * @param categoryId - 分类id * @return 返回符合的数据,如果没有数据,返回emtpy list */ public List<GoodsTagPO> listByCategoryId(@Param("categoryId") long categoryId); public List<GoodsTagPO> listAll(); }
[ "qiujun@ibeiliao.com" ]
qiujun@ibeiliao.com
edcfd19495fb7b91c347f136c3d2ef6d94e374e6
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/eclipse--che/4a6d9cd2b8b9c5b2674e7e2bfd83477dd262b1a9/after/CommandToolbarView.java
eb4601d6afbd4ea0b2c7558ac840cd4c6beb5f15
[]
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
1,072
java
/******************************************************************************* * Copyright (c) 2012-2017 Codenvy, S.A. * 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: * Codenvy, S.A. - initial API and implementation *******************************************************************************/ package org.eclipse.che.ide.command.toolbar; import com.google.gwt.user.client.ui.AcceptsOneWidget; import org.eclipse.che.ide.api.mvp.View; import org.eclipse.che.ide.ui.menubutton.MenuButton; /** View for command toolbar. */ public interface CommandToolbarView extends View<CommandToolbarView.ActionDelegate> { AcceptsOneWidget getCommandsPanelContainer(); AcceptsOneWidget getProcessesListContainer(); AcceptsOneWidget getPreviewUrlsListContainer(); void addButton(MenuButton button); interface ActionDelegate { } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
c940ddaeb28bb50579bc2b4fc237be47952f263b
e1fb296371d4d9d31bb7b20073a028573eba65fd
/modules/flowable-engine/src/test/java/org/flowable/engine/test/externalworker/MultipleExternalWorkerAcquireServiceTaskTest.java
8fbce9647ae0e10bead97412dde56d5d83e29c35
[ "Apache-2.0" ]
permissive
huandev/flowable-engine
37286c0345ef898e5980224352fe28f3c492201e
8ea860edc095443c083d5b4ebcf67109899628ab
refs/heads/master
2022-09-15T13:02:42.745840
2020-06-03T21:29:38
2020-06-03T21:46:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,668
java
/* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.flowable.engine.test.externalworker; import static org.assertj.core.api.Assertions.assertThat; import java.time.Duration; import java.util.Collections; import java.util.List; import java.util.concurrent.CompletableFuture; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import org.flowable.common.engine.impl.interceptor.AbstractCommandInterceptor; import org.flowable.common.engine.impl.interceptor.Command; import org.flowable.common.engine.impl.interceptor.CommandConfig; import org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl; import org.flowable.engine.impl.interceptor.CommandInvoker; import org.flowable.engine.test.Deployment; import org.flowable.engine.test.impl.CustomConfigurationFlowableTestCase; import org.flowable.job.api.AcquiredExternalWorkerJob; import org.flowable.job.api.ExternalWorkerJob; import org.junit.jupiter.api.Test; /** * @author Filip Hrisafov */ public class MultipleExternalWorkerAcquireServiceTaskTest extends CustomConfigurationFlowableTestCase { protected CustomWaitCommandInvoker waitCommandInvoker; public MultipleExternalWorkerAcquireServiceTaskTest() { super("multipleExternalWorkerAcquireTest"); } @Override protected void configureConfiguration(ProcessEngineConfigurationImpl processEngineConfiguration) { waitCommandInvoker = new CustomWaitCommandInvoker(); processEngineConfiguration.setCommandInvoker(waitCommandInvoker); } @Test @Deployment(resources = "org/flowable/engine/test/externalworker/ExternalWorkerServiceTaskTest.testSimple.bpmn20.xml") void testAcquireJobsInTheSameTime() throws ExecutionException, InterruptedException { for (int i = 0; i < 5; i++) { runtimeService.createProcessInstanceBuilder() .processDefinitionKey("simpleExternalWorker") .businessKey("process" + i) .variable("name", "kermit") .start(); } assertThat(managementService.createExternalWorkerJobQuery().list()) .hasSize(5) .extracting(ExternalWorkerJob::getLockOwner) .containsOnlyNulls(); waitCommandInvoker.waitLatch = new CountDownLatch(1); waitCommandInvoker.workLatch = new CountDownLatch(1); ExecutorService executorService = Executors.newFixedThreadPool(2); CompletableFuture<List<AcquiredExternalWorkerJob>> testWorker1 = CompletableFuture .supplyAsync(() -> managementService.createExternalWorkerJobAcquireBuilder() .topic("simple", Duration.ofMinutes(30)) .acquireAndLock(3, "testWorker1"), executorService); CompletableFuture<List<AcquiredExternalWorkerJob>> testWorker2 = CompletableFuture .supplyAsync(() -> managementService.createExternalWorkerJobAcquireBuilder() .topic("simple", Duration.ofMinutes(30)) .acquireAndLock(3, "testWorker2"), executorService); waitCommandInvoker.workLatch.countDown(); waitCommandInvoker.waitLatch.countDown(); List<AcquiredExternalWorkerJob> worker1Jobs = testWorker1.get(); List<AcquiredExternalWorkerJob> worker2Jobs = testWorker2.get(); assertThat(worker1Jobs).isNotEmpty(); assertThat(worker2Jobs).isNotEmpty(); executorService.shutdown(); assertThat(managementService.createExternalWorkerJobQuery().list()) .extracting(ExternalWorkerJob::getLockOwner) .containsOnly("testWorker1", "testWorker2"); } @Test @Deployment(resources = "org/flowable/engine/test/externalworker/ExternalWorkerServiceTaskTest.testSimple.bpmn20.xml") void testAcquireJobsInTheSameTimeWithNoRetries() throws ExecutionException, InterruptedException { for (int i = 0; i < 5; i++) { runtimeService.createProcessInstanceBuilder() .processDefinitionKey("simpleExternalWorker") .businessKey("process" + i) .variable("name", "kermit") .start(); } assertThat(managementService.createExternalWorkerJobQuery().list()) .hasSize(5) .extracting(ExternalWorkerJob::getLockOwner) .containsOnlyNulls(); waitCommandInvoker.waitLatch = new CountDownLatch(1); waitCommandInvoker.workLatch = new CountDownLatch(1); ExecutorService executorService = Executors.newFixedThreadPool(2); CompletableFuture<List<AcquiredExternalWorkerJob>> testWorker1 = CompletableFuture .supplyAsync(() -> managementService.createExternalWorkerJobAcquireBuilder() .topic("simple", Duration.ofMinutes(30)) .acquireAndLock(3, "testWorker1", 1), executorService); CompletableFuture<List<AcquiredExternalWorkerJob>> testWorker2 = CompletableFuture .supplyAsync(() -> managementService.createExternalWorkerJobAcquireBuilder() .topic("simple", Duration.ofMinutes(30)) .acquireAndLock(3, "testWorker2", 1), executorService); waitCommandInvoker.workLatch.countDown(); waitCommandInvoker.waitLatch.countDown(); List<AcquiredExternalWorkerJob> worker1Jobs = testWorker1.get(); List<AcquiredExternalWorkerJob> worker2Jobs = testWorker2.get(); if (worker1Jobs.isEmpty()) { assertThat(worker2Jobs).isNotEmpty(); assertThat(managementService.createExternalWorkerJobQuery().list()) .extracting(ExternalWorkerJob::getLockOwner) .containsOnly("testWorker2", null); } else { assertThat(worker2Jobs).isEmpty(); assertThat(managementService.createExternalWorkerJobQuery().list()) .extracting(ExternalWorkerJob::getLockOwner) .containsOnly("testWorker1", null); } executorService.shutdown(); } private static class CustomWaitCommandInvoker extends CommandInvoker { protected CountDownLatch workLatch; protected CountDownLatch waitLatch; @Override public <T> T execute(CommandConfig config, Command<T> command) { if (workLatch != null) { try { workLatch.await(5, TimeUnit.SECONDS); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } T result = super.execute(config, command); if (waitLatch != null) { try { waitLatch.await(5, TimeUnit.SECONDS); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } return result; } } }
[ "filip.hrisafov@gmail.com" ]
filip.hrisafov@gmail.com
7a84c550619fe2f5344a99165e7161048c4b5598
dd76d0b680549acb07278b2ecd387cb05ec84d64
/divestory-Fernflower/com/google/zxing/oned/rss/expanded/decoders/DecodedInformation.java
02d7343d8c7c35ffc0f0aa7f9d2f722ded164efc
[]
no_license
ryangardner/excursion-decompiling
43c99a799ce75a417e636da85bddd5d1d9a9109c
4b6d11d6f118cdab31328c877c268f3d56b95c58
refs/heads/master
2023-07-02T13:32:30.872241
2021-08-09T19:33:37
2021-08-09T19:33:37
299,657,052
0
0
null
null
null
null
UTF-8
Java
false
false
748
java
package com.google.zxing.oned.rss.expanded.decoders; final class DecodedInformation extends DecodedObject { private final String newString; private final boolean remaining; private final int remainingValue; DecodedInformation(int var1, String var2) { super(var1); this.newString = var2; this.remaining = false; this.remainingValue = 0; } DecodedInformation(int var1, String var2, int var3) { super(var1); this.remaining = true; this.remainingValue = var3; this.newString = var2; } String getNewString() { return this.newString; } int getRemainingValue() { return this.remainingValue; } boolean isRemaining() { return this.remaining; } }
[ "ryan.gardner@coxautoinc.com" ]
ryan.gardner@coxautoinc.com
ef0b1c7f990895e2fd0bfdd2a460107cc46f27c8
03ef464c7b2834e4d66ab02c72d072ac458ae322
/jboot-admin/src/main/java/io/jboot/admin/controller/teacity/PtOrderController.java
fcf16b0194f892351dc78cdd891a04a596298836
[ "Apache-2.0" ]
permissive
Proby143/jboot-admin
5f0eea534b9b83d983ff5840259da5616d51bad5
c13ac483ba146162a7526193ec3cf1d104eee7e5
refs/heads/master
2020-05-22T22:34:35.726175
2019-07-10T10:29:39
2019-07-10T10:29:39
186,548,215
0
0
null
2019-05-14T05:04:32
2019-05-14T05:04:32
null
UTF-8
Java
false
false
1,313
java
package io.jboot.admin.controller.teacity; import com.jfinal.plugin.activerecord.Page; import io.jboot.admin.base.common.ServiceConst; import io.jboot.admin.base.rest.datatable.DataTable; import io.jboot.admin.base.web.base.BaseController; import io.jboot.admin.service.api.PtOrderService; import io.jboot.admin.service.api.ShopService; import io.jboot.admin.service.entity.model.PtOrder; import io.jboot.admin.service.entity.model.Shop; import io.jboot.core.rpc.annotation.JbootrpcService; import io.jboot.web.controller.annotation.RequestMapping; /** * describe: * * @author 白野 * @date 2019\7\10 0010 */ @RequestMapping("/teacity/ptOrder") public class PtOrderController extends BaseController { @JbootrpcService(group = ServiceConst.SERVICE_SYSTEM, version = ServiceConst.VERSION_1_0) PtOrderService ptOrderService; public void index() { render("main.html"); } /** * 表格数据 */ public void tableData() { int pageNumber = getParaToInt("pageNumber", 1); int pageSize = getParaToInt("pageSize", 30); PtOrder ptOrder = new PtOrder(); // shop.setShopName(getPara("name")); Page<PtOrder> dataPage = ptOrderService.findPage(ptOrder, pageNumber, pageSize); renderJson(new DataTable<PtOrder>(dataPage)); } }
[ "admin@example.com" ]
admin@example.com
6c6abf59f0c67571ab73e57b725f1233d9f74f4b
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MATH-4b-1-5-MOEAD-WeightedSum:TestLen:CallDiversity/org/apache/commons/math3/geometry/euclidean/threed/Line_ESTest_scaffolding.java
4abbe19ee36302256f560dd84ff255c4b082aecf
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
3,657
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Wed Apr 08 08:19:21 UTC 2020 */ package org.apache.commons.math3.geometry.euclidean.threed; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class Line_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.math3.geometry.euclidean.threed.Line"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(Line_ESTest_scaffolding.class.getClassLoader() , "org.apache.commons.math3.geometry.Vector", "org.apache.commons.math3.exception.util.ExceptionContextProvider", "org.apache.commons.math3.geometry.Space", "org.apache.commons.math3.util.MathArrays", "org.apache.commons.math3.geometry.euclidean.oned.Vector1D", "org.apache.commons.math3.exception.util.ArgUtils", "org.apache.commons.math3.exception.MathArithmeticException", "org.apache.commons.math3.exception.NumberIsTooSmallException", "org.apache.commons.math3.exception.MathInternalError", "org.apache.commons.math3.exception.NotPositiveException", "org.apache.commons.math3.exception.MathIllegalStateException", "org.apache.commons.math3.exception.NonMonotonicSequenceException", "org.apache.commons.math3.exception.MathIllegalArgumentException", "org.apache.commons.math3.geometry.euclidean.threed.Line", "org.apache.commons.math3.geometry.euclidean.threed.SubLine", "org.apache.commons.math3.exception.MathIllegalNumberException", "org.apache.commons.math3.exception.util.LocalizedFormats", "org.apache.commons.math3.util.FastMath", "org.apache.commons.math3.exception.DimensionMismatchException", "org.apache.commons.math3.exception.util.Localizable", "org.apache.commons.math3.exception.NotStrictlyPositiveException", "org.apache.commons.math3.exception.util.ExceptionContext", "org.apache.commons.math3.geometry.euclidean.threed.Vector3D", "org.apache.commons.math3.exception.NullArgumentException", "org.apache.commons.math3.geometry.partitioning.Embedding", "org.apache.commons.math3.exception.NoDataException", "org.apache.commons.math3.geometry.euclidean.threed.Euclidean3D" ); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
8ee6fa1af8caecd30f3d28337d4a13cd4b64b9fb
98db62fb49fffe151933dc94978ae171f65ffe5b
/src/share/classes/java/util/EmptyStackException.java
beb7d3d0d3311a6bb7c9915f0c5ee0ebd8cff88b
[]
no_license
isaacreath/jdk8
07a16ec6d142a6c72a5498259efe83587616e08a
4d793f9a7a165aea5fc3c599baf74cf97ba08fe5
refs/heads/master
2023-04-25T21:48:42.166290
2017-08-14T01:14:52
2017-08-14T01:14:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
193
java
package java.util; public class EmptyStackException extends RuntimeException { private static final long serialVersionUID = 5084686378493302095L; public EmptyStackException() { } }
[ "3200601@qq.com" ]
3200601@qq.com
2e19895d865a7166897bd6acd9e76260ba83a8e2
ee6d3fbd4687f0cafb86355bfdd54eb17ce7ce39
/client/src/main/java/org/apache/qpid/transport/DtxStart.java
7e60f1fbf1825e611e04e5ede773e3ed36b11328
[ "Apache-2.0" ]
permissive
isabella232/qpid-jms-amqp-0-x
a862ed9503605426f699426198d7ca0c19af183f
350f6017d5e7d3658be67011cdbcd2f318148ea8
refs/heads/main
2023-09-06T07:39:41.219473
2021-01-18T16:19:08
2021-01-18T16:19:08
423,823,569
0
0
Apache-2.0
2021-11-02T11:53:11
2021-11-02T11:50:30
null
UTF-8
Java
false
false
5,040
java
package org.apache.qpid.transport; /* * * 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. * */ import java.util.LinkedHashMap; import java.util.Map; import org.apache.qpid.transport.codec.Decoder; import org.apache.qpid.transport.codec.Encoder; import org.apache.qpid.transport.network.Frame; public final class DtxStart extends Method { public static final int TYPE = 1538; public final int getStructType() { return TYPE; } public final int getSizeWidth() { return 0; } public final int getPackWidth() { return 2; } public final boolean hasPayload() { return false; } public final byte getEncodedTrack() { return Frame.L4; } public final boolean isConnectionControl() { return false; } private short packing_flags = 0; private Xid xid; public DtxStart() {} public DtxStart(Xid xid, Option ... _options) { if(xid != null) { setXid(xid); } for (int i=0; i < _options.length; i++) { switch (_options[i]) { case JOIN: packing_flags |= 512; break; case RESUME: packing_flags |= 1024; break; case SYNC: this.setSync(true); break; case BATCH: this.setBatch(true); break; case UNRELIABLE: this.setUnreliable(true); break; case NONE: break; default: throw new IllegalArgumentException("invalid option: " + _options[i]); } } } public <C> void dispatch(C context, MethodDelegate<C> delegate) { delegate.dtxStart(context, this); } public final boolean hasXid() { return (packing_flags & 256) != 0; } public final DtxStart clearXid() { packing_flags &= ~256; this.xid = null; setDirty(true); return this; } public final Xid getXid() { return xid; } public final DtxStart setXid(Xid value) { this.xid = value; packing_flags |= 256; setDirty(true); return this; } public final DtxStart xid(Xid value) { return setXid(value); } public final boolean hasJoin() { return (packing_flags & 512) != 0; } public final DtxStart clearJoin() { packing_flags &= ~512; setDirty(true); return this; } public final boolean getJoin() { return hasJoin(); } public final DtxStart setJoin(boolean value) { if (value) { packing_flags |= 512; } else { packing_flags &= ~512; } setDirty(true); return this; } public final DtxStart join(boolean value) { return setJoin(value); } public final boolean hasResume() { return (packing_flags & 1024) != 0; } public final DtxStart clearResume() { packing_flags &= ~1024; setDirty(true); return this; } public final boolean getResume() { return hasResume(); } public final DtxStart setResume(boolean value) { if (value) { packing_flags |= 1024; } else { packing_flags &= ~1024; } setDirty(true); return this; } public final DtxStart resume(boolean value) { return setResume(value); } public void write(Encoder enc) { enc.writeUint16(packing_flags); if ((packing_flags & 256) != 0) { enc.writeStruct(Xid.TYPE, this.xid); } } public void read(Decoder dec) { packing_flags = (short) dec.readUint16(); if ((packing_flags & 256) != 0) { this.xid = (Xid)dec.readStruct(Xid.TYPE); } } public Map<String,Object> getFields() { Map<String,Object> result = new LinkedHashMap<String,Object>(); if ((packing_flags & 256) != 0) { result.put("xid", getXid()); } if ((packing_flags & 512) != 0) { result.put("join", getJoin()); } if ((packing_flags & 1024) != 0) { result.put("resume", getResume()); } return result; } }
[ "robbie@apache.org" ]
robbie@apache.org
517f7d500041a7cf524b9b718207f37856a1245c
8be55e32b97524a7cf5d04e93210d4c2d5d0139b
/xmodule2-common-security/src/main/java/com/penglecode/xmodule/common/security/authz/DynamicUrlAccessPermissionHelper.java
24507bc9d4a601074edfd69c5626b58c538bb6a4
[ "Apache-2.0" ]
permissive
lehug/xmodule2
896117d44b33cabcfeefadfcb02044590e725541
2d61df152168d61ee6b27d1c9b7e510426eac66c
refs/heads/master
2020-09-03T05:15:00.532986
2019-10-08T02:14:05
2019-10-08T02:14:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,665
java
package com.penglecode.xmodule.common.security.authz; import java.net.MalformedURLException; import java.net.URL; import java.util.Collection; import javax.servlet.http.HttpServletRequest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.security.access.AccessDeniedException; import org.springframework.security.access.ConfigAttribute; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; import com.penglecode.xmodule.common.exception.ApplicationRuntimeException; import com.penglecode.xmodule.common.util.CollectionUtils; import com.penglecode.xmodule.common.util.SpringWebMvcUtils; import com.penglecode.xmodule.common.util.StringUtils; /** * 动态URL访问权限检测帮助类 * * @author pengpeng * @date 2019年7月26日 上午9:39:05 */ public class DynamicUrlAccessPermissionHelper { private static final Logger LOGGER = LoggerFactory.getLogger(DynamicUrlAccessPermissionHelper.class); private DynamicUrlSecurityMetadataSource securityMetadataSource; private DynamicUrlAccessDecisionManager accessDecisionManager; /** * 判断当前用户是否有权限指定的请求(URL + HttpMethod) * @param request * @return */ public boolean hasAccessPermission(HttpServletRequest request) { Collection<ConfigAttribute> attributes = securityMetadataSource.getAttributes(request); Authentication authenticated = SecurityContextHolder.getContext().getAuthentication(); if (!CollectionUtils.isEmpty(attributes)) { try { accessDecisionManager.decide(authenticated, request, attributes); } catch (AccessDeniedException e) { LOGGER.error(String.format("%s : [url = %s, method = %s]", e.getMessage(), request.getServletPath(), request.getMethod())); return false; } } return true; } /** * 判断当前用户是否有权限指定的请求(URL + HttpMethod) * @param request * @return */ public boolean hasAccessPermission(String url, String method) { HttpServletRequest request = SpringWebMvcUtils.getCurrentHttpServletRequest(); String contextPath = request.getContextPath(); URL urlObj = null; if(!url.toLowerCase().startsWith("http://")) { String requestUrl = request.getRequestURL().toString(); String prefix = requestUrl.substring(0, requestUrl.indexOf('/', "https://".length() + 1)); if(!url.startsWith("/")) { url = "/" + url; } url = prefix + url; } try { urlObj = new URL(url); } catch (MalformedURLException e) { throw new ApplicationRuntimeException(e); } String requestUrl = urlObj.getPath(); if(!StringUtils.isEmpty(contextPath)) { //去掉requestUrl中的contextPath int index = requestUrl.indexOf('/', 1); if(index > 0 && contextPath.equals(requestUrl.substring(0, index))) { requestUrl = requestUrl.substring(index); } } String queryString = urlObj.getQuery(); return hasAccessPermission(new DynamicUrlHttpServletRequest(request, requestUrl, queryString, method)); } protected DynamicUrlSecurityMetadataSource getSecurityMetadataSource() { return securityMetadataSource; } public void setSecurityMetadataSource(DynamicUrlSecurityMetadataSource securityMetadataSource) { this.securityMetadataSource = securityMetadataSource; } protected DynamicUrlAccessDecisionManager getAccessDecisionManager() { return accessDecisionManager; } public void setAccessDecisionManager(DynamicUrlAccessDecisionManager accessDecisionManager) { this.accessDecisionManager = accessDecisionManager; } }
[ "pengp@certusnet.com.cn" ]
pengp@certusnet.com.cn
018e16cccd476d5786c27322341699385eab5a79
9c42651c20d4caf04e0b580e7cf6539213c2dab0
/vap-example/src/main/java/com/vrv/vap/vo/UserVO.java
c428df62a7554bfbec9584fdb12ee1775a39c0bf
[]
no_license
ljh205sy/vap-redis-test
9342a2ccfd3d7d5d03d5061877207791d7f428ca
f373d4ffa7779d0516a573d83ccd849c080ff64c
refs/heads/master
2022-07-22T13:36:43.636552
2020-01-08T08:29:28
2020-01-08T08:29:28
232,495,253
0
0
null
2022-07-07T23:01:03
2020-01-08T06:33:27
Java
UTF-8
Java
false
false
292
java
package com.vrv.vap.vo; import lombok.Data; import javax.validation.constraints.NotBlank; /** * @Author: liujinhui * @Date: 2019/9/11 13:56 */ @Data public class UserVO { @NotBlank(message = "用户名不能为空!!") private String username; private String password; }
[ "liujinhui@vrvmail.com.cn" ]
liujinhui@vrvmail.com.cn
6d03278807ef9353377a3500bbc1078e3bf2514b
963599f6f1f376ba94cbb504e8b324bcce5de7a3
/sources/com/google/android/gms/measurement/internal/zzjg.java
86a74e651374e98fff3fa2e59885bd062880f126
[]
no_license
NikiHard/cuddly-pancake
563718cb73fdc4b7b12c6233d9bf44f381dd6759
3a5aa80d25d12da08fd621dc3a15fbd536d0b3d4
refs/heads/main
2023-04-09T06:58:04.403056
2021-04-20T00:45:08
2021-04-20T00:45:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,117
java
package com.google.android.gms.measurement.internal; import android.os.RemoteException; import android.text.TextUtils; import java.util.Collections; import java.util.concurrent.atomic.AtomicReference; /* compiled from: com.google.android.gms:play-services-measurement-impl@@18.0.0 */ final class zzjg implements Runnable { private final /* synthetic */ AtomicReference zza; private final /* synthetic */ String zzb; private final /* synthetic */ String zzc; private final /* synthetic */ String zzd; private final /* synthetic */ zzn zze; private final /* synthetic */ zzir zzf; zzjg(zzir zzir, AtomicReference atomicReference, String str, String str2, String str3, zzn zzn) { this.zzf = zzir; this.zza = atomicReference; this.zzb = str; this.zzc = str2; this.zzd = str3; this.zze = zzn; } public final void run() { synchronized (this.zza) { try { zzei zzd2 = this.zzf.zzb; if (zzd2 == null) { this.zzf.zzq().zze().zza("(legacy) Failed to get conditional properties; not connected to service", zzeq.zza(this.zzb), this.zzc, this.zzd); this.zza.set(Collections.emptyList()); this.zza.notify(); return; } if (TextUtils.isEmpty(this.zzb)) { this.zza.set(zzd2.zza(this.zzc, this.zzd, this.zze)); } else { this.zza.set(zzd2.zza(this.zzb, this.zzc, this.zzd)); } this.zzf.zzaj(); this.zza.notify(); } catch (RemoteException e) { try { this.zzf.zzq().zze().zza("(legacy) Failed to get conditional properties; remote exception", zzeq.zza(this.zzb), this.zzc, e); this.zza.set(Collections.emptyList()); this.zza.notify(); } catch (Throwable th) { this.zza.notify(); throw th; } } } } }
[ "a.amirovv@mail.ru" ]
a.amirovv@mail.ru
097b8a0df84c407ba39f814b0e137617cefdfa19
40f7c3849fd6a21815cd6a2b4dab3cc355c0d3c6
/src/main/java/com/cmh/dao/RedisDao.java
5414f19f523619fa279176c0224bffeb74b21020
[]
no_license
MoriatyC/OmegaNews
611c07060204682c6f222f520b20b01f00898369
16e2af3887001c378cb62e5427475ee0a18fa35f
refs/heads/master
2021-09-06T06:43:06.659962
2018-02-03T11:07:39
2018-02-03T11:07:39
110,254,333
3
1
null
null
null
null
UTF-8
Java
false
false
2,899
java
package com.cmh.dao; import java.util.Map; import java.util.Set; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.HashOperations; import org.springframework.data.redis.core.SetOperations; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.data.redis.core.ValueOperations; import org.springframework.data.redis.core.ZSetOperations; import org.springframework.data.redis.core.ZSetOperations.TypedTuple; import org.springframework.stereotype.Repository; /** *@author: Menghui Chen *@version: 2018年2月2日下午4:17:14 **/ @SuppressWarnings("rawtypes") @Repository public class RedisDao { @Autowired private StringRedisTemplate redisTemplate; public Object get(String key) { ValueOperations vo = redisTemplate.opsForValue(); Object o = vo.get(key); return o; } public void set(String key, Object value) { ValueOperations vo = redisTemplate.opsForValue(); vo.set(key, value); } public void hset(String key, Map<String, ? extends Object> map) { HashOperations ho = redisTemplate.opsForHash(); ho.putAll(key, map); } public void hsetValue(String key, Object hashKey, Object value) { HashOperations ho = redisTemplate.opsForHash(); ho.put(key, hashKey, value); } public Object hget(String mapName, String key) { HashOperations ho= redisTemplate.opsForHash(); Object o = null; if (ho.hasKey(mapName, key)) { o = ho.get(mapName, key); } return o; } public void sadd(String key, Object o) { SetOperations so = redisTemplate.opsForSet(); so.add(key, o); } public void zadd(String key, Object o, double score) { ZSetOperations zo = redisTemplate.opsForZSet(); zo.add(key, o, score); } public Set getTop(String key, int top) { ZSetOperations zo = redisTemplate.opsForZSet(); Set set = zo.reverseRange(key, 0, top - 1); System.out.println(set.size()); return set; } public void zincrby(String key, String memeber, double score) { ZSetOperations zo = redisTemplate.opsForZSet(); zo.incrementScore(key, "member", score); } public Set<TypedTuple<Object>> zRangeWithScores(String key, int start, int end) { ZSetOperations zo = redisTemplate.opsForZSet(); Set<TypedTuple<Object>> set = zo.rangeWithScores(key, start, end); return set; } public Long zrem(String key, Object... member) { ZSetOperations zo = redisTemplate.opsForZSet(); return zo.remove(key, member); } public Long zRemRangeByRang(String key, int start, int end) { ZSetOperations zo = redisTemplate.opsForZSet(); return zo.removeRange(key, start, end); } }
[ "119889525@qq.com" ]
119889525@qq.com
d84e1b82c762ca009954c63c4860ed489ac02230
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-14462-15-23-NSGA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/platform/wiki/creationjob/internal/WikiCreationJob_ESTest.java
dd217c99bf18a6d5466c8ed143446495d2e8b221
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
581
java
/* * This file was automatically generated by EvoSuite * Fri Apr 03 02:08:29 UTC 2020 */ package org.xwiki.platform.wiki.creationjob.internal; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class WikiCreationJob_ESTest extends WikiCreationJob_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
b73e8de7b31d00b71e260d058c0bbbab88d05822
5756e1853f3d72c1309887a278ecb3fe5ee4cf83
/src/Inheritance/Polymorphism/OverloadingDemo.java
67a425e4689d6b2bd4719dfe6feddc9499fae3bc
[]
no_license
amolujagare123/730Dec2020Java
cab0ccbc1e32f05575a5dda4a3873ad76408a254
b7ad21efbf9c6ef02a8d48cf3408ac19d684da40
refs/heads/master
2023-02-11T17:46:13.872152
2021-01-08T14:40:13
2021-01-08T14:40:13
318,547,216
0
0
null
null
null
null
UTF-8
Java
false
false
1,000
java
package Inheritance.Polymorphism; public class OverloadingDemo { void addition() { int a,b; a= 10; b=20; int c=0; c= a +b ; System.out.println("Addition="+c); } void addition(int a, int b) { int c=0; c= a +b ; System.out.println("Addition="+c); } void addition(int a, int b , int x) { int c=0; c= a +b +x; System.out.println("Addition="+c); } void addition(double a, double b) { double c=0; c= a +b ; System.out.println("Addition="+c); } void addition(String a, String b) { String c=""; c= a +b ; System.out.println("Addition="+c); } public static void main(String[] args) { OverloadingDemo ob = new OverloadingDemo(); ob.addition(); ob.addition(2,3); ob.addition(2.4,5.6); ob.addition(1,1,1); ob.addition("abc","-pqr"); } }
[ "amolujagare@gmail.com" ]
amolujagare@gmail.com
89dd5010d229fce627ebb3b6e467c125d368717d
7b12f67da8c10785efaebe313547a15543a39c77
/jjg-common-db/src/main/java/com/jjg/system/model/form/EsArticleForm.java
959159b97a5869ac81bc06543aa8979fb49a41af
[]
no_license
liujinguo1994/xdl-jjg
071eaa5a8fb566db6b47dbe046daf85dd2b9bcd8
051da0a0dba18e6e5021ecb4ef3debca16b01a93
refs/heads/master
2023-01-06T09:11:30.487559
2020-11-06T14:42:45
2020-11-06T14:42:45
299,525,315
1
3
null
null
null
null
UTF-8
Java
false
false
1,239
java
package com.jjg.member.model.form; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import org.hibernate.validator.constraints.NotBlank; import javax.validation.constraints.NotNull; import java.io.Serializable; /** * <p> * 文章 * </p> * * @author rm 2817512105@qq.com * @since 2019-07-24 */ @Data @ApiModel public class EsArticleForm implements Serializable { private static final long serialVersionUID = 1L; /** * 主键ID */ private Long id; /** * 文章名称 */ @ApiModelProperty(value = "文章名称") @NotBlank(message = "文章名称不能为空") private String articleName; /** * 分类id */ @ApiModelProperty(value = "分类id") @NotNull(message = "分类id不能为空") private Long categoryId; /** * 文章排序 */ @ApiModelProperty(value = "文章排序") private Integer sort; /** * 外链url */ @ApiModelProperty(value = "外链url") private String outsideUrl; /** * 文章内容 */ @ApiModelProperty(value = "文章内容") @NotBlank(message = "文章内容不能为空") private String content; }
[ "344009799@qq.com" ]
344009799@qq.com
2d8b2c98ea9bfb43666916a2a38381708d7af30c
fdcf2af8597b33110799fed80bb7303fbc7c06e2
/flowable04/src/main/java/org/javaboy/flowable03/controller/UserController.java
ab914c2886df9cafa825540b6e772f9087305ad7
[]
no_license
MrDongShan/javaboy-code-samples
82b5ecf245cf14e693ee8e4f14d002572c01f4f2
5e7af1d93a4acc6c50c2ca5ec1e80ee9da42d057
refs/heads/master
2023-07-06T02:48:08.621361
2023-05-14T14:01:53
2023-05-14T14:01:53
245,963,632
0
0
null
null
null
null
UTF-8
Java
false
false
878
java
package org.javaboy.flowable03.controller; import org.javaboy.flowable03.model.RespBean; import org.javaboy.flowable03.model.User; import org.javaboy.flowable03.service.MyUserDetailsService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; /** * @author 江南一点雨 * @微信公众号 江南一点雨 * @网站 http://www.itboyhub.com * @国际站 http://www.javaboy.org * @微信 a_java_boy * @GitHub https://github.com/lenve * @Gitee https://gitee.com/lenve */ @RestController public class UserController { @Autowired MyUserDetailsService userDetailsService; @GetMapping("/users") public RespBean getUsers() { return RespBean.ok("OK",userDetailsService.getAllUsers()); } }
[ "wangsong0210@gmail.com" ]
wangsong0210@gmail.com
691acb0667190508af68f38c9c2cec8bfd9d5c78
3b85db026f3aa749cff2a7ccf8cca2b62246140a
/src/rewriter/com/newrelic/org/dom4j/rule/pattern/DefaultPattern.java
5ca813d24b9ea754ee2f336c6662750ad6cd7fc0
[]
no_license
chenhq/newrelic_ref
9255cf81572d89309a17989c09e42b0d00db126d
792d7c84dd231fec170894b233996c744f8c318d
refs/heads/master
2021-01-10T19:01:40.257458
2014-12-26T08:39:09
2014-12-26T08:39:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,162
java
/* */ package com.newrelic.org.dom4j.rule.pattern; /* */ /* */ import com.newrelic.org.dom4j.Node; /* */ import com.newrelic.org.dom4j.NodeFilter; /* */ import com.newrelic.org.dom4j.rule.Pattern; /* */ /* */ public class DefaultPattern /* */ implements Pattern /* */ { /* */ private NodeFilter filter; /* */ /* */ public DefaultPattern(NodeFilter filter) /* */ { /* 31 */ this.filter = filter; /* */ } /* */ /* */ public boolean matches(Node node) { /* 35 */ return this.filter.matches(node); /* */ } /* */ /* */ public double getPriority() { /* 39 */ return 0.5D; /* */ } /* */ /* */ public Pattern[] getUnionPatterns() { /* 43 */ return null; /* */ } /* */ /* */ public short getMatchType() { /* 47 */ return 0; /* */ } /* */ /* */ public String getMatchesNodeName() { /* 51 */ return null; /* */ } /* */ } /* Location: /home/think/Downloads/newrelic-android-4.120.0/lib/class.rewriter.jar * Qualified Name: com.newrelic.org.dom4j.rule.pattern.DefaultPattern * JD-Core Version: 0.6.2 */
[ "hongqing.chen@gmail.com" ]
hongqing.chen@gmail.com
4f49fce633a79ec467d313cdeb6102d552ecd02c
29acc5b6a535dfbff7c625f5513871ba55554dd2
/aws-java-sdk-elastictranscoder/src/main/java/com/amazonaws/services/elastictranscoder/model/transform/PipelineJsonMarshaller.java
433d8ff8e1286b77e927ad55d14f00163da35746
[ "JSON", "Apache-2.0" ]
permissive
joecastro/aws-sdk-java
b2d25f6a503110d156853836b49390d2889c4177
fdbff1d42a73081035fa7b0f172b9b5c30edf41f
refs/heads/master
2021-01-21T16:52:46.982971
2016-01-11T22:55:28
2016-01-11T22:55:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,989
java
/* * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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.amazonaws.services.elastictranscoder.model.transform; import static com.amazonaws.util.StringUtils.UTF8; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.OutputStreamWriter; import java.io.StringWriter; import java.io.Writer; import java.util.Map; import java.util.List; import com.amazonaws.AmazonClientException; import com.amazonaws.services.elastictranscoder.model.*; import com.amazonaws.transform.Marshaller; import com.amazonaws.util.BinaryUtils; import com.amazonaws.util.StringUtils; import com.amazonaws.util.StringInputStream; import com.amazonaws.util.json.*; /** * PipelineMarshaller */ public class PipelineJsonMarshaller { /** * Marshall the given parameter object, and output to a JSONWriter */ public void marshall(Pipeline pipeline, JSONWriter jsonWriter) { if (pipeline == null) { throw new AmazonClientException( "Invalid argument passed to marshall(...)"); } try { jsonWriter.object(); if (pipeline.getId() != null) { jsonWriter.key("Id").value(pipeline.getId()); } if (pipeline.getArn() != null) { jsonWriter.key("Arn").value(pipeline.getArn()); } if (pipeline.getName() != null) { jsonWriter.key("Name").value(pipeline.getName()); } if (pipeline.getStatus() != null) { jsonWriter.key("Status").value(pipeline.getStatus()); } if (pipeline.getInputBucket() != null) { jsonWriter.key("InputBucket").value(pipeline.getInputBucket()); } if (pipeline.getOutputBucket() != null) { jsonWriter.key("OutputBucket") .value(pipeline.getOutputBucket()); } if (pipeline.getRole() != null) { jsonWriter.key("Role").value(pipeline.getRole()); } if (pipeline.getAwsKmsKeyArn() != null) { jsonWriter.key("AwsKmsKeyArn") .value(pipeline.getAwsKmsKeyArn()); } if (pipeline.getNotifications() != null) { jsonWriter.key("Notifications"); NotificationsJsonMarshaller.getInstance().marshall( pipeline.getNotifications(), jsonWriter); } if (pipeline.getContentConfig() != null) { jsonWriter.key("ContentConfig"); PipelineOutputConfigJsonMarshaller.getInstance().marshall( pipeline.getContentConfig(), jsonWriter); } if (pipeline.getThumbnailConfig() != null) { jsonWriter.key("ThumbnailConfig"); PipelineOutputConfigJsonMarshaller.getInstance().marshall( pipeline.getThumbnailConfig(), jsonWriter); } jsonWriter.endObject(); } catch (Throwable t) { throw new AmazonClientException( "Unable to marshall request to JSON: " + t.getMessage(), t); } } private static PipelineJsonMarshaller instance; public static PipelineJsonMarshaller getInstance() { if (instance == null) instance = new PipelineJsonMarshaller(); return instance; } }
[ "aws@amazon.com" ]
aws@amazon.com
f0648e0936adc0e5fbffe83e13182873bfe40ac4
2ce72bbb3080c50a1b59e3ea8b42d5d17f4b84dd
/src/main/java/com/baidu/adxgate/portal/blog/controller/BlogController.java
e585d0d59cb8e0107d301a5a1d929887dda01c10
[]
no_license
berryjam/web-backend-framework
da9de1a210e332f566417b31e56243fda4e58354
569fd07711678ca33d60c58f3bb41232f2f5b741
refs/heads/master
2021-01-17T11:29:47.083446
2016-04-04T08:00:33
2016-04-04T08:00:33
52,153,062
0
0
null
2016-03-02T04:08:05
2016-02-20T12:50:06
Java
UTF-8
Java
false
false
1,788
java
package com.baidu.adxgate.portal.blog.controller; import com.baidu.adxgate.portal.blog.bo.BlogInfo; import com.baidu.adxgate.portal.blog.service.BlogService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; /** * 博客Controller * * @author huangjinkun. * @date 16/2/20 * @time 下午9:05 */ @Controller @RequestMapping(value = "/portal") public class BlogController { @Autowired private BlogService blogService; private static final Logger LOG = LoggerFactory.getLogger(BlogController.class); private static SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); @RequestMapping(value = "/GetBlog") @ResponseBody public List<BlogInfo> getBlogInfo(@RequestParam("start") int start, @RequestParam("size") int size) throws ParseException { List<BlogInfo> blogs; blogs = blogService.queryBlogs(start, size); // BlogInfo blog1 = new BlogInfo(); // blog1.setTitle("Man must explore, and this is exploration at its greatest"); // blog1.setSubtitle("Problems look mighty small from 150 miles up"); // blog1.setAuthor("berryjam"); // blog1.setCreateTime(format.format(new Date())); // blog1.setModTIme(format.format(new Date())); // blogs.add(blog1); LOG.info("GetBlog:" + blogs); return blogs; } }
[ "berryjamcoding@gmail.com" ]
berryjamcoding@gmail.com
b19922d9c69c773665bcddcc2881547c8eba8a15
59cb1cb8002dda3f50ca21f7ff9497e2956e1310
/Object-oriented programming/src/ApiDocument/StringLengthEx.java
f6c372574452cf82190220b2e7f66dd5c9b72bc4
[]
no_license
park002/JavaBase2
7c6844b1aeaba538f23bbd3c7da4a772fd3ad4fb
716aa71f710074274a17b5558a9f302bd9c469a6
refs/heads/master
2022-12-24T09:41:28.364356
2020-07-21T07:11:57
2020-07-21T07:11:57
234,732,459
4
0
null
2022-12-16T04:28:57
2020-01-18T12:37:05
Java
UHC
Java
false
false
353
java
package ApiDocument; public class StringLengthEx { public static void main(String[] args) { String ssn = "7306241230123"; int length = ssn.length(); System.out.println(length); if (length == 13) { System.out.println("주민번호 자리수가 맞습니다"); } else System.out.println("주민번호 자리수가 틀립니다."); } }
[ "ekem159@naver.com" ]
ekem159@naver.com
c22a052dab0f4c755ecda80395dd499e7bcfbd12
a2448aee5a6ce1ccb8011a55477bffb86f72be45
/src/main/java/hotmath/gwt/hm_mobile/client/event/ShowBookViewEventHandler.java
f9009ab1c569d884da0c7af8e12bcfe71935ace4
[]
no_license
caseyrodgers/cm
2fc41f6a9cdeadb2e41ea565a616590f89ce5359
b3543c59876483d37fb3d178a0e8ffc9345b1741
refs/heads/main
2022-06-22T21:39:07.952550
2022-06-20T16:47:46
2022-06-20T16:47:46
86,354,299
0
0
null
null
null
null
UTF-8
Java
false
false
248
java
package hotmath.gwt.hm_mobile.client.event; import hotmath.gwt.hm_mobile.client.model.BookModel; import com.google.gwt.event.shared.EventHandler; public interface ShowBookViewEventHandler extends EventHandler { void showBook(BookModel book); }
[ "grodgers@gmail.com" ]
grodgers@gmail.com
81e5db7382e1de1293ee2941f89af152157063ec
6889f8f30f36928a2cd8ba880032c855ac1cc66c
/SemplestServiceMSNv8r3/src/com/microsoft/adcenter/v8/TacticChannelReportColumn.java
42979cc0989d03098816f91391791748ceb6bc35
[]
no_license
enterstudio/semplest2
77ceb4fe6d076f8c161d24b510048802cd029b67
44eeade468a78ef647c62deb4cec2bea4318b455
refs/heads/master
2022-12-28T18:35:54.723459
2012-11-20T15:39:09
2012-11-20T15:39:09
86,645,696
0
0
null
2020-10-14T08:14:22
2017-03-30T01:32:35
Roff
UTF-8
Java
false
false
7,437
java
/** * TacticChannelReportColumn.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. */ package com.microsoft.adcenter.v8; public class TacticChannelReportColumn implements java.io.Serializable { private java.lang.String _value_; private static java.util.HashMap _table_ = new java.util.HashMap(); // Constructor protected TacticChannelReportColumn(java.lang.String value) { _value_ = value; _table_.put(_value_,this); } public static final java.lang.String _AccountName = "AccountName"; public static final java.lang.String _AccountNumber = "AccountNumber"; public static final java.lang.String _AccountId = "AccountId"; public static final java.lang.String _TimePeriod = "TimePeriod"; public static final java.lang.String _Tactic = "Tactic"; public static final java.lang.String _Channel = "Channel"; public static final java.lang.String _ThirdPartyCampaign = "ThirdPartyCampaign"; public static final java.lang.String _ThirdPartyAdGroup = "ThirdPartyAdGroup"; public static final java.lang.String _ThirdPartyTerm = "ThirdPartyTerm"; public static final java.lang.String _CampaignName = "CampaignName"; public static final java.lang.String _CampaignId = "CampaignId"; public static final java.lang.String _AdGroupName = "AdGroupName"; public static final java.lang.String _AdGroupId = "AdGroupId"; public static final java.lang.String _Keyword = "Keyword"; public static final java.lang.String _KeywordId = "KeywordId"; public static final java.lang.String _Goal = "Goal"; public static final java.lang.String _Step1Count = "Step1Count"; public static final java.lang.String _Step2Count = "Step2Count"; public static final java.lang.String _Step3Count = "Step3Count"; public static final java.lang.String _Step4Count = "Step4Count"; public static final java.lang.String _Step5Count = "Step5Count"; public static final java.lang.String _Conversions = "Conversions"; public static final java.lang.String _Assists = "Assists"; public static final java.lang.String _Spend = "Spend"; public static final java.lang.String _FunnelConversionRate = "FunnelConversionRate"; public static final java.lang.String _Revenue = "Revenue"; public static final java.lang.String _ReturnOnAdSpend = "ReturnOnAdSpend"; public static final TacticChannelReportColumn AccountName = new TacticChannelReportColumn(_AccountName); public static final TacticChannelReportColumn AccountNumber = new TacticChannelReportColumn(_AccountNumber); public static final TacticChannelReportColumn AccountId = new TacticChannelReportColumn(_AccountId); public static final TacticChannelReportColumn TimePeriod = new TacticChannelReportColumn(_TimePeriod); public static final TacticChannelReportColumn Tactic = new TacticChannelReportColumn(_Tactic); public static final TacticChannelReportColumn Channel = new TacticChannelReportColumn(_Channel); public static final TacticChannelReportColumn ThirdPartyCampaign = new TacticChannelReportColumn(_ThirdPartyCampaign); public static final TacticChannelReportColumn ThirdPartyAdGroup = new TacticChannelReportColumn(_ThirdPartyAdGroup); public static final TacticChannelReportColumn ThirdPartyTerm = new TacticChannelReportColumn(_ThirdPartyTerm); public static final TacticChannelReportColumn CampaignName = new TacticChannelReportColumn(_CampaignName); public static final TacticChannelReportColumn CampaignId = new TacticChannelReportColumn(_CampaignId); public static final TacticChannelReportColumn AdGroupName = new TacticChannelReportColumn(_AdGroupName); public static final TacticChannelReportColumn AdGroupId = new TacticChannelReportColumn(_AdGroupId); public static final TacticChannelReportColumn Keyword = new TacticChannelReportColumn(_Keyword); public static final TacticChannelReportColumn KeywordId = new TacticChannelReportColumn(_KeywordId); public static final TacticChannelReportColumn Goal = new TacticChannelReportColumn(_Goal); public static final TacticChannelReportColumn Step1Count = new TacticChannelReportColumn(_Step1Count); public static final TacticChannelReportColumn Step2Count = new TacticChannelReportColumn(_Step2Count); public static final TacticChannelReportColumn Step3Count = new TacticChannelReportColumn(_Step3Count); public static final TacticChannelReportColumn Step4Count = new TacticChannelReportColumn(_Step4Count); public static final TacticChannelReportColumn Step5Count = new TacticChannelReportColumn(_Step5Count); public static final TacticChannelReportColumn Conversions = new TacticChannelReportColumn(_Conversions); public static final TacticChannelReportColumn Assists = new TacticChannelReportColumn(_Assists); public static final TacticChannelReportColumn Spend = new TacticChannelReportColumn(_Spend); public static final TacticChannelReportColumn FunnelConversionRate = new TacticChannelReportColumn(_FunnelConversionRate); public static final TacticChannelReportColumn Revenue = new TacticChannelReportColumn(_Revenue); public static final TacticChannelReportColumn ReturnOnAdSpend = new TacticChannelReportColumn(_ReturnOnAdSpend); public java.lang.String getValue() { return _value_;} public static TacticChannelReportColumn fromValue(java.lang.String value) throws java.lang.IllegalArgumentException { TacticChannelReportColumn enumeration = (TacticChannelReportColumn) _table_.get(value); if (enumeration==null) throw new java.lang.IllegalArgumentException(); return enumeration; } public static TacticChannelReportColumn fromString(java.lang.String value) throws java.lang.IllegalArgumentException { return fromValue(value); } public boolean equals(java.lang.Object obj) {return (obj == this);} public int hashCode() { return toString().hashCode();} public java.lang.String toString() { return _value_;} public java.lang.Object readResolve() throws java.io.ObjectStreamException { return fromValue(_value_);} 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.EnumSerializer( _javaType, _xmlType); } 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.EnumDeserializer( _javaType, _xmlType); } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(TacticChannelReportColumn.class); static { typeDesc.setXmlType(new javax.xml.namespace.QName("https://adcenter.microsoft.com/v8", "TacticChannelReportColumn")); } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } }
[ "mitch@02200ff9-b5b2-46f0-9171-221b09c08c7b" ]
mitch@02200ff9-b5b2-46f0-9171-221b09c08c7b
dbda4b32c8506f3716f5ceb1d3d2dee229e589cd
80499b84c03b20d7dc31360de06bc907a3342862
/src/main/java/cz/hartrik/sg2/world/ElementArea.java
fce50b9c755cb0742df937a768633634c82bec07
[]
no_license
Hartrik/Sand-Game-2
4d3888af1f6f28e4189debba0abd26816c4328fb
731977b1b01dc1a3d02eecb019fc123c71042952
refs/heads/master
2023-02-04T06:56:09.331492
2023-01-31T21:51:52
2023-01-31T21:51:52
41,304,758
16
2
null
null
null
null
UTF-8
Java
false
false
6,510
java
package cz.hartrik.sg2.world; import cz.hartrik.common.Iterators; import cz.hartrik.common.Pair; import cz.hartrik.common.Point; import cz.hartrik.common.Streams; import cz.hartrik.sg2.tool.Rectangle; import cz.hartrik.sg2.tool.Shape; import java.io.Serializable; import java.util.Arrays; import java.util.Iterator; import java.util.function.Consumer; import java.util.stream.Stream; /** * Třída spravující pole elementů. Pro přístup do pole často umožňuje vedle * <code>int</code> použít i {@link Point}, protože se často používá ve spojení * s {@link Iterator}, {@link Stream} atd... * * @version 2016-06-14 * @author Patrik Harag */ public class ElementArea implements Region, Serializable { private static final long serialVersionUID = 83715083867368_01_001L; public static final float DEFAULT_TEMPERATURE = 0f; private final Element[] elements; private final float[] temperature; private final int width; private final int height; public ElementArea(int width, int height) { this.width = width; this.height = height; this.elements = new Element[width * height]; this.temperature = new float[width * height]; Arrays.fill(temperature, DEFAULT_TEMPERATURE); } public ElementArea(ElementArea elementArea) { this.width = elementArea.width; this.height = elementArea.height; this.elements = elementArea.elements.clone(); this.temperature = elementArea.temperature.clone(); } // rozměry... public final int getHeight() { return height; } public final int getWidth() { return width; } public final boolean valid(final int x, final int y) { return (x > -1) && (y > -1) && (x < width) && (y < height); } public final boolean valid(final Point point) { return valid(point.getX(), point.getY()); } // přístupové metody public final Element get(final int x, final int y) { return elements[(y * width) + x]; } public final Element get(Point point) { return get(point.getX(), point.getY()); } public final void set(final int x, final int y, final Element element) { elements[(y * width) + x] = element; } public final void setTemperature(final int x, final int y, final float t) { temperature[(y * width) + x] = t; } public final void addTemperature(final int x, final int y, final float t) { temperature[(y * width) + x] += t; } public final float getTemperature(final int x, final int y) { return temperature[(y * width) + x]; } public final void set(Point point, Element element) { set(point.getX(), point.getX(), element); } public final void setIfNotNull(int x, int y, Element element) { if (element != null) set(x, y, element); } public final void setIfNotNull(Point point, Element element) { setIfNotNull(point.getX(), point.getX(), element); } public final boolean setIfValid(int x, int y, Element element) { if (valid(x, y)) { set(x, y, element); return true; } else return false; } public final boolean setIfValid(Point point, Element element) { return setIfValid(point.getX(), point.getX(), element); } public final Clip take(Shape shape, int x, int y) { return new Clip(this, shape, x, y); } @Deprecated public final Element[] getElements() { return elements; } @Deprecated public float[] getTemperature() { return temperature; } // různé /** * Metoda je volána processorem před každým cyklem. */ public void nextCycle() { } /** * Metoda je volána po každém zásahu zvenčí - například po převrácení * obsahu, naplnění, kreslení... */ public void refresh() { } @Override public ElementAreaTools<? extends ElementArea> getTools() { return new ElementAreaTools<ElementArea>(this) { @Override public ElementArea empty(int width, int height) { return new ElementArea(width, height); } }; } public Inserter<? extends ElementArea> getInserter() { return new ElementAreaInserter<>(this); } // iterátory... @Override public Iterator<Element> iterator() { return Iterators.iterator(elements); } @Override public Iterator<Point> iteratorPoint() { return new Iterator<Point>() { private int i; @Override public boolean hasNext() { return i < elements.length; } @Override public Point next() { return new Point(i % width, i++ / width); } }; } @Override public Iterator<Pair<Element, Point>> iteratorLabeled() { return new Iterator<Pair<Element, Point>>() { private int i; @Override public boolean hasNext() { return i < elements.length; } @Override public Pair<Element, Point> next() { Element element = elements[i]; return Pair.of(element, Point.of(i % width, i++ / width)); } }; } @Override public Stream<Element> stream() { return Arrays.stream(elements); } @Override public Stream<Point> streamPoint() { return Streams.stream(iteratorPoint()); } @Override public Stream<Pair<Element, Point>> streamLabeled() { return Streams.stream(iteratorLabeled()); } @Override public void forEach(Consumer<? super Element> consumer) { for (Element array1 : elements) { consumer.accept(array1); } } @Override public void forEach(PointElementConsumer<? super Element> consumer) { for (int i = 0; i < elements.length; i++) consumer.accept(elements[i], i % width, i / width); } @Override public void forEachPoint(PointConsumer consumer) { for (int i = 0; i < elements.length; i++) consumer.accept(i % width, i / width); } public Stream<Region> streamLines() { Rectangle rect = new Rectangle(width, height); return rect.streamLines(0, 0).map(line -> take(line, 0, 0)); } public Stream<Region> streamLinesReversed() { Rectangle rect = new Rectangle(width, height); return rect.streamLinesReversed(0, 0).map(line -> take(line, 0, 0)); } }
[ "patrikharag@gmail.com" ]
patrikharag@gmail.com
bd118980be9ad2fe603f39a554ad588ce47ceb43
0d26d715a0e66246d9a88d1ca77637c208089ec4
/fxadmin/src/main/java/com/ylxx/fx/controller/kondor/kondorrv/KonCashTradeController.java
44e17a6b722e5e2cf202ff2878f75760f7998ca5
[]
no_license
lkp7321/sour
ff997625c920ddbc8f8bd05307184afc748c22b7
06ac40e140bad1dc1e7b3590ce099bc02ae065f2
refs/heads/master
2021-04-12T12:18:22.408705
2018-04-26T06:22:26
2018-04-26T06:22:26
126,673,285
2
0
null
null
null
null
UTF-8
Java
false
false
1,887
java
/* * Copyright 2012-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * 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.ylxx.fx.controller.kondor.kondorrv; import javax.annotation.Resource; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import com.ylxx.fx.core.domain.KondorVo; import com.ylxx.fx.service.kondor.kondorrv.IKonCashTradeService; @Controller //@RequestMapping("fx") public class KonCashTradeController { private static final Logger LOGGER = LoggerFactory.getLogger(KonCashTradeController.class); @Resource(name="konCashTradeService") private IKonCashTradeService konCashTradeService; //查询页面数据 @RequestMapping(value="/selAllCashList.do",produces="application/json;charset=UTF-8") @ResponseBody public String selAllCashList(@RequestBody KondorVo kdVo) throws Exception { /*KondorVo kdVo = new KondorVo(); kdVo.setStartDate(" ");// kdVo.setEndDate(" ");// kdVo.setRpcNo(" ");// kdVo.setPageNo(null); kdVo.setPageSize(null);*/ return konCashTradeService.selAllCashList(kdVo.getStartDate(), kdVo.getEndDate(), kdVo.getRpcNo(), kdVo.getPageNo(), kdVo.getPageSize()); } }
[ "lz13037330@163.com" ]
lz13037330@163.com
2540c10986fc917d18c2c6b6f63dd65de09cdfe9
3898d6d186a61e8be3709141d40f7b949ce09d48
/src/main/java/com/cisco/axl/api/_10/LMediaResourceGroupMember.java
31593936a6fb0d725b729922f0931cf65123165d
[]
no_license
dert261/cucmAxlImpl
a155bf1a8694a341fe932f8f601dafadd2a374a1
3000b6e614937d973cd4444a0dd7faf2513f569a
refs/heads/master
2021-01-21T04:19:13.714018
2016-06-29T08:07:29
2016-06-29T08:07:29
54,956,061
0
0
null
null
null
null
UTF-8
Java
false
false
2,075
java
package com.cisco.axl.api._10; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for LMediaResourceGroupMember complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="LMediaResourceGroupMember"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence minOccurs="0"> * &lt;element name="deviceName" type="{http://www.cisco.com/AXL/API/10.0}XFkType" minOccurs="0"/> * &lt;/sequence> * &lt;attribute name="uuid" type="{http://www.cisco.com/AXL/API/10.0}XUUID" /> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "LMediaResourceGroupMember", propOrder = { "deviceName" }) public class LMediaResourceGroupMember { protected XFkType deviceName; @XmlAttribute(name = "uuid") protected String uuid; /** * Gets the value of the deviceName property. * * @return * possible object is * {@link XFkType } * */ public XFkType getDeviceName() { return deviceName; } /** * Sets the value of the deviceName property. * * @param value * allowed object is * {@link XFkType } * */ public void setDeviceName(XFkType value) { this.deviceName = value; } /** * Gets the value of the uuid property. * * @return * possible object is * {@link String } * */ public String getUuid() { return uuid; } /** * Sets the value of the uuid property. * * @param value * allowed object is * {@link String } * */ public void setUuid(String value) { this.uuid = value; } }
[ "v.bozhenkov@obelisk-voip.ru" ]
v.bozhenkov@obelisk-voip.ru
b8037bd4e46fc359b6f3e79218167481c9064fe1
3425f3d8c112eedd88f373017210f4ab83e9be1e
/src/main/java/org/bian/dto/SDEBranchOperationsActivateOutputModelServiceDomainServiceConfigurationRecordServiceDomainServiceAgreement.java
cf195158f31904c32b51bf238143afd030c039f8
[ "Apache-2.0" ]
permissive
bianapis/sd-e-branch-operations-v2.0
da29504c409955b3cee13fd15758133193b41da3
3f46a31ebcca3e3e4c993ea5e59156ca60be9d7e
refs/heads/master
2020-07-11T10:46:07.403788
2019-09-04T10:30:07
2019-09-04T10:30:07
204,516,583
0
0
null
null
null
null
UTF-8
Java
false
false
2,422
java
package org.bian.dto; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.Valid; /** * SDEBranchOperationsActivateOutputModelServiceDomainServiceConfigurationRecordServiceDomainServiceAgreement */ public class SDEBranchOperationsActivateOutputModelServiceDomainServiceConfigurationRecordServiceDomainServiceAgreement { private String serviceDomainServiceAgreementReference = null; private String serviceDomainServiceUserReference = null; private String serviceDomainServiceAgreementTermsandConditions = null; /** * `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::ISO20022andUNCEFACT::Identifier general-info: Reference to the offered service agreement * @return serviceDomainServiceAgreementReference **/ public String getServiceDomainServiceAgreementReference() { return serviceDomainServiceAgreementReference; } public void setServiceDomainServiceAgreementReference(String serviceDomainServiceAgreementReference) { this.serviceDomainServiceAgreementReference = serviceDomainServiceAgreementReference; } /** * `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::ISO20022andUNCEFACT::Identifier general-info: Reference to the user covered by the contract * @return serviceDomainServiceUserReference **/ public String getServiceDomainServiceUserReference() { return serviceDomainServiceUserReference; } public void setServiceDomainServiceUserReference(String serviceDomainServiceUserReference) { this.serviceDomainServiceUserReference = serviceDomainServiceUserReference; } /** * `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Text general-info: Terms and conditions covering the service agreement * @return serviceDomainServiceAgreementTermsandConditions **/ public String getServiceDomainServiceAgreementTermsandConditions() { return serviceDomainServiceAgreementTermsandConditions; } public void setServiceDomainServiceAgreementTermsandConditions(String serviceDomainServiceAgreementTermsandConditions) { this.serviceDomainServiceAgreementTermsandConditions = serviceDomainServiceAgreementTermsandConditions; } }
[ "team1@bian.org" ]
team1@bian.org
ef51bdad18744a4e2ef5d09f1b719ab4d2ac4e90
cb17b20b9cd8d73ede5aa37408604cba045919c9
/gremlin-server/src/test/java/com/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
941f1d11c7dbc515ab3f1b8515d8cff3df150426
[ "Apache-2.0" ]
permissive
gmeral/tinkerpop3
d1b2829215e63cfd63b02fb5899627d2b8d038a0
02ee235c2b79a373cf3e48b0ac39cfd9a35b1dd6
refs/heads/master
2021-01-17T08:09:18.637710
2014-07-03T20:29:04
2014-07-03T20:29:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,523
java
package com.tinkerpop.gremlin.server; import com.tinkerpop.gremlin.driver.Client; import com.tinkerpop.gremlin.driver.Cluster; import com.tinkerpop.gremlin.driver.ResultSet; import com.tinkerpop.gremlin.driver.ser.Serializers; import com.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine; import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TestName; import java.nio.channels.ClosedChannelException; import java.util.HashMap; import java.util.Map; import java.util.concurrent.CompletableFuture; import java.util.stream.Collectors; import java.util.stream.IntStream; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; /** * Integration tests for server-side settings and processing. * * @author Stephen Mallette (http://stephen.genoprime.com) */ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegrationTest { @Rule public TestName name = new TestName(); /** * Configure specific Gremlin Server settings for specific tests. */ @Override public Settings overrideSettings(final Settings settings) { final String nameOfTest = name.getMethodName(); switch (nameOfTest) { case "shouldReceiveFailureTimeOutOnScriptEval": settings.scriptEvaluationTimeout = 200; break; case "shouldReceiveFailureTimeOutOnTotalSerialization": settings.serializedResponseTimeout = 1; break; case "shouldBlockRequestWhenTooBig": settings.maxContentLength = 1024; break; } return settings; } @Test public void shouldReceiveFailureTimeOutOnScriptEval() throws Exception { final Cluster cluster = Cluster.open(); final Client client = cluster.connect(); try { client.submit("Thread.sleep(3000);'some-stuff-that-should not return'").all().join(); fail("Should throw an exception."); } catch (RuntimeException re) { assertTrue(re.getCause().getCause().getMessage().startsWith("Script evaluation exceeded the configured threshold of 200 ms for request")); } finally { cluster.close(); } } @Test public void shouldReceiveFailureTimeOutOnTotalSerialization() throws Exception { final Cluster cluster = Cluster.open(); final Client client = cluster.connect(); try { client.submit("(0..<100000)").all().join(); fail("Should throw an exception."); } catch (RuntimeException re) { assertTrue(re.getCause().getMessage().endsWith("Serialization of the entire response exceeded the serializeResponseTimeout setting")); } finally { cluster.close(); } } @Test public void shouldGarbageCollectPhantomButNotHard() throws Exception { final Cluster cluster = Cluster.open(); final Client client = cluster.connect(); assertEquals(2, client.submit("sum(1,1)").all().join().get(0).getInt()); assertEquals(0, client.submit("def subtract(x,y){x-y};subtract(1,1)").all().join().get(0).getInt()); assertEquals(0, client.submit("subtract(1,1)").all().join().get(0).getInt()); final Map<String, Object> bindings = new HashMap<>(); bindings.put(GremlinGroovyScriptEngine.KEY_REFERENCE_TYPE, GremlinGroovyScriptEngine.REFERENCE_TYPE_PHANTOM); assertEquals(4, client.submit("def multiply(x,y){x*y};multiply(2,2)", bindings).all().join().get(0).getInt()); try { client.submit("multiply(2,2)").all().join().get(0).getInt(); fail("Should throw an exception since reference is phantom."); } catch (RuntimeException re) { } finally { cluster.close(); } } @Test public void shouldReceiveFailureOnBadSerialization() throws Exception { final Cluster cluster = Cluster.create("localhost").serializer(Serializers.JSON_V1D0).build(); final Client client = cluster.connect(); try { client.submit("def class C { def C getC(){return this}}; new C()").all().join(); fail("Should throw an exception."); } catch (RuntimeException re) { assertTrue(re.getCause().getCause().getMessage().startsWith("Error during serialization: Direct self-reference leading to cycle (through reference chain:")); } finally { cluster.close(); } } @Test public void shouldBlockRequestWhenTooBig() throws Exception { final Cluster cluster = Cluster.open(); final Client client = cluster.connect(); try { final String fatty = IntStream.range(0, 1024).mapToObj(String::valueOf).collect(Collectors.joining()); final CompletableFuture<ResultSet> result = client.submitAsync("'" + fatty + "';'test'"); final ResultSet resultSet = result.get(); resultSet.all().get(); fail("Should throw an exception."); } catch (Exception re) { // can't seem to catch the server side exception - as the channel is basically closed on this error // can only detect a closed channel and react to that. in some ways this is a good general piece of // code to have in place, but kinda stinky when you want something specifica about why all went bad assertTrue(re.getCause().getMessage().equals("Error while processing results from channel - check client and server logs for more information")); } finally { cluster.close(); } } @Test public void shouldFailOnDeadHost() throws Exception { final Cluster cluster = Cluster.create("localhost").serializer(Serializers.JSON_V1D0).build(); final Client client = cluster.connect(); // ensure that connection to server is good assertEquals(2, client.submit("1+1").all().join().get(0).getInt()); // kill the server which will make the client mark the host as unavailable this.stopServer(); try { // try to re-issue a request now that the server is down client.submit("1+1").all().join(); fail(); } catch (RuntimeException re) { assertTrue(re.getCause().getCause() instanceof ClosedChannelException); } finally { cluster.close(); } } }
[ "spmva@genoprime.com" ]
spmva@genoprime.com
2ec95dafd5b9d442d5a098906e41015ce0b7bd81
66e2f35b7b56865552616cf400e3a8f5928d12a2
/src/main/java/com/alipay/api/domain/AnttechAiCvTfjsModelQueryModel.java
da916e046239c25e625b77b681c8264186a6f8ac
[ "Apache-2.0" ]
permissive
xiafaqi/alipay-sdk-java-all
18dc797400847c7ae9901566e910527f5495e497
606cdb8014faa3e9125de7f50cbb81b2db6ee6cc
refs/heads/master
2022-11-25T08:43:11.997961
2020-07-23T02:58:22
2020-07-23T02:58:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
917
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * AI认知服务端模型地址查询接口 * * @author auto create * @since 1.0, 2020-02-17 15:03:19 */ public class AnttechAiCvTfjsModelQueryModel extends AlipayObject { private static final long serialVersionUID = 8255182881791822567L; /** * 模型服务code,模型服务唯一标示 */ @ApiField("model_code") private String modelCode; /** * 模型对应版本号 */ @ApiField("model_version") private String modelVersion; public String getModelCode() { return this.modelCode; } public void setModelCode(String modelCode) { this.modelCode = modelCode; } public String getModelVersion() { return this.modelVersion; } public void setModelVersion(String modelVersion) { this.modelVersion = modelVersion; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
df1cdd8b51947bc1ca1b4a24aa6382cf3dec19ed
33d2cb3de7eee7d47dc499a20037ae4f23d28fd0
/packages/apps/Settings/src/com/android/settings/DialogTypePerference.java
6ee40c4b9fa42a25d6d92a744df7003b12a78982
[]
no_license
lvxiaojia/yecon
0e139c9dddac12a71d55184bb10eaa658c3b906f
87658d255c405802d906be389353ef2b2e828d59
refs/heads/master
2020-05-18T05:31:19.781960
2018-06-07T05:11:17
2018-06-07T05:11:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,650
java
package com.android.settings; import android.content.ComponentName; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.ServiceConnection; import android.content.SharedPreferences; import android.os.IBinder; import android.preference.SeekBarDialogPreference; import android.preference.SeekBarPreference; import android.util.AttributeSet; import android.util.Log; import android.view.View; import android.widget.SeekBar; import android.widget.TextView; import com.android.settings.mtksetting.MyBinder; import com.mtksetting.Array; public class DialogTypePerference extends SeekBarDialogPreference implements SeekBar.OnSeekBarChangeListener { private SeekBar mSeekBar; //Begin : Added by vend00102 2012.07.20 private TextView mTextView; private static mtksetting mmtksetting; private Intent serviceIntent; private Context mContext; private int mCurrent; private boolean IsBind = false; private static final String DIALOGTYPE = "dialogtype"; private static final String TAG = "DialogTypePerference"; public DialogTypePerference(Context context, AttributeSet attrs) { super(context, attrs); // TODO Auto-generated constructor stub setDialogLayoutResource(R.layout.preference_dialog_contrast); mContext = context; } private static ServiceConnection serviceConnection = new ServiceConnection() { @Override public void onServiceDisconnected(ComponentName name) { Log.e(TAG, "[Lingling]DialogTypePerference: onServiceDisconnected");//Lingling mmtksetting = null; } @Override public void onServiceConnected(ComponentName name, IBinder service) { MyBinder binder = (MyBinder) service; mmtksetting = binder.getService(); } }; @Override protected void onBindDialogView(View view) { // TODO Auto-generated method stub super.onBindDialogView(view); mSeekBar = getSeekBar(view); mSeekBar.setMax(20); //SharedPreferences setting = getSharedPreferences(); mTextView = (TextView) view.findViewById(R.id.textview); SharedPreferences setting = mContext.getSharedPreferences(Array.MTKSettings,mContext.MODE_PRIVATE); //add by hct for klocwork if(null == setting) { return; } int arg0 = setting.getInt(DIALOGTYPE, 0); mTextView.setText(String.valueOf(arg0)); mSeekBar.setProgress(arg0); mSeekBar.setOnSeekBarChangeListener(this); serviceIntent = new Intent(mContext, mtksetting.class); IsBind=mContext.bindService(serviceIntent, serviceConnection, Context.BIND_AUTO_CREATE); if(IsBind) Log.e(TAG, "[Lingling]DialogTypePerference:onBindDialogView:bindService OK:||IsBind = "+IsBind);//Lingling else Log.e(TAG, "[Lingling]DialogTypePerference:onBindDialogView:bindService FAIL:||IsBind = "+IsBind);//Lingling } public void onProgressChanged(SeekBar seekBar, int progress, boolean fromTouch) { mCurrent = progress; mTextView.setText(String.valueOf(progress)); // if (mmtksetting == null) { // // } else { // seekBar.setProgress(progress); // mmtksetting.DVP_GSetDialogType(progress); // SharedPreferences uiState = mContext.getSharedPreferences(Array.MTKSettings,mContext.MODE_PRIVATE); // SharedPreferences.Editor editor = uiState.edit(); // editor.putInt(DIALOGTYPE, mCurrent); // editor.commit(); // } } @Override protected View onCreateDialogView() { // TODO Auto-generated method stub return super.onCreateDialogView(); } public void onStartTrackingTouch(SeekBar seekBar) { // NA } public void onStopTrackingTouch(SeekBar seekBar) { // NA } @Override protected void onDialogClosed(boolean positiveResult) { super.onDialogClosed(positiveResult); if (positiveResult){ if (mmtksetting == null){ }else{ // mmtksetting.GOpenDVPSet(); mSeekBar.setProgress(mCurrent); mmtksetting.SetDialogType(mCurrent); SharedPreferences uiState = mContext.getSharedPreferences(Array.MTKSettings, mContext.MODE_PRIVATE); SharedPreferences.Editor editor = uiState.edit(); editor.putInt(DIALOGTYPE, mCurrent); editor.commit(); setSummary(Integer.toString(mCurrent)); // mmtksetting.GCloseDVPSet(); } } if(IsBind) { mContext.unbindService(serviceConnection); IsBind = false; Log.e(TAG, "[Lingling]onDialogClosed:unbindService"); }//Lingling } @Override public void onDismiss(DialogInterface dialog) { // TODO Auto-generated method stub super.onDismiss(dialog); } public void SetContrast(int arg0) { mmtksetting.SetDialogType(arg0); } }
[ "275129737@qq.com" ]
275129737@qq.com
8c4e495ebe26aa0dd3c7b080bacf6224c0966c70
8a5fb7f90d874edfadf3e32d4283fdc3c501a8af
/runelite-deobfuscator/src/main/java/net/runelite/asm/attributes/code/instructions/GotoW.java
582e86c48f0f3a64efee6afd0e42497d4fa4030e
[]
no_license
illumineawake/MeteorLite
9ae1a7e541fca900d91a620e4629c311c5d607a1
3660bb4d0bfa96477a586e9642ec97f11ae2f229
refs/heads/main
2023-07-13T11:21:49.282006
2021-08-25T07:23:31
2021-08-25T07:23:31
398,165,027
1
0
null
2021-08-20T05:26:33
2021-08-20T05:26:32
null
UTF-8
Java
false
false
3,037
java
/* * Copyright (c) 2016-2017, Adam <Adam@sigterm.info> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * 2. 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. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER OR 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. */ package net.runelite.asm.attributes.code.instructions; import java.util.Collections; import java.util.List; import net.runelite.asm.attributes.code.Instruction; import net.runelite.asm.attributes.code.InstructionType; import net.runelite.asm.attributes.code.Instructions; import net.runelite.asm.attributes.code.Label; import net.runelite.asm.attributes.code.instruction.types.JumpingInstruction; import net.runelite.asm.execution.Frame; import net.runelite.asm.execution.InstructionContext; import org.objectweb.asm.MethodVisitor; public class GotoW extends Instruction implements JumpingInstruction { private org.objectweb.asm.Label asmlabel; private Label to; public GotoW(Instructions instructions, InstructionType type) { super(instructions, type); } @Override public void accept(MethodVisitor visitor) { assert getJumps().size() == 1; visitor.visitJumpInsn(this.getType().getCode(), getJumps().get(0).getLabel()); } @Override public void resolve() { Instructions ins = this.getInstructions(); to = ins.findLabel(asmlabel); assert to != null; } @Override public InstructionContext execute(Frame frame) { InstructionContext ctx = new InstructionContext(this, frame); frame.jump(ctx, to); return ctx; } @Override public boolean isTerminal() { return true; } @Override public List<Label> getJumps() { return Collections.singletonList(to); } @Override public void setJumps(List<Label> labels) { assert labels.size() == 1; to = labels.get(0); } @Override public void setLabel(org.objectweb.asm.Label label) { asmlabel = label; } }
[ "therealnull@gmail.com" ]
therealnull@gmail.com
4ca4158fa7c3b3a954e8bae87c3f94af0f4a6ed6
12b30aea9a4343eee0dab36b30a6c2bf7d8806ef
/src/main/java/top/zywork/weixin/PayResult.java
f8973aa4570be4dae61252865d254ab81703d19d
[]
no_license
ICLYJ/zywork-common
a9c5054f6f69542aec36e6cfb4f95055c72e5123
12f77dab9370d64d9f7876d0bbf05a2f53dd8dcd
refs/heads/master
2020-06-19T14:06:34.296407
2019-07-08T06:43:26
2019-07-08T06:43:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
922
java
package top.zywork.weixin; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; /** * 微信支付结果对象类<br/> * * 创建于2018-12-04<br/> * * @author 王振宇 * @version 1.0 */ @Data @NoArgsConstructor @AllArgsConstructor @Builder public class PayResult { /** * 业务码 */ private String resultCode; /** * appid */ private String appId; /** * 商户id */ private String mchId; /** * 用户openid */ private String openid; /** * 支付订单号 */ private String transactionId; /** * 商户订单号 */ private String outTradeNo; /** * 支付金额 */ private Integer totalFee; /** * 交易类型 */ private String tradeType; /** * 交易完成时间 */ private String timeEnd; }
[ "847315251@qq.com" ]
847315251@qq.com
3a9b958c09e4dbba9fc3948c70e489841dee667a
9fb7ff7582e57134d5b6f26beced30ef31006b9a
/src/main/java/uk/joshiejack/penguinlib/client/renderer/RenderToolBreak.java
b571d0434b5f367ef62d630a75496bdfa7b70a76
[]
no_license
joshiejack/Harvest-Festival
4febd8c74ef5554c950f877b8d6becc7a8009266
a1772ac9a3f58de40c3de8fe111b30d0752d2e7b
refs/heads/1.12.2
2023-05-03T13:35:54.039007
2021-05-13T05:11:26
2021-05-13T05:11:26
29,319,358
12
6
null
2022-10-19T05:15:23
2015-01-15T21:35:26
Java
UTF-8
Java
false
false
5,656
java
package uk.joshiejack.penguinlib.client.renderer; import com.google.common.collect.ImmutableList; import uk.joshiejack.penguinlib.PenguinLib; import net.minecraft.block.*; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.multiplayer.PlayerControllerMP; import net.minecraft.client.renderer.BlockRendererDispatcher; import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.client.renderer.RenderGlobal; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; import net.minecraftforge.client.event.RenderWorldLastEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.relauncher.Side; import java.util.List; @SuppressWarnings("unused") @Mod.EventBusSubscriber(value = Side.CLIENT, modid = PenguinLib.MOD_ID) public class RenderToolBreak { public interface MultiRender { default boolean drawDamage() { return true; } ImmutableList<BlockPos> getPositions(EntityPlayer player, World world, BlockPos blockPos); } @SuppressWarnings("ConstantConditions") @SubscribeEvent public static void renderExtraBlockBreak(RenderWorldLastEvent event) { Minecraft mc = Minecraft.getMinecraft(); PlayerControllerMP controller = mc.playerController; EntityPlayer player = mc.player; World world = mc.world; ItemStack tool = player.getHeldItemMainhand(); MultiRender render = tool.getItem() instanceof MultiRender ? ((MultiRender)tool.getItem()) : null; if (render != null && tool.getItemDamage() < tool.getMaxDamage()) { Entity renderEntity = mc.getRenderViewEntity(); double distance = controller.getBlockReachDistance(); RayTraceResult rt = renderEntity.rayTrace(distance, event.getPartialTicks()); if (rt != null) { ImmutableList<BlockPos> extraBlocks = render.getPositions(player, world, rt.getBlockPos()); drawSelection(event.getContext(), extraBlocks, player, event.getPartialTicks()); if (render.drawDamage() && controller.getIsHittingBlock()) { drawBlockDamageTexture(mc.renderGlobal, controller, Tessellator.getInstance(), Tessellator.getInstance().getBuffer(), player, event.getPartialTicks(), world, extraBlocks); } } } } private static void drawSelection(RenderGlobal render, ImmutableList<BlockPos> extraBlocks, EntityPlayer player, float ticks) { for (BlockPos pos : extraBlocks) { render.drawSelectionBox(player, new RayTraceResult(new Vec3d(0, 0, 0), EnumFacing.UP, pos), 0, ticks); } } private static void drawBlockDamageTexture(RenderGlobal renderGlobal, PlayerControllerMP controllerMP, Tessellator tessellatorIn, BufferBuilder worldRendererIn, Entity entityIn, float partialTicks, World world, List<BlockPos> blocks) { double d0 = entityIn.lastTickPosX + (entityIn.posX - entityIn.lastTickPosX) * (double) partialTicks; double d1 = entityIn.lastTickPosY + (entityIn.posY - entityIn.lastTickPosY) * (double) partialTicks; double d2 = entityIn.lastTickPosZ + (entityIn.posZ - entityIn.lastTickPosZ) * (double) partialTicks; TextureManager renderEngine = Minecraft.getMinecraft().renderEngine; int progress = (int) (controllerMP.curBlockDamageMP * 10f) - 1; // 0-10 if (progress < 0) { return; } renderEngine.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); renderGlobal.preRenderDamagedBlocks(); worldRendererIn.begin(7, DefaultVertexFormats.BLOCK); worldRendererIn.setTranslation(-d0, -d1, -d2); worldRendererIn.noColor(); for (BlockPos blockpos : blocks) { Block block = world.getBlockState(blockpos).getBlock(); TileEntity te = world.getTileEntity(blockpos); boolean hasBreak = block instanceof BlockChest || block instanceof BlockEnderChest || block instanceof BlockSign || block instanceof BlockSkull; if (!hasBreak) { hasBreak = te != null && te.canRenderBreaking(); } if (!hasBreak) { IBlockState iblockstate = world.getBlockState(blockpos); if (iblockstate.getMaterial() != Material.AIR) { TextureAtlasSprite textureatlassprite = renderGlobal.destroyBlockIcons[progress]; BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher(); blockrendererdispatcher.renderBlockDamage(iblockstate, blockpos, textureatlassprite, world); } } } tessellatorIn.draw(); worldRendererIn.setTranslation(0.0D, 0.0D, 0.0D); renderGlobal.postRenderDamagedBlocks(); } }
[ "joshjackwildman@gmail.com" ]
joshjackwildman@gmail.com
5c7f4f375aff902dead8223fd8b4d20fb72fb5c9
085f5118d2756330ae5b990a0fcc4ef6a70369e1
/src/main/java/org/googlecode/perftrace/schema/ProfiledInfoManagerBuilder.java
20b7b07d8aea59325c78ae2ee24b1d353580abbf
[]
no_license
wsc132/perftrace
8fc4889dfc66855637e95a6fc730ebf41e813748
8bf477d1a98f9172cd8672179dcef333ee9b5d9b
refs/heads/master
2021-01-16T19:15:25.869238
2014-02-18T09:23:58
2014-02-18T09:23:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,773
java
package org.googlecode.perftrace.schema; import java.lang.annotation.Annotation; import java.util.ArrayList; import java.util.List; import org.googlecode.perftrace.aopmatcher.support.JdkRegexpMethodMatcher; import org.googlecode.perftrace.aopmatcher.support.NameMatchMethodMatcher; import org.googlecode.perftrace.aopmatcher.support.annotation.AnnotationMethodMatcher; import org.googlecode.perftrace.schema.PatternType; import org.googlecode.perftrace.schema.PerftraceConfig.PatternConf; import org.googlecode.perftrace.schema.PerftraceConfig.PatternConf.Pelement; import org.googlecode.perftrace.schema.PerftraceConfig.PatternConf.Pelement.Patattr; import org.googlecode.perftrace.schema.PerftraceConfig.PatternConf.Pelement.Profiled; import org.googlecode.perftrace.schema.internal.GlobalSettings; import org.googlecode.perftrace.schema.internal.ProfileInfoManager; import org.googlecode.perftrace.schema.internal.ProfiledHandler; import org.googlecode.perftrace.util.StringUtils; /** * @author zhongfeng * */ public abstract class ProfiledInfoManagerBuilder { /** * @return */ public static ProfileInfoManager buildProfileConfManager( PatternConf patternConf, GlobalSettings globalSettings) { List<ProfiledHandler> handlers = new ArrayList<ProfiledHandler>(); for (Pelement pelement : patternConf.getPelement()) { handlers.add(ProfiledHandlerBuilder.buildProfiledHandler(pelement)); } return new ProfileInfoManager(handlers, globalSettings .getDefaultGlobalProfiled()); } /** * @author zhongfeng * */ public static class ProfiledHandlerBuilder { public static ProfiledHandler buildProfiledHandler(Pelement pelement) { ProfiledHandler handler = new ProfiledHandler(); for (Patattr pattern : pelement.getPatattr()) { if (pattern.getType().equals(PatternType.ANNOTATION)) { handler.getMethodMatcherHandler().addMethodMatcher( buildAnnotationMethodMatcher(pattern)); } if (pattern.getType().equals(PatternType.NAME)) { handler.getMethodMatcherHandler().addMethodMatcher( buildNameMatchMethod(pattern)); } if (pattern.getType().equals(PatternType.REGEX)) { handler.getMethodMatcherHandler().addMethodMatcher( buildJdkRegexMatchMethod(pattern)); } } Profiled prof = pelement.getProfiled(); handler.setProfiled(prof); return handler; } /** * @param pattern * @return */ private static JdkRegexpMethodMatcher buildJdkRegexMatchMethod( Patattr pattern) { JdkRegexpMethodMatcher jdkRegexMethodPointcut = new JdkRegexpMethodMatcher(); for (String p : StringUtils.split(pattern.getValue())) { if (!StringUtils.isBlank(p)) jdkRegexMethodPointcut.setPattern(p); } return jdkRegexMethodPointcut; } /** * @param pattern * @return */ private static NameMatchMethodMatcher buildNameMatchMethod( Patattr pattern) { NameMatchMethodMatcher nameMatchMethodMatcher = new NameMatchMethodMatcher(); for (String mappedName : StringUtils.split(pattern.getValue())) { if (!StringUtils.isBlank(mappedName)) nameMatchMethodMatcher.addMethodName(mappedName); } return nameMatchMethodMatcher; } /** * @param pattern * @return */ @SuppressWarnings("unchecked") private static AnnotationMethodMatcher buildAnnotationMethodMatcher( Patattr pattern) { Class<? extends Annotation> cls = null; try { cls = (Class<? extends Annotation>) Class.forName(StringUtils .strip(pattern.getValue())); } catch (ClassNotFoundException e) { // logger.error("build AnnotationMatchingPointcut error.", // e); throw new RuntimeException(e); } AnnotationMethodMatcher methodMatcher = new AnnotationMethodMatcher( cls); return methodMatcher; } } }
[ "djangofan@163.com" ]
djangofan@163.com
795c680316f92a8a4a370977a14c6c621d29fec4
e0c271f609dce516ee3d063c6d7472ea689442ff
/IEDUWeb/.svn/pristine/79/795c680316f92a8a4a370977a14c6c621d29fec4.svn-base
ebeacd8812db5af43c4c10904b3d8ddf029b59bb
[]
no_license
bym90/Java-Web
d99edb4b61b0daa94abc71f1fcc66e4c9328ce44
74cf88a9e78799b5b5f4191b0d58af28474a9d88
refs/heads/master
2021-01-12T16:14:26.007241
2016-10-26T01:40:01
2016-10-26T01:40:01
71,954,347
0
0
null
null
null
null
UTF-8
Java
false
false
1,055
package com.iedu.anboard; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.iedu.common.IEDUMain; import com.iedu.sql.AnBoardDAO; public class GoodBadProc implements IEDUMain { public String ieduExe(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { String strNo = req.getParameter("no"); String strPage = req.getParameter("nowPage"); String strFlag = req.getParameter("flag"); int no = Integer.parseInt(strNo); int nowPage = Integer.parseInt(strPage); int flag = Integer.parseInt(strFlag); // 데이터베이스 AnBoardDAO dao = new AnBoardDAO(); dao.goodBadProc(no, flag); dao.close(); // 뷰에서는 다시 상세보기로 가야할 것이므로 거기에 필요한 데이터를 // 모델로 전달하자. req.setAttribute("NO", no); req.setAttribute("NOWPAGE", nowPage); return "../IEDU/AnBoard/GoodBadProc.jsp"; } }
[ "qodudals90@naver.com" ]
qodudals90@naver.com
0cba62d01f030403920c680ddb56f2ad0445ed64
1930d97ebfc352f45b8c25ef715af406783aabe2
/src/main/java/com/alipay/api/domain/AlipayBusinessOrderRefundQueryModel.java
f673a3a80159aa62eb728c39029b016da367d7a9
[ "Apache-2.0" ]
permissive
WQmmm/alipay-sdk-java-all
57974d199ee83518523e8d354dcdec0a9ce40a0c
66af9219e5ca802cff963ab86b99aadc59cc09dd
refs/heads/master
2023-06-28T03:54:17.577332
2021-08-02T10:05:10
2021-08-02T10:05:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,035
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-17 17:37:49 */ public class AlipayBusinessOrderRefundQueryModel extends AlipayObject { private static final long serialVersionUID = 4817211699717263197L; /** * 支付宝订单号 */ @ApiField("order_no") private String orderNo; /** * 退款请求号,和退款时的退款请求号refund_request_no保持一致。若该参数为空则认为时整单退款查询,返回订单中所有的退款信息 */ @ApiField("refund_request_no") private String refundRequestNo; public String getOrderNo() { return this.orderNo; } public void setOrderNo(String orderNo) { this.orderNo = orderNo; } public String getRefundRequestNo() { return this.refundRequestNo; } public void setRefundRequestNo(String refundRequestNo) { this.refundRequestNo = refundRequestNo; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
c8bfe36fdc57f71f87bdf8341f8742edc28942d7
c23d6151902d90c01241459c9823772ff58777bb
/loadui-project/loadui-api/src/main/java/com/eviware/loadui/api/statistics/store/Execution.java
0eff6e8eb346b74983402a500d86d18631cbcac0
[]
no_license
nagyist/loadui
ba0969a89241eed6fa2fb7e11fa663178a12a7b4
68e6bc7d444a754ea4dbd45d17e36e2c8cc57484
refs/heads/master
2021-01-17T22:34:23.441939
2014-04-25T15:38:23
2014-04-25T15:38:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,619
java
/* * Copyright 2013 SmartBear Software * * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by the European Commission - subsequent * versions of the EUPL (the "Licence"); * You may not use this work except in compliance with the Licence. * You may obtain a copy of the Licence at: * * http://ec.europa.eu/idabc/eupl * * Unless required by applicable law or agreed to in writing, software distributed under the Licence is * distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the Licence for the specific language governing permissions and limitations * under the Licence. */ package com.eviware.loadui.api.statistics.store; import java.awt.Image; import java.io.File; import java.util.Collection; import java.util.Set; import com.eviware.loadui.api.events.EventFirer; import com.eviware.loadui.api.model.AttributeHolder; import com.eviware.loadui.api.testevents.TestEvent; import com.eviware.loadui.api.testevents.TestEventSourceDescriptor; import com.eviware.loadui.api.testevents.TestEventTypeDescriptor; import com.eviware.loadui.api.traits.Deletable; import com.eviware.loadui.api.traits.Labeled; /** * Represents statistical data gathered during a load test Execution. * * @author dain.nilsson */ public interface Execution extends Labeled.Mutable, EventFirer, AttributeHolder, Deletable { /** * BaseEvent key for notifying that this Execution has been archived. */ public final static String ARCHIVED = Execution.class.getSimpleName() + "@archived"; /** * BaseEvent key for notifying that this Execution has been deleted. */ public final static String ICON = Execution.class.getSimpleName() + "@icon"; /** * Gets the Executions ID. * * @return */ public String getId(); /** * Gets the start time of the test execution, measured as a Unix Timestamp * given in milliseconds. * * @return */ public long getStartTime(); /** * Gets the Track with the specified ID. * * @param trackId * @return */ public Track getTrack( String trackId ); /** * Gets a Collection of the IDs of the contained Tracks. * * @return */ public Collection<String> getTrackIds(); /** * Gets the contained TestEventTypeDescriptors. * * @return */ public Set<TestEventTypeDescriptor> getEventTypes(); /** * Returns the number of TestEvents stored for the Execution, matching any of * the given sources (or all, if no sources are given). * * @param sources * @return */ public int getTestEventCount( TestEventSourceDescriptor... sources ); /** * Returns all stored TestEvents between the given interval, of the given * type. * * @param startTime * @param endTime * @param sources * The label of TestEventSources of TestEvent to filter on, * multiple types gives TestEvents matching any of the types, no * sources given will return all TestEvents. * @return */ public Iterable<TestEvent.Entry> getTestEventRange( long startTime, long endTime, TestEventSourceDescriptor... sources ); /** * Returns all stored TestEvents between the given interval, of the given * type and interpolation level. * * @param startTime * @param endTime * @param interpolationLevel * @param sources * @return */ public Iterable<TestEvent.Entry> getTestEventRange( long startTime, long endTime, int interpolationLevel, TestEventSourceDescriptor... sources ); /** * Returns an Iterable of the TestEvents starting with the TestEvent at the * position indicated by the index parameter (the index is applied after * filtering). When the reversed boolean is true, the iterator will move * backwards through the available TestEvents, returning them in * reverse-chronological order. * * @param index * @param reversed * @param sources * @return */ public Iterable<TestEvent.Entry> getTestEvents( int index, boolean reversed, TestEventSourceDescriptor... sources ); /** * Determines if this execution has been archived or not. * * @return true if execution is archived, false otherwise. */ public boolean isArchived(); /** * Marks execution as archived. */ public void archive(); /** * Gets the length of this execution. */ public long getLength(); /** * Returns a File-object containing the Summary report (serialized * JasperPrint-object) from this Execution. */ public File getSummaryReport(); /** * Returns a image icon. */ public Image getIcon(); /** * Sets an image icon. */ public void setIcon( Image image ); }
[ "maximilian.skog@smartbear.com" ]
maximilian.skog@smartbear.com
1cb85849362bbd4ad031d4beaa9f558b1ec6dbf3
1b7c93420a8c870030cf68babff207dd9b6ebadf
/data-distribution-client/src/main/java/com/data/distribution/netty/cliet/DataDistributionClientHandler.java
a5fde95bbd7d54a2bce409b47791b7e0372a276a
[]
no_license
SANDUO421/data-distribution
dcfa68b4e23f5abe08352cf55b0601307f28340e
87369ce687fce2859858f282c89cc40bb9fb9c2c
refs/heads/master
2020-09-03T09:27:43.023727
2019-11-29T07:51:21
2019-11-29T07:51:21
219,435,623
0
0
null
null
null
null
UTF-8
Java
false
false
1,468
java
package com.data.distribution.netty.cliet; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelId; import io.netty.channel.SimpleChannelInboundHandler; import io.netty.util.AttributeKey; import lombok.extern.slf4j.Slf4j; import java.io.IOException; import java.net.InetSocketAddress; /** * 数据处理 * @author 三多 * @Time 2019/10/15 */ @Slf4j public class DataDistributionClientHandler extends SimpleChannelInboundHandler<String> { @Override protected void channelRead0(ChannelHandlerContext ctx, String msg) throws Exception { ctx.channel().attr(AttributeKey.valueOf("Attribute_key")).set(msg); //System.out.println(msg); log.info(msg); } @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { super.exceptionCaught(ctx, cause); log.info("服务端发生异常【" + cause.getMessage() + "】"); ctx.close(); } @Override public void channelInactive(ChannelHandlerContext ctx) throws Exception, IOException { super.channelInactive(ctx); InetSocketAddress inSocket = (InetSocketAddress) ctx.channel().remoteAddress(); String clientIp = inSocket.getAddress().getHostAddress(); //断开连接时,必须关闭,否则造成资源浪费,并发量很大情况下可能造成宕机 ctx.close(); System.out.println("channelInactive:" + clientIp); } }
[ "sanduo10086@foxmail.com" ]
sanduo10086@foxmail.com
be8e7497606f1393ef345340d153d6b336378e9d
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/31/31_a4cc5ec02671d11a650817382222ff534808621f/ClientConnection/31_a4cc5ec02671d11a650817382222ff534808621f_ClientConnection_t.java
5471597d2d180b51719c134f2dd66ee62b19e4a8
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,629
java
package battlechallenge.server; import java.net.Socket; import java.net.SocketException; import java.util.LinkedList; import java.util.List; import java.util.Map; import battlechallenge.ActionResult; import battlechallenge.CommunicationConstants; import battlechallenge.ShipAction; import battlechallenge.maps.BattleMap; import battlechallenge.network.ConnectionLostException; import battlechallenge.network.NetworkSocket; import battlechallenge.ship.Ship; /** * The Class ClientConnection. */ public class ClientConnection { /** The Socket conn. */ private NetworkSocket socket; /** * Instantiates a new client connection. * * @param conn the connection * @param id the player ID */ public ClientConnection(Socket conn, int id) { if (conn == null) throw new IllegalArgumentException("Socket cannot be null"); socket = new NetworkSocket(conn); setupHandshake(); System.out.println("Client connection confirmed:" + id); } /** * * @return True if the socket is open */ public boolean isOpen() { return socket.isOpen(); } /** * If the game is over, write the result to the player * @param result The String result of the game to write to the player */ public void endGame(String result) { try { socket.writeObject(result); Thread.sleep(CommunicationConstants.SOCKET_WAIT_TIME); } catch (ConnectionLostException e) { /* ignore exceptions */ } catch (InterruptedException e) { /* ignore exceptions */ } kill(); } /** * Kill the client connection */ public void kill() { socket.kill(); } /** * Setup handshake. * * @return true, if successful * @throws ConnectionLostException the connection lost exception */ public boolean setupHandshake() { try { socket.writeObject(CommunicationConstants.REQUEST_HANDSHAKE); socket.writeObject(CommunicationConstants.SERVER_VERSION); // FIXME: make this a timed blocking call String client_version = (String)socket.readObject(1000); if (client_version != null && CommunicationConstants.SUPPORTED_CLIENTS.contains(client_version)) { return true; } else { // TODO: handle unsupported client version. Drop bad player and add another return false; } } catch (ClassCastException e) { // Someone is trying to break our server or, our code is really broken. // TODO: handle invalid input e.printStackTrace(); } catch (ConnectionLostException e) { // TODO: bad client connection. Drop bad player and add another e.printStackTrace(); } return false; } /** * Sets the player credentials. * @param id The id that identifies a player * @param height the height of the board * @param width the width of the board * @return the name of the client if successful, otherwise null * @throws ConnectionLostException the connection was lost throw an exception */ public String setCredentials(int id, int height, int width) { try { socket.writeObject(CommunicationConstants.REQUEST_CREDENTIALS); socket.writeInt(id); socket.writeInt(width); socket.writeInt(height); String client_name = (String)socket.readObject(1000); return client_name; } catch (ClassCastException e) { // Someone is trying to break our server or, our code is really broken. // TODO: handle invalid input e.printStackTrace(); } catch (ConnectionLostException e) { // TODO: bad client connection. Drop bad player and add another } return null; } /** * Tells the client to expect turn parameters then passes * the current list of ships and actionResult list to the client * @param ships the current list of ships as of last turn * @param actionResults list of actionResults from last turn * @return true, if successful * @throws ConnectionLostException a lost connection exception */ public boolean requestTurn(Map<Integer, List<Ship>> ships, Map<Integer, List<ActionResult>> actionResults, BattleMap map) { try { // send command socket.writeObject(CommunicationConstants.REQUEST_DO_TURN); // send current players boats socket.writeObject(ships); // send action results hash table socket.writeObject(actionResults); // send list of structures socket.writeObject(map); return true; } catch (ConnectionLostException e) { System.err.println("Socket Exception: Client disconnected. Disqualifying player and ending game."); } return false; } /** * Gets the coordinates passed by the client at the end of a turn * * @return the list of coordinates returned by the ClientPlayer's doTurn method * @throws ConnectionLostException the connection lost exception */ public List<ShipAction> getTurn() throws ConnectionLostException { try { /* * check to see if something is arrived in time. Otherwise, assume * no input. */ @SuppressWarnings("unchecked") List<ShipAction> temp = (List<ShipAction>)socket.readObject(false); // check that list is not null if (temp == null) return new LinkedList<ShipAction>(); // validate that no ships in returned list are null for (ShipAction c : temp) { if (c == null) return new LinkedList<ShipAction>(); } return temp; } catch (ClassCastException e) { // Someone is trying to break our server or, our code is really broken. // TODO: handle invalid input } catch (ConnectionLostException e) { // TODO: handle invalid input } return new LinkedList<ShipAction>(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
71d11395e9b800777e389f33eb9fa5b1ea60933b
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project59/src/main/java/org/gradle/test/performance59_4/Production59_301.java
b666426a8ef4d955095a8d5800e7e1adb71a35bf
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
305
java
package org.gradle.test.performance59_4; public class Production59_301 extends org.gradle.test.performance15_4.Production15_301 { private final String property; public Production59_301() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
b8741179e4f1c52029aa678da7806db5d1c3e032
d25c1e29faf8afa100c3f8239ab7e85ba2afa310
/src/WaystoMakeaFairArray.java
b1684160b796190b1aa18b00cf828a332fba258a
[]
no_license
pranavacharya/leetcode
0b981891da3b14dbabd3e0dcbba5e55a41bce66f
e0798b9212bf4a65c89f6a35151272263b336338
refs/heads/master
2022-09-12T09:29:38.015114
2022-06-19T22:17:22
2022-06-19T22:17:22
235,647,255
1
0
null
null
null
null
UTF-8
Java
false
false
1,399
java
import java.util.Arrays; public class WaystoMakeaFairArray { public int waysToMakeFair(int[] nums) { int[] suff = new int[nums.length + 1]; int sum = 0; for (int i = suff.length - 2; i >= 0; i = i - 2) { suff[i] = sum + nums[i]; sum = suff[i]; } sum = 0; for (int i = suff.length - 3; i >= 0; i = i - 2) { suff[i] = sum + nums[i]; sum = suff[i]; } int odd = suff[0]; int even = suff[1]; int count = 0; System.out.println(Arrays.toString(suff)); for (int i = 0; i < nums.length; i++) { if ((i + 1) % 2 == 0) { int newEven = even - suff[i] + suff[i + 1]; int newOdd = odd - suff[i + 1] + (suff[i] - nums[i]); if (newEven == newOdd) { count++; } } else { int newOdd = odd - suff[i] + suff[i + 1]; int newEven = even - suff[i + 1] + (suff[i] - nums[i]); if (newEven == newOdd) { count++; } } } return count; } public static void main(String args[]) { WaystoMakeaFairArray wmfa = new WaystoMakeaFairArray(); int[] nums = new int[]{2, 1, 6, 4}; System.out.println(wmfa.waysToMakeFair(nums)); } }
[ "apranav.acharya@gmail.com" ]
apranav.acharya@gmail.com
6de71fa66f89d7397f11b34ab19b921847e475e5
c9cfc6279726394475f59800259f194d349ea8da
/src/com/scholastic/sbam/server/servlets/LinkTypeListServiceImpl.java
47b32f07eb4fa672c5f23a71b43f842ae747c320
[]
no_license
VijayEluri/SBAM-Dev
ce15f813da784fa764c42f8711bc565be6251580
1ba017f990e633112d2bbc94e20ac190f799dee4
refs/heads/master
2020-05-20T11:15:01.750085
2012-02-25T03:19:55
2012-02-25T03:19:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,458
java
package com.scholastic.sbam.server.servlets; import java.util.ArrayList; import java.util.List; import com.extjs.gxt.ui.client.data.LoadConfig; import com.scholastic.sbam.client.services.LinkTypeListService; import com.scholastic.sbam.server.database.codegen.LinkType; import com.scholastic.sbam.server.database.objects.DbLinkType; import com.scholastic.sbam.server.database.util.HibernateUtil; import com.scholastic.sbam.shared.objects.LinkTypeInstance; import com.scholastic.sbam.shared.util.AppConstants; /** * The server side implementation of the RPC service. */ @SuppressWarnings("serial") public class LinkTypeListServiceImpl extends AuthenticatedServiceServlet implements LinkTypeListService { @Override public List<LinkTypeInstance> getLinkTypes(LoadConfig loadConfig) throws IllegalArgumentException { authenticate("list link types"); // SecurityManager.ROLE_CONFIG); HibernateUtil.openSession(); HibernateUtil.startTransaction(); List<LinkTypeInstance> list = new ArrayList<LinkTypeInstance>(); try { // Find only undeleted term types List<LinkType> dbInstances = DbLinkType.findFiltered(null, null, AppConstants.STATUS_ANY_NONE, AppConstants.STATUS_DELETED); for (LinkType dbInstance : dbInstances) { list.add(DbLinkType.getInstance(dbInstance)); } } catch (Exception exc) { exc.printStackTrace(); } HibernateUtil.endTransaction(); HibernateUtil.closeSession(); return list; } }
[ "blacatena@comcast.net" ]
blacatena@comcast.net
9d614f5aa13b35788a36de7c3b602a45fdd7a63c
3c5e0a73867838bc2afbc3b431dcc53ef8ea3af0
/src/com/htsoft/oa/model/admin/BookBorRet.java
fb845dc72af7b467ae55f59feb1d44233de7bd12
[]
no_license
cjp472/crm
5f5d21c9b2307ab5d144ca8a762f374823a950c4
d4a7f4dbf2983f0d3abb38ba0d0a916c08cb0c86
refs/heads/master
2020-03-19T09:48:34.976163
2018-05-05T07:47:27
2018-05-05T07:47:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,550
java
package com.htsoft.oa.model.admin; /* * 北京优创融联科技有限公司 综合客服管理系统 -- http://www.ulane.cn * Copyright (C) 2008-2009 Beijing Ulane Technology Co., LTD */ import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.EqualsBuilder; /** * BookBorRet Base Java Bean, base class for the.oa.model, mapped directly to database table * * Avoid changing this file if not necessary, will be overwritten. * * ��������������� */ public class BookBorRet extends com.htsoft.core.model.BaseModel { protected Long recordId; protected java.util.Date borrowTime; protected java.util.Date returnTime; protected java.util.Date lastReturnTime; protected String borrowIsbn; protected String bookName; protected String registerName; protected String fullname; protected com.htsoft.oa.model.admin.BookSn bookSn; /** * Default Empty Constructor for class BookBorRet */ public BookBorRet () { super(); } /** * Default Key Fields Constructor for class BookBorRet */ public BookBorRet ( Long in_recordId ) { this.setRecordId(in_recordId); } public com.htsoft.oa.model.admin.BookSn getBookSn () { return bookSn; } public void setBookSn (com.htsoft.oa.model.admin.BookSn in_bookSn) { this.bookSn = in_bookSn; } public String getRegisterName() { return registerName; } public void setRegisterName(String registerName) { this.registerName = registerName; } public String getFullname() { return fullname; } public void setFullname(String fullname) { this.fullname = fullname; } /** * * @return Long * @hibernate.id column="recordId" type="java.lang.Long" generator-class="native" */ public Long getRecordId() { return this.recordId; } /** * Set the recordId */ public void setRecordId(Long aValue) { this.recordId = aValue; } /** * * @return Long */ public Long getBookSnId() { return this.getBookSn()==null?null:this.getBookSn().getBookSnId(); } /** * Set the bookSnId */ public void setBookSnId(Long aValue) { if (aValue==null) { bookSn = null; } else if (bookSn == null) { bookSn = new com.htsoft.oa.model.admin.BookSn(aValue); bookSn.setVersion(new Integer(0));//set a version to cheat hibernate only } else { bookSn.setBookSnId(aValue); } } /** * * @return java.util.Date * @hibernate.property column="borrowTime" type="java.util.Date" length="19" not-null="true" unique="false" */ public java.util.Date getBorrowTime() { return this.borrowTime; } /** * Set the borrowTime * @spring.validator type="required" */ public void setBorrowTime(java.util.Date aValue) { this.borrowTime = aValue; } /** * * @return java.util.Date * @hibernate.property column="returnTime" type="java.util.Date" length="19" not-null="true" unique="false" */ public java.util.Date getReturnTime() { return this.returnTime; } /** * Set the returnTime * @spring.validator type="required" */ public void setReturnTime(java.util.Date aValue) { this.returnTime = aValue; } /** * * @return java.util.Date * @hibernate.property column="lastReturnTime" type="java.util.Date" length="19" not-null="false" unique="false" */ public java.util.Date getLastReturnTime() { return this.lastReturnTime; } /** * Set the lastReturnTime */ public void setLastReturnTime(java.util.Date aValue) { this.lastReturnTime = aValue; } /** * * @return String * @hibernate.property column="borrowIsbn" type="java.lang.String" length="128" not-null="true" unique="false" */ public String getBorrowIsbn() { return this.borrowIsbn; } /** * Set the borrowIsbn * @spring.validator type="required" */ public void setBorrowIsbn(String aValue) { this.borrowIsbn = aValue; } /** * * @return String * @hibernate.property column="bookName" type="java.lang.String" length="128" not-null="true" unique="false" */ public String getBookName() { return this.bookName; } /** * Set the bookName * @spring.validator type="required" */ public void setBookName(String aValue) { this.bookName = aValue; } /** * @see java.lang.Object#equals(Object) */ public boolean equals(Object object) { if (!(object instanceof BookBorRet)) { return false; } BookBorRet rhs = (BookBorRet) object; return new EqualsBuilder() .append(this.recordId, rhs.recordId) .append(this.borrowTime, rhs.borrowTime) .append(this.returnTime, rhs.returnTime) .append(this.lastReturnTime, rhs.lastReturnTime) .append(this.borrowIsbn, rhs.borrowIsbn) .append(this.bookName, rhs.bookName) .isEquals(); } /** * @see java.lang.Object#hashCode() */ public int hashCode() { return new HashCodeBuilder(-82280557, -700257973) .append(this.recordId) .append(this.borrowTime) .append(this.returnTime) .append(this.lastReturnTime) .append(this.borrowIsbn) .append(this.bookName) .toHashCode(); } /** * @see java.lang.Object#toString() */ public String toString() { return new ToStringBuilder(this) .append("recordId", this.recordId) .append("borrowTime", this.borrowTime) .append("returnTime", this.returnTime) .append("lastReturnTime", this.lastReturnTime) .append("borrowIsbn", this.borrowIsbn) .append("bookName", this.bookName) .toString(); } }
[ "huyang3868@163.com" ]
huyang3868@163.com
da9909636beecc96bc677c81585a1bec597377b8
f3d8ef54983ed3f1902a360815c14f8426627d71
/src/main/java/com/cqjtu/cssl/config/WebSecurityConfig.java
63275c8700ffae7699c7f85bac14ad632defb7e9
[]
no_license
EslSuwen/cssl
1e97173261f1e276c861576d7400d57e9720279e
b44bb46c9ff55cb242b45bd48fa9889f3c10a5b0
refs/heads/master
2021-06-24T20:59:41.107959
2021-05-28T11:59:22
2021-05-28T11:59:22
226,903,741
3
0
null
2020-08-24T12:25:50
2019-12-09T15:25:59
PLpgSQL
UTF-8
Java
false
false
5,770
java
package com.cqjtu.cssl.config; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.actuate.autoconfigure.security.servlet.EndpointRequest; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.security.crypto.password.NoOpPasswordEncoder; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; import org.springframework.web.cors.CorsConfiguration; import org.springframework.web.cors.CorsConfigurationSource; import org.springframework.web.cors.UrlBasedCorsConfigurationSource; import static org.springframework.http.HttpMethod.*; /** * WebSecurityConfig Spring Security 配置。 在 Spring Boot 2.0 中必须覆盖 authenticationManagerBean () * 方法,否则在 @Autowired authenticationManager 时会报错:Field authenticationManager required a bean of type * 'org.springframework.security.authentication.AuthenticationManager' that could not be found. * 初始化数据中的密码是调用 new BCryptPasswordEncoder ().encode () 方法生成的。 POST\PUT\DELETE 请求需要 "ADMIN" 角色。调用 * hasRole () 方法时应去掉前缀 "ROLE_",方法会自动补充,否则请使用 hasAuthority ()。 * * @author suwen * @date 2020/2/25 上午11:13 */ @Configuration @EnableWebSecurity public class WebSecurityConfig extends WebSecurityConfigurerAdapter { private static final String ROLE_ADMIN = "ADMIN"; @Value("${management.endpoints.web.exposure.include}") private String[] actuatorExposures; /** 放行白名单 */ private static final String[] WHITE_LIST = { // TODO 调试关闭验证 "/**", "/**/*.css,", "/**/*.jpg,", "/**/*.png,", "/**/*.ico,", "/**/*.js", "/**/*.html", "/api-docs", "/swagger-resources/**", "/webjars/**", "/csrf/**", "/api/createImageCode" }; private final JwtAuthenticationEntryPoint unauthorizedHandler; private final SecurityProperties securityProperties; private final UserDetailsService userDetailsService; @Autowired public WebSecurityConfig( JwtAuthenticationEntryPoint unauthorizedHandler, SecurityProperties securityProperties, @Qualifier("userDetailsServiceImpl") UserDetailsService userDetailsService) { this.unauthorizedHandler = unauthorizedHandler; this.securityProperties = securityProperties; this.userDetailsService = userDetailsService; } @Override protected void configure(AuthenticationManagerBuilder auth) throws Exception { auth.userDetailsService(userDetailsService).passwordEncoder(new BCryptPasswordEncoder()); } @Override protected void configure(HttpSecurity http) throws Exception { String authPath = "/auth"; http.cors() .and() .csrf() .disable() .exceptionHandling() .authenticationEntryPoint(unauthorizedHandler) .and() .sessionManagement() .sessionCreationPolicy(SessionCreationPolicy.STATELESS) .and() // don't create session .authorizeRequests() // .requestMatchers(EndpointRequest.to(actuatorExposures)) // .hasRole(ROLE_ADMIN) .requestMatchers(EndpointRequest.toAnyEndpoint()) .permitAll() .antMatchers(securityProperties.getJwt().getAuthenticationPath()) .permitAll() .antMatchers(OPTIONS, "/**") .permitAll() .antMatchers(authPath) .permitAll() .antMatchers(DELETE, "/**") .hasRole(ROLE_ADMIN) .antMatchers(WHITE_LIST) .permitAll() .anyRequest() .authenticated() .and() // Custom JWT based security filter .addFilterBefore( authenticationTokenFilterBean(), UsernamePasswordAuthenticationFilter.class) .headers() .cacheControl(); // disable page caching } @Bean @Override public AuthenticationManager authenticationManagerBean() throws Exception { return super.authenticationManagerBean(); } @Bean public AuthenticationTokenFilter authenticationTokenFilterBean() { return new AuthenticationTokenFilter(); } @Bean public PasswordEncoder passwordEncoder() { return new BCryptPasswordEncoder(); } @Bean CorsConfigurationSource corsConfigurationSource() { CorsConfiguration configuration = new CorsConfiguration(); SecurityProperties.Cors cors = securityProperties.getCors(); configuration.setAllowedOriginPatterns(cors.getAllowedOrigins()); configuration.setAllowedMethods(cors.getAllowedMethods()); configuration.setAllowedHeaders(cors.getAllowedHeaders()); configuration.setAllowCredentials(true); UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); source.registerCorsConfiguration("/**", configuration); return source; } }
[ "577014284@qq.com" ]
577014284@qq.com
064f465567c13cad812e1e10240e76688137438f
11192e2b4de5af51730a29be36ab9af815c10fdd
/common/src/main/java/com/cs/video/MP4Generator.java
4bd248bb5dcaed0840eaafd4359786a6fec1ccac
[]
no_license
Sususuperman/LuanDemo
2627f8508171c804db567d7d526c5352876e8035
51aa8ad4411479b583022a7023471a0502526265
refs/heads/master
2020-03-31T11:15:41.108795
2019-01-14T06:17:15
2019-01-14T06:17:15
152,169,495
0
0
null
null
null
null
UTF-8
Java
false
false
1,787
java
package com.cs.video; public class MP4Generator { /* 压缩数据生成mp4视频 * * outfilename: 最终生成的视频文件,注意扩展名为mp4 * videofilename: 单独录制的yuv420sp格式的视频 * video_size: 视频的桢数量 * source_width: 原始视频的宽度 * source_height: 原始视频的高度 * rotated: 是否需要将原始视频顺时针旋转90度 * width: 目标视频的宽度 * height: 目标视频的高度 * * * audiofilename: 单独录制的格式为pcm的音频 * audio_size: 音频文件的大小 * sample_rate: 音频的采样率,注意因为采用faac,所以最小为8000 * channels: 音频的声道数目. * * * */ public static native int compress(String outfilename, String videofilename, int video_size, int source_width, int source_height, int rotated, int width, int height, String audiofilename, int audio_size, int sample_rate, int channels); /* 已经完成的百分比 */ public static native double ratio(); /* * 给原始yuv420sp生成缩略图 * outfilename: 最终生成的jpeg文件 * image_width: 生成的jpeg的宽度 * image_height: 生成的jpeg的高度 * quality: 生成的图片的质量,0-100. 0 文件大小比较小, 100 图片质量比较高. * index: 取第几桢生成缩略图,0代表第一桢 * yuvfilename: 原始yuv420sp文件 * rotated: 是否需要将原始视频顺时针旋转90度 * source_width: 目标视频的宽度 * source_height: 目标视频的高度 */ public static native int compressToJpeg(String outfilename,int image_width, int image_height, int quality, int index, String yuvfilename, int rotated, int source_width, int source_height); static { System.loadLibrary("mp4Generator"); } }
[ "chaoisgoodman@163.com" ]
chaoisgoodman@163.com
5ea349693e0d85aee74c36fc303eb5b419812d96
284d4339dd34fffa3da0dcdcbfa917af88d0b488
/org.csu.slicing.uml2/src/org/csu/slicing/UML2/Association.java
12acd2f6c2f7aa14bc6d8bb29b8587880614be65
[]
no_license
sunwuliang/SlicingProject2.0
dd9fdca8a547070ff98e4e1561b4dfb0a98f6e1d
6db5bf8d0066c8f2534410561c204e9f4b6fa41d
refs/heads/master
2020-06-02T03:39:23.644691
2014-07-08T17:58:39
2014-07-08T17:58:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,916
java
/** */ package org.csu.slicing.UML2; import org.eclipse.emf.common.util.EList; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Association</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * <ul> * <li>{@link org.csu.slicing.UML2.Association#isIsDerived <em>Is Derived</em>}</li> * <li>{@link org.csu.slicing.UML2.Association#getOwnedEnd <em>Owned End</em>}</li> * <li>{@link org.csu.slicing.UML2.Association#getEndType <em>End Type</em>}</li> * <li>{@link org.csu.slicing.UML2.Association#getMemberEnd <em>Member End</em>}</li> * </ul> * </p> * * @see org.csu.slicing.UML2.UML2Package#getAssociation() * @model * @generated */ public interface Association extends Classifier, Relationship { /** * Returns the value of the '<em><b>Is Derived</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Is Derived</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Is Derived</em>' attribute. * @see #setIsDerived(boolean) * @see org.csu.slicing.UML2.UML2Package#getAssociation_IsDerived() * @model unique="false" ordered="false" * @generated */ boolean isIsDerived(); /** * Sets the value of the '{@link org.csu.slicing.UML2.Association#isIsDerived <em>Is Derived</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Is Derived</em>' attribute. * @see #isIsDerived() * @generated */ void setIsDerived(boolean value); /** * Returns the value of the '<em><b>Owned End</b></em>' containment reference list. * The list contents are of type {@link org.csu.slicing.UML2.Property}. * It is bidirectional and its opposite is '{@link org.csu.slicing.UML2.Property#getOwningAssociation <em>Owning Association</em>}'. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Owned End</em>' containment reference list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Owned End</em>' containment reference list. * @see org.csu.slicing.UML2.UML2Package#getAssociation_OwnedEnd() * @see org.csu.slicing.UML2.Property#getOwningAssociation * @model opposite="owningAssociation" containment="true" * @generated */ EList<Property> getOwnedEnd(); /** * Returns the value of the '<em><b>End Type</b></em>' reference list. * The list contents are of type {@link org.csu.slicing.UML2.Type}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>End Type</em>' reference list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>End Type</em>' reference list. * @see org.csu.slicing.UML2.UML2Package#getAssociation_EndType() * @model required="true" ordered="false" * @generated */ EList<Type> getEndType(); /** * Returns the value of the '<em><b>Member End</b></em>' reference list. * The list contents are of type {@link org.csu.slicing.UML2.Property}. * It is bidirectional and its opposite is '{@link org.csu.slicing.UML2.Property#getAssociation <em>Association</em>}'. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Member End</em>' reference list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Member End</em>' reference list. * @see org.csu.slicing.UML2.UML2Package#getAssociation_MemberEnd() * @see org.csu.slicing.UML2.Property#getAssociation * @model opposite="association" lower="2" * @generated */ EList<Property> getMemberEnd(); } // Association
[ "sunwuliang.student@hotmail.com" ]
sunwuliang.student@hotmail.com
7ff351fcace5dc7c840e5e3aed8361e9606fbfc6
d15f0d388d41e00f146e6c0d5c55e2282ada2af4
/CommonUtils/src/main/java/com/jingewenku/abrahamcaijin/commonutil/CrashHandlerUtils.java
339ab6eb7652f4ea9d492e6b7bf04c54fa0f3b1f
[]
no_license
FPhoenixCorneaE/Ignorance
0ed600d128918c01590c4e236939e185a9d05bce
8737327768d1ab9e5010f6ecca0f3347bae7cbdd
refs/heads/master
2021-08-07T22:35:50.683896
2021-06-16T03:45:01
2021-06-16T03:45:01
95,649,709
2
1
null
null
null
null
UTF-8
Java
false
false
7,373
java
package com.jingewenku.abrahamcaijin.commonutil; import android.content.Context; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.os.Build; import android.os.Environment; import android.os.Looper; import android.util.Log; import android.widget.Toast; import java.io.*; import java.lang.reflect.Field; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashMap; import java.util.Locale; import java.util.Map; /** * @Description:主要功能:UncaughtException处理类,当程序发生Uncaught异常的时候,有该类来接管程序,并记录发送错误报告. * @Prject: CommonUtilLibrary * @Package: com.jingewenku.abrahamcaijin.commonutil * @author: AbrahamCaiJin * @date: 2017年06月01日 10:49 * @Copyright: 个人版权所有 * @Company: * @version: 1.0.0 */ /* * public class AndroidUtilsApplication extends Application { * public void onCreate() { * super.onCreate(); * //崩溃处理 * CrashHandlerUtils crashHandlerUtil = CrashHandlerUtils.getInstance(); * crashHandlerUtil.init(this); * crashHandlerUtil.setCrashTip("很抱歉,程序出现异常,即将退出!"); * } * } */ public class CrashHandlerUtils implements Thread.UncaughtExceptionHandler { public static final String TAG = "CrashHandlerUtils"; //系统默认的UncaughtException处理类 private Thread.UncaughtExceptionHandler mDefaultHandler; //CrashHandler实例 private static CrashHandlerUtils INSTANCE = new CrashHandlerUtils(); //程序的Context对象 private Context mContext; //用来存储设备信息和异常信息 private Map<String, String> infos = new HashMap<>(); //用于格式化日期,作为日志文件名的一部分 private DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss", Locale.CHINA); private String crashTip = "很抱歉,程序出现异常,即将退出!"; public String getCrashTip() { return crashTip; } public void setCrashTip(String crashTip) { this.crashTip = crashTip; } /** * 保证只有一个CrashHandler实例 */ private CrashHandlerUtils() { } /** * 获取CrashHandler实例 ,单例模式 * * @return 单例 */ public static CrashHandlerUtils getInstance() { return INSTANCE; } /** * 初始化 * * @param context 上下文 */ public void init(Context context) { mContext = context; //获取系统默认的UncaughtException处理器 mDefaultHandler = Thread.getDefaultUncaughtExceptionHandler(); //设置该CrashHandler为程序的默认处理器 Thread.setDefaultUncaughtExceptionHandler(this); } /** * 当UncaughtException发生时会转入该函数来处理 * * @param thread 线程 * @param ex 异常 */ @Override public void uncaughtException(Thread thread, Throwable ex) { if (!handleException(ex) && mDefaultHandler != null) { //如果用户没有处理则让系统默认的异常处理器来处理 mDefaultHandler.uncaughtException(thread, ex); } else { try { Thread.sleep(3000); } catch (InterruptedException e) { Log.e(TAG, "error : ", e); e.printStackTrace(); } //退出程序 AppActivityManager.getAppManager().exitApp(); } } /** * 自定义错误处理,收集错误信息 发送错误报告等操作均在此完成. * * @param throwable 异常 * @return true:如果处理了该异常信息;否则返回false. */ private boolean handleException(final Throwable throwable) { if (throwable == null) { return false; } //使用Toast来显示异常信息 new Thread() { @Override public void run() { Looper.prepare(); throwable.printStackTrace(); Toast.makeText(mContext, getCrashTip(), Toast.LENGTH_LONG).show(); Looper.loop(); } }.start(); //收集设备参数信息 collectDeviceInfo(mContext); //保存日志文件 saveCrashInfo2File(throwable); return true; } /** * 收集设备参数信息 * * @param ctx 上下文 */ public void collectDeviceInfo(Context ctx) { try { PackageManager pm = ctx.getPackageManager(); PackageInfo pi = pm.getPackageInfo(ctx.getPackageName(), PackageManager.GET_ACTIVITIES); if (pi != null) { String versionName = pi.versionName == null ? "null" : pi.versionName; String versionCode = pi.versionCode + ""; infos.put("versionName", versionName); infos.put("versionCode", versionCode); } } catch (PackageManager.NameNotFoundException e) { Log.e(TAG, "an error occured when collect package info", e); } Field[] fields = Build.class.getDeclaredFields(); for (Field field : fields) { try { field.setAccessible(true); infos.put(field.getName(), field.get(null).toString()); Log.d(TAG, field.getName() + " : " + field.get(null)); } catch (Exception e) { Log.e(TAG, "an error occured when collect crash info", e); } } } /** * 保存错误信息到文件中 * * @param ex 异常 * @return 返回文件名称, 便于将文件传送到服务器 */ private String saveCrashInfo2File(Throwable ex) { StringBuffer sb = new StringBuffer(); for (Map.Entry<String, String> entry : infos.entrySet()) { String key = entry.getKey(); String value = entry.getValue(); sb.append(key + "=" + value + "\n"); } Writer writer = new StringWriter(); PrintWriter printWriter = new PrintWriter(writer); ex.printStackTrace(printWriter); Throwable cause = ex.getCause(); while (cause != null) { cause.printStackTrace(printWriter); cause = cause.getCause(); } printWriter.close(); String result = writer.toString(); sb.append(result); try { long timestamp = System.currentTimeMillis(); String time = formatter.format(new Date()); String fileName = "crash-" + time + "-" + timestamp + ".log"; if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { String path = Environment.getExternalStorageDirectory().getPath() + "/crash/"; AppLogMessageManager.d("path=" + path); File dir = new File(path); if (!dir.exists()) { dir.mkdirs(); } FileOutputStream fos = new FileOutputStream(path + fileName); fos.write(sb.toString().getBytes()); fos.close(); } return fileName; } catch (Exception e) { Log.e(TAG, "an error occured while writing file...", e); } return null; } }
[ "wangkz@digi123.cn" ]
wangkz@digi123.cn
d54780733cdfd50ca6fd7d822b3cc2092226f991
a087c999bcf6ad4241c5eea6338b32287d127c06
/src/annotation/controller/UserController.java
16e980e34ec0bef53d19440fa089c86dbec1cccb
[]
no_license
songxinjianqwe/SpringTest
66befb96a0c1c4db4ec3b76103265150bc3166a0
0ca5fc506f6532f67507944a0b0bead176f64077
refs/heads/master
2020-07-01T22:07:24.494694
2018-03-02T15:38:25
2018-03-02T15:38:25
74,250,700
0
0
null
null
null
null
UTF-8
Java
false
false
370
java
package annotation.controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import annotation.service.UserService; @Controller public class UserController { @Autowired private UserService service; public void execute(){ System.out.println("UserController execute....."); service.add(); } }
[ "songxinjianzx@163.com" ]
songxinjianzx@163.com
160982a82213cbf34722fa02555c7134aedfc9da
de5373a5b728a65f8826904cea37c25d3c3f6200
/src/java/com/bds/ws/dto/IbEmpresasUsuariosPjDTO.java
57651008195a5e6c7a0761a3b8a245e2a82f5dbf
[]
no_license
duna05/ibdsws
960fd123a4df66c8fb5f68ee7495d363581fda39
abfa12fdadccf171d65b0be835cdd2471004959f
refs/heads/master
2020-05-22T00:45:15.948298
2019-05-11T20:48:47
2019-05-11T20:48:47
186,178,839
0
0
null
null
null
null
UTF-8
Java
false
false
1,980
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 com.bds.ws.dto; import com.bds.ws.model.IbCtasEmpresaUsuarioPj; import com.bds.ws.model.IbEmpresasUsuariosPj; import com.bds.ws.model.IbServiEmpreUsuariosPj; import java.util.List; /** * * @author luis.perez */ public class IbEmpresasUsuariosPjDTO { private IbEmpresasUsuariosPj ibEmpresaUsuarioPj; private List<IbEmpresasUsuariosPj> ibEmpresasUsuariosPj; private List<IbServiEmpreUsuariosPj> ibServiEmpreUsuariosPj; private List<IbCtasEmpresaUsuarioPj> ibCtasEmpresaUsuarioPj; private RespuestaDTO respuesta; public List<IbEmpresasUsuariosPj> getIbEmpresasUsuariosPj() { return ibEmpresasUsuariosPj; } public void setIbEmpresasUsuariosPj(List<IbEmpresasUsuariosPj> ibEmpresasUsuariosPj) { this.ibEmpresasUsuariosPj = ibEmpresasUsuariosPj; } public RespuestaDTO getRespuesta() { return respuesta; } public void setRespuesta(RespuestaDTO respuesta) { this.respuesta = respuesta; } public IbEmpresasUsuariosPj getIbEmpresaUsuarioPj() { return ibEmpresaUsuarioPj; } public void setIbEmpresaUsuarioPj(IbEmpresasUsuariosPj ibEmpresaUsuarioPj) { this.ibEmpresaUsuarioPj = ibEmpresaUsuarioPj; } public List<IbServiEmpreUsuariosPj> getIbServiEmpreUsuariosPj() { return ibServiEmpreUsuariosPj; } public void setIbServiEmpreUsuariosPj(List<IbServiEmpreUsuariosPj> ibServiEmpreUsuariosPj) { this.ibServiEmpreUsuariosPj = ibServiEmpreUsuariosPj; } public List<IbCtasEmpresaUsuarioPj> getIbCtasEmpresaUsuarioPj() { return ibCtasEmpresaUsuarioPj; } public void setIbCtasEmpresaUsuarioPj(List<IbCtasEmpresaUsuarioPj> ibCtasEmpresaUsuarioPj) { this.ibCtasEmpresaUsuarioPj = ibCtasEmpresaUsuarioPj; } }
[ "audra.zapata@delsur.com.ve" ]
audra.zapata@delsur.com.ve
f9106c1acf6885e3fa3b3f0ec6bb451933caae6c
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/15/15_7ab40590f352198d4d8f647707ca575e7a9ebfd5/PassportTest/15_7ab40590f352198d4d8f647707ca575e7a9ebfd5_PassportTest_t.java
c7a82bb2cc5a2811c2eeff4524b61493560a1cab
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,375
java
/********************************************************************** * $Source: /cvsroot/hibiscus/hibiscus/src/de/willuhn/jameica/hbci/gui/action/PassportTest.java,v $ * $Revision: 1.4 $ * $Date: 2005/04/12 23:19:29 $ * $Author: web0 $ * $Locker: $ * $State: Exp $ * * Copyright (c) by willuhn.webdesign * All rights reserved * **********************************************************************/ package de.willuhn.jameica.hbci.gui.action; import java.rmi.RemoteException; import de.willuhn.jameica.gui.Action; import de.willuhn.jameica.gui.GUI; import de.willuhn.jameica.hbci.HBCI; import de.willuhn.jameica.hbci.passport.Passport; import de.willuhn.jameica.hbci.passport.PassportHandle; import de.willuhn.jameica.system.Application; import de.willuhn.logging.Level; import de.willuhn.logging.Logger; import de.willuhn.util.ApplicationException; import de.willuhn.util.I18N; /** * Action, die die Funktionsfaehigkeit eines Passports via oeffnen und schliessen testet. */ public class PassportTest implements Action { /** * Erwartet ein Objekt vom Typ <code>de.willuhn.jameica.hbci.passport.Passport</code>. * @see de.willuhn.jameica.gui.Action#handleAction(java.lang.Object) */ public void handleAction(Object context) throws ApplicationException { final I18N i18n = Application.getPluginLoader().getPlugin(HBCI.class).getResources().getI18N(); if (context == null || !(context instanceof Passport)) throw new ApplicationException(i18n.tr("Bitte whlen Sie ein Sicherheits-Medium aus.")); GUI.getStatusBar().startProgress(); GUI.getStatusBar().setSuccessText(i18n.tr("Teste Sicherheits-Medium...")); final Passport p = (Passport) context; try { GUI.startSync(new Runnable() { public void run() { try { PassportHandle handle = p.getHandle(); handle.open(); handle.close(); // nein, nicht im finally, denn wenn das Oeffnen // fehlschlaegt, ist nichts zum Schliessen da ;) GUI.getStatusBar().setSuccessText(i18n.tr("Sicherheits-Medium erfolgreich getestet.")); } catch (RemoteException e) { String msg = e.getMessage(); if (msg != null && msg.length() > 0) GUI.getStatusBar().setErrorText(i18n.tr("Fehler beim Testen des Sicherheits-Mediums: {0}",msg)); else GUI.getStatusBar().setErrorText(i18n.tr("Fehler beim Testen des Sicherheits-Mediums.")); Logger.warn("error while testing passport: " + e.getMessage()); // BUGZILLA 52 http://www.willuhn.de/bugzilla/show_bug.cgi?id=52 if (Logger.getLevel().equals(Level.DEBUG)) Logger.error("stacktrace for debugging purpose",e); } } }); } finally { GUI.getStatusBar().stopProgress(); } } } /********************************************************************** * $Log: PassportTest.java,v $ * Revision 1.4 2005/04/12 23:19:29 web0 * @B Bug 52 * * Revision 1.3 2005/04/05 21:51:54 web0 * @B Begrenzung aller BLZ-Eingaben auf 8 Zeichen * * Revision 1.2 2004/11/12 18:25:07 willuhn * *** empty log message *** * * Revision 1.1 2004/10/20 12:08:18 willuhn * @C MVC-Refactoring (new Controllers) * **********************************************************************/
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
a7c4fb3b583fbc9ac6576cc7f8e97c04a9ba7323
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
/aliyun-java-sdk-arms/src/main/java/com/aliyuncs/arms/transform/v20190808/UninstallManagedPrometheusResponseUnmarshaller.java
4b8e66ef17d84cca0fcdfb97fa1ed2e7b2851f78
[ "Apache-2.0" ]
permissive
aliyun/aliyun-openapi-java-sdk
a263fa08e261f12d45586d1b3ad8a6609bba0e91
e19239808ad2298d32dda77db29a6d809e4f7add
refs/heads/master
2023-09-03T12:28:09.765286
2023-09-01T09:03:00
2023-09-01T09:03:00
39,555,898
1,542
1,317
NOASSERTION
2023-09-14T07:27:05
2015-07-23T08:41:13
Java
UTF-8
Java
false
false
1,581
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.arms.transform.v20190808; import com.aliyuncs.arms.model.v20190808.UninstallManagedPrometheusResponse; import com.aliyuncs.transform.UnmarshallerContext; public class UninstallManagedPrometheusResponseUnmarshaller { public static UninstallManagedPrometheusResponse unmarshall(UninstallManagedPrometheusResponse uninstallManagedPrometheusResponse, UnmarshallerContext _ctx) { uninstallManagedPrometheusResponse.setRequestId(_ctx.stringValue("UninstallManagedPrometheusResponse.RequestId")); uninstallManagedPrometheusResponse.setData(_ctx.stringValue("UninstallManagedPrometheusResponse.Data")); uninstallManagedPrometheusResponse.setSuccess(_ctx.booleanValue("UninstallManagedPrometheusResponse.Success")); uninstallManagedPrometheusResponse.setMessage(_ctx.stringValue("UninstallManagedPrometheusResponse.Message")); uninstallManagedPrometheusResponse.setCode(_ctx.integerValue("UninstallManagedPrometheusResponse.Code")); return uninstallManagedPrometheusResponse; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
743af68664ed16d78f6b2c4e1c4a0c37488b7628
c885ef92397be9d54b87741f01557f61d3f794f3
/results/Mockito-19/org.mockito.internal.configuration.injection.filter.TypeBasedCandidateFilter/BBC-F0-opt-20/tests/16/org/mockito/internal/configuration/injection/filter/TypeBasedCandidateFilter_ESTest.java
1fde38419538a510c6aae9a752f88b7ca7d70811
[ "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
3,918
java
/* * This file was automatically generated by EvoSuite * Thu Oct 21 16:18:42 GMT 2021 */ package org.mockito.internal.configuration.injection.filter; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import java.lang.reflect.Field; import java.util.ConcurrentModificationException; import java.util.LinkedList; import java.util.List; import java.util.ListIterator; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; import org.mockito.internal.configuration.injection.filter.FinalMockCandidateFilter; import org.mockito.internal.configuration.injection.filter.NameBasedCandidateFilter; import org.mockito.internal.configuration.injection.filter.OngoingInjecter; import org.mockito.internal.configuration.injection.filter.TypeBasedCandidateFilter; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) public class TypeBasedCandidateFilter_ESTest extends TypeBasedCandidateFilter_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { FinalMockCandidateFilter finalMockCandidateFilter0 = new FinalMockCandidateFilter(); TypeBasedCandidateFilter typeBasedCandidateFilter0 = new TypeBasedCandidateFilter(finalMockCandidateFilter0); LinkedList<Object> linkedList0 = new LinkedList<Object>(); List<Object> list0 = linkedList0.subList(0, 0); linkedList0.add((Object) ",%ntOA9U&K"); // Undeclared exception! try { typeBasedCandidateFilter0.filterCandidate(list0, (Field) null, linkedList0); fail("Expecting exception: ConcurrentModificationException"); } catch(ConcurrentModificationException e) { // // no message in exception (getMessage() returned null) // verifyException("java.util.SubList", e); } } @Test(timeout = 4000) public void test1() throws Throwable { FinalMockCandidateFilter finalMockCandidateFilter0 = new FinalMockCandidateFilter(); NameBasedCandidateFilter nameBasedCandidateFilter0 = new NameBasedCandidateFilter(finalMockCandidateFilter0); LinkedList<Object> linkedList0 = new LinkedList<Object>(); ListIterator<Object> listIterator0 = linkedList0.listIterator(); TypeBasedCandidateFilter typeBasedCandidateFilter0 = new TypeBasedCandidateFilter(nameBasedCandidateFilter0); linkedList0.addFirst(listIterator0); // Undeclared exception! try { typeBasedCandidateFilter0.filterCandidate(linkedList0, (Field) null, "org.mockito.internal.configuration.injection.filter.TypeBasedCandidateFilter"); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.mockito.internal.configuration.injection.filter.TypeBasedCandidateFilter", e); } } @Test(timeout = 4000) public void test2() throws Throwable { FinalMockCandidateFilter finalMockCandidateFilter0 = new FinalMockCandidateFilter(); NameBasedCandidateFilter nameBasedCandidateFilter0 = new NameBasedCandidateFilter(finalMockCandidateFilter0); LinkedList<Object> linkedList0 = new LinkedList<Object>(); OngoingInjecter ongoingInjecter0 = nameBasedCandidateFilter0.filterCandidate(linkedList0, (Field) null, "org.mockito.internal.configuration.injection.filter.TypeBasedCandidateFilter"); TypeBasedCandidateFilter typeBasedCandidateFilter0 = new TypeBasedCandidateFilter(nameBasedCandidateFilter0); OngoingInjecter ongoingInjecter1 = typeBasedCandidateFilter0.filterCandidate(linkedList0, (Field) null, ongoingInjecter0); assertNotSame(ongoingInjecter1, ongoingInjecter0); } }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
a92c33d02a7e8b316bec322250defb39cf7387bd
e762bbaed7fd347a50e57ecfafe54c561607d161
/src/main/java/plugins/haesleinhuepf/buttons/Median3DBox.java
f7e911c82b97168ba07c00cf7ba2a3ee9d8deb37
[ "BSD-3-Clause" ]
permissive
marionlouveaux/clicy
3f0bc9f7ee0a4626a6d09c95d16b681843713480
297f4d16e831f4181e323d00e10c36caa0a851e0
refs/heads/master
2022-08-27T11:00:50.909896
2020-05-27T19:46:06
2020-05-27T19:46:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,893
java
package plugins.haesleinhuepf.buttons; import icy.sequence.Sequence; import net.haesleinhuepf.clicy.CLICY; import net.haesleinhuepf.clij.clearcl.ClearCLBuffer; import plugins.adufour.ezplug.*; import plugins.adufour.vars.lang.Var; import plugins.adufour.vars.lang.VarBoolean; import plugins.adufour.vars.lang.VarDouble; import plugins.adufour.vars.lang.VarString; import plugins.haesleinhuepf.AbstractCLIJ2Block; import plugins.haesleinhuepf.Recorder; import plugins.haesleinhuepf.VarClearCLBuffer; import plugins.haesleinhuepf.implementations.generated.CLIJ2_Median3DBoxBlock; import java.util.ArrayList; // this is generated code. See src/test/java/net/haesleinhuepf/clicy/codegenerator for details public class Median3DBox extends EzPlug { AbstractCLIJ2Block plugin = new CLIJ2_Median3DBoxBlock(); @Override public void clean() { // dialog closed ezVar = null; } @Override public void execute() { CLICY clij2 = CLICY.getInstance((String) plugin.inputParameters.get("cl_device").getValue()); Recorder.initRecorder(); Recorder.record("\n// " + plugin.getName() + "\n"); ArrayList<ClearCLBuffer> created = new ArrayList<>(); int count = 0; for (Var var : plugin.inputParameters) { if (var instanceof VarClearCLBuffer) { Sequence sequence = (Sequence) ezVar.get(count).getValue(); ClearCLBuffer buffer = clij2.pushSequence(sequence); String bufferName = Recorder.getBufferNameFromSequenceName(sequence); if (bufferName == null) { Recorder.recordPush(sequence, buffer); } else { String newBufferName = Recorder.niceName("buffer", buffer); Recorder.record(newBufferName + " = " + bufferName +";\n"); } var.setValue(buffer); created.add(((VarClearCLBuffer) var).getValue()); } else { var.setValue(ezVar.get(count).getValue()); } count++; } plugin.run(); for (Var var : plugin.outputParameters) { if (var instanceof VarClearCLBuffer) { ClearCLBuffer buffer = ((VarClearCLBuffer) var).getValue(); created.add(buffer); Sequence sequence = clij2.pullSequence(buffer); Recorder.recordPull(sequence, buffer); addSequence(sequence); } } for (ClearCLBuffer buffer : created) { clij2.release(buffer); } } ArrayList<EzVar> ezVar = null; @Override public void initialize() { ezVar = new ArrayList<>(); for (Var var : plugin.inputParameters) { handleVar(var); } for (Var var : plugin.outputParameters) { handleVar(var); } if (plugin != null && plugin.getDescriptor() != null && plugin.getDescriptor().getDescription() != null) { addEzComponent(new EzLabel(plugin.getDescriptor().getDescription())); } } private void handleVar(Var var) { if (var instanceof VarClearCLBuffer) { EzVarSequence evs = new EzVarSequence(var.getName()); addEzComponent(evs); ezVar.add(evs); } else if (var instanceof VarDouble) { EzVarDouble evs = new EzVarDouble(var.getName()); addEzComponent(evs); ezVar.add(evs); } else if (var instanceof VarBoolean) { EzVarBoolean evs = new EzVarBoolean(var.getName(), ((VarBoolean) var).getDefaultValue()); addEzComponent(evs); ezVar.add(evs); } else if (var instanceof VarString) { EzVarText evs = new EzVarText(var.getName()); addEzComponent(evs); ezVar.add(evs); } } }
[ "rhaase@mpi-cbg.de" ]
rhaase@mpi-cbg.de
71be0ad57bbdd649f7a4c81e712ad27931aab2fe
55ab3ba5d2a8dbc1c6585d2e5965a2d9763640c4
/Android优化大师客户端/AndroidManager/src/com/caigang/process/ui/file/FileCategoryActivity.java
22557cabacd02814bc6eb01901a00cd1420e1df6
[]
no_license
xyn3106/Projects
e81586b1bb4259739cca0f55e969d52389574e6b
4f8589f190e416e0693691ab2827340f82149bd5
refs/heads/master
2021-01-10T01:20:08.599270
2015-10-06T06:12:03
2015-10-06T06:12:03
43,732,901
2
1
null
null
null
null
UTF-8
Java
false
false
331
java
package com.caigang.process.ui.file; import com.caigang.process.R; import android.app.Activity; import android.os.Bundle; public class FileCategoryActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.file_category); } }
[ "wy_ljl@163.com" ]
wy_ljl@163.com
487b142d60f1ca579ac08925e74b9e567b62d0b6
e465358040c4de9d5dc9a3e1e08fa4eb27547810
/asterixdb/asterix-external-data/src/main/java/edu/uci/ics/asterix/external/dataset/adapter/IDatasourceAdapter.java
9403bfe2ed17c619b875cc41739aba1907779636
[]
no_license
zhaosheng-zhang/cdnc
84ff7511b57c260e070fc0f3f1d941f39101116e
bc436a948ab1a7eb5df9857916592c7e7b39798c
refs/heads/master
2016-08-04T18:43:31.480569
2013-10-15T17:29:04
2013-10-15T17:29:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,179
java
/* * Copyright 2009-2013 by The Regents of the University of California * 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 from * * 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 edu.uci.ics.asterix.external.dataset.adapter; import java.io.Serializable; import java.util.Map; import edu.uci.ics.hyracks.algebricks.common.constraints.AlgebricksPartitionConstraint; import edu.uci.ics.hyracks.api.comm.IFrameWriter; import edu.uci.ics.hyracks.api.context.IHyracksTaskContext; /** * A super interface implemented by a data source adapter. An adapter can be a * pull based or push based. This interface provides all common APIs that need * to be implemented by each adapter irrespective of the the kind of * adapter(pull or push). */ public interface IDatasourceAdapter extends Serializable { /** * An adapter can be used to read from an external data source and may also * allow writing to the external data source. This enum type indicates the * kind of operations supported by the adapter. * * @caller Compiler uses this method to assert the validity of an operation * on an external dataset. The type of adapter associated with an * external dataset determines the set of valid operations allowed * on the dataset. */ public enum AdapterType { READ, WRITE, READ_WRITE } /** * Returns the type of adapter indicating if the adapter can be used for * reading from an external data source or writing to an external data * source or can be used for both purposes. * * @Caller: Compiler: The compiler uses this API to verify if an operation * is supported by the adapter. For example, an write query against * an external dataset will not compile successfully if the * external dataset was declared with a read_only adapter. * @see AdapterType * @return */ public AdapterType getAdapterType(); /** * Each adapter instance is configured with a set of parameters that are * key-value pairs. When creating an external or a feed dataset, an adapter * instance is used in conjunction with a set of configuration parameters * for the adapter instance. The configuration parameters are stored * internally with the adapter and can be retrieved using this API. * * @param propertyKey * @return String the value corresponding to the configuration parameter * represented by the key- attributeKey. */ public Object getAdapterProperty(String propertyKey); /** * Configures the IDatasourceAdapter instance. * * @caller Scenario 1) Called during compilation of DDL statement that * creates a Feed dataset and associates the adapter with the * dataset. The (key,value) configuration parameters provided as * part of the DDL statement are collected by the compiler and * passed on to this method. The adapter may as part of * configuration connect with the external data source and determine * the IAType associated with data residing with the external * datasource. * Scenario 2) An adapter instance is created by an ASTERIX operator * that wraps around the adapter instance. The operator, as part of * its initialization invokes the configure method. The (key,value) * configuration parameters are passed on to the operator by the * compiler. Subsequent to the invocation, the wrapping operator * obtains the partition constraints (if any). In addition, in the * case of a read adapter, the wrapping operator obtains the output * ASTERIX type associated with the data that will be output from * the adapter. * @param arguments * A map with key-value pairs that contains the configuration * parameters for the adapter. The arguments are obtained from * the metadata. Recall that the DDL to create an external * dataset or a feed dataset requires using an adapter and * providing all arguments as a set of (key,value) pairs. These * arguments are put into the metadata. */ public void configure(Map<String, Object> arguments) throws Exception; /** * Returns a list of partition constraints. A partition constraint can be a * requirement to execute at a particular location or could be cardinality * constraints indicating the number of instances that need to run in * parallel. example, a IDatasourceAdapter implementation written for data * residing on the local file system of a node cannot run on any other node * and thus has a location partition constraint. The location partition * constraint can be expressed as a node IP address or a node controller id. * In the former case, the IP address is translated to a node controller id * running on the node with the given IP address. * * @Caller The wrapper operator configures its partition constraints from * the constraints obtained from the adapter. */ public AlgebricksPartitionConstraint getPartitionConstraint() throws Exception; /** * Allows the adapter to establish connection with the external data source * expressing intent for data and providing any configuration parameters * required by the external data source for the transfer of data. This * method does not result in any data transfer, but is a prerequisite for * any subsequent data transfer to happen between the external data source * and the adapter. * * @caller This method is called by the wrapping ASTERIX operator that * @param ctx * @throws Exception */ public void initialize(IHyracksTaskContext ctx) throws Exception; /** * Triggers the adapter to begin ingestion of data from the external source. * * @param partition * The adapter could be running with a degree of parallelism. * partition corresponds to the i'th parallel instance. * @param writer * The instance of frame writer that is used by the adapter to * write frame to. Adapter packs the fetched bytes (from external source), * packs them into frames and forwards the frames to an upstream receiving * operator using the instance of IFrameWriter. * @throws Exception */ public void start(int partition, IFrameWriter writer) throws Exception; }
[ "happily84@gmail.com" ]
happily84@gmail.com
0592bf460c49320656488d4c0d82c952445166fd
d3ae635b8a19aa54855b080c69a9bd73d6ba196a
/core/mybatis-generator-systests-mybatis3/src/test/java/mbg/test/mb3/generated/simple/mapper/AwfulTableMapper.java
a0c3255f57641429c3a0b6b6408c445984af72d4
[ "Apache-2.0" ]
permissive
357037959/mg-code
6afd09838997ed27b3f41cc36d8042969f57adec
9f32bc55b8adc7130f15b4e0d060721ceabc1310
refs/heads/master
2021-01-23T03:37:37.088271
2017-05-02T03:03:23
2017-05-02T03:03:23
86,106,318
0
0
null
null
null
null
UTF-8
Java
false
false
1,356
java
package mbg.test.mb3.generated.simple.mapper; import java.util.List; import mbg.test.mb3.generated.simple.model.AwfulTable; public interface AwfulTableMapper { /** * This method was generated by MyBatis Generator. * This method corresponds to the database table awful table * * @mbg.generated Sat Mar 25 03:24:58 CST 2017 */ int deleteByPrimaryKey(Integer customerId); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table awful table * * @mbg.generated Sat Mar 25 03:24:58 CST 2017 */ int insert(AwfulTable record); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table awful table * * @mbg.generated Sat Mar 25 03:24:58 CST 2017 */ AwfulTable selectByPrimaryKey(Integer customerId); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table awful table * * @mbg.generated Sat Mar 25 03:24:58 CST 2017 */ List<AwfulTable> selectAll(); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table awful table * * @mbg.generated Sat Mar 25 03:24:58 CST 2017 */ int updateByPrimaryKey(AwfulTable record); }
[ "357037959@qq.com" ]
357037959@qq.com
e3b19a61376a233ee15d3e51232ad2f1e3146b5b
243eaf02e124f89a21c5d5afa707db40feda5144
/src/unk/com/tencent/mm/protocal/eo.java
f34524a91f6ad3e7f5eee1ee53e11fd5972b4102
[]
no_license
laohanmsa/WeChatRE
e6671221ac6237c6565bd1aae02f847718e4ac9d
4b249bce4062e1f338f3e4bbee273b2a88814bf3
refs/heads/master
2020-05-03T08:43:38.647468
2013-05-18T14:04:23
2013-05-18T14:04:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
558
java
package unk.com.tencent.mm.protocal; import com.tencent.mm.protocal.a.gx; import com.tencent.mm.protocal.a.y; public final class eo extends r implements p { public gx bxf = new gx(); public final int jY() { return 1000000027; } public final int o(byte[] paramArrayOfByte) { this.bxf = gx.bT(paramArrayOfByte); n.a(this, this.bxf.Ov()); return this.bxf.Ov().Cl(); } } /* Location: /home/danghvu/0day/WeChat/WeChat_4.5_dex2jar.jar * Qualified Name: com.tencent.mm.protocal.eo * JD-Core Version: 0.6.2 */
[ "danghvu@gmail.com" ]
danghvu@gmail.com
d530fa17fcde7218f4fe40b29b2b9cfcf3093967
1021641b83f3ed5371ce3d51f2215ee1c58564fb
/app/src/main/java/com/example/schoolbustracking/activities/Model/ParentModel.java
89663064ef4880434f32de835ffc2c8c238cb6a3
[]
no_license
maheshpd/School-Bus-Tracking
ac85c658f528540f3109cee2e5ed445cbdd03d83
e23f6dec08434137e191ea47b66b7aa506986da9
refs/heads/master
2020-04-22T05:28:52.068877
2019-04-07T16:31:26
2019-04-07T16:31:26
170,161,054
0
0
null
null
null
null
UTF-8
Java
false
false
1,682
java
package com.example.schoolbustracking.activities.Model; public class ParentModel { String stname,stclass,stbusno,stparentName,stparentEmail,phone,password; public ParentModel() { } public ParentModel(String stname, String stclass, String stbusno, String stparentName, String stparentEmail, String phone, String password) { this.stname = stname; this.stclass = stclass; this.stbusno = stbusno; this.stparentName = stparentName; this.stparentEmail = stparentEmail; this.phone = phone; this.password = password; } public String getStname() { return stname; } public void setStname(String stname) { this.stname = stname; } public String getStclass() { return stclass; } public void setStclass(String stclass) { this.stclass = stclass; } public String getStbusno() { return stbusno; } public void setStbusno(String stbusno) { this.stbusno = stbusno; } public String getStparentName() { return stparentName; } public void setStparentName(String stparentName) { this.stparentName = stparentName; } public String getStparentEmail() { return stparentEmail; } public void setStparentEmail(String stparentEmail) { this.stparentEmail = stparentEmail; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } }
[ "mahesh223prasad@gmail.com" ]
mahesh223prasad@gmail.com
a51a641efefa9a16f8f9c3d8aa2cab7db4136d59
5ace8dc7f2d454c07aa4a7052e153263034337f6
/subprojects/griffon-validation-core/src/main/java/griffon/plugins/validation/constraints/PropertyConstraintDef.java
f03f11d1457ff21eab83a4f36847bd5c355c1b10
[ "Apache-2.0" ]
permissive
griffon-plugins/griffon-validation-plugin
423c031a36de4922c5b88ec58aded9f60750ab5f
86a5168f5339744bd130b4598f0907e00f294b28
refs/heads/master
2021-07-16T03:55:15.411741
2021-03-02T01:01:11
2021-03-02T01:01:11
30,535,079
0
0
null
null
null
null
UTF-8
Java
false
false
2,400
java
/* * SPDX-License-Identifier: Apache-2.0 * * Copyright 2014-2021 The author and/or original authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package griffon.plugins.validation.constraints; import griffon.annotations.core.Nonnull; import java.util.ArrayList; import java.util.List; import static griffon.util.GriffonNameUtils.requireNonBlank; import static java.util.Collections.unmodifiableList; import static java.util.Objects.requireNonNull; /** * @author Andres Almiray */ public final class PropertyConstraintDef { private final String name; private final List<ConstraintDef> constraints = new ArrayList<>(); public PropertyConstraintDef(@Nonnull String name, @Nonnull List<ConstraintDef> constraints) { this.name = requireNonBlank(name, "Argument 'name' must not be blank"); this.constraints.addAll(requireNonNull(constraints, "Argument 'constraints' mut not be null")); } @Nonnull public String getName() { return name; } @Nonnull public List<ConstraintDef> getConstraints() { return unmodifiableList(constraints); } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; PropertyConstraintDef that = (PropertyConstraintDef) o; return name.equals(that.name) && constraints.equals(that.constraints); } @Override public int hashCode() { int result = name.hashCode(); result = 31 * result + constraints.hashCode(); return result; } @Override public String toString() { final StringBuilder sb = new StringBuilder("PropertyConstraintDef{"); sb.append("name='").append(name).append('\''); sb.append(", constraints=").append(constraints); sb.append('}'); return sb.toString(); } }
[ "aalmiray@gmail.com" ]
aalmiray@gmail.com
fc0a2c431293d29922c404502115934367e7e161
718e7e2358354c41e29e1d70527f62d5edd023c4
/src/test/java/io/fintechlabs/testframework/condition/client/CreateRandomFAPIInteractionId_UnitTest.java
117a7609156fcf5aaf9c53c37ed5ff5a45a8638a
[ "MIT" ]
permissive
hkj123/ob-security-conformance-suite-deprecated-master
f4071183d614bcc7abee9a0d067a9f3fc9768cbc
afa57d7d4d1399a6f869cf3dca08a0464b48a616
refs/heads/master
2022-06-06T15:41:03.902881
2019-12-10T02:53:51
2019-12-10T02:53:51
226,053,989
0
0
NOASSERTION
2022-05-20T21:17:26
2019-12-05T08:34:23
Java
UTF-8
Java
false
false
1,168
java
package io.fintechlabs.testframework.condition.client; import static org.assertj.core.api.Assertions.assertThat; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.Spy; import org.mockito.runners.MockitoJUnitRunner; import io.fintechlabs.testframework.condition.Condition.ConditionResult; import io.fintechlabs.testframework.logging.TestInstanceEventLog; import io.fintechlabs.testframework.testmodule.Environment; @RunWith(MockitoJUnitRunner.class) public class CreateRandomFAPIInteractionId_UnitTest { @Spy private Environment env = new Environment(); @Mock private TestInstanceEventLog eventLog; private CreateRandomFAPIInteractionId cond; @Before public void setUp() throws Exception { cond = new CreateRandomFAPIInteractionId("UNIT-TEST", eventLog, ConditionResult.INFO); } /** * Test method for {@link io.fintechlabs.testframework.condition.CreateRandomInteractionId#evaluate(io.fintechlabs.testframework.testmodule.Environment). */ @Test public void testEvaluate() { cond.evaluate(env); assertThat(env.getString("fapi_interaction_id")).isNotNull(); } }
[ "190916516@qq.com" ]
190916516@qq.com
ad1cb29bfb4e9d8e1a58446baea41d74f6044909
00b766cca8c8a799ad4f0ba0976d7ae8f0a79cfd
/de.tum.in.opcua.server/src/main/java/de/tum/in/opcua/server/basic/nodes/Floor.java
2c10c98b722d4396fccd62d22f76aead6ed03ac2
[]
no_license
amitjoy/opcua4j-osgi
594f1fd730214ff7ea2ccaf8df3b5a83d09b7d28
dfbc78f30177ca590cef81880c08b1f4b14174fc
refs/heads/master
2021-01-10T13:44:31.574650
2015-11-02T06:36:38
2015-11-02T06:36:38
45,376,417
1
0
null
null
null
null
UTF-8
Java
false
false
1,916
java
package de.tum.in.opcua.server.basic.nodes; import java.util.List; import de.tum.in.opcua.server.annotation.AnnotationNodeManager; import de.tum.in.opcua.server.annotation.Description; import de.tum.in.opcua.server.annotation.DisplayName; import de.tum.in.opcua.server.annotation.ID; import de.tum.in.opcua.server.annotation.Property; import de.tum.in.opcua.server.annotation.UaNode; @UaNode public class Floor { /** * level of the floor */ @ID private int level; /** * name of the floor */ @DisplayName private String name; /** * description to the floor */ @Description private String description; @Property private Boolean fireDoor; private List<Room> rooms; /** * empty constructor is mandatory when using {@link AnnotationNodeManager} */ public Floor() { } /** * @param level * @param name * @param description */ public Floor(int level, String name, String description, Boolean fireDoor) { this.level = level; this.name = name; this.description = description; this.fireDoor = fireDoor; } /** * @return the level */ public int getLevel() { return level; } /** * @param level * the level to set */ public void setLevel(int level) { this.level = level; } /** * @return the name */ public String getName() { return name; } /** * @param name * the name to set */ public void setName(String name) { this.name = name; } /** * @return the description */ public String getDescription() { return description; } /** * @param description * the description to set */ public void setDescription(String description) { this.description = description; } /** * @return the rooms */ public List<Room> getRooms() { return rooms; } /** * @param rooms * the rooms to set */ public void setRooms(List<Room> rooms) { this.rooms = rooms; } }
[ "admin@amitinside.com" ]
admin@amitinside.com
d33899301134e22369439a42d10adb34f489a89e
22d6a5ece092b379acdc354790b3214216c4d33e
/siscar.services/.apt_generated/ciat/siscarMobile/services/jaxws/ConsultCostCentersResponse.java
7e3c7e1f034c50411ba4dfda3537734c6be68cc0
[]
no_license
josealvarohincapie/carritos
82dd4927b4fab38ce6f393eebcdcf54da4eada85
b60ff02175facdbbd2ebc441a24e460200a18dd9
refs/heads/master
2021-01-25T04:08:59.955637
2015-03-04T03:44:59
2015-03-04T03:44:59
32,355,348
0
1
null
null
null
null
UTF-8
Java
false
false
1,047
java
package ciat.siscarMobile.services.jaxws; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; @XmlRootElement(name = "consultCostCentersResponse", namespace = "http://services.siscarMobile.ciat/") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "consultCostCentersResponse", namespace = "http://services.siscarMobile.ciat/") public class ConsultCostCentersResponse { @XmlElement(name = "return", namespace = "") private geniar.siscar.model.VOModel _return; /** * * @return * returns VOModel */ public geniar.siscar.model.VOModel getReturn() { return this._return; } /** * * @param _return * the value for the _return property */ public void setReturn(geniar.siscar.model.VOModel _return) { this._return = _return; } }
[ "alvarohincapie@gmail.com@cf57b016-9254-9918-2bcb-82f70f16b22d" ]
alvarohincapie@gmail.com@cf57b016-9254-9918-2bcb-82f70f16b22d
9ab213843796261ca166cf06009b7c2030065752
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/neo4j/2018/4/TransactionDependenciesResolver.java
1ecfb14d2f442ff8472b6b46eddd0d0c3ac00ff9
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
7,220
java
/* * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.kernel.enterprise.builtinprocs; import org.apache.commons.lang3.StringUtils; import java.util.ArrayDeque; import java.util.Collections; import java.util.Comparator; import java.util.Deque; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.StringJoiner; import java.util.TreeSet; import java.util.function.Function; import org.neo4j.kernel.api.KernelTransactionHandle; import org.neo4j.kernel.api.query.QuerySnapshot; import org.neo4j.kernel.impl.locking.ActiveLock; import org.neo4j.storageengine.api.lock.ResourceType; import static java.util.function.Function.identity; import static java.util.stream.Collectors.toList; import static java.util.stream.Collectors.toMap; public class TransactionDependenciesResolver { private final Map<KernelTransactionHandle,List<QuerySnapshot>> handleSnapshotsMap; private Map<KernelTransactionHandle,Set<KernelTransactionHandle>> directDependencies; TransactionDependenciesResolver( Map<KernelTransactionHandle,List<QuerySnapshot>> handleSnapshotsMap ) { this.handleSnapshotsMap = handleSnapshotsMap; this.directDependencies = initDirectDependencies(); } public boolean isBlocked( KernelTransactionHandle handle ) { return directDependencies.get( handle ) != null; } public String describeBlockingTransactions( KernelTransactionHandle handle ) { Set<KernelTransactionHandle> allBlockers = new TreeSet<>( Comparator.comparingLong( KernelTransactionHandle::getUserTransactionId ) ); Set<KernelTransactionHandle> handles = directDependencies.get( handle ); if ( handles != null ) { Deque<KernelTransactionHandle> blockerQueue = new ArrayDeque<>( handles ); while ( !blockerQueue.isEmpty() ) { KernelTransactionHandle transactionHandle = blockerQueue.pop(); if ( allBlockers.add( transactionHandle ) ) { Set<KernelTransactionHandle> transactionHandleSet = directDependencies.get( transactionHandle ); if ( transactionHandleSet != null ) { blockerQueue.addAll( transactionHandleSet ); } } } } return describe( allBlockers ); } public Map<String,Object> describeBlockingLocks( KernelTransactionHandle handle ) { List<QuerySnapshot> querySnapshots = handleSnapshotsMap.get( handle ); if ( !querySnapshots.isEmpty() ) { return querySnapshots.get( 0 ).resourceInformation(); } return Collections.emptyMap(); } private Map<KernelTransactionHandle,Set<KernelTransactionHandle>> initDirectDependencies() { Map<KernelTransactionHandle, Set<KernelTransactionHandle>> directDependencies = new HashMap<>(); Map<KernelTransactionHandle,List<ActiveLock>> transactionLocksMap = handleSnapshotsMap.keySet().stream() .collect( toMap( identity(), getTransactionLocks() ) ); for ( Map.Entry<KernelTransactionHandle,List<QuerySnapshot>> entry : handleSnapshotsMap.entrySet() ) { List<QuerySnapshot> querySnapshots = entry.getValue(); if ( !querySnapshots.isEmpty() ) { KernelTransactionHandle txHandle = entry.getKey(); evaluateDirectDependencies( directDependencies, transactionLocksMap, txHandle, querySnapshots.get( 0 ) ); } } return directDependencies; } private Function<KernelTransactionHandle,List<ActiveLock>> getTransactionLocks() { return transactionHandle -> transactionHandle.activeLocks().collect( toList() ); } private void evaluateDirectDependencies( Map<KernelTransactionHandle,Set<KernelTransactionHandle>> directDependencies, Map<KernelTransactionHandle,List<ActiveLock>> handleLocksMap, KernelTransactionHandle txHandle, QuerySnapshot querySnapshot ) { List<ActiveLock> waitingOnLocks = querySnapshot.waitingLocks(); for ( ActiveLock activeLock : waitingOnLocks ) { for ( Map.Entry<KernelTransactionHandle,List<ActiveLock>> handleListEntry : handleLocksMap.entrySet() ) { KernelTransactionHandle kernelTransactionHandle = handleListEntry.getKey(); if ( !kernelTransactionHandle.equals( txHandle ) ) { if ( isBlocked( activeLock, handleListEntry.getValue() ) ) { Set<KernelTransactionHandle> kernelTransactionHandles = directDependencies.computeIfAbsent( txHandle, handle -> new HashSet<>() ); kernelTransactionHandles.add( kernelTransactionHandle ); } } } } } private boolean isBlocked( ActiveLock activeLock, List<ActiveLock> activeLocks ) { return ActiveLock.EXCLUSIVE_MODE.equals( activeLock.mode() ) ? haveAnyLocking( activeLocks, activeLock.resourceType(), activeLock.resourceId() ) : haveExclusiveLocking( activeLocks, activeLock.resourceType(), activeLock.resourceId() ); } private static boolean haveAnyLocking( List<ActiveLock> locks, ResourceType resourceType, long resourceId ) { return locks.stream().anyMatch( lock -> lock.resourceId() == resourceId && lock.resourceType() == resourceType ); } private static boolean haveExclusiveLocking( List<ActiveLock> locks, ResourceType resourceType, long resourceId ) { return locks.stream().anyMatch( lock -> ActiveLock.EXCLUSIVE_MODE.equals( lock.mode() ) && lock.resourceId() == resourceId && lock.resourceType() == resourceType ); } private String describe( Set<KernelTransactionHandle> allBlockers ) { if ( allBlockers.isEmpty() ) { return StringUtils.EMPTY; } StringJoiner stringJoiner = new StringJoiner( ", ", "[", "]" ); for ( KernelTransactionHandle blocker : allBlockers ) { stringJoiner.add( blocker.getUserTransactionName() ); } return stringJoiner.toString(); } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
601c7255923c4dd6fa1e4ca45f24deec5812a13b
acd0267791f3a4e6bd2c1c21cc27d719554bfdc5
/wechat-mp-autoconfigure/src/main/java/com/github/hippoom/wechat/mp/web/WeChatMpOAuth2AuthorizeController.java
d301458019c1d3c9ba0c1f820158f5c4f0decee2
[ "MIT" ]
permissive
jingood2/wechat-mp-starter
5968113e87c712f5f184cf04df30b20af553dd73
1a12d3d5be2788c9913cd8b423b1756bd5a73f2e
refs/heads/master
2020-03-27T17:43:55.778208
2017-07-04T04:35:32
2017-07-04T04:35:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,758
java
package com.github.hippoom.wechat.mp.web; import static org.springframework.web.bind.annotation.RequestMethod.GET; import java.io.IOException; import java.nio.charset.Charset; import java.util.Base64; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import lombok.NonNull; import lombok.RequiredArgsConstructor; import lombok.Setter; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.mp.api.WxMpService; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; @Slf4j @Controller @RequiredArgsConstructor @ConfigurationProperties(prefix = "wechat.mp") public class WeChatMpOAuth2AuthorizeController { @Setter @NonNull private String appBaseUri = "http://localhost:8080"; @NonNull private final WxMpService weChatMpService; @RequestMapping(value = "/wechat/oauth/authorize", method = GET) protected void askWeChatWhoTheUserIs(@RequestParam(name = "origin") String origin, HttpServletRequest request, HttpServletResponse response) throws IOException { final String endpointUrl = String.format("%s/wechat/oauth/token", appBaseUri); final String base64EncodedOrigin = Base64.getUrlEncoder().encodeToString(origin.getBytes(Charset.forName("UTF-8"))); final String redirect = weChatMpService .oauth2buildAuthorizationUrl(endpointUrl, "snsapi_base", base64EncodedOrigin); log.debug("We don't know who u are, redirecting you from {} to {}", origin, redirect); response.sendRedirect(redirect); } }
[ "hippoom@gmail.com" ]
hippoom@gmail.com
82a724e35f39a941fef8773e0c39d2152d5b38f9
678a3d58c110afd1e9ce195d2f20b2531d45a2e0
/sources/android/support/p000v4/app/FragmentContainer.java
65b9c116c943ddd98224745a472bd5c6d4e12c51
[]
no_license
jasonnth/AirCode
d1c37fb9ba3d8087efcdd9fa2103fb85d13735d5
d37db1baa493fca56f390c4205faf5c9bbe36604
refs/heads/master
2020-07-03T08:35:24.902940
2019-08-12T03:34:56
2019-08-12T03:34:56
201,842,970
0
2
null
null
null
null
UTF-8
Java
false
false
259
java
package android.support.p000v4.app; import android.view.View; /* renamed from: android.support.v4.app.FragmentContainer */ public abstract class FragmentContainer { public abstract View onFindViewById(int i); public abstract boolean onHasView(); }
[ "thanhhuu2apc@gmail.com" ]
thanhhuu2apc@gmail.com
92a6f61a32c9d71481b2c47089bffffd08ca3221
54783fa8742d3338c3da28ff2385ad28377e61be
/jsf/commandScript/src/test/java/jakartaee/examples/jsf/commandscript/CommandScriptTest.java
6f47a64d946d8f0d6d0e4c8262ed458730319267
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
nishantraut/jakartaee-examples
1879bd18a71aef9c20511145c7a07d99862cce34
3ebaa96cf2fb324bfcffc66300ef7094f65e8db8
refs/heads/master
2022-04-27T09:50:30.063507
2020-04-30T09:27:04
2020-04-30T09:27:04
260,663,068
1
0
NOASSERTION
2020-05-02T10:27:21
2020-05-02T10:27:20
null
UTF-8
Java
false
false
2,998
java
/* * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR(S) DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR(S) 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 jakartaee.examples.jsf.commandscript; import com.gargoylesoftware.htmlunit.NicelyResynchronizingAjaxController; import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.html.HtmlPage; import jakartaee.examples.utils.JakartaEEServer; import java.io.File; import java.net.URL; import org.arquillian.container.chameleon.runner.ArquillianChameleon; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.RunAsClient; import org.jboss.arquillian.test.api.ArquillianResource; import static org.jboss.shrinkwrap.api.ShrinkWrap.create; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.After; import static org.junit.Assert.assertTrue; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; /** * The JUnit tests for the h:commandScript example. * * @author Manfred Riem (mriem@manorrock.com) */ @RunWith(ArquillianChameleon.class) @JakartaEEServer public class CommandScriptTest { /** * Stores the base URL. */ @ArquillianResource private URL baseUrl; /** * Stores the web client. */ private WebClient webClient; /** * Setup before testing. */ @Before public void before() { webClient = new WebClient(); } /** * Create the deployment web archive. * * @return the deployment web archive. */ @Deployment public static WebArchive createDeployment() { return create(WebArchive.class).addClass(CommandScriptBean.class). addAsWebResource(new File("src/main/webapp/index.xhtml")). addAsWebInfResource(new File("src/main/webapp/WEB-INF/web.xml")); } /** * Tear down after testing. */ @After public void after() { webClient.close(); } /** * Test the h:commandScript. * * @throws Exception when a serious error occurs. */ @RunAsClient @Test public void testCommandScript() throws Exception { webClient.setAjaxController(new NicelyResynchronizingAjaxController()); HtmlPage page = webClient.getPage(baseUrl); webClient.waitForBackgroundJavaScript(2000); System.out.println(page.asXml()); assertTrue(page.asXml().contains("And we processed the call")); } }
[ "mriem@manorrock.com" ]
mriem@manorrock.com
21d9074d4374f9dc8c64f1162aafb75318045a74
b84933f46f3a9b75953812b71ad5a033deccefb0
/app/src/main/java/com/codingblocks/applockfinal/FragmentD.java
c689820cca1f812916cfff51a66f533b44dd9e64
[]
no_license
missyadavmanisha/AppLockApp
29d1721eec83b3cc0cbcf8d117cdbf018247f242
9356668b34e10d4046ac7a50d041cab680197ac6
refs/heads/master
2020-04-08T22:50:26.705882
2018-11-30T09:45:07
2018-11-30T09:45:07
159,802,046
0
0
null
null
null
null
UTF-8
Java
false
false
672
java
package com.codingblocks.applockfinal; import android.content.Intent; import android.os.Bundle; import android.provider.Settings; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.widget.Toast; public class FragmentD extends Fragment { @Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); Intent i=new Intent(); i.setAction(Settings.ACTION_USAGE_ACCESS_SETTINGS); Toast.makeText(getContext(), "If you have not allowed , allow App Lock so that it can work properly", Toast.LENGTH_LONG).show(); startActivity(i); } }
[ "you@example.com" ]
you@example.com
062948667b05c7d134c54fac3cb45e90177bbf9d
0aa691918a0bcefcd05e907f5dc6711e30ab9c79
/spring-boot-mybatis-demo/src/test/java/com/han/springbootmybatisdemo/mapper/UserMapperTest.java
5edc742f028363ad4a47331549ab25dfdcc42a41
[]
no_license
mstao/spring-boot-learning
cab0d3ba21b538d3e5388810a2330f97ba09bbfa
88e41eaa7b59c5a6b79231120385d9b1a60c223a
refs/heads/master
2021-05-07T01:52:20.538922
2018-08-18T05:01:21
2018-08-18T05:01:21
110,440,006
0
0
null
null
null
null
UTF-8
Java
false
false
1,462
java
package com.han.springbootmybatisdemo.mapper; import com.han.springbootmybatisdemo.entity.User; import com.han.springbootmybatisdemo.enums.UserSexEnum; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import java.util.List; /** * @Description: * @Author: Minsghan * @Date: Created in 20:47 2017/11/15 */ @RunWith(SpringRunner.class) @SpringBootTest public class UserMapperTest { @Autowired private UserMapper userMapper; @Test public void testInsert() throws Exception { userMapper.insert(new User("aa", "a123456", UserSexEnum.MALE)); userMapper.insert(new User("bb", "b123456", UserSexEnum.FEMALE)); userMapper.insert(new User("cc", "b123456", UserSexEnum.FEMALE)); Assert.assertEquals(3, userMapper.findAll().size()); } @Test public void testQuery() throws Exception { List<User> users = userMapper.findAll(); System.out.println(users.toString()); } @Test public void testUpdate() throws Exception { User user = userMapper.findOne(3L); System.out.println(user.toString()); user.setNickName("neo"); userMapper.update(user); Assert.assertTrue(("neo".equals(userMapper.findOne(3L).getNickName()))); } }
[ "499445428@qq.com" ]
499445428@qq.com
e547ef58e888fbf7f91086168c2aa85e40db1019
3c178b1dbb44237afe8d435336a265a73f4d66ea
/com/android/ide/eclipse/tests/AllTests.java
fb5504cde98e76b88b4704a6e93d3d9e398422cd
[]
no_license
AndroidSDKSources/android-sdk-sources-for-api-level-5
b7806884853389ff288b3adbdaf28f14893549a0
baef9e37c1298f278f4fc212b9910810bf262a0b
refs/heads/master
2021-01-15T15:05:15.383833
2015-06-13T15:27:01
2015-06-13T15:27:01
37,376,449
3
2
null
null
null
null
UTF-8
Java
false
false
1,134
java
/* * Copyright (C) 2008 The Android Open Source Project * * Licensed under the Eclipse Public License, Version 1.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.eclipse.org/org/documents/epl-v10.php * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.android.ide.eclipse.tests; import junit.framework.TestSuite; /** * Container TestSuite for all eclipse tests, both functional and unit */ public class AllTests extends TestSuite { public AllTests() { } /** * Returns a suite of test cases to be run. */ public static TestSuite suite() { TestSuite suite = new TestSuite(); suite.addTest(FuncTests.suite()); suite.addTest(UnitTests.suite()); return suite; } }
[ "root@ifeegoo.com" ]
root@ifeegoo.com
ec788d6bc4c0736e6a4d6675f97c98b7862b88c9
bf7964769d780ad1b729be0434ac6d5108fba3d0
/src/main/com/orangelabs/rcs/core/ipcall/CallHoldManager.java
5bf9dc22b9fb1389355e166bd42c783002389679
[ "Apache-2.0" ]
permissive
hl4/rcscore
4100cbf3a63a4d8c49cac68245a8c8c70cb63834
b4e2896fe65f26defc272aa5b394aa9441bcab78
refs/heads/master
2021-01-20T17:26:48.029669
2016-04-19T13:02:39
2016-04-19T13:02:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,973
java
/******************************************************************************* * Software Name : RCS IMS Stack * * Copyright (C) 2010 France Telecom S.A. * * 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.orangelabs.rcs.core.ipcall; import com.orangelabs.rcs.protocol.sip.SipRequest; import com.orangelabs.rcs.utils.logger.Logger; /** * Super class for IP Call Hold Manager * * @author O. Magnon */ public abstract class CallHoldManager { /** * Constant values for IPCall Hold states */ static final int IDLE = 0; static final int HOLD_INPROGRESS = 1; static final int HOLD = 2; static final int UNHOLD_INPROGRESS = 3; // Hold state int state; // session handled by Hold manager IPCallSession session ; /** * The logger */ protected Logger logger = Logger.getLogger(this.getClass().getName()); public CallHoldManager(IPCallSession session){ if (logger.isActivated()){ logger.info("IPCall_Hold()"); } this.state = CallHoldManager.IDLE; this.session = session; } public abstract void setCallHold(boolean callHoldAction); public abstract void setCallHold(boolean callHoldAction, SipRequest reInvite); public abstract void prepareSession(); public boolean isCallHold() { return ((state == HOLD_INPROGRESS) || (state == HOLD)); } }
[ "ah@lilizhendeMacBook.local" ]
ah@lilizhendeMacBook.local
10c805b06a69058bfdeb7fb5432bca9097ac63d7
e89dc01c95b8b45404f971517c2789fd21657749
/src/main/java/com/alipay/api/domain/AlipayCommerceIotDevicelistCreateModel.java
42cf5a5afd90d0eb8019448071414bf63783784f
[ "Apache-2.0" ]
permissive
guoweiecust/alipay-sdk-java-all
3370466eec70c5422c8916c62a99b1e8f37a3f46
bb2b0dc8208a7a0ab8521a52f8a5e1fcef61aeb9
refs/heads/master
2023-05-05T07:06:47.823723
2021-05-25T15:26:21
2021-05-25T15:26:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,080
java
package com.alipay.api.domain; import java.util.List; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; /** * 创建设备记录接口 * * @author auto create * @since 1.0, 2017-09-14 22:22:29 */ public class AlipayCommerceIotDevicelistCreateModel extends AlipayObject { private static final long serialVersionUID = 5126319916634447138L; /** * 设备对象列表+不唯一+用于批量创建设备记录+协议服务商指定+0个或多个设备对象列表,单次调用传入设备对象个数不能超过200 */ @ApiListField("device_list") @ApiField("iot_device") private List<IotDevice> deviceList; /** * 设备个性化信息列表+不唯一+用于设置设备的用户定制化信息+协议服务商指定 */ @ApiListField("device_personal_info_list") @ApiField("iot_device_personal_info") private List<IotDevicePersonalInfo> devicePersonalInfoList; /** * 协议服务商id+唯一+指定操作数据归属于哪个协议服务商+协议服务商接入时由支付宝统一分配 */ @ApiField("protocol_supplier_id") private String protocolSupplierId; /** * 蚂蚁统一会员ID */ @ApiField("user_id") private String userId; public List<IotDevice> getDeviceList() { return this.deviceList; } public void setDeviceList(List<IotDevice> deviceList) { this.deviceList = deviceList; } public List<IotDevicePersonalInfo> getDevicePersonalInfoList() { return this.devicePersonalInfoList; } public void setDevicePersonalInfoList(List<IotDevicePersonalInfo> devicePersonalInfoList) { this.devicePersonalInfoList = devicePersonalInfoList; } public String getProtocolSupplierId() { return this.protocolSupplierId; } public void setProtocolSupplierId(String protocolSupplierId) { this.protocolSupplierId = protocolSupplierId; } public String getUserId() { return this.userId; } public void setUserId(String userId) { this.userId = userId; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
252a19a251f85acbf537acf2b60c379834cf7d9d
3707e5fe5ba75fc4a8501a44c8dfb042adb7ca77
/IDEA156059/src/IDEA93082/Buss.java
de66059f3a0019f9cc57590a8e7057f8e360ea71
[]
no_license
IdeaUJetBrains/TESTproject
2f9abba812245b6347e36620b42dadbea7727015
4127311b9626bf26e10ae758298085f9c2c66486
refs/heads/master
2021-01-17T12:54:08.156206
2018-10-17T10:15:31
2018-10-17T10:15:31
55,963,291
0
0
null
null
null
null
UTF-8
Java
false
false
513
java
package IDEA93082; import result156059WithFields.AbstractBuss; import javax.persistence.Basic; import javax.persistence.Cacheable; import javax.persistence.Entity; import javax.persistence.Table; import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement @Entity @Cacheable public class Buss extends AbstractBuss { private String name; @Basic(optional = false) public String getName() { return name; } public void setName(String name) { this.name = name; } }
[ "olga.pavlova@jetbrains.com" ]
olga.pavlova@jetbrains.com
442b6ad80afb3d7e087ea0f89c176e2fbd39de3b
903e9488b0c794494ba25d812d1ad56db429ac62
/src/main/java/io/github/jhipster/sygi/repository/PersistenceAuditEventRepository.java
8eccb4afda4a79081025825525549305c7c0785c
[]
no_license
BulkSecurityGeneratorProject/sygi-app
1aa077571a5900e6fb21e0147e3c74ef81cb3e26
2e0ee6120babda5bd4673d38daf9f5d84a3b9d09
refs/heads/master
2022-12-31T02:07:47.707701
2019-07-29T12:59:35
2019-07-29T12:59:35
296,648,856
0
0
null
2020-09-18T14:45:25
2020-09-18T14:45:23
null
UTF-8
Java
false
false
994
java
package io.github.jhipster.sygi.repository; import io.github.jhipster.sygi.domain.PersistentAuditEvent; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import java.time.Instant; import java.util.List; /** * Spring Data JPA repository for the {@link PersistentAuditEvent} entity. */ public interface PersistenceAuditEventRepository extends JpaRepository<PersistentAuditEvent, Long> { List<PersistentAuditEvent> findByPrincipal(String principal); List<PersistentAuditEvent> findByAuditEventDateAfter(Instant after); List<PersistentAuditEvent> findByPrincipalAndAuditEventDateAfter(String principal, Instant after); List<PersistentAuditEvent> findByPrincipalAndAuditEventDateAfterAndAuditEventType(String principal, Instant after, String type); Page<PersistentAuditEvent> findAllByAuditEventDateBetween(Instant fromDate, Instant toDate, Pageable pageable); }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
993944d4a910a164cd2f9c62fea8ee4b92b0cdfb
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/com/tencent/mm/ui/widget/picker/CustomTimePickerNew.java
244dbc4969b6da513b27ad786345d0852faf8ea8
[]
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
6,415
java
package com.tencent.mm.ui.widget.picker; import android.content.Context; import android.content.res.Resources; import android.util.AttributeSet; import android.view.ContextThemeWrapper; import android.view.View; import android.widget.FrameLayout; import androidx.core.content.a; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.ck.a.c; import com.tencent.mm.ck.a.d; import com.tencent.mm.ck.a.j; import com.tencent.mm.picker.b.b; import com.tencent.mm.picker.base.view.WheelView; import com.tencent.mm.picker.d.f; import com.tencent.mm.picker.f.c; import com.tencent.mm.picker.f.e; import java.util.Calendar; import java.util.Date; import java.util.Iterator; import java.util.List; public class CustomTimePickerNew extends FrameLayout { private Context context; int currentHour; int currentMinute; public int mMaxTimeHour; public int mMaxTimeMinute; public int mMinTimeHour; public int mMinTimeMinute; private View mView; c pvTime; public int sqv; public int sqw; public CustomTimePickerNew(Context paramContext) { super(new ContextThemeWrapper(paramContext, a.j.Widget_Picker)); AppMethodBeat.i(252583); this.mView = null; this.mMinTimeHour = -1; this.mMinTimeMinute = -1; this.mMaxTimeHour = -1; this.mMaxTimeMinute = -1; this.sqv = -1; this.sqw = -1; this.context = paramContext; this.pvTime = new c(paramContext); AppMethodBeat.o(252583); } public CustomTimePickerNew(Context paramContext, AttributeSet paramAttributeSet) { super(new ContextThemeWrapper(paramContext, a.j.Widget_Picker), paramAttributeSet); AppMethodBeat.i(252587); this.mView = null; this.mMinTimeHour = -1; this.mMinTimeMinute = -1; this.mMaxTimeHour = -1; this.mMaxTimeMinute = -1; this.sqv = -1; this.sqw = -1; this.context = paramContext; this.pvTime = new c(paramContext); AppMethodBeat.o(252587); } public CustomTimePickerNew(Context paramContext, AttributeSet paramAttributeSet, int paramInt) { super(paramContext, paramAttributeSet, paramInt); AppMethodBeat.i(252593); this.mView = null; this.mMinTimeHour = -1; this.mMinTimeMinute = -1; this.mMaxTimeHour = -1; this.mMaxTimeMinute = -1; this.sqv = -1; this.sqw = -1; this.context = paramContext; this.pvTime = new c(paramContext); AppMethodBeat.o(252593); } public View getView() { AppMethodBeat.i(252603); if (this.mView == null) { this.mView = this.pvTime.bTg(); } View localView = this.mView; AppMethodBeat.o(252603); return localView; } public final void onShow() { AppMethodBeat.i(252619); Object localObject = Calendar.getInstance(); ((Calendar)localObject).set(11, this.sqv); ((Calendar)localObject).set(12, this.sqw); Calendar localCalendar1 = Calendar.getInstance(); localCalendar1.set(11, this.mMinTimeHour); localCalendar1.set(12, this.mMinTimeMinute); Calendar localCalendar2 = Calendar.getInstance(); localCalendar2.set(11, this.mMaxTimeHour); localCalendar2.set(12, this.mMaxTimeMinute); new b(this.context, new f() { public final void a(Date paramAnonymousDate) { AppMethodBeat.i(252646); CustomTimePickerNew.a(CustomTimePickerNew.this, paramAnonymousDate); AppMethodBeat.o(252646); } }).d(new boolean[] { 0, 0, 0, 1, 1, 0 }).a((Calendar)localObject).a(localCalendar1, localCalendar2).bSW().xV(a.w(this.context, a.c.BW_0_Alpha_0_1)).a(this.pvTime); this.pvTime.setDividerHeight(this.context.getResources().getDimensionPixelSize(a.d.bottomsheet_dividing_line_height)); this.context.getResources().getDimensionPixelSize(a.d.Edge_3A); this.pvTime.eV(this.context.getResources().getDimensionPixelSize(a.d.Edge_2A), this.context.getResources().getDimensionPixelSize(a.d.Edge_2A)); localObject = this.pvTime.pzv.bTk().iterator(); while (((Iterator)localObject).hasNext()) { ((WheelView)((Iterator)localObject).next()).xS(a.w(this.context, a.c.BW_0_Alpha_0_9)).xR(this.context.getResources().getDimensionPixelSize(a.d.Edge_2A)).setBackgroundColor(a.w(this.context, a.c.BG_5)); } localObject = this.pvTime.pzv.bTk(); if (((List)localObject).size() == 1) { ((WheelView)((List)localObject).get(0)).setPadding(0, this.context.getResources().getDimensionPixelSize(a.d.Edge_2A), 0, this.context.getResources().getDimensionPixelSize(a.d.Edge_2A)); AppMethodBeat.o(252619); return; } if (((List)localObject).size() == 2) { ((WheelView)((List)localObject).get(0)).setPadding(0, this.context.getResources().getDimensionPixelSize(a.d.Edge_2A), this.context.getResources().getDimensionPixelSize(a.d.Edge_2A), this.context.getResources().getDimensionPixelSize(a.d.Edge_2A)); ((WheelView)((List)localObject).get(1)).setPadding(this.context.getResources().getDimensionPixelSize(a.d.Edge_2A), this.context.getResources().getDimensionPixelSize(a.d.Edge_2A), 0, this.context.getResources().getDimensionPixelSize(a.d.Edge_2A)); AppMethodBeat.o(252619); return; } if (((List)localObject).size() == 3) { ((WheelView)((List)localObject).get(0)).setPadding(0, this.context.getResources().getDimensionPixelSize(a.d.Edge_2A), this.context.getResources().getDimensionPixelSize(a.d.Edge_0_5_A), this.context.getResources().getDimensionPixelSize(a.d.Edge_2A)); ((WheelView)((List)localObject).get(1)).setPadding(this.context.getResources().getDimensionPixelSize(a.d.Edge_0_5_A), this.context.getResources().getDimensionPixelSize(a.d.Edge_2A), this.context.getResources().getDimensionPixelSize(a.d.Edge_0_5_A), this.context.getResources().getDimensionPixelSize(a.d.Edge_2A)); ((WheelView)((List)localObject).get(2)).setPadding(this.context.getResources().getDimensionPixelSize(a.d.Edge_0_5_A), this.context.getResources().getDimensionPixelSize(a.d.Edge_2A), 0, this.context.getResources().getDimensionPixelSize(a.d.Edge_2A)); } AppMethodBeat.o(252619); } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes12.jar * Qualified Name: com.tencent.mm.ui.widget.picker.CustomTimePickerNew * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
2d12dbff57b6ce3cb3334c4eaada54b41e8a67ea
07bc5c6696eedc65901179dab84f5ffd0a3f1b29
/app/src/main/java/com/wkrj/scjdaqsc/scjdaqsc/entity/FirmType.java
8e008eec710c61d1078632c967c3dc58315872a8
[]
no_license
saga87/Scjb
1d417286cc755b1839b3233fa990b4b774f4a83a
0cd46da853429bd132ed22e309823176479a557b
refs/heads/master
2020-03-21T04:52:41.044839
2018-06-21T07:05:46
2018-06-21T07:05:46
138,132,058
0
0
null
null
null
null
UTF-8
Java
false
false
524
java
package com.wkrj.scjdaqsc.scjdaqsc.entity; import java.io.Serializable; /** * Created by fxn on 2017/6/26. */ public class FirmType implements Serializable{ private String type_name; private long type_id; public String getType_name() { return type_name; } public void setType_name(String type_name) { this.type_name = type_name; } public long getType_id() { return type_id; } public void setType_id(long type_id) { this.type_id = type_id; } }
[ "907151065@qq.com" ]
907151065@qq.com
09a5836e1f8415c00bee191b539d0d04f0e6e4b0
c827bfebbde82906e6b14a3f77d8f17830ea35da
/Development3.0/TeevraServer/platform/businessobject/src/main/java/org/fixprotocol/fixml_5_0_sp2/QuoteRequestRejectMessageT.java
db4797dc4c85a141d5f090cd32007a57190c0580
[]
no_license
GiovanniPucariello/TeevraCore
13ccf7995c116267de5c403b962f1dc524ac1af7
9d755cc9ca91fb3ebc5b227d9de6bcf98a02c7b7
refs/heads/master
2021-05-29T18:12:29.174279
2013-04-22T07:44:28
2013-04-22T07:44:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,913
java
package org.fixprotocol.fixml_5_0_sp2; import java.math.BigInteger; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * QuoteRequestReject can be found in Volume3 of the specification * * <p>Java class for QuoteRequestReject_message_t complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="QuoteRequestReject_message_t"> * &lt;complexContent> * &lt;extension base="{http://www.fixprotocol.org/FIXML-5-0-SP2}Abstract_message_t"> * &lt;sequence> * &lt;group ref="{http://www.fixprotocol.org/FIXML-5-0-SP2}QuoteRequestRejectElements"/> * &lt;/sequence> * &lt;attGroup ref="{http://www.fixprotocol.org/FIXML-5-0-SP2}QuoteRequestRejectAttributes"/> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "QuoteRequestReject_message_t", propOrder = { "pty", "quotReqRej" }) public class QuoteRequestRejectMessageT extends AbstractMessageT { @XmlElement(name = "Pty") protected List<RootPartiesBlockT> pty; @XmlElement(name = "QuotReqRej", required = true) protected List<QuotReqRjctGrpBlockT> quotReqRej; @XmlAttribute(name = "ReqID") protected String reqID; @XmlAttribute(name = "RFQReqID") protected String rfqReqID; @XmlAttribute(name = "ReqRejRsn") protected String reqRejRsn; @XmlAttribute(name = "PrvtQt") protected String prvtQt; @XmlAttribute(name = "RspdntTyp") protected BigInteger rspdntTyp; @XmlAttribute(name = "PrTrdAnon") protected String prTrdAnon; @XmlAttribute(name = "Txt") protected String txt; @XmlAttribute(name = "EncTxtLen") protected BigInteger encTxtLen; @XmlAttribute(name = "EncTxt") protected String encTxt; /** * Gets the value of the pty property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the pty property. * * <p> * For example, to add a new item, do as follows: * <pre> * getPty().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link RootPartiesBlockT } * * */ public List<RootPartiesBlockT> getPty() { if (pty == null) { pty = new ArrayList<RootPartiesBlockT>(); } return this.pty; } /** * Gets the value of the quotReqRej property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the quotReqRej property. * * <p> * For example, to add a new item, do as follows: * <pre> * getQuotReqRej().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link QuotReqRjctGrpBlockT } * * */ public List<QuotReqRjctGrpBlockT> getQuotReqRej() { if (quotReqRej == null) { quotReqRej = new ArrayList<QuotReqRjctGrpBlockT>(); } return this.quotReqRej; } /** * Gets the value of the reqID property. * * @return * possible object is * {@link String } * */ public String getReqID() { return reqID; } /** * Sets the value of the reqID property. * * @param value * allowed object is * {@link String } * */ public void setReqID(String value) { this.reqID = value; } /** * Gets the value of the rfqReqID property. * * @return * possible object is * {@link String } * */ public String getRFQReqID() { return rfqReqID; } /** * Sets the value of the rfqReqID property. * * @param value * allowed object is * {@link String } * */ public void setRFQReqID(String value) { this.rfqReqID = value; } /** * Gets the value of the reqRejRsn property. * * @return * possible object is * {@link String } * */ public String getReqRejRsn() { return reqRejRsn; } /** * Sets the value of the reqRejRsn property. * * @param value * allowed object is * {@link String } * */ public void setReqRejRsn(String value) { this.reqRejRsn = value; } /** * Gets the value of the prvtQt property. * * @return * possible object is * {@link String } * */ public String getPrvtQt() { return prvtQt; } /** * Sets the value of the prvtQt property. * * @param value * allowed object is * {@link String } * */ public void setPrvtQt(String value) { this.prvtQt = value; } /** * Gets the value of the rspdntTyp property. * * @return * possible object is * {@link BigInteger } * */ public BigInteger getRspdntTyp() { return rspdntTyp; } /** * Sets the value of the rspdntTyp property. * * @param value * allowed object is * {@link BigInteger } * */ public void setRspdntTyp(BigInteger value) { this.rspdntTyp = value; } /** * Gets the value of the prTrdAnon property. * * @return * possible object is * {@link String } * */ public String getPrTrdAnon() { return prTrdAnon; } /** * Sets the value of the prTrdAnon property. * * @param value * allowed object is * {@link String } * */ public void setPrTrdAnon(String value) { this.prTrdAnon = value; } /** * Gets the value of the txt property. * * @return * possible object is * {@link String } * */ public String getTxt() { return txt; } /** * Sets the value of the txt property. * * @param value * allowed object is * {@link String } * */ public void setTxt(String value) { this.txt = value; } /** * Gets the value of the encTxtLen property. * * @return * possible object is * {@link BigInteger } * */ public BigInteger getEncTxtLen() { return encTxtLen; } /** * Sets the value of the encTxtLen property. * * @param value * allowed object is * {@link BigInteger } * */ public void setEncTxtLen(BigInteger value) { this.encTxtLen = value; } /** * Gets the value of the encTxt property. * * @return * possible object is * {@link String } * */ public String getEncTxt() { return encTxt; } /** * Sets the value of the encTxt property. * * @param value * allowed object is * {@link String } * */ public void setEncTxt(String value) { this.encTxt = value; } }
[ "ritwik.bose@headstrong.com" ]
ritwik.bose@headstrong.com
755ad65e5fa6189270a9c0df922cf3a5da53219c
1721652ec4de34d82ddfb5343fa969bde3412f94
/.svn/pristine/75/755ad65e5fa6189270a9c0df922cf3a5da53219c.svn-base
82459c7c5441be4fdad2a3ade265c2a3af149c62
[]
no_license
xiaoweilvzheng/argo
0425218fd1e79255d8d43fae4f73355d8a350c3c
8e33b6368197f14d94e8d001b2f2ddc354158f15
refs/heads/master
2021-05-16T12:16:15.152922
2017-09-29T02:30:51
2017-09-29T02:30:51
105,217,653
0
1
null
null
null
null
UTF-8
Java
false
false
5,070
package com.jx.argo.internal; import javax.inject.Inject; import javax.inject.Singleton; import javax.servlet.MultipartConfigElement; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.google.common.io.Closeables; import com.google.inject.Key; import com.google.inject.OutOfScopeException; import com.jx.argo.ActionResult; import com.jx.argo.Argo; import com.jx.argo.BeatContext; import com.jx.argo.inject.ArgoSystem; import com.jx.argo.internal.actionresult.StaticActionResult; import com.jx.argo.internal.actionresult.StatusCodeActionResult; import com.jx.argo.logs.Logger; import com.jx.argo.route.ActionMonitor; import com.jx.argo.route.Router; import com.jx.argo.servlet.ArgoDispatcher; import com.jx.argo.servlet.ArgoRequest; import com.jx.argo.utils.GuiceUtils; import com.jx.argo.utils.OnlyOnceCondition; /** * * 用于处理Rest请求调度的核心类 * */ @Singleton public class DefaultArgoDispatcher implements ArgoDispatcher { private final Argo argo; private final Router router; private final StatusCodeActionResult statusCodeActionResult; private final Key<BeatContext> defaultBeatContextKey = Key.get(BeatContext.class, ArgoSystem.class); private final MultipartConfigElement config; private final Logger logger; @Inject public DefaultArgoDispatcher(Argo argo, Router router, StatusCodeActionResult statusCodeActionResult, MultipartConfigElement config) { this.argo = argo; this.router = router; this.statusCodeActionResult = statusCodeActionResult; this.config = config; this.logger = argo.getLogger(this.getClass()); logger.info("constructed.", this.getClass()); } @Override public void init() { } @Override public void service(HttpServletRequest request, HttpServletResponse response) { ArgoRequest argoRequest = new ArgoRequest(request, config); try { BeatContext beatContext = bindBeatContext(argoRequest, response); route(beatContext); } finally { Closeables.closeQuietly(argoRequest); } } private BeatContext bindBeatContext(HttpServletRequest request, HttpServletResponse response) { Context context = new Context(request, response); localContext.set(context); BeatContext beat = argo.injector().getInstance(defaultBeatContextKey); // 增加默认参数到model beat.getModel().add("__beat", beat); // 增加监控事件 ActionMonitor monitor = GuiceUtils.dynamicGetInstance(ActionMonitor.class); beat.setActionMonitor(monitor); context.setBeat(beat); return beat; } private void route(BeatContext beat) { try { ActionResult result = router.route(beat); if (ActionResult.NULL == result) result = statusCodeActionResult.getSc404(); result.render(beat); //输出监控 beat.outputMonitor(result); } catch (Exception e) { statusCodeActionResult.render405(beat); e.printStackTrace(); logger.error(String.format("fail to route. url:%s", beat.getClient().getRelativeUrl()), e); //TODO: catch any exceptions. } finally { localContext.remove(); } } public void destroy() { } public HttpServletRequest currentRequest() { return getContext().getRequest(); } public HttpServletResponse currentResponse() { return getContext().getResponse(); } public BeatContext currentBeatContext() { return getContext().getBeat(); } private Context getContext() { Context context = localContext.get(); if (context == null) { throw new OutOfScopeException("Cannot access scoped object. Either we" + " are not currently inside an HTTP Servlet currentRequest, or you may" + " have forgotten to apply " + DefaultArgoDispatcher.class.getName() + " as a servlet filter for this currentRequest."); } return context; } final ThreadLocal<Context> localContext = new ThreadLocal<Context>(); private static class Context { final HttpServletRequest request; final HttpServletResponse response; BeatContext beat; OnlyOnceCondition onlyOnce = OnlyOnceCondition.create("The current beat has been created."); Context(HttpServletRequest request, HttpServletResponse response) { this.request = request; this.response = response; } HttpServletRequest getRequest() { return request; } HttpServletResponse getResponse() { return response; } BeatContext getBeat() { return beat; } void setBeat(BeatContext beat) { onlyOnce.check(); this.beat = beat; } } }
[ "654714226@qq.com" ]
654714226@qq.com
5d067ad68d6abe27d666bfb0f4bb16575acb8cd7
2d27b4d2aca7f590485f914a6fae6e979338a951
/src/gui/style/StylesheetPaddingElement.java
d332b5e9ceec7acafce7873a83c3a6261055f60e
[]
no_license
dafrito/Riviera
af71c4b40cafed972e6d8c21d87fab42684284bb
1de0336961b78fde5593645c45e5077cbb49f773
refs/heads/master
2021-12-01T01:57:46.068373
2021-11-16T13:39:07
2021-11-16T13:40:31
674,718
0
2
null
null
null
null
UTF-8
Java
false
false
359
java
/** * */ package gui.style; import inspect.Inspectable; @Inspectable public class StylesheetPaddingElement { private int magnitude; public StylesheetPaddingElement(int magnitude) { this.magnitude = magnitude; } @Inspectable public int getMagnitude() { return this.magnitude; } @Override public String toString() { return "padding"; } }
[ "dafrito@gmail.com" ]
dafrito@gmail.com
37b95f41cd300545590e1bd3e2f11896ea4f08be
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
/Code Snippet Repository/Junit/Junit170.java
3e2dda39dd3fe7a65c6be14cafa9ad4a9aa9be97
[]
no_license
saber13812002/DeepCRM
3336a244d4852a364800af3181e03e868cf6f9f5
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
refs/heads/master
2023-03-16T00:08:06.473699
2018-04-18T05:29:50
2018-04-18T05:29:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
468
java
@Test void assertArrayEqualsLongArrayVsNull() { try { assertArrayEquals(null, new long[] { Long.MAX_VALUE, 2, 10 }); expectAssertionFailedError(); } catch (AssertionFailedError ex) { assertMessageEquals(ex, "expected array was <null>"); } try { assertArrayEquals(new long[] { Long.MAX_VALUE, 2, 10 }, null); expectAssertionFailedError(); } catch (AssertionFailedError ex) { assertMessageEquals(ex, "actual array was <null>"); } }
[ "Qing.Mi@my.cityu.edu.hk" ]
Qing.Mi@my.cityu.edu.hk
ae5929d9b86ca754c67328c062f178467c19e50c
f0d25d83176909b18b9989e6fe34c414590c3599
/app/src/main/java/com/vk/sdk/api/photo/VKUploadWallPhotoRequest.java
4786eaf9a56fed57314420c1b7aa7ee543ec9ddb
[]
no_license
lycfr/lq
e8dd702263e6565486bea92f05cd93e45ef8defc
123914e7c0d45956184dc908e87f63870e46aa2e
refs/heads/master
2022-04-07T18:16:31.660038
2020-02-23T03:09:18
2020-02-23T03:09:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,123
java
package com.vk.sdk.api.photo; import com.vk.sdk.api.VKApi; import com.vk.sdk.api.VKParameters; import com.vk.sdk.api.VKRequest; import com.vk.sdk.util.VKJsonHelper; import com.vk.sdk.util.VKUtil; import java.io.File; import org.json.JSONException; import org.json.JSONObject; public class VKUploadWallPhotoRequest extends VKUploadPhotoBase { private static final long serialVersionUID = 4732771149932923938L; public VKUploadWallPhotoRequest(File image, long userId, int groupId) { this.mUserId = userId; this.mGroupId = (long) groupId; this.mImages = new File[]{image}; } public VKUploadWallPhotoRequest(VKUploadImage image, long userId, int groupId) { this.mUserId = userId; this.mGroupId = (long) groupId; this.mImages = new File[]{image.getTmpFile()}; } public VKUploadWallPhotoRequest(VKUploadImage[] images, long userId, int groupId) { this.mUserId = userId; this.mGroupId = (long) groupId; this.mImages = new File[images.length]; for (int i = 0; i < images.length; i++) { this.mImages[i] = images[i].getTmpFile(); } } /* access modifiers changed from: protected */ public VKRequest getServerRequest() { if (this.mGroupId != 0) { return VKApi.photos().getWallUploadServer(this.mGroupId); } return VKApi.photos().getWallUploadServer(); } /* access modifiers changed from: protected */ public VKRequest getSaveRequest(JSONObject response) { try { VKRequest saveRequest = VKApi.photos().saveWallPhoto(new VKParameters(VKJsonHelper.toMap(response))); if (this.mUserId != 0) { saveRequest.addExtraParameters(VKUtil.paramsFrom("user_id", Long.valueOf(this.mUserId))); } if (this.mGroupId == 0) { return saveRequest; } saveRequest.addExtraParameters(VKUtil.paramsFrom("group_id", Long.valueOf(this.mGroupId))); return saveRequest; } catch (JSONException e) { return null; } } }
[ "quyenlm.vn@gmail.com" ]
quyenlm.vn@gmail.com
3201d74409358357513284adb92e490ed44c0237
54f352a242a8ad6ff5516703e91da61e08d9a9e6
/Source Codes/AtCoder/arc063/B/975760.java
e106016161b2fadfcabb775d2ee47a9a3f7fabbb
[]
no_license
Kawser-nerd/CLCDSA
5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb
aee32551795763b54acb26856ab239370cac4e75
refs/heads/master
2022-02-09T11:08:56.588303
2022-01-26T18:53:40
2022-01-26T18:53:40
211,783,197
23
9
null
null
null
null
UTF-8
Java
false
false
4,563
java
import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.InputMismatchException; import java.util.Random; import javax.management.RuntimeErrorException; public class Main { InputStream is; int __t__ = 1; int __f__ = 0; int __FILE_DEBUG_FLAG__ = __f__; String __DEBUG_FILE_NAME__ = "src/D1"; FastScanner in; PrintWriter out; public void solve() { int N = in.nextInt(), T = in.nextInt(); int[] a = in.nextIntArray(N); int min = a[0]; int diffMax = 0; int res = 0; for (int i = 1; i < N; i++) { if (diffMax < a[i] - min) { diffMax = a[i] - min; res = 1; } else if (diffMax == a[i] - min) res++; min = Math.min(min, a[i]); } System.out.println(res); } public void run() { if (__FILE_DEBUG_FLAG__ == __t__) { try { is = new FileInputStream(__DEBUG_FILE_NAME__); } catch (FileNotFoundException e) { e.printStackTrace(); } System.out.println("FILE_INPUT!"); } else { is = System.in; } in = new FastScanner(is); out = new PrintWriter(System.out); Thread t = new Thread(null, new Runnable() { @Override public void run() { solve(); } }, "lul", 1 << 30); t.start(); } public static void main(String[] args) { new Main().run(); } public void mapDebug(int[][] a) { System.out.println("--------map display---------"); for (int i = 0; i < a.length; i++) { for (int j = 0; j < a[i].length; j++) { System.out.printf("%3d ", a[i][j]); } System.out.println(); } System.out.println("----------------------------"); System.out.println(); } public void debug(Object... obj) { System.out.println(Arrays.deepToString(obj)); } class FastScanner { private InputStream stream; private byte[] buf = new byte[1024]; private int curChar; private int numChars; public FastScanner(InputStream stream) { this.stream = stream; //stream = new FileInputStream(new File("dec.in")); } int read() { if (numChars == -1) throw new InputMismatchException(); if (curChar >= numChars) { curChar = 0; try { numChars = stream.read(buf); } catch (IOException e) { throw new InputMismatchException(); } if (numChars <= 0) return -1; } return buf[curChar++]; } boolean isSpaceChar(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; } boolean isEndline(int c) { return c == '\n' || c == '\r' || c == -1; } int nextInt() { return Integer.parseInt(next()); } int[] nextIntArray(int n) { int[] array = new int[n]; for (int i = 0; i < n; i++) array[i] = nextInt(); return array; } int[][] nextIntMap(int n, int m) { int[][] map = new int[n][m]; for (int i = 0; i < n; i++) { map[i] = in.nextIntArray(m); } return map; } long nextLong() { return Long.parseLong(next()); } long[] nextLongArray(int n) { long[] array = new long[n]; for (int i = 0; i < n; i++) array[i] = nextLong(); return array; } long[][] nextLongMap(int n, int m) { long[][] map = new long[n][m]; for (int i = 0; i < n; i++) { map[i] = in.nextLongArray(m); } return map; } double nextDouble() { return Double.parseDouble(next()); } double[] nextDoubleArray(int n) { double[] array = new double[n]; for (int i = 0; i < n; i++) array[i] = nextDouble(); return array; } double[][] nextDoubleMap(int n, int m) { double[][] map = new double[n][m]; for (int i = 0; i < n; i++) { map[i] = in.nextDoubleArray(m); } return map; } String next() { int c = read(); while (isSpaceChar(c)) c = read(); StringBuilder res = new StringBuilder(); do { res.appendCodePoint(c); c = read(); } while (!isSpaceChar(c)); return res.toString(); } String[] nextStringArray(int n) { String[] array = new String[n]; for (int i = 0; i < n; i++) array[i] = next(); return array; } String nextLine() { int c = read(); while (isEndline(c)) c = read(); StringBuilder res = new StringBuilder(); do { res.appendCodePoint(c); c = read(); } while (!isEndline(c)); return res.toString(); } } }
[ "kwnafi@yahoo.com" ]
kwnafi@yahoo.com
74fd92bc44bf97940a6f6f7b29c55c60c5f89095
df712303b969d53bc48ed907f447826cf2327b1e
/src/main/java/com/meiqi/openservice/commons/util/RuleExceptionUtil.java
b022871951617a28bf54745aa9b08a40e1f972ba
[]
no_license
weimingtom/DSORM
d452b7034a69e08853ca9101282b6f62564f919a
e80f730e7494a5d794cc44da4c7d4f28f90c0850
refs/heads/master
2021-01-09T20:37:12.755144
2016-05-03T02:43:31
2016-05-03T02:43:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,411
java
package com.meiqi.openservice.commons.util; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.net.URLEncoder; import java.util.HashMap; import java.util.Map; import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import com.meiqi.app.common.utils.DateUtils; import com.meiqi.data.engine.RengineException; import com.meiqi.dsmanager.action.IMemcacheAction; import com.meiqi.dsmanager.action.IMushroomAction; import com.meiqi.dsmanager.util.LogUtil; import com.meiqi.dsmanager.util.MD5Util; import com.meiqi.thread.ThreadCallback; import com.meiqi.thread.ThreadHelper; @Component public class RuleExceptionUtil { @Autowired private IMushroomAction mushroomAction; @Autowired private IMemcacheAction memcacheService; @Autowired private ThreadHelper indexTheadHelper; // 规则异常信息 private static final String MKEY_RULE_EXCEPTION = MD5Util.MD5("lejj_rule_exception"); private RengineException re = null; public RuleExceptionUtil() { } public RuleExceptionUtil(Exception e) { if (e instanceof RengineException) { re = (RengineException) e; } } public void run(Exception e) { if (e instanceof RengineException) { re = (RengineException) e; new Thread(new Runnable() { @Override public void run() { if (re != null && !StringUtils.isEmpty(re.getServiceName())) { // mushroomAction.insertRuleException2DB(re.getServiceName(), // re.getMessage()); // long time = System.currentTimeMillis(); ExceptionMemcachedThread thread = new ExceptionMemcachedThread(); indexTheadHelper.execute(thread); // System.out.println("规则异常写入耗时:" + // (System.currentTimeMillis() - time)); } } }).start(); } } class ExceptionMemcachedThread implements ThreadCallback { @SuppressWarnings("unchecked") public void run() { // mushroomAction.insertRuleException2DB(re.getServiceName(), // re.getMessage()); LogUtil.info("开始写入数据源错误信息!"); String key = re.getServiceName();// + "_" + DateUtils.getTime(); Object cacheObj = memcacheService.getCache(MKEY_RULE_EXCEPTION); Map<String, Map<String, Object>> cacheMap = null; if (null != cacheObj) { cacheMap = DataUtil.parse(cacheObj.toString(), Map.class);// 从缓存中获取对应值 } else { cacheMap = new HashMap<String, Map<String, Object>>(); } Map<String, Object> keyMap = new HashMap<String, Object>(); boolean flag = false; if (cacheMap.containsKey(key)) { Map<String, Object> objMap = cacheMap.get(key); if (null != objMap && !objMap.get("msg").equals(re.getMessage())) { keyMap.put("sname", re.getServiceName()); keyMap.put("msg", re.getMessage()); cacheMap.put(key + "_" + DateUtils.getTime(), keyMap); flag = memcacheService.putCache(MKEY_RULE_EXCEPTION, DataUtil.toJSONString(cacheMap)); if(flag){ LogUtil.info("数据源不同的异常信息,存入缓存成功!"); }else{ LogUtil.info("数据源不同的异常信息,存入缓存失败!"); } } } else { keyMap.put("sname", re.getServiceName()); keyMap.put("msg", re.getMessage()); cacheMap.put(key, keyMap); flag = memcacheService.putCache(MKEY_RULE_EXCEPTION, DataUtil.toJSONString(cacheMap)); if(flag){ LogUtil.info("数据源不同的异常信息,存入缓存成功!"); }else{ LogUtil.info("数据源不同的异常信息,存入缓存失败!"); } } } } }
[ "2785739797@qq.com" ]
2785739797@qq.com
5775effb8a58493bd6fd2daab93143d94848992c
c63f98aa97940e865ba52d52e02b82b69c0bc138
/源文件/CH4/javatuning/ch4/gs/simple/RequestQueue.java
cf3bcef1da07239f3e2c58b46c95a8904e2e8e66
[ "Apache-2.0" ]
permissive
zhanbq/java-hightcurrency
58d30fa07ffed1a7bdafb62994195aeabf1269f9
2b61db04eab037b75a50b650b8347e50733788f1
refs/heads/master
2022-09-22T05:42:18.488739
2020-08-07T11:25:44
2020-08-07T11:25:44
132,551,853
1
0
Apache-2.0
2022-09-01T23:31:13
2018-05-08T04:02:20
Java
UTF-8
Java
false
false
601
java
package javatuning.ch4.gs.simple; import java.util.LinkedList; public class RequestQueue { private LinkedList queue = new LinkedList(); public synchronized Request getRequest() { while (queue.size() == 0) { try { wait(); } catch (InterruptedException e) { } } return (Request)queue.remove(); } public synchronized void addRequest(Request request) { queue.add(request); notifyAll(); } }
[ "996388047@qq.com" ]
996388047@qq.com
450c547dc1cf1ce95f1c23f5e35c42383e6ed7b1
74eb12eb409ec6922a1dac36daf3910aa8233127
/src/main/java/com/example/FastCampusWeb03/validation/dto/Car.java
045f64bec85da474e0d9dc3ff3c1adf4917bb40a
[]
no_license
xjvmdutl/FastCampusWeb03
2d081f3c14caa86fa42f6211267d76933542ecff
57e6f9fca047a1b1efa7790404843f416c6149e6
refs/heads/master
2023-06-29T03:52:48.350927
2021-08-13T10:27:41
2021-08-13T10:27:41
394,303,137
0
0
null
null
null
null
UTF-8
Java
false
false
1,061
java
package com.example.FastCampusWeb03.validation.dto; import com.fasterxml.jackson.annotation.JsonProperty; import javax.validation.constraints.NotBlank; public class Car { @NotBlank private String name; //NotBlank를 붙혔는데 전송이 된다 @NotBlank @JsonProperty("car_number") private String carNumber; @NotBlank @JsonProperty("TYPE") private String type; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getCarNumber() { return carNumber; } public void setCarNumber(String carNumber) { this.carNumber = carNumber; } public String getType() { return type; } public void setType(String type) { this.type = type; } @Override public String toString() { return "Car{" + "name='" + name + '\'' + ", carNumber='" + carNumber + '\'' + ", type='" + type + '\'' + '}'; } }
[ "widn45@naver.com" ]
widn45@naver.com
870d015c35ba389041cb3a5dba002b1b32dab006
9e01c682b6b19b2de083e22d61681822b0ce8bca
/23.SpringMvcJar/src/test/java/pl/javastart/ApplicationTests.java
c25abe1f4508255f9d2c59722ccd7e6ed3ac12f1
[]
no_license
TutorialeLS/Tutoriale
151d3ad69af798fec06758c29ad8073f680ebf5d
5bcbb8b42083d501e3d098ee977638151f7e490b
refs/heads/master
2020-04-12T09:45:13.097512
2018-12-19T09:35:37
2018-12-19T09:35:37
162,406,591
0
0
null
null
null
null
UTF-8
Java
false
false
323
java
package pl.javastart; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class ApplicationTests { @Test public void contextLoads() { } }
[ "lucjan.sakowicz@gmail.com" ]
lucjan.sakowicz@gmail.com
8a0423a8efce05e0e0b4a97732ebfec76899fa63
dc25b23f8132469fd95cee14189672cebc06aa56
/vendor/mediatek/proprietary/packages/apps/Mms/callback/src/com/mediatek/mms/IMmsWidgetProxyActivityCallback.java
f4f51bd1b74c533b217fbe1ad2953f6da32f3fbf
[ "Apache-2.0" ]
permissive
nofearnohappy/alps_mm
b407d3ab2ea9fa0a36d09333a2af480b42cfe65c
9907611f8c2298fe4a45767df91276ec3118dd27
refs/heads/master
2020-04-23T08:46:58.421689
2019-03-28T21:19:33
2019-03-28T21:19:33
171,048,255
1
5
null
2020-03-08T03:49:37
2019-02-16T20:25:00
Java
UTF-8
Java
false
false
183
java
package com.mediatek.mms.callback; public interface IMmsWidgetProxyActivityCallback { void getUnreadInfoCallback(long threadId); void getThreadInfoCallback(long threadId); }
[ "fetpoh@mail.ru" ]
fetpoh@mail.ru
19069c9f3bb3304687b45604464f5fe9b0deb20d
62e334192393326476756dfa89dce9f0f08570d4
/tk_code/search-base-starter/java-sdk-analysis-start/src/main/java/com/ht/base/analysis/model/EventType.java
55efa2d3febe8b96e55cb445a542b4167a9ae365
[]
no_license
JellyB/code_back
4796d5816ba6ff6f3925fded9d75254536a5ddcf
f5cecf3a9efd6851724a1315813337a0741bd89d
refs/heads/master
2022-07-16T14:19:39.770569
2019-11-22T09:22:12
2019-11-22T09:22:12
223,366,837
1
2
null
2022-06-30T20:21:38
2019-11-22T09:15:50
Java
UTF-8
Java
false
false
3,308
java
package com.ht.base.analysis.model; import lombok.AllArgsConstructor; import lombok.Getter; /** * @author zhengyi * @date 2018-12-24 10:47 **/ @AllArgsConstructor public enum EventType { /** * event type enum */ HuaTuOnline_app_HuaTuOnline_PleaseSearch, HuaTuOnline_app_pc_HuaTuOnline_CollectTest, HuaTuOnline_pc_HuaTuOnline_SearchPlease, HuaTuOnline_app_pc_HuaTuOnline_ShareTest; public String getType(EventType eventType) { return eventType.toString(); } @AllArgsConstructor public enum ShareTest implements BaseTemplate { /** * share key enum */ on_module("on_module"), test_id("test_id"), test_first_cate("test_first_cate"), test_second_cate("test_second_cate"), test_third_cate("test_third_cate"), test_correct_rate("test_correct_rate"), test_answer_duration("test_answer_duration"), test_easy_error_choiceEasyErrorChoice("test_easy_error_choiceEasyErrorChoice"), test_from("test_from"), test_type("test_type"), share_type("share_type"); private String key; public String getKey() { return this.key; } } @AllArgsConstructor public enum SearchPlease implements BaseTemplate { /** * 搜索埋点key */ first_module("first_module"), second_module("second_module"), search_keyword("search_keyword"), is_recommend_word_used("is_recommend_word_used"), is_history_word_used("is_history_word_used"), is_having_result("is_having_result"); private String key; public String getKey() { return this.key; } } @AllArgsConstructor public enum CollectTest implements BaseTemplate { /** * collect test key enum */ on_module("on_module"), collect_operation("collect_operation"), test_id("test_id"), test_first_cate("test_first_cate"), test_second_cate("test_second_cate"), test_third_cate("test_third_cate"); private String key; public String getKey() { return this.key; } } @AllArgsConstructor public enum Default implements BaseTemplate { /** * default key */ platform("platform"); private String key; public String getKey() { return this.key; } } @AllArgsConstructor @Getter public enum TerminalType { /** * terminal type */ android(1, "AndroidApp"), ios(2, "iOSApp"), pc(3, "PC"), android_ipad(4, "AndroidApp"), ios_ipad(5, "iOSApp"), wx(6, "wx"), m_pc(7, "PC"), batch_register(8, "batch"), education(9, "education"), little_program(21, "微信小程序"); private int terminal; private String terminalName; public static String getTerminalName(int terminal) { for (TerminalType value : TerminalType.values()) { if (value.getTerminal() == terminal) { return value.getTerminalName(); } } return "无终端类型"; } } }
[ "jelly_b@126.com" ]
jelly_b@126.com
3e17415a3a307d5b06f77408a51af8a356c8d031
7d27ddcf69d052be585e20ca000ca09739895f20
/alantrails/alantrailsstorefront/web/src/de/hybris/alantrails/storefront/util/CSRFRequestDataValueProcessor.java
1c3b77a206e8c72a27f2028407078fd1fe4b4983
[]
no_license
liuxiangwin/Hybris-trails
ef1d2f210f5c2eedebc258dd9fa622e0fd3734b0
409596664f0f667d63e199a2cb7b1c81bf649900
refs/heads/master
2021-01-18T16:30:02.435090
2015-07-25T14:28:22
2015-07-25T14:28:22
37,815,549
0
0
null
null
null
null
UTF-8
Java
false
false
2,055
java
/* * [y] hybris Platform * * Copyright (c) 2000-2014 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with hybris. * * */ package de.hybris.alantrails.storefront.util; import java.util.HashMap; import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.springframework.web.servlet.support.RequestDataValueProcessor; /** * A <code>RequestDataValueProcessor</code> that pushes a hidden field with a CSRF token into forms. This process * implements the {@link #getExtraHiddenFields(HttpServletRequest)} method to push the CSRF token obtained from * {@link CSRFTokenManager}. To register this processor to automatically process all Spring based forms register it as a * Spring bean named 'requestDataValueProcessor' as shown below: * * <pre> * &lt;bean name="requestDataValueProcessor" class="com.eyallupu.blog.springmvc.controller.csrf.CSRFRequestDataValueProcessor"/&gt; * </pre> * * @author Eyal Lupu * */ public class CSRFRequestDataValueProcessor implements RequestDataValueProcessor { @Override public String processAction(final HttpServletRequest request, final String action) { return action; } @Override public String processFormFieldValue(final HttpServletRequest request, final String name, final String value, final String type) { return value; } @Override public Map<String, String> getExtraHiddenFields(final HttpServletRequest request) { final Map<String, String> hiddenFields = new HashMap<String, String>(); hiddenFields.put(CSRFTokenManager.CSRF_PARAM_NAME, CSRFTokenManager.getTokenForSession(request.getSession())); return hiddenFields; } @Override public String processUrl(final HttpServletRequest request, final String url) { return url; } }
[ "liuxiangwin@163.com" ]
liuxiangwin@163.com
856715f9aaa6db40aef2ef0ce371a7f94684a9eb
97a58b4d712475d571e27669879e530357986adb
/core/src/main/java/io/atomix/value/impl/TranscodingAsyncAtomicValue.java
be05641ce3d006e169de36360b78dedc2630f520
[ "Apache-2.0" ]
permissive
zheilbron/atomix
1cfa7fd6143201234bbb4a9a9d45fa14c52cff2e
979feba971dc71cbf1d71623c7410de562ea27c4
refs/heads/master
2021-09-01T01:25:40.029805
2017-12-23T02:21:08
2017-12-23T03:47:29
115,224,597
0
0
null
2017-12-23T22:09:03
2017-12-23T22:09:02
null
UTF-8
Java
false
false
4,051
java
/* * Copyright 2017-present Open Networking Foundation * * 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.atomix.value.impl; import com.google.common.collect.Maps; import io.atomix.value.AsyncAtomicValue; import io.atomix.value.AtomicValue; import io.atomix.value.AtomicValueEvent; import io.atomix.value.AtomicValueEventListener; import java.time.Duration; import java.util.Map; import java.util.concurrent.CompletableFuture; import java.util.function.Function; import static com.google.common.base.MoreObjects.toStringHelper; /** * Transcoding async atomic value. */ public class TranscodingAsyncAtomicValue<V1, V2> implements AsyncAtomicValue<V1> { private final AsyncAtomicValue<V2> backingValue; private final Function<V1, V2> valueEncoder; private final Function<V2, V1> valueDecoder; private final Map<AtomicValueEventListener<V1>, InternalAtomicValueEventListener> listeners = Maps.newIdentityHashMap(); public TranscodingAsyncAtomicValue(AsyncAtomicValue<V2> backingValue, Function<V1, V2> valueEncoder, Function<V2, V1> valueDecoder) { this.backingValue = backingValue; this.valueEncoder = v -> v != null ? valueEncoder.apply(v) : null; this.valueDecoder = v -> v != null ? valueDecoder.apply(v) : null; } @Override public String name() { return backingValue.name(); } @Override public CompletableFuture<Boolean> compareAndSet(V1 expect, V1 update) { return backingValue.compareAndSet(valueEncoder.apply(expect), valueEncoder.apply(update)); } @Override public CompletableFuture<V1> get() { return backingValue.get().thenApply(valueDecoder); } @Override public CompletableFuture<V1> getAndSet(V1 value) { return backingValue.getAndSet(valueEncoder.apply(value)).thenApply(valueDecoder); } @Override public CompletableFuture<Void> set(V1 value) { return backingValue.set(valueEncoder.apply(value)); } @Override public CompletableFuture<Void> addListener(AtomicValueEventListener<V1> listener) { synchronized (listeners) { InternalAtomicValueEventListener internalListener = listeners.computeIfAbsent(listener, k -> new InternalAtomicValueEventListener(listener)); return backingValue.addListener(internalListener); } } @Override public CompletableFuture<Void> removeListener(AtomicValueEventListener<V1> listener) { synchronized (listeners) { InternalAtomicValueEventListener internalListener = listeners.remove(listener); if (internalListener != null) { return backingValue.removeListener(internalListener); } else { return CompletableFuture.completedFuture(null); } } } @Override public AtomicValue<V1> sync(Duration operationTimeout) { return new BlockingAtomicValue<>(this, operationTimeout.toMillis()); } @Override public CompletableFuture<Void> close() { return backingValue.close(); } @Override public String toString() { return toStringHelper(this) .add("backingValue", backingValue) .toString(); } private class InternalAtomicValueEventListener implements AtomicValueEventListener<V2> { private final AtomicValueEventListener<V1> listener; InternalAtomicValueEventListener(AtomicValueEventListener<V1> listener) { this.listener = listener; } @Override public void event(AtomicValueEvent<V2> event) { listener.event(new AtomicValueEvent<>( valueDecoder.apply(event.newValue()), valueDecoder.apply(event.oldValue()))); } } }
[ "jordan.halterman@gmail.com" ]
jordan.halterman@gmail.com
a45fb2bc4cc12d74ec52f79c5ba1115c74a5449d
7038e25ce514d6024146e002e9fc0c868214d9ae
/2015年以前的旧代码/LCKmeans-2.0/src/cn/edu/bjtu/cnetwork/algorithms/ClusteringQualityAssessment.java
82114065d182dcdf90ac77367978039ebb21eeb3
[]
no_license
3qwasd/jobs
d63f67ec08f9de36e32c4ab401ea0ab73b64636c
8c21066062ecbb71d630c2f0cbebe0635547887d
refs/heads/master
2023-01-02T11:24:43.780319
2019-07-22T16:49:13
2019-07-22T16:49:13
64,465,190
1
0
null
2022-12-16T02:53:31
2016-07-29T08:40:14
Java
UTF-8
Java
false
false
2,526
java
/** * **/ package cn.edu.bjtu.cnetwork.algorithms; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.ArrayList; import java.util.List; import cn.edu.bjtu.cnetwork.Community; import cn.edu.bjtu.cnetwork.Network; import cn.edu.bjtu.cnetwork.ResultItem; import cn.edu.bjtu.utils.MathUtils; /** * @author QiaoJian * */ public class ClusteringQualityAssessment extends NetworkAlgorithms { ResultItem item; boolean hasGroundTruth; /** * @param network */ public ClusteringQualityAssessment(Network network,ResultItem item,boolean hasGroundTruth) { super(network); // TODO Auto-generated constructor stub this.item = item; this.hasGroundTruth = hasGroundTruth; } /* (non-Javadoc) * @see cn.edu.bjtu.cnetwork.algorithms.NetworkAlgorithms#execute() */ @Override void execute() { // TODO Auto-generated method stub if(hasGroundTruth){ computeAcc(item); NMI nmi = new NMI(network); nmi.run(); item.nmi = MathUtils.cutDouble(nmi.getNmi(),4); PWF pwf = new PWF(network); pwf.run(); item.pwf = MathUtils.cutDouble(pwf.getPwf(),4); } Modu modu = new Modu(network); modu.run(); item.modu = MathUtils.cutDouble(modu.getModu(),4); Entropy entropy = new Entropy(network); entropy.run(); item.entr = MathUtils.cutDouble(entropy.getEntropy(),4); System.out.println(item.toString()); try { this.writeToResult(network.networkName, item.toString()+"\n"); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } public void computeAcc(ResultItem item){ float correctNum = 0; List<String> flags = new ArrayList<String>(); List<Community> communities = network.getCommunities(); for(Community community:communities){ String classFlag = community.getClassFlag(); for(int i=0;i<community.getNodes().size();i++){ if(community.getNode(i).getAttribute("class_flag").equals(classFlag)){ correctNum++; } } flags.add(classFlag+":"+community.getNodes().size()); } float accu = (correctNum/network.nodeNum); item.acc = MathUtils.cutDouble((double) accu,4); } public void writeToResult(String networkName,String text) throws IOException{ BufferedWriter bufferedWriter = new BufferedWriter (new FileWriter(new File("I:\\network\\result\\"+networkName+".txt"),true)); bufferedWriter.write(text); bufferedWriter.close(); } }
[ "3qwasd@163.com" ]
3qwasd@163.com
6bd222eeb256800fa21af7e06688c9addd3b78b3
ea5310d758d7057d2124bc732821bcf394969853
/src/main/java/com/alekseysamoylov/cuncurrent/filter/exception/BlackListException.java
6975e8a4438ccc9bd01d07a70ee68b70c959a28b
[]
no_license
AlekseySamoylov/ConcurrentAccessToXml
705d33db7170d347a623104482eef241c3345aa7
e6cd10950afd97b1dfd0478dddb99e60931358dd
refs/heads/master
2020-12-02T19:30:35.724725
2017-07-05T18:58:36
2017-07-05T18:58:36
96,351,798
0
0
null
null
null
null
UTF-8
Java
false
false
271
java
package com.alekseysamoylov.cuncurrent.filter.exception; public class BlackListException extends Exception { public BlackListException(String message, Exception e) { super(message); } public BlackListException(String s) { super(s); } }
[ "alekseysamoylov89@gmail.com" ]
alekseysamoylov89@gmail.com
2652a36fdb169a7c4cfb45d452902ef524a1f530
af83281a4076d22304b77b79816fd389a0e9064e
/src/main/java/com/accenture/automation/web/config/ApplicationProperties.java
a1151f160843bf29cadfbcb867704be1f4591202
[]
no_license
BulkSecurityGeneratorProject/webmation
55abe7609e872e78d688dbf1366706c90c1d64cf
31b1c76ea22e4105bec4a2e30811bc87329d32b8
refs/heads/master
2022-12-10T11:12:57.207215
2019-01-30T23:41:04
2019-01-30T23:41:04
296,688,780
0
0
null
2020-09-18T17:33:31
2020-09-18T17:33:31
null
UTF-8
Java
false
false
431
java
package com.accenture.automation.web.config; import org.springframework.boot.context.properties.ConfigurationProperties; /** * Properties specific to Webmation. * <p> * Properties are configured in the application.yml file. * See {@link io.github.jhipster.config.JHipsterProperties} for a good example. */ @ConfigurationProperties(prefix = "application", ignoreUnknownFields = false) public class ApplicationProperties { }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
19ed8b174a1e74ab815e7cb5ce682c6ba88e25aa
435cc8c38474bdd0276208b502f3ca91145141d9
/crm-ejb/src/main/java/br/com/questor/crm/model/Cotacao.java
47df9f94a239946af1fbc908a1ee7d12fe2a59d2
[]
no_license
estevandiedrich/questorcrm
d677e467d4e88f924e4b32c74e845d2d14bff080
b2220f1052f9df981c0e9e7ed97992afd1cfd834
refs/heads/master
2021-01-10T22:28:19.018299
2016-05-04T04:16:25
2016-05-04T04:16:25
52,612,297
0
0
null
null
null
null
UTF-8
Java
false
false
3,364
java
package br.com.questor.crm.model; import java.io.Serializable; import java.util.ArrayList; import java.util.Date; import java.util.List; import javax.persistence.CascadeType; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Index; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.OneToMany; import javax.persistence.SequenceGenerator; import javax.persistence.Table; import javax.persistence.Transient; import javax.xml.bind.annotation.XmlRootElement; @Entity @Table(name = "cotacao",indexes = { @Index(columnList = "id", name = "cotacao_id_idx"), @Index(columnList = "oportunidade_id", name = "cotacao_oportunidade_idx"), @Index(columnList = "dataehoracriacao", name = "cotacao_dataehoracriacao_idx") } ) @XmlRootElement @NamedQueries(value = {@NamedQuery(name = "Cotacao.findByOportunidade", query = "SELECT c FROM Cotacao c WHERE c.oportunidade.id = :oportunidade"), @NamedQuery(name = "Cotacao.findAll", query = "SELECT c FROM Cotacao c ")}) @SequenceGenerator(name="COTACAO_SEQUENCE", sequenceName="COTACAO_SEQUENCE", allocationSize=1, initialValue=1) public class Cotacao implements Serializable{ public Cotacao() { oportunidade = new Oportunidade(); produtosModulosSelecionados = new ArrayList<ProdutoModulosSelecionados>(); dataEHoraCriacao = new Date(); } /** * */ private static final long serialVersionUID = -5383574026632126252L; @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator="COTACAO_SEQUENCE") private Long id; private String descricao; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "oportunidade_id") private Oportunidade oportunidade; @OneToMany(mappedBy = "cotacao", targetEntity = ProdutoModulosSelecionados.class, fetch = FetchType.LAZY, cascade = CascadeType.DETACH) private List<ProdutoModulosSelecionados> produtosModulosSelecionados; @Transient private ProdutoModulosSelecionados produtoModulosSelecionados; private Date dataEHoraCriacao; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getDescricao() { return descricao; } public void setDescricao(String descricao) { this.descricao = descricao; } public List<ProdutoModulosSelecionados> getProdutosModulosSelecionados() { return produtosModulosSelecionados; } public void setProdutosModulosSelecionados(List<ProdutoModulosSelecionados> produtoModulosSelecionados) { this.produtosModulosSelecionados = produtoModulosSelecionados; } public Date getDataEHoraCriacao() { return dataEHoraCriacao; } public void setDataEHoraCriacao(Date dataEHoraCriacao) { this.dataEHoraCriacao = dataEHoraCriacao; } public ProdutoModulosSelecionados getProdutoModulosSelecionados() { return produtoModulosSelecionados; } public void setProdutoModulosSelecionados(ProdutoModulosSelecionados produtoModulosSelecionados) { this.produtoModulosSelecionados = produtoModulosSelecionados; } public Oportunidade getOportunidade() { return oportunidade; } public void setOportunidade(Oportunidade oportunidade) { this.oportunidade = oportunidade; } }
[ "estevan.diedrich@gmail.com" ]
estevan.diedrich@gmail.com
ede6ec0a26231b535860ff76f218dc7dded1a636
c83e31b896154b43e437bb3101cfc6066ae33120
/src/edu/nefu/DeforeMgr/servlet/LoginServlet.java
081dd13cc9b75ea11609255c139e4d4a3e3cbc38
[]
no_license
nefu-icec/DeforestationManagement
5ea3668348aff9f0cc83a8b72aef84ea96d506bc
022dcfc15aed965d6f0b75f1786ad868dfb44e39
refs/heads/master
2021-01-10T07:02:33.636600
2016-02-15T07:04:44
2016-02-15T07:04:44
51,737,148
2
0
null
null
null
null
UTF-8
Java
false
false
3,461
java
package edu.nefu.DeforeMgr.servlet; import java.io.IOException; import java.sql.ResultSet; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import edu.nefu.DeforeMgr.bean.ConnectDatabase; import edu.nefu.DeforeMgr.bean.User; @WebServlet("/LoginServlet") public class LoginServlet extends HttpServlet { private static final long serialVersionUID = 1L; private String loginMethod; private String loginInfo; private String password; private String task; public LoginServlet() { super(); } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { task=request.getParameter("task"); switch (task) { case "quit": quit(request, response); break; default: break; } } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { task=request.getParameter("task"); switch (task) { case "login": login(request, response); break; default: break; } } private void login(HttpServletRequest request,HttpServletResponse response) throws IOException { request.setCharacterEncoding("gb2312"); loginMethod=request.getParameter("loginMethod"); loginInfo=new String(request.getParameter("loginInfo").getBytes("ISO-8859-1"),"gb2312"); password=request.getParameter("password"); if(isUserPasswordRight(loginInfo, password, loginMethod)) { registerSession(request,response); response.sendRedirect("public/login.jsp"); } else response.sendRedirect("public/loginError.jsp"); } private static boolean isUserPasswordRight(String loginInfo,String password,String loginMethod) { boolean right=false; String select="select * from user"; switch (loginMethod) { case "id": select+=" where uid='"+loginInfo+"'"; break; case "name": select+=" where uname='"+loginInfo+"'"; break; case "email": select+=" where email='"+loginInfo+"'"; break; default: break; } select+=" and password='"+password+"'"; try { ConnectDatabase connectDatabase=new ConnectDatabase(); ResultSet rs=connectDatabase.exeQuery(select); if(rs.next()) right=true; connectDatabase.close(); } catch(Exception e) { e.printStackTrace(); } return right; } private void registerSession(HttpServletRequest request,HttpServletResponse response) { User user=new User(); switch (loginMethod) { case "id": user=User.getUserById(Integer.parseInt(loginInfo)); break; case "name": user=User.getUserByName(loginInfo); break; case "email": user=User.getUserByEmail(loginInfo); break; default: break; } HttpSession session=request.getSession(); session.setAttribute("user", user); } private void quit(HttpServletRequest request, HttpServletResponse response) throws IOException { HttpSession session=request.getSession(); // User user=new User(); // if(session.getAttribute("user")!=null) // user=(User)session.getAttribute("user"); session.removeAttribute("user"); response.sendRedirect("index.html"); } }
[ "lm2343635@126.com" ]
lm2343635@126.com
b32b5cfe2782018ec08d3ee7556271f0790ec1df
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/LANG-37b-1-19-FEMO-WeightedSum:TestLen:CallDiversity/org/apache/commons/lang3/ArrayUtils_ESTest.java
2af7a3a05fd26fc6849652fd0223048ac3e3b821
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
551
java
/* * This file was automatically generated by EvoSuite * Sat Apr 04 07:25:17 UTC 2020 */ package org.apache.commons.lang3; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class ArrayUtils_ESTest extends ArrayUtils_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
3629b030e1a9ccdc9fc50e81191835c66b230379
9633324216599db0cf1146770c62da8123dc1702
/src/fractalzoomer/gui/BailoutDialog.java
7d8479bfaa0e7186f23cdfba5f71b53a6fb843fd
[]
no_license
avachon100501/Fractal-Zoomer
fe3287371fd8716aa3239dd6955239f2c5d161cd
d21c173b8b12f11108bf844b53e09bc0d55ebeb5
refs/heads/master
2022-10-05T21:42:07.433545
2020-06-05T11:19:17
2020-06-05T11:19:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,792
java
/* * Copyright (C) 2020 hrkalona2 * * 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 fractalzoomer.gui; import fractalzoomer.main.MainWindow; import fractalzoomer.main.app_settings.Settings; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import javax.swing.ImageIcon; import javax.swing.JDialog; import javax.swing.JOptionPane; import javax.swing.JTextField; import static javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE; /** * * @author hrkalona2 */ public class BailoutDialog extends JDialog { private MainWindow ptra; private JOptionPane optionPane; public BailoutDialog(MainWindow ptr, Settings s) { super(ptr); ptra = ptr; setTitle("Bailout Number"); setModal(true); setIconImage(getIcon("/fractalzoomer/icons/mandel2.png").getImage()); JTextField field = new JTextField(); field.addAncestorListener(new RequestFocusListener()); field.setText("" + s.fns.bailout); Object[] message3 = { " ", "You are using " + s.fns.bailout + " for bailout number.\nEnter the new bailout number.", field, " ",}; optionPane = new JOptionPane(message3, JOptionPane.QUESTION_MESSAGE, JOptionPane.OK_CANCEL_OPTION, null, null, null); setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent we) { optionPane.setValue(new Integer(JOptionPane.CLOSED_OPTION)); } }); optionPane.addPropertyChangeListener( new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent e) { String prop = e.getPropertyName(); if (isVisible() && (e.getSource() == optionPane) && (prop.equals(JOptionPane.VALUE_PROPERTY))) { Object value = optionPane.getValue(); if (value == JOptionPane.UNINITIALIZED_VALUE) { //ignore reset return; } //Reset the JOptionPane's value. //If you don't do this, then if the user //presses the same button next time, no //property change event will be fired. optionPane.setValue(JOptionPane.UNINITIALIZED_VALUE); if ((Integer) value == JOptionPane.CANCEL_OPTION || (Integer) value == JOptionPane.NO_OPTION || (Integer) value == JOptionPane.CLOSED_OPTION) { dispose(); return; } try { double temp = Double.parseDouble(field.getText()); if (temp <= 0) { JOptionPane.showMessageDialog(ptra, "Bailout value must be greater than 0.", "Error!", JOptionPane.ERROR_MESSAGE); return; } else if (temp > 1e70) { JOptionPane.showMessageDialog(ptra, "Bailout value must be less than 1e70.", "Error!", JOptionPane.ERROR_MESSAGE); return; } s.fns.bailout = temp; } catch (Exception ex) { JOptionPane.showMessageDialog(ptra, "Illegal Argument!", "Error!", JOptionPane.ERROR_MESSAGE); return; } dispose(); ptr.setBailoutPost(); } } }); //Make this dialog display it. setContentPane(optionPane); pack(); setResizable(false); setLocation((int) (ptra.getLocation().getX() + ptra.getSize().getWidth() / 2) - (getWidth() / 2), (int) (ptra.getLocation().getY() + ptra.getSize().getHeight() / 2) - (getHeight() / 2)); setVisible(true); } private ImageIcon getIcon(String path) { return new ImageIcon(getClass().getResource(path)); } }
[ "hrkalona@gmail.com" ]
hrkalona@gmail.com
4864d220ba28c7d4a84ee23a25fe9867d9034631
4f42ff2ca076a23164341bdaefb75897a95c4b8e
/simple-spring/src/main/java/com/haozi/spring/simple/controller/ListController.java
5d033a08b78c067737535e3e029771e99ffed1c5
[]
no_license
haoziapple/spring_component
7c8b8d0cd29f311030e18580eb435b8aa2c8ec83
6124a83e207094529787b93f22c2bd67fa03c6d2
refs/heads/master
2021-01-20T14:25:17.712667
2018-01-05T02:54:37
2018-01-05T02:54:37
90,608,857
1
0
null
null
null
null
UTF-8
Java
false
false
667
java
package com.haozi.spring.simple.controller; import java.util.Arrays; import java.util.HashMap; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; @Controller public class ListController { @RequestMapping("/list") public ModelAndView list(HttpServletRequest req, HttpServletResponse rsp) { Map map = new HashMap(); map.put("cityList", Arrays.asList("山东", "北京", "上海")); return new ModelAndView("list", map); } }
[ "haozixiaowang@163.com" ]
haozixiaowang@163.com
1186b18f408c405d781fbe30275b91e975c1fe2d
3bcea24bd80d1785fd64cd7508a8b31decf2098b
/platforms/bukkit/src/main/java/com/khorn/terraincontrol/bukkit/BukkitMaterialData.java
24a02c88a9774b801d335a5bbdd709a9bdb567ab
[]
no_license
CannibalVox/TerrainControl
13775406d71837a7e35d363cd3f9cb0a1814c92f
3728b84807bc23088404ed71acc2496d75f8eb38
refs/heads/master
2023-03-12T07:45:27.820620
2015-07-19T03:01:42
2015-07-19T03:01:42
32,650,253
1
1
null
2022-07-27T01:32:44
2015-03-21T21:15:14
Java
UTF-8
Java
false
false
6,151
java
package com.khorn.terraincontrol.bukkit; import com.khorn.terraincontrol.LocalMaterialData; import com.khorn.terraincontrol.TerrainControl; import com.khorn.terraincontrol.util.helpers.BlockHelper; import com.khorn.terraincontrol.util.minecraftTypes.DefaultMaterial; import net.minecraft.server.v1_7_R4.Block; import net.minecraft.server.v1_7_R4.BlockFalling; import net.minecraft.server.v1_7_R4.Blocks; import java.util.IdentityHashMap; import java.util.Map; /** * Implementation of LocalMaterial that wraps one of Minecraft's Blocks. * */ public class BukkitMaterialData implements LocalMaterialData { /** * Caches all unique blocks with their BukkitMaterialData equivalent. If * uncached you'll easily see more than 50000 BukkitMaterialData instances * in memory. Doens't support block data. */ private static final Map<Block, BukkitMaterialData> CACHE = new IdentityHashMap<Block, BukkitMaterialData>(); /** * Gets a {@code BukkitMaterialData} of the given id and data. * @param id The block id. * @param data The block data. * @return The {@code BukkitMateialData} instance. */ public static BukkitMaterialData ofIds(int id, int data) { return ofMinecraftBlock(Block.getById(id), data); } /** * Gets a {@code BukkitMaterialData} of the given material and data. * @param material The material. * @param data The block data. * @return The {@code BukkitMateialData} instance. */ public static BukkitMaterialData ofDefaultMaterial(DefaultMaterial material, int data) { return ofIds(material.id, data); } /** * Gets a {@code BukkitMaterialData} of the given Minecraft block and data. * @param material The material. * @param data The block data. * @return The {@code BukkitMateialData} instance. */ public static BukkitMaterialData ofMinecraftBlock(Block block, int data) { if (data != 0) { // Cache doens't support block data return new BukkitMaterialData(block, data); } BukkitMaterialData cached = CACHE.get(block); if (cached != null) { // Found cache entry return cached; } // Create cache entry BukkitMaterialData newObject = new BukkitMaterialData(block, data); CACHE.put(block, newObject); return newObject; } private final Block block; private final byte data; private BukkitMaterialData(Block block, int data) { this.block = block; this.data = (byte) data; } @Override public boolean canSnowFallOn() { return toDefaultMaterial().canSnowFallOn(); } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof BukkitMaterialData)) { return false; } BukkitMaterialData other = (BukkitMaterialData) obj; if (!block.equals(other.block)) { return false; } if (data != other.data) { return false; } return true; } @Override public byte getBlockData() { return data; } @Override public int getBlockId() { return Block.getId(block); } @Override public String getName() { DefaultMaterial defaultMaterial = toDefaultMaterial(); if (defaultMaterial == DefaultMaterial.UNKNOWN_BLOCK) { // Use Minecraft's name if (data != 0) { return Block.REGISTRY.c(block) + ":" + data; } return Block.REGISTRY.c(block); } else { // Use our name if (data != 0) { return defaultMaterial.name() + ":" + data; } return defaultMaterial.name(); } } @Override public int hashCode() { // From 4096 to 69632 when there are 4096 block ids return TerrainControl.SUPPORTED_BLOCK_IDS + getBlockId() * 16 + data; } @Override public int hashCodeWithoutBlockData() { // From 0 to 4095 when there are 4096 block ids return getBlockId(); } @Override public boolean isLiquid() { return block.getMaterial().isLiquid(); } @Override public boolean isMaterial(DefaultMaterial material) { return material.id == getBlockId(); } @Override public boolean isSolid() { // Let us override whether materials are solid DefaultMaterial defaultMaterial = toDefaultMaterial(); if (defaultMaterial != DefaultMaterial.UNKNOWN_BLOCK) { return defaultMaterial.isSolid(); } return block.getMaterial().isSolid(); } @Override public DefaultMaterial toDefaultMaterial() { return DefaultMaterial.getMaterial(getBlockId()); } @Override public String toString() { return getName(); } @Override public LocalMaterialData withBlockData(int i) { if (i == this.data) { return this; } return new BukkitMaterialData(block, i); } public Block internalBlock() { return block; } @Override public LocalMaterialData rotate() { // Try to rotate DefaultMaterial defaultMaterial = toDefaultMaterial(); if (defaultMaterial != DefaultMaterial.UNKNOWN_BLOCK) { // We only know how to rotate vanilla blocks int newData = BlockHelper.rotateData(defaultMaterial, data); if (newData != data) { return new BukkitMaterialData(block, newData); } } // No changes, return object itself return this; } @Override public boolean isAir() { return block == Blocks.AIR; } @Override public boolean canFall() { return block instanceof BlockFalling; } }
[ "rutger.kok@live.com" ]
rutger.kok@live.com
12835cf50c5431fb6dec2f8fe51c08a20704bfc8
1951984a99bbb51455db65fc73c0063fa360f2d9
/app/src/main/java/com/fy/adapter/VideoAdapter.java
136895b1861a3ac3781812d5c91b8e155f64704f
[]
no_license
tankangbing/foshanlibrary
8c4adb50926880317607813023b7353c4d034ef6
0e4745dfe948520a27101787571eadc1ba1a1a1a
refs/heads/master
2021-01-01T16:18:29.842676
2017-07-20T07:41:40
2017-07-20T07:41:40
97,806,117
0
0
null
null
null
null
UTF-8
Java
false
false
2,458
java
package com.fy.adapter; import com.fy.data.RemenData; import com.fy.tool.AnimateFirstDisplayListener; import com.fy.wo.R; import com.nostra13.universalimageloader.core.DisplayImageOptions; import com.nostra13.universalimageloader.core.ImageLoader; import android.content.Context; import android.graphics.Bitmap; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.TextView; public class VideoAdapter extends BaseAdapter { private ImageLoader imageLoader; private DisplayImageOptions options; private AnimateFirstDisplayListener aDisplayListener = new AnimateFirstDisplayListener(); private Context context; private RemenData data; public VideoAdapter(Context context, RemenData data) { this.data = data; this.context = context; options = new DisplayImageOptions.Builder().cacheInMemory(true) .cacheOnDisc(true).bitmapConfig(Bitmap.Config.RGB_565).build(); imageLoader = ImageLoader.getInstance(); } @Override public int getCount() { // TODO Auto-generated method stub return data.IMG_DESCRIPTIONS.size(); } @Override public Object getItem(int position) { // TODO Auto-generated method stub return data.IMG_DESCRIPTIONS.get(position); } @Override public long getItemId(int position) { // TODO Auto-generated method stub return position; } @Override public View getView(int position, View convertView, ViewGroup parent) { // TODO Auto-generated method stub ViewHolder viewHolder; if (convertView == null) { convertView = LayoutInflater.from(context).inflate( R.layout.video_item, null); viewHolder = new ViewHolder(); viewHolder.title = (TextView) convertView .findViewById(R.id.kecheng_Title1); viewHolder.image = (ImageView) convertView .findViewById(R.id.kecheng_Img1); viewHolder.author = (TextView) convertView .findViewById(R.id.kecheng_Author1); convertView.setTag(viewHolder); } else { viewHolder = (ViewHolder) convertView.getTag(); } RemenData.Data listdata = data.IMG_DESCRIPTIONS.get(position); viewHolder.title.setText(listdata.vname); viewHolder.author.setText(listdata.vauthor); imageLoader.displayImage(listdata.vurl, viewHolder.image, options, aDisplayListener); return convertView; } static class ViewHolder { public ImageView image; public TextView title; public TextView author; } }
[ "1152708287@qq.com" ]
1152708287@qq.com
f200bdcb64e9b7270afe36fd1dff977c33cf9946
b90d422bf74e904ce760a3fe6b940c1af99f5877
/src/main/java/dong/login/controller/LoginController.java
4603f66f3d6f1aa1cc1768bf6ab066a3760698df
[]
no_license
526dong/train-01
132c62cde102f1a248e197d7fa494263c602da2b
3039507776b8277187d1467fb03bb0361acbeec1
refs/heads/master
2021-05-05T05:25:03.935788
2018-01-24T03:44:50
2018-01-24T03:44:50
118,707,964
0
0
null
null
null
null
UTF-8
Java
false
false
641
java
package dong.login.controller; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; /** * @author Created by xzd on 2017/11/28. * @Description */ @Controller @RequestMapping(value = "/login") public class LoginController { private static final Logger logger = LoggerFactory.getLogger(LoginController.class); @GetMapping("/test") public void test (){ System.out.println("进来了"); System.out.println("啦啦啦啦啦"); } }
[ "1476719022@qq.com" ]
1476719022@qq.com
45f17ef4cc199d266d986efb426dad9df1b21781
746572ba552f7d52e8b5a0e752a1d6eb899842b9
/JDK8Source/src/main/java/java/security/cert/CertStoreParameters.java
803b0481f310dcc64b33be3b22210ef3cb8a5d54
[]
no_license
lobinary/Lobinary
fde035d3ce6780a20a5a808b5d4357604ed70054
8de466228bf893b72c7771e153607674b6024709
refs/heads/master
2022-02-27T05:02:04.208763
2022-01-20T07:01:28
2022-01-20T07:01:28
26,812,634
7
5
null
null
null
null
UTF-8
Java
false
false
3,810
java
/***** Lobxxx Translate Finished ******/ /* * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package java.security.cert; /** * A specification of {@code CertStore} parameters. * <p> * The purpose of this interface is to group (and provide type safety for) * all {@code CertStore} parameter specifications. All * {@code CertStore} parameter specifications must implement this * interface. * <p> * Typically, a {@code CertStoreParameters} object is passed as a parameter * to one of the {@link CertStore#getInstance CertStore.getInstance} methods. * The {@code getInstance} method returns a {@code CertStore} that * is used for retrieving {@code Certificate}s and {@code CRL}s. The * {@code CertStore} that is returned is initialized with the specified * parameters. The type of parameters needed may vary between different types * of {@code CertStore}s. * * <p> *  {@code CertStore}参数的规范。 * <p> *  此接口的目的是对所有{@code CertStore}参数规范进行分组(并提供类型安全性)。所有{@code CertStore}参数规范必须实现此接口。 * <p> *  通常,{@code CertStoreParameters}对象作为参数传递到{@link CertStore#getInstance CertStore.getInstance}方法之一。 * {@code getInstance}方法返回用于检索{@code Certificate}和{@code CRL}的{@code CertStore}。 * 返回的{@code CertStore}将使用指定的参数初始化。所需的参数类型可能因不同类型的{@code CertStore}而异。 * * * @see CertStore#getInstance * * @since 1.4 * @author Steve Hanna */ public interface CertStoreParameters extends Cloneable { /** * Makes a copy of this {@code CertStoreParameters}. * <p> * The precise meaning of "copy" may depend on the class of * the {@code CertStoreParameters} object. A typical implementation * performs a "deep copy" of this object, but this is not an absolute * requirement. Some implementations may perform a "shallow copy" of some * or all of the fields of this object. * <p> * Note that the {@code CertStore.getInstance} methods make a copy * of the specified {@code CertStoreParameters}. A deep copy * implementation of {@code clone} is safer and more robust, as it * prevents the caller from corrupting a shared {@code CertStore} by * subsequently modifying the contents of its initialization parameters. * However, a shallow copy implementation of {@code clone} is more * appropriate for applications that need to hold a reference to a * parameter contained in the {@code CertStoreParameters}. For example, * a shallow copy clone allows an application to release the resources of * a particular {@code CertStore} initialization parameter immediately, * rather than waiting for the garbage collection mechanism. This should * be done with the utmost care, since the {@code CertStore} may still * be in use by other threads. * <p> * Each subclass should state the precise behavior of this method so * that users and developers know what to expect. * * <p> *  制作此{@code CertStoreParameters}的副本。 * <p> *  "copy"的精确含义可能取决于{@code CertStoreParameters}对象的类。典型的实现执行该对象的"深度复制",但这不是绝对的要求。 * 一些实现可以执行该对象的一些或所有字段的"浅拷贝"。 * <p> * 请注意,{@code CertStore.getInstance}方法创建指定的{@code CertStoreParameters}的副本。 * * @return a copy of this {@code CertStoreParameters} */ Object clone(); }
[ "919515134@qq.com" ]
919515134@qq.com