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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
87683ee606ae455fdf18dc4504fb5901adad5c30 | 7bea7fb60b5f60f89f546a12b43ca239e39255b5 | /src/com/sun/org/apache/xpath/internal/operations/Minus.java | e2d35aa8cf9b461d5344ce92f763760e7f3bda18 | [] | no_license | sorakeet/fitcorejdk | 67623ab26f1defb072ab473f195795262a8ddcdd | f946930a826ddcd688b2ddbb5bc907d2fc4174c3 | refs/heads/master | 2021-01-01T05:52:19.696053 | 2017-07-15T01:33:41 | 2017-07-15T01:33:41 | 97,292,673 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,222 | java | /**
* Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
* <p>
* Copyright 1999-2004 The Apache Software Foundation.
* <p>
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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.
* <p>
* $Id: Minus.java,v 1.2.4.1 2005/09/14 21:31:44 jeffsuttor Exp $
*/
/**
* Copyright 1999-2004 The Apache Software 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.
*/
/**
* $Id: Minus.java,v 1.2.4.1 2005/09/14 21:31:44 jeffsuttor Exp $
*/
package com.sun.org.apache.xpath.internal.operations;
import com.sun.org.apache.xpath.internal.XPathContext;
import com.sun.org.apache.xpath.internal.objects.XNumber;
import com.sun.org.apache.xpath.internal.objects.XObject;
public class Minus extends Operation{
static final long serialVersionUID=-5297672838170871043L;
public XObject operate(XObject left,XObject right)
throws javax.xml.transform.TransformerException{
return new XNumber(left.num()-right.num());
}
public double num(XPathContext xctxt)
throws javax.xml.transform.TransformerException{
return (m_left.num(xctxt)-m_right.num(xctxt));
}
}
| [
"panxiaoping@9af151c5-2e68-9a40-a710-8967c58c11f7"
] | panxiaoping@9af151c5-2e68-9a40-a710-8967c58c11f7 |
22fc6f25c6e28ac3890f93d30deccdd32567a925 | d00af6c547e629983ff777abe35fc9c36b3b2371 | /jboss-all/jmx/src/main/test/compliance/ComplianceSUITE.java | c173a3232ad0e061a48c1d6ff300e12eab3c8d52 | [] | no_license | aosm/JBoss | e4afad3e0d6a50685a55a45209e99e7a92f974ea | 75a042bd25dd995392f3dbc05ddf4bbf9bdc8cd7 | refs/heads/master | 2023-07-08T21:50:23.795023 | 2013-03-20T07:43:51 | 2013-03-20T07:43:51 | 8,898,416 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,150 | java | /*
* JBoss, the OpenSource J2EE webOS
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package test.compliance;
import junit.framework.Test;
import junit.framework.TestSuite;
/**
* Everything under test.compliance is a set of unit tests
* which should pass as much as possible against the JMX RI
*
* Additions to this package are welcome/encouraged - adding a
* test that fails is a great way to communicate a bug ;-)
*
* Anyone contributing to the JBoss JMX impl should seriously
* consider providing a testcase prior to making code changes
* in the impl itself - ala XP.
*
* The only restriction is that if the tests don't succeed against
* the RI, the test error message should indicate that the test
* will fail on the RI (preferred way) or at least comment the testcase
* stating expected failures. Either way, you should comment the code
* justifying why the test is valid despite failing against the RI.
*
* @author <a href="mailto:trevor@protocool.com">Trevor Squires</a>.
*/
public class ComplianceSUITE extends TestSuite
{
public static void main(String[] args)
{
junit.textui.TestRunner.run(suite());
}
public static Test suite()
{
TestSuite suite = new TestSuite("All Compliance Tests");
suite.addTest(test.compliance.objectname.ObjectNameSUITE.suite());
suite.addTest(test.compliance.standard.StandardSUITE.suite());
suite.addTest(test.compliance.registration.RegistrationSUITE.suite());
suite.addTest(test.compliance.server.ServerSUITE.suite());
suite.addTest(test.compliance.modelmbean.ModelMBeanSUITE.suite());
suite.addTest(test.compliance.notcompliant.NCMBeanSUITE.suite());
suite.addTest(test.compliance.loading.LoadingSUITE.suite());
suite.addTest(test.compliance.varia.VariaSUITE.suite());
suite.addTest(test.compliance.query.QuerySUITE.suite());
suite.addTest(test.compliance.metadata.MetaDataSUITE.suite());
suite.addTest(test.compliance.relation.RelationSUITE.suite());
suite.addTest(test.compliance.openmbean.OpenMBeanSUITE.suite());
return suite;
}
}
| [
"rasmus@dll.nu"
] | rasmus@dll.nu |
36d18e946cec3a032c3c11981af44043127422ae | 7af846ccf54082cd1832c282ccd3c98eae7ad69a | /ftmap/src/main/java/taxi/nicecode/com/ftmap/generated/package_30/Foo47.java | 96b4f4ddbd96ba61e5da8f3948d7c7f1e5a1f9ee | [] | no_license | Kadanza/TestModules | 821f216be53897d7255b8997b426b359ef53971f | 342b7b8930e9491251de972e45b16f85dcf91bd4 | refs/heads/master | 2020-03-25T08:13:09.316581 | 2018-08-08T10:47:25 | 2018-08-08T10:47:25 | 143,602,647 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 268 | java | package taxi.nicecode.com.ftmap.generated.package_30;
public class Foo47 {
public void foo0(){
new Foo46().foo5();
}
public void foo1(){
foo0();
}
public void foo2(){
foo1();
}
public void foo3(){
foo2();
}
public void foo4(){
foo3();
}
public void foo5(){
foo4();
}
} | [
"1"
] | 1 |
9d77114e2106ce68bb59efb49c9d9208fd7a8b6a | ca9371238f2f8fbec5f277b86c28472f0238b2fe | /src/mx/com/kubo/managedbeans/mesa/administracion/BlockedPersonIMO.java | e86ea37181e7c13a85cf960dba30f2d673026d15 | [] | no_license | ocg1/kubo.portal | 64cb245c8736a1f8ec4010613e14a458a0d94881 | ab022457d55a72df73455124d65b625b002c8ac2 | refs/heads/master | 2021-05-15T17:23:48.952576 | 2017-05-08T17:18:09 | 2017-05-08T17:18:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 240 | java | package mx.com.kubo.managedbeans.mesa.administracion;
public interface BlockedPersonIMO
{
void init();
void setFile_uploaded_path(String file_uploaded_path);
void setCitizenship(Integer citizenship);
String getPath_file_LOG();
}
| [
"damian.tapia.nava@gmail.com"
] | damian.tapia.nava@gmail.com |
0229914cdce9df8b27c9fc54bc481072af691877 | 8e81d00874fc49d1cf27ed77ef30172178ae2a74 | /src/main/java/org/spongepowered/asm/mixin/transformer/throwables/MixinPreProcessorException.java | cdcc2eda6610db430f94388264fdf9570d3379ec | [
"MIT"
] | permissive | SpongePowered/Mixin | dfa495e4cd754dee67054adeb476427671c83ca4 | 155314e6e91465dad727e621a569906a410cd6f4 | refs/heads/master | 2023-08-22T08:07:00.412823 | 2021-12-01T20:33:17 | 2021-12-01T20:33:17 | 27,522,093 | 1,335 | 265 | MIT | 2023-09-05T13:47:36 | 2014-12-04T03:57:51 | Java | UTF-8 | Java | false | false | 1,892 | java | /*
* This file is part of Mixin, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package org.spongepowered.asm.mixin.transformer.throwables;
import org.spongepowered.asm.mixin.extensibility.IActivityContext;
import org.spongepowered.asm.mixin.throwables.MixinException;
/**
* Exception indicating a problem during pre-processing
*/
public class MixinPreProcessorException extends MixinException {
private static final long serialVersionUID = 1L;
public MixinPreProcessorException(String message, IActivityContext context) {
super(message, context);
}
public MixinPreProcessorException(String message, Throwable cause, IActivityContext context) {
super(message, cause, context);
}
}
| [
"adam@eq2.co.uk"
] | adam@eq2.co.uk |
ed677932e786803c31fcac91dad2bb775e5f0df8 | 22d0d341911ffe84fca1a9a6299b015a6e19c72b | /spider-app/src/main/java/com/devchen/spider/service/common/mgr/SpiderContextManager.java | 44cdc9e018472a6703436e09217d96b0cf374ee2 | [] | no_license | Dujingcen/spring-cloud-demo | 5f3808fa7eb4d692ce68cf4581299f088e1c4dbe | 9319cd81ed5c713b12ef6da0b40137f957184aa4 | refs/heads/master | 2022-11-11T07:55:03.642580 | 2019-12-25T15:24:04 | 2019-12-25T15:24:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,121 | java | package com.devchen.spider.service.common.mgr;
import com.devchen.common.constant.ResultCode;
import com.devchen.common.excpetion.FlowException;
import com.devchen.spider.enums.SpiderTaskType;
import com.devchen.spider.service.common.builder.SpiderContextBuilder;
import com.devchen.spider.service.common.entity.SpiderContext;
import com.devchen.spider.service.common.pageProcessor.AbstractPageProcessor;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Component
public class SpiderContextManager {
private final static Logger logger = Logger.getLogger(SpiderPageProcessorManager.class);
@Autowired
private List<SpiderContextBuilder> builderList = new ArrayList<>();
private Map<SpiderTaskType, SpiderContextBuilder> builderMap = new HashMap<>();
@PostConstruct
private void init() {
logger.info("[init] start to init the spider context manager");
for(SpiderContextBuilder builder : builderList) {
if(builderMap.containsKey(builder.getSpiderTaskType())) {
logger.error(String.format("[init] init the spider context manager due to exist the same spider context. spider task type [%s] exec class [%s]",
builder.getSpiderTaskType().name(), builder.getClass().getName()));
throw new FlowException(ResultCode.INNER_EXCEPTION);
}
builderMap.put(builder.getSpiderTaskType(), builder);
logger.info(String.format("[init] register spider context. spider task type [%s] exec class [%s]",
builder.getSpiderTaskType().name(), builder.getClass().getName()));
}
logger.info("[init] end to init the spider context manager");
}
public SpiderContext getContext(SpiderTaskType spiderTaskType) {
return builderMap.get(spiderTaskType).buildSpiderContext();
}
}
| [
"test@example.com"
] | test@example.com |
4239ba31130fda8f5608ef6964aceff3f0cba134 | 6591cd9a4cbab4f5d7897f857a3d5d557ddb966a | /IOCProj17-CyclicDI-UsingSetterInjection-Constructor Injection/src/main/java/com/nt/test/CyclicDITest.java | bda94257cfa66b1dc2bc19de00a17aee16659c68 | [] | no_license | nerdseeker365/NTSP611 | 96acf14783c2aa9043f5a6b43a488de3f51fec6a | 140bfd7902e5bd81b77dddc3aad600c854a951df | refs/heads/master | 2022-03-14T22:36:37.264071 | 2019-10-26T15:43:36 | 2019-10-26T15:43:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 803 | java | package com.nt.test;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import com.nt.beans.A;
import com.nt.beans.B;
public class CyclicDITest {
public static void main(String[] args) {
DefaultListableBeanFactory factory=null;
XmlBeanDefinitionReader reader=null;
A a=null;
B b=null;
//create IOC contaienr
factory=new DefaultListableBeanFactory();
reader=new XmlBeanDefinitionReader(factory);
reader.loadBeanDefinitions("com/nt/cfgs/applicationContext.xml");
//get Bean
a=factory.getBean("a1",A.class);
System.out.println(a);
System.out.println("..............................");
b=factory.getBean("b1",B.class);
System.out.println(b);
}
}
| [
"admin@DESKTOP-8KUS3QR"
] | admin@DESKTOP-8KUS3QR |
12c3307c1121de2902d950735d2a4f15d338a2ec | 766b533ea1b6db23123cce50b4643b46bcf2b42c | /dddplus-test/src/test/java/io/github/badcase/policy/InvalidPolicy.java | 038e9f051aa5b1971cc7e95bb9c0d79d68614cc3 | [
"Apache-2.0"
] | permissive | flydrm/cp-ddd-framework | fc442743f20b793664aa218f54839eeda871d841 | 02f4bfc3e307a174b2397257b77e6d7123b13914 | refs/heads/master | 2023-05-27T06:54:28.931579 | 2021-05-31T02:42:05 | 2021-05-31T02:42:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 245 | java | package io.github.badcase.policy;
import io.github.dddplus.annotation.Policy;
import io.github.dddplus.runtime.registry.mock.ext.IFooExt;
@Policy(extClazz = IFooExt.class)
public class InvalidPolicy {
// policy must implement IExtPolicy
}
| [
"funky.gao@gmail.com"
] | funky.gao@gmail.com |
2f0654ec4ff4469afe912e65b6f242d4c15d4b50 | 8c49003ae8e7b5662a9ee3c79abdb908463bef41 | /service-community/src/main/java/com/java110/community/dao/impl/InspectionTaskDetailV1ServiceDaoImpl.java | 5f77d12743fa53c611c7ee03dcf060b1d8fbcbf8 | [
"Apache-2.0"
] | permissive | java110/MicroCommunity | 1cae5db3f185207fdabe670eedf89cdc5c413676 | fbcdd1974f247b020114d3c9b3f649f9e48d3182 | refs/heads/master | 2023-08-05T13:44:19.646780 | 2023-01-09T10:09:54 | 2023-01-09T10:09:54 | 129,351,237 | 820 | 381 | Apache-2.0 | 2023-02-22T07:05:27 | 2018-04-13T05:15:52 | Java | UTF-8 | Java | false | false | 4,043 | java | /*
* Copyright 2017-2020 吴学文 and java110 team.
*
* 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.java110.community.dao.impl;
import com.alibaba.fastjson.JSONObject;
import com.java110.utils.constant.ResponseConstant;
import com.java110.utils.exception.DAOException;
import com.java110.utils.util.DateUtil;
import com.java110.core.base.dao.BaseServiceDao;
import com.java110.community.dao.IInspectionTaskDetailV1ServiceDao;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
/**
* 类表述:
* add by 吴学文 at 2022-07-04 09:27:52 mail: 928255095@qq.com
* open source address: https://gitee.com/wuxw7/MicroCommunity
* 官网:http://www.homecommunity.cn
* 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
* // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
*/
@Service("inspectionTaskDetailV1ServiceDaoImpl")
public class InspectionTaskDetailV1ServiceDaoImpl extends BaseServiceDao implements IInspectionTaskDetailV1ServiceDao {
private static Logger logger = LoggerFactory.getLogger(InspectionTaskDetailV1ServiceDaoImpl.class);
/**
* 保存巡检明细信息 到 instance
* @param info bId 信息
* @throws DAOException DAO异常
*/
@Override
public int saveInspectionTaskDetailInfo(Map info) throws DAOException {
logger.debug("保存 saveInspectionTaskDetailInfo 入参 info : {}",info);
int saveFlag = sqlSessionTemplate.insert("inspectionTaskDetailV1ServiceDaoImpl.saveInspectionTaskDetailInfo",info);
return saveFlag;
}
/**
* 查询巡检明细信息(instance)
* @param info bId 信息
* @return List<Map>
* @throws DAOException DAO异常
*/
@Override
public List<Map> getInspectionTaskDetailInfo(Map info) throws DAOException {
logger.debug("查询 getInspectionTaskDetailInfo 入参 info : {}",info);
List<Map> businessInspectionTaskDetailInfos = sqlSessionTemplate.selectList("inspectionTaskDetailV1ServiceDaoImpl.getInspectionTaskDetailInfo",info);
return businessInspectionTaskDetailInfos;
}
/**
* 修改巡检明细信息
* @param info 修改信息
* @throws DAOException DAO异常
*/
@Override
public int updateInspectionTaskDetailInfo(Map info) throws DAOException {
logger.debug("修改 updateInspectionTaskDetailInfo 入参 info : {}",info);
int saveFlag = sqlSessionTemplate.update("inspectionTaskDetailV1ServiceDaoImpl.updateInspectionTaskDetailInfo",info);
return saveFlag;
}
/**
* 查询巡检明细数量
* @param info 巡检明细信息
* @return 巡检明细数量
*/
@Override
public int queryInspectionTaskDetailsCount(Map info) {
logger.debug("查询 queryInspectionTaskDetailsCount 入参 info : {}",info);
List<Map> businessInspectionTaskDetailInfos = sqlSessionTemplate.selectList("inspectionTaskDetailV1ServiceDaoImpl.queryInspectionTaskDetailsCount", info);
if (businessInspectionTaskDetailInfos.size() < 1) {
return 0;
}
return Integer.parseInt(businessInspectionTaskDetailInfos.get(0).get("count").toString());
}
}
| [
"928255095@qq.com"
] | 928255095@qq.com |
1403af0e3c23a16c6c2667850f80c8ac287a81c5 | a6478b9ed0b37baf20f6ca254c899a94ad8930e4 | /_src/Zomato/app/src/main/java/com/androcid/zomato/view/custom/TintableImageView.java | 999c6f47c489a33f71d3363a27f7c9d851e73198 | [
"MIT",
"Apache-2.0"
] | permissive | paullewallencom/android-978-1-7864-6895-6 | 30f9e2f4d3633097da736715ae34b11d4a729a37 | c1746f95678a1cff1a5d1462c467748648bbbff8 | refs/heads/main | 2023-02-07T01:03:52.768939 | 2020-12-28T20:37:59 | 2020-12-28T20:37:59 | 319,431,044 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,591 | java | package com.androcid.zomato.view.custom;
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.widget.ImageView;
import com.androcid.zomato.R;
/**
* To handle selector tint of image view
*/
public class TintableImageView extends ImageView {
private ColorStateList tint;
public TintableImageView(Context context) {
super(context);
}
public TintableImageView(Context context, AttributeSet attrs) {
super(context, attrs);
init(context, attrs, 0);
}
public TintableImageView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
init(context, attrs, defStyle);
}
private void init(Context context, AttributeSet attrs, int defStyle) {
TypedArray a = context.obtainStyledAttributes(
attrs, R.styleable.TintableImageView, defStyle, 0);
tint = a.getColorStateList(
R.styleable.TintableImageView_tint);
a.recycle();
}
@Override
protected void drawableStateChanged() {
super.drawableStateChanged();
if (tint != null && tint.isStateful()) {
updateTintColor();
}
}
public void setColorFilter(ColorStateList tint) {
this.tint = tint;
super.setColorFilter(tint.getColorForState(getDrawableState(), 0));
}
private void updateTintColor() {
int color = tint.getColorForState(getDrawableState(), 0);
setColorFilter(color);
}
} | [
"paullewallencom@users.noreply.github.com"
] | paullewallencom@users.noreply.github.com |
a5fa4469b84e92935771bc365c6c7e5ff8808d17 | 4277f4cf6dbace9c7743d1cd280e61789f6f96a1 | /java/com/polis/gameserver/network/serverpackets/EquipUpdate.java | 88da798f301ecc9f52e77ebf327a78f94eafd763 | [] | no_license | polis77/polis_server_h5 | cad220828de29e5b5a2267e2870095145d56179d | 7e8789baa7255065962b5fdaa1aa7f379d74ff84 | refs/heads/master | 2021-01-23T21:53:34.935991 | 2017-02-25T07:35:03 | 2017-02-25T07:35:03 | 83,112,850 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,278 | java | /*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* L2J Server 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 com.polis.gameserver.network.serverpackets;
import com.polis.gameserver.model.items.L2Item;
import com.polis.gameserver.model.items.instance.L2ItemInstance;
public final class EquipUpdate extends L2GameServerPacket
{
private final L2ItemInstance _item;
private final int _change;
public EquipUpdate(L2ItemInstance item, int change)
{
_item = item;
_change = change;
}
@Override
protected final void writeImpl()
{
int bodypart = 0;
writeC(0x4b);
writeD(_change);
writeD(_item.getObjectId());
switch (_item.getItem().getBodyPart())
{
case L2Item.SLOT_L_EAR:
bodypart = 0x01;
break;
case L2Item.SLOT_R_EAR:
bodypart = 0x02;
break;
case L2Item.SLOT_NECK:
bodypart = 0x03;
break;
case L2Item.SLOT_R_FINGER:
bodypart = 0x04;
break;
case L2Item.SLOT_L_FINGER:
bodypart = 0x05;
break;
case L2Item.SLOT_HEAD:
bodypart = 0x06;
break;
case L2Item.SLOT_R_HAND:
bodypart = 0x07;
break;
case L2Item.SLOT_L_HAND:
bodypart = 0x08;
break;
case L2Item.SLOT_GLOVES:
bodypart = 0x09;
break;
case L2Item.SLOT_CHEST:
bodypart = 0x0a;
break;
case L2Item.SLOT_LEGS:
bodypart = 0x0b;
break;
case L2Item.SLOT_FEET:
bodypart = 0x0c;
break;
case L2Item.SLOT_BACK:
bodypart = 0x0d;
break;
case L2Item.SLOT_LR_HAND:
bodypart = 0x0e;
break;
case L2Item.SLOT_HAIR:
bodypart = 0x0f;
break;
case L2Item.SLOT_BELT:
bodypart = 0x10;
break;
}
writeD(bodypart);
}
}
| [
"policelazo@gmail.com"
] | policelazo@gmail.com |
580ee082408982ac68ab7847cb9ba61e7e3b42da | b2eac9fb08670c222211c2fc2c9040338a4537ba | /wx/wx-mp/src/main/java/com/berg/wx/service/WxMpMessageRouterService.java | 29894b8a2fada1a26eb7da44cfdc74c93770a308 | [] | no_license | BoGeManger/berg-wx-miniapp | a659d27bc5e071dd9e32bd545598900fe3e44d46 | d614e869f84a93fc4caf544164b58c70d6335687 | refs/heads/main | 2023-03-29T14:00:11.825442 | 2021-04-08T11:24:09 | 2021-04-08T11:24:09 | 309,624,406 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 231 | java | package com.berg.wx.service;
import me.chanjar.weixin.mp.api.WxMpMessageRouter;
import me.chanjar.weixin.mp.api.WxMpService;
public interface WxMpMessageRouterService {
WxMpMessageRouter createRouter(WxMpService service);
}
| [
"664120843@qq.com"
] | 664120843@qq.com |
f5aa7699afa8d7702435d8b22091cda8ef19df1c | 85cfc652459ca2f015aa8c8dc55240721632cee0 | /bin/platform/ext/core/testsrc/de/hybris/platform/persistence/property/PropertyJDBCTest.java | 7ad708302044cff0e94aba9c8c3fd2341e7f6c62 | [] | no_license | varshadhamal/Hybris-test | 43e5479b9909e41e6276dfde6b4f4ff1cdae9b0e | a29c6090680110ab733e2077772c9c477d497df6 | refs/heads/master | 2020-03-18T06:31:01.940494 | 2018-05-22T11:58:12 | 2018-05-22T11:58:12 | 134,400,503 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,946 | java | /*
* [y] hybris Platform
*
* Copyright (c) 2000-2016 SAP SE
* All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* 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 SAP Hybris.
*/
package de.hybris.platform.persistence.property;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import de.hybris.bootstrap.annotations.ManualTest;
import de.hybris.platform.core.PK;
import de.hybris.platform.core.Registry;
import de.hybris.platform.core.model.c2l.LanguageModel;
import de.hybris.platform.core.model.order.delivery.DeliveryModeModel;
import de.hybris.platform.jalo.order.delivery.DeliveryMode;
import de.hybris.platform.servicelayer.ServicelayerBaseTest;
import de.hybris.platform.servicelayer.i18n.CommonI18NService;
import de.hybris.platform.servicelayer.model.ModelService;
import java.util.Arrays;
import java.util.Locale;
import javax.annotation.Resource;
import org.junit.Before;
import org.junit.Test;
/**
* Tests for PropertyJDBC class. Only for manual tests, especially to proove the PLA-13083 issue. First, It's
* recommended to change the column type mapping of the DeliveryMode.name attribute in core-items.xml.
* HYBRIS_LONG_STRING will be mapped to VARCGAR2(4000) on oracle, which is what we mostly expect here.
*/
@ManualTest
public class PropertyJDBCTest extends ServicelayerBaseTest
{
@Resource
private ModelService modelService;
@Resource
private CommonI18NService commonI18NService;
private LanguageModel langDE;
/**
*
*/
@Before
public void setUp() throws Exception
{
getOrCreateLanguage("de");
langDE = commonI18NService.getLanguage("de");
assertNotNull(langDE);
}
/**
* Test method for
* {@link de.hybris.platform.persistence.property.PropertyJDBC#writeProperties(de.hybris.platform.persistence.property.EJBPropertyRowCache, de.hybris.platform.core.PK, de.hybris.platform.core.PK, de.hybris.platform.persistence.property.TypeInfoMap, boolean)}
* .
*
* for oracle only.
*/
@Test
public void testWritePropertiesWithOracleClob()
{
final DeliveryModeModel dm = modelService.create(DeliveryModeModel.class);
dm.setCode("testDM");
modelService.save(dm);
final DeliveryMode dmJalo = modelService.getSource(dm);
final PK langPK = langDE.getPk();
final PK itemPK = dmJalo.getPK();
final PK typePK = dmJalo.getComposedTypePK();
final TypeInfoMap infoMap = Registry.getCurrentTenant().getPersistenceManager().getPersistenceInfo(typePK);
final boolean localized = true;
final EJBPropertyRowCache rowCache4Test = EJBPropertyRowCache.createLocalized(langPK, 0,
Arrays.asList(DeliveryMode.DESCRIPTION, DeliveryMode.NAME));
final String descriptionCLOB = createBigString(1001); //change this value as you wish
rowCache4Test.setProperty(DeliveryMode.DESCRIPTION, langPK, descriptionCLOB);
final String nameVarchar4000 = createBigString(1001); //change this value as you wish
rowCache4Test.setProperty(DeliveryMode.NAME, langPK, nameVarchar4000);
PropertyJDBC.writeProperties(rowCache4Test, itemPK, typePK, infoMap, localized);
final DeliveryModeModel dmSaved = modelService.get(dm.getPk());
// boom !!! ???
//in case the CLOB field is placed before the varchar field...
//...the tests have shown that it fails in case of Clob field size>1000 and varcharFiled size >1000.
//But the fix should take care of the reordering of the statement
assertEquals(descriptionCLOB, dmSaved.getDescription(Locale.GERMAN));
assertEquals(nameVarchar4000, dmSaved.getName(Locale.GERMAN));
}
private String createBigString(final int size)
{
final StringBuilder strBuilder = new StringBuilder(size);
for (int i = 0; i < size; i++)
{
strBuilder.append('a');
}
return strBuilder.toString();
}
}
| [
"varsha.d.saste@accenture.com"
] | varsha.d.saste@accenture.com |
085c11046cbd33faeeb97914f9bdaf1fe0a35ad4 | 84b4e2440596e879a3d61a3f0807e4a9e2d6e9ee | /src/main/java/kerio/connect/admin/common/NamedValue.java | 4e2a1cd1d11c8fddda0ce44f212b1d2ad0fca474 | [
"Apache-2.0"
] | permissive | pascalrobert/kerio-admin | 6bb96d2c70d524a3809fea3abd0b459dcd72f93d | 6e83e7c6e4740d9bdea755d09c7e3736d585b950 | refs/heads/master | 2016-09-11T04:22:13.688518 | 2013-10-29T08:55:33 | 2013-10-29T08:55:33 | 13,856,186 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 472 | java | package kerio.connect.admin.common;
public class NamedValue {
String name;
String value;
public NamedValue() {
}
public NamedValue(String name, String value) {
this.name = name;
this.value = value;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
| [
"probert@macti.ca"
] | probert@macti.ca |
e979d651a618011e49b34cce778d9f4559103dbd | dff1127ec023fa044a90eb6a2134e8d93b25d23a | /cache/trunk/coconut-cache-test/coconut-cache-test-tck/src/main/java/org/coconut/cache/tck/service/event/EventBusShutdownLazyStart.java | ced76a8c64e9499e84d2381ee90325c1926a2637 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | codehaus/coconut | 54d98194e401bd98659de4bb72e12b7e24ba71e4 | f2bc1fc516c65a9d0fd76ffb3bb148309ef1ba76 | refs/heads/master | 2023-08-31T00:18:48.501510 | 2008-04-24T09:28:52 | 2008-04-24T09:28:52 | 36,364,856 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,475 | java | /* Copyright 2004 - 2007 Kasper Nielsen <kasper@codehaus.org> Licensed under
* the Apache 2.0 License, see http://coconut.codehaus.org/license.
*/
package org.coconut.cache.tck.service.event;
import java.util.Arrays;
import java.util.Collection;
import org.coconut.cache.service.event.CacheEvent;
import org.coconut.event.bus.EventSubscription;
import org.coconut.operations.Predicates;
import org.coconut.operations.Ops.Procedure;
import org.coconut.test.TestUtil;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
public class EventBusShutdownLazyStart extends AbstractEventTestBundle {
@Before
public void setupEventBus() {
init();
}
@Test
public void unsubscribeAllOnShutdown() {
EventSubscription es = event().subscribe(TestUtil.dummy(Procedure.class));
assertTrue(es.isValid());
assertEquals(1, event().getSubscribers().size());
shutdownAndAwaitTermination();
assertFalse(es.isValid());
assertEquals(0, event().getSubscribers().size());
}
@Test(expected = IllegalStateException.class)
public void subscribe1Shutdown() {
prestart();
c.shutdown();
event().subscribe(TestUtil.dummy(Procedure.class));
}
@Test
public void subscribe1LazyStart() {
assertFalse(c.isStarted());
event().subscribe(TestUtil.dummy(Procedure.class));
assertTrue(c.isStarted());
}
@Test(expected = IllegalStateException.class)
public void subscribe2Shutdown() {
prestart();
c.shutdown();
event().subscribe(TestUtil.dummy(Procedure.class), Predicates.TRUE);
}
@Test
public void subscribe2LazyStart() {
assertFalse(c.isStarted());
event().subscribe(TestUtil.dummy(Procedure.class), Predicates.TRUE);
assertTrue(c.isStarted());
}
@Test(expected = IllegalStateException.class)
public void subscribe3Shutdown() {
prestart();
c.shutdown();
event().subscribe(TestUtil.dummy(Procedure.class), Predicates.TRUE, "foo");
}
@Test
public void subscribe3LazyStart() {
assertFalse(c.isStarted());
event().subscribe(TestUtil.dummy(Procedure.class), Predicates.TRUE, "foo");
assertTrue(c.isStarted());
}
@Test
public void unsubscribeShutdown() {
prestart();
c.shutdown();
event().unsubscribeAll();// should not fail
}
@Test
public void unsubscribeLazyStart() {
assertFalse(c.isStarted());
event().unsubscribeAll();
assertTrue(c.isStarted());
}
@Test
public void getSubscribersShutdown() {
prestart();
c.shutdown();
assertEquals(0, event().getSubscribers().size());
}
@Test
public void getSubscribersLazyStart() {
assertFalse(c.isStarted());
assertEquals(0, event().getSubscribers().size());
assertTrue(c.isStarted());
}
@Test(expected = IllegalStateException.class)
@Ignore
public void offerShutdown() {
prestart();
c.shutdown();
// event().offer(TestUtil.dummy(CacheEvent.class));
}
@Ignore
@Test
public void offerLazyStart() {
assertFalse(c.isStarted());
// event().offer(TestUtil.dummy(CacheEvent.class));
assertTrue(c.isStarted());
}
@Test(expected = IllegalStateException.class)
public void processShutdown() {
prestart();
c.shutdown();
event().apply(TestUtil.dummy(CacheEvent.class));
}
@Test
public void processLazyStart() {
assertFalse(c.isStarted());
event().apply(TestUtil.dummy(CacheEvent.class));
assertTrue(c.isStarted());
}
@Test(expected = IllegalStateException.class)
public void offerAllShutdown() {
prestart();
c.shutdown();
event().offerAll(
(Collection) Arrays.asList(TestUtil.dummy(CacheEvent.class), TestUtil
.dummy(CacheEvent.class)));
}
@Test
public void offerAllLazyStart() {
assertFalse(c.isStarted());
event().offerAll(
(Collection) Arrays.asList(TestUtil.dummy(CacheEvent.class), TestUtil
.dummy(CacheEvent.class)));
assertTrue(c.isStarted());
}
}
| [
"kasper@0b154b62-a015-0410-9c24-a35e082c6f94"
] | kasper@0b154b62-a015-0410-9c24-a35e082c6f94 |
7554a3bd066bf96844867b64496854f0dee6a23d | a3bbeb443f4ed66c94f9019df060bf7ae2c44c7f | /test/java/src/javax/security/auth/callback/ChoiceCallback.java | d589c452867b8ac9c136f7401874b38f581a7dc7 | [] | no_license | FLC-project/ebison | d2bbab99a1b17800cb64e513d6bb2811e5ddb070 | 69da710bdd63a5d83af9f67a3d1fb9ba44524173 | refs/heads/master | 2021-08-29T05:36:39.118743 | 2021-08-22T09:45:51 | 2021-08-22T09:45:51 | 34,455,631 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,166 | java | /*
* @(#)ChoiceCallback.java 1.14 02/02/25
*
* Copyright 2002 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package javax.security.auth.callback;
/**
* <p> Underlying security services instantiate and pass a
* <code>ChoiceCallback</code> to the <code>handle</code>
* method of a <code>CallbackHandler</code> to display a list of choices
* and to retrieve the selected choice(s).
*
* @version 1.14, 02/25/02
* @see javax.security.auth.callback.CallbackHandler
*/
public class ChoiceCallback implements Callback, java.io.Serializable {
/**
* @serial
* @since 1.4
*/
private String prompt;
/**
* @serial the list of choices
* @since 1.4
*/
private String[] choices;
/**
* @serial the choice to be used as the default choice
* @since 1.4
*/
private int defaultChoice;
/**
* @serial whether multiple selections are allowed from the list of
* choices
* @since 1.4
*/
private boolean multipleSelectionsAllowed;
/**
* @serial the selected choices, represented as indexes into the
* <code>choices</code> list.
* @since 1.4
*/
private int[] selections;
/**
* Construct a <code>ChoiceCallback</code> with a prompt,
* a list of choices, a default choice, and a boolean specifying
* whether or not multiple selections from the list of choices are allowed.
*
* <p>
*
* @param prompt the prompt used to describe the list of choices. <p>
*
* @param choices the list of choices. <p>
*
* @param defaultChoice the choice to be used as the default choice
* when the list of choices are displayed. This value
* is represented as an index into the
* <code>choices</code> array. <p>
*
* @param multipleSelectionsAllowed boolean specifying whether or
* not multiple selections can be made from the
* list of choices.
*
* @exception IllegalArgumentException if <code>prompt</code> is null,
* if <code>prompt</code> has a length of 0,
* if <code>choices</code> is null,
* if <code>choices</code> has a length of 0,
* if any element from <code>choices</code> is null,
* if any element from <code>choices</code>
* has a length of 0 or if <code>defaultChoice</code>
* does not fall within the array boundaries of
* <code>choices</code>.
*/
public ChoiceCallback(String prompt, String[] choices,
int defaultChoice, boolean multipleSelectionsAllowed) {
if (prompt == null || prompt.length() == 0 ||
choices == null || choices.length == 0 ||
defaultChoice < 0 || defaultChoice >= choices.length)
throw new IllegalArgumentException();
for (int i = 0; i < choices.length; i++) {
if (choices[i] == null || choices[i].length() == 0)
throw new IllegalArgumentException();
}
this.prompt = prompt;
this.choices = choices;
this.defaultChoice = defaultChoice;
this.multipleSelectionsAllowed = multipleSelectionsAllowed;
}
/**
* Get the prompt.
*
* <p>
*
* @return the prompt.
*/
public String getPrompt() {
return prompt;
}
/**
* Get the list of choices.
*
* <p>
*
* @return the list of choices.
*/
public String[] getChoices() {
return choices;
}
/**
* Get the defaultChoice.
*
* <p>
*
* @return the defaultChoice, represented as an index into
* the <code>choices</code> list.
*/
public int getDefaultChoice() {
return defaultChoice;
}
/**
* Get the boolean determining whether multiple selections from
* the <code>choices</code> list are allowed.
*
* <p>
*
* @return whether multiple selections are allowed.
*/
public boolean allowMultipleSelections() {
return multipleSelectionsAllowed;
}
/**
* Set the selected choice.
*
* <p>
*
* @param selection the selection represented as an index into the
* <code>choices</code> list.
*
* @see #getSelectedIndexes
*/
public void setSelectedIndex(int selection) {
this.selections = new int[1];
this.selections[0] = selection;
}
/**
* Set the selected choices.
*
* <p>
*
* @param selections the selections represented as indexes into the
* <code>choices</code> list.
*
* @exception UnsupportedOperationException if multiple selections are
* not allowed, as determined by
* <code>allowMultipleSelections</code>.
*
* @see #getSelectedIndexes
*/
public void setSelectedIndexes(int[] selections) {
if (!multipleSelectionsAllowed)
throw new UnsupportedOperationException();
this.selections = selections;
}
/**
* Get the selected choices.
*
* <p>
*
* @return the selected choices, represented as indexes into the
* <code>choices</code> list.
*
* @see #setSelectedIndexes
*/
public int[] getSelectedIndexes() {
return selections;
}
}
| [
"luca.breveglieri@polimi.it"
] | luca.breveglieri@polimi.it |
4b40069938605927f2e61556607d90edcda51023 | ddc6a947c1e56465e89d9275ae16d0bad048cb67 | /redpepper/redpepper-dao/src/main/java/com/mongo/test/service/dao/access/test/CommentBlockDaoService.java | 841d60b513ae64de11b656c4ebffddb5adad6c8a | [] | no_license | TalanLabs/SynaptixLibs | 15ad37af6fd575f6e366deda761ba650d9e18237 | cbff7279e1f2428754fce3d83fcec5a834898747 | refs/heads/master | 2020-03-22T16:08:53.617289 | 2018-03-07T16:07:22 | 2018-03-07T16:07:22 | 140,306,435 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 905 | java | package com.mongo.test.service.dao.access.test;
import javax.annotation.Nullable;
import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted;
import com.google.inject.name.Named;
import com.mongo.test.domain.impl.test.block.CommentBlock;
import com.mongo.test.service.dao.common.AbstractMongoDaoService;
import com.mongo.test.service.dao.common.CommonMongoDaoService;
import com.mongo.test.service.init.DbStarter;
public class CommentBlockDaoService extends AbstractMongoDaoService<CommentBlock> {
public interface Factory {
CommentBlockDaoService create(@Nullable @Assisted String dbName);
}
@Inject
public CommentBlockDaoService(DbStarter starter, CommonMongoDaoService cService, @Nullable @Assisted String dbName, @Named("default_db") String default_db) {
super(CommentBlock.class, starter.getDatabaseByName((dbName == null ? default_db : dbName)), cService);
}
}
| [
"gabriel.allaigre@synaptix-labs.com"
] | gabriel.allaigre@synaptix-labs.com |
c02af7de8a30b96fbd62ee1a6c826351f9583ff1 | 89d281c03531f10209e0c9e2d71fea01b39c1f98 | /testData/mapping/MapperWithBuilderAndBeanMappingDisabledBuilder.java | fc5fc2c35dff10c04b2ca649ab02eebe88b90577 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | quhong/mapstruct-idea | b82c49493b51654d20f3e619306e85f3dd2becd5 | deae6eec9666702bac882419e542f09fa9bba0f1 | refs/heads/master | 2023-08-21T05:53:20.157327 | 2021-10-30T11:18:26 | 2021-10-30T11:18:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,041 | java | /*
* Copyright MapStruct Authors.
*
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
*/
package org.mapstruct.ap.test.complex;
import java.util.List;
import org.mapstruct.BeanMapping;
import org.mapstruct.Builder;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
@Mapper
public interface CarMapper {
@BeanMapping(builder = @Builder(disableBuilder = true))
@Mapping(target = "<caret>")
Target map(String source);
class Target {
private String targetValue;
public String getTargetValue() {
return targetValue;
}
public void setTargetValue(String targetValue) {
this.targetValue = targetValue;
}
public static Builder builder() {
return null;
}
public static class Builder {
public Builder builderValue(String address) {
}
public Target build() {
return null;
}
}
}
}
| [
"filip.hrisafov@gmail.com"
] | filip.hrisafov@gmail.com |
b5f86a7d092a27d72ec2739b6defc0c005ebe157 | fd9da616c35dff8ed32730ef4db3e768de33cdf7 | /java-vertx-server/src/main/java/io/swagger/server/api/model/PriceType.java | 470d1f251ef4f9502f7745722e5b42f0fde1a49c | [] | no_license | gythialy/sonata4j | 7a92282e7e5caf7655f3785a550df83024613673 | 12b8e74b4dc8d1230f82122f29d8d4f9361b869b | refs/heads/master | 2022-06-23T09:43:53.262799 | 2020-05-09T04:01:11 | 2020-05-09T04:01:11 | 262,467,256 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 720 | java | package io.swagger.server.api.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
/**
* Gets or Sets PriceType
*/
public enum PriceType {
RECURRING("recurring"),
NONRECURRING("nonRecurring");
private String value;
PriceType(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static PriceType fromValue(String text) {
for (PriceType b : PriceType.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
} | [
"gythialy.koo+github@gmail.com"
] | gythialy.koo+github@gmail.com |
73ee60abf7551bf1b9dfbda2a09d99973c41ed3d | 3fb8acf2d6eaf3d458c00d1cfd5518bfc8847a54 | /liquibase-common/src/main/java/liquibase/item/datatype/DataTypeLogicFactory.java | 25e2a0081dc66cfc20c87c92e4b8c2126fb2faf7 | [] | no_license | liquibase/liquibase4 | b6df61f2b20c92e8fee21c37076685a9c70b5466 | b868890e2ab093d61b55ef0c9b7819da2d4204e1 | refs/heads/master | 2023-06-30T01:31:46.329261 | 2016-05-27T16:36:48 | 2016-05-27T16:36:48 | 50,212,230 | 3 | 2 | null | 2016-05-05T15:08:07 | 2016-01-22T22:45:58 | Java | UTF-8 | Java | false | false | 782 | java | package liquibase.item.datatype;
import liquibase.Scope;
import liquibase.plugin.AbstractPluginFactory;
public class DataTypeLogicFactory extends AbstractPluginFactory<DataTypeLogic> {
/**
* Constructor is protected because it should be used as a singleton.
*/
protected DataTypeLogicFactory(Scope scope) {
super(scope);
}
@Override
protected Class<DataTypeLogic> getPluginClass() {
return DataTypeLogic.class;
}
@Override
protected int getPriority(DataTypeLogic obj, Scope scope, Object... args) {
DataType type = (DataType) args[0];
return obj.getPriority(type, scope);
}
public DataTypeLogic getDataTypeLogic(DataType type, Scope scope) {
return this.getPlugin(scope, type);
}
}
| [
"nathan@voxland.net"
] | nathan@voxland.net |
216690b8c6ae21536e00ace87347c0f5e62d9299 | 7016cec54fb7140fd93ed805514b74201f721ccd | /ui/web/main/src/java/com/echothree/ui/web/main/action/configuration/geocodecurrency/EditActionForm.java | 31c6799c842fc99d046357da1380a0e330631fdc | [
"MIT",
"Apache-1.1",
"Apache-2.0"
] | permissive | echothreellc/echothree | 62fa6e88ef6449406d3035de7642ed92ffb2831b | bfe6152b1a40075ec65af0880dda135350a50eaf | refs/heads/master | 2023-09-01T08:58:01.429249 | 2023-08-21T11:44:08 | 2023-08-21T11:44:08 | 154,900,256 | 5 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,214 | java | // --------------------------------------------------------------------------------
// Copyright 2002-2023 Echo Three, LLC
//
// 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.echothree.ui.web.main.action.configuration.geocodecurrency;
import com.echothree.view.client.web.struts.BaseActionForm;
import com.echothree.view.client.web.struts.sprout.annotation.SproutForm;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionMapping;
@SproutForm(name="GeoCodeCurrencyEdit")
public class EditActionForm
extends BaseActionForm {
private String geoCodeName;
private String currencyIsoName;
private Boolean isDefault;
private String sortOrder;
public String getGeoCodeName() {
return geoCodeName;
}
public void setGeoCodeName(String geoCodeName) {
this.geoCodeName = geoCodeName;
}
public String getCurrencyIsoName() {
return currencyIsoName;
}
public void setCurrencyIsoName(String currencyIsoName) {
this.currencyIsoName = currencyIsoName;
}
public Boolean getIsDefault() {
return isDefault;
}
public void setIsDefault(Boolean isDefault) {
this.isDefault = isDefault;
}
public String getSortOrder() {
return sortOrder;
}
public void setSortOrder(String sortOrder) {
this.sortOrder = sortOrder;
}
@Override
public void reset(ActionMapping mapping, HttpServletRequest request) {
super.reset(mapping, request);
isDefault = Boolean.FALSE;
}
}
| [
"rich@echothree.com"
] | rich@echothree.com |
78105ba64d8b92f8cb8c386b36420e5862196c72 | 5e14786bb9d356a7735985bc0adc4acc7b4ecdcf | /src/main/java/org/jeecgframework/web/system/pojo/base/TSUserOrg.java | 7a678d43796f0a87743d26524a08855157b5cec7 | [] | no_license | zskang/jeecg-humSystem | bc3db30cca3cdcebd30910a8ccc663d86804ae00 | a524bedd77dcd551e40a876780f8ebb3a48bdede | refs/heads/master | 2020-12-25T15:17:51.864453 | 2016-09-12T11:49:48 | 2016-09-12T11:49:48 | 66,537,154 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 760 | java | package org.jeecgframework.web.system.pojo.base;
import org.jeecgframework.core.common.entity.IdEntity;
import javax.persistence.*;
@Entity
@Table(name = "t_s_user_org")
public class TSUserOrg extends IdEntity implements java.io.Serializable {
private TSUser tsUser;
private TSDepart tsDepart;
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "user_id")
public TSUser getTsUser() {
return tsUser;
}
public void setTsUser(TSUser tsDepart) {
this.tsUser = tsDepart;
}
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "org_id")
public TSDepart getTsDepart() {
return tsDepart;
}
public void setTsDepart(TSDepart tsDepart) {
this.tsDepart = tsDepart;
}
}
| [
"253479240@qq.com"
] | 253479240@qq.com |
938012c16bea30941432cc95d11ccd3e4eaf577c | adf0e3b6818480ad11162dc28a7504a4e5d6dddc | /dangyuan-common/src/main/java/com/telecom/jx/dangyuan/util/CryptographyUtil.java | d45f2812819e6a661ee728232517aaaf13f23a0a | [] | no_license | wkkbox/DangYuan | 417c373288de82ffc1ac3c317281b76e9a54e708 | 6eb6c17c56893289fea92042d2a58d171cb3f142 | refs/heads/master | 2021-04-30T10:23:11.493132 | 2018-04-27T02:42:46 | 2018-04-27T02:42:46 | 121,332,057 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,225 | java | package com.telecom.jx.dangyuan.util;
import org.apache.shiro.codec.Base64;
import org.apache.shiro.crypto.hash.SimpleHash;
public class CryptographyUtil {
/**
* base64加密
*
* @param str
* @return
*/
public static String encBase64(String str) {
return Base64.encodeToString(str.getBytes());
}
/**
* base64解密
*
* @param str
* @return
*/
public static String decBase64(String str) {
return Base64.decodeToString(str);
}
/**
* Md5加密
*
* @param source
* @param salt
* @param hashIterations
* @return
*/
public static String md5(String source, String salt, int hashIterations) {
return new SimpleHash("MD5", source, salt, hashIterations).toString();
}
public static void main(String[] args) {
String password = "Ad123@min";
String password2 = "654321";
System.out.println("Base64加密" + CryptographyUtil.encBase64(password));
System.out.println("Base64解密" + CryptographyUtil.decBase64(CryptographyUtil.encBase64(password)));
System.out.println("Md5加密" + CryptographyUtil.md5(password2, "dangyuan", 2));
}
}
| [
"you@example.com"
] | you@example.com |
f836beabdb390ba0e8eeff974e91d8dad406dfd9 | 995f73d30450a6dce6bc7145d89344b4ad6e0622 | /P40_HarmonyOS_2.0.0_Developer_Beta1/src/main/java/ohos/agp/render/render3d/impl/$$Lambda$FYmfdL3V8kbUOVXOmz02MSn31I.java | 53e4744337514dccdffcbc653cabb21d80aad01b | [] | no_license | morningblu/HWFramework | 0ceb02cbe42585d0169d9b6c4964a41b436039f5 | 672bb34094b8780806a10ba9b1d21036fd808b8e | refs/heads/master | 2023-07-29T05:26:14.603817 | 2021-09-03T05:23:34 | 2021-09-03T05:23:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 743 | java | package ohos.agp.render.render3d.impl;
import java.util.function.Function;
import ohos.agp.render.render3d.components.NodeComponent;
/* renamed from: ohos.agp.render.render3d.impl.-$$Lambda$FYmfdL3V8-kbUOVXOmz02MSn31I reason: invalid class name */
/* compiled from: lambda */
public final /* synthetic */ class $$Lambda$FYmfdL3V8kbUOVXOmz02MSn31I implements Function {
public static final /* synthetic */ $$Lambda$FYmfdL3V8kbUOVXOmz02MSn31I INSTANCE = new $$Lambda$FYmfdL3V8kbUOVXOmz02MSn31I();
private /* synthetic */ $$Lambda$FYmfdL3V8kbUOVXOmz02MSn31I() {
}
@Override // java.util.function.Function
public final Object apply(Object obj) {
return Boolean.valueOf(((NodeComponent) obj).isExported());
}
}
| [
"dstmath@163.com"
] | dstmath@163.com |
f9d7170cf969e9cb6206f426ec1723b64ff4359b | d47b5071fa2721ef1f8aacbadf01394384fb5f1a | /Prog Fund 05.2018/PF-Exercises/09. Strings-and-Text-Processing-Exercise/src/com/company/P09MelrahShake.java | 1c0547b63fb878ad9835f198162491335fcb0d1f | [] | no_license | HristoRaykov/TechModule-05.2018 | f040af7fde5a0b4f5de95db24cec335639edb7f7 | 2b16ac3e9b588a7689daba2ad66c30e7b9a89993 | refs/heads/master | 2022-12-09T20:26:23.268588 | 2019-12-01T21:01:22 | 2019-12-01T21:01:22 | 185,369,356 | 0 | 0 | null | 2022-12-08T17:44:29 | 2019-05-07T09:28:55 | CSS | UTF-8 | Java | false | false | 1,058 | java | package com.company;
import java.util.Scanner;
public class P09MelrahShake {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
StringBuilder text = new StringBuilder(input.nextLine());
StringBuilder pattern = new StringBuilder(input.nextLine());
while (true) {
int firstIndex = text.indexOf(String.valueOf(pattern));
int lastIndex = text.lastIndexOf(String.valueOf(pattern));
if (firstIndex == -1 || lastIndex == -1 || firstIndex == lastIndex) {
System.out.println("No shake.");
System.out.println(text);
break;
}
int firstMatchEndIndex = firstIndex + pattern.length();
text.delete(firstIndex, firstMatchEndIndex);
lastIndex = text.lastIndexOf(String.valueOf(pattern));
int lastMatchEndIndex = lastIndex + pattern.length();
text.delete(lastIndex, lastMatchEndIndex);
System.out.println("Shaked it.");
pattern.deleteCharAt(pattern.length() / 2);
if (pattern.length()==0){
System.out.println("No shake.");
System.out.println(text);
break;
}
}
}
}
| [
"hristocr@gmail.com"
] | hristocr@gmail.com |
9104d5b93109102ad72755f34d2cb90283103606 | 447520f40e82a060368a0802a391697bc00be96f | /apks/playstore_apps/com_spotify_music/source/com/facebook/ads/internal/i/b/l.java | cde08380b1635926a433dbf756728c5bf7858c54 | [
"Apache-2.0"
] | permissive | iantal/AndroidPermissions | 7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465 | d623b732734243590b5f004d167e542e2e2ae249 | refs/heads/master | 2023-07-19T01:29:26.689186 | 2019-09-30T19:01:42 | 2019-09-30T19:01:42 | 107,239,248 | 0 | 0 | Apache-2.0 | 2023-07-16T07:41:38 | 2017-10-17T08:22:57 | null | UTF-8 | Java | false | false | 250 | java | package com.facebook.ads.internal.i.b;
public class l
extends Exception
{
public l(String paramString)
{
super(paramString);
}
public l(String paramString, Throwable paramThrowable)
{
super(paramString, paramThrowable);
}
}
| [
"antal.micky@yahoo.com"
] | antal.micky@yahoo.com |
c4ae19e135de174970345fb111396fc7326610ad | f6539477076aad7a37a18915531f6cae701d0484 | /java/tags/config-service-client-1.2/src/test/java/org/nhind/config/client/ConfigServiceRunner.java | e7feeae82978f1212bfb29dba32e370c16e3e613 | [] | no_license | ssavarala/nhin-d | bf3a4f4773479875972fb52f4b3aae434d7665f8 | 4208b12ba138d50c25d80849585d4b18dd5df491 | refs/heads/master | 2020-05-29T11:40:19.748872 | 2016-09-15T18:45:34 | 2016-09-15T18:45:34 | 67,622,081 | 1 | 1 | null | 2016-09-07T15:56:12 | 2016-09-07T15:56:12 | null | UTF-8 | Java | false | false | 1,458 | java | package org.nhind.config.client;
import org.apache.mina.util.AvailablePortFinder;
import org.mortbay.jetty.Server;
import org.mortbay.jetty.bio.SocketConnector;
import org.mortbay.jetty.webapp.WebAppContext;
public class ConfigServiceRunner
{
private static Server server;
private static int HTTPPort;
private static String configServiceURL;
public synchronized static void startConfigService() throws Exception
{
if (server == null)
{
/*
* Setup the configuration service server
*/
server = new Server();
SocketConnector connector = new SocketConnector();
HTTPPort = AvailablePortFinder.getNextAvailable( 1024 );
connector.setPort(HTTPPort);
WebAppContext context = new WebAppContext();
context.setContextPath("/config");
context.setServer(server);
context.setWar("war/config-service.war");
server.setSendServerVersion(false);
server.addConnector(connector);
server.addHandler(context);
server.start();
configServiceURL = "http://localhost:" + HTTPPort + "/config/ConfigurationService";
}
}
public synchronized static boolean isServiceRunning()
{
return (server != null && server.isRunning());
}
public synchronized static void shutDownConfigService() throws Exception
{
if (isServiceRunning())
{
server.stop();
server = null;
}
}
public synchronized static String getConfigServiceURL()
{
return configServiceURL;
}
} | [
"marcusm@localhost"
] | marcusm@localhost |
1bace808fc4cfde86f73dc6e11d521cba44d6953 | 2d532773b19f9d9c501629f77de95be36b9028ec | /Core/src/main/java/prompto/compiler/PromptoClassLoader.java | 38cf4dbc3c34094031af00b8bc40e010d326b6db | [] | no_license | prompto/prompto-java | 463c4ada242d49834ffd0e668c24dd70ede555ac | e629ddd3bb43bd90ba91774c970acff3d7e38d70 | refs/heads/master | 2022-12-08T09:50:36.000257 | 2022-11-27T22:33:55 | 2022-11-27T22:33:55 | 32,623,616 | 5 | 2 | null | 2022-02-16T08:12:15 | 2015-03-21T07:16:21 | Java | UTF-8 | Java | false | false | 3,968 | java | package prompto.compiler;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
import java.nio.file.Paths;
import prompto.config.TempDirectories;
import prompto.error.SyntaxError;
import prompto.runtime.Context;
import prompto.runtime.Mode;
import prompto.utils.Logger;
/* a class loader which is able to create and store classes for prompto objects */
public class PromptoClassLoader extends URLClassLoader {
static final Logger logger = new Logger();
private static ClassLoader getParentClassLoader() {
return PromptoClassLoader.class.getClassLoader();
}
private static URL[] makeClassesDirURLs() {
File classesDir = TempDirectories.getJavaClassesDir();
try {
URL[] urls = { classesDir.toURI().toURL() };
return urls;
} catch (MalformedURLException e) {
throw new RuntimeException(e);
}
}
private static PromptoClassLoader instance = null;
/* during testing, multiple threads may refer to different paths */
private static Boolean testMode;
private static ThreadLocal<PromptoClassLoader> testInstance;
public static PromptoClassLoader getInstance() {
return instance!=null ? instance : testInstance == null ? null : testInstance.get();
}
public static PromptoClassLoader initialize(Context context) {
return initialize(context, Mode.get()==Mode.UNITTEST);
}
public static PromptoClassLoader initialize(Context context, boolean testMode) {
synchronized(PromptoClassLoader.class) {
if(PromptoClassLoader.testMode==null)
PromptoClassLoader.testMode = testMode;
boolean currentMode = PromptoClassLoader.testMode;
if(currentMode!=testMode)
throw new UnsupportedOperationException("Cannot run test mode and regular mode in parallel!");
if(testMode) {
if(testInstance==null)
testInstance = new ThreadLocal<>();
testInstance.set(new PromptoClassLoader(context));
return testInstance.get();
} else {
if(instance!=null)
throw new UnsupportedOperationException("Can only have one PromptoClassLoader!");
instance = new PromptoClassLoader(context);
return instance;
}
}
}
public static void uninitialize() {
synchronized(PromptoClassLoader.class) {
if(PromptoClassLoader.testMode==null)
return;
if(PromptoClassLoader.testMode)
testInstance = null;
else
instance = null;
}
}
Context context;
private PromptoClassLoader(Context context) {
super(makeClassesDirURLs(), getParentClassLoader());
this.context = context;
}
public Context getContext() {
return context;
}
public void setContext(Context context) {
this.context = context;
}
File getClassDir() throws Exception {
return Paths.get(getURLs()[0].toURI()).toFile();
}
@Override
public Class<?> findClass(String fullName) throws ClassNotFoundException {
try {
return super.findClass(fullName);
} catch (ClassNotFoundException e) {
// is this a Prompto class ?
if(fullName.charAt(0)=='π') {
try {
createPromptoClass(fullName);
return super.findClass(fullName);
} catch (Throwable t) {
t = extractSyntaxError(t);
logger.error(()->"Compilation of " + fullName + " failed. Check: " + TempDirectories.getJavaClassesDir().getAbsolutePath(), t);
throw new ClassNotFoundException(fullName, t);
}
} else
throw e;
}
}
private void createPromptoClass(String fullName) throws Exception {
File classDir = getClassDir();
// logger.debug(()->"Compiling " + fullName + " @ " + classDir.toString());
// System.err.println("Compiling " + fullName + " @ " + classDir.toString());
Compiler compiler = new Compiler(classDir); // where to store .class
compiler.compileClass(context.getGlobalsContext(), fullName);
}
private Throwable extractSyntaxError(Throwable t) {
Throwable s = t;
while(s!=null) {
if(s instanceof SyntaxError)
return s;
if(s==s.getCause())
break;
s = s.getCause();
}
return t;
}
}
| [
"eric.vergnaud@wanadoo.fr"
] | eric.vergnaud@wanadoo.fr |
7b18784c9e0214cb9985a1541fa4fe06f4a52322 | 1c4c02554396732695034a9cd4107175fd997931 | /jaceksysiak_mywork-1/src/main/java/pl/jaceksysiak/service/FileService.java | 74e5e8fc3bb276f123120a3715e6b71ae84f0a2a | [
"MIT"
] | permissive | j4sysiak/jaceksysiak_mywork1 | 52be886d8ce0d535915d1dc04a40cf25de820b4e | 911679a373da8e01b5542f64724a569581d8854a | refs/heads/master | 2020-04-23T06:22:06.743851 | 2019-02-16T06:30:34 | 2019-02-16T06:30:34 | 170,970,817 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,991 | java | package pl.jaceksysiak.service;
import java.awt.Graphics2D;
import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Random;
import javax.imageio.ImageIO;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import pl.jaceksysiak.exceptions.ImageTooSmallException;
import pl.jaceksysiak.exceptions.InvalidFileException;
import pl.jaceksysiak.model.dto.FileInfo;
//import pl.jaceksysiak.exceptions.ImageTooSmallException;
@Service
public class FileService {
@Value("${photo.file.extensions}")
private String imageExtensions;
private Random random = new Random();
private String getFileExtensions(String filename) {
int dotPosition = filename.lastIndexOf(".");
if(dotPosition < 0) {
return null;
}
return filename.substring(dotPosition+1).toLowerCase();
}
private boolean isImageExtension(String extension) {
String testExtension = extension.toLowerCase();
for(String validExtension: imageExtensions.split(",")) {
if(testExtension.equals(validExtension)) {
return true;
}
}
return false;
}
// photo093
private File makeSubdirectory(String basePath, String prefix) {
int nDirectory = random.nextInt(1000);
String sDirectory = String.format("%s%03d", prefix, nDirectory);
File directory = new File(basePath, sDirectory);
if(!directory.exists()) {
directory.mkdir();
}
return directory;
}
public FileInfo saveImageFile(MultipartFile file,
String baseDirectory,
String subDirPrefix,
String filePrefix,
int width,
int height
) throws InvalidFileException, IOException, ImageTooSmallException {
int nFilename = random.nextInt(1000);
String filename = String.format("%s%03d", filePrefix, nFilename);
String extension = getFileExtensions(file.getOriginalFilename());
if(extension == null) {
throw new InvalidFileException("No file extension");
}
if(isImageExtension(extension) == false) {
throw new InvalidFileException("Not an image file.");
}
File subDirectory = makeSubdirectory(baseDirectory, subDirPrefix);
Path filepath = Paths.get(subDirectory.getCanonicalPath(), filename + "." + extension);
//Files.deleteIfExists(filepath);
//Files.copy(file.getInputStream(), filepath);
BufferedImage resizedImage = resizeImage(file, width, height);
ImageIO.write(resizedImage, extension, filepath.toFile());
return new FileInfo(filename, extension, subDirectory.getName(), baseDirectory);
}
private BufferedImage resizeImage(MultipartFile inputFile, int width, int height) throws IOException, ImageTooSmallException {
BufferedImage image = ImageIO.read(inputFile.getInputStream());
if(image.getWidth() < width || image.getHeight() < height) {
throw new ImageTooSmallException();
}
double widthScale = (double)width/image.getWidth();
double heightScale = (double)height/image.getHeight();
double scale = Math.max(widthScale, heightScale);
BufferedImage scaledImage = new BufferedImage((int)(scale * image.getWidth()), (int)(scale * image.getHeight()), image.getType());
Graphics2D g = scaledImage.createGraphics();
AffineTransform transform = AffineTransform.getScaleInstance(scale, scale);
g.drawImage(image, transform, null);
return scaledImage.getSubimage(0, 0, width, height);
}
}
| [
"j4sysiak@gmail.com"
] | j4sysiak@gmail.com |
9dded60db98bcab6cd8f9ef7e23f7415effe017a | 76aeea3b2b558ec8f37b18f8ce270b69083f0043 | /SpringBoot_Demos/Demo_10001_Spring_MVC_REST_CRUD_JPA_Data_XML/src/com/accenture/lkm/entity/EmployeeEntity.java | d62ce68ab08a59faa0fddd6e142a2e86399ec55d | [] | no_license | Gizmosoft/SpringBoot-Java | 6220c8e2b85aaecb21ab660e58d3d7c8014a41d1 | 8cb0e33cea4bf3d929bfaef02f8b64845032c338 | refs/heads/master | 2023-05-03T22:15:38.081722 | 2021-05-29T06:14:04 | 2021-05-29T06:14:04 | 370,910,230 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,327 | java | package com.accenture.lkm.entity;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
@Entity
@Table(name="Employee_Spring")
public class EmployeeEntity {
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
private int id;
private String name;
@Override
public String toString() {
return "EmployeeEntityBean [id=" + id + ", name=" + name + ", role="
+ role + ", insertTime=" + insertTime + ", salary=" + salary
+ "]\n";
}
private String role;
@Temporal(TemporalType.DATE)
private Date insertTime;
private Double salary;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getRole() {
return role;
}
public void setRole(String role) {
this.role = role;
}
public Date getInsertTime() {
return insertTime;
}
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
public Double getSalary() {
return salary;
}
public void setSalary(Double salary) {
this.salary = salary;
}
}
| [
"Kartikey.hebbar@gmail.com"
] | Kartikey.hebbar@gmail.com |
d2741bb073012d6430fdcbfc49e48741973106c7 | 590cebae4483121569983808da1f91563254efed | /Router/schemas-src/eps-fts-schemas/src/main/java/ru/acs/fts/schemas/album/notif_piresult/TIRDocResultType.java | a929255b03077cf81b07831b75a05c58f44d9323 | [] | no_license | ke-kontur/eps | 8b00f9c7a5f92edeaac2f04146bf0676a3a78e27 | 7f0580cd82022d36d99fb846c4025e5950b0c103 | refs/heads/master | 2020-05-16T23:53:03.163443 | 2014-11-26T07:00:34 | 2014-11-26T07:01:51 | null | 0 | 0 | null | null | null | null | WINDOWS-1251 | Java | false | false | 726 | java |
package ru.acs.fts.schemas.album.notif_piresult;
import ru.acs.fts.schemas.album.priorcommonaggregatetypescust.TIRIDType;
/**
* Информация по книжке МДП
*/
public class TIRDocResultType extends TIRIDType
{
private String PIStatus;
/**
* Get the 'PI_Status' element value. Статус предварительной информации
*
* @return value
*/
public String getPIStatus() {
return PIStatus;
}
/**
* Set the 'PI_Status' element value. Статус предварительной информации
*
* @param PIStatus
*/
public void setPIStatus(String PIStatus) {
this.PIStatus = PIStatus;
}
}
| [
"m@brel.me"
] | m@brel.me |
b7f69e291cdbe46ffba0b93ecafd9b27c7f79053 | dd68d6ade5322df4aae9b5252cded60523303880 | /plugins/bluenimble-plugin-protocols.tus/src/main/java/com/bluenimble/platform/plugins/protocols/tus/impl/exception/UploadOffsetMismatchException.java | 7bca14ee6fb5ff166db335cbcaaf51911e300445 | [
"Apache-2.0"
] | permissive | bluenimble/serverless | 55ac086eb7135ca3de67f25e7eba44357536914c | 74247628ee41ef7f54639400561859f3715566ac | refs/heads/master | 2023-08-09T03:54:52.051583 | 2023-07-25T11:51:24 | 2023-07-25T11:51:24 | 123,480,590 | 42 | 4 | Apache-2.0 | 2023-02-22T07:02:41 | 2018-03-01T19:10:38 | HTML | UTF-8 | Java | false | false | 515 | java | package com.bluenimble.platform.plugins.protocols.tus.impl.exception;
import javax.servlet.http.HttpServletResponse;
/**
* If the offsets do not match, the Server MUST respond with the
* 409 Conflict status without modifying the upload resource.
*/
public class UploadOffsetMismatchException extends TusException {
private static final long serialVersionUID = 7412336618168312418L;
public UploadOffsetMismatchException(String message) {
super(HttpServletResponse.SC_CONFLICT, message);
}
}
| [
"mloukili@bluenimble.com"
] | mloukili@bluenimble.com |
e719884272cc1ba8b50ed3bb5ab4ca4a3bf715db | 08c88fa7c2e6eb5019dbb59447d0a5a975359d1a | /basic/02_linkedlist/src/test/java/com/yangbingdong/algo/basic/linklist/MergeTwoSortedListNodeTest.java | abbbef5591213c82c4184337a33a0752c488ea85 | [] | no_license | masteranthoneyd/algo-java | f7ac4a33d90d141a07f14497302ea12d94f723e1 | b33a18341b2b6f3813632cfc11832260439f54a4 | refs/heads/master | 2023-06-30T01:46:39.885358 | 2021-07-27T09:34:06 | 2021-07-27T09:34:06 | 365,136,097 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 829 | java | package com.yangbingdong.algo.basic.linklist;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
/**
* @author <a href="mailto:yangbingdong1994@gmail.com">yangbingdong</a>
* @since
*/
class MergeTwoSortedListNodeTest {
MergeTwoSortedListNode mergeTwoSortedListNode;
@BeforeEach
void init() {
mergeTwoSortedListNode = new MergeTwoSortedListNode();
}
@Test
void testMerge1() {
ListNode l11 = new ListNode(1);
ListNode l12 = new ListNode(2);
l11.next = l12;
l12.next = new ListNode(4);
ListNode l21 = new ListNode(1);
ListNode l22 = new ListNode(3);
l21.next = l22;
l22.next = new ListNode(4);
ListNode ret = mergeTwoSortedListNode.solution(l11, l21);
System.out.println(ret);
}
}
| [
"yangbingdong1994@gmail.com"
] | yangbingdong1994@gmail.com |
a391182534e5ab303ec32a012baf013d45e85a46 | 24c066fb613f4e2f8ed0b020835a90da39254003 | /src/main/java/com/tomtom/examples/deployment/DeploymentModule.java | a26f5aa8bb6d4326fcef6f88c1ceb634ca492f24 | [
"Apache-2.0"
] | permissive | tomtom-international/speedtools-examples | 747c142b2f5828d4f3e6f0b0b9c58352008cbd24 | 418727595226442b10f8786b640ebb9181790a3c | refs/heads/master | 2023-06-26T08:05:22.090168 | 2023-04-24T07:40:26 | 2023-04-24T07:40:26 | 32,810,469 | 1 | 2 | Apache-2.0 | 2023-06-14T22:58:13 | 2015-03-24T16:22:12 | Java | UTF-8 | Java | false | false | 2,924 | java | /*
* Copyright (C) 2012-2021, TomTom (http://tomtom.com).
*
* 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.tomtom.examples.deployment;
import com.google.inject.Binder;
import com.tomtom.speedtools.guice.GuiceConfigurationModule;
import com.tomtom.speedtools.tracer.LoggingTraceHandler;
import com.tomtom.speedtools.tracer.TracerFactory;
import com.tomtom.speedtools.tracer.mongo.MongoDBTraceHandler;
import com.tomtom.speedtools.tracer.mongo.MongoDBTraceProperties;
import com.tomtom.speedtools.tracer.mongo.MongoDBTraceStream;
import javax.annotation.Nonnull;
/**
* This example class defines the deployment configuration for Google Guice.
*
* The deployment module "bootstraps" the whole Guice injection process.
*
* It bootstraps the Guice injection and specifies the property files to be read. It also needs to bind the tracer, so
* they can be used early on in the app. Finally, it can bind a "startup check" (example provided) as an eager
* singleton, so the system won't start unless a set of basic preconditions are fulfilled.
*
* The "speedtools.default.properties" is required, but its values may be overridden in other property files.
*/
public class DeploymentModule extends GuiceConfigurationModule {
public DeploymentModule() {
super(
"classpath:speedtools.default.properties", // Default set of properties required by SpeedTools.
"classpath:example.properties"); // Additional property file(s).
}
@Override
public void configure(@Nonnull final Binder binder) {
assert binder != null;
super.configure(binder);
/**
* Note: Do not bind your REST API service implementations in this module. Use separate
* modules for those, like the one in the "exampleXYZ" example directories. That keeps
* the organization of modules much cleaner.
*/
// Bind these classes if you wish to use the SpeedTools MongoDB tracing framework.
TracerFactory.setEnabled(true);
binder.bind(MongoDBTraceProperties.class).asEagerSingleton();
binder.bind(MongoDBTraceStream.class);
binder.bind(MongoDBTraceHandler.class).asEagerSingleton();
binder.bind(LoggingTraceHandler.class).asEagerSingleton();
// Bind start-up checking class (example).
binder.bind(StartupCheck.class).asEagerSingleton();
}
}
| [
"rijn@buve.nl"
] | rijn@buve.nl |
2e524a1fd388754cd03339760af518f81ee8e519 | e05cfbd438fcf584deb527779c5d4daf3e2f9963 | /src/main/java/project/gymBE/manager/managerImp/WorktimeManangerServiceImpl.java | 4fd32698261470e66622b49d356d364a6d1adcd3 | [] | no_license | phongdz-cloud/gymBE | 9a83d4b4b3f42e40c609c7ae78c4fbd9495a3f7e | 7a0f2e9d0649ace9b476ea7972eb710f9aa105f9 | refs/heads/master | 2023-08-06T05:37:00.092883 | 2021-10-09T13:52:30 | 2021-10-09T13:52:30 | 415,322,783 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,236 | java | package project.gymBE.manager.managerImp;
import java.util.List;
import java.util.stream.Collectors;
import org.modelmapper.ModelMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import project.gymBE.dto.SportsManDTO;
import project.gymBE.dto.WorktimeDTO;
import project.gymBE.entity.Gym;
import project.gymBE.entity.SportsMan;
import project.gymBE.entity.Worktime;
import project.gymBE.manager.WorktimeManagerService;
import project.gymBE.repository.GymRepository;
import project.gymBE.repository.SportsManRepository;
import project.gymBE.repository.WorktimeRepository;
import project.gymBE.service.WorktimeService;
@Transactional
@Service
public class WorktimeManangerServiceImpl implements WorktimeManagerService {
private static final ModelMapper modelMapper = new ModelMapper();
@Autowired
private WorktimeRepository worktimeRepository;
@Autowired
private WorktimeService worktimeService;
@Autowired
private GymRepository gymRepository;
@Autowired
private SportsManRepository sportsManRepository;
@Override
public void addSportsManForWork(String idSportMan, String idWorktime) {
SportsMan sportsMan = sportsManRepository.findById(idSportMan).orElse(null);
Worktime worktime = worktimeRepository.findById(idWorktime).orElse(null);
worktime.getSportsMEN().add(sportsMan);
}
@Override
public WorktimeDTO addWorktimeForGym(WorktimeDTO worktimeDTO, String idGym) {
Gym gym = gymRepository.findById(idGym).orElse(null);
Worktime worktime = modelMapper.map(worktimeDTO, Worktime.class);
return modelMapper.map(worktimeService.addWorktimeForGym(worktime, gym), WorktimeDTO.class);
}
@Override
public WorktimeDTO editWorktime(WorktimeDTO worktimeDTO, String id, String idGym) {
Worktime worktime = modelMapper.map(worktimeDTO, Worktime.class);
Worktime existsWorktime = worktimeRepository.findById(id).orElse(null);
Gym gym = gymRepository.findById(idGym).orElse(null);
return modelMapper.map(worktimeService.editWorktime(worktime, existsWorktime, gym),
WorktimeDTO.class);
}
@Override
public void deleteWorktime(String id) {
Worktime existsWorktime = worktimeRepository.findById(id).orElse(null);
worktimeRepository.delete(existsWorktime);
}
@Override
public WorktimeDTO findWorktimeById(String id) {
return modelMapper.map(worktimeRepository.findById(id).orElse(null), WorktimeDTO.class);
}
@Override
public List<WorktimeDTO> findWorktimesForGym(String idGym) {
Gym gym = gymRepository.findById(idGym).orElse(null);
List<Worktime> worktimes = gym.getWorktimes();
return worktimes.stream().map(worktime -> modelMapper.map(worktime, WorktimeDTO.class)).collect(
Collectors.toList());
}
@Override
public List<SportsManDTO> findSportsManForWorktime(String idWorktime) {
Worktime worktime = worktimeRepository.findById(idWorktime).orElse(null);
List<SportsMan> sportsMans = worktime.getSportsMEN();
return sportsMans.stream().map(sportsMan -> modelMapper.map(sportsMan, SportsManDTO.class))
.collect(
Collectors.toList());
}
}
| [
"74032468+phongdz-cloud@users.noreply.github.com"
] | 74032468+phongdz-cloud@users.noreply.github.com |
b2a298456cc490caf771c7cfb98f7263ee6decf8 | c474b03758be154e43758220e47b3403eb7fc1fc | /apk/decompiled/com.tinder_2018-07-26_source_from_JADX/sources/com/snapchat/kit/sdk/bitmoji/C7855e.java | f9207adb72c1e992a327343e9f0c2f7e1451518b | [] | no_license | EstebanDalelR/tinderAnalysis | f80fe1f43b3b9dba283b5db1781189a0dd592c24 | 941e2c634c40e5dbf5585c6876ef33f2a578b65c | refs/heads/master | 2020-04-04T09:03:32.659099 | 2018-11-23T20:41:28 | 2018-11-23T20:41:28 | 155,805,042 | 0 | 0 | null | 2018-11-18T16:02:45 | 2018-11-02T02:44:34 | null | UTF-8 | Java | false | false | 810 | java | package com.snapchat.kit.sdk.bitmoji;
import dagger.internal.C15521i;
import dagger.internal.Factory;
import java.util.concurrent.ExecutorService;
/* renamed from: com.snapchat.kit.sdk.bitmoji.e */
public final class C7855e implements Factory<ExecutorService> {
/* renamed from: a */
private final C5894b f28354a;
public /* synthetic */ Object get() {
return m33643a();
}
public C7855e(C5894b c5894b) {
this.f28354a = c5894b;
}
/* renamed from: a */
public ExecutorService m33643a() {
return (ExecutorService) C15521i.a(this.f28354a.m25442b(), "Cannot return null from a non-@Nullable @Provides method");
}
/* renamed from: a */
public static Factory<ExecutorService> m33642a(C5894b c5894b) {
return new C7855e(c5894b);
}
}
| [
"jdguzmans@hotmail.com"
] | jdguzmans@hotmail.com |
159a1d15357f606ba8aa45ddd119aca6202e7af1 | 5aac704e287e67c65124b15ea7a2182d34d6faba | /leopard-data/src/main/java/io/leopard/data/queue/AbstractQueue.java | e16f8b5eccde39908927a4d3c257ff6219fb36d4 | [] | no_license | liaohongjun1984/leopard | 529f2e4a5225a3268a1d2eab1b941f6d0feb8ec4 | d6ae0f69a77593c07ed1cabb0c37ecb5c43dbb3d | refs/heads/master | 2021-05-28T21:44:26.324886 | 2015-05-06T08:55:59 | 2015-05-06T08:55:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 298 | java | package io.leopard.data.queue;
import io.leopard.burrow.lang.ContextImpl;
public abstract class AbstractQueue extends ContextImpl implements Queue {
protected String server;
public String getServer() {
return server;
}
public void setServer(String server) {
this.server = server;
}
}
| [
"tanhaichao@gmail.com"
] | tanhaichao@gmail.com |
a1f34f1a449acdd3f3df88c1f3b89e920fc4d471 | b2d7b0517bc16e6a0cf281b1424178413b55b947 | /java-project/src15/main/java/com/eomcs/lms/handler/BoardHandler.java | 7a332093d7482a46503f3a91112455e4957cee76 | [] | no_license | gwanghosong/bitcamp-java-2018-12 | 5ea3035c1beb5b9ce7c5348503daf5ed72304dc9 | 8782553c4505c5943db0009b6a2ebf742c84e38c | refs/heads/master | 2021-08-06T20:30:07.181054 | 2019-06-26T16:18:50 | 2019-06-26T16:18:50 | 163,650,672 | 0 | 0 | null | 2020-04-30T06:28:29 | 2018-12-31T08:00:40 | Java | UTF-8 | Java | false | false | 1,057 | java | package com.eomcs.lms.handler;
import java.sql.Date;
import java.util.Scanner;
import com.eomcs.lms.domain.Board;
public class BoardHandler {
static final int LENGTH = 10;
Scanner keyboard;
Board[] boards = new Board[LENGTH];
int boardIdx = 0;
public BoardHandler(Scanner keyboard) {
this.keyboard = keyboard;
}
public void listBoard() {
for (int j = 0; j < this.boardIdx; j++) {
System.out.printf("%3d, %-20s, %s, %d\n",
this.boards[j].getNo(), this.boards[j].getContents(),
this.boards[j].getCreatedDate(), this.boards[j].getViewCount());
}
}
public void addBoard() {
Board board = new Board();
System.out.print("번호? ");
board.setNo(Integer.parseInt(this.keyboard.nextLine()));
System.out.print("내용? ");
board.setContents(this.keyboard.nextLine());
board.setCreatedDate(new Date(System.currentTimeMillis()));
board.setViewCount(0);
this.boards[this.boardIdx] = board;
this.boardIdx++;
System.out.println("저장하였습니다.");
}
}
| [
"gwanghosong91@gmail.com"
] | gwanghosong91@gmail.com |
a15a8830431e549b40b736ebfb77d5f2bab762ae | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Math/16/org/apache/commons/math3/optimization/direct/AbstractSimplex_setPoints_324.java | 8703784d0d267e810649db91f18511c71db6d30f | [] | no_license | hvdthong/NetML | dca6cf4d34c5799b400d718e0a6cd2e0b167297d | 9bb103da21327912e5a29cbf9be9ff4d058731a5 | refs/heads/master | 2021-06-30T15:03:52.618255 | 2020-10-07T01:58:48 | 2020-10-07T01:58:48 | 150,383,588 | 1 | 1 | null | 2018-09-26T07:08:45 | 2018-09-26T07:08:44 | null | UTF-8 | Java | false | false | 1,030 | java |
org apach common math3 optim direct
simplex concept
intend conjunct link simplex optim simplexoptim
initi configur simplex set constructor
link abstract simplex abstractsimplex link abstract simplex abstractsimplex
link abstract simplex abstractsimplex constructor set step
build configur unit hypercub
user call link build build method order
creat data structur act method
simplex optim simplexoptim
version
abstract simplex abstractsimplex optim data optimizationdata
replac point
note deep copi code point perform
param point point
set point setpoint point pair pointvaluepair point
point length simplex length
dimens mismatch except dimensionmismatchexcept point length simplex length
simplex point
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
6d7c8cb1159a899e9e4deea98a11c68e97d8b7ef | ea4566e00d53d0f8896a5eec7c7b9744e13d50c9 | /monapplijdbc/monapplijdbc-service/src/main/java/org/monapplijdbc/service/ServiceImpl.java | 4b24a22a338c43c000e98680cd1b5eb21d59a355 | [] | no_license | legalvincent056/Config | 7ba2608366abc493ae051105f4215986ace9f542 | 920adff0d74942daa17af4fc28a0948fbbdc2e01 | refs/heads/master | 2021-01-20T01:46:29.528473 | 2017-04-27T13:44:52 | 2017-04-27T13:44:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 314 | java | package org.monapplijdbc.service;
import com.gtm.monapplijdbc.dao.Dao;
import com.gtm.monapplijdbc.dao.IDao;
import com.gtm.monapplijdbc.metier.Client;
public class ServiceImpl implements IService {
private IDao dao = new Dao();
@Override
public long addClient(Client c) {
return dao.addClient(c);
}
}
| [
"test@test.com"
] | test@test.com |
96aa1368d7755b5e614ba581b3a1936b0e33cd48 | e4496533d94dfd5e3bdb9edc9ca1398c34c22961 | /src/com/google/javascript/jscomp/resources/super-j2cl/com/google/javascript/jscomp/resources/ResourceLoader.java | a864a3b942b014328e4db3cbb942e6d5ab8a22df | [
"BSD-3-Clause",
"GPL-1.0-or-later",
"CPL-1.0",
"LicenseRef-scancode-generic-cla",
"MPL-1.1",
"NPL-1.1",
"MIT",
"Apache-2.0"
] | permissive | quanee/closure-compiler | 734dace9b109e9ef16ccb8d4ea163f9a53534da4 | b28a8b2dafb1b9ab9246fd911375426c9eadda5e | refs/heads/master | 2022-12-25T23:45:52.037124 | 2020-09-22T02:43:20 | 2020-09-22T02:44:40 | 297,557,083 | 2 | 0 | Apache-2.0 | 2020-09-22T06:32:08 | 2020-09-22T06:32:08 | null | UTF-8 | Java | false | false | 1,978 | java | /*
* Copyright 2015 The Closure Compiler 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.google.javascript.jscomp.resources;
import com.google.javascript.jscomp.ConformanceConfig;
import elemental2.core.JsObject;
import jsinterop.annotations.JsType;
import jsinterop.base.JsPropertyMap;
/**
* J2CL compatible replacement for {@code ResourceLoader}.
*/
public final class ResourceLoader {
@JsType(isNative = true, namespace = "com.google.javascript.jscomp")
private static class Resources {
public static native JsPropertyMap<Object> resources();
}
public static String loadTextResource(Class<?> clazz, String path) {
if (Resources.resources().has(path)) {
return (String) Resources.resources().get(path);
}
throw new RuntimeException("Resource not found: " + path);
}
public static ConformanceConfig loadGlobalConformance(Class<?> clazz) {
return ConformanceConfig.newBuilder().build();
}
public static boolean resourceExists(Class<?> clazz, String path) {
// TODO(sdh): this is supposed to be relative to the given class, but
// GWT can't handle that - probably better to remove the class argument
// and just require that paths be relative to c.g.javascript.jscomp.
return Resources.resources().has(path);
}
public static String[] resourceList(Class<?> clazz) {
return elemental2.core.JsObject.keys((JsObject) Resources.resources()).asArray(new String[] {});
}
}
| [
"copybara-worker@google.com"
] | copybara-worker@google.com |
0eebb3dd15feedfe8f3e87ee17a04af6609d2609 | e89dc01c95b8b45404f971517c2789fd21657749 | /src/main/java/com/alipay/api/domain/AlipaySecurityRiskPolicyQueryModel.java | cc7882095009c63ee48dacb226178ed7ac27b26d | [
"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 | 1,286 | java | package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 安全策略咨询服务输出
*
* @author auto create
* @since 1.0, 2018-09-18 10:50:24
*/
public class AlipaySecurityRiskPolicyQueryModel extends AlipayObject {
private static final long serialVersionUID = 3255848686115139431L;
/**
* 风险类型:表示风险处理或风险咨询——process/advice
*/
@ApiField("risk_type")
private String riskType;
/**
* 安全场景参数
*/
@ApiField("security_scene")
private SecurityScene securityScene;
/**
* 服务上下文包括环境信息和用户信息
*/
@ApiField("service_context")
private ServiceContext serviceContext;
public String getRiskType() {
return this.riskType;
}
public void setRiskType(String riskType) {
this.riskType = riskType;
}
public SecurityScene getSecurityScene() {
return this.securityScene;
}
public void setSecurityScene(SecurityScene securityScene) {
this.securityScene = securityScene;
}
public ServiceContext getServiceContext() {
return this.serviceContext;
}
public void setServiceContext(ServiceContext serviceContext) {
this.serviceContext = serviceContext;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
4e0c81a644f4a9f57f5329359c0dc962c0f65dd6 | 254f320e318400965d30d8117e74936a52d9b99e | /friendsystem-spigot/src/main/java/ch/dkrieger/friendsystem/spigot/player/bungeecord/SpigotBungeeCordOnlinePlayer.java | b2b6217bd3d90420b945f5b7efe82a4c4bffec47 | [] | no_license | DKProjectV1/DKFriends | 64a3f7bdf5d5ea81d446f88995624abb1e96e331 | 4acf80b2c1640eb7a390ade19318711a263fa920 | refs/heads/master | 2022-08-22T01:18:00.773807 | 2018-11-29T19:04:57 | 2018-11-29T19:04:57 | 157,832,251 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,311 | java | package ch.dkrieger.friendsystem.spigot.player.bungeecord;
/*
*
* * Copyright (c) 2018 Davide Wietlisbach on 21.11.18 20:07
*
*/
import ch.dkrieger.friendsystem.lib.player.OnlineFriendPlayer;
import ch.dkrieger.friendsystem.lib.utils.Document;
import ch.dkrieger.friendsystem.spigot.SpigotFriendSystemBootstrap;
import net.md_5.bungee.api.chat.TextComponent;
import java.util.UUID;
public class SpigotBungeeCordOnlinePlayer implements OnlineFriendPlayer {
private UUID uuid;
private String name, server, lastMessenger;
public SpigotBungeeCordOnlinePlayer(UUID uuid, String name, String server) {
this.uuid = uuid;
this.name = name;
this.server = server;
}
@Override
public UUID getUUID() {
return this.uuid;
}
@Override
public String getName() {
return this.name;
}
@Override
public String getLastMessenger() {
return this.lastMessenger;
}
@Override
public String getServer() {
return this.server;
}
@Override
public void sendMessage(String message) {
sendMessage(new TextComponent(message));
}
@Override
public void sendMessage(TextComponent component) {
SpigotFriendSystemBootstrap.getInstance().getBungeeCordConnection()
.send("sendMessage",new Document().append("message",component));
}
@Override
public void sendPrivateMessage(String lastMessenger, TextComponent component) {
this.lastMessenger = lastMessenger;
SpigotFriendSystemBootstrap.getInstance().getBungeeCordConnection()
.send("privateMessage",new Document().append("sender",lastMessenger).append("message",component));
}
@Override
public void connect(String server) {
SpigotFriendSystemBootstrap.getInstance().getBungeeCordConnection()
.send("connect",new Document().append("server",server));
}
@Override
public void executeCommand(String command) {
SpigotFriendSystemBootstrap.getInstance().getBungeeCordConnection()
.send("executeCommand",new Document().append("server",server));
}
public void setName(String name) {
this.name = name;
}
public void setServer(String server) {
this.server = server;
}
}
| [
"davide.wietlisbach@icloud.com"
] | davide.wietlisbach@icloud.com |
6674304326823d295acd8220320717d78a8cd8ef | 854661668f6ee8ed09cfc9950fd05f5e884e2842 | /grainoil-common/grainoil-common-core/src/main/java/com/grainoil/common/datasource/DynamicDataSource.java | b2cae095617af4496f981d828ba775ff69ee2a2c | [
"MIT"
] | permissive | 18406611280/oil | f69e6bd06e25befd349aade5e114d637b87e2c75 | d48e2f4984eb735292021d0f76945bb97741db87 | refs/heads/master | 2023-05-08T19:54:57.543358 | 2021-05-31T03:43:40 | 2021-05-31T03:43:40 | 372,158,123 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 706 | java | package com.grainoil.common.datasource;
import java.util.Map;
import javax.sql.DataSource;
import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
/**
* 动态数据源
*
* @author grainoil
*/
public class DynamicDataSource extends AbstractRoutingDataSource
{
public DynamicDataSource(DataSource defaultTargetDataSource, Map<Object, Object> targetDataSources)
{
super.setDefaultTargetDataSource(defaultTargetDataSource);
super.setTargetDataSources(targetDataSources);
super.afterPropertiesSet();
}
@Override
protected Object determineCurrentLookupKey()
{
return DynamicDataSourceContextHolder.getDataSourceType();
}
} | [
"823169071@qq.com"
] | 823169071@qq.com |
91337bec8dc062d105406d7dc6007ed019d30e50 | 18456f1b901e1a16bc8ca2f6f3b3ebb75692a5ce | /modules/ddom-commons/src/main/java/com/google/code/ddom/commons/cl/SimpleClassCollection.java | da93d48153978a9c689fafa268416730cdf2fdf9 | [] | no_license | veithen/ddom | 47bf6d2ce0baca571b5440d01460c5de587b3956 | 8adb257b71ce14e9d50a71ef5650563923580649 | refs/heads/master | 2020-05-29T12:14:02.716747 | 2019-01-13T15:10:48 | 2019-01-13T15:10:48 | 15,248,999 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,037 | java | /*
* Copyright 2009-2011 Andreas Veithen
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.code.ddom.commons.cl;
import java.util.AbstractCollection;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
public final class SimpleClassCollection extends AbstractClassCollection {
private static class ClassRefIterator implements Iterator<ClassRef> {
private final Iterator<Class<?>> parent;
public ClassRefIterator(Iterator<Class<?>> parent) {
this.parent = parent;
}
public boolean hasNext() {
return parent.hasNext();
}
public ClassRef next() {
return new ClassRef(parent.next());
}
public void remove() {
throw new UnsupportedOperationException();
}
}
private final List<Class<?>> classes = new ArrayList<Class<?>>();
public void add(Class<?> clazz) {
classes.add(clazz);
}
public List<Class<?>> getClasses() {
return classes;
}
public Collection<ClassRef> getClassRefs() {
final Collection<Class<?>> classes = getClasses();
return new AbstractCollection<ClassRef>() {
@Override
public Iterator<ClassRef> iterator() {
return new ClassRefIterator(classes.iterator());
}
@Override
public int size() {
return classes.size();
}
};
}
}
| [
"andreas.veithen@gmail.com"
] | andreas.veithen@gmail.com |
cfab6419fddfb6e45dc65274973217adf9f9f176 | 0dfbbe5632988a022b27b1e91a2b65f72cb0fa69 | /app/src/main/java/com/jiaoshizige/teacherexam/utils/ScreenListener.java | 86702fcdb022564cca07e992ef27bee2ae6ba249 | [] | no_license | wch2219/Teacherstudent | b503faba86a2a7f86210d989402be996b26bd672 | 62f669f9b32a1567957eab6bc5a7861b88d84594 | refs/heads/master | 2020-03-28T07:13:37.348321 | 2018-09-10T10:49:07 | 2018-09-10T10:49:07 | 147,888,214 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,706 | java | package com.jiaoshizige.teacherexam.utils;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.PowerManager;
/**
* Created by Administrator on 2018/5/29.
*/
public class ScreenListener {
private Context mContext;
private ScreenBroadcastReceiver mScreenReceiver;
private ScreenStateListener mScreenStateListener;
public ScreenListener(Context context) {
mContext = context;
mScreenReceiver = new ScreenBroadcastReceiver();
}
/**
* screen状态广播接收者
*/
private class ScreenBroadcastReceiver extends BroadcastReceiver {
private String action = null;
@Override
public void onReceive(Context context, Intent intent) {
action = intent.getAction();
if (Intent.ACTION_SCREEN_ON.equals(action)) { // 开屏
mScreenStateListener.onScreenOn();
} else if (Intent.ACTION_SCREEN_OFF.equals(action)) { // 锁屏
mScreenStateListener.onScreenOff();
} else if (Intent.ACTION_USER_PRESENT.equals(action)) { // 解锁
mScreenStateListener.onUserPresent();
}
}
}
/**
* 开始监听screen状态
*
* @param listener
*/
public void begin(ScreenStateListener listener) {
mScreenStateListener = listener;
registerListener();
getScreenState();
}
/**
* 获取screen状态
*/
private void getScreenState() {
PowerManager manager = (PowerManager) mContext
.getSystemService(Context.POWER_SERVICE);
if (manager.isScreenOn()) {
if (mScreenStateListener != null) {
mScreenStateListener.onScreenOn();
}
} else {
if (mScreenStateListener != null) {
mScreenStateListener.onScreenOff();
}
}
}
/**
* 停止screen状态监听
*/
public void unregisterListener() {
mContext.unregisterReceiver(mScreenReceiver);
}
/**
* 启动screen状态广播接收器
*/
private void registerListener() {
IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_SCREEN_ON);
filter.addAction(Intent.ACTION_SCREEN_OFF);
filter.addAction(Intent.ACTION_USER_PRESENT);
mContext.registerReceiver(mScreenReceiver, filter);
}
public interface ScreenStateListener {// 返回给调用者屏幕状态信息
public void onScreenOn();
public void onScreenOff();
public void onUserPresent();
}
}
| [
"wangchonghui2219@126.com"
] | wangchonghui2219@126.com |
02e0d061a995d755a896e1b85a672896417a8c81 | bccb412254b3e6f35a5c4dd227f440ecbbb60db9 | /hl7/model/V2_5/table/Table0366.java | ad1b6e872a20411f88552dcbbd8cd36de027dc43 | [] | no_license | nlp-lap/Version_Compatible_HL7_Parser | 8bdb307aa75a5317265f730c5b2ac92ae430962b | 9977e1fcd1400916efc4aa161588beae81900cfd | refs/heads/master | 2021-03-03T15:05:36.071491 | 2020-03-09T07:54:42 | 2020-03-09T07:54:42 | 245,967,680 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 474 | java | package hl7.model.V2_5.table;
import hl7.bean.table.Table;
public class Table0366 extends Table{
private static final String VERSION = "2.5";
public static Table getInstance(){
if(table==null) new Table0366();
return table;
}
public static final String L = "L";
public static final String R = "R";
private Table0366(){
setTableName("Local/remote control state");
setOID("2.16.840.1.113883.12.366");
putMap("L", "Local");
putMap("R", "Remote");
}
}
| [
"terminator800@hanmail.net"
] | terminator800@hanmail.net |
cb80a3666952b6dde09c1c70fca4281e1e114bc9 | 3ef55e152decb43bdd90e3de821ffea1a2ec8f75 | /large/module1458_public/tests/unittests/src/java/module1458_public_tests_unittests/a/IFoo2.java | 237076a543da01a128ce8348e78d40755521fa87 | [
"BSD-3-Clause"
] | permissive | salesforce/bazel-ls-demo-project | 5cc6ef749d65d6626080f3a94239b6a509ef145a | 948ed278f87338edd7e40af68b8690ae4f73ebf0 | refs/heads/master | 2023-06-24T08:06:06.084651 | 2023-03-14T11:54:29 | 2023-03-14T11:54:29 | 241,489,944 | 0 | 5 | BSD-3-Clause | 2023-03-27T11:28:14 | 2020-02-18T23:30:47 | Java | UTF-8 | Java | false | false | 840 | java | package module1458_public_tests_unittests.a;
import java.io.*;
import java.rmi.*;
import java.nio.file.*;
/**
* Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
* labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
* Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
*
* @see java.nio.file.FileStore
* @see java.sql.Array
* @see java.util.logging.Filter
*/
@SuppressWarnings("all")
public interface IFoo2<I> extends module1458_public_tests_unittests.a.IFoo0<I> {
java.util.zip.Deflater f0 = null;
javax.annotation.processing.Completion f1 = null;
javax.lang.model.AnnotatedConstruct f2 = null;
String getName();
void setName(String s);
I get();
void set(I e);
}
| [
"gwagenknecht@salesforce.com"
] | gwagenknecht@salesforce.com |
e042f92a88d48a1bfa4c8f74a3e34de196f6efab | 19f7e40c448029530d191a262e5215571382bf9f | /decompiled/instagram/sources/p000X/C27131Gp.java | b70a9faef7aabb385a0af38506f3646fe580576d | [] | no_license | stanvanrooy/decompiled-instagram | c1fb553c52e98fd82784a3a8a17abab43b0f52eb | 3091a40af7accf6c0a80b9dda608471d503c4d78 | refs/heads/master | 2022-12-07T22:31:43.155086 | 2020-08-26T03:42:04 | 2020-08-26T03:42:04 | 283,347,288 | 18 | 1 | null | null | null | null | UTF-8 | Java | false | false | 159 | java | package p000X;
/* renamed from: X.1Gp reason: invalid class name and case insensitive filesystem */
public interface C27131Gp {
void BDE(C26391Dc r1);
}
| [
"stan@rooy.works"
] | stan@rooy.works |
a99e2c7bbb573f0b8ea2235697bcc89ab35207d7 | b4325025102a73e073623d410004fea57123fc18 | /src/main/java/com/cos/securityex01/config/SecurityConfig.java | db6aba6f6883fd99a1c79983a68954335bb77456 | [] | no_license | star1606/Springboot-Security-OAuth2.0-V3 | 52db020fe37b127a79e253ffffeba848c94f2cf3 | c7705f028c7271a5ce5248e55781e78dd2600f3b | refs/heads/master | 2022-11-27T00:04:21.484023 | 2020-08-10T00:50:29 | 2020-08-10T00:50:29 | 286,343,130 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,814 | java | package com.cos.securityex01.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import com.cos.securityex01.config.oauth.PrincipalOauth2UserService;
@Configuration // IOC 빈(beacn)을 등록 (=인스턴스, 객체의 개념보단.)
@EnableWebSecurity // 필터 체인 관리 시작 어노테이션.
@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true) // 특정 주소 접근시 권한 및 인증을 미리 체크 // 컨트롤러로 접근 전에 낚아 채서 적용함
public class SecurityConfig extends WebSecurityConfigurerAdapter { // 인터페이스가 아니라 상속이라서 강제성이 없다 원하는 필터 골라서 설정하면 된다는 뜻
@Autowired
private PrincipalOauth2UserService principalOauth2UserService;
@Bean // Ioc에 등록됨
public BCryptPasswordEncoder encodePwd() {
return new BCryptPasswordEncoder();
}
// http요청 처리할 수 있음, 로그인 다 들어갈 수 있음
@Override
public void configure(WebSecurity web) throws Exception {
web.ignoring().antMatchers("/admin/1");
}
protected void configure(HttpSecurity http) throws Exception {
http.csrf().disable(); // csrf 토큰 비활성화
http.authorizeRequests().
antMatchers("/user/**").authenticated()
// .antMatchers("/admin/**").access("hasRole('ROLE_ADMIN') or hasRole('ROLE_USER')") //access 는 권한을 물어보는 것이다. or, and 사용가능
// .antMatchers("/admin/**").access("hasRole('ROLE_ADMIN') and hasRole('ROLE_USER')") //hasRole 함수 안에는 정확히 필드에 맞게 써야 적용 됨.
.antMatchers("/admin/**").access("hasRole('ROLE_ADMIN')") //hasRole 함수 안에는 정확히 필드에 맞게 써야 적용 됨.0
.anyRequest().permitAll()
.and()
.formLogin()
.loginPage("/login")
.loginProcessingUrl("/loginProc")
.defaultSuccessUrl("/")
.and()
.oauth2Login()
.loginPage("/login")
//oauth 서비스를 직접걸어줘야한다
.userInfoEndpoint()
.userService(principalOauth2UserService);
// ajax 하지말것. 응답2번되서 데이터 꼬인다.
// 다 열고 잠궈야 될 거 잠구는 것
}
}
| [
"you@example.com"
] | you@example.com |
fb5bbf5bb1c5197b6116084602e152a8b1a4322a | 92f75f65766402204ecbeaac6cece2a75bbf7c0d | /src/main/java/com/demotivirus/Day_082/DjPlayer.java | 9412f4371dacb482080345de5c9df28f461c6095 | [] | no_license | demotivirus/365_Days_Challenge | 338139efe4f677ebb78abac4e4c674639ad78ab8 | cfc25eb921dd59f9581a39bf00fb0fc15809e4bb | refs/heads/master | 2023-07-21T19:04:26.927157 | 2021-09-07T20:25:29 | 2021-09-07T20:25:29 | 336,847,354 | 1 | 0 | null | 2021-09-07T20:20:42 | 2021-02-07T17:32:36 | Java | UTF-8 | Java | false | false | 249 | java | package com.demotivirus.Day_082;
import lombok.ToString;
@ToString
public class DjPlayer extends Player {
public DjPlayer(Music music) {
super(music);
}
@Override
public void listenMusic() {
music.genre();
}
}
| [
"demotivirus@gmail.com"
] | demotivirus@gmail.com |
91716bc8f794193a9747b8eef2453c343a902299 | 95e944448000c08dd3d6915abb468767c9f29d3c | /sources/com/tencent/wcdb/C46399b.java | 41bbd0430b61c5badb670ca7239f07c41787c6b6 | [] | no_license | xrealm/tiktok-src | 261b1faaf7b39d64bb7cb4106dc1a35963bd6868 | 90f305b5f981d39cfb313d75ab231326c9fca597 | refs/heads/master | 2022-11-12T06:43:07.401661 | 2020-07-04T20:21:12 | 2020-07-04T20:21:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,583 | java | package com.tencent.wcdb;
import android.database.CharArrayBuffer;
/* renamed from: com.tencent.wcdb.b */
public abstract class C46399b extends C46397a {
/* renamed from: g */
protected CursorWindow f119464g;
/* access modifiers changed from: protected */
/* renamed from: a */
public final void mo115365a() {
super.mo115365a();
mo115409c();
}
/* access modifiers changed from: protected */
/* renamed from: b */
public final void mo115368b() {
super.mo115368b();
if (this.f119464g == null) {
throw new StaleDataException("Attempting to access a closed CursorWindow.Most probable cause: cursor is deactivated prior to calling this method.");
}
}
/* access modifiers changed from: protected */
/* renamed from: c */
public final void mo115409c() {
if (this.f119464g != null) {
this.f119464g.close();
this.f119464g = null;
}
}
public byte[] getBlob(int i) {
mo115368b();
return this.f119464g.mo115351b(this.f119451b, i);
}
public double getDouble(int i) {
mo115368b();
return this.f119464g.mo115356e(this.f119451b, i);
}
public float getFloat(int i) {
mo115368b();
return this.f119464g.mo115360h(this.f119451b, i);
}
public int getInt(int i) {
mo115368b();
return this.f119464g.mo115359g(this.f119451b, i);
}
public long getLong(int i) {
mo115368b();
return this.f119464g.mo115354d(this.f119451b, i);
}
public short getShort(int i) {
mo115368b();
return this.f119464g.mo115357f(this.f119451b, i);
}
public String getString(int i) {
mo115368b();
return this.f119464g.mo115352c(this.f119451b, i);
}
public int getType(int i) {
mo115368b();
return this.f119464g.mo115347a(this.f119451b, i);
}
/* access modifiers changed from: protected */
/* renamed from: a */
public final void mo115408a(String str) {
if (this.f119464g == null) {
this.f119464g = new CursorWindow(str);
} else {
this.f119464g.mo115348a();
}
}
public boolean isNull(int i) {
mo115368b();
if (this.f119464g.mo115347a(this.f119451b, i) == 0) {
return true;
}
return false;
}
public void copyStringToBuffer(int i, CharArrayBuffer charArrayBuffer) {
mo115368b();
this.f119464g.mo115349a(this.f119451b, i, charArrayBuffer);
}
}
| [
"65450641+Xyzdesk@users.noreply.github.com"
] | 65450641+Xyzdesk@users.noreply.github.com |
7a416e14a8b625e88d7260c55f5e8dc050b3430e | 092d80daf774d40612288756b077f78bd3c4501f | /src/com/dpc/dpc_loader/MainActivity.java | e129e80117c43992f499edb301ac038d22b98610 | [] | no_license | DesignPCode/DPC_Loader | de8b9c6c1f11803e1219bdeee0629f8ed54176d6 | a1fd614e6c601df52713394f4c3140247972c3aa | refs/heads/master | 2021-01-19T12:36:53.624689 | 2014-10-30T08:49:26 | 2014-10-30T08:49:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,009 | java | package com.dpc.dpc_loader;
import java.util.List;
import com.dpc.dpc_loader.adapter.AppListAdapter;
import com.dpc.dpc_loader.entry.AppEntry;
import com.dpc.dpc_loader.loader.AppListLoader;
import com.dpc.dpc_loader.utils.LogUtil;
import android.content.Intent;
import android.os.Bundle;
import android.provider.Settings;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.ListFragment;
import android.support.v4.app.LoaderManager;
import android.support.v4.content.Loader;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
/**
*
* @ClassName: MainActivity
* @Description: TODO(放置AppListFragment主要显示安装的APK)
* @author N.Sun
* @email niesen918@gmail.com
* @date 2014-9-30
*
*/
public class MainActivity extends FragmentActivity
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
// 创建ListFragment 作为主要显示部分
FragmentManager fm = getSupportFragmentManager();
if (fm.findFragmentById(android.R.id.content) == null)
{
AppListFragment list = new AppListFragment();
fm.beginTransaction().add(android.R.id.content, list).commit();
}
}
/**
*
* @ClassName: AppListFragment
* @Description: TODO(显示安装的application:后台是Loader加载,管理由LoaderManager)
* @author N.Sun
* @email niesen918@gmail.com
* @date 2014-10-30
*
*/
public static class AppListFragment extends ListFragment implements LoaderManager.LoaderCallbacks<List<AppEntry>>
{
private static final String TAG = "AppListFragment";
// 自定义Adapter
private AppListAdapter mAdapter;
// Loader的唯一ID 便于LoaderManger管理(后面会使用到这个ID)
private static final int LOADER_ID = 1;
@Override
public void onActivityCreated(Bundle savedInstanceState)
{
super.onActivityCreated(savedInstanceState);
setHasOptionsMenu(true);
mAdapter = new AppListAdapter(getActivity());
setEmptyText("No applications");
setListAdapter(mAdapter);
setListShown(false);
LogUtil.i(TAG, "初始化Loader");
if (getLoaderManager().getLoader(LOADER_ID) == null)
{
LogUtil.i(TAG, "重新创建了Loader");
} else
{
LogUtil.i(TAG, "Loader复用");
}
// 这个方法是初始化Loader:如果Loader存在的话就重新复用,如果没有就重新创建
getLoaderManager().initLoader(LOADER_ID, null, this);
}
/**********************/
/** Loader 3个主要回调函数 **/
/**********************/
@Override
public Loader<List<AppEntry>> onCreateLoader(int id, Bundle args)
{
LogUtil.i(TAG, "onCreateLoader");
return new AppListLoader(getActivity());
}
@Override
public void onLoadFinished(Loader<List<AppEntry>> loader, List<AppEntry> data)
{
LogUtil.i(TAG, "onLoadFinished");
mAdapter.setData(data);
// 控制界面
if (isResumed())
{
setListShown(true);
} else
{
setListShownNoAnimation(true);
}
}
@Override
public void onLoaderReset(Loader<List<AppEntry>> loader)
{
LogUtil.i(TAG, "onLoadReset");
mAdapter.setData(null);
}
// 模拟系统locale数据源改变
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater)
{
// actionbar-改变语言
inflater.inflate(R.menu.activity_main, menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item)
{
switch (item.getItemId())
{
case R.id.menu_configure_locale:
configureLocale();
return true;
}
return false;
}
/**
* @Title: configureLocale
* @Description: TODO(模拟数据源数据改变:改变系统的语言)
* @param 设定文件
* @return void 返回类型
* @throws
*/
private void configureLocale()
{
Loader<AppEntry> loader = getLoaderManager().getLoader(LOADER_ID);
if (loader != null)
{
startActivity(new Intent(Settings.ACTION_LOCALE_SETTINGS));
}
}
}
}
| [
"niesen918@gmail.com"
] | niesen918@gmail.com |
ceb5c29632c53e63f9fe90efa6758d92130dd2c2 | 54f352a242a8ad6ff5516703e91da61e08d9a9e6 | /Source Codes/AtCoder/arc063/A/2871545.java | 8148ffb9ef5efb32491b4a9df0dfe141666fb3b6 | [] | 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 | 284 | java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
char[] S = sc.next().toCharArray();
int cnt=0;
for(int i=0;i<S.length-1;i++){
if(S[i]!=S[i+1]) cnt++;
}
System.out.println(cnt);
}
} | [
"kwnafi@yahoo.com"
] | kwnafi@yahoo.com |
0d1b520b0d9d1c28aa131a0083c373a2b1284a43 | 2241f88717e26ab00e7c9ee52b82bee004ea0485 | /camunda-service/src/main/java/poc/services/workflow/delegates/AMQPPublishDelegate.java | 32c4b1a712551adcd875e76859ead1c3dcf410ce | [] | no_license | NMichas/camunda-amqp-microservices | 5cb3459a384eabb8edaf685aab321354975f3d87 | f7babe7d9c21ae9dabbe212c5efd5edff514e162 | refs/heads/master | 2023-02-17T16:31:05.746199 | 2021-01-05T16:41:19 | 2021-01-05T16:41:19 | 326,989,392 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,577 | java | package poc.services.workflow.delegates;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.extern.java.Log;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.JavaDelegate;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import poc.common.dto.AMQPMessage;
import poc.common.dto.CommonConfig;
import java.util.logging.Level;
/**
* A helper class to allow Service Tasks to publish to AMQP.
*/
@Component
@Log
public class AMQPPublishDelegate implements JavaDelegate {
@Autowired
protected RabbitTemplate rabbitTemplate;
private final static ObjectMapper objectMapper = new ObjectMapper();
@Override
public void execute(DelegateExecution delegateExecution) throws Exception {
String payload = delegateExecution.getVariable("payload").toString();
String routingKey = delegateExecution.getVariable("routingKey").toString();
String businessKey = delegateExecution.getBusinessKey();
log.log(Level.INFO, "Received a call from Workflow engine. Routing key = {0}, Payload = {1}.",
new Object[]{routingKey, payload});
String message = objectMapper.writeValueAsString(AMQPMessage.builder()
.businessKey(businessKey)
.payload(payload)
.build());
log.log(Level.INFO, "Publishing AMQP message for service execution: {0}", message);
rabbitTemplate.convertAndSend(CommonConfig.AMQP_DEFAULT_EXCHANGE, routingKey, message);
}
}
| [
"nassosmichas@me.com"
] | nassosmichas@me.com |
4e03d2d8b34b5763a69c3d21943da614800023ff | 34c24c18d874fa077fef35a1bd23ac948053a87b | /java/oop2/src/day4/multiple/벤츠.java | 2a74c1fa3277c9ab42d138e0d012a54009dfbee1 | [] | no_license | DonggeonHa/Central_HTA | 5f2afc88cd168c828473ac1148beb335495f0c54 | f7fe92daa6cd856158732869f6f1028f23b32407 | refs/heads/master | 2023-06-14T11:05:45.680344 | 2021-07-06T08:12:06 | 2021-07-06T08:12:06 | 353,176,984 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 323 | java | package day4.multiple;
public class 벤츠 extends AbstractCar {
에어백 a;
에어컨 b;
내비게이션 c;
후방카메라 d;
위험물탐지 e;
@Override
public void speedUp() {
// TODO Auto-generated method stub
}
@Override
public void speedDown() {
// TODO Auto-generated method stub
}
}
| [
"Hadonggun@gmail.com"
] | Hadonggun@gmail.com |
88c7e482723826d3b2eabaab0e17ae5fff120d19 | e7d62a999c0b87311b146ace0b566c10d1ea8e97 | /application-module/mall-module/mall-service-product/src/test/java/org/smartframework/cloud/examples/mall/product/test/SuiteTest.java | e6fbe86fe52490f9079e69550f6e64b57c17a74f | [
"Apache-2.0"
] | permissive | smart-cloud/smart-cloud-examples | 55a5de900749d0062b567fef7fd5c64e3b5b0af3 | 78dfc69a9f3bda69a255c4abae3ed0dfbd2f4429 | refs/heads/master | 2023-04-08T09:11:55.929150 | 2021-01-29T04:38:51 | 2021-01-29T07:57:52 | 195,848,605 | 36 | 22 | null | null | null | null | UTF-8 | Java | false | false | 326 | java | package org.smartframework.cloud.examples.mall.product.test;
import org.junit.platform.runner.JUnitPlatform;
import org.junit.platform.suite.api.SelectPackages;
import org.junit.runner.RunWith;
@RunWith(JUnitPlatform.class)
@SelectPackages({"org.smartframework.cloud.examples.mall.product.test"})
public class SuiteTest {
} | [
"1634753825@qq.com"
] | 1634753825@qq.com |
b7d35c3994c8f8a7977cf122a5c558c21a436bae | 8d3aea3dba7c84ab7ff789c146accd370d1ae664 | /app/src/main/java/com/lys/activity/ActivityMasterTools.java | 2527da3c60148a46986fa0ed2f689fb5ccdc427c | [] | no_license | sengeiou/AppPairNew | 7190faad0b2506caeb966b67cb874ad28d9fb1c5 | db148c35b0b316f7698a2a20ebafa55256f5275c | refs/heads/master | 2023-01-08T20:34:32.803855 | 2020-11-10T12:59:20 | 2020-11-10T12:59:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,782 | java | package com.lys.activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import com.king.zxing.CaptureActivity;
import com.lys.app.R;
import com.lys.base.activity.BaseActivity;
import com.lys.base.utils.FsUtils;
import com.lys.base.utils.LOG;
import com.lys.dialog.DialogSelectTask;
import com.lys.kit.dialog.DialogAlert;
import com.lys.kit.utils.Protocol;
import com.lys.protobuf.SPTask;
import com.lys.protobuf.SUser;
import com.lys.protobuf.SUserType;
import com.lys.utils.LysUpload;
import java.io.File;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class ActivityMasterTools extends AppActivity implements View.OnClickListener
{
public static final int ScanForBindTask = 0x157;
private class Holder
{
// private ViewGroup tabCon;
}
private Holder holder = new Holder();
private void initHolder()
{
// holder.tabCon = findViewById(R.id.tabCon);
}
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_master_tools);
initHolder();
requestPermission();
}
@Override
public void permissionSuccess()
{
super.permissionSuccess();
findViewById(R.id.scanToBindTask).setOnClickListener(this);
}
@Override
public void onClick(View view)
{
if (view.getId() == R.id.scanToBindTask)
{
scanToBindTask();
}
}
private void scanToBindTask()
{
Intent intent = new Intent(context, CaptureActivityLandscape.class);
startActivityForResult(intent, ScanForBindTask);
}
private void bindTask(final String url)
{
if (url.matches("http://k12-eco\\.com/\\w+\\.htm"))
{
DialogAlert.show(context, "绑定提示:", url, new DialogAlert.OnClickListener()
{
@Override
public void onClick(int which)
{
if (which == 1)
{
Matcher matcher = null;
if ((matcher = Pattern.compile("http://k12-eco\\.com/(\\w+)\\.htm").matcher(url)).find())
{
final String name = matcher.group(1).trim();
selectUser(new BaseActivity.OnImageListener()
{
@Override
public void onResult(String userStr)
{
SUser user = SUser.load(userStr);
DialogSelectTask.show(context, user.id, new DialogSelectTask.OnListener()
{
@Override
public void onSelect(List<SPTask> selectedList, String taskText)
{
if (selectedList.size() == 1)
{
SPTask task = selectedList.get(0);
File htmDir = new File(FsUtils.SD_CARD, "htm");
FsUtils.createFolder(htmDir);
File file = new File(htmDir, String.format("%s.htm", name));
String text = genHtm(task.id);
FsUtils.writeText(file, text);
// String path = String.format("/zjyk/apache-tomcat-8.5.43/webapps/ROOT/%s.htm", name);
String path = String.format("/../../%s.htm", name);
LysUpload.doUpload(context, file, path, new Protocol.OnCallback()
{
@Override
public void onResponse(int code, String data, String msg)
{
if (code == 200)
{
LOG.toast(context, "绑定成功");
}
}
});
}
else
{
LOG.toast(context, "错误的个数:" + selectedList.size());
}
}
});
}
}, SUserType.Master, SUserType.Teacher);
}
else
{
LOG.toast(context, "错误2:" + url);
}
}
}
}, "取消", "绑定");
}
else
{
LOG.toast(context, "错误:" + url);
}
}
private String genHtm(String taskId)
{
StringBuilder sb = new StringBuilder();
sb.append(String.format("<!DOCTYPE html>") + "\r\n");
sb.append(String.format("<html>") + "\r\n");
sb.append(String.format("<head>") + "\r\n");
sb.append(String.format("<meta charset=\"UTF-8\">") + "\r\n");
sb.append(String.format("<script>") + "\r\n");
sb.append(String.format("\twindow.location = 'http://k12-eco.com/pair/task.html?id=%s';", taskId) + "\r\n");
sb.append(String.format("</script>") + "\r\n");
sb.append(String.format("</head>") + "\r\n");
sb.append(String.format("<body>") + "\r\n");
sb.append(String.format("</body>") + "\r\n");
sb.append(String.format("</html>") + "\r\n");
return sb.toString();
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == ScanForBindTask)
{
if (resultCode == RESULT_OK)
{
Bundle bundle = data.getExtras();
String url = bundle.getString(CaptureActivity.KEY_RESULT);
bindTask(url);
}
}
}
}
| [
"xnktyu@163.com"
] | xnktyu@163.com |
6d6ed501dab6fa8431345eb1157286f1ce630702 | e1262848cb2f5a1b0c8cfd3ca09cf4fbf30d5584 | /coltorti/src/main/java/com/shangpin/iog/coltorti/stock/schedule/Schedule.java | abdc62ed1e28775f363847bc2bcfdef4a748b3f1 | [] | no_license | tianxinghua/pachong | e619f8e34904ada839cd2d30f8781495de276230 | a3fc6ea97ce9053f1269d5c3536b6677d5588138 | refs/heads/master | 2020-04-14T16:53:51.579843 | 2019-01-04T02:42:26 | 2019-01-04T02:42:26 | 163,964,124 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,002 | java | //package com.shangpin.iog.coltorti.stock.schedule;
//
//import java.util.Date;
//
//import org.apache.log4j.Logger;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.PropertySource;
//import org.springframework.scheduling.annotation.Scheduled;
//import org.springframework.stereotype.Component;
//
//import com.shangpin.iog.coltorti.service.UpdateStockService;
//
//@Component
//@PropertySource("classpath:conf.properties")
//public class Schedule {
//
// private static Logger logger = Logger.getLogger("info");
//
// @Autowired
// UpdateStockService stockImp;
//
//
// @SuppressWarnings("deprecation")
// @Scheduled(cron="${jobsSchedule}")
// public void start(){
// logger.info(new Date().toLocaleString()+"开始更新");
// System.out.println(new Date().toLocaleString()+"开始更新");
// Murder mur = Murder.getMur();
// mur.setStockImp(stockImp);
// Thread t = new Thread(mur);
// t.start();
// }
//
//
//}
| [
"1085024903@qq.com"
] | 1085024903@qq.com |
162cf1b237ae477a14e674ecd15c29369aaf0f53 | ccb80fd76f16884ab6c3b28998a3526ac38ec321 | /ctakes-core/src/main/java/org/apache/ctakes/core/cc/pretty/cell/UmlsItemCell.java | 7ac6b1ea250e303fcd20818369331c456734bdbf | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | apache/ctakes | 5d5c35a7c8c906e21d52488396adeb40ebd7034e | def3dea5602945dfbec260d4faaabfbc0a2a2ad4 | refs/heads/main | 2023-07-02T18:28:53.754174 | 2023-05-18T00:00:51 | 2023-05-18T00:00:51 | 26,951,043 | 97 | 77 | Apache-2.0 | 2022-10-18T23:28:24 | 2014-11-21T08:00:09 | Java | UTF-8 | Java | false | false | 413 | java | package org.apache.ctakes.core.cc.pretty.cell;
/**
* Item Cell for an umls entity
*/
public interface UmlsItemCell extends ItemCell {
// Return Code used to indicate that a full entity span should be filled with an indicator character, e.g. '='
String ENTITY_FILL = "ENTITY_FILL";
/**
* @return true if the umls entity represented by this item cell is negated
*/
boolean isNegated();
}
| [
"sean.finan@childrens.harvard.edu"
] | sean.finan@childrens.harvard.edu |
8aa54c7462ffa833608c2f37f36c6f974d564024 | 6c28eca2c33a275fb0008a51b8e5776a82f5904d | /Code/Hierarchy/src/net/unconventionalthinking/hierarchy/grammar/node/AWhileStatementNoShortIfStatementNoShortIf.java | 0039c159a050ab46f9e181376eaf974ef1f215dc | [] | no_license | UnconventionalThinking/hierarchy | 17dc9e224595f13702b9763829e12fbce2c48cfe | de8590a29c19202c01d1a6e62ca92e91aa9fc6ab | refs/heads/master | 2021-01-19T21:28:29.793371 | 2014-12-19T03:16:24 | 2014-12-19T03:16:24 | 13,262,291 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,134 | java | /* Copyright 2012, 2013 Unconventional Thinking
*
* This file is part of Hierarchy.
*
* Hierarchy is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
*
* Hierarchy is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with Hierarchy.
* If not, see <http://www.gnu.org/licenses/>.
*/
/* This file was generated by SableCC (http://www.sablecc.org/). */
package net.unconventionalthinking.hierarchy.grammar.node;
import net.unconventionalthinking.hierarchy.grammar.analysis.*;
@SuppressWarnings("nls")
public final class AWhileStatementNoShortIfStatementNoShortIf extends PStatementNoShortIf
{
private PWhileStatementNoShortIf _whileStatementNoShortIf_;
public AWhileStatementNoShortIfStatementNoShortIf()
{
// Constructor
}
public AWhileStatementNoShortIfStatementNoShortIf(
@SuppressWarnings("hiding") PWhileStatementNoShortIf _whileStatementNoShortIf_)
{
// Constructor
setWhileStatementNoShortIf(_whileStatementNoShortIf_);
}
@Override
public Object clone()
{
return new AWhileStatementNoShortIfStatementNoShortIf(
cloneNode(this._whileStatementNoShortIf_));
}
public void apply(Switch sw)
{
((Analysis) sw).caseAWhileStatementNoShortIfStatementNoShortIf(this);
}
public PWhileStatementNoShortIf getWhileStatementNoShortIf()
{
return this._whileStatementNoShortIf_;
}
public void setWhileStatementNoShortIf(PWhileStatementNoShortIf node)
{
if(this._whileStatementNoShortIf_ != null)
{
this._whileStatementNoShortIf_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._whileStatementNoShortIf_ = node;
}
@Override
public String toString()
{
return ""
+ toString(this._whileStatementNoShortIf_);
}
@Override
void removeChild(@SuppressWarnings("unused") Node child)
{
// Remove child
if(this._whileStatementNoShortIf_ == child)
{
this._whileStatementNoShortIf_ = null;
return;
}
throw new RuntimeException("Not a child.");
}
@Override
void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
{
// Replace child
if(this._whileStatementNoShortIf_ == oldChild)
{
setWhileStatementNoShortIf((PWhileStatementNoShortIf) newChild);
return;
}
throw new RuntimeException("Not a child.");
}
}
| [
"github@unconventionalthinking.com"
] | github@unconventionalthinking.com |
52ac717ceec1e720b941749709f2fa88eb5b4f0a | 4c2e83907706317c147433e4560a49d431badf1b | /app/src/main/java/org/apache/commons/lang3/EnumUtils.java | 83315c89090ffa6fbb141d08ae86c95d932d3fd0 | [
"Unlicense"
] | permissive | renyuanceshi/KingKingRE | 92c80328556853029eb5b7bbf3a48a19182cf056 | b15295bec2cee47867b786dbe0841c1a4edaff5e | refs/heads/master | 2020-12-13T14:41:26.365794 | 2020-01-17T04:27:21 | 2020-01-17T04:27:21 | 234,442,774 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,241 | java | package org.apache.commons.lang3;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.EnumSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
public class EnumUtils {
private static final String CANNOT_STORE_S_S_VALUES_IN_S_BITS = "Cannot store %s %s values in %s bits";
private static final String ENUM_CLASS_MUST_BE_DEFINED = "EnumClass must be defined.";
private static final String NULL_ELEMENTS_NOT_PERMITTED = "null elements not permitted";
private static final String S_DOES_NOT_SEEM_TO_BE_AN_ENUM_TYPE = "%s does not seem to be an Enum type";
private static <E extends Enum<E>> Class<E> asEnum(Class<E> cls) {
Validate.notNull(cls, ENUM_CLASS_MUST_BE_DEFINED, new Object[0]);
Validate.isTrue(cls.isEnum(), S_DOES_NOT_SEEM_TO_BE_AN_ENUM_TYPE, cls);
return cls;
}
private static <E extends Enum<E>> Class<E> checkBitVectorable(Class<E> cls) {
Enum[] enumArr = (Enum[]) asEnum(cls).getEnumConstants();
Validate.isTrue(enumArr.length <= 64, CANNOT_STORE_S_S_VALUES_IN_S_BITS, Integer.valueOf(enumArr.length), cls.getSimpleName(), 64);
return cls;
}
public static <E extends Enum<E>> long generateBitVector(Class<E> cls, Iterable<E> iterable) {
checkBitVectorable(cls);
Validate.notNull(iterable);
long j = 0;
Iterator<E> it = iterable.iterator();
while (true) {
long j2 = j;
if (!it.hasNext()) {
return j2;
}
Enum enumR = (Enum) it.next();
Validate.isTrue(enumR != null, NULL_ELEMENTS_NOT_PERMITTED, new Object[0]);
j = ((long) (1 << enumR.ordinal())) | j2;
}
}
public static <E extends Enum<E>> long generateBitVector(Class<E> cls, E... eArr) {
Validate.noNullElements((T[]) eArr);
return generateBitVector(cls, Arrays.asList(eArr));
}
public static <E extends Enum<E>> long[] generateBitVectors(Class<E> cls, Iterable<E> iterable) {
asEnum(cls);
Validate.notNull(iterable);
EnumSet<E> noneOf = EnumSet.noneOf(cls);
for (E e : iterable) {
Validate.isTrue(e != null, NULL_ELEMENTS_NOT_PERMITTED, new Object[0]);
noneOf.add(e);
}
long[] jArr = new long[(((((Enum[]) cls.getEnumConstants()).length - 1) / 64) + 1)];
Iterator it = noneOf.iterator();
while (it.hasNext()) {
Enum enumR = (Enum) it.next();
int ordinal = enumR.ordinal() / 64;
jArr[ordinal] = jArr[ordinal] | ((long) (1 << (enumR.ordinal() % 64)));
}
ArrayUtils.reverse(jArr);
return jArr;
}
public static <E extends Enum<E>> long[] generateBitVectors(Class<E> cls, E... eArr) {
asEnum(cls);
Validate.noNullElements((T[]) eArr);
EnumSet<E> noneOf = EnumSet.noneOf(cls);
Collections.addAll(noneOf, eArr);
long[] jArr = new long[(((((Enum[]) cls.getEnumConstants()).length - 1) / 64) + 1)];
Iterator it = noneOf.iterator();
while (it.hasNext()) {
Enum enumR = (Enum) it.next();
int ordinal = enumR.ordinal() / 64;
jArr[ordinal] = jArr[ordinal] | ((long) (1 << (enumR.ordinal() % 64)));
}
ArrayUtils.reverse(jArr);
return jArr;
}
public static <E extends Enum<E>> E getEnum(Class<E> cls, String str) {
if (str == null) {
return null;
}
try {
return Enum.valueOf(cls, str);
} catch (IllegalArgumentException e) {
return null;
}
}
public static <E extends Enum<E>> List<E> getEnumList(Class<E> cls) {
return new ArrayList(Arrays.asList(cls.getEnumConstants()));
}
public static <E extends Enum<E>> Map<String, E> getEnumMap(Class<E> cls) {
LinkedHashMap linkedHashMap = new LinkedHashMap();
for (Enum enumR : (Enum[]) cls.getEnumConstants()) {
linkedHashMap.put(enumR.name(), enumR);
}
return linkedHashMap;
}
public static <E extends Enum<E>> boolean isValidEnum(Class<E> cls, String str) {
if (str == null) {
return false;
}
try {
Enum.valueOf(cls, str);
return true;
} catch (IllegalArgumentException e) {
return false;
}
}
public static <E extends Enum<E>> EnumSet<E> processBitVector(Class<E> cls, long j) {
checkBitVectorable(cls).getEnumConstants();
return processBitVectors(cls, j);
}
public static <E extends Enum<E>> EnumSet<E> processBitVectors(Class<E> cls, long... jArr) {
EnumSet<E> noneOf = EnumSet.noneOf(asEnum(cls));
long[] clone = ArrayUtils.clone((long[]) Validate.notNull(jArr));
ArrayUtils.reverse(clone);
for (Enum enumR : (Enum[]) cls.getEnumConstants()) {
int ordinal = enumR.ordinal() / 64;
if (ordinal < clone.length && (clone[ordinal] & ((long) (1 << (enumR.ordinal() % 64)))) != 0) {
noneOf.add(enumR);
}
}
return noneOf;
}
}
| [
"lewis@spectratech.com"
] | lewis@spectratech.com |
114f03dd23cae3231907bb11c7d6d91f36c486ba | 27b479af89c145a10a61b8a0f14d69da8e118c00 | /src/com/barrybecker4/PlainRobot.java | 1d5c1122d9cdff2d9549bb9b5183b0637fc77dcb | [] | no_license | LoganCSC/robocode-robots | e7ff75079b5cf0123c5b266b0a6d553ca5fc3db5 | 11fad35e8a660cbe3949244db59004cace4dc7a1 | refs/heads/master | 2020-04-19T00:28:27.603853 | 2016-09-11T18:02:45 | 2016-09-11T18:02:45 | 67,882,136 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,536 | java | package com.barrybecker4;
import robocode.AdvancedRobot;
import robocode.BulletHitEvent;
import robocode.HitByBulletEvent;
import robocode.HitWallEvent;
import robocode.Robot;
import robocode.ScannedRobotEvent;
import java.awt.Color;
import java.awt.Graphics2D;
/**
* @author Barry Becker
*/
public class PlainRobot extends AdvancedRobot {
public void run() {
setBulletColor(Color.yellow);
setScanColor(new Color(100, 200, 100, 230));
setColors(Color.yellow, new Color(140, 110, 30), new Color(80, 90, 220)); // body,gun,radar
setAdjustGunForRobotTurn(true);
setAdjustRadarForGunTurn(false);
// Robot main loop
while (true) {
setAhead(10);
setTurnRight(Math.random() * 100 - 50);
setTurnGunLeft(Math.random() * 100 - 50);
//turnGunRight(100);
//turnRadarRight(20);
scan();
}
}
/**
* What to do when you see another robot
*/
public void onScannedRobot(ScannedRobotEvent e) {
this.setFire(1.0);
}
/**
* Called when one of this robots bullets hits another robot.
*/
public void onBulletHit(final BulletHitEvent e) {
}
/**
* What to do when this robot hit by a bullet
*/
public void onHitByBullet(final HitByBulletEvent e) {
}
/**
* onHitWall: What to do when you hit a wall
*/
public void onHitWall(HitWallEvent e) {
setTurnLeft(Math.random() * 180);
setAhead(100);
}
public void onPaint(Graphics2D g) {
}
public static void main(String[] args) {
Robot s = new PlainRobot();
}
}
| [
"barrybecker4@yahoo.com"
] | barrybecker4@yahoo.com |
c497bcb2de9fe6067abaa8cb06d6e279d6a94611 | c3f11c5385c4870866758cd407f47cc98be89a82 | /baselib/src/main/java/com/hades/baselib/ui/NormalBaseActivity.java | b97d84d7d427d7007440a726784203a3ee45f5cb | [] | no_license | coolhades/WCube | 4ff62ff11923ef9f7683d57c6506de2713496dd5 | 157c59f31441bdea9720443475d941fd1af9a588 | refs/heads/master | 2021-01-18T18:59:55.288471 | 2017-04-01T02:44:35 | 2017-04-01T02:44:35 | 86,879,889 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,027 | java | package com.hades.baselib.ui;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
/**
* Created by Hades on 2016/11/21.
*/
public abstract class NormalBaseActivity extends AppCompatActivity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
public void init(Bundle savedInstanceState) {
initView(savedInstanceState);
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
hideStatusBar();
}
initData();
initEvent();
}
protected abstract void hideStatusBar();
protected abstract void initView(Bundle savedInstanceState);
protected abstract void initData();
protected abstract void initEvent();
@Override
protected void onPostResume() {
super.onPostResume();
}
@Override
protected void onPause() {
super.onPause();
}
}
| [
"723760950@qq.com"
] | 723760950@qq.com |
71ba566364fedb0af25ab58c72c29d93287bca85 | 3df5af9d358c24f88b0118dfd0d6feb5d657ba0e | /drools-game-engine-services/src/main/java/org/drools/game/services/endpoint/api/GameService.java | 20cf7a6bd007e41eb2c438933ce8ba78aa1198e3 | [
"Apache-2.0"
] | permissive | GabrielaRo/drools-game-engine | 4a5d9fa3e4941f44575434952b48946304416487 | 25efaa09d89ae6c679341b3dda94c6fdf74a1317 | refs/heads/master | 2021-01-18T17:09:20.467572 | 2016-08-01T09:14:08 | 2016-08-01T09:14:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,564 | java | /*
* Copyright 2016 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.drools.game.services.endpoint.api;
import java.util.List;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import static javax.ws.rs.core.MediaType.APPLICATION_JSON;
import org.drools.game.model.api.Player;
import org.drools.game.services.infos.GameSessionInfo;
@Path( "game" )
public interface GameService {
@POST
@Path( "" )
@Consumes( value = APPLICATION_JSON )
@Produces( value = APPLICATION_JSON )
String newGameSession( );
@GET
@Path( "" )
@Consumes( value = APPLICATION_JSON )
@Produces( value = APPLICATION_JSON )
List<GameSessionInfo> getAllGameSessions();
@POST
@Path( "{sessionId}" )
@Consumes( value = APPLICATION_JSON )
@Produces( value = APPLICATION_JSON )
void joinGameSession( @PathParam( "sessionId" ) String sessionId, Player p );
}
| [
"salaboy@gmail.com"
] | salaboy@gmail.com |
70846f756b5267a5fda92d4920ea4d7295a20f95 | e52f88dfe64b13bd9360b0f802183bcb379d3bc6 | /data-mysql/src/test/java/org/adamalang/mysql/impl/GlobalPlanFetcherTests.java | f70e1dc44679b235bdbc2c1e0fb882ec92b35788 | [
"MIT"
] | permissive | mathgladiator/adama-lang | addfc85111fe329eb23942605457b77e4f59d5d2 | a03326cc678aaac5f566606408a708b5f871553d | refs/heads/master | 2023-09-01T02:35:07.985525 | 2023-08-31T23:47:07 | 2023-08-31T23:47:07 | 245,283,238 | 94 | 14 | MIT | 2023-09-10T18:12:37 | 2020-03-05T22:47:40 | Java | UTF-8 | Java | false | false | 2,367 | java | /*
* This file is subject to the terms and conditions outlined in the
* file 'LICENSE' (it's dual licensed) located in the root directory
* near the README.md which you should also read. For more information
* about the project which owns this file, see https://www.adama-platform.com/ .
*
* (c) 2021 - 2023 by Adama Platform Initiative, LLC
*/
package org.adamalang.mysql.impl;
import org.adamalang.common.Callback;
import org.adamalang.common.ErrorCodeException;
import org.adamalang.common.keys.MasterKey;
import org.adamalang.common.metrics.NoOpMetricsFactory;
import org.adamalang.mysql.*;
import org.adamalang.mysql.model.Spaces;
import org.adamalang.runtime.deploy.DeploymentBundle;
import org.junit.Assert;
import org.junit.Test;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
public class GlobalPlanFetcherTests {
@Test
public void flow() throws Exception {
DataBaseConfig dataBaseConfig = DataBaseConfigTests.getLocalIntegrationConfig();
try (DataBase dataBase = new DataBase(dataBaseConfig, new DataBaseMetrics(new NoOpMetricsFactory()))) {
Installer installer = new Installer(dataBase);
try {
installer.install();
String masterKey = MasterKey.generateMasterKey();
GlobalPlanFetcher fetcher = new GlobalPlanFetcher(dataBase, masterKey);
CountDownLatch latch = new CountDownLatch(2);
fetcher.find("space", new Callback<DeploymentBundle>() {
@Override
public void success(DeploymentBundle value) {
}
@Override
public void failure(ErrorCodeException ex) {
latch.countDown();
}
});
int spaceId = Spaces.createSpace(dataBase, 1, "spacez");
Spaces.setPlan(dataBase, spaceId, "{\"versions\":{\"x\":\"public int x = 123;\"},\"default\":\"x\",\"plan\":[{\"version\":\"x\",\"percent\":50,\"prefix\":\"k\",\"seed\":\"a2\"}]}", "hash");
fetcher.find("spacez", new Callback<DeploymentBundle>() {
@Override
public void success(DeploymentBundle value) {
latch.countDown();
}
@Override
public void failure(ErrorCodeException ex) {
}
});
Assert.assertTrue(latch.await(10000, TimeUnit.MILLISECONDS));
} finally {
installer.uninstall();
}
}
}
}
| [
"48896921+mathgladiator@users.noreply.github.com"
] | 48896921+mathgladiator@users.noreply.github.com |
9e715876cca3701d1b3db11193351da40846683d | 791ddf4cbc563f533e7d00a9259e24fe85008877 | /aop-mc-int/src/test/java/org/jboss/test/microcontainer/beans/test/ScopedAspectFactoryPerClassAopTestCase.java | ea65184a98751e45c9bc12eb7949f690b88d72f8 | [] | no_license | wolfc/microcontainer | 7dd1fe85057c31575458ad1a22c3f74534f72bd0 | 4ef8127e690e18f54f40287b72f68dbf3541b07c | refs/heads/master | 2020-04-25T23:27:30.830476 | 2013-01-09T14:15:50 | 2013-01-09T14:15:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,271 | java | /*
* JBoss, Home of Professional Open Source.
* Copyright 2006, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.test.microcontainer.beans.test;
import org.jboss.test.aop.junit.AOPMicrocontainerTest;
import org.jboss.test.microcontainer.beans.POJO;
import org.jboss.test.microcontainer.beans.POJO2;
import org.jboss.test.microcontainer.beans.ScopedFactoryAspect;
/**
*
* @author <a href="kabir.khan@jboss.com">Kabir Khan</a>
* @version $Revision: 1.1 $
*/
public class ScopedAspectFactoryPerClassAopTestCase extends AOPMicrocontainerTest
{
public ScopedAspectFactoryPerClassAopTestCase(String name)
{
super(name);
}
public void testPerClass() throws Exception
{
POJO pojo = (POJO)getBean("POJO1A");
POJO2 pojo2 = (POJO2)getBean("POJO2");
ScopedFactoryAspect.last = null;
pojo.method();
ScopedFactoryAspect a1 = ScopedFactoryAspect.last;
assertNotNull(a1);
ScopedFactoryAspect.last = null;
pojo2.method();
ScopedFactoryAspect a2 = ScopedFactoryAspect.last;
assertNotNull(a2);
assertNotSame(a1, a2);
ScopedFactoryAspect.last = null;
pojo.method(3);
ScopedFactoryAspect a3 = ScopedFactoryAspect.last;
assertNotNull(a3);
assertSame(a1, a3);
}
} | [
"kkhan@redhat.com"
] | kkhan@redhat.com |
a4f7619856ca0f5b40c588c63e4fbb402096958a | b6a711bda0014064b6899ef507b2431d2b6b5030 | /src/main/java/rx/internal/operators/OperatorDebounceWithSelector.java | e3df01d681359a1e3134de0cb60db5aabfb991db | [
"Apache-2.0"
] | permissive | akarnokd/RxJavaFlow | 0c106d2dc0c71d18fd4248c69d37af7bdadabc3c | 5c74270f438e19d4f66194724cddc571ec1821cb | refs/heads/master | 2020-06-02T20:37:01.647294 | 2015-03-06T10:37:09 | 2015-03-06T10:37:09 | 31,422,563 | 9 | 3 | null | null | null | null | UTF-8 | Java | false | false | 3,492 | java | /**
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package rx.internal.operators;
import rx.Observable;
import rx.Observable.Operator;
import rx.Subscriber;
import rx.functions.Function;
import rx.internal.operators.OperatorDebounceWithTime.DebounceState;
import rx.observers.SerializedSubscriber;
import rx.subscriptions.SerialSubscription;
/**
* Delay the emission via another observable if no new source appears in the meantime.
*
* @param <T> the value type of the main sequence
* @param <U> the value type of the boundary sequence
*/
public final class OperatorDebounceWithSelector<T, U> implements Operator<T, T> {
final Function<? super T, ? extends Observable<U>> selector;
public OperatorDebounceWithSelector(Function<? super T, ? extends Observable<U>> selector) {
this.selector = selector;
}
@Override
public Subscriber<? super T> call(final Subscriber<? super T> child) {
final SerializedSubscriber<T> s = new SerializedSubscriber<T>(child);
final SerialSubscription ssub = new SerialSubscription();
child.add(ssub);
return new Subscriber<T>(child) {
final DebounceState<T> state = new DebounceState<T>();
final Subscriber<?> self = this;
@Override
public void onStart() {
// debounce wants to receive everything as a firehose without backpressure
request(Long.MAX_VALUE);
}
@Override
public void onNext(T t) {
Observable<U> debouncer;
try {
debouncer = selector.call(t);
} catch (Throwable e) {
onError(e);
return;
}
final int index = state.next(t);
Subscriber<U> debounceSubscriber = new Subscriber<U>() {
@Override
public void onNext(U t) {
onComplete();
}
@Override
public void onError(Throwable e) {
self.onError(e);
}
@Override
public void onComplete() {
state.emit(index, s, self);
unsubscribe();
}
};
ssub.set(debounceSubscriber);
debouncer.unsafeSubscribe(debounceSubscriber);
}
@Override
public void onError(Throwable e) {
s.onError(e);
unsubscribe();
state.clear();
}
@Override
public void onComplete() {
state.emitAndComplete(s, this);
}
};
}
} | [
"akarnokd@gmail.com"
] | akarnokd@gmail.com |
0b80693cf9f9066fbeb8f4d459d466a2574feb7a | ef0c1514e9af6de3ba4a20e0d01de7cc3a915188 | /sdk/cognitiveservices/ms-azure-cs-contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/EvaluateMethodOptionalParameter.java | 0db51d2ec947226dee1952ba6e26bb704fc9feed | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-unknown-license-reference",
"LGPL-2.1-or-later",
"CC0-1.0",
"BSD-3-Clause",
"UPL-1.0",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"LicenseRef-scancode-generic-cla"
] | permissive | Azure/azure-sdk-for-java | 0902d584b42d3654b4ce65b1dad8409f18ddf4bc | 789bdc6c065dc44ce9b8b630e2f2e5896b2a7616 | refs/heads/main | 2023-09-04T09:36:35.821969 | 2023-09-02T01:53:56 | 2023-09-02T01:53:56 | 2,928,948 | 2,027 | 2,084 | MIT | 2023-09-14T21:37:15 | 2011-12-06T23:33:56 | Java | UTF-8 | Java | false | false | 1,809 | java | /**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/
package com.microsoft.azure.cognitiveservices.vision.contentmoderator.models;
/**
* The EvaluateMethodOptionalParameter model.
*/
public class EvaluateMethodOptionalParameter {
/**
* Whether to retain the submitted image for future use; defaults to false
* if omitted.
*/
private Boolean cacheImage;
/**
* Gets or sets the preferred language for the response.
*/
private String thisclientacceptLanguage;
/**
* Get the cacheImage value.
*
* @return the cacheImage value
*/
public Boolean cacheImage() {
return this.cacheImage;
}
/**
* Set the cacheImage value.
*
* @param cacheImage the cacheImage value to set
* @return the EvaluateMethodOptionalParameter object itself.
*/
public EvaluateMethodOptionalParameter withCacheImage(Boolean cacheImage) {
this.cacheImage = cacheImage;
return this;
}
/**
* Get the thisclientacceptLanguage value.
*
* @return the thisclientacceptLanguage value
*/
public String thisclientacceptLanguage() {
return this.thisclientacceptLanguage;
}
/**
* Set the thisclientacceptLanguage value.
*
* @param thisclientacceptLanguage the thisclientacceptLanguage value to set
* @return the EvaluateMethodOptionalParameter object itself.
*/
public EvaluateMethodOptionalParameter withThisclientacceptLanguage(String thisclientacceptLanguage) {
this.thisclientacceptLanguage = thisclientacceptLanguage;
return this;
}
}
| [
"jianghaolu@users.noreply.github.com"
] | jianghaolu@users.noreply.github.com |
64a2f4ea392e53774476cdc471d7cd570e29c320 | d11fb0d15b73a28742caa97e349dcfbe70d2563f | /server/iih_pub/iih.ci_pub/src/main/java/iih/ci/ord/ordmp/i/IOrdmpRService.java | affdafbb0d6ca38bca4261049aac7d8912997f36 | [] | no_license | fhis/order.client | 50a363fd3e4f56d95ccc5aa288e907a0a8571031 | 56cfa7877f600a10c54fdb30306a32ffa28b8217 | refs/heads/master | 2021-08-22T20:50:59.511923 | 2017-12-01T07:10:27 | 2017-12-01T07:10:27 | 112,678,072 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,822 | java | package iih.ci.ord.ordmp.i;
import xap.sys.appfw.tmpl.qryscheme.IQryScheme;
import xap.mw.core.data.BizException;
import xap.mw.coreitf.d.*;
import xap.mw.core.data.*;
import xap.sys.appfw.orm.handle.dataobject.paging.PaginationInfo;
import xap.sys.appfw.orm.handle.dataobject.paging.PagingRtnData;
import iih.ci.ord.ordmp.d.CimpDO;
import xap.sys.appfw.tmpl.qryscheme.qrydto.QryRootNodeDTO;
/**
* 医嘱关键执行事件及状态数据维护服务
*/
public interface IOrdmpRService {
/**
* 根据id值查找医嘱关键执行事件及状态数据
*/
public abstract CimpDO findById(String id) throws BizException;
/**
* 根据id值集合查找医嘱关键执行事件及状态数据集合
*/
public abstract CimpDO[] findByIds(String[] ids, FBoolean isLazy) throws BizException;
/**
* 根据id值集合查找医嘱关键执行事件及状态数据集合--大数据量
*/
public abstract CimpDO[] findByBIds(String[] ids, FBoolean isLazy) throws BizException;
/**
* 根据condition条件查找医嘱关键执行事件及状态数据集合
*/
public abstract CimpDO[] find(String whereStr,String orderStr,FBoolean isLazy) throws BizException;
/**
* 根据查询方案查找医嘱关键执行事件及状态数据集合
*/
public abstract CimpDO[] findByQScheme(IQryScheme qscheme) throws BizException;//暂不用
/**
* 根据分页信息及查询与分组条件获得分页数据
*/
public abstract PagingRtnData<CimpDO> findByPageInfo(PaginationInfo pg, String wherePart,String orderByPart) throws BizException;
/**
* 根据查询方案查询聚合数据集合
* @param qscheme
* @return
* @throws BizException
*/
public CimpDO[] findByQCond(QryRootNodeDTO qryRootNodeDTO,String orderStr,FBoolean isLazy) throws BizException;
/**
* 根据DO某一字符类型属性值查询DO数据
* @param attr
* @param value
* @return
* @throws BizException
*/
public abstract CimpDO[] findByAttrValString(String attr, String value) throws BizException;
/**
* 根据DO某一字符类型属性值数组查询DO数据
* @param attr
* @param values
* @return
* @throws BizException
*/
public abstract CimpDO[] findByAttrValStrings(String attr, String[] values) throws BizException;
/**
* 根据DO某一属性值List查询DO数据
* @param attr
* @param values
* @return
* @throws BizException
*/
public abstract CimpDO[] findByAttrValList(String attr, FArrayList values) throws BizException;
/**
* 根据查询模板条件、分页信息查询分页数据集合
* @param qryRootNodeDTO
* @param orderStr
* @param pg
* @return
* @throws BizException
*/
public PagingRtnData<CimpDO> findByQCondAndPageInfo(QryRootNodeDTO qryRootNodeDTO,String orderStr,PaginationInfo pg) throws BizException;
} | [
"27696830@qq.com"
] | 27696830@qq.com |
ab3177003d5c13647ee0788399beedfaecd4ae77 | 08deccdb56475ccb2d0a4992be99e236c9a22264 | /hongbao-api-service/src/main/java/com/yanbao/util/WechatCommonUtil.java | 12f1aebca674acfa28611ce3ee493b3171d20828 | [] | no_license | dream-home/hongbao | 92a70099c236855b32aebe3b252192c782e93c87 | a660cc02ba0fd218b7c3a171ad4a217edfd4713d | refs/heads/master | 2021-07-05T12:29:06.735635 | 2017-09-28T04:02:52 | 2017-09-28T04:02:52 | 105,000,363 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,307 | java | package com.yanbao.util;
import com.alibaba.fastjson.JSON;
import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.xml.DomDriver;
import com.yanbao.util.h5.GenerateH5Order;
import com.yanbao.util.h5.ResponseInfo;
import com.yanbao.util.wechatpay.GenerateOrder;
import com.yanbao.util.wechatpay.WeChatPay;
import com.yanbao.vo.QueryResponseInfoVo;
import net.sf.json.JSONObject;
import org.apache.commons.codec.digest.DigestUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.text.SimpleDateFormat;
import java.util.*;
/**
* Created by zzwei on 2017/4/21 0021.
*/
public class WechatCommonUtil {
private static final Logger logger = LoggerFactory.getLogger(WechatCommonUtil.class);
/**
* 静默授权
*/
public static final String BASE_SCOPE = "snsapi_base";
/**
* 用户点击授权
*/
public static final String USERINFO_SCOPE = "snsapi_userinfo";
/** 炎宝公众号 */
/** 微信公众号APPID */
public static final String YANBAO_PUBLIC_APPID = "wx32266be91b9e0a8f";
/** 微信公众APP SECRET*/
public static final String YANBAO_PUBLIC_SECRET = "d9b7e01273e3cf705e4c4bc66bd27514";
/** 微信公众号key支付秘钥 */
public static final String YANBAO_PUBLIC_KEY = "4KEFf84f7d7HJ35689a6535d5de3a9FC";
/** 炎宝微信公众号商户ID */
public static String YANBAO_PUBLIC_MCH_ID = "1337799001";
/** 珠海斗拍公众号 */
/** 微信公众号 APPID */
public static final String ZHDP_PUBLIC_APPID = "wx30135d0dfc5e7350";
/** 微信公众号 SECRET*/
public static String ZHDP_PUBLIC_APPSECRET = "4671c87286c496f2d9709eb74631c46b";
/** 珠海斗拍APP支付相关 */
/** 微信应用APP APPID */
public static String ZHDP_APP_APPID = "wx1581a2802e11162d";
/** 微信应用商户ID */
public static String ZHDP_APP_MCHID = "1425023102";
/** 微信应用 APP key支付秘钥 */
public static String ZHDP_APP_APPKEY = "ERGHBHF1581a2802e11162dYanbaodou";
public static String ZHDP_APP_BODY = "斗拍商城支付";
/** 深圳斗拍公众号 */
/** 微信公众号 APPID */
public static final String SZDP_PUBLIC_APPID = "wx3ae10652fe071975";
/** 微信公众号 SECRET*/
public static final String SZDP_PUBLIC_SECRET = "038979f404c5f587caadf9d262ade3c0";
/** 微信公众号 商户ID */
public static String SZDP_PUBLIC_MCH_ID = "1486167342";
/** 微信公众号key支付秘钥 */
public static final String SZDP_PUBLIC_KEY = "zwn91yve0dmgmpx0i36qmlkf4rcu1bfc";
/** 深圳斗拍APP支付相关 */
/** 微信应用APPID */
public static String SZDP_APP_APPID = "wx7b629143e0c84ede";
/** 微信应用APP SECRET*/
public static String SZDP_APP_APPSECRET = "b0c2fc4e24a4458d849b404e5fe7d259";
/** 微信应用APP商户ID */
public static String SZDP_APP_MCHID = "1485042672";
/** 微信应用 APP key支付秘钥 */
public static String SZDP_APP_APPKEY = "2c3slt6c2ugcsc2ojnvmj57cia8exgjm";
public static String SZDP_APP_BODY = "斗拍商城支付";
}
| [
"1510331524@qq.com"
] | 1510331524@qq.com |
0f0113a0329b58befb9bc821701eb6c1035a321e | ef6f8e323e8ca091ea268c9b07509f356fe63ad1 | /app/src/main/java/ys/app/petproject/activity/TransactionDetailActivity.java | a6faa71d5ba0d0fa3ef1eca41fb225a500f76419 | [] | no_license | kyrieLiu/sunmi_pos | 47a38988ef848ac1a20d0aab1c931a4ca7bdd6e8 | 458380faaac68434df12edaac41ebb2d3adb926c | refs/heads/master | 2020-03-26T13:27:43.183092 | 2018-08-16T05:26:36 | 2018-08-16T05:26:36 | 144,940,392 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,094 | java | package ys.app.petproject.activity;
import android.databinding.DataBindingUtil;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.RequiresApi;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewTreeObserver;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.PopupWindow;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
import java.io.Serializable;
import ys.app.petproject.BaseActivity;
import ys.app.petproject.Constants;
import ys.app.petproject.R;
import ys.app.petproject.databinding.TransactionDetailBinding;
import ys.app.petproject.http.ApiClient;
import ys.app.petproject.model.BaseListResult;
import ys.app.petproject.model.ChargeResultInfo;
import ys.app.petproject.model.OrderInfo;
import ys.app.petproject.viewmodel.TransactionDetailViewModel;
import ys.app.petproject.widget.dialog.CustomDialog;
import ys.app.petproject.widget.dialog.DeleteDialog;
/**
* Created by admin on 2017/6/11.
*/
public class TransactionDetailActivity extends BaseActivity {
private TransactionDetailViewModel mViewModel;
private TransactionDetailBinding binding;
private OrderInfo orderInfo;
private ApiClient<BaseListResult<ChargeResultInfo>> mClient;
private TextView tv_print;
private PopupWindow popupWindow;
private RelativeLayout toolBar;
private CustomDialog mDeleteDialog;
private DeleteDialog mConfirmDeleteDialog;
public boolean canRefund=true;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = DataBindingUtil.setContentView(this, R.layout.activity_transaction_detail);
setBackVisiable();
setTitle("订单详情");
setBgWhiteStatusBar();
Bundle extras = getIntent().getExtras();
Serializable serializable = extras.getSerializable(Constants.intent_transaction);
if (serializable instanceof OrderInfo) {
orderInfo=(OrderInfo) serializable;
mViewModel = new TransactionDetailViewModel(this, binding,orderInfo );
}
binding.setViewModel(mViewModel);
mViewModel.init();
toolBar = (RelativeLayout) findViewById(R.id.tool_bar);
initPopupWindow();
tv_print = (TextView) findViewById(R.id.modify_tv);
tv_print.setVisibility(View.VISIBLE);
tv_print.setText("更多");
if (orderInfo!=null) tv_print.setVisibility(View.VISIBLE);
tv_print.setOnClickListener(new View.OnClickListener() {
@RequiresApi(api = Build.VERSION_CODES.KITKAT)
@Override
public void onClick(View v) {
popupWindow.showAsDropDown(toolBar,120,0, Gravity.RIGHT);
}
});
settingTextView();
}
private void settingTextView(){
ViewTreeObserver observer=tv_print.getViewTreeObserver();
observer.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
//要显示的drawable
Drawable d = getResources().getDrawable(R.mipmap.xialaxuan);
//设置显示大小
d.setBounds(0, 0, 22, 17);
//为TextView添加drawableLeft(函数对应的参数是:drawableLeft,drawableTop,drawableRight,drawableBottom)
tv_print.setCompoundDrawables(null, null, d, null);
//取消监听
tv_print.getViewTreeObserver().removeGlobalOnLayoutListener(this);
}
});
}
private void initPopupWindow(){
LayoutInflater layoutInflater = (LayoutInflater) this.getSystemService(this.LAYOUT_INFLATER_SERVICE);
final View popupView = layoutInflater.inflate(R.layout.popup_transaction_detail, null);
popupWindow = new PopupWindow(popupView, LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT, true);
popupWindow.setBackgroundDrawable(this.getResources().getDrawable(R.color.white));
Button bt_print=(Button) popupView.findViewById(R.id.bt_popup_item1);
Button bt_returnMoney=(Button) popupView.findViewById(R.id.bt_popup_item2);
Button bt_cancel=(Button) popupView.findViewById(R.id.bt_popup_item3);
bt_print.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
popupWindow.dismiss();
mViewModel.printOrder(tv_print);
}
});
bt_returnMoney.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
popupWindow.dismiss();
showReturnDialog();
}
});
bt_cancel.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
popupWindow.dismiss();
}
});
}
private void showReturnDialog() {
if (orderInfo.getIsRefund()==1||!canRefund){
showToast("该订单已产生过退款");
return;
}
if (orderInfo.getRechargeList()!=null&&orderInfo.getRechargeList().size()>0){
showToast("充值订单不支持退款");
return;
}
if (orderInfo.getIsClassification()==1){
showToast("次卡支付不支持退款");
return;
}
if (mDeleteDialog == null) {
mDeleteDialog = new CustomDialog(this);
if ("0112".equals(orderInfo.getPayedMethod())){
mDeleteDialog.setContent("个人微信收款需打开微信客户端手动退款,请确认是否已退款?");
}else if ("0113".equals(orderInfo.getPayedMethod())){
mDeleteDialog.setContent("个人支付宝收款需打开支付宝客户端手动退款,请确认是否已退款?");
}else{
mDeleteDialog.setContent("确定全额退款?");
}
mDeleteDialog.setCancelVisiable();
}
mDeleteDialog.setOkVisiable(new View.OnClickListener() {
@Override
public void onClick(View v) {
mDeleteDialog.dismiss();
if (mConfirmDeleteDialog == null) {
mConfirmDeleteDialog = new DeleteDialog(TransactionDetailActivity.this);
}
mConfirmDeleteDialog.setOkVisiable(new DeleteDialog.IDeleteDialogCallback() {
@Override
public void verificationPwd(boolean b) {
if (b) {
if (mConfirmDeleteDialog != null) {
mConfirmDeleteDialog.dismiss();
}
String payMethod=orderInfo.getPayedMethod();
if ("0112".equals(payMethod)||"0113".equals(payMethod)||"8888".equals(payMethod)||"1001".equals(payMethod)){
mViewModel.updateOrder("");
}else{
mViewModel.turnBackMoney();
}
} else {
Toast.makeText(TransactionDetailActivity.this, "密码输入错误请重新输入", Toast.LENGTH_SHORT).show();
}
}
@Override
public void onDismiss() {
mConfirmDeleteDialog = null;
}
});
mConfirmDeleteDialog.show();
}
});
mDeleteDialog.show();
}
@Override
protected void onDestroy() {
super.onDestroy();
if (mViewModel != null) {
mViewModel.reset();
}
mDeleteDialog=null;
mConfirmDeleteDialog=null;
}
}
| [
"652992429@qq.com"
] | 652992429@qq.com |
5f7216a7b14c63e02fa06e31abbfe24291623a2a | bb05fc62169b49e01078b6bd211f18374c25cdc9 | /soft/form/src/com/chimu/formTools/examples/schema2/DropExampleDatabase.java | bd29ca6145e339fc8cd1c3c87bca7fd1da3195dd | [] | no_license | markfussell/form | 58717dd84af1462d8e3fe221535edcc8f18a8029 | d227c510ff072334a715611875c5ae6a13535510 | refs/heads/master | 2016-09-10T00:12:07.602440 | 2013-02-07T01:24:14 | 2013-02-07T01:24:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 503 | java | /*======================================================================
**
** File: com/chimu/formTools/examples/schema2/DropExampleDatabase.java
**
** Copyright (c) 1997-2000, ChiMu Corporation. All Rights Reserved.
** See the file COPYING for copyright permissions.
**
======================================================================*/
package com.chimu.formTools.examples.schema2;
public class DropExampleDatabase extends com.chimu.formTools.examples.DropExampleDatabase {
}
| [
"mark.fussell@emenar.com"
] | mark.fussell@emenar.com |
534d03be44a5c7229a61df40fba025572bb8b871 | fdc1a3e6e6746ca53739a489ef3a662dd05c3c60 | /src/main/java/com/mrbonono63/create/content/contraptions/base/KineticRenderMaterials.java | f2426bd0d7e9013c17985b34441353276be3e016 | [
"MIT"
] | permissive | Bonono63/Create---Fabric-Edition | 197babf8a008144e742616a7f8a6c7a19b61d307 | 94d03047a9fba5d4346e0be91353a8d7dbd3a709 | refs/heads/master | 2023-04-04T17:17:59.443779 | 2021-04-17T00:54:39 | 2021-04-17T00:54:39 | 249,259,508 | 9 | 3 | null | null | null | null | UTF-8 | Java | false | false | 847 | java | package com.mrbonono63.create.content.contraptions.base;
import com.mrbonono63.create.content.contraptions.components.actors.ActorData;
import com.mrbonono63.create.content.contraptions.relays.belt.BeltData;
import com.mrbonono63.create.content.logistics.block.FlapData;
import com.mrbonono63.create.foundation.render.backend.MaterialType;
import com.mrbonono63.create.foundation.render.backend.instancing.InstancedModel;
public class KineticRenderMaterials {
public static final MaterialType<InstancedModel<RotatingData>> ROTATING = new MaterialType<>();
public static final MaterialType<InstancedModel<BeltData>> BELTS = new MaterialType<>();
public static final MaterialType<InstancedModel<ActorData>> ACTORS = new MaterialType<>();
public static final MaterialType<InstancedModel<FlapData>> FLAPS = new MaterialType<>();
}
| [
"bonoria63@gmail.com"
] | bonoria63@gmail.com |
2cd79a0e71912df1f382d0d113ab29135f94d375 | 6c84838e69ae075244700f6c67f87292dcfa0991 | /src/main/java/week07d05/Motorcycle.java | 64041bb85e1e807aad0a15239d3bff3250df4b59 | [] | no_license | vkrisztianx86/training-solutions | e4fca2d35dd3cfd37572de9eef52b972f2f0385a | 1f775a631979b51430f1f84f9689e9cbbe015e9e | refs/heads/master | 2023-05-26T10:19:33.137529 | 2021-06-08T11:41:55 | 2021-06-08T11:41:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 181 | java | package week07d05;
public class Motorcycle extends AbstractVehicle {
public Motorcycle(int numberOfGears) {
super(numberOfGears, TransmissionType.SEQUENTIAL);
}
}
| [
"lippaitamas1021@gmail.com"
] | lippaitamas1021@gmail.com |
47f90181fc40108e84697ca43ae4b6bd385b8e80 | d701578a5c291506ff0394ff13c40f84da65e6f9 | /hix-common/hix-common-core/src/main/java/cn/orgtec/hix/common/core/util/SpringContextHolder.java | cb84a8d1acc4159a5bd62c186c484b992a708bb8 | [] | no_license | zhangyibo1012/hix | bdbc4189b048a5053847752e51cf2ac036d7f6f2 | 4b8531546e54fcfd3c834b2e8e3cecdc73e6497e | refs/heads/master | 2022-07-11T22:12:50.452130 | 2019-09-05T04:58:52 | 2019-09-05T04:58:52 | 206,477,697 | 0 | 1 | null | 2022-06-21T01:49:06 | 2019-09-05T04:56:44 | Java | UTF-8 | Java | false | false | 2,114 | java | package cn.orgtec.hix.common.core.util;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
/**
* @author lengleng
* @date 2018/6/27
* Spring 工具类
*/
@Slf4j
@Service
@Lazy(false)
public class SpringContextHolder implements ApplicationContextAware, DisposableBean {
private static ApplicationContext applicationContext = null;
/**
* 取得存储在静态变量中的ApplicationContext.
*/
public static ApplicationContext getApplicationContext() {
return applicationContext;
}
/**
* 实现ApplicationContextAware接口, 注入Context到静态变量中.
*/
@Override
public void setApplicationContext(ApplicationContext applicationContext) {
SpringContextHolder.applicationContext = applicationContext;
}
/**
* 从静态变量applicationContext中取得Bean, 自动转型为所赋值对象的类型.
*/
@SuppressWarnings("unchecked")
public static <T> T getBean(String name) {
return (T) applicationContext.getBean(name);
}
/**
* 从静态变量applicationContext中取得Bean, 自动转型为所赋值对象的类型.
*/
public static <T> T getBean(Class<T> requiredType) {
return applicationContext.getBean(requiredType);
}
/**
* 清除SpringContextHolder中的ApplicationContext为Null.
*/
public static void clearHolder() {
if (log.isDebugEnabled()) {
log.debug("清除SpringContextHolder中的ApplicationContext:" + applicationContext);
}
applicationContext = null;
}
/**
* 发布事件
*
* @param event
*/
public static void publishEvent(ApplicationEvent event) {
if (applicationContext == null) {
return;
}
applicationContext.publishEvent(event);
}
/**
* 实现DisposableBean接口, 在Context关闭时清理静态变量.
*/
@Override
public void destroy() {
SpringContextHolder.clearHolder();
}
}
| [
"35024391+zhangyibo1012@users.noreply.github.com"
] | 35024391+zhangyibo1012@users.noreply.github.com |
c2401603d0b1f300f4c3fad1be0771ca612f66ff | c7406de612eff59725824a8120d960c585da4b2c | /loyalty/src/main/java/com/tomtop/loyalty/configuration/ApplicationConfigurations.java | abefa34751e90b76d67ae115c9f511413073b816 | [] | no_license | liudih/tt-58 | 92b9a53a6514e13d30e4c2afbafc8de68f096dfb | 0a921f35cc10052f20ff3f8434407dc3eabd7aa1 | refs/heads/master | 2021-01-20T18:02:12.917030 | 2016-06-28T04:08:30 | 2016-06-28T04:08:30 | 62,108,984 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 810 | java | package com.tomtop.loyalty.configuration;
import javax.sql.DataSource;
import liquibase.integration.spring.SpringLiquibase;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
@EnableConfigurationProperties({ JdbcConnectionSettings.class })
public class ApplicationConfigurations {
@Bean
public SpringLiquibase liquibase(@Qualifier("loyaltyDataSource") DataSource dataSource){
SpringLiquibase lb = new SpringLiquibase();
lb.setDataSource(dataSource);
lb.setChangeLog("classpath:liquibase/mysql/*.xml");
//contexts specifies the runtime contexts to use.
return lb;
}
}
| [
"liudih@qq.com"
] | liudih@qq.com |
c937740cfc5e4a8a691d96b926f3bf567fd15d1e | d534b1da383456c7608b9e93697139521c9551b0 | /src/main/java/com/food/manager/config/audit/AuditEventConverter.java | 25573bb87b4efa75f0a3b0effc7bba1b54973519 | [] | no_license | Sp0ky/jhipsterOnlineFoodManager | f6ba9eb9eb0bf7e4cc7dfb33845742610be495a4 | 29c15243833a0d873464929ebbdc17b616c4947c | refs/heads/master | 2021-04-28T20:59:37.167082 | 2018-02-18T10:33:01 | 2018-02-18T10:33:01 | 121,941,710 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,323 | java | package com.food.manager.config.audit;
import com.food.manager.domain.PersistentAuditEvent;
import org.springframework.boot.actuate.audit.AuditEvent;
import org.springframework.security.web.authentication.WebAuthenticationDetails;
import org.springframework.stereotype.Component;
import java.util.*;
@Component
public class AuditEventConverter {
/**
* Convert a list of PersistentAuditEvent to a list of AuditEvent
*
* @param persistentAuditEvents the list to convert
* @return the converted list.
*/
public List<AuditEvent> convertToAuditEvent(Iterable<PersistentAuditEvent> persistentAuditEvents) {
if (persistentAuditEvents == null) {
return Collections.emptyList();
}
List<AuditEvent> auditEvents = new ArrayList<>();
for (PersistentAuditEvent persistentAuditEvent : persistentAuditEvents) {
auditEvents.add(convertToAuditEvent(persistentAuditEvent));
}
return auditEvents;
}
/**
* Convert a PersistentAuditEvent to an AuditEvent
*
* @param persistentAuditEvent the event to convert
* @return the converted list.
*/
public AuditEvent convertToAuditEvent(PersistentAuditEvent persistentAuditEvent) {
if (persistentAuditEvent == null) {
return null;
}
return new AuditEvent(Date.from(persistentAuditEvent.getAuditEventDate()), persistentAuditEvent.getPrincipal(),
persistentAuditEvent.getAuditEventType(), convertDataToObjects(persistentAuditEvent.getData()));
}
/**
* Internal conversion. This is needed to support the current SpringBoot actuator AuditEventRepository interface
*
* @param data the data to convert
* @return a map of String, Object
*/
public Map<String, Object> convertDataToObjects(Map<String, String> data) {
Map<String, Object> results = new HashMap<>();
if (data != null) {
for (Map.Entry<String, String> entry : data.entrySet()) {
results.put(entry.getKey(), entry.getValue());
}
}
return results;
}
/**
* Internal conversion. This method will allow to save additional data.
* By default, it will save the object as string
*
* @param data the data to convert
* @return a map of String, String
*/
public Map<String, String> convertDataToStrings(Map<String, Object> data) {
Map<String, String> results = new HashMap<>();
if (data != null) {
for (Map.Entry<String, Object> entry : data.entrySet()) {
Object object = entry.getValue();
// Extract the data that will be saved.
if (object instanceof WebAuthenticationDetails) {
WebAuthenticationDetails authenticationDetails = (WebAuthenticationDetails) object;
results.put("remoteAddress", authenticationDetails.getRemoteAddress());
results.put("sessionId", authenticationDetails.getSessionId());
} else if (object != null) {
results.put(entry.getKey(), object.toString());
} else {
results.put(entry.getKey(), "null");
}
}
}
return results;
}
}
| [
"jhipster-bot@users.noreply.github.com"
] | jhipster-bot@users.noreply.github.com |
2c4ba2b6b42cc8dfd842f1d8ca49b240dd2e9973 | d7bdaadca23880af130724d2a5813d56c9148f1b | /TrNetCompilation/src-gen/activitymigration/TrNetPat62InstancePublisher.java | 1b26c2a0017721a24b9dd960210bc99c506a6488 | [] | no_license | clagms/TrNet | 14b957e4ba8b8fb81925ca9acf2e64bc805c12e1 | 5b14e0f0fb352b6f1bf6a684cc1d4aaa0104ab47 | refs/heads/master | 2021-01-01T03:41:58.483993 | 2016-04-26T14:20:22 | 2016-04-26T14:20:22 | 57,108,988 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 203 | java | package activitymigration;
public interface TrNetPat62InstancePublisher{
public void registerListener(TrNetPat62InstanceListener listener);
public void notifyListeners(TrNetPat62Instance element);
} | [
"cla.gms@gmail.com"
] | cla.gms@gmail.com |
805482fcaaadd2b7f1040d9732a5353014e7e388 | 3c4763922cda3f3a990b74cdba6f8a30b07467de | /src/main/java/students/alex_kalashnikov/lesson_10/level_6/task_24/BooksRepository.java | 503e2802f7f8e71d244d0ff98b995378395ec41c | [] | no_license | VitalyPorsev/JavaGuru1 | 07db5a0cc122b097a20e56c9da431cd49d3c01ea | f3c25b6357309d4e9e8ac0047e51bb8031d14da8 | refs/heads/main | 2023-05-10T15:35:55.419713 | 2021-05-15T18:48:12 | 2021-05-15T18:48:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,006 | java | package students.alex_kalashnikov.lesson_10.level_6.task_24;
class BooksRepository implements BookReader {
private Book[] repository = {};
private int count;
public Book[] getRepository() {
return repository;
}
private Book[] createArr(int count) {
return new Book[count];
}
private void save(Book book) {
count++;
Book[] arr = createArr(count);
for (int i = 0; i < repository.length; i++) {
arr[i] = repository[i];
}
repository = arr;
repository[repository.length - 1] = book;
}
private void remove(Book book) {
count--;
Book[] arr = createArr(count);
for (int i = 0; i < repository.length; i++) {
if (repository[i].equals(book)) {
repository[i] = null;
}
}
int count1 = 0;
for (Book value : repository) {
if (value == null) {
continue;
} else {
arr[count1] = value;
count1++;
}
}
repository = arr;
}
private boolean contains(Book book) {
for (Book value : repository) {
if (value.equals(book)) {
return false;
}
}
return true;
}
private boolean checkParameters(Book book) {
return !book.getName().equals("") && !book.getAuthor().equals("");
}
@Override
public boolean add(Book book) {
if (contains(book) && checkParameters(book)) {
save(book);
return true;
}
return false;
}
@Override
public boolean delete(Book book) {
if (contains(book)) {
return false;
} else {
remove(book);
return true;
}
}
@Override
public String[] findAll() {
String[] arr = new String[repository.length];
for (int i = 0; i < repository.length; i++) {
arr[i] = repository[i].getName() + " [" + repository[i].getAuthor() + "]";
}
return arr;
}
@Override
public String[] findByAuthor(String author) {
int counter = 0;
int counter1 = 0;
for (Book book : repository) {
if (book.getAuthor().equals(author)) {
counter++;
}
}
String[] arr = new String[counter];
for (Book book : repository) {
if (book.getAuthor().equals(author)) {
arr[counter1] = book.getName() + " [" + book.getAuthor() + "]";
counter1++;
}
}
return arr;
}
private String[] splitWords(String searchWord) {
String lowerCase = searchWord.toLowerCase();
return lowerCase.split("");
}
private boolean compareLetters(String[] searchWord, String[] index) {
int counter = 0;
for (int i = 0; i < searchWord.length; i++) {
if (searchWord.length > index.length) {
return false;
} else if (searchWord[i].equals(index[i])) {
counter++;
}
}
return counter == searchWord.length;
}
@Override
public String[] findByAuthorLetters(String word) {
int counter = 0;
int counter1 = 0;
for (Book book : repository) {
if (compareLetters(splitWords(word), splitWords(book.getAuthor()))) {
counter++;
}
}
String[] arr = new String[counter];
for (Book book : repository) {
if (compareLetters(splitWords(word), splitWords(book.getAuthor()))) {
arr[counter1] = book.getName() + " [" + book.getAuthor() + "]";
counter1++;
}
}
return arr;
}
private String convertToLowerCase(String name) {
return name.toLowerCase();
}
@Override
public String[] findByName(String name) {
int counter = 0;
int counter1 = 0;
for (Book book : repository) {
if (convertToLowerCase(book.getName()).equals(convertToLowerCase(name))) {
counter++;
}
}
String[] arr = new String[counter];
for (Book book : repository) {
if (convertToLowerCase(book.getName()).equals(convertToLowerCase(name))) {
arr[counter1] = book.getName() + " [" + book.getAuthor() + "]";
counter1++;
}
}
return arr;
}
@Override
public String[] findByNameLetters(String word) {
int counter = 0;
int counter1 = 0;
for (Book book : repository) {
if (compareLetters(splitWords(word), splitWords(book.getName()))) {
counter++;
}
}
String[] arr = new String[counter];
for (Book book : repository) {
if (compareLetters(splitWords(word), splitWords(book.getName()))) {
arr[counter1] = book.getName() + " [" + book.getAuthor() + "]";
counter1++;
}
}
return arr;
}
private int findBookIndex(Book book) {
for (int i = 0; i < repository.length; i++) {
if (repository[i].equals(book)) {
return i;
}
}
return -1;
}
@Override
public boolean markAsRead(Book book) {
if (repository == null) {
return false;
} else if (!contains(book)) {
repository[findBookIndex(book)].setBookIsRead(true);
return true;
} else {
return false;
}
}
@Override
public boolean markAsNotRead(Book book) {
if (repository == null) {
return false;
} else if (!contains(book)) {
repository[findBookIndex(book)].setBookIsRead(false);
return true;
} else {
return false;
}
}
@Override
public String[] findAllIsRead() {
int counter = 0;
int counter1 = 0;
for (Book book : repository) {
if (book.isBookIsRead()) {
counter++;
}
}
String[] arr = new String[counter];
for (Book book : repository) {
if (book.isBookIsRead()) {
arr[counter1] = book.getName() + " [" + book.getAuthor() + "]";
counter1++;
}
}
return arr;
}
@Override
public String[] findAllIsNotRead() {
int counter = 0;
int counter1 = 0;
for (Book book : repository) {
if (!book.isBookIsRead()) {
counter++;
}
}
String[] arr = new String[counter];
for (Book book : repository) {
if (!book.isBookIsRead()) {
arr[counter1] = book.getName() + " [" + book.getAuthor() + "]";
counter1++;
}
}
return arr;
}
} | [
"kalashnikov_alex@yahoo.com"
] | kalashnikov_alex@yahoo.com |
402e09f08f06cdc42e97de32a99af14e7b74e947 | d60bd7144cb4428a6f7039387c3aaf7b295ecc77 | /ScootAppSource/com/google/android/gms/common/stats/c.java | f405c7e718ff525c4c9a25226e40117cd46d35f1 | [] | no_license | vaquarkhan/Scoot-mobile-app | 4f58f628e7e2de0480f7c41998cdc38100dfef12 | befcfb58c1dccb047548f544dea2b2ee187da728 | refs/heads/master | 2020-06-10T19:14:25.985858 | 2016-12-08T04:39:10 | 2016-12-08T04:39:10 | 75,902,491 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 487 | java | package com.google.android.gms.common.stats;
import com.google.android.gms.b.ec;
public final class c
{
public static ec<Integer> a = ec.a("gms:common:stats:max_num_of_events", Integer.valueOf(100));
public static ec<Integer> b = ec.a("gms:common:stats:max_chunk_size", Integer.valueOf(100));
}
/* Location: D:\Android\dex2jar-2.0\classes-dex2jar.jar!\com\google\android\gms\common\stats\c.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"vaquar.khan@gmail.com"
] | vaquar.khan@gmail.com |
7720e5b39512aa9248a787ba6d446a351d73651e | 47f1e5838fdd4ed0100133221f9eace02fb0de82 | /src/main/java/com/jumore/zhxf/service/dto/EventDTO.java | 6df045d9256de722574fc5b11d42393ea8c67d64 | [] | no_license | rabbit-butterfly/jhipster-demo | 2b2f16fbdf0be930b418d489e8d6348bf5f1e4bf | ba20e82b0649f7d9df5e48db094178b0269d0e8a | refs/heads/master | 2020-12-02T06:30:30.885429 | 2017-08-30T08:11:22 | 2017-08-30T08:11:22 | 96,846,288 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,856 | java | package com.jumore.zhxf.service.dto;
import java.io.Serializable;
import java.time.ZonedDateTime;
import java.util.Date;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* A DTO for the Event entity.
*/
@ApiModel(description = "活动表列返回对象")
public class EventDTO implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
/**
*
*/
@ApiModelProperty(value = "活动ID")
private Long id;
@ApiModelProperty(value = "活动标题")
private String title;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
//@JsonDeserialize(using = CustomJsonDateDeserializer.class)
private Date startDate;
//@JsonDeserialize(using = CustomJsonDateDeserializer.class)
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
private Date endDate;
private Integer status;
private String picPath;
private String summary;
private String content;
private ZonedDateTime createdTime;
//long personCount
@ApiModelProperty(value = "报名人数")
private long personCount;
//完成数
@ApiModelProperty(value = "完成数量")
private long completedCount;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public Date getStartDate() {
return startDate;
}
public void setStartDate(Date startDate) {
this.startDate = startDate;
}
public Date getEndDate() {
return endDate;
}
public void setEndDate(Date endDate) {
this.endDate = endDate;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getPicPath() {
return picPath;
}
public void setPicPath(String picPath) {
this.picPath = picPath;
}
public String getSummary() {
return summary;
}
public void setSummary(String summary) {
this.summary = summary;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public ZonedDateTime getCreatedTime() {
return createdTime;
}
public void setCreatedTime(ZonedDateTime createdTime) {
this.createdTime = createdTime;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EventDTO eventDTO = (EventDTO) o;
if ( ! Objects.equals(id, eventDTO.id)) return false;
return true;
}
public long getPersonCount() {
return personCount;
}
public void setPersonCount(long personCount) {
this.personCount = personCount;
}
public long getCompletedCount() {
return completedCount;
}
public void setCompletedCount(long completedCount) {
this.completedCount = completedCount;
}
@Override
public int hashCode() {
return Objects.hashCode(id);
}
@Override
public String toString() {
return "EventDTO{" +
"id=" + id +
", title='" + title + "'" +
", startDate='" + startDate + "'" +
", endDate='" + endDate + "'" +
", status='" + status + "'" +
", picPath='" + picPath + "'" +
", summary='" + summary + "'" +
", content='" + content + "'" +
", createTime='" + createdTime + "'" +
'}';
}
}
| [
"fans_2046@126.com"
] | fans_2046@126.com |
39ef9a9b0db966686852989f57888204ee4e11ed | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/6/6_2f307184d26b0af4f19e15805fa0ea16700d922c/TdrServiceImpl/6_2f307184d26b0af4f19e15805fa0ea16700d922c_TdrServiceImpl_s.java | a66afedee836385469f34966cabbc9453c2936b6 | [] | 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 | 978 | java | package org.easysoa.samples.axxx.dps;
import javax.inject.Inject;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.xml.ws.WebServiceRef;
import org.easysoa.samples.axxx.dcv.ClientService;
@WebService
public class TdrServiceImpl implements TdrService {
@Inject ClientService clientService;
@Inject public void setClientService(ClientService clientService) {
this.clientService = clientService;
}
@Inject
ClientServiceClient clientServiceClient;
@WebServiceRef(ClientService.class)
ClientService jaxwsInjectedClientService;
@Inject
ClientServiceProvider clientServiceProvider;
@Override
public void updateTdr(Tdr tdr) {
}
@Override
public Tdr updateAndReturnTdr(Tdr tdr) {
return tdr;
}
@Override
public Tdr[] getTdr() {
return new Tdr[0];
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
e641b725a8e8c04f5b46809fbaf99f7edf06b1d0 | e7658e4a4bed0e1aecfc6dcb20ff6c46530b465d | /app/src/main/java/com/eip/red/caritathelp/Models/Organisation/EventInformations.java | 99356384662731b6772a6887e66f73f61c3ac45d | [] | no_license | Caritathelp/caritathelp-android | 844ef0b95b1b36f2a9357a31e68e92e63bf92c5e | 5fcbc2d49b07ebd0056b1923772c80b90ccb10a4 | refs/heads/master | 2021-01-18T16:22:16.721296 | 2016-12-08T11:57:13 | 2016-12-08T11:57:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 409 | java | package com.eip.red.caritathelp.Models.Organisation;
/**
* Created by pierr on 18/03/2016.
*/
public class EventInformations {
public int status;
public String message;
public Event response;
public int getStatus() {
return status;
}
public String getMessage() {
return message;
}
public Event getResponse() {
return response;
}
}
| [
"pierre.enjalbert@epitech.eu"
] | pierre.enjalbert@epitech.eu |
a1723afe52671f9cd69b12f3c88ba7939d879dfa | b780c6d51def4f6631535d5751fc2b1bc40072c7 | /bugswarm-sandbox/bugs/traccar/traccar/162333125/pre_bug/src/org/traccar/protocol/CellocatorProtocol.java | 6d8eea8f599f3908a440f70b02f8c1718ed8d768 | [] | no_license | FranciscoRibeiro/bugswarm-case-studies | 95fad7a9b3d78fcdd2d3941741163ad73e439826 | b2fb9136c3dcdd218b80db39a8a1365bf0842607 | refs/heads/master | 2023-07-08T05:27:27.592054 | 2021-08-19T17:27:54 | 2021-08-19T17:27:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,572 | java | /*
* Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
*
* 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.traccar.protocol;
import org.jboss.netty.bootstrap.ServerBootstrap;
import org.jboss.netty.channel.ChannelPipeline;
import org.traccar.BaseProtocol;
import org.traccar.TrackerServer;
import java.nio.ByteOrder;
import java.util.List;
public class CellocatorProtocol extends BaseProtocol {
public CellocatorProtocol() {
super("cellocator");
}
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
TrackerServer server = new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CellocatorFrameDecoder());
pipeline.addLast("objectDecoder", new CellocatorProtocolDecoder(CellocatorProtocol.this));
}
};
server.setEndianness(ByteOrder.LITTLE_ENDIAN);
serverList.add(server);
}
}
| [
"kikoribeiro95@gmail.com"
] | kikoribeiro95@gmail.com |
3ce8c2733c112cc7c0c1dced3265885600129549 | 9829e7820d4b19ebad93ff930f129f28e98f1a36 | /L13 Chapter 6 Methods/src/p2/Demo.java | a1105b22815d1fa254c74d66865f89d33cb8ab99 | [] | no_license | AnthonyArdolina/CSE118 | e3327a292b4a6ff81a6098cf1f85ff836530005c | aeeaa1e331f9434e3bd0c7c00994057bc1287f5b | refs/heads/master | 2020-09-26T00:26:56.560009 | 2019-12-04T02:28:34 | 2019-12-04T02:28:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,087 | java | package p2;
import java.util.Scanner;
public class Demo {
static int x = 10000;
public static void main(String[] args) {
Scanner kb = new Scanner(System.in);
System.out.println("Enter two numbers separated by a space");
double num1 = kb.nextDouble();
double num2 = kb.nextDouble();
// double sum = add(num1, num2);
// System.out.println("The sum is: " +sum);
System.out.println("The sum is: " + add(num1, num2));
System.out.println("The difference is: " + subtract(num1, num2));
System.out.println("The product is: " + multiply(num1, num2));
System.out.println("The quotient is: " + divide(num1,num2));
System.out.println(x);
}
private static double add(double n1, double n2) {
System.out.println(x);
return n1 + n2;
}
// scope of variables
private static double subtract(double n1, double n2) {
System.out.println(x);
return n1 - n2;
}
private static double multiply(double n1, double n2) {
System.out.println(x);
return n1 * n2;
}
private static double divide(double n1, double n2) {
System.out.println(x);
return n1 / n2;
}
}
| [
"chenb@sunysuffolk.edu"
] | chenb@sunysuffolk.edu |
2c13f5e45bbffad0bb0ebbe50dd57064747485dd | 56456387c8a2ff1062f34780b471712cc2a49b71 | /com/google/android/gms/internal/zzrs$1.java | d98b078a748b5a5f662d4f668c6859a2646c5a93 | [] | no_license | nendraharyo/presensimahasiswa-sourcecode | 55d4b8e9f6968eaf71a2ea002e0e7f08d16c5a50 | 890fc86782e9b2b4748bdb9f3db946bfb830b252 | refs/heads/master | 2020-05-21T11:21:55.143420 | 2019-05-10T19:03:56 | 2019-05-10T19:03:56 | 186,022,425 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 263 | java | package com.google.android.gms.internal;
class zzrs$1 {}
/* Location: C:\Users\haryo\Desktop\enjarify-master\presensi-enjarify.jar!\com\google\android\gms\internal\zzrs$1.class
* Java compiler version: 5 (49.0)
* JD-Core Version: 0.7.1
*/ | [
"haryo.nendra@gmail.com"
] | haryo.nendra@gmail.com |
266121e8e8bfe58808ed61db69dc64bd750f85c7 | c94f888541c0c430331110818ed7f3d6b27b788a | /baasdigital/java/src/main/java/com/antgroup/antchain/openapi/baasdigital/models/CreateAsseturiResponse.java | 1782ebb93db6f501756b841da7a71dbb4772d4f5 | [
"Apache-2.0",
"MIT"
] | permissive | alipay/antchain-openapi-prod-sdk | 48534eb78878bd708a0c05f2fe280ba9c41d09ad | 5269b1f55f1fc19cf0584dc3ceea821d3f8f8632 | refs/heads/master | 2023-09-03T07:12:04.166131 | 2023-09-01T08:56:15 | 2023-09-01T08:56:15 | 275,521,177 | 9 | 10 | MIT | 2021-03-25T02:35:20 | 2020-06-28T06:22:14 | PHP | UTF-8 | Java | false | false | 1,923 | java | // This file is auto-generated, don't edit it. Thanks.
package com.antgroup.antchain.openapi.baasdigital.models;
import com.aliyun.tea.*;
public class CreateAsseturiResponse extends TeaModel {
// 请求唯一ID,用于链路跟踪和问题排查
@NameInMap("req_msg_id")
public String reqMsgId;
// 结果码,一般OK表示调用成功
@NameInMap("result_code")
public String resultCode;
// 异常信息的文本描述
@NameInMap("result_msg")
public String resultMsg;
// 可公开访问的asseturi地址。
@NameInMap("access_uri")
public String accessUri;
// assetUri文件内容
@NameInMap("json_info")
public String jsonInfo;
public static CreateAsseturiResponse build(java.util.Map<String, ?> map) throws Exception {
CreateAsseturiResponse self = new CreateAsseturiResponse();
return TeaModel.build(map, self);
}
public CreateAsseturiResponse setReqMsgId(String reqMsgId) {
this.reqMsgId = reqMsgId;
return this;
}
public String getReqMsgId() {
return this.reqMsgId;
}
public CreateAsseturiResponse setResultCode(String resultCode) {
this.resultCode = resultCode;
return this;
}
public String getResultCode() {
return this.resultCode;
}
public CreateAsseturiResponse setResultMsg(String resultMsg) {
this.resultMsg = resultMsg;
return this;
}
public String getResultMsg() {
return this.resultMsg;
}
public CreateAsseturiResponse setAccessUri(String accessUri) {
this.accessUri = accessUri;
return this;
}
public String getAccessUri() {
return this.accessUri;
}
public CreateAsseturiResponse setJsonInfo(String jsonInfo) {
this.jsonInfo = jsonInfo;
return this;
}
public String getJsonInfo() {
return this.jsonInfo;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
10381fe1f251fd327c7d7b56cbf275044e710e33 | 647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4 | /com.tencent.mm/classes.jar/com/tencent/mm/plugin/finder/live/viewmodel/k$$ExternalSyntheticLambda15.java | f1adb756e35cc25dfbe88dc24017abd8c522ba0d | [] | 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 | 386 | java | package com.tencent.mm.plugin.finder.live.viewmodel;
public final class k$$ExternalSyntheticLambda15
implements Runnable
{
public final void run() {}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes2.jar
* Qualified Name: com.tencent.mm.plugin.finder.live.viewmodel.k..ExternalSyntheticLambda15
* JD-Core Version: 0.7.0.1
*/ | [
"98632993+tsuzcx@users.noreply.github.com"
] | 98632993+tsuzcx@users.noreply.github.com |
fe5ac90a898008d9b1ea2ff27145d8a4db7d450c | 96e0679e77af1ddcd01f24a8e9f7115999c72086 | /src/main/java/b/priciple/theory/bOCP/alert2/Notification.java | 30ef116b061cd01d7a4769d4b55fd5a555c97996 | [] | no_license | wayne06/design-pattern | 9447ae33e35a8071bb3d67cad1841902eed1f5c8 | 023e54b73405ba87aaf8cbcd53cb63b60a55f008 | refs/heads/master | 2022-12-20T21:35:42.954274 | 2022-06-22T09:51:54 | 2022-06-22T09:51:54 | 248,004,306 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 973 | java | package b.priciple.theory.bOCP.alert2;
import java.util.List;
/**
* @author wayne
*
* 告警通知类
*/
public class Notification {
private List<String> emailAddress;
private List<String> telephones;
private List<String> wechatIds;
public Notification() {
}
public void setEmailAddress(List<String> emailAddress) {
this.emailAddress = emailAddress;
}
public void setTelephones(List<String> telephones) {
this.telephones = telephones;
}
public void setWechatIds(List<String> wechatIds) {
this.wechatIds = wechatIds;
}
public void notify(NotificationEmergencyLevel level, String message) {
if (level.equals(NotificationEmergencyLevel.SEVERE)) {
} else if (level.equals(NotificationEmergencyLevel.URGENCY)) {
} else if (level.equals(NotificationEmergencyLevel.NORMAL)) {
} else if (level.equals(NotificationEmergencyLevel.TRIVIAL)) {
}
}
}
| [
"zs577215@gmail.com"
] | zs577215@gmail.com |
bd33fd7b7af44fbc30f493232c0b863619e1b1d6 | d587ed809b0a3e655f9f3df6bf9a6c23cc799ad6 | /src/demo02/Stream/Demo07Stream_skip.java | 3c4eb90ac7e65ca63fa997d0e27b21de51d0ca46 | [] | no_license | 2641418358/StreamAndMethodReference | 7189718a3b46fb5c99c3fc0035d5912419b63c1c | 96af7e7df7a33352069c63afdac9c81b2f613ee9 | refs/heads/master | 2020-06-27T03:49:07.560139 | 2019-07-31T10:42:34 | 2019-07-31T10:42:34 | 199,836,545 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 695 | java | package demo02.Stream;
import java.util.stream.Stream;
/*
* 如果希望跳过前几个元素,可以使用 skip 方法获取一个截取之后的新流:
*
* 如果流的当前长度大于n,则跳过前n个;否则将会得到一个长度为0的空流。
*/
public class Demo07Stream_skip {
public static void main(String[] args) {
//获取一个Stream流
String[] arr = {"喜羊羊","美羊羊","懒洋洋","灰太狼","红太狼"};
Stream<String> stream = Stream.of(arr);
//使用skip方法对Stream流中的元素进行跳过,跳过前3个元素
Stream<String> stream2 = stream.skip(3);
stream2.forEach(name -> System.out.println(name));
}
}
| [
"goodMorning_glb@atguigu.com"
] | goodMorning_glb@atguigu.com |
5a27f5c23764ac06f0843b0e22fe2dd1234186e1 | ffeaf567e9b1aadb4c00d95cd3df4e6484f36dcd | /Hotgram/org/telegram/ui/Cells/DrawerActionCell.java | a4ae0f8c68d17490a9753428b8fa29c42f382888 | [] | no_license | danielperez9430/Third-party-Telegram-Apps-Spy | dfe541290c8512ca366e401aedf5cc5bfcaa6c3e | f6fc0f9c677bd5d5cd3585790b033094c2f0226d | refs/heads/master | 2020-04-11T23:26:06.025903 | 2018-12-18T10:07:20 | 2018-12-18T10:07:20 | 162,166,647 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,439 | java | package org.telegram.ui.Cells;
import android.content.Context;
import android.graphics.PorterDuff$Mode;
import android.graphics.PorterDuffColorFilter;
import android.graphics.drawable.Drawable;
import android.view.View$MeasureSpec;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.TextView;
import org.telegram.messenger.AndroidUtilities;
import org.telegram.messenger.FileLog;
import org.telegram.messenger.LocaleController;
import org.telegram.messenger.MessagesController;
import org.telegram.ui.ActionBar.Theme;
import org.telegram.ui.Components.LayoutHelper;
public class DrawerActionCell extends FrameLayout {
private View divider;
private TextView textView;
public DrawerActionCell(Context arg12) {
super(arg12);
this.textView = new TextView(arg12);
this.textView.setTextColor(Theme.getColor("chats_menuItemText"));
this.textView.setTextSize(1, 15f);
this.textView.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
this.textView.setLines(1);
this.textView.setMaxLines(1);
this.textView.setSingleLine(true);
TextView v0 = this.textView;
int v2 = 3;
int v1 = LocaleController.isRTL ? 5 : 3;
v0.setGravity(v1 | 16);
this.textView.setCompoundDrawablePadding(AndroidUtilities.dp(29f));
v0 = this.textView;
int v4 = -1;
float v5 = -1f;
if(LocaleController.isRTL) {
v2 = 5;
}
this.addView(((View)v0), LayoutHelper.createFrame(v4, v5, v2 | 48, 19f, 0f, 16f, 0f));
this.divider = new View(arg12);
this.divider.setBackgroundColor(arg12.getResources().getColor(2131099856));
this.addView(this.divider, LayoutHelper.createFrame(-1, 0.6f, 80, 30f, 10f, 0f, 0f));
}
protected void onAttachedToWindow() {
super.onAttachedToWindow();
this.textView.setTextColor(Theme.getColor("chats_menuItemText"));
}
protected void onMeasure(int arg2, int arg3) {
super.onMeasure(View$MeasureSpec.makeMeasureSpec(View$MeasureSpec.getSize(arg2), 1073741824), View$MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(48f), 1073741824));
}
public void setTextAndIcon(String arg5, int arg6, boolean arg7, boolean arg8) {
try {
this.textView.setText(((CharSequence)arg5));
Drawable v5_1 = this.getResources().getDrawable(arg6).mutate();
if(v5_1 != null) {
v5_1.setColorFilter(new PorterDuffColorFilter(Theme.getColor("chats_menuItemIcon"), PorterDuff$Mode.MULTIPLY));
}
Drawable v0 = null;
Drawable v6 = MessagesController.getGlobalMainSettings().getString("theme", "").contentEquals("Dark") ? this.getResources().getDrawable(2131231573).mutate() : v0;
if(v6 != null) {
v6.setColorFilter(new PorterDuffColorFilter(Theme.getColor("chats_menuItemIcon"), PorterDuff$Mode.MULTIPLY));
}
TextView v1 = this.textView;
if(arg8) {
}
else {
v6 = v0;
}
v1.setCompoundDrawablesWithIntrinsicBounds(v5_1, v0, v6, v0);
if(arg7) {
this.divider.setVisibility(0);
return;
}
this.divider.setVisibility(8);
}
catch(Throwable v5) {
FileLog.e(v5);
}
}
}
| [
"dpefe@hotmail.es"
] | dpefe@hotmail.es |
1f8b0d3be0ef3bb93c4bd26f2153debd915357ec | 2a1928c92dc672133f1721ee85a0a58088e73ede | /jvm/jvm-annotations/src/main/java/org/quickperf/jvm/rss/ProcessStatusRecorder.java | 073f18bea2ba85f1b6715f4b2f7d37068c1ab9bf | [
"Apache-2.0"
] | permissive | Minh-Trieu/quickperf | 8ea2c0084e36dd55de0b8dc677aef309590df876 | aa603526f18e784870c8b53cae28a647260ed532 | refs/heads/master | 2020-12-22T13:56:50.840097 | 2020-02-25T20:49:18 | 2020-02-25T20:49:18 | 236,809,158 | 0 | 0 | Apache-2.0 | 2020-01-28T18:33:28 | 2020-01-28T18:33:27 | null | UTF-8 | Java | false | false | 1,369 | java | /*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*
* Copyright 2019-2020 the original author or authors.
*/
package org.quickperf.jvm.rss;
import org.quickperf.TestExecutionContext;
import org.quickperf.perfrecording.RecordablePerformance;
public class ProcessStatusRecorder implements RecordablePerformance<ProcessStatus> {
@Override
public void startRecording(TestExecutionContext testExecutionContext) {
//nothing to do : only record the process status at the end of the test
}
@Override
public void stopRecording(TestExecutionContext testExecutionContext) {
ProcessStatus.record();
}
@Override
public ProcessStatus findRecord(TestExecutionContext testExecutionContext) {
return ProcessStatus.getRecord();
}
@Override
public void cleanResources() {
ProcessStatus.reset();
}
}
| [
"jean.bisutti@gmail.com"
] | jean.bisutti@gmail.com |
60179893f5c422d09fd3d1619297eaec23708f1f | a8c878f0e54fb7bb4092862ab99d8edef333f282 | /trunk/prototypes/rocas-hadoop/src/main/java/examples/Node.java | 11c1595e320d07ce282efae9932ec9c972089de4 | [] | no_license | anukat2015/rocas | 9d3191ca2dcc156c8d70a3838389aedf9db62687 | cf4f516580bcc59067e3c88102b2645f1d02f6f3 | refs/heads/master | 2016-08-12T04:33:51.911013 | 2012-12-27T07:52:06 | 2012-12-27T07:52:06 | 55,017,576 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,208 | java | package examples;
import java.util.*;
import org.apache.hadoop.io.Text;
/**
*
* Description : Node class to process the information about the nodes. This class contains getter and setter methods to access and
* set information about the nodes. The information generally includes the list of adjacent nodes, distance from the source, color of the node
* and the parent/predecessor node.
*
*
* Reference :
* http://www.johnandcailin.com/blog/cailin/breadth-first-graph
* -search-using-iterative-map-reduce-algorithm
*
* changes made from the source code in the reference: parent node field is added.
*
* Hadoop version used : 0.20.2
*/
public class Node {
// three possible colors a node can have (to keep track of the visiting status of the nodes during graph search)
public static enum Color {
WHITE, GRAY, BLACK
};
private String id; // id of the node
private int distance; // distance of the node from the source
private List<String> edges = new ArrayList<String>(); // list of edges
private Color color = Color.WHITE;
private String parent; // parent/predecessor of the node : The parent of the source is marked "source" to leave it unchanged
public Node() {
distance = Integer.MAX_VALUE;
color = Color.WHITE;
parent = null;
}
// constructor
//the parameter nodeInfo is the line that is passed from the input, this nodeInfo is then split into key, value pair where the key is the node id
//and the value is the information associated with the node
public Node(String nodeInfo) {
String[] inputLine = nodeInfo.split("\t"); //splitting the input line record by tab delimiter into key and value
String key = "", value = ""; //initializing the strings 'key' and 'value'
try {
key = inputLine[0]; // node id
value = inputLine[1]; // the list of adjacent nodes, distance, color, parent
} catch (Exception e) {
e.printStackTrace();
System.exit(1);
}
String[] tokens = value.split("\\|"); // split the value into tokens where
//tokens[0] = list of adjacent nodes, tokens[1]= distance, tokens[2]= color, tokens[3]= parent
this.id = key; // set the id of the node
// setting the edges of the node
for (String s : tokens[0].split(",")) {
if (s.length() > 0) {
edges.add(s);
}
}
// setting the distance of the node
if (tokens[1].equals("Integer.MAX_VALUE")) {
this.distance = Integer.MAX_VALUE;
} else {
this.distance = Integer.parseInt(tokens[1]);
}
// setting the color of the node
this.color = Color.valueOf(tokens[2]);
// setting the parent of the node
this.parent = tokens[3];
}
// this method appends the list of adjacent nodes, the distance , the color and the parent and returns all these information as a single Text
public Text getNodeInfo() {
StringBuffer s = new StringBuffer();
// forms the list of adjacent nodes by separating them using ','
try {
for (String v : edges) {
s.append(v).append(",");
}
} catch (NullPointerException e) {
e.printStackTrace();
System.exit(1);
}
// after the list of edges, append '|'
s.append("|");
// append the minimum distance between the current distance and
// Integer.Max_VALUE
if (this.distance < Integer.MAX_VALUE) {
s.append(this.distance).append("|");
} else {
s.append("Integer.MAX_VALUE").append("|");
}
// append the color of the node
s.append(color.toString()).append("|");
// append the parent of the node
s.append(getParent());
return new Text(s.toString());
}
// getter and setter methods
public String getId() {
return this.id;
}
public int getDistance() {
return this.distance;
}
public void setId(String id) {
this.id = id;
}
public void setDistance(int distance) {
this.distance = distance;
}
public Color getColor() {
return this.color;
}
public void setColor(Color color) {
this.color = color;
}
public List<String> getEdges() {
return this.edges;
}
public void setEdges(List<String> edges) {
this.edges = edges;
}
public void setParent(String parent) {
this.parent = parent;
}
public String getParent() {
return parent;
}
} | [
"chema.ar@gmail.com"
] | chema.ar@gmail.com |
3c9e462d3dd30d529c1c92252ae455cde78bc797 | 1bff47a5e5f2c5800a64b9e3c809cdf4e51815e5 | /smt-cloudformation-objects/src/main/java/shiver/me/timbers/aws/cloudtrail/TrailEventSelector.java | b26f52dab3200bbfb7712032ee4bd160adc3ecd0 | [
"Apache-2.0"
] | permissive | shiver-me-timbers/smt-cloudformation-parent | d773863ce52c5de154d909498a7546e0da545556 | e2600814428a92ff8ea5977408ccc6a8f511a561 | refs/heads/master | 2021-06-09T09:13:17.335583 | 2020-06-19T08:24:16 | 2020-06-19T08:24:16 | 149,845,802 | 4 | 0 | Apache-2.0 | 2021-04-26T16:53:04 | 2018-09-22T04:39:40 | Java | UTF-8 | Java | false | false | 5,951 | java |
package shiver.me.timbers.aws.cloudtrail;
import java.util.LinkedHashSet;
import java.util.Set;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import shiver.me.timbers.aws.Property;
/**
* TrailEventSelector
* <p>
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudtrail-trail-eventselector.html
*
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonPropertyOrder({
"DataResources",
"IncludeManagementEvents",
"ReadWriteType"
})
public class TrailEventSelector implements Property<TrailEventSelector>
{
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudtrail-trail-eventselector.html#cfn-cloudtrail-trail-eventselector-dataresources
*
*/
@JsonProperty("DataResources")
@JsonDeserialize(as = java.util.LinkedHashSet.class)
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudtrail-trail-eventselector.html#cfn-cloudtrail-trail-eventselector-dataresources")
private Set<Property<TrailDataResource>> dataResources = new LinkedHashSet<Property<TrailDataResource>>();
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudtrail-trail-eventselector.html#cfn-cloudtrail-trail-eventselector-includemanagementevents
*
*/
@JsonProperty("IncludeManagementEvents")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudtrail-trail-eventselector.html#cfn-cloudtrail-trail-eventselector-includemanagementevents")
private CharSequence includeManagementEvents;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudtrail-trail-eventselector.html#cfn-cloudtrail-trail-eventselector-readwritetype
*
*/
@JsonProperty("ReadWriteType")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudtrail-trail-eventselector.html#cfn-cloudtrail-trail-eventselector-readwritetype")
private CharSequence readWriteType;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudtrail-trail-eventselector.html#cfn-cloudtrail-trail-eventselector-dataresources
*
*/
@JsonIgnore
public Set<Property<TrailDataResource>> getDataResources() {
return dataResources;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudtrail-trail-eventselector.html#cfn-cloudtrail-trail-eventselector-dataresources
*
*/
@JsonIgnore
public void setDataResources(Set<Property<TrailDataResource>> dataResources) {
this.dataResources = dataResources;
}
public TrailEventSelector withDataResources(Set<Property<TrailDataResource>> dataResources) {
this.dataResources = dataResources;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudtrail-trail-eventselector.html#cfn-cloudtrail-trail-eventselector-includemanagementevents
*
*/
@JsonIgnore
public CharSequence getIncludeManagementEvents() {
return includeManagementEvents;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudtrail-trail-eventselector.html#cfn-cloudtrail-trail-eventselector-includemanagementevents
*
*/
@JsonIgnore
public void setIncludeManagementEvents(CharSequence includeManagementEvents) {
this.includeManagementEvents = includeManagementEvents;
}
public TrailEventSelector withIncludeManagementEvents(CharSequence includeManagementEvents) {
this.includeManagementEvents = includeManagementEvents;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudtrail-trail-eventselector.html#cfn-cloudtrail-trail-eventselector-readwritetype
*
*/
@JsonIgnore
public CharSequence getReadWriteType() {
return readWriteType;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudtrail-trail-eventselector.html#cfn-cloudtrail-trail-eventselector-readwritetype
*
*/
@JsonIgnore
public void setReadWriteType(CharSequence readWriteType) {
this.readWriteType = readWriteType;
}
public TrailEventSelector withReadWriteType(CharSequence readWriteType) {
this.readWriteType = readWriteType;
return this;
}
@Override
public String toString() {
return new ToStringBuilder(this).append("dataResources", dataResources).append("includeManagementEvents", includeManagementEvents).append("readWriteType", readWriteType).toString();
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(dataResources).append(readWriteType).append(includeManagementEvents).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof TrailEventSelector) == false) {
return false;
}
TrailEventSelector rhs = ((TrailEventSelector) other);
return new EqualsBuilder().append(dataResources, rhs.dataResources).append(readWriteType, rhs.readWriteType).append(includeManagementEvents, rhs.includeManagementEvents).isEquals();
}
}
| [
"karl.bennett.smt@gmail.com"
] | karl.bennett.smt@gmail.com |
a87fcd3a168e461332920cde9f36ba2ecf579708 | 95c49f466673952b465e19a5ee3ae6eff76bee00 | /src/main/java/com/zhihu/flutter/snape/api/FlutterLoaderUtils.java | b63e7dbd5ae3109825763e4c7ec2691d26f1ecf2 | [] | no_license | Phantoms007/zhihuAPK | 58889c399ae56b16a9160a5f48b807e02c87797e | dcdbd103436a187f9c8b4be8f71bdf7813b6d201 | refs/heads/main | 2023-01-24T01:34:18.716323 | 2020-11-25T17:14:55 | 2020-11-25T17:14:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,845 | java | package com.zhihu.flutter.snape.api;
import android.annotation.SuppressLint;
import android.content.Context;
import android.os.Environment;
import android.util.Log;
import androidx.core.content.ContextCompat;
import com.secneo.apkwrapper.C6969H;
import com.zhihu.android.app.util.BuildConfigHelper;
import com.zhihu.android.app.util.CrashlyticsLogUtils;
import com.zhihu.android.app.util.ToastUtils;
import com.zhihu.android.appcloudsdk.model.FileModelExternal;
import com.zhihu.android.base.util.FileUtils;
import com.zhihu.android.module.ComponentBuildConfig;
import com.zhihu.flutter.snape.api.exception.FlutterSoLoadException;
import com.zhihu.flutter.snape.api.exception.FlutterSoNotExistException;
import java.io.File;
import java.io.IOException;
/* renamed from: com.zhihu.flutter.snape.api.a */
/* compiled from: FlutterLoaderUtils */
public class FlutterLoaderUtils {
/* renamed from: a */
private static boolean f103446a;
/* renamed from: a */
public static boolean m142228a(Context context) {
return m142227a() && !m142231d(context);
}
/* renamed from: a */
private static boolean m142227a() {
String FLAVOR = ComponentBuildConfig.FLAVOR();
return !FLAVOR.equals(C6969H.m41409d("G798FD403")) && !FLAVOR.equals(C6969H.m41409d("G6F82DB1DA538A43C")) && !ComponentBuildConfig.DEBUG();
}
/* renamed from: d */
private static boolean m142231d(Context context) {
return m142229b(context).exists();
}
/* renamed from: b */
public static File m142229b(Context context) {
return m142224a(context, false);
}
/* renamed from: a */
static File m142224a(Context context, boolean z) {
if (!z && BuildConfigHelper.m83414p() && ContextCompat.checkSelfPermission(context, "android.permission.READ_EXTERNAL_STORAGE") == 0) {
m142226a("start check sdcard");
File file = new File(Environment.getExternalStorageDirectory(), C6969H.m41409d("G658AD71CB325BF3DE31CDE5BFD"));
File file2 = new File(context.getFilesDir(), C6969H.m41409d("G6F8FC00EAB35B966F20B835CBDE9CAD56F8FC00EAB35B967F501"));
if (!file2.getParentFile().exists()) {
file2.getParentFile().mkdirs();
}
if (f103446a || !file.exists()) {
m142226a(C6969H.m41409d("G2690D119BE22AF66EA07924EFEF0D7C36C919B09B070A526F24E9550FBF6D7C425C3DD1BAC13A439EF0B9412B2") + f103446a);
} else {
m142226a(C6969H.m41409d("G7C90D05AB339A92FEA1B845CF7F78DC466C3D308B03DEB3AE20D915AF6BF83") + file.getAbsolutePath());
try {
if (file2.exists()) {
m142226a(C6969H.m41409d("G7C90D05AB339A92FEA1B845CF7F78DC466C3D308B03DEB3AE20D915AF6BF83") + file.getAbsolutePath());
file2.delete();
}
FileUtils.copyFile(file, file2);
m142226a(C6969H.m41409d("G7C90D05AAB35B83DA602994AF4E9D6C37D86C754AC3FF169") + file2.getAbsolutePath());
f103446a = true;
return file2;
} catch (IOException e) {
m142226a(C6969H.m41409d("G6A8CC503FF3CA22BE002855CE6E0D1997A8C951CBE39A72CE254D0") + file.getAbsolutePath() + " " + e.getMessage());
e.printStackTrace();
}
}
if (f103446a && file2.exists()) {
return file2;
}
}
m142226a("use formal libflutter.so");
return new File(context.getFilesDir(), C6969H.m41409d("G6F8FC00EAB35B966EA07924EFEF0D7C36C918448ED62E425EF0C9644E7F1D7D27BCDC615"));
}
@SuppressLint({"UnsafeDynamicallyLoadedCode"})
/* renamed from: c */
public static void m142230c(Context context) {
m142226a(C6969H.m41409d("G658CD41E9A28BF1AE9"));
File b = m142229b(context);
if (BuildConfigHelper.m83414p()) {
ToastUtils.m84449a(context, "加载本地 libflutter.so, exists: " + b.exists());
}
if (!b.exists()) {
CrashlyticsLogUtils.m83485a(new FlutterSoNotExistException());
return;
}
try {
System.load(b.getAbsolutePath());
} catch (Exception e) {
CrashlyticsLogUtils.m83485a(new FlutterSoLoadException(e));
}
}
/* renamed from: a */
public static void m142225a(FileModelExternal fileModelExternal, Context context) throws IOException {
File file = new File(fileModelExternal.filePath, C6969H.m41409d("G658AD71CB325BF3DE31CDE5BFD"));
if (file.exists()) {
FileUtils.copyFile(file, m142224a(context, true));
}
}
/* renamed from: a */
static void m142226a(String str) {
Log.d(C6969H.m41409d("G4F8FC00EAB35B905E90F944DE0"), str);
}
}
| [
"seasonpplp@qq.com"
] | seasonpplp@qq.com |
f4c6987f49852845effb0f544e679529f415b50f | 471a1d9598d792c18392ca1485bbb3b29d1165c5 | /jadx-MFP/src/main/java/com/google/ads/interactivemedia/v3/internal/agi.java | 1ced6a953ff84f2616d00277a825e87c26627f79 | [] | no_license | reed07/MyPreferencePal | 84db3a93c114868dd3691217cc175a8675e5544f | 365b42fcc5670844187ae61b8cbc02c542aa348e | refs/heads/master | 2020-03-10T23:10:43.112303 | 2019-07-08T00:39:32 | 2019-07-08T00:39:32 | 129,635,379 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 511 | java | package com.google.ads.interactivemedia.v3.internal;
import java.util.NoSuchElementException;
/* compiled from: IMASDK */
final class agi extends agt<T> {
private boolean a;
private final /* synthetic */ Object b;
agi(Object obj) {
this.b = obj;
}
public final boolean hasNext() {
return !this.a;
}
public final T next() {
if (!this.a) {
this.a = true;
return this.b;
}
throw new NoSuchElementException();
}
}
| [
"anon@ymous.email"
] | anon@ymous.email |
f277a5ddfe434185f20f45281136d49bd16e7f23 | e9df3a9d1051f0e2755aa89797cc8df97a4f399a | /Alpoc/src/hu/csega/update/SendTaskRequest.java | ad7d27b38275ce4c15c09c9417aa9c024ef04aab | [] | no_license | petercsengodi/games | 880fb62e77e1fcc2cbf72f78f70f1b5ca53e19b1 | 7af98b0a89f4b858ba2cef4c63c4973e17689064 | refs/heads/master | 2023-05-07T03:11:22.268658 | 2022-10-07T09:28:07 | 2022-10-07T09:28:07 | 32,595,357 | 1 | 0 | null | 2023-04-14T17:08:38 | 2015-03-20T16:43:00 | Java | UTF-8 | Java | false | false | 476 | java | package hu.csega.update;
import hu.csega.alpoc.Alpoc;
import hu.csega.net.ConstantsHello;
import hu.csega.net.SayHelloBr;
public class SendTaskRequest {
public static void main(String[] args) throws Exception {
UpdateRequest request = new UpdateRequest();
request.message = "run";
request.host = "*";
request.port = ConstantsHello.TCP_PORT;
request.taskName = "alpoc";
request.version = Alpoc.VERSION;
SayHelloBr.sendNotification(request.toString());
}
}
| [
"petercsengodi@users.noreply.github.com"
] | petercsengodi@users.noreply.github.com |
e3c14c359fbf73e8731699895678da09dc82bd03 | e7fe1422cf17e53cef83c70f4f1eec95b372d481 | /src/main/java/data/payment/dto/RefundDTO.java | 8b6ba2f76410f5bc7e2b13e5bcb7380aebe27c57 | [] | no_license | mankicho/speck-payment | 8fb05ea1c348677cf68f2e385eddb002cb2ec885 | 3dc2feb091b0bf9c8e1e3ae30ebcd3b27a560fa4 | refs/heads/master | 2023-05-09T15:33:59.709348 | 2021-05-24T05:58:18 | 2021-05-24T05:58:18 | 358,141,363 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 167 | java | package data.payment.dto;
import lombok.Data;
@Data
public class RefundDTO {
private String impUID; // 결제번호
private String midUID; // 주문번호
}
| [
"skxz123@gmail.com"
] | skxz123@gmail.com |
140f957d347ca79b2aa51019e181671fae21ab63 | 41ccf6613996afd27bed1129ad7124d450efdc71 | /sc-glink/sc-glink-web/src/main/java/com/yatang/sc/glink/web/bean/Request.java | 61ba5d99a8df81a4a8ee267b2b6428febb4ca790 | [] | no_license | sengeiou/demo-1 | ea02da49043080694f5d6d1554e5a7766bae3ca6 | a15185df951c12ac863ce530f824d0280b8e7e8a | refs/heads/master | 2021-09-09T10:18:06.081572 | 2018-03-15T04:19:37 | 2018-03-15T04:19:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,242 | java | package com.yatang.sc.glink.web.bean;
import com.alibaba.fastjson.annotation.JSONField;
/**
* 请求对象<br>
* 使用统一格式
*
* @author yangqingsong
*/
public class Request<T> {
private String method;
private String timestamp;
private String appkey;
private String sign;
@JSONField(name = "orders")
private T data;
public String getMethod() {
return method;
}
public void setMethod(String method) {
this.method = method;
}
public String getTimestamp() {
return timestamp;
}
public void setTimestamp(String timestamp) {
this.timestamp = timestamp;
}
public String getAppkey() {
return appkey;
}
public void setAppkey(String appkey) {
this.appkey = appkey;
}
public String getSign() {
return sign;
}
public void setSign(String sign) {
this.sign = sign;
}
public T getData() {
return data;
}
public void setData(T data) {
this.data = data;
}
@Override
public String toString() {
return "Request [method=" + method + ", timestamp=" + timestamp + ", appkey=" + appkey + ", sign=" + sign + ", data=" + data + "]";
}
}
| [
"huangjianjun5987@163.com"
] | huangjianjun5987@163.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.