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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f7eeef3719fca56ec6c9b21b3ca0b80418276653 | ae0675fb31e6fe9c4244579a76d74f4bcd4eb61e | /mockserver-integration-testing/src/main/java/org/mockserver/integration/server/SameJVMAbstractClientServerIntegrationTest.java | 9b73b84de94499fffde97fc4468ae6237e168390 | [
"Apache-2.0"
] | permissive | raceli/mockserver | c3141bfbc212da8bd3decc3aa6e84cd876c5e0ed | 6efc021f97f5f53185f564766d40ed588e841fe8 | refs/heads/master | 2021-08-17T07:20:38.469919 | 2017-11-20T22:16:29 | 2017-11-20T22:16:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,645 | java | package org.mockserver.integration.server;
import org.junit.Test;
import org.mockserver.integration.callback.StaticTestExpectationCallback;
import org.mockserver.model.HttpStatusCode;
import static org.junit.Assert.assertEquals;
import static org.mockserver.model.Header.header;
import static org.mockserver.model.HttpClassCallback.callback;
import static org.mockserver.model.HttpRequest.request;
import static org.mockserver.model.HttpResponse.response;
/**
* @author jamesdbloom
*/
public abstract class SameJVMAbstractClientServerIntegrationTest extends AbstractClientServerIntegrationTest {
@Test
public void shouldCallbackToSpecifiedClassWithResponseOnStaticField() {
// given
StaticTestExpectationCallback.httpRequests.clear();
StaticTestExpectationCallback.httpResponse = response()
.withStatusCode(HttpStatusCode.ACCEPTED_202.code())
.withHeaders(
header("x-callback", "test_callback_header")
)
.withBody("a_callback_response");
// when
mockServerClient
.when(
request()
.withPath(calculatePath("callback"))
)
.callback(
callback()
.withCallbackClass("org.mockserver.integration.callback.StaticTestExpectationCallback")
);
// then
// - in http
assertEquals(
response()
.withStatusCode(HttpStatusCode.ACCEPTED_202.code())
.withHeaders(
header("x-callback", "test_callback_header")
)
.withBody("a_callback_response"),
makeRequest(
request()
.withPath(calculatePath("callback"))
.withMethod("POST")
.withHeaders(
header("X-Test", "test_headers_and_body")
)
.withBody("an_example_body_http"),
headersToIgnore)
);
assertEquals(StaticTestExpectationCallback.httpRequests.get(0).getBody().getValue(), "an_example_body_http");
assertEquals(StaticTestExpectationCallback.httpRequests.get(0).getPath().getValue(), calculatePath("callback"));
// - in https
assertEquals(
response()
.withStatusCode(HttpStatusCode.ACCEPTED_202.code())
.withHeaders(
header("x-callback", "test_callback_header")
)
.withBody("a_callback_response"),
makeRequest(
request()
.withSecure(true)
.withPath(calculatePath("callback"))
.withMethod("POST")
.withHeaders(
header("X-Test", "test_headers_and_body")
)
.withBody("an_example_body_https"),
headersToIgnore
)
);
assertEquals(StaticTestExpectationCallback.httpRequests.get(1).getBody().getValue(), "an_example_body_https");
assertEquals(StaticTestExpectationCallback.httpRequests.get(1).getPath().getValue(), calculatePath("callback"));
}
}
| [
"jamesdbloom@gmail.com"
] | jamesdbloom@gmail.com |
18e04d77defc431d9454592727274396ca9a96f1 | d4d1d06fc32cd788b48066a7e99e6d1589899c73 | /src/main/java/ivorius/yegamolchattels/blocks/BlockTreasurePile.java | e984b918f30fd8e8bdd0be68a58744b59f1b4fcd | [
"MIT"
] | permissive | Ivorforce/YeGamolChattels | 0fb918ea646a744007224df14ba06ef334248509 | 36aca1700b60d722680feff5e54076977dfd0783 | refs/heads/master | 2023-08-24T05:44:42.719684 | 2022-01-13T23:04:03 | 2022-01-13T23:04:03 | 21,396,460 | 8 | 11 | null | 2015-05-17T13:59:58 | 2014-07-01T17:25:15 | Java | UTF-8 | Java | false | false | 3,397 | java | /***************************************************************************************************
* Copyright (c) 2014, Lukas Tenbrink.
* http://lukas.axxim.net
**************************************************************************************************/
package ivorius.yegamolchattels.blocks;
import ivorius.yegamolchattels.YeGamolChattels;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.item.EntityFallingBlock;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.world.World;
import java.util.Random;
public class BlockTreasurePile extends Block
{
public static final int FALL_CHECK_DELAY = 3;
public BlockTreasurePile()
{
super(Material.sand);
}
@Override
public void onBlockAdded(World world, int i, int j, int k)
{
world.scheduleBlockUpdate(i, j, k, this, FALL_CHECK_DELAY);
}
@Override
public void onNeighborBlockChange(World world, int i, int j, int k, Block l)
{
world.scheduleBlockUpdate(i, j, k, this, FALL_CHECK_DELAY);
}
@Override
public void updateTick(World world, int i, int j, int k, Random random)
{
tryToFall(world, i, j, k);
}
private void tryToFall(World world, int i, int j, int k)
{
int l = i;
int i1 = j;
int j1 = k;
if (canFallBelow(world, l, i1 - 1, j1) && i1 >= 0)
{
byte byte0 = 32;
if (fallInstantly || !world.checkChunksExist(i - byte0, j - byte0, k - byte0, i + byte0, j + byte0, k + byte0))
{
world.setBlock(i, j, k, Blocks.air, 0, 3);
for (; canFallBelow(world, i, j - 1, k) && j > 0; j--)
{
}
if (j > 0)
{
world.setBlock(i, j, k, this, 0, 3);
}
}
else
{
EntityFallingBlock entityfallingsand = new EntityFallingBlock(world, i + 0.5F, j + 0.5F, k + 0.5F, this, world.getBlockMetadata(i, j, k));
world.spawnEntityInWorld(entityfallingsand);
}
}
}
public static boolean canFallBelow(World world, int x, int y, int z)
{
Block block = world.getBlock(x, y, z);
if (block.isAir(world, x, y, z))
{
return true;
}
else if (block == Blocks.fire)
{
return true;
}
else
{
Material material = block.getMaterial();
return material == Material.water || material == Material.lava;
}
}
@Override
public boolean isOpaqueCube()
{
return false;
}
@Override
public boolean renderAsNormalBlock()
{
return false;
}
@Override
public int getRenderType()
{
return YGCBlocks.blockTreasurePileRenderType;
}
@Override
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
{
return Items.gold_ingot;
}
@Override
public int quantityDropped(Random random)
{
return 7;
}
@Override
public String getItemIconName()
{
return YeGamolChattels.textureBase + "treasurePile";
}
public static boolean fallInstantly = false;
}
| [
"lukastenbrink@googlemail.com"
] | lukastenbrink@googlemail.com |
bcdf4844037166bd13caf4e14d3db8b804422b69 | 95c49f466673952b465e19a5ee3ae6eff76bee00 | /src/main/java/com/zhihu/matisse/internal/p2163b/AlbumLoaderCompat.java | 0e3e7e20298adf01adebd8d4c2136d58ed98ce23 | [] | 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 | 1,323 | java | package com.zhihu.matisse.internal.p2163b;
import android.content.Context;
import android.os.Build;
import android.util.Log;
import androidx.loader.content.CursorLoader;
import com.secneo.apkwrapper.C6969H;
import kotlin.Metadata;
import kotlin.p2243e.p2245b.C32569u;
@Metadata
/* renamed from: com.zhihu.matisse.internal.b.b */
/* compiled from: AlbumLoaderCompat.kt */
public final class AlbumLoaderCompat {
/* renamed from: a */
public static final AlbumLoaderCompat f103525a = new AlbumLoaderCompat();
private AlbumLoaderCompat() {
}
/* renamed from: a */
public static final CursorLoader m142372a(Context context) {
C32569u.m150519b(context, C6969H.m41409d("G6A8CDB0EBA28BF"));
if (Build.VERSION.SDK_INT >= 29) {
Log.i(C6969H.m41409d("G488FD70FB21CA428E20B826BFDE8D3D67D"), C6969H.m41409d("G6A91D01BAB358A25E41B9D64FDE4C7D27BC3C11BB63CA43BE30AD04EFDF783E6"));
return AlbumLoaderQ.f103526w.mo123800a(context);
}
Log.i(C6969H.m41409d("G488FD70FB21CA428E20B826BFDE8D3D67D"), C6969H.m41409d("G6A91D01BAB358A25E41B9D64FDE4C7D27B"));
CursorLoader a = AlbumLoader.m142370a(context);
C32569u.m150513a((Object) a, C6969H.m41409d("G488FD70FB21CA428E20B8206FCE0D4FE6790C11BB133AE61E5019E5CF7FDD79E"));
return a;
}
}
| [
"seasonpplp@qq.com"
] | seasonpplp@qq.com |
ba6adbf5d5b626d4773cbcb02008088bedf68166 | ea7a30c7f3b2b162a95072203e7f3f19ae627a84 | /src/main/java/com/by/wechat/util/MessagerUtil.java | 3c457f349aff5aa9c8d49011c5dbc07cf92f81b9 | [] | no_license | dirknowitzki123/wechat | 654cb6465a8fb5323287f02a42de6d2bdf7d7885 | b40a96f02c0f0942c0f6f71f6e62b62d976cff94 | refs/heads/master | 2020-04-25T15:08:33.007656 | 2019-02-27T07:45:15 | 2019-02-27T07:45:15 | 172,867,717 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,438 | java | package com.by.wechat.util;
import java.io.InputStream;
import java.io.StringWriter;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Marshaller;
import org.dom4j.Document;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
import com.by.wechat.model.BaseMessage;
import com.by.wechat.model.CustomerServiceMessage;
import com.by.wechat.model.MusicMessage;
import com.by.wechat.model.NewsMessage;
import com.by.wechat.model.TextMessage;
public class MessagerUtil {
public static String RESP_MESSAGE_TYPE_TEXT = "text";// 回复文本消息
public static String REQ_MESSAGE_TYPE_TEXT = "text";// 接收文本消息
public static String REQ_MESSAGE_TYPE_IMAGE = "image";// 接收图片消息
public static String REQ_MESSAGE_TYPE_LOCATION = "location";// 接收地理位置消息
public static String REQ_MESSAGE_TYPE_LINK = "link";// 接收链接消息
public static String REQ_MESSAGE_TYPE_VOICE = "voice";// 接收音频消息
public static String REQ_MESSAGE_TYPE_EVENT = "event";// 接收事件推送
public static String EVENT_TYPE_SUBSCRIBE = "subscribe"; // 订阅
public static String EVENT_TYPE_UNSUBSCRIBE = "unsubscribe";// 取消订阅
public static String EVENT_TYPE_CLICK = "CLICK";// 自定义菜单点击事件
/**
* 解析微信发来的请求(XML)
*
* @param request
* @return
* @throws Exception
*/
public static Map<String, String> parseXml(HttpServletRequest request) throws Exception {
// 将解析结果存储在HashMap中
Map<String, String> map = new HashMap<String, String>();
// 从request中取得输入流
InputStream inputStream = request.getInputStream();
// 读取输入流
SAXReader reader = new SAXReader();
Document document = reader.read(inputStream);
// 得到xml根元素
Element root = document.getRootElement();
// 得到根元素的所有子节点
@SuppressWarnings("unchecked")
List<Element> elementList = root.elements();
// 遍历所有子节点
for (Element e : elementList)
map.put(e.getName(), e.getText());
// 释放资源
inputStream.close();
inputStream = null;
return map;
}
/**
* 主类消息对象转换成xml
*
* @param baseMessage
* 主类消息对象
* @return xml
*/
public static String baseMessageToXml(BaseMessage baseMessage) {
return convertToXml(baseMessage, "UTF-8");
}
/**
* 文本消息对象转换成xml
*
* @param textMessage
* 文本消息对象
* @return xml
*/
public static String textMessageToXml(TextMessage textMessage) {
return convertToXml(textMessage, "UTF-8");
}
public static String customerServiceToXml(CustomerServiceMessage customerServiceMessage){
return convertToXml(customerServiceMessage,"UTF-8");
}
/**
* 音乐消息对象转换成xml
*
* @param musicMessage
* 音乐消息对象
* @return xml
*/
public static String musicMessageToXml(MusicMessage musicMessage) {
return convertToXml(musicMessage, "UTF-8");
}
/**
* 图文消息对象转换成xml
*
* @param newsMessage
* 图文消息对象
* @return xml
*/
public static String newsMessageToXml(NewsMessage newsMessage) {
return convertToXml(newsMessage, "UTF-8");
}
private static String convertToXml(Object obj, String encoding) {
String result = null;
try {
JAXBContext context = JAXBContext.newInstance(obj.getClass());
Marshaller marshaller = context.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
marshaller.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE);
StringWriter writer = new StringWriter();
marshaller.marshal(obj, writer);
result = writer.toString();
result=result.replace("<", "<");
result=result.replace(">", ">");
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
}
| [
"413150745@qq.com"
] | 413150745@qq.com |
96618d83afab1fc2b488bb7f655a72d90445e72f | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/4/4_c4d72dee04f22643bcc5a14e5eefb1575ff69d88/CommandAlert/4_c4d72dee04f22643bcc5a14e5eefb1575ff69d88_CommandAlert_t.java | fb65639afa4e345cf95c3a4659aab36a74ca6230 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 1,148 | java | package to.joe.bungee.commands;
import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.plugin.Command;
import to.joe.bungee.Util;
public class CommandAlert extends Command {
public CommandAlert() {
super("alert", "j2.srstaff");
}
@Override
public void execute(CommandSender sender, String[] args) {
if (args.length == 0) {
sender.sendMessage(ChatColor.RED + "You must supply a message.");
} else {
final String message = ChatColor.translateAlternateColorCodes('&', Util.combineSplit(0, args, " "));
final String normal = "[" + ChatColor.BLUE + "ALERT" + ChatColor.RESET + "] " + message;
final String admin = "[" + ChatColor.BLUE + sender.getName() + ChatColor.RESET + "] " + message;
for (final ProxiedPlayer con : ProxyServer.getInstance().getPlayers()) {
con.sendMessage(con.hasPermission("j2.admin") ? admin : normal);
}
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
7d21305409530b03546e0907e4dddba02da2ecc1 | 9708815be9c65ee877abe9ea5b51170e9a636aaf | /algorithm/src/cn/xux/algorithm/leetcode/general/easy/FindTheHighestAltitude.java | d0a767bdf18b2fc84b291520446393e9459025c0 | [] | no_license | xuxia0914/javaLearning | 85c7fd8c506f2cc67b82fafd2dedb790dcf4555b | 9bdaf6d9dbb7fc15291cf5c1b2c6989986ac08fe | refs/heads/master | 2022-08-13T16:05:15.056330 | 2022-05-13T08:22:16 | 2022-05-13T08:22:16 | 204,140,887 | 0 | 0 | null | 2022-06-17T02:39:48 | 2019-08-24T10:11:57 | Java | UTF-8 | Java | false | false | 1,051 | java | package cn.xux.algorithm.leetcode.general.easy;
/**
* 1732. 找到最高海拔
* 有一个自行车手打算进行一场公路骑行,
* 这条路线总共由 n + 1 个不同海拔的点组成。
* 自行车手从海拔为 0 的点 0 开始骑行。
* 给你一个长度为 n 的整数数组 gain ,
* 其中 gain[i] 是点 i 和点 i + 1 的 净海拔高度差(0 <= i < n)。
* 请你返回 最高点的海拔 。
*
* 示例 1:
* 输入:gain = [-5,1,5,0,-7]
* 输出:1
* 解释:海拔高度依次为 [0,-5,-4,1,1,-6] 。最高海拔为 1 。
*
* 示例 2:
* 输入:gain = [-4,-3,-2,-1,4,3,2]
* 输出:0
* 解释:海拔高度依次为 [0,-4,-7,-9,-10,-6,-3,-1] 。最高海拔为 0 。
*
* 提示:
* n == gain.length
* 1 <= n <= 100
* -100 <= gain[i] <= 100
*/
public class FindTheHighestAltitude {
public int largestAltitude(int[] gain) {
int ans = 0;
int preSum = 0;
for(int g : gain) {
ans = Math.max(ans, preSum += g);
}
return ans;
}
}
| [
"xux21@chinaunicom.cn"
] | xux21@chinaunicom.cn |
9fd15a7ad5f6e622f819af75a7376f82dfabd20e | 5b18c2aa61fd21f819520f1b614425fd6bc73c71 | /src/main/java/com/sinosoft/function/insutil/bl/action/domain/BLPrpTaskActionBase.java | d5e279f7900290a96129e26964c8adf458d532b2 | [] | no_license | Akira-09/claim | 471cc215fa77212099ca385e7628f3d69f83d6d8 | 6dd8a4d4eedb47098c09c2bf3f82502aa62220ad | refs/heads/master | 2022-01-07T13:08:27.760474 | 2019-03-24T23:50:09 | 2019-03-24T23:50:09 | null | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 4,830 | java | package com.sinosoft.function.insutil.bl.action.domain;
import java.util.ArrayList;
import java.util.Collection;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.sinosoft.function.insutil.dto.domain.PrpTaskDto;
import com.sinosoft.function.insutil.resource.dtofactory.domain.DBPrpTask;
import com.sinosoft.sysframework.common.util.SqlUtils;
import com.sinosoft.sysframework.reference.DBManager;
/**
* 这是PrpTask的业务逻辑对象类<br>
* 创建于 2004-4-6 16:08:20<br>
* JToolpad(1.2.4) Vendor:zhouxianli@sinosoft.com.cn
*/
public class BLPrpTaskActionBase{
private static Log log = LogFactory.getLog(BLPrpTaskActionBase.class.getName());
protected int count; //findByConditions查询到的记录数
/**
* 构造函数
*/
public BLPrpTaskActionBase(){
}
/**
* 插入一条数据
* @param dbManager DB管理器
* @param prpTaskDto prpTaskDto
* @throws Exception
*/
public void insert(DBManager dbManager,PrpTaskDto prpTaskDto) throws Exception{
DBPrpTask dbPrpTask = new DBPrpTask(dbManager);
//插入记录
dbPrpTask.insert(prpTaskDto);
}
/**
* 按主键删除一条数据
* @param dbManager DB管理器
* @param taskCode 任务代码
* @param checkCode 权限检验代码
* @throws Exception
*/
public void delete(DBManager dbManager,String taskCode,String checkCode) throws Exception{
DBPrpTask dbPrpTask = new DBPrpTask(dbManager);
//删除记录
dbPrpTask.delete(taskCode, checkCode);
}
/**
* 按条件删除数据
* @param dbManager DB管理器
* @param condtions 删除条件
* @throws Exception
*/
public void deleteByConditions(DBManager dbManager,String conditions) throws Exception{
DBPrpTask dbPrpTask = new DBPrpTask(dbManager);
//按条件删除记录
dbPrpTask.deleteByConditions(conditions);
}
/**
* 按主键更新一条数据(主键本身无法变更)
* @param dbManager DB管理器
* @param prpTaskDto prpTaskDto
* @throws Exception
*/
public void update(DBManager dbManager,PrpTaskDto prpTaskDto) throws Exception{
DBPrpTask dbPrpTask = new DBPrpTask(dbManager);
//更新记录
dbPrpTask.update(prpTaskDto);
}
/**
* 按主键查找一条数据
* @param dbManager DB管理器
* @param taskCode 任务代码
* @param checkCode 权限检验代码
* @return prpTaskDto prpTaskDto
* @throws Exception
*/
public PrpTaskDto findByPrimaryKey(DBManager dbManager,String taskCode,String checkCode) throws Exception{
DBPrpTask dbPrpTask = new DBPrpTask(dbManager);
//声明DTO
PrpTaskDto prpTaskDto = null;
//查询数据,赋值给DTO
prpTaskDto = dbPrpTask.findByPrimaryKey(taskCode, checkCode);
return prpTaskDto;
}
/**
* 按条件查询多条数据
* @param dbManager DB管理器
* @param conditions 查询条件
* @param pageNo 页号
* @param rowsPerPage 每页的行数
* @return Collection 包含prpTaskDto的集合
* @throws Exception
*/
public Collection findByConditions(DBManager dbManager,String conditions,int pageNo,int rowsPerPage) throws Exception{
DBPrpTask dbPrpTask = new DBPrpTask(dbManager);
Collection collection = new ArrayList();
if(conditions.trim().length()==0){
conditions = "1=1";
}
count = dbPrpTask.getCount(SqlUtils.getWherePartForGetCount(conditions));
collection = dbPrpTask.findByConditions(conditions,pageNo,rowsPerPage);
return collection;
}
/**
* 按条件查询多条数据
* @param dbManager DB管理器
* @param conditions 查询条件
* @return Collection 包含prpTaskDto的集合
* @throws Exception
*/
public Collection findByConditions(DBManager dbManager,String conditions) throws Exception{
return findByConditions(dbManager,conditions,0,0);
}
/**
* 必须在findByConditions后调用,返回findByConditions查询到的记录数
* @return 记录数
*/
public int getCount(){
return count;
}
/**
* 查询满足模糊查询条件的记录数
* @param dbManager DB管理器
* @param conditions conditions
* @return 满足模糊查询条件的记录数
* @throws Exception
*/
public int getCount(DBManager dbManager,String conditions)
throws Exception{
DBPrpTask dbPrpTask = new DBPrpTask(dbManager);
if(conditions.trim().length()==0){
conditions = "1=1";
}
int count = dbPrpTask.getCount(conditions);
return count;
}
}
| [
"26166405+vincentdk77@users.noreply.github.com"
] | 26166405+vincentdk77@users.noreply.github.com |
2bca070294b416e74ba10a909f3107fdd08f3e6b | d0969e8811c0aeee14674813a83959e3c949e875 | /1017/A/Main.java | d4009da52758f3f31eb67ab0347af29624a53f7b | [] | no_license | charles-wangkai/codeforces | 738354a0c4bb0d83bb0ff431a0d1f39c5e5eab5c | b61ee17b1dea78c74d7ac2f31c4a1ddc230681a7 | refs/heads/master | 2023-09-01T09:07:31.814311 | 2023-09-01T01:34:10 | 2023-09-01T01:34:10 | 161,009,629 | 39 | 14 | null | 2020-10-01T17:43:45 | 2018-12-09T06:00:22 | Java | UTF-8 | Java | false | false | 1,037 | java | import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
Student[] students = new Student[n];
for (int i = 0; i < students.length; i++) {
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int d = sc.nextInt();
students[i] = new Student(i + 1, a, b, c, d);
}
System.out.println(solve(students));
sc.close();
}
static int solve(Student[] students) {
Arrays.sort(students,
(student1, student2) -> (student1.getSum() != student2.getSum())
? Integer.compare(student2.getSum(), student1.getSum())
: Integer.compare(student1.id, student2.id));
for (int i = 0;; i++) {
if (students[i].id == 1) {
return i + 1;
}
}
}
}
class Student {
int id;
int a;
int b;
int c;
int d;
Student(int id, int a, int b, int c, int d) {
this.id = id;
this.a = a;
this.b = b;
this.c = c;
this.d = d;
}
int getSum() {
return a + b + c + d;
}
} | [
"charles.wangkai@gmail.com"
] | charles.wangkai@gmail.com |
1a8323f4525028f53feb402fb8f98923a0f9eb73 | 47290b75d00d1c3f446ae983f8e0e837a92ca613 | /chtool/src/main/java/ch/chtool/utils/AppUtils.java | 08e8f251d0ea1bca3cc842f72d00099cc35f0a03 | [] | no_license | forhaodream/ComponentLib | d12f64417ca9bb321c54245c270f60f5ce9d5b3b | 9b48e5c4556e66ccd777617870c3594437e3a644 | refs/heads/master | 2020-07-27T07:44:58.281512 | 2020-05-07T02:53:49 | 2020-05-07T02:53:49 | 209,019,345 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 5,325 | java | package ch.chtool.utils;
import android.Manifest;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.net.Uri;
import android.view.inputmethod.InputMethodManager;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.text.DecimalFormat;
import androidx.core.app.ActivityCompat;
/**
* Created by CH
* on 2020/5/7 10:51
*/
public class AppUtils {
/**
* 关闭键盘
*
* @param activity Activity
*/
public static void hideSoftInput(Activity activity) {
if (activity.getCurrentFocus() != null)
((InputMethodManager) activity
.getSystemService(Context.INPUT_METHOD_SERVICE))
.hideSoftInputFromWindow(activity.getCurrentFocus()
.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
}
/**
* 指定小数输出
*
* @param s 输入
* @param format 小数格式,比如保留两位0.00
* @return 输出结果
*/
public static String decimalFormat(double s, String format) {
DecimalFormat decimalFormat = new DecimalFormat(format);
return decimalFormat.format(s);
}
/**
* 把Bitmap转Byte
*
* @param bitmap bitmap对象
* @return Bytes
*/
public static byte[] bitmap2Bytes(Bitmap bitmap) {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
bitmap.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream);
return byteArrayOutputStream.toByteArray();
}
/**
* MD5加密
*
* @param plainText 需要加密的字符串
* @return 加密后字符串
*/
public static String md5(String plainText) {
String result = "";
try {
MessageDigest md = MessageDigest.getInstance("MD5");
md.update(plainText.getBytes());
byte b[] = md.digest();
int i;
StringBuffer buf = new StringBuffer("");
for (int offset = 0; offset < b.length; offset++) {
i = b[offset];
if (i < 0)
i += 256;
if (i < 16)
buf.append("0");
buf.append(Integer.toHexString(i));
}
result = buf.toString().toLowerCase();// 32位的加密(转成小写)
buf.toString().substring(8, 24);// 16位的加密
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
}
return result;
}
/**
* 安装apk
*
* @param context 上下文
* @param path 文件路劲
*/
public static void installAPK(Context context, String path) {
Intent intent = new Intent();
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(new File(path)), "application/vnd.android.package-archive");
context.startActivity(intent);
}
/**
* 直接拨号,需要增加CALL_PHONE权限
*
* @param context 上下文
* @param phone 手机号码
*/
public static void actionCall(Context context, String phone) {
Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phone));
intent.setAction(Intent.ACTION_CALL);// 直接拨号
if (ActivityCompat.checkSelfPermission(context, Manifest.permission.CALL_PHONE) != PackageManager.PERMISSION_GRANTED) {
// TODO: Consider calling
// ActivityCompat#requestPermissions
// here to request the missing permissions, and then overriding
// public void onRequestPermissionsResult(int requestCode, String[] permissions,
// int[] grantResults)
// to handle the case where the user grants the permission. See the documentation
// for ActivityCompat#requestPermissions for more details.
return;
}
context.startActivity(intent);
}
/**
* 跳到拨号盘-拨打电话
*
* @param context 上下文
* @param phone 手机号码
*/
public static void actionDial(Context context, String phone) {
Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phone));
intent.setAction(Intent.ACTION_DIAL);// 拨号盘
if (ActivityCompat.checkSelfPermission(context, Manifest.permission.CALL_PHONE) != PackageManager.PERMISSION_GRANTED) {
// TODO: Consider calling
// ActivityCompat#requestPermissions
// here to request the missing permissions, and then overriding
// public void onRequestPermissionsResult(int requestCode, String[] permissions,
// int[] grantResults)
// to handle the case where the user grants the permission. See the documentation
// for ActivityCompat#requestPermissions for more details.
return;
}
context.startActivity(intent);
}
}
| [
"ch00209@163.com"
] | ch00209@163.com |
e68343ed82b6c744fe2783b602e2398a3d52012b | 2cdccd5aab49413aba1cf68173a9b2a0c9947551 | /xmlsh/src/commands/org/xmlsh/commands/stax/newEventReader.java | 98b1d5c2f151da7f09a41ed3f2aaa47530e41923 | [] | no_license | bryanchance/xmlsh1_3 | b0d60faa7dea5cecb931899e3da3250245f79f68 | 626d27415ff70552a2e56374b79982f55e00070e | refs/heads/master | 2020-05-24T14:25:02.538838 | 2015-06-18T13:14:31 | 2015-06-18T13:14:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,462 | java | /**
* $Id: $
* $Date: $
*
*/
package org.xmlsh.commands.stax;
import java.util.List;
import org.xmlsh.core.BuiltinFunctionCommand;
import org.xmlsh.core.CoreException;
import org.xmlsh.core.XValue;
import org.xmlsh.sh.shell.Shell;
public class newEventReader extends BuiltinFunctionCommand {
public newEventReader()
{
super("newEventReader");
}
@Override
public XValue run(Shell shell, List<XValue> args) throws CoreException {
if( args.size() == 0 )
return new XValue(shell.getEnv().getStdin().asXMLEventReader(shell.getSerializeOpts()));
else
return new XValue(shell.getEnv().getInput(args.get(0)).asXMLEventReader(shell.getSerializeOpts()));
}
}
//
//
//Copyright (C) 2008-2014 David A. Lee.
//
//The contents of this file are subject to the "Simplified BSD License" (the "License");
//you may not use this file except in compliance with the License. You may obtain a copy of the
//License at http://www.opensource.org/licenses/bsd-license.php
//
//Software distributed under the License is distributed on an "AS IS" basis,
//WITHOUT WARRANTY OF ANY KIND, either express or implied.
//See the License for the specific language governing rights and limitations under the License.
//
//The Original Code is: all this file.
//
//The Initial Developer of the Original Code is David A. Lee
//
//Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved.
//
//Contributor(s): none.
//
| [
"dlee@calldei.com"
] | dlee@calldei.com |
dc96195dc049bb928ff60d283c985fa1f972329b | 58e555e306f41d1a1d06f7c5e30db13eee2c1eed | /src/java/nio/HeapIntBufferR.java | 8632e82d04fea8c3c3adf3ae18b13af5a5db9626 | [] | no_license | SmartTalk/jdk8-source-reading | 33db15399d1b0de5c3062b2a2ec2d2ae3bbbaa4d | 0682559ef6c84a73addd8375253755dfb9e647fd | refs/heads/master | 2020-05-17T17:08:28.390691 | 2018-10-27T13:01:48 | 2018-10-27T13:01:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,222 | java | /*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
// -- This file was mechanically generated: Do not edit! -- //
package java.nio;
/**
* A read-only HeapIntBuffer. This class extends the corresponding
* read/write class, overriding the mutation methods to throw a {@link
* ReadOnlyBufferException} and overriding the view-buffer methods to return an
* instance of this class rather than of the superclass.
*/
class HeapIntBufferR extends HeapIntBuffer {
// For speed these fields are actually declared in X-Buffer;
// these declarations are here as documentation
/*
*/
HeapIntBufferR(int cap, int lim) { // package-private
super(cap, lim);
this.isReadOnly = true;
}
HeapIntBufferR(int[] buf, int off, int len) { // package-private
super(buf, off, len);
this.isReadOnly = true;
}
protected HeapIntBufferR(int[] buf, int mark, int pos, int lim, int cap, int off) {
super(buf, mark, pos, lim, cap, off);
this.isReadOnly = true;
}
public IntBuffer slice() {
return new HeapIntBufferR(hb, -1, 0, this.remaining(), this.remaining(), this.position() + offset);
}
public IntBuffer duplicate() {
return new HeapIntBufferR(hb, this.markValue(), this.position(), this.limit(), this.capacity(), offset);
}
public IntBuffer asReadOnlyBuffer() {
return duplicate();
}
public boolean isReadOnly() {
return true;
}
public IntBuffer put(int x) {
throw new ReadOnlyBufferException();
}
public IntBuffer put(int i, int x) {
throw new ReadOnlyBufferException();
}
public IntBuffer put(int[] src, int offset, int length) {
throw new ReadOnlyBufferException();
}
public IntBuffer put(IntBuffer src) {
throw new ReadOnlyBufferException();
}
public IntBuffer compact() {
throw new ReadOnlyBufferException();
}
public ByteOrder order() {
return ByteOrder.nativeOrder();
}
}
| [
"charpty@gmail.com"
] | charpty@gmail.com |
60000c62dce3bb11ec7cd3ed99aa55599c1dc670 | dbe59da45f4cee95debb721141aeab16f44b4cac | /src/main/java/com/syuesoft/qx/daoimpi/LoginErrorDaoImpl.java | 3dde5186388f6b1f5fd247a91c1c482004447de6 | [] | no_license | tonyliu830204/UESoft | 5a8a546107f2093ee920facf6d93eedd1affd248 | 9dd48ff19f40556d1892688f6426e4bfe68c7d10 | refs/heads/master | 2021-01-23T15:51:00.782632 | 2014-03-26T15:56:46 | 2014-03-26T15:56:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 334 | java | package com.syuesoft.qx.daoimpi;
import org.springframework.stereotype.Repository;
import com.syuesoft.bas.daoimpl.BaseDaoImpl;
import com.syuesoft.model.LoginError;
import com.syuesoft.qx.dao.LoginErrorDao;
@Repository
public class LoginErrorDaoImpl extends BaseDaoImpl<LoginError> implements
LoginErrorDao
{
} | [
"liweinan0423@gmail.com"
] | liweinan0423@gmail.com |
f0a70d57a03f35bc2fdb1b5339c28de2add749e1 | 6c9fbb7e83b671671a2f951371c06aa3694cdcc3 | /adsframework/src/main/java/org/broadleafcommerce/core/checkout/service/workflow/CompleteOrderActivity.java | 1d797e8551a5978a225d82addcfa714b46d7a421 | [] | no_license | buchiramreddy/ActiveDiscounts | 19aeca79cfdc8902d1a58d48b24f5591d68a8d95 | d71f900ded641ab7404df9a19241f60b03ae58bf | refs/heads/master | 2021-05-27T10:16:54.107132 | 2013-11-06T19:12:04 | 2013-11-06T19:12:04 | 11,724,930 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,655 | java | /*
* Copyright 2008-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.broadleafcommerce.core.checkout.service.workflow;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import org.broadleafcommerce.common.time.SystemTime;
import org.broadleafcommerce.core.order.service.type.OrderStatus;
import org.broadleafcommerce.core.workflow.BaseActivity;
/**
* DOCUMENT ME!
*
* @author $author$
* @version $Revision$, $Date$
*/
public class CompleteOrderActivity extends BaseActivity<CheckoutContext> {
/**
* @see org.broadleafcommerce.core.workflow.Activity#execute(org.broadleafcommerce.core.checkout.service.workflow.CheckoutContext)
*/
@Override public CheckoutContext execute(CheckoutContext context) throws Exception {
CheckoutSeed seed = context.getSeedData();
seed.getOrder().setStatus(OrderStatus.SUBMITTED);
seed.getOrder().setOrderNumber(new SimpleDateFormat("yyyyMMddHHmmssS").format(SystemTime.asDate())
+ seed.getOrder().getId());
seed.getOrder().setSubmitDate(Calendar.getInstance().getTime());
return context;
}
}
| [
"bchittepu@cmcagile.com"
] | bchittepu@cmcagile.com |
5dc95cf504b3cb06edf9fa4716d30dbc25695c64 | 4c19b724f95682ed21a82ab09b05556b5beea63c | /XMSYGame/java2/server/schedule-server/src/main/java/com/xmsy/server/zxyy/schedule/utils/UniqueCodeUtil.java | 912612027a4b64bf39fa88ed4a6f6396a25b4308 | [] | no_license | angel-like/angel | a66f8fda992fba01b81c128dd52b97c67f1ef027 | 3f7d79a61dc44a9c4547a60ab8648bc390c0f01e | refs/heads/master | 2023-03-11T03:14:49.059036 | 2022-11-17T11:35:37 | 2022-11-17T11:35:37 | 222,582,930 | 3 | 5 | null | 2023-02-22T05:29:45 | 2019-11-19T01:41:25 | JavaScript | UTF-8 | Java | false | false | 825 | java | package com.xmsy.server.zxyy.schedule.utils;
import java.util.Random;
/**
* 随机码生成工具(8位数字加字母)
*
* @author Administrator
*
*/
public class UniqueCodeUtil {
/**
*
*
* @param
* @param 生成8为数字加字母随机码
* @return
*/
public static String create(){
char[] c=charArray();
Random rd = new Random();
String code="";
for (int k = 0; k < 8; k++) {
int index = rd.nextInt(c.length);//随机获取数组长度作为索引
code+=c[index];//循环添加到字符串后面
}
return code;
}
public static char[] charArray(){
int i = 1234567890;
String s = "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM";
String word = s + i;
char[] c = word.toCharArray();
return c;
}
} | [
"163@qq.com"
] | 163@qq.com |
df0b3a281d2565f8207a2694ff896fced2cfba2e | 936aa88990d1e478491aa66627b0263b5590aaa0 | /Platform/mo-6-content/src/content-geom/org/mo/content/geom/boundary/SBoundaryLine.java | b8ca5b346f3d192df1db5686d3cf154399082000 | [] | no_license | favedit/MoCloud3d | f6d417412c5686a0f043a2cc53cd34214ee35618 | ef6116df5b66fbc16468bd5e915ba19bb982d867 | refs/heads/master | 2021-01-10T12:12:22.837243 | 2016-02-21T09:05:53 | 2016-02-21T09:05:53 | 48,077,310 | 2 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,063 | java | package org.mo.content.geom.boundary;
public class SBoundaryLine
{
public double length;
public SBoundaryPoint begin;
public SBoundaryPoint end;
//============================================================
// <T>构造三维双浮点坐标。</T>
//
// @param value 内容
//============================================================
public SBoundaryLine(){
}
//============================================================
// <T>构造三维双浮点坐标。</T>
//
// @param value 内容
//============================================================
public SBoundaryLine(SBoundaryPoint value1,
SBoundaryPoint value2){
length = value1.length(value2);
begin = value1;
end = value2;
}
//============================================================
// <T>获得字符串。</T>
//
// @return 字符串
//============================================================
@Override
public String toString(){
return begin + "|" + end;
}
}
| [
"favedit@hotmail.com"
] | favedit@hotmail.com |
5c4387736b1d9056d0b2966d5f63165ded6ba8c0 | a6e2cd9ea01bdc5cfe58acce25627786fdfe76e9 | /src/main/java/com/alipay/api/domain/ShopPromoInfo.java | d6a07a7ddcc75462a47b44d67d43e141ba28c2cd | [
"Apache-2.0"
] | permissive | cc-shifo/alipay-sdk-java-all | 38b23cf946b73768981fdeee792e3dae568da48c | 938d6850e63160e867d35317a4a00ed7ba078257 | refs/heads/master | 2022-12-22T14:06:26.961978 | 2020-09-23T04:00:10 | 2020-09-23T04:00:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,250 | java | package com.alipay.api.domain;
import java.util.List;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
/**
* 商圈店铺营销信息
*
* @author auto create
* @since 1.0, 2017-06-20 15:01:09
*/
public class ShopPromoInfo extends AlipayObject {
private static final long serialVersionUID = 7186249232368398652L;
/**
* 店铺跳转链接
*/
@ApiField("action_param")
private String actionParam;
/**
* 店铺地址
*/
@ApiField("address")
private String address;
/**
* 品牌名称
*/
@ApiField("brand_name")
private String brandName;
/**
* 城市id
*/
@ApiField("city_id")
private String cityId;
/**
* 菜系
*/
@ApiField("cuisine")
private String cuisine;
/**
* 预留扩展信息
*/
@ApiField("ext_info")
private String extInfo;
/**
* 是否有优惠
*/
@ApiField("has_hui")
private String hasHui;
/**
* 店铺名称
*/
@ApiField("head_shop_name")
private String headShopName;
/**
* 纬度
*/
@ApiField("latitude")
private String latitude;
/**
* 经度
*/
@ApiField("longitude")
private String longitude;
/**
* 人气分
*/
@ApiField("popularity")
private String popularity;
/**
* 人气等级
*/
@ApiField("popularity_level")
private String popularityLevel;
/**
* 人均消费
*/
@ApiField("price_average")
private String priceAverage;
/**
* 前台一级类目列表
*/
@ApiField("root_display_category_info")
private String rootDisplayCategoryInfo;
/**
* 店铺id
*/
@ApiField("shop_id")
private String shopId;
/**
* 店铺logo图
*/
@ApiField("shop_logo_url")
private String shopLogoUrl;
/**
* 店铺详细名称
*/
@ApiField("shop_name")
private String shopName;
/**
* 推荐语
*/
@ApiField("shop_recommend_one_tag_compose")
private String shopRecommendOneTagCompose;
/**
* 店铺券信息
*/
@ApiListField("voucher_info_list")
@ApiField("promo_voucher_info")
private List<PromoVoucherInfo> voucherInfoList;
public String getActionParam() {
return this.actionParam;
}
public void setActionParam(String actionParam) {
this.actionParam = actionParam;
}
public String getAddress() {
return this.address;
}
public void setAddress(String address) {
this.address = address;
}
public String getBrandName() {
return this.brandName;
}
public void setBrandName(String brandName) {
this.brandName = brandName;
}
public String getCityId() {
return this.cityId;
}
public void setCityId(String cityId) {
this.cityId = cityId;
}
public String getCuisine() {
return this.cuisine;
}
public void setCuisine(String cuisine) {
this.cuisine = cuisine;
}
public String getExtInfo() {
return this.extInfo;
}
public void setExtInfo(String extInfo) {
this.extInfo = extInfo;
}
public String getHasHui() {
return this.hasHui;
}
public void setHasHui(String hasHui) {
this.hasHui = hasHui;
}
public String getHeadShopName() {
return this.headShopName;
}
public void setHeadShopName(String headShopName) {
this.headShopName = headShopName;
}
public String getLatitude() {
return this.latitude;
}
public void setLatitude(String latitude) {
this.latitude = latitude;
}
public String getLongitude() {
return this.longitude;
}
public void setLongitude(String longitude) {
this.longitude = longitude;
}
public String getPopularity() {
return this.popularity;
}
public void setPopularity(String popularity) {
this.popularity = popularity;
}
public String getPopularityLevel() {
return this.popularityLevel;
}
public void setPopularityLevel(String popularityLevel) {
this.popularityLevel = popularityLevel;
}
public String getPriceAverage() {
return this.priceAverage;
}
public void setPriceAverage(String priceAverage) {
this.priceAverage = priceAverage;
}
public String getRootDisplayCategoryInfo() {
return this.rootDisplayCategoryInfo;
}
public void setRootDisplayCategoryInfo(String rootDisplayCategoryInfo) {
this.rootDisplayCategoryInfo = rootDisplayCategoryInfo;
}
public String getShopId() {
return this.shopId;
}
public void setShopId(String shopId) {
this.shopId = shopId;
}
public String getShopLogoUrl() {
return this.shopLogoUrl;
}
public void setShopLogoUrl(String shopLogoUrl) {
this.shopLogoUrl = shopLogoUrl;
}
public String getShopName() {
return this.shopName;
}
public void setShopName(String shopName) {
this.shopName = shopName;
}
public String getShopRecommendOneTagCompose() {
return this.shopRecommendOneTagCompose;
}
public void setShopRecommendOneTagCompose(String shopRecommendOneTagCompose) {
this.shopRecommendOneTagCompose = shopRecommendOneTagCompose;
}
public List<PromoVoucherInfo> getVoucherInfoList() {
return this.voucherInfoList;
}
public void setVoucherInfoList(List<PromoVoucherInfo> voucherInfoList) {
this.voucherInfoList = voucherInfoList;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
94ababc759e9a7565c874d305259b4ba2f7594e9 | eeddfc40a62835a40195e1e9bf8ce39619adb034 | /server/src/main/java/com/github/alesj/mvnd/server/domain/Image.java | 476aa78b4106f2adb6de20c4468b86d6e6b2493e | [] | no_license | alesj/mvndexample | a85fa3bef35588d4af7766130af8305213d7624b | f401285e3cc8fb0af49ab1d3719c23e457ac064a | refs/heads/main | 2023-01-28T05:02:08.693687 | 2020-12-17T19:31:19 | 2020-12-17T19:35:44 | 322,392,654 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,037 | java | package com.github.alesj.mvnd.server.domain;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.sql.rowset.serial.SerialBlob;
import java.io.IOException;
import java.io.InputStream;
import java.sql.Blob;
import java.sql.SQLException;
/**
* @author Ales Justin
*/
@Entity
@Table(
name = Image.TABLE_NAME,
uniqueConstraints = @UniqueConstraint(name = Image.PK_CONSTRAINT_NAME, columnNames = {"name"})
)
public class Image extends AbstractEntity {
public static final String TABLE_NAME = "image";
public static final String PK_CONSTRAINT_NAME = TABLE_NAME + "_pkey";
@Column(nullable = false)
private String name;
@Lob
private Blob blob;
private String mimeType;
private long length;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getMimeType() {
return mimeType;
}
public void setMimeType(String mimeType) {
this.mimeType = mimeType;
}
public long getLength() {
return length;
}
public void setLength(long length) {
this.length = length;
}
public Blob getBlob() {
return blob;
}
public void setBlob(Blob blob) {
this.blob = blob;
}
public void write(byte[] bytes) throws Exception {
blob = new SerialBlob(bytes);
}
public byte[] read() throws IOException {
if (blob == null)
return null;
try {
return blob.getBytes(1, (int) blob.length() + 1);
} catch (SQLException e) {
throw new IOException(e.getMessage(), e);
}
}
public InputStream stream() throws IOException {
try {
return (blob != null) ? blob.getBinaryStream() : null;
} catch (SQLException e) {
throw new IOException(e.getMessage(), e);
}
}
}
| [
"ales.justin@gmail.com"
] | ales.justin@gmail.com |
6cef9b6ae406a9f7e7100855d1d8df62719141ad | a9e78f785fbdd7b4b2bd3b16ac5c703ef0af5a29 | /IRegistry.java | fd48c94d6a148e3a17a311033264b92c97b2aa4b | [] | no_license | btilm305/mc-dev | 0aa1a8aad5b8fe7e0bc7be64fbd7e7f87162fdaa | c0ad4fec170c89b8e1534635b614b50a55235573 | refs/heads/master | 2016-09-05T20:07:45.144546 | 2013-06-05T02:12:55 | 2013-06-05T02:12:55 | 9,861,501 | 2 | 2 | null | null | null | null | UTF-8 | Java | false | false | 204 | java | package net.minecraft.src;
public interface IRegistry
{
Object func_82594_a(Object var1);
/**
* Register an object on this registry.
*/
void putObject(Object var1, Object var2);
}
| [
"btilm305@gmail.com"
] | btilm305@gmail.com |
e1f10bc8f6ef0fc4e5599305b4499e0f10e14571 | 4eee7dbf2cce9623c9975c5017b7b004c854d649 | /cloudsampleapp1/src/main/java/com/fastcode/cloudsampleapp1/application/core/filmcategory/dto/CreateFilmCategoryOutput.java | 49bf2109439f4f7e47175681492d00fa53870307 | [] | no_license | fastcoderepos/ff-sampleApplication1 | 8565885de0b108d0db4252f76b6f4782c55370e4 | e50124f97b7864a8a36e669ed12c605573f932ba | refs/heads/master | 2023-02-14T00:20:02.227079 | 2021-01-10T09:49:53 | 2021-01-10T09:49:53 | 328,350,151 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 379 | java | package com.fastcode.cloudsampleapp1.application.core.filmcategory.dto;
import java.time.*;
import lombok.Getter;
import lombok.Setter;
@Getter @Setter
public class CreateFilmCategoryOutput {
private Integer categoryId;
private Integer filmId;
private LocalDateTime lastUpdate;
private Integer categoryDescriptiveField;
private Integer filmDescriptiveField;
}
| [
"info@nfinityllc.com"
] | info@nfinityllc.com |
9097d1fae0971f22759f3907e52e7ae208c51fc6 | 3ed6744aa1ade57baad083f03a61109096dda7c9 | /FactExtractorFactory/src/gov/hhs/fha/nhinc/adapter/fact/extractor/GenericFactExtractor.java | 3be0c4d365d78c0d1dd0ed7eca17f142557f2186 | [] | no_license | kambasana/ClinicalDecisionSupport | 623f4101380da5629687c56bf3071a5e82d064df | b1c4377507f63421e080c174240b6e6c07828917 | refs/heads/master | 2021-01-20T16:35:28.418519 | 2012-09-28T23:37:07 | 2012-09-28T23:37:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,685 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gov.hhs.fha.nhinc.adapter.fact.extractor;
import gov.hhs.fha.nhinc.adapter.fact.FactType;
import gov.hhs.fha.nhinc.adapter.fact.xml.XMLUtils;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpression;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Node;
/**
*
* @author chrisjan
*/
public class GenericFactExtractor extends XpathFactExtractorImpl {
protected static Log log = LogFactory.getLog(GenericFactExtractor.class);
/**
* XPath expression to extract the total number facts.
*/
protected String factsCountXpath;
public GenericFactExtractor(XPath xpath) {
super(xpath);
}
public String getFactsCountXpath() {
return factsCountXpath;
}
public void setFactsCountXpath(String factsCountXpath) {
this.factsCountXpath = factsCountXpath;
}
@Override
public void extract(Object doc) throws Exception {
//--------------------------------------------------------------------------
// Pull out fact name for debugging
//--------------------------------------------------------------------------
String factName;
int nameIdx = factClassName.lastIndexOf('.');
if (nameIdx == -1) {
factName = factClassName;
}
else {
factName = factClassName.substring(nameIdx+1);
}
//--------------------------------------------------------------------------
// clear out fact objects list(s)
//--------------------------------------------------------------------------
this.deleteFacts();
//--------------------------------------------------------------------------
// return due to error(s)
//--------------------------------------------------------------------------
if (doc == null) {
return;
}
//--------------------------------------------------------------------------
// debug info
//--------------------------------------------------------------------------
if (log.isDebugEnabled()) {
log.debug(factName + " count xpath=" + this.factsCountXpath);
log.debug(factName + " xpath=" + this.factBaseXpath);
}
//--------------------------------------------------------------------------
// extract the total number of facts from XML document.
//--------------------------------------------------------------------------
String tmpExpr = factsCountXpath;
XPathExpression expr = xpath.compile(tmpExpr);
String val = expr.evaluate(doc);
int factCount = Integer.parseInt(val);
log.debug("# of " + factName + "=" + factCount);
//--------------------------------------------------------------------------
// iterate thru each fact
//--------------------------------------------------------------------------
for (int factIdx = 1; factIdx <= factCount; factIdx++) {
tmpExpr = this.factBaseXpath;
tmpExpr = tmpExpr.replace(this.factIndexCharset, String.valueOf(factIdx));
//--------------------------------------------------------------------------
// parse XML document to obtain only relevant node for further processing
Node factNode = (Node) xpath.evaluate(tmpExpr, doc, XPathConstants.NODE);
if (factNode != null && factNode.hasChildNodes()) {
if (log.isDebugEnabled()) {
XMLUtils.printNode(factNode, System.out);
}
//----------------------------------------------------------------------
// extract procedure fact
//----------------------------------------------------------------------
Object factObj = extract(factNode, factIdx);
// debug info
if (log.isDebugEnabled()) {
log.debug(factObj);
}
//----------------------------------------------------------------------
// add to facts list
//----------------------------------------------------------------------
if (factObj != null) {
((FactType) factObj).setHistorical(true);
facts.add(factObj);
}
} else {
log.debug("No nodes found - xpath \"" + tmpExpr + "\"!");
}
}
}
}
| [
"ferret@stormwoods.com"
] | ferret@stormwoods.com |
d6211e5ec9f32f212c58f61f7a594466cb335c66 | ac9735b75a416ca1fa53a33c1575299bb20460aa | /src/com/ericlam/mc/jetty/api/JettyBuilder.java | 7b30da3e1a248432c15a9109238707262ce939b0 | [] | no_license | ansontsang1112/RestAPI | 1479bc52e857677653583675973c3e8b135b2ce3 | 6777e707a9b2256e4ebb96522f2d8a3a526a7d30 | refs/heads/master | 2020-05-31T08:14:21.291127 | 2019-06-04T10:55:00 | 2019-06-04T10:55:00 | 190,183,714 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 621 | java | package com.ericlam.mc.jetty.api;
import org.bukkit.plugin.Plugin;
public class JettyBuilder {
private int port = 8080;
private Plugin plugin;
private ContextHolder[] holders = new ContextHolder[0];
public JettyBuilder(Plugin plugin){
this.plugin = plugin;
}
public JettyBuilder setPort(int port){
this.port = port;
return this;
}
public JettyBuilder addHolder(ContextHolder... holders){
this.holders = holders;
return this;
}
public void launch(){
new JettyServerRunnable(port,holders).runTaskAsynchronously(plugin);
}
}
| [
"unconfigured@null.spigotmc.org"
] | unconfigured@null.spigotmc.org |
094b4afc46ff0cc571404071ed77eb2cdd599155 | 4300339ab9f41a7aae2cc416104c85b0c81e9c40 | /src/com/fisherevans/smash_bash/input/Key.java | cd18eecf5482a724e7a7a98374fb0c2d9b37c411 | [] | no_license | fisherevans/SmashBash | 35619341ddbe9b2e3abbd74387b1b47c9f86f6eb | 2d9332f3c3e717e8b0359b7ce90fdb21ad8ef345 | refs/heads/master | 2021-01-02T08:46:54.394625 | 2015-05-10T04:45:50 | 2015-05-10T04:45:50 | 16,754,332 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 154 | java | package com.fisherevans.smash_bash.input;
/**
* Author: Fisher Evans
* Date: 2/10/14
*/
public enum Key { Up, Down, Left, Right, Select, Back, Menu }
| [
"contact@fisherevans.com"
] | contact@fisherevans.com |
67f6040c176c6743c97e9a4ab7c70f8d276ded03 | cecf17c0c2adaa885a67b4012b9fd479f08cbf51 | /jstorm/jstorm-server/src/main/java/com/alibaba/jstorm/daemon/nimbus/TransitionZkCallback.java | 6f83b5fedab05b748d2fbce88923ad42e86e2612 | [
"Apache-2.0"
] | permissive | bopopescu/CodeRead | 39cef6c23ae0b09d5d8285fe516fd96b17ccb435 | d193c4aae47dd22f4913961be6dc8945bc39ba13 | refs/heads/master | 2022-11-29T15:46:21.446310 | 2017-05-19T01:13:53 | 2017-05-19T01:13:53 | 281,996,462 | 0 | 0 | null | 2020-07-23T16:01:14 | 2020-07-23T16:01:13 | null | UTF-8 | Java | false | false | 610 | java | package com.alibaba.jstorm.daemon.nimbus;
import com.alibaba.jstorm.callback.RunnableCallback;
/**
* This is ZK watch callback When supervisor Zk dir has been changed, it will
* trigger this callback Set the status as monitor
*
*/
public class TransitionZkCallback extends RunnableCallback {
private NimbusData data;
private String topologyid;
public TransitionZkCallback(NimbusData data, String topologyid) {
this.data = data;
this.topologyid = topologyid;
}
@Override
public void run() {
NimbusUtils.transition(data, topologyid, false, StatusType.monitor);
}
}
| [
"zqhxuyuan@gmail.com"
] | zqhxuyuan@gmail.com |
e15188e903f261a4c335706327a6bcfbe15e4c40 | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Math/20/org/apache/commons/math3/analysis/function/Sinh_value_35.java | bf9f7bc54b0aa4fa3eeef51d88aac4204d86b1b5 | [] | 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 | 287 | java |
org apach common math3 analysi function
hyperbol sine function
version
sinh univari differenti function univariatedifferentiablefunct differenti univari function differentiableunivariatefunct
inherit doc inheritdoc
fast math fastmath sinh
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
772198f90460ccbabd6ed1cd0db811d04312ee92 | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XWIKI-13303-6-23-FEMO-WeightedSum:TestLen:CallDiversity/org/xwiki/sheet/internal/SheetDocumentDisplayer_ESTest_scaffolding.java | 3531466390f3aa90b6347dc9b086e9e7b56b7a40 | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 451 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Fri Apr 03 21:40:24 UTC 2020
*/
package org.xwiki.sheet.internal;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class SheetDocumentDisplayer_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
435da9d61a3076bd6371ef8a243191495d5db470 | 57ab5ccfc179da80bed6dc6aa1407c2181cee926 | /org.springframework.boot:support-users/src/src/main/java/co/moviired/support/src/main/java/co/moviired/support/provider/IResponse.java | 9765b766b20a14963a3a8ee9cc03348aca70fbdc | [] | no_license | sandys/filtro | 7190e8e8af7c7b138922c133a7a0ffe9b9b8efa7 | 9494d10444983577a218a2ab2e0bbce374c6484e | refs/heads/main | 2022-12-08T20:46:08.611664 | 2020-09-11T09:26:22 | 2020-09-11T09:26:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 133 | java | package co.moviired.support.provider;
import java.io.Serializable;
public interface IResponse extends Serializable, Cloneable {
}
| [
"me@deletescape.ch"
] | me@deletescape.ch |
1958a8ab2f7a7108b14d0c5d7bee5f9600cf9a51 | 9766d05ef118da63f570731fdf98db8ca7e1eec8 | /app/search/SearchMeta.java | 081dedb8279b78f8f8ce3218f81722f350f5cf02 | [
"Apache-2.0"
] | permissive | perowiski/toletagent | 2681ebb36e32aea74d634253a75ac83c8d8ac40d | 3ae4cf40e4d8f633ec6307078dd8be33c9f761cc | refs/heads/master | 2021-01-19T07:36:34.389580 | 2017-04-19T11:03:50 | 2017-04-19T11:03:50 | 87,558,849 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,383 | java | package search;
import controllers.Utility;
import pojos.Param;
import java.util.Arrays;
import java.util.stream.Collectors;
/**
* Created by seyi on 7/27/16.
*/
public class SearchMeta {
public String title = "";
public String description = "";
public String keywords = "";
public String canonical = "";
public String location = "";
public SearchMeta(SearchReq req, Param param) {
location = Utility.isNotEmpty(req.area)? Utility.capitalize(req.area) + " ":"";
location += Utility.isNotEmpty(req.axis)? Utility.capitalize(req.axis) + " ":"";
location += Utility.isNotEmpty(req.state)? Utility.capitalize(req.state) +" Nigeria,": " Nigeria,";
req.faci.forEach(faci -> {
title += Utility.capitalize(faci) + " ";
});
boolean noType = true;
if(Utility.isNotEmpty(req.use)) {
String use = Utility.capitalize(req.use);
title += use + " ";
keywords += use + ", ";
}
if(req.beds != null && req.beds > 0) {
String beds = " "+req.beds + " Bedroom";
title += beds + " ";
keywords += beds + ", ";
}
if(Utility.isNotEmpty(req.type)) {
String type = req.type;
if(Utility.isNotEmpty(type)) {
type = Arrays.asList(type.split(",")).stream().map(en -> Utility.capitalize(en.trim())).collect(Collectors.joining(", "));
} else {
type = "";
}
String propType = propType(req,type);
type = propType;
title += type + " ";
keywords += type + ", ";
noType = false;
} else {
title += " Properties & Houses ";
}
if(Utility.isNotEmpty(req.mode)) {
title += "for " + req.mode + " ";
//keywords += title + ", ";
String propMode = req.mode.equals("rent")?" let": req.mode;
//Utility.isNotEmpty(req.type)?cleanType(req):"Real Estate"
keywords += (req !=null && Utility.isNotEmpty(req.type) ? cleanType(req) : "Real Estate") + " for " + propMode + " in " + location+" ";
keywords += title + "";
}
boolean hasAxis=false;
if(Utility.isNotEmpty(req.axis)) {
hasAxis=true;
String axis = req.axis;
if(Utility.isNotEmpty(axis)) {
axis = Arrays.asList(axis.split(",")).stream().map(en -> Utility.capitalize(en.trim())).collect(Collectors.joining(", "));
} else {
axis = "";
}
String area = req.area;
if(Utility.isNotEmpty(area)) {
area = Arrays.asList(area.split(",")).stream().map(en -> Utility.capitalize(en.trim())).collect(Collectors.joining(", "));
} else {
area = "";
}
title += "in " + area + " " + axis + " ";
if(noType) {
/*keywords += "Real Estate to "+ (("rent".equals(req.mode)) ? "let": req.mode) +" in Nigeria, " +
"Property & Houses For "+ req.mode +" in "+ axis +", "+ area + " " +axis +", " +
"Lagos Nigeria - Flats, houses, Apartments, land, commercial property, office space, " +
"self contain, bedroom flat, mini flat, bq, shop, apartment, ";*/
keywords += "Real Estate to "+ (("rent".equals(req.mode)) ? "let": req.mode) +" in Nigeria, " +
"Property & Houses For "+ req.mode +" in "+ location+" ";
}
keywords += area + " " + axis + " ";
}
String in = "";
if(!hasAxis){
in = "in ";
}
String append = " " +in+ Utility.capitalize(req.state) + " Nigeria";
title += append + " ";
keywords += moreKeyWords(req, append) +", "+ location.replace("Nigeria","")+" Flats, houses, Apartments, land, commercial property, office space, self contain, Nigerian Real Estate & Property";
if(param.getPage() > 0) {
title += "| Page " + param.getPage();
//keywords += "Page " + param.getPage();
}
description = ((req.type != null) ? cleanType(req)+" ": "Real Estate") + (("rent".equals(req.mode)) ? " to let": " for sale") +
" in " +location+
" " + title.trim() + ", Nigerian Real estate and Property";
if(Utility.isNotEmpty(req.state)) {
canonical += "/" + req.state;
}
if(Utility.isNotEmpty(req.axis)) {
canonical += "/" + req.axis;
}
if(Utility.isNotEmpty(req.area)) {
canonical += "/" + req.area;
}
if(Utility.isNotEmpty(req.type)) {
canonical += "/" + req.type;
}
if(req.beds != null && req.beds > 0) {
canonical += "?beds=" + req.beds;
}
}
public String propType(SearchReq req,String type) {
if(req != null && Utility.isNotEmpty(req.type)) {
if(req.beds != null && req.beds == 1 && req.type.equals("flat-apartment")){
return "Mini Flat";
} else if (req.type.equals("boys-quarters")) {
return type + ", bq";
} else if (req.type.equals("land")) {
return type + ", Plots, Acres , Hectares of Land";
}
}
return type;
}
public String cleanType(SearchReq req) {
if(req != null && Utility.isNotEmpty(req.type)) {
String type = req.type;
if(req.type.equals("flat-apartment") && req.beds != null && req.beds == 1) {
type = "mini-flat";
}
type = type.contains("-") ? type.replace("-"," ") : type;
if(type.length() > 1) {
String firstChar = type.substring(0,1).toUpperCase();
String otherChars = type.substring(1,type.length()).toLowerCase();
return firstChar + otherChars;
}
}
return req.type;
}
public String moreKeyWords(SearchReq req, String keywords) {
if(req != null && Utility.isNotEmpty(req.type)) {
if(req.type.equals("self-contain")) {
keywords += ", a room Self Contain " + location;
}
}
return keywords;
}
}
| [
"you@example.com"
] | you@example.com |
93d8d22fc48d629bc2a7f258165e120224f31b0e | 35b1fbed0a376d7842c1b94f284e131008d70620 | /PornTube/src/main/java/com/buguagaoshu/porntube/dao/ArticleDao.java | 2c1a5710850cac083b2a8f416fa530d3bde35e86 | [
"MIT"
] | permissive | wangbaochao/PornTube | c2d15372128558b4f4cbaf9358a87edceb41ee70 | e1af8bf324b1cea448c6eb810138e211054eb14c | refs/heads/master | 2023-04-17T20:32:26.247841 | 2021-04-20T15:07:24 | 2021-04-20T15:07:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 671 | java | package com.buguagaoshu.porntube.dao;
import com.buguagaoshu.porntube.entity.ArticleEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 视频,图片,文章 发帖表
TODO 回复消息可见,加密帖子,视频等
*
* @author Pu Zhiwei
* @email puzhiweipuzhiwei@foxmail.com
* @date 2020-09-05 14:38:43
*/
@Mapper
public interface ArticleDao extends BaseMapper<ArticleEntity> {
void addDanmakuCount(@Param("id") long articleId, @Param("count") Long count);
void addViewCount(@Param("id") long articleId, @Param("count") Long count);
}
| [
"948805382@qq.com"
] | 948805382@qq.com |
b8bf66fc42a03632cf66a5339041d5bfa3a6d5f4 | 5619baa59ecdb9c392f6623ea5b022d9704eb8ce | /AbstractFactoryDeseni/src/pcOzellikleri/PcOzellikler2.java | 6a3649e13e8237c686c19eafe2aef35fbb01d14a | [] | no_license | huseyinsaglam/Design-Patterns | cb551685ca6d2f98a1588328d9cc82b26dce913a | df2a31b8e3ff1459ec85dafd987c663b4d588388 | refs/heads/master | 2021-01-26T13:34:38.375086 | 2020-03-25T15:16:17 | 2020-03-25T15:16:17 | 243,443,645 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 427 | java | package pcOzellikleri;
import abstractFactoryDesign.PC_ABSTRACTFACTORY;
import islemci.Islemci;
import ram.RAM;
public class PcOzellikler2 {
private PC_ABSTRACTFACTORY pc_FACTORY;
public PcOzellikler2(PC_ABSTRACTFACTORY factory){
pc_FACTORY = factory;
}
public void getPc()
{
System.out.println("PC uretimi ozellikleri");
pc_FACTORY.CreateIslemci().IslemciTuru();
pc_FACTORY.CreateRAM().ramTipi();
}
}
| [
"hsaglam001@gmail.com"
] | hsaglam001@gmail.com |
00dbd8d33f3d253772b032fe06705e3c420c565d | 23eaf717fda54af96f3e224dde71c6eb7a196d8c | /custos-integration-services/log-management-service-parent/log-management-service/src/main/java/org/apache/custos/log/management/LogManagementServiceInitializer.java | 362d9b15d32117058c11d848b382982bfe62a602 | [
"Apache-2.0"
] | permissive | etsangsplk/airavata-custos | 8a0e52f0da10ec29e13de03d546962e6038e6266 | 2d341849dd8ea8a7c2efec6cc73b01dfd495352e | refs/heads/master | 2023-02-09T22:56:26.576113 | 2020-10-14T01:15:22 | 2020-10-14T01:15:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,640 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.custos.log.management;
import brave.Tracing;
import brave.grpc.GrpcTracing;
import io.grpc.ClientInterceptor;
import io.grpc.ServerInterceptor;
import org.apache.custos.integration.core.interceptor.IntegrationServiceInterceptor;
import org.apache.custos.integration.core.interceptor.ServiceInterceptor;
import org.apache.custos.integration.services.commons.interceptors.LoggingInterceptor;
import org.apache.custos.log.management.interceptors.ClientAuthInterceptorImpl;
import org.apache.custos.log.management.interceptors.InputValidator;
import org.apache.custos.log.management.interceptors.UserAuthInterceptorImpl;
import org.lognet.springboot.grpc.GRpcGlobalInterceptor;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import java.util.Stack;
@SpringBootApplication
@ComponentScan(basePackages = "org.apache.custos")
public class LogManagementServiceInitializer {
public static void main(String[] args) {
SpringApplication.run(LogManagementServiceInitializer.class, args);
}
@Bean
public GrpcTracing grpcTracing(Tracing tracing) {
// Tracing tracing1 = Tracing.newBuilder().build();
return GrpcTracing.create(tracing);
}
//We also create a client-side interceptor and put that in the context, this interceptor can then be injected into gRPC clients and
//then applied to the managed channel.
@Bean
ClientInterceptor grpcClientSleuthInterceptor(GrpcTracing grpcTracing) {
return grpcTracing.newClientInterceptor();
}
@Bean
@GRpcGlobalInterceptor
ServerInterceptor grpcServerSleuthInterceptor(GrpcTracing grpcTracing) {
return grpcTracing.newServerInterceptor();
}
@Bean
public Stack<IntegrationServiceInterceptor> getInterceptorSet(InputValidator inputValidator,
ClientAuthInterceptorImpl authInterceptor,
UserAuthInterceptorImpl userAuthInterceptor,
LoggingInterceptor loggingInterceptor) {
Stack<IntegrationServiceInterceptor> interceptors = new Stack<>();
interceptors.add(inputValidator);
interceptors.add(authInterceptor);
interceptors.add(userAuthInterceptor);
interceptors.add(loggingInterceptor);
return interceptors;
}
@Bean
@GRpcGlobalInterceptor
ServerInterceptor validationInterceptor(Stack<IntegrationServiceInterceptor> integrationServiceInterceptors) {
return new ServiceInterceptor(integrationServiceInterceptors);
}
}
| [
"irjanith@gmail.com"
] | irjanith@gmail.com |
b6a0a74f402a8acf69e553d63672141e4d3ccb55 | a6e2cd9ea01bdc5cfe58acce25627786fdfe76e9 | /src/main/java/com/alipay/api/domain/InventoryInfo.java | 48dbe1a1d35dc55b2313171967e517f1a298a8a7 | [
"Apache-2.0"
] | permissive | cc-shifo/alipay-sdk-java-all | 38b23cf946b73768981fdeee792e3dae568da48c | 938d6850e63160e867d35317a4a00ed7ba078257 | refs/heads/master | 2022-12-22T14:06:26.961978 | 2020-09-23T04:00:10 | 2020-09-23T04:00:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 780 | 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-02-08 14:44:32
*/
public class InventoryInfo extends AlipayObject {
private static final long serialVersionUID = 8613866854459469766L;
/**
* 资产数量
*/
@ApiField("quantity")
private Long quantity;
/**
* 资产类型id编号
*/
@ApiField("sku_id")
private String skuId;
public Long getQuantity() {
return this.quantity;
}
public void setQuantity(Long quantity) {
this.quantity = quantity;
}
public String getSkuId() {
return this.skuId;
}
public void setSkuId(String skuId) {
this.skuId = skuId;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
c318c9a5d28ed3bdcbb86167739e2867251423ce | adb81cc174a2ee5e7b34cd1f98009d5ad1358391 | /src/main/java/com/zmm/rabbitmq/util/IpUtil.java | 7718b022fdae4a4855d483f63a354dba1f26733b | [] | no_license | MingHub0313/zmm_rabbitmq | 5b995bc6d8ab9ebe013bf1c54d33e48b98af6d1c | 7a2e6d3482ecdb91e2b9b62950a5ca614ee6e339 | refs/heads/master | 2023-04-01T02:06:48.193392 | 2020-05-06T08:32:58 | 2020-05-06T08:32:58 | 261,696,682 | 0 | 0 | null | 2021-03-31T22:04:46 | 2020-05-06T08:25:43 | Java | UTF-8 | Java | false | false | 1,008 | java | package com.zmm.rabbitmq.util;
import javax.servlet.http.HttpServletRequest;
/**
* @Name IpUtil
* @Author 900045
* @Created by 2020/4/30 0030
*/
public class IpUtil {
/**
* 获取客户端真实ip地址
*
* @param request
* @return
*/
public static String getIpAddress(HttpServletRequest request) {
String ip = request.getHeader("x-forwarded-for");
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("Proxy-Client-IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("WL-Proxy-Client-IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("HTTP_CLIENT_IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("HTTP_X_FORWARDED_FOR");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getRemoteAddr();
}
return ip;
}
}
| [
"zhangmingmig@adpanshi.com"
] | zhangmingmig@adpanshi.com |
492a9190f73c2e56948c07560c83c0d64869a868 | 08fca4ddbc953083fc4ed0aadc34e5427ae98cdf | /mall-warehouse/src/main/java/com/buguagaoshu/mall/warehouse/dao/WareOrderTaskDetailDao.java | a212445c9c14304722c2e59d36f4317ef356b97d | [
"MIT"
] | permissive | PuZhiweizuishuai/Shopping-Mall | aee80c38c1919d2b42aca022517c6642e5315bec | 82efcce6cb99fdfc5ecd890eeaa2462359a9cbe0 | refs/heads/master | 2022-08-22T14:17:43.014323 | 2020-04-13T13:51:52 | 2020-04-13T13:51:52 | 253,273,878 | 2 | 2 | MIT | 2022-07-06T20:49:00 | 2020-04-05T16:00:00 | JavaScript | UTF-8 | Java | false | false | 439 | java | package com.buguagaoshu.mall.warehouse.dao;
import com.buguagaoshu.mall.warehouse.entity.WareOrderTaskDetailEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* 库存工作单
*
* @author Pu Zhiwei
* @email puzhiweipuzhiwei@foxmail.com
* @date 2020-04-06 20:03:29
*/
@Mapper
public interface WareOrderTaskDetailDao extends BaseMapper<WareOrderTaskDetailEntity> {
}
| [
"948805382@qq.com"
] | 948805382@qq.com |
6a9a77f9997a720db79f20eced2b207a82023812 | d214b58e54c97019dc562f0b9786fed163baa219 | /src/main/java/com/gxwzu/system/service/sysDepartment/ISysDepartmentService.java | 3493eb4d0aeaaa03bae60402f889877b57d3dca1 | [] | no_license | hhufu/gdm | 9a97d4dd2b365ed75c87cbbe9817b714b562681b | cca682b9f9e633140529006c8f3a5c3436a59dc5 | refs/heads/master | 2022-11-11T08:22:15.946609 | 2020-05-01T13:01:52 | 2020-05-01T13:01:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,141 | java | package com.gxwzu.system.service.sysDepartment;
import java.util.List;
import com.gxwzu.core.pagination.Result;
import com.gxwzu.system.model.sysDepartment.SysDepartment;
import com.gxwzu.system.model.sysMajor.SysMajor;
import com.gxwzu.system.model.sysTeacher.SysTeacher;
import com.gxwzu.system.model.sysStudent.SysStudent;
public interface ISysDepartmentService {
/**
* 列表查询
* @date 2017.7.7
* @param sysDepartment
* @param page
* @param row
* @return
*/
public Result<SysDepartment> find(SysDepartment sysDepartment, int page, int row);
/**
* 添加学院
* @param model
* @return
*/
public SysDepartment add(SysDepartment model);
/**
* 删除学院信息
* @param thisId
* @return
*/
public SysDepartment del(Integer id);
/**
* 打开修改学院信息页面
* @param id
* @return
*/
public SysDepartment findById(Integer id);
/**
* 修改学院信息
* @param model
* @return
*/
public SysDepartment edit(SysDepartment model);
/**
* 查询所有院系信息
* @return
* @author 黎艺侠
* @data 2017.7.8
*/
public List<SysDepartment> findAllSysDepartmentList();
/**
* 通过DeptName查询SysDepartment
* @return
* @author 黎艺侠
* @data 2017.7.8
*/
public SysDepartment findSysDepartmentByDeptName(String deptName);
/**
* 通过DeptNumber查询SysDepartment
* @return
* @author 何金燕
* @data 2017.7.15
*/
public SysDepartment findSysDepartmentByDeptNumber(String deptNumber);
/**
* 通过StudentResult(学生结果集)查询院系信息存入列表
* @param data
* @author 黎艺侠
* @data 2017.7.9
*/
public List<SysDepartment> findSysDepartmentListByStudentResult(List<SysStudent> data);
/**
* 学院编号和名称查重
* @author 何金燕
* @date 2017.7.10
* @param model
* @return
*/
public List<SysDepartment> findByExample(SysDepartment model);
/**
* 查询所有学院信息
* @author hjy
* @date 2017.7.10
* @param data
* @return
*/
public List<SysDepartment> findSysDepartmentListByMajorResult(List<SysDepartment> data);
}
| [
"biaogejiushibiao@outlook.com"
] | biaogejiushibiao@outlook.com |
55ffae6cd6905df8123eaea378bcb95e291479d2 | 962beabf61c4b23519937d0f4120ac2ab2f78672 | /src/main/java/io/reactivex/internal/operators/observable/ObservableDefer.java | b0b6e9052e97947f3f791611733d4af803e786ee | [
"Apache-2.0"
] | permissive | kiranu1024/RxJava-framework | bafc16c460fb6aad1db2e328a8437f48530d35d2 | ed268e487d6a411f1e4b1e8d618a8b92a4e957d1 | refs/heads/master | 2020-06-18T06:42:41.345654 | 2019-07-10T12:35:08 | 2019-07-10T12:35:08 | 196,200,410 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,578 | java | /**
* Copyright (c) 2016-present, RxJava Contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See
* the License for the specific language governing permissions and limitations under the License.
*/
package io.reactivex.internal.operators.observable;
import io.reactivex.*;
import io.reactivex.exceptions.Exceptions;
import io.reactivex.functions.Supplier;
import io.reactivex.internal.disposables.EmptyDisposable;
import io.reactivex.internal.functions.ObjectHelper;
public final class ObservableDefer<T> extends Observable<T> {
final Supplier<? extends ObservableSource<? extends T>> supplier;
public ObservableDefer(Supplier<? extends ObservableSource<? extends T>> supplier) {
this.supplier = supplier;
}
@Override
public void subscribeActual(Observer<? super T> observer) {
ObservableSource<? extends T> pub;
try {
pub = ObjectHelper.requireNonNull(supplier.get(), "The supplier returned a null ObservableSource");
} catch (Throwable t) {
Exceptions.throwIfFatal(t);
EmptyDisposable.error(t, observer);
return;
}
pub.subscribe(observer);
}
}
| [
"satyakiran.vakada@gmail.com"
] | satyakiran.vakada@gmail.com |
4d38ae448f46d591459cfaf5ee92046e068b407b | b4075f3cabb60a9e2741f9e83835021c6a7e1aee | /src/main/java/com/ruolan/kotlinserver/controller/GoodsController.java | 92c325b66fe0980ff85d32c2b78d79a7bba50d38 | [] | no_license | wuyinlei/kotlinserver | 7530469da0d0d927c51f4f7734c525ebbbf6f377 | 0207d410584ee4ae2918dbdf8e280586085fd4eb | refs/heads/master | 2021-05-12T01:17:16.393890 | 2018-02-08T08:29:10 | 2018-02-08T08:29:10 | 117,556,003 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,686 | java | package com.ruolan.kotlinserver.controller;
import com.ruolan.kotlinserver.common.Constants;
import com.ruolan.kotlinserver.domain.GetGoodsDetailRequest;
import com.ruolan.kotlinserver.domain.GetGoodsListByKeywordRequest;
import com.ruolan.kotlinserver.domain.GetGoodsListRequest;
import com.ruolan.kotlinserver.domain.base.BaseResponse;
import com.ruolan.kotlinserver.model.GoodsInfo;
import com.ruolan.kotlinserver.model.GoodsSku;
import com.ruolan.kotlinserver.service.GoodsService;
import com.ruolan.kotlinserver.utils.YuanFenConverter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.Arrays;
import java.util.List;
@Controller
@EnableAutoConfiguration
@RequestMapping(produces = {"application/json;charset=UTF-8"}, value = {"/goods"})
public class GoodsController {
@Autowired
private GoodsService goodsService;
/**
* 获取到商品列表 通过商品id 和 页数
*
* @param req GetGoodsListRequest
* @return
*/
@RequestMapping(value = {"/getgoodslist"}, method = RequestMethod.POST)
@ResponseBody
public BaseResponse<List<GoodsInfo>> getGoodsList(@RequestBody GetGoodsListRequest req) {
BaseResponse resp = new BaseResponse();
List<GoodsInfo> list = this.goodsService.getGoodsList(req.getCategoryId(), req.getPageNo());
if ((list == null) || (list.size() == 0)) {
resp.setStatus(Constants.CODE.ERROR_CODE);
resp.setMessage(Constants.MESSAGE.CATEGORY_LIST_EMPTY);
return resp;
}
for (GoodsInfo info : list) {
info.setGoodsDefaultPrice(YuanFenConverter.changeY2F(info.getGoodsDefaultPrice()));
info.setMaxPage(Integer.valueOf(this.goodsService.getAllGoodsList(req.getCategoryId()).size() / 6 + 1));
}
resp.setStatus(Constants.CODE.SUCCESS_CODE);
resp.setMessage(Constants.MESSAGE.CATEGORY_LIST_SUCCESS);
resp.setData(list);
return resp;
}
/**
* 获取到商品详情信息
*
* @param req
* @return
*/
@RequestMapping(value = {"/getgoodsdetail"}, method = RequestMethod.POST)
@ResponseBody
public BaseResponse<GoodsInfo> getGoodsDetail(@RequestBody GetGoodsDetailRequest req) {
BaseResponse resp = new BaseResponse();
GoodsInfo goodsInfo = this.goodsService.getGoodsDetail(req.getGoodsId());
if (goodsInfo == null) {
resp.setStatus(Constants.CODE.ERROR_CODE);
resp.setMessage(Constants.MESSAGE.CATEGORY_LIST_EMPTY);
return resp;
}
goodsInfo.setGoodsDefaultPrice(YuanFenConverter.changeY2F(goodsInfo.getGoodsDefaultPrice()));
List<GoodsSku> skuList = this.goodsService.getGoodsSkuList(goodsInfo.getId());
for (GoodsSku sku : skuList) {
sku.setSkuTitle(sku.getGoodsSkuTitle());
sku.setSkuContent(Arrays.asList(sku.getGoodsSkuContent().split(",")));
}
goodsInfo.setGoodsSku(skuList);
resp.setStatus(Constants.CODE.SUCCESS_CODE);
resp.setMessage(Constants.MESSAGE.CATEGORY_DETAIL_SUCCESS);
resp.setData(goodsInfo);
return resp;
}
/**
* 模糊查询商品
*
* @param req
* @return
*/
@RequestMapping(value = {"/getgoodsbykeyword"}, method = {org.springframework.web.bind.annotation.RequestMethod.POST})
@ResponseBody
public BaseResponse<List<GoodsInfo>> getGoodsListByKeyword(@RequestBody GetGoodsListByKeywordRequest req) {
BaseResponse resp = new BaseResponse();
List<GoodsInfo> list = this.goodsService.getGoodsListByKeyword(req.getKeyword(), req.getPageNo());
if ((list == null) || (list.size() == 0)) {
resp.setStatus(Constants.CODE.ERROR_CODE);
resp.setMessage(Constants.MESSAGE.CATEGORY_LIST_EMPTY);
return resp;
}
for (GoodsInfo info : list) {
info.setGoodsDefaultPrice(YuanFenConverter.changeY2F(info.getGoodsDefaultPrice()));
info.setMaxPage(Integer.valueOf(this.goodsService.getAllByKeyword(req.getKeyword()).size() / 6 + 1));
}
resp.setStatus(Constants.CODE.SUCCESS_CODE);
resp.setMessage(Constants.MESSAGE.CATEGORY_LIST_SUCCESS);
resp.setData(list);
return resp;
}
}
| [
"wuyinlei19931118@hotmail.com"
] | wuyinlei19931118@hotmail.com |
08ef7185659ceec7592fc46591d9c27ee21b73a6 | fb36022b6ac447c5fea7a59bacf826f599bcd276 | /src/main/java/com/mbb/coffee/config/StaticResourcesWebConfiguration.java | 43c65964e70cfaee02bf61b68de0d44e9a718240 | [] | no_license | mbieriko/coffee-registry | 431fa667e3550ff997734bb655398c28d4835454 | 2df3092a05c616efb75d6531598a7fe1ecb1b10d | refs/heads/main | 2023-04-27T03:21:47.340892 | 2021-04-27T13:23:24 | 2021-04-27T13:23:24 | 362,120,728 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,148 | java | package com.mbb.coffee.config;
import java.util.concurrent.TimeUnit;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.http.CacheControl;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import tech.jhipster.config.JHipsterConstants;
import tech.jhipster.config.JHipsterProperties;
@Configuration
@Profile({ JHipsterConstants.SPRING_PROFILE_PRODUCTION })
public class StaticResourcesWebConfiguration implements WebMvcConfigurer {
protected static final String[] RESOURCE_LOCATIONS = new String[] {
"classpath:/static/app/",
"classpath:/static/content/",
"classpath:/static/i18n/",
};
protected static final String[] RESOURCE_PATHS = new String[] { "/app/*", "/content/*", "/i18n/*" };
private final JHipsterProperties jhipsterProperties;
public StaticResourcesWebConfiguration(JHipsterProperties jHipsterProperties) {
this.jhipsterProperties = jHipsterProperties;
}
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
ResourceHandlerRegistration resourceHandlerRegistration = appendResourceHandler(registry);
initializeResourceHandler(resourceHandlerRegistration);
}
protected ResourceHandlerRegistration appendResourceHandler(ResourceHandlerRegistry registry) {
return registry.addResourceHandler(RESOURCE_PATHS);
}
protected void initializeResourceHandler(ResourceHandlerRegistration resourceHandlerRegistration) {
resourceHandlerRegistration.addResourceLocations(RESOURCE_LOCATIONS).setCacheControl(getCacheControl());
}
protected CacheControl getCacheControl() {
return CacheControl.maxAge(getJHipsterHttpCacheProperty(), TimeUnit.DAYS).cachePublic();
}
private int getJHipsterHttpCacheProperty() {
return jhipsterProperties.getHttp().getCache().getTimeToLiveInDays();
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
20b199bceade55a6fbebf23cf97c6d80629c2d66 | 683006be97495d4d480f2d83cf0ee5e701853507 | /atom-game-engine/src/main/java/net/vpc/gaming/atom/extension/strategy/Entity.java | 88bcd267fcae1309e20678c3c0b9a6f901022c4d | [] | no_license | otoukebri/atom | 0a74d360ec35e0e4eff92dce3858bffd4cf2fcbc | a639837defb7ca958922f435f3b3d4435cc27812 | refs/heads/master | 2021-01-12T03:30:56.848858 | 2016-10-27T22:54:19 | 2016-10-27T22:54:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 575 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package net.vpc.gaming.atom.extension.strategy;
import net.vpc.gaming.atom.model.DefaultSprite;
import net.vpc.gaming.atom.model.SpriteAction;
/**
* @author Taha Ben Salah (taha.bensalah@gmail.com)
*/
public class Entity extends DefaultSprite {
private SpriteAction[] actions = new SpriteAction[0];
public SpriteAction[] getActions() {
return actions;
}
public void setActions(SpriteAction[] actions) {
this.actions = actions;
}
}
| [
"canard77"
] | canard77 |
1dce2c86e030cc9197bfade6fc7d177fc20bd1da | 6cef7fc78cc935f733f3707fca94776effb94875 | /pcap/kraken-smb-decoder/src/main/java/org/krakenapps/pcap/decoder/smb/response/CloseAndTreeDiscResponse.java | 9b533555cf036f9dde22309ef7386e4cdd463eaa | [] | no_license | xeraph/kraken | 1a5657d837caeaa8c6c045b24cd309d7184fd5b5 | a2b6fe120b5c7d7cde0309ec1d4c3335abef17a1 | refs/heads/master | 2021-01-20T23:36:48.613826 | 2013-01-15T01:03:44 | 2013-01-15T01:03:44 | 7,766,261 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 627 | java | package org.krakenapps.pcap.decoder.smb.response;
import org.krakenapps.pcap.decoder.smb.structure.SmbData;
// 0x31
public class CloseAndTreeDiscResponse implements SmbData{
boolean malformed = false;
@Override
public boolean isMalformed() {
// TODO Auto-generated method stub
return malformed;
}
@Override
public void setMalformed(boolean malformed) {
this.malformed = malformed;
}
@Override
public String toString(){
return String.format("First Level : Close And Tree Disc Response\n" +
"isMalformed = %s\n",
this.malformed);
}
//no use
// return STATUS_NOT_IMPLEMETED
}
| [
"devnull@localhost"
] | devnull@localhost |
85e664d917d12c8a5292f90262894b0650cb2e21 | 47b71ff8a12367c10573e58289d6abbd41c2436f | /android/packages/apps/Browser/src/com/android/browser/BrowserPreferencesPage.java | f3265a8d6b2696e24076866284eff7fcee01c155 | [
"Apache-2.0"
] | permissive | BPI-SINOVOIP/BPI-A31S-Android | d567fcefb8881bcca67f9401c5a4cfa875df5640 | ed63ae00332d2fdab22efc45a4a9a46ff31b8180 | refs/heads/master | 2022-11-05T15:39:21.895636 | 2017-04-27T16:58:45 | 2017-04-27T16:58:45 | 48,844,096 | 2 | 4 | null | 2022-10-28T10:10:24 | 2015-12-31T09:34:31 | null | UTF-8 | Java | false | false | 4,119 | java | /*
* Copyright (C) 2008 The Android Open Source Project
*
* 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.android.browser;
import android.app.ActionBar;
import android.content.Intent;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.view.MenuItem;
import com.android.browser.preferences.BandwidthPreferencesFragment;
import com.android.browser.preferences.DebugPreferencesFragment;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
public class BrowserPreferencesPage extends PreferenceActivity {
public static final String CURRENT_PAGE = "currentPage";
private List<Header> mHeaders;
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
android.util.Log.i("tag","~~~~~~~~~~~~~~~~~~~~~~~~~~~");
ActionBar actionBar = getActionBar();
if (actionBar != null) {
actionBar.setDisplayOptions(
ActionBar.DISPLAY_HOME_AS_UP, ActionBar.DISPLAY_HOME_AS_UP);
}
}
/**
* Populate the activity with the top-level headers.
*/
@Override
public void onBuildHeaders(List<Header> target) {
loadHeadersFromResource(R.xml.preference_headers, target);
if (BrowserSettings.getInstance().isDebugEnabled()) {
Header debug = new Header();
debug.title = getText(R.string.pref_development_title);
debug.fragment = DebugPreferencesFragment.class.getName();
target.add(debug);
}
mHeaders = target;
}
@Override
public Header onGetInitialHeader() {
String action = getIntent().getAction();
if (Intent.ACTION_MANAGE_NETWORK_USAGE.equals(action)) {
String fragName = BandwidthPreferencesFragment.class.getName();
for (Header h : mHeaders) {
if (fragName.equals(h.fragment)) {
return h;
}
}
}
return super.onGetInitialHeader();
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
if (getFragmentManager().getBackStackEntryCount() > 0) {
getFragmentManager().popBackStack();
} else {
finish();
}
return true;
}
return false;
}
@Override
public Intent onBuildStartFragmentIntent(String fragmentName, Bundle args,
int titleRes, int shortTitleRes) {
Intent intent = super.onBuildStartFragmentIntent(fragmentName, args,
titleRes, shortTitleRes);
String url = getIntent().getStringExtra(CURRENT_PAGE);
intent.putExtra(CURRENT_PAGE, url);
return intent;
}
private static final Set<String> sKnownFragments = new HashSet<String>(Arrays.asList(
"com.android.browser.preferences.GeneralPreferencesFragment",
"com.android.browser.preferences.PrivacySecurityPreferencesFragment",
"com.android.browser.preferences.AccessibilityPreferencesFragment",
"com.android.browser.preferences.AdvancedPreferencesFragment",
"com.android.browser.preferences.BandwidthPreferencesFragment",
"com.android.browser.preferences.LabPreferencesFragment",
"com.android.browser.preferences.BrowserModeFragment"));
@Override
protected boolean isValidFragment(String fragmentName) {
return sKnownFragments.contains(fragmentName);
}
}
| [
"mingxin.android@gmail.com"
] | mingxin.android@gmail.com |
eda89b64228e6690897e037d5dc6a0243fbb9d2e | c04ae184e85a6b60fadfc8ff87677ace7382fdcb | /day15/src/com/itheima/servlet/ImageCodeServlet.java | b86cda1d3e863adb1be7a9b3f92f843ff878423e | [] | no_license | qq756585379/JAVA_Study | 18f169a106ddee234771597194aa721e77f73070 | bb23f057df4b4e64c87b6df663ef1247fd6491b6 | refs/heads/master | 2021-09-07T23:28:07.802365 | 2018-03-03T02:31:56 | 2018-03-03T02:31:56 | 109,259,656 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 972 | java | package com.itheima.servlet;
import cn.dsna.util.images.ValidateCode;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
public class ImageCodeServlet extends HttpServlet {
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
// 控制客户端不要缓存,不然随机验证码就不会变
// resp.setHeader("Cache-Control", "no-cache");
// resp.setHeader("Pragma", "no-cache");
// resp.setDateHeader("Expires", -1);
//使用第三方jar
ValidateCode vc = new ValidateCode(110, 25, 4, 9);
vc.write(resp.getOutputStream());
}
protected void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
doGet(req, resp);
}
}
| [
"756585379@qq.com"
] | 756585379@qq.com |
e50f3ea7bbb0f5902962054c551b428e0b5b8a68 | 53d677a55e4ece8883526738f1c9d00fa6560ff7 | /com/tencent/mm/plugin/expt/b/a$4$1.java | e93992f23bd88f44d30c44956c5f0dd1ffee974d | [] | no_license | 0jinxing/wechat-apk-source | 544c2d79bfc10261eb36389c1edfdf553d8f312a | f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d | refs/heads/master | 2020-06-07T20:06:03.580028 | 2019-06-21T09:17:26 | 2019-06-21T09:17:26 | 193,069,132 | 9 | 4 | null | null | null | null | UTF-8 | Java | false | false | 494 | java | package com.tencent.mm.plugin.expt.b;
import com.tencent.matrix.trace.core.AppMethodBeat;
final class a$4$1
implements Runnable
{
a$4$1(a.4 param4)
{
}
public final void run()
{
AppMethodBeat.i(73489);
a.va(2);
AppMethodBeat.o(73489);
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes6-dex2jar.jar
* Qualified Name: com.tencent.mm.plugin.expt.b.a.4.1
* JD-Core Version: 0.6.2
*/ | [
"172601673@qq.com"
] | 172601673@qq.com |
172769f7ae079dac00d3bc39b47c2f003f0f0a0b | 5b9a04d3c911c16aba63258d48606d6ea364a6da | /distribution_market/modules/market/app/dto/marketing/promotion/condt/value/ShoppingCartTotalWeight.java | cf7414f7c24eed8b008f0fe2528edf6af3cab04e | [
"Apache-2.0"
] | permissive | yourant/repository1 | 40fa5ce602bbcad4e6f61ad6eb1330cfe966f780 | 9ab74a2dfecc3ce60a55225e39597e533975a465 | refs/heads/master | 2021-12-15T04:22:23.009473 | 2017-07-28T06:06:35 | 2017-07-28T06:06:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,385 | java | package dto.marketing.promotion.condt.value;
import dto.marketing.promotion.ConditionMatchResult;
import dto.marketing.promotion.OrderPromotionActivityDto;
import entity.marketing.promotion.ConditionInstanceExt;
import entity.marketing.promotion.ConditionJudgementType;
/**
* 购物车总重量
*
* @author huangjc
* @date 2016年7月29日
*/
public class ShoppingCartTotalWeight extends BaseCondtValue {
/*
* { "minWeight":1, "maxWeight":2 }
*/
// 当不是区间时,只有minWeight才有值
private double minWeight = 0.0;
private double maxWeight = 0.0;
public double getMinWeight() {
return minWeight;
}
public void setMinWeight(double minWeight) {
this.minWeight = minWeight;
}
public double getMaxWeight() {
return maxWeight;
}
public void setMaxWeight(double maxWeight) {
this.maxWeight = maxWeight;
}
@Override
public String toString() {
return "ShoppingCartTotalWeight [minWeight=" + minWeight
+ ", maxWeight=" + maxWeight + "]";
}
@Override
public ConditionMatchResult handle(String condtJgmntType, ConditionInstanceExt condtInstExt,
OrderPromotionActivityDto dtoArg) {
ConditionMatchResult dto = new ConditionMatchResult();
dto.setMatched(false);
double otherTotalWeight = dtoArg.getTotalWeight();
switch (condtJgmntType) {
case ConditionJudgementType.JTYPE_GT:// 大于
if (minWeight < otherTotalWeight) {
dto.setMatched(true);
return dto;
}
break;
case ConditionJudgementType.JTYPE_LT:// 小于
if (minWeight > otherTotalWeight) {
dto.setMatched(true);
return dto;
}
break;
case ConditionJudgementType.JTYPE_GTEQ:// 大于等于
if (minWeight <= otherTotalWeight) {
dto.setMatched(true);
return dto;
}
break;
case ConditionJudgementType.JTYPE_LTEQ:// 小于等于
if (minWeight >= otherTotalWeight) {
dto.setMatched(true);
return dto;
}
break;
case ConditionJudgementType.JTYPE_YES:// 是
if (minWeight == otherTotalWeight) {
dto.setMatched(true);
return dto;
}
break;
case ConditionJudgementType.JTYPE_LTV:// 区间
if (minWeight <= otherTotalWeight && otherTotalWeight < maxWeight) {
dto.setMatched(true);
return dto;
}
break;
case ConditionJudgementType.JTYPE_NO:// 非
if (minWeight != otherTotalWeight) {
dto.setMatched(true);
return dto;
}
break;
}
return dto;
}
}
| [
"3002781863@qq.com"
] | 3002781863@qq.com |
2c41b17826d6985cf76e3fe55517b240795f2db8 | bbe9db564e53765e28ef91934dc3e4de4e1b9f01 | /tlatools/test/tlc2/tool/AssignmentInitExpensiveTest.java | 9b77099a895b357cbac1cec687357025988ba648 | [
"MIT"
] | permissive | softagram/tlaplus | b0bb5f8be64445977442386a699c575aa54de238 | f12b10e796f775c10b764b3c0afdde0bcc328620 | refs/heads/master | 2020-04-08T16:26:47.631771 | 2018-11-27T00:21:18 | 2018-11-27T00:21:18 | 159,518,788 | 0 | 0 | MIT | 2018-11-28T14:58:40 | 2018-11-28T14:57:15 | Java | UTF-8 | Java | false | false | 2,075 | java | /*******************************************************************************
* Copyright (c) 2017 Microsoft Research. All rights reserved.
*
* The MIT License (MIT)
*
* 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.
*
* Contributors:
* Markus Alexander Kuppe - initial API and implementation
******************************************************************************/
package tlc2.tool;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import tlc2.output.EC;
import tlc2.tool.liveness.ModelCheckerTestCase;
public class AssignmentInitExpensiveTest extends ModelCheckerTestCase {
public AssignmentInitExpensiveTest() {
super("AssignmentInitExpensive");
}
@Test
public void test() {
assertTrue(recorder.recorded(EC.TLC_FINISHED));
assertFalse(recorder.recorded(EC.GENERAL));
assertTrue(recorder.recordedWithStringValues(EC.TLC_STATS, "10002", "1", "0"));
assertCoverage(" line 15, col 33 to line 15, col 33 of module AssignmentInitExpensive: 1");
}
}
| [
"tlaplus.net@lemmster.de"
] | tlaplus.net@lemmster.de |
f8d1cc9ff15a59e1b7b72f90b312fe36b2ea472b | 2759a2dfa734924247ba814a47fb03dbc2898b9b | /app/src/main/java/com/polyhose/data/model/response/Customers.java | 8f3708c864264b2513980c2f818033121ef24fe1 | [] | no_license | KarthikDigit/ployhose | e3278c996f3d7282a089b74c4151a2f4c3d7e7a4 | 24adb8cbd1fa2641cb15ae03247a442f49809c95 | refs/heads/master | 2020-06-22T12:35:17.587565 | 2019-08-01T06:48:59 | 2019-08-01T06:48:59 | 197,715,975 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,036 | java | package com.polyhose.data.model.response;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
public class Customers implements Serializable {
@SerializedName("customer_ID")
@Expose
private Integer customerID;
@SerializedName("customer_name")
@Expose
private String customerName;
@SerializedName("customer_type")
@Expose
private String customerType;
@SerializedName("industry")
@Expose
private String industry;
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof Customers)) return false;
Customers customers = (Customers) o;
if (customerID != null ? !customerID.equals(customers.customerID) : customers.customerID != null)
return false;
return customerName != null ? customerName.equals(customers.customerName) : customers.customerName == null;
}
@Override
public int hashCode() {
int result = customerID != null ? customerID.hashCode() : 0;
result = 31 * result + (customerName != null ? customerName.hashCode() : 0);
return result;
}
private final static long serialVersionUID = 2516522577209472437L;
public Integer getCustomerID() {
return customerID;
}
public void setCustomerID(Integer customerID) {
this.customerID = customerID;
}
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
public String getCustomerType() {
return customerType;
}
public void setCustomerType(String customerType) {
this.customerType = customerType;
}
public String getIndustry() {
return industry;
}
public void setIndustry(String industry) {
this.industry = industry;
}
@Override
public String toString() {
return customerName;
}
}
| [
"kapw001@gmail.com"
] | kapw001@gmail.com |
de9ef545e8344b25fb23a3f2ce0c3bade1eb36e4 | 129f58086770fc74c171e9c1edfd63b4257210f3 | /src/testcases/CWE369_Divide_by_Zero/CWE369_Divide_by_Zero__int_connect_tcp_modulo_68b.java | 791a0d7f044c489c7bdc7d281a4316c0d99ecf9a | [] | no_license | glopezGitHub/Android23 | 1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba | 6215d0684c4fbdc7217ccfbedfccfca69824cc5e | refs/heads/master | 2023-03-07T15:14:59.447795 | 2023-02-06T13:59:49 | 2023-02-06T13:59:49 | 6,856,387 | 0 | 3 | null | 2023-02-06T18:38:17 | 2012-11-25T22:04:23 | Java | UTF-8 | Java | false | false | 2,071 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE369_Divide_by_Zero__int_connect_tcp_modulo_68b.java
Label Definition File: CWE369_Divide_by_Zero__int.label.xml
Template File: sources-sinks-68b.tmpl.java
*/
/*
* @description
* CWE: 369 Divide by zero
* BadSource: connect_tcp Read data using an outbound tcp connection
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: modulo
* GoodSink: Check for zero before modulo
* BadSink : Modulo by a value that may be zero
* Flow Variant: 68 Data flow: data passed as a member variable in the "a" class, which is used by a method in another class in the same package
*
* */
package testcases.CWE369_Divide_by_Zero;
import testcasesupport.*;
import java.sql.*;
import javax.servlet.http.*;
import java.security.SecureRandom;
public class CWE369_Divide_by_Zero__int_connect_tcp_modulo_68b
{
public void bad_sink() throws Throwable
{
int data = CWE369_Divide_by_Zero__int_connect_tcp_modulo_68a.data;
/* POTENTIAL FLAW: Zero modulus will cause an issue. An integer division will
result in an exception. */
IO.writeLine("100%" + String.valueOf(data) + " = " + (100 % data) + "\n");
}
/* goodG2B() - use goodsource and badsink */
public void goodG2B_sink() throws Throwable
{
int data = CWE369_Divide_by_Zero__int_connect_tcp_modulo_68a.data;
/* POTENTIAL FLAW: Zero modulus will cause an issue. An integer division will
result in an exception. */
IO.writeLine("100%" + String.valueOf(data) + " = " + (100 % data) + "\n");
}
/* goodB2G() - use badsource and goodsink */
public void goodB2G_sink() throws Throwable
{
int data = CWE369_Divide_by_Zero__int_connect_tcp_modulo_68a.data;
/* FIX: test for a zero modulus */
if( data != 0 )
{
IO.writeLine("100%" + String.valueOf(data) + " = " + (100 % data) + "\n");
}
else
{
IO.writeLine("This would result in a modulo by zero");
}
}
}
| [
"guillermo.pando@gmail.com"
] | guillermo.pando@gmail.com |
606be41b7eda4591f425363c9ee8d0d731848ef0 | 350c74fda7329a734a63a5d642b32158afb9ba4f | /SpigotViolet/src/api/java/net/minecraft/server/v1_8_R3/PlayerConnection.java | 23227d02646e56a8cb1c43a8b4a54a66fc4e49f2 | [
"MIT"
] | permissive | Himmelt/Violet | 0a2e74b57b43437496bdbdb1c6cf7dd35ed6b1ca | 106260cc134f9b737a67ac5b97317af0ccd308bc | refs/heads/master | 2021-04-18T19:34:26.055396 | 2020-02-12T14:37:51 | 2020-02-12T14:37:51 | 126,700,212 | 4 | 0 | MIT | 2020-02-06T16:06:07 | 2018-03-25T13:29:02 | Java | UTF-8 | Java | false | false | 167 | java | package net.minecraft.server.v1_8_R3;
/**
* @author Himmelt
*/
public abstract class PlayerConnection {
public abstract void sendPacket(final Packet packet);
}
| [
"master@void-3.cn"
] | master@void-3.cn |
9cf54199b4125c832a8dd506101ca1dcfc698683 | 419ca0594e4edffde50ccd8b5d763c9462d651ab | /src/test/java/TestSuite.java | 4ffeca43514b753a1502200f6ffec0421a99d745 | [
"MIT"
] | permissive | TeamDevintia/DevAthlon3 | 255946e8b13e4fbd95a757ea5080e40fafc7e4d2 | 127297722cb7705bf50febbd936ead4c912454c1 | refs/heads/master | 2020-12-23T09:58:34.009011 | 2016-07-17T09:40:27 | 2016-07-17T09:40:27 | 62,297,663 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 560 | java | import io.github.teamdevintia.magicpotions.DirectionUtilTest;
import org.junit.Test;
import org.junit.runners.Suite;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
/**
* Test suite for all tests
*
* @author MiniDigger
*/
@Suite.SuiteClasses(value = {DirectionUtilTest.class})
public class TestSuite {
@Test
public void testTest() {
// unit testing minecraft is hard...
assertThat(thisTestIsUseless(), is(true));
}
private boolean thisTestIsUseless(){
return true;
}
}
| [
"admin@minidigger.me"
] | admin@minidigger.me |
ff9bc2088fa125e0da241bcc76f24c0afa538886 | 59bb79b2ca0f4bfc46a439b3fa434cb1912e0ef8 | /src/main/java/com/github/abel533/echarts/series/K.java | 7315ea5533d9d5c0e0bc97193c2ee83f0e3884c0 | [
"MIT"
] | permissive | tanbinh123/ECharts | 7c961d7f7497174ca46cc19fada4eba478c32473 | f02b59b7c6c12a356cadd25dcd630d82bc5416b6 | refs/heads/master | 2022-02-13T00:27:11.469306 | 2017-04-16T21:41:36 | 2017-04-16T21:41:36 | 456,741,573 | 1 | 0 | MIT | 2022-02-08T01:34:35 | 2022-02-08T01:34:35 | null | UTF-8 | Java | false | false | 1,364 | java | /*
* The MIT License (MIT)
*
* Copyright (c) 2014-2015 abel533@gmail.com
*
* 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 com.github.abel533.echarts.series;
/**
* Description: K
*
* @author liuzh
*/
public class K extends Candlestick {
public K() {
}
public K(String name) {
super(name);
}
}
| [
"abel533@gmail.com"
] | abel533@gmail.com |
51d80c9e246d26145fb2b5a31c5106b073b169e6 | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XWIKI-14122-30-28-FEMO-WeightedSum:TestLen:CallDiversity/org/xwiki/extension/xar/internal/handler/packager/Packager_ESTest.java | 6ca5612e11a71daefae9a385a9c8249c0fea82e9 | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 572 | java | /*
* This file was automatically generated by EvoSuite
* Sun Apr 05 12:32:48 UTC 2020
*/
package org.xwiki.extension.xar.internal.handler.packager;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class Packager_ESTest extends Packager_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
e4388e81ac6556b3f33ede50f278f6161fbea601 | 18a82c0cb2ec0d2283947e8b539704ef94ff6aa6 | /src/main/java/com/example/bddspring1568287359/DemoApplication.java | 30e64b8884d183c731e8e7149ed80a2a8f307e78 | [] | no_license | cb-kubecd/bdd-spring-1568287359 | d1f1b337f1d49b6e0bc4a905a448d52664a3d942 | 38a937bf21e4bfc814814847dd6ad3b3407cb8ec | refs/heads/master | 2020-07-24T20:06:35.076282 | 2019-09-12T11:23:09 | 2019-09-12T11:23:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 320 | java | package com.example.bddspring1568287359;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
}
| [
"jenkins-x@googlegroups.com"
] | jenkins-x@googlegroups.com |
159e7e64f443dc5406ddd8ceea56e0ffe95f48f4 | cbca464a0be4ee109890cc50325aa227ded8a12a | /src/main/java/org/ihtsdo/otf/snomedboot/domain/rf2/ComponentFieldIndexes.java | 6e060d257e6f2aeb0cfece42bb0809e41b980ef7 | [
"Apache-2.0"
] | permissive | IHTSDO/snomed-boot | 11bbdffa6663bb8bd3ac3f4a2ee67eaa2e6091fe | 68ccd4ac070a2581da2463b91bd6d5a20a35ebd9 | refs/heads/master | 2023-08-18T07:37:49.279423 | 2023-07-07T09:03:21 | 2023-07-07T09:03:21 | 50,213,229 | 10 | 12 | Apache-2.0 | 2021-04-27T09:39:35 | 2016-01-22T23:10:40 | Java | UTF-8 | Java | false | false | 219 | java | package org.ihtsdo.otf.snomedboot.domain.rf2;
public interface ComponentFieldIndexes {
// id effectiveTime active moduleId
// 0 1 2 3
int id = 0;
int effectiveTime = 1;
int active = 2;
int moduleId = 3;
}
| [
"kaikewley@gmail.com"
] | kaikewley@gmail.com |
74237893e4b6bd519f7e1af87bcfc4144c008e1f | 24d8cf871b092b2d60fc85d5320e1bc761a7cbe2 | /DrJava/rev5319-5332/left-trunk-5332/src/edu/rice/cs/drjava/config/FileListProperty.java | b62c5562a9143eb5b769ba1d045af6befcb2207f | [] | no_license | joliebig/featurehouse_fstmerge_examples | af1b963537839d13e834f829cf51f8ad5e6ffe76 | 1a99c1788f0eb9f1e5d8c2ced3892d00cd9449ad | refs/heads/master | 2016-09-05T10:24:50.974902 | 2013-03-28T16:28:47 | 2013-03-28T16:28:47 | 9,080,611 | 3 | 2 | null | null | null | null | UTF-8 | Java | false | false | 2,383 | java |
package edu.rice.cs.drjava.config;
import edu.rice.cs.util.FileOps;
import java.util.HashSet;
import java.util.List;
import java.io.File;
import java.io.IOException;
import edu.rice.cs.util.StringOps;
public abstract class FileListProperty extends DrJavaProperty {
protected String _sep;
protected String _dir;
public FileListProperty(String name, String sep, String dir, String help) {
super(name, help);
_sep = sep;
_dir = dir;
resetAttributes();
}
public void invalidate() {
invalidateOthers(new HashSet<DrJavaProperty>());
}
public boolean isCurrent() { return false; }
protected abstract List<File> getList(PropertyMaps pm);
public void update(PropertyMaps pm) {
String quot = "";
String q = _attributes.get("squote");
if (q != null) {
if (q.toLowerCase().equals("true")) { quot = "'"; }
}
q = _attributes.get("dquote");
if (q != null) {
if (q.toLowerCase().equals("true")) { quot = "\"" + quot; }
}
List<File> l = getList(pm);
if (l.size() == 0) { _value = ""; return; }
StringBuilder sb = new StringBuilder();
for(File fil: l) {
sb.append(StringOps.replaceVariables(_attributes.get("sep"), pm, PropertyMaps.GET_CURRENT));
try {
String f = fil.toString();
if (_attributes.get("rel").equals("/")) f = fil.getAbsolutePath();
else {
File rf = new File(StringOps.
unescapeFileName(StringOps.replaceVariables(_attributes.get("rel"),
pm,
PropertyMaps.GET_CURRENT)));
f = FileOps.stringMakeRelativeTo(fil, rf);
}
String s = edu.rice.cs.util.StringOps.escapeFileName(f);
sb.append(quot);
sb.append(s);
sb.append(quot);
}
catch(IOException e) { }
catch(SecurityException e) { }
}
_value = sb.toString();
if (_value.startsWith(_attributes.get("sep"))) {
_value= _value.substring(_attributes.get("sep").length());
}
}
public void resetAttributes() {
_attributes.clear();
_attributes.put("sep", _sep);
_attributes.put("rel", _dir);
_attributes.put("squote", null);
_attributes.put("dquote", null);
}
}
| [
"joliebig@fim.uni-passau.de"
] | joliebig@fim.uni-passau.de |
2146c112d43fa2a2ba4c9d1467e9e9b11efe7b7e | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Math/66/org/apache/commons/math/exception/NoDataException_NoDataException_40.java | fa75c1d5333f1e4873b0b20c21a1c5364b187193 | [] | 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 | 346 | java |
org apach common math except
except thrown requir data miss
version revis date
data except nodataexcept math illeg argument except mathillegalargumentexcept
construct except specif context
param specif contextu inform caus except
data except nodataexcept localiz specif
specif local format localizedformat data
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
2e957dbf2b424496f63ac77054f17663261f9c35 | 1a512c1c818823c44b8efb19009e14bf950dde05 | /project/psychologicalprj/src/com/listenning/controller/ListenListController.java | 0715f60a89d27260289965d65c4aff85ed412b6f | [] | no_license | bao9777/Software | 0af426f09a5ba7e42c2cff86f69ff55996f0c6a2 | b7d12e3074667aab02b6327e8feefe2b2d343e50 | refs/heads/master | 2020-04-01T04:13:44.778795 | 2019-01-04T12:35:45 | 2019-01-04T12:44:56 | 152,854,885 | 0 | 3 | null | null | null | null | UTF-8 | Java | false | false | 4,319 | java | package com.listenning.controller;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import com.entity.Course;
import com.entity.Teacher;
import com.indexing.service.CourseServiceImpl;
import com.indexing.service.TeacherServiceImpl;
import com.util.Page;
@Controller
public class ListenListController {
private Logger logger = Logger.getLogger(ListenListController.class);
@Resource
private TeacherServiceImpl teacherServiceImpl;
@Resource
private CourseServiceImpl courseServiceImpl;
@RequestMapping("/listenList")
public String IndexConrol(HttpSession session, Model model) throws Exception {
int pageNum = 1;
String gender = "default";
String age = "default";
List<Teacher> canListeners = teacherServiceImpl.listListeners(pageNum, Page.PageSize, gender, age);
long totalCount = teacherServiceImpl.countListeners(gender, age);
Page<Teacher> page = new Page<Teacher>();
page.setList(canListeners);
page.setPageNum(pageNum);
page.setPageSize(Page.PageSize);
page.setTotalCount(totalCount);
logger.info("before add.. pageNum : " + pageNum);
model.addAttribute("page", page);
model.addAttribute("pageNum", pageNum);
session.setAttribute("gender", gender);
session.setAttribute("age", age);
return "listen-list";
}
@RequestMapping("/selectListener")
public String selectControl(@RequestParam("gender") String gender, @RequestParam("age") String age,
HttpSession session, Model model) throws Exception {
session.setAttribute("gender", gender);
session.setAttribute("age", age);
List<Teacher> canListeners = teacherServiceImpl.listListeners(1, Page.PageSize, gender, age);
long totalCount = teacherServiceImpl.countListeners(gender, age);
Page<Teacher> page = new Page<Teacher>();
page.setPageNum(1);
page.setList(canListeners);
page.setPageSize(Page.PageSize);
page.setTotalCount(totalCount);
model.addAttribute("page", page);
return "listen-list";
}
@RequestMapping("/nextPage")
public String nextPage(String gender, String age, HttpSession session, Model model, int pageNum) throws Exception {
// 如果gender 和 age 为空
if (gender == null && age == null) {
gender = (String) session.getAttribute("gender");
age = (String) session.getAttribute("age");
}
List<Teacher> canListeners = teacherServiceImpl.listListeners(pageNum, Page.PageSize, gender, age);
long totalCount = teacherServiceImpl.countListeners(gender, age);
Page<Teacher> page = new Page<Teacher>();
page.setPageNum(pageNum);
page.setList(canListeners);
page.setPageSize(Page.PageSize);
page.setTotalCount(totalCount);
model.addAttribute("page", page);
return "listen-list";
}
@RequestMapping("/consulterDetail")
public String consulterDetailController(@RequestParam("id") int id, Model model) {
Teacher t = teacherServiceImpl.findTeacherById(id);
String[] aString = t.getAuthenticationAptitudeName().split(" ");
String[] goodats = t.getGoodats().split(" ");
model.addAttribute("authenticationAptitudeName", Arrays.asList(aString));
model.addAttribute("goodats", Arrays.asList(goodats));
List<Course> courses = courseServiceImpl.listCoursesByTeacherId(id);
model.addAttribute("courses", courses);
model.addAttribute("teacher", t);
return "consulter";
}
@RequestMapping("/consultAppointment")
public String consultAppointmentController1(@RequestParam("id") int id, Model model) {
DateFormat bf = new SimpleDateFormat("yyyy-MM-dd");
Date date1 = new Date();
String format = bf.format(date1);
Teacher t = teacherServiceImpl.findTeacherById(id);
String[] aString = t.getAuthenticationAptitudeName().split(" ");
String[] goodats = t.getGoodats().split(" ");
model.addAttribute("authenticationAptitudeName", Arrays.asList(aString));
model.addAttribute("goodats", Arrays.asList(goodats));
model.addAttribute("teacher", t);
model.addAttribute("format", format);
return "appointment-listening";
}
}
| [
"977702305@qq.com"
] | 977702305@qq.com |
7c62c965524b6d2a6d8fb4fc5b63413b37aceaf4 | 9c39f81e11ff0d5afe86f05c859308484bea1ba8 | /javaworkplace/ZJXL_java/src/ZGUI_2_gui/PanelDemo.java | db393cd65a9c641415c7a4ace56804f878dd51d7 | [
"Apache-2.0"
] | permissive | wapalxj/Java | 647ffae2904f49451a14944f9ac124f141b95c05 | b15c51a91ea3b010ac65f5df4ce6a4e2713a9130 | refs/heads/master | 2022-02-25T19:43:06.360601 | 2022-02-08T07:36:43 | 2022-02-08T07:36:43 | 48,745,260 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 1,065 | java | package ZGUI_2_gui;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class PanelDemo {
static JFrame jframe = new JFrame("Example");
public static void setupFrame() {
jframe.setSize(400,300);
jframe.getContentPane().setLayout( new FlowLayout() );
WindowListener l = new WindowAdapter() {
public void windowClosing(WindowEvent e) {System.exit(0);}
};
jframe.addWindowListener(l);
}
public static void main(String[] args) {
setupFrame();
MyJPanel mjp = new MyJPanel();
jframe.getContentPane().add(mjp);
jframe.setVisible(true);
mjp.requestFocus();
}
}
class MyJPanel extends JPanel {
JLabel jl = new JLabel(new ImageIcon("bmw.jpg"));
//使用代码初始化块
{
add(jl); // instance initializer
addKeyListener( new KeyAdapter() {
public void keyPressed(KeyEvent e) {
char c = e.getKeyChar();
System.out.println("got char "+c);
}
} );
}
}
| [
"wapalxj@163.com"
] | wapalxj@163.com |
49d7b9ec963afc3faa33e92f8452091b9ae91ae7 | 995f73d30450a6dce6bc7145d89344b4ad6e0622 | /Mate20-9.0/src/main/java/com/huawei/wallet/sdk/business/buscard/base/operation/FMSpecialOperation.java | d3825f70fdfd07997dcbffdcc3b119c8f6eaad80 | [] | 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 | 2,476 | java | package com.huawei.wallet.sdk.business.buscard.base.operation;
import android.text.TextUtils;
import com.huawei.wallet.sdk.business.buscard.base.util.AppletCardException;
import com.huawei.wallet.sdk.common.utils.StringUtil;
import java.math.BigInteger;
public class FMSpecialOperation extends Operation {
/* access modifiers changed from: protected */
public String handleData(String data) throws AppletCardException {
if (!StringUtil.isEmpty(this.param, true)) {
return getCardNum(data);
}
throw new AppletCardException(2, " FMSpecialOperation param is null");
}
private String getCardNum(String serialNum) {
if (TextUtils.isEmpty(serialNum) || serialNum.length() <= 7) {
return null;
}
int length = serialNum.length();
String tempInnerNum = new BigInteger(serialNum.substring(length - 8, length), 16).toString(10);
return getInnerNum(tempInnerNum).insert(0, getCheckNum(tempInnerNum)).toString();
}
private StringBuilder getInnerNum(String original) {
if (TextUtils.isEmpty(original)) {
return new StringBuilder("0000000000");
}
char[] nums = original.toCharArray();
int length = nums.length;
StringBuilder sBuilder = new StringBuilder(10);
if (length < 10) {
for (int i = 0; i < 10 - length; i++) {
sBuilder.append("0");
}
}
for (int i2 = length - 1; i2 >= 1; i2 -= 2) {
sBuilder.append(nums[i2 - 1]);
sBuilder.append(nums[i2]);
}
if ((length & 1) == 1) {
sBuilder.append(nums[0]);
}
return sBuilder;
}
private int getCheckNum(String innerNum) {
int checkNum;
int checkNum2 = 0;
if (innerNum == null || innerNum.length() == 0) {
return 0;
}
int length = innerNum.length();
char[] nums = innerNum.toCharArray();
for (int i = length - 1; i >= 0; i--) {
int num = nums[i] - '0';
if ((((length - 1) - i) & 1) == 1) {
checkNum2 += num;
} else {
int num2 = num * 2;
checkNum2 += (num2 / 10) + (num2 % 10);
}
}
if (checkNum2 % 10 == 0) {
checkNum = 0;
} else {
checkNum = (((checkNum2 / 10) + 1) * 10) - checkNum2;
}
return checkNum;
}
}
| [
"dstmath@163.com"
] | dstmath@163.com |
0242890b1ecadea8ebe075badb7c0fc1cc707c93 | fdf0ae1822e66fe01b2ef791e04f7ca0b9a01303 | /src/main/java/ms/html/_htmlMediaNetworkState.java | 97054a87cb24bae050adc95e20f7d4effd08f4ac | [] | no_license | wangguofeng1923/java-ie-webdriver | 7da41509aa858fcd046630f6833d50b7c6cde756 | d0f3cb8acf9be10220c4b85c526486aeb67b9b4f | refs/heads/master | 2021-12-04T18:19:08.251841 | 2013-02-10T16:26:54 | 2013-02-10T16:26:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 765 | java | package ms.html ;
import com4j.*;
/**
*/
public enum _htmlMediaNetworkState implements ComEnum {
/**
* <p>
* The value of this constant is 0
* </p>
*/
htmlMediaNetworkStateEmpty(0),
/**
* <p>
* The value of this constant is 1
* </p>
*/
htmlMediaNetworkStateIdle(1),
/**
* <p>
* The value of this constant is 2
* </p>
*/
htmlMediaNetworkStateLoading(2),
/**
* <p>
* The value of this constant is 3
* </p>
*/
htmlMediaNetworkStateNoSource(3),
/**
* <p>
* The value of this constant is 2147483647
* </p>
*/
htmlMediaNetworkState_Max(2147483647),
;
private final int value;
_htmlMediaNetworkState(int value) { this.value=value; }
public int comEnumValue() { return value; }
}
| [
"schneidh@gmail.com"
] | schneidh@gmail.com |
2f265c7dfae00a257f35c74e594bd0573b0d2f26 | 0343fbdab3fefede00379107b414c0d0c7cd64c3 | /src/main/java/be/ceau/gpodder/Podcast.java | 0b30a19cd36007513cfdeacd186b5e32d0c4abd5 | [
"Apache-2.0"
] | permissive | mdewilde/gpodder-directory-api | 120e0d9dec5fbc207c06bb5533c3a5939ace1ac2 | 4cc9cd569d88136ee2df560b41c2c613afe2957c | refs/heads/master | 2021-01-01T19:21:55.378915 | 2018-10-25T18:50:30 | 2018-10-25T18:50:30 | 98,572,257 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,205 | java | /*
Copyright 2018 Marceau Dewilde <m@ceau.be>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package be.ceau.gpodder;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* A podcast, as returned by gpodder.net's directory API.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class Podcast {
@JsonProperty("url")
private String url;
@JsonProperty("title")
private String title;
@JsonProperty("description")
private String description;
@JsonProperty("subscribers")
private int subscribers;
@JsonProperty("subscribers_last_week")
private int subscribersLastWeek;
@JsonProperty("logo_url")
private String logoUrl;
@JsonProperty("scaled_logo_url")
private String scaledLogoUrl;
@JsonProperty("website")
private String website;
@JsonProperty("mygpo_link")
private String gpodderUrl;
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public int getSubscribers() {
return subscribers;
}
public void setSubscribers(int subscribers) {
this.subscribers = subscribers;
}
public int getSubscribersLastWeek() {
return subscribersLastWeek;
}
public void setSubscribersLastWeek(int subscribersLastWeek) {
this.subscribersLastWeek = subscribersLastWeek;
}
public String getLogoUrl() {
return logoUrl;
}
public void setLogoUrl(String logoUrl) {
this.logoUrl = logoUrl;
}
public String getScaledLogoUrl() {
return scaledLogoUrl;
}
public void setScaledLogoUrl(String scaledLogoUrl) {
this.scaledLogoUrl = scaledLogoUrl;
}
public String getWebsite() {
return website;
}
public void setWebsite(String website) {
this.website = website;
}
public String getGpodderUrl() {
return gpodderUrl;
}
public void setGpodderUrl(String gpodderUrl) {
this.gpodderUrl = gpodderUrl;
}
@Override
public String toString() {
return new StringBuilder()
.append("Podcast [url=")
.append(url)
.append(", title=")
.append(title)
.append(", description=")
.append(description)
.append(", subscribers=")
.append(subscribers)
.append(", subscribersLastWeek=")
.append(subscribersLastWeek)
.append(", logoUrl=")
.append(logoUrl)
.append(", scaledLogoUrl=")
.append(scaledLogoUrl)
.append(", website=")
.append(website)
.append(", gpodderUrl=")
.append(gpodderUrl)
.append("]")
.toString();
}
}
| [
"m@ceau.be"
] | m@ceau.be |
c8c49bf0e0ab956d9c2d581671cf33b5667b2b66 | 31f043184e2839ad5c3acbaf46eb1a26408d4296 | /src/main/java/com/github/highcharts4gwt/model/highcharts/option/mock/seriesarea/marker/MockStates.java | 32909aab32a141b59b47278ed0dd1f7abd2fa1f6 | [] | no_license | highcharts4gwt/highchart-wrapper | 52ffa84f2f441aa85de52adb3503266aec66e0ac | 0a4278ddfa829998deb750de0a5bd635050b4430 | refs/heads/master | 2021-01-17T20:25:22.231745 | 2015-06-30T15:05:01 | 2015-06-30T15:05:01 | 24,794,406 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,396 | java |
package com.github.highcharts4gwt.model.highcharts.option.mock.seriesarea.marker;
import com.github.highcharts4gwt.model.highcharts.option.api.seriesarea.marker.States;
import com.github.highcharts4gwt.model.highcharts.option.api.seriesarea.marker.states.Hover;
import com.github.highcharts4gwt.model.highcharts.option.api.seriesarea.marker.states.Select;
/**
*
*/
public class MockStates
implements States
{
private Hover hover;
private Select select;
private String genericField;
private String functionAsString;
public Hover hover() {
return hover;
}
public MockStates hover(Hover hover) {
this.hover = hover;
return this;
}
public Select select() {
return select;
}
public MockStates select(Select select) {
this.select = select;
return this;
}
public String getFieldAsJsonObject(String fieldName) {
return genericField;
}
public MockStates setFieldAsJsonObject(String fieldName, String fieldValueAsJsonObject) {
this.genericField = fieldValueAsJsonObject;
return this;
}
public String getFunctionAsString(String fieldName) {
return functionAsString;
}
public MockStates setFunctionAsString(String fieldName, String functionAsString) {
this.functionAsString = functionAsString;
return this;
}
}
| [
"ronan.quillevere@gmail.com"
] | ronan.quillevere@gmail.com |
d23e0a5b2277c13306c774b7251b84b68051eafb | 180e78725121de49801e34de358c32cf7148b0a2 | /dataset/protocol1/commons-lang/learning/3724/ConcurrentInitializer.java | 21e4cb20bef84ce3db262f008e7aa7009b501b5e | [] | no_license | ASSERT-KTH/synthetic-checkstyle-error-dataset | 40e8d1e0a7ebe7f7711def96a390891a6922f7bd | 40c057e1669584bfc6fecf789b5b2854660222f3 | refs/heads/master | 2023-03-18T12:50:55.410343 | 2019-01-25T09:54:39 | 2019-01-25T09:54:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,276 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.lang3.concurrent;
/**
* <p>
* Definition of an interface for the thread-safe initialization of objects.
* </p>
* <p>
* The idea behind this interface is to provide access to an object in a
* thread-safe manner. A {@code ConcurrentInitializer} can be passed to multiple
* threads which can all access the object produced by the initializer. Through
* the {@link #get()} method the object can be queried.
* </p>
* <p>
* Concrete implementations of this interface will use different strategies for
* the creation of the managed object, e.g. lazy initialization or
* initialization in a background thread. This is completely transparent to
* client code, so it is possible to change the initialization strategy without
* affecting clients.
* </p>
*
* @since 3.0
* @param <T> the type of the object managed by this initializer class
*/
public
interface ConcurrentInitializer<T> {
/**
* Returns the fully initialized object produced by this {@code
* ConcurrentInitializer}. A concrete implementation here returns the
* results of the initialization process. This method may block until
* results are available. Typically, once created the result object is
* always the same.
*
* @return the object created by this {@code ConcurrentException}
* @throws ConcurrentException if an error occurred during initialization of
* the object
*/
T get() throws ConcurrentException;
}
| [
"bloriot97@gmail.com"
] | bloriot97@gmail.com |
53a9996949a6031e45b537e60fb5ec9331a01df9 | 471a1d9598d792c18392ca1485bbb3b29d1165c5 | /jadx-MFP/src/main/java/dagger/android/support/DaggerAppCompatActivity_MembersInjector.java | f2629e0938de29a030bb3f0740634c6955a78aa0 | [] | 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 | 2,036 | java | package dagger.android.support;
import android.app.Fragment;
import dagger.MembersInjector;
import dagger.android.DispatchingAndroidInjector;
import javax.inject.Provider;
public final class DaggerAppCompatActivity_MembersInjector implements MembersInjector<DaggerAppCompatActivity> {
private final Provider<DispatchingAndroidInjector<Fragment>> frameworkFragmentInjectorProvider;
private final Provider<DispatchingAndroidInjector<android.support.v4.app.Fragment>> supportFragmentInjectorProvider;
public DaggerAppCompatActivity_MembersInjector(Provider<DispatchingAndroidInjector<android.support.v4.app.Fragment>> provider, Provider<DispatchingAndroidInjector<Fragment>> provider2) {
this.supportFragmentInjectorProvider = provider;
this.frameworkFragmentInjectorProvider = provider2;
}
public static MembersInjector<DaggerAppCompatActivity> create(Provider<DispatchingAndroidInjector<android.support.v4.app.Fragment>> provider, Provider<DispatchingAndroidInjector<Fragment>> provider2) {
return new DaggerAppCompatActivity_MembersInjector(provider, provider2);
}
public void injectMembers(DaggerAppCompatActivity daggerAppCompatActivity) {
injectSupportFragmentInjector(daggerAppCompatActivity, (DispatchingAndroidInjector) this.supportFragmentInjectorProvider.get());
injectFrameworkFragmentInjector(daggerAppCompatActivity, (DispatchingAndroidInjector) this.frameworkFragmentInjectorProvider.get());
}
public static void injectSupportFragmentInjector(DaggerAppCompatActivity daggerAppCompatActivity, DispatchingAndroidInjector<android.support.v4.app.Fragment> dispatchingAndroidInjector) {
daggerAppCompatActivity.supportFragmentInjector = dispatchingAndroidInjector;
}
public static void injectFrameworkFragmentInjector(DaggerAppCompatActivity daggerAppCompatActivity, DispatchingAndroidInjector<Fragment> dispatchingAndroidInjector) {
daggerAppCompatActivity.frameworkFragmentInjector = dispatchingAndroidInjector;
}
}
| [
"anon@ymous.email"
] | anon@ymous.email |
fb721a6daf38af6b726dc824c4ddc3b94848962f | 776f7a8bbd6aac23678aa99b72c14e8dd332e146 | /src/com/google/ads/AdSize.java | 20fccd3f64c1e1113e6e763b1d68fe2a4b5e3129 | [] | no_license | arvinthrak/com.nianticlabs.pokemongo | aea656acdc6aa419904f02b7331f431e9a8bba39 | bcf8617bafd27e64f165e107fdc820d85bedbc3a | refs/heads/master | 2020-05-17T15:14:22.431395 | 2016-07-21T03:36:14 | 2016-07-21T03:36:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,370 | java | package com.google.ads;
import android.content.Context;
@Deprecated
public final class AdSize
{
public static final int AUTO_HEIGHT = -2;
public static final AdSize BANNER;
public static final int FULL_WIDTH = -1;
public static final AdSize IAB_BANNER = new AdSize(468, 60, "as");
public static final AdSize IAB_LEADERBOARD = new AdSize(728, 90, "as");
public static final AdSize IAB_MRECT;
public static final AdSize IAB_WIDE_SKYSCRAPER = new AdSize(160, 600, "as");
public static final int LANDSCAPE_AD_HEIGHT = 32;
public static final int LARGE_AD_HEIGHT = 90;
public static final int PORTRAIT_AD_HEIGHT = 50;
public static final AdSize SMART_BANNER = new AdSize(-1, -2, "mb");
private final com.google.android.gms.ads.AdSize zzaJ;
static
{
BANNER = new AdSize(320, 50, "mb");
IAB_MRECT = new AdSize(300, 250, "as");
}
public AdSize(int paramInt1, int paramInt2)
{
this(new com.google.android.gms.ads.AdSize(paramInt1, paramInt2));
}
private AdSize(int paramInt1, int paramInt2, String paramString)
{
this(new com.google.android.gms.ads.AdSize(paramInt1, paramInt2));
}
public AdSize(com.google.android.gms.ads.AdSize paramAdSize)
{
zzaJ = paramAdSize;
}
public boolean equals(Object paramObject)
{
if (!(paramObject instanceof AdSize)) {
return false;
}
paramObject = (AdSize)paramObject;
return zzaJ.equals(zzaJ);
}
public AdSize findBestSize(AdSize... paramVarArgs)
{
Object localObject1 = null;
Object localObject2 = null;
if (paramVarArgs == null) {}
float f1;
int j;
int k;
int m;
int i;
do
{
return (AdSize)localObject2;
f1 = 0.0F;
j = getWidth();
k = getHeight();
m = paramVarArgs.length;
i = 0;
localObject2 = localObject1;
} while (i >= m);
localObject2 = paramVarArgs[i];
int n = ((AdSize)localObject2).getWidth();
int i1 = ((AdSize)localObject2).getHeight();
float f2;
if (isSizeAppropriate(n, i1))
{
float f3 = n * i1 / (j * k);
f2 = f3;
if (f3 > 1.0F) {
f2 = 1.0F / f3;
}
if (f2 > f1) {
localObject1 = localObject2;
}
}
for (;;)
{
i += 1;
f1 = f2;
break;
f2 = f1;
}
}
public int getHeight()
{
return zzaJ.getHeight();
}
public int getHeightInPixels(Context paramContext)
{
return zzaJ.getHeightInPixels(paramContext);
}
public int getWidth()
{
return zzaJ.getWidth();
}
public int getWidthInPixels(Context paramContext)
{
return zzaJ.getWidthInPixels(paramContext);
}
public int hashCode()
{
return zzaJ.hashCode();
}
public boolean isAutoHeight()
{
return zzaJ.isAutoHeight();
}
public boolean isCustomAdSize()
{
return false;
}
public boolean isFullWidth()
{
return zzaJ.isFullWidth();
}
public boolean isSizeAppropriate(int paramInt1, int paramInt2)
{
int i = getWidth();
int j = getHeight();
return (paramInt1 <= i * 1.25F) && (paramInt1 >= i * 0.8F) && (paramInt2 <= j * 1.25F) && (paramInt2 >= j * 0.8F);
}
public String toString()
{
return zzaJ.toString();
}
}
/* Location:
* Qualified Name: com.google.ads.AdSize
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"reverseengineeringer@hackeradmin.com"
] | reverseengineeringer@hackeradmin.com |
013836a0f62a3418b6ebccfe70a1e2f5b59093e2 | ab06d4f09f7c620b51304ab0ce3a23c9aa2cd031 | /vertx-spring-employee-service/src/main/java/org/jacpfx/vertx/spring/configuration/MongoRepositoryConfiguration.java | 7716dbc667ae74de8cce94366b9965a6406b6f42 | [
"Apache-2.0"
] | permissive | amoAHCP/vert.x-spring-microservice-demo | 0afed88b8355515c730c9ebaf9ec6c72eab38857 | dc076884dd80f813b80a33c7a3c80f4af040f136 | refs/heads/master | 2020-04-06T04:30:59.148045 | 2017-08-23T20:30:39 | 2017-08-23T20:30:39 | 25,603,364 | 4 | 3 | null | null | null | null | UTF-8 | Java | false | false | 1,136 | java | package org.jacpfx.vertx.spring.configuration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.data.mongodb.MongoDbFactory;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.gridfs.GridFsTemplate;
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
import javax.inject.Inject;
import javax.inject.Named;
/**
* Created by amo on 10.10.14.
*/
@Configuration
@Import( { MongoDataSourceConfiguration.class })
@EnableMongoRepositories
public class MongoRepositoryConfiguration {
@Inject
@Named("local")
private MongoDbFactory mongoDbFactoryLocal;
@Bean
public MongoTemplate mongoTemplate() throws Exception {
return new MongoTemplate(mongoDbFactoryLocal);
}
@Bean
public GridFsTemplate gridFsTemplate(MongoDbFactory mongoDbFactory, MongoTemplate mongoTemplate) throws Exception {
return new GridFsTemplate(mongoDbFactory, mongoTemplate.getConverter());
}
} | [
"amo.ahcp@gmail.com"
] | amo.ahcp@gmail.com |
d77c407b33689dfda3416fa91c95aa778df822ca | 842dee0aaca1e24bed893db63263b2291e32f7d6 | /network/src/main/java/com/cat/study/demo/discard/DiscardServerHandler.java | 80ec95d192c1bd6749bc326f3d03a5e3a589be8b | [] | no_license | zhsyk34/zsxy | ec5135a10797ad4480fd31926fee5eb8b6e5937d | 0b24ae31333a30cad7d52628555b60e8483989d9 | refs/heads/master | 2021-01-20T18:45:09.216058 | 2016-09-28T10:59:09 | 2016-09-28T10:59:10 | 60,462,223 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,044 | java | package com.cat.study.demo.discard;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.util.ReferenceCountUtil;
/**
* 处理服务端 channel.
*/
public class DiscardServerHandler extends ChannelInboundHandlerAdapter { // (1)
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) { // (2)
/*
// 默默地丢弃收到的数据
((ByteBuf) msg).release(); // (3)
*/
/*
try {
// Do something with msg
} finally {
ReferenceCountUtil.release(msg);
}
*/
ByteBuf in = (ByteBuf) msg;
try {
while (in.isReadable()) { // (1)
System.out.print((char) in.readByte());
System.out.flush();
}
} finally {
ReferenceCountUtil.release(msg); // (2)
}
}
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { // (4)
// 当出现异常就关闭连接
cause.printStackTrace();
ctx.close();
}
} | [
"zhsy1985@sina.com"
] | zhsy1985@sina.com |
d555d8f9ee95922598acb157590919b62b3da3ea | cc99d1e133138b6a967f05d6528190ea3c6d8810 | /src/main/java/code/gen/clients/VendorClient.java | 021df8a672436a8f1a0b3aa854cd965e7099079c | [] | no_license | aknigam/CodeGeneration | 1af877d2126c62618feb7e4a1e2aba8238011b37 | ed54b36dc74eeaa21a277dbf1c83d4c85c14c490 | refs/heads/master | 2023-08-03T15:37:24.795399 | 2019-06-18T10:11:02 | 2019-06-18T10:11:02 | 185,789,696 | 0 | 0 | null | 2023-07-22T05:14:36 | 2019-05-09T11:55:14 | Java | UTF-8 | Java | false | false | 1,525 | java |
package code.gen.clients;
import code.gen.entities.*;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.DELETE;
import retrofit2.http.PUT;
import retrofit2.http.Path;
import retrofit2.http.Query;
import java.util.List;
public interface VendorClient {
@POST("/service/v1/vendors")
Call<Vendor> createVendor(@Body Vendor vendor);
@PUT("/service/v1/vendors/{vendorId}")
Call<Void> updateVendor(@Path("vendorId") int vendorId, @Body Vendor vendor);
@GET("/service/v1/vendors/{vendorId}")
Call<Vendor> getVendor(@Path("vendorId") int vendorId);
@DELETE("/service/v1/vendors/{vendorId}")
Call<Void> deleteVendor(@Path("vendorId") int vendorId);
// ONE TO ONE shopAddress STARTS -------------------------------------------------------
@POST("/service/v1/vendors/{vendorId}/shopaddress")
Call<Address> addVendorShopAddress(@Path("vendorId") int vendorId, @Body Address shopAddress);
@GET("/service/v1/vendors/{vendorId}/shopaddress")
Call<Address> getVendorShopAddress(@Path("vendorId") int vendorId);
@PUT("/service/v1/vendors/{vendorId}/shopaddress")
Call<Void> updateVendorShopAddress(@Path("vendorId") int vendorId, @Body Address shopAddress);
@DELETE("/service/v1/vendors/{vendorId}/shopaddress")
Call<Void> deleteVendorShopAddress(@Path("vendorId") int vendorId);
// ONE TO ONE shopAddress ENDS -------------------------------------------------------
}
| [
"a.nigam@cvent.com"
] | a.nigam@cvent.com |
59652c7f7a2702ea4c28d58585fdd22b3d7bcb43 | 546b701d6b9c42e008ed29f9bb1851d142753074 | /code_corpus/grepcode/wrong_2/public_int_getBaseline_int_width_int_height.java | 57037b08c3d4f3e604ae57dd0c3873260f344752 | [
"Apache-2.0"
] | permissive | rushimg/SVM_code_completion | f5a3308796c4fde5c00d4e38bb5fd2d2b7b71165 | 37787a10dd56db8cd8e52b81d285f90e1a5c68be | refs/heads/master | 2016-08-05T16:01:40.944530 | 2014-08-27T19:19:38 | 2014-08-27T19:19:38 | 14,997,376 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 234 | java |
public int getBaseline(int width, int height) {
if (width < 0 || height < 0) {
throw new IllegalArgumentException(
"Width and height must be >= 0");
}
return -1;
}
| [
"rushimg@csail.mit.edu"
] | rushimg@csail.mit.edu |
c1725989de1a5ac14caa8c8f96c3343eb32d8d0f | fc6c869ee0228497e41bf357e2803713cdaed63e | /weixin6519android1140/src/sourcecode/com/tencent/mm/sdk/platformtools/aa.java | 8b8b38bb87d81f3b48a8a99acdc46bfafb368cbc | [] | no_license | hyb1234hi/reverse-wechat | cbd26658a667b0c498d2a26a403f93dbeb270b72 | 75d3fd35a2c8a0469dbb057cd16bca3b26c7e736 | refs/heads/master | 2020-09-26T10:12:47.484174 | 2017-11-16T06:54:20 | 2017-11-16T06:54:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,037 | java | package com.tencent.mm.sdk.platformtools;
import com.tencent.gmtrace.GMTrace;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
public final class aa
{
protected static char[] vii;
protected static ThreadLocal<MessageDigest> vij;
static
{
GMTrace.i(13951932825600L, 103950);
vii = new char[] { 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102 };
vij = new ThreadLocal()
{
private static MessageDigest bPQ()
{
GMTrace.i(13932202819584L, 103803);
try
{
MessageDigest localMessageDigest = MessageDigest.getInstance("MD5");
GMTrace.o(13932202819584L, 103803);
return localMessageDigest;
}
catch (NoSuchAlgorithmException localNoSuchAlgorithmException)
{
throw new RuntimeException("Initialize MD5 failed.", localNoSuchAlgorithmException);
}
}
};
GMTrace.o(13951932825600L, 103950);
}
public static String RP(String paramString)
{
GMTrace.i(13951664390144L, 103948);
paramString = bn(paramString.getBytes());
GMTrace.o(13951664390144L, 103948);
return paramString;
}
public static String bn(byte[] paramArrayOfByte)
{
GMTrace.i(13951798607872L, 103949);
paramArrayOfByte = ((MessageDigest)vij.get()).digest(paramArrayOfByte);
int j = paramArrayOfByte.length;
StringBuffer localStringBuffer = new StringBuffer(j * 2);
int i = 0;
while (i < j + 0)
{
int k = paramArrayOfByte[i];
char c1 = vii[((k & 0xF0) >> 4)];
char c2 = vii[(k & 0xF)];
localStringBuffer.append(c1);
localStringBuffer.append(c2);
i += 1;
}
paramArrayOfByte = localStringBuffer.toString();
GMTrace.o(13951798607872L, 103949);
return paramArrayOfByte;
}
}
/* Location: D:\tools\apktool\weixin6519android1140\jar\classes-dex2jar.jar!\com\tencent\mm\sdk\platformtools\aa.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"robert0825@gmail.com"
] | robert0825@gmail.com |
cc4662e402993c5789ae21f78e2c8a0ddfedc347 | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XRENDERING-481-40-2-SPEA2-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/internal/template/InternalTemplateManager_ESTest_scaffolding.java | 6a3e1ce123c571a2207a5c911bc9bf72868d6e6a | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 459 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Mon Apr 06 19:59:56 UTC 2020
*/
package com.xpn.xwiki.internal.template;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class InternalTemplateManager_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
8cd6939c49e8d028d729322166eff0964f4bb361 | 3140e56c57040d9ab00f804cc848064681088a1a | /src/com/shbtos/biz/smart/cwp/pojo/SmartAreaTaskInfo.java | 42a666e81fc3c77fe461355dcc4ae3783641a86d | [] | no_license | csw823197541/HBTOS | cbeb930425c01f4a9911e9e5817576be5951a2b2 | 558621a03c9e9ed35eb257624660dcd6e9dacf73 | refs/heads/master | 2021-08-20T08:11:15.618421 | 2020-02-24T05:04:04 | 2020-02-24T05:04:04 | 100,240,602 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,956 | java | package com.shbtos.biz.smart.cwp.pojo;
import java.util.Date;
/**
* Created by csw on 2020/02/24.
* Description: 当前一个小时时间段内,每个箱区作业的作业指令信息
* 用于自动发箱均衡箱区出箱能力
*/
public class SmartAreaTaskInfo {
private Long berthId; // 靠泊ID
private String vpcCntrId; // 唯一编号
private String craneNo; // 桥机号
private Long cwpwkmovenum; // 桥机作业顺序号
private String lduld; // 装卸标志
private String yardContainerId; // 箱Id号
private String cszCsizecd; // 箱尺寸
private String yLocation; // 计划提箱位置, 场箱位:倍.排.层
private String vLocation; // 计划放箱位置, 船箱位:倍.排.层
private Date workingStartTime; // 计划开始时间
private Date workingEndTime; // 计划结束时间
private String moveKind; // 作业类型(DSCH,LOAD,SHIFTIN,SHIFTOUT(转堆))
private String workFlow; // 作业工艺
private Long voyId; // 航次Id,进口航次或出口航次
private String workStatus; // 指令状态:发送A; 完成C,RC; 作业中W; 未发送Y,S,P; 退卸或退装R
private String workIsExchangeLabel; // 指令是否可以互相交换标识,标识相同的指令即满足交换规则
public Long getBerthId() {
return berthId;
}
public void setBerthId(Long berthId) {
this.berthId = berthId;
}
public String getVpcCntrId() {
return vpcCntrId;
}
public void setVpcCntrId(String vpcCntrId) {
this.vpcCntrId = vpcCntrId;
}
public String getCraneNo() {
return craneNo;
}
public void setCraneNo(String craneNo) {
this.craneNo = craneNo;
}
public Long getCwpwkmovenum() {
return cwpwkmovenum;
}
public void setCwpwkmovenum(Long cwpwkmovenum) {
this.cwpwkmovenum = cwpwkmovenum;
}
public String getLduld() {
return lduld;
}
public void setLduld(String lduld) {
this.lduld = lduld;
}
public String getYardContainerId() {
return yardContainerId;
}
public void setYardContainerId(String yardContainerId) {
this.yardContainerId = yardContainerId;
}
public String getCszCsizecd() {
return cszCsizecd;
}
public void setCszCsizecd(String cszCsizecd) {
this.cszCsizecd = cszCsizecd;
}
public String getyLocation() {
return yLocation;
}
public void setyLocation(String yLocation) {
this.yLocation = yLocation;
}
public String getvLocation() {
return vLocation;
}
public void setvLocation(String vLocation) {
this.vLocation = vLocation;
}
public Date getWorkingStartTime() {
return workingStartTime;
}
public void setWorkingStartTime(Date workingStartTime) {
this.workingStartTime = workingStartTime;
}
public Date getWorkingEndTime() {
return workingEndTime;
}
public void setWorkingEndTime(Date workingEndTime) {
this.workingEndTime = workingEndTime;
}
public String getMoveKind() {
return moveKind;
}
public void setMoveKind(String moveKind) {
this.moveKind = moveKind;
}
public String getWorkFlow() {
return workFlow;
}
public void setWorkFlow(String workFlow) {
this.workFlow = workFlow;
}
public Long getVoyId() {
return voyId;
}
public void setVoyId(Long voyId) {
this.voyId = voyId;
}
public String getWorkStatus() {
return workStatus;
}
public void setWorkStatus(String workStatus) {
this.workStatus = workStatus;
}
public String getWorkIsExchangeLabel() {
return workIsExchangeLabel;
}
public void setWorkIsExchangeLabel(String workIsExchangeLabel) {
this.workIsExchangeLabel = workIsExchangeLabel;
}
}
| [
"823917541@qq.com"
] | 823917541@qq.com |
cbe3ae2e75b79ac5ac2764b4e39a8a439ab8b668 | 466a11bec8c8559e3e4e42a20e284d54d8972680 | /requisition/src/main/java/com/tqmars/requisition/infrastructure/unitOfWork/IUnitOfWork.java | 8729199b15e41bfd9dadc94662a178c64c0f7a15 | [
"Apache-2.0"
] | permissive | huahuajjh/mvn_requisition | 456e2033e71f757eea4522e1384d7f82a236cfcd | d4c83548f4e68d4619cdec6657cc18ecfe986fd9 | refs/heads/master | 2020-04-02T03:16:48.697670 | 2016-07-22T11:34:28 | 2016-07-22T11:34:28 | 63,935,273 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 686 | java | package com.tqmars.requisition.infrastructure.unitOfWork;
/**
* 表明实现该接口的类是一种uow的实现,该模式的实现用于保证数据一致性。
* @author jjh
* @time 2015-12-14 14:46
*/
public interface IUnitOfWork {
void beginTransaction();
/**
* 设置一个boolean值,该值表明了当前的uow事务是否被提交
* @return boolean
* 是否提交
*/
boolean commited();
/**
* 设置一个boolean值,该值表明了当前的uow事务是否被提交
* @param isCommited
* 是否提交
*/
void commited(boolean isCommited);
/**提交当前uow事务*/
void commit();
/**回滚当前uow事务*/
void rollback();
}
| [
"703825021@qq.com"
] | 703825021@qq.com |
dfb5f12b71a842f9fe81f536ebb0e148bbdb3ebc | 532b084d2de8e8ef1ea7c0aac67e3980b101be6d | /spring/feilong-spring-core/src/test/java/com/feilong/entity/DIUserArray.java | fec225c7add7b0c4155dd7ec8c94ab781ee1e0c8 | [] | no_license | ananbeike/feilong-platform | 802c407a54014d3e47e6d6707f14fca5a01fbd8f | d0948ee04ee85846f64b5cc5e38748341628d3d1 | refs/heads/master | 2021-01-14T09:20:05.472288 | 2015-04-14T16:46:13 | 2015-04-14T16:46:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,776 | java | /*
* Copyright (C) 2008 feilong (venusdrogon@163.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.feilong.entity;
/**
* 数组.
*
* @author <a href="mailto:venusdrogon@163.com">feilong</a>
* @version 1.0.8 2014年10月8日 下午3:57:50
* @since 1.0.8
*/
public class DIUserArray extends BaseDIUser{
/** The skills. */
private String[] skills;
/** The secret strategys. */
private String[] secretStrategys;
/**
* 获得 skills.
*
* @return the skills
*/
public String[] getSkills(){
return skills;
}
/**
* 设置 skills.
*
* @param skills
* the skills to set
*/
public void setSkills(String[] skills){
this.skills = skills;
}
/**
* 获得 secret strategys.
*
* @return the secretStrategys
*/
public String[] getSecretStrategys(){
return secretStrategys;
}
/**
* 设置 secret strategys.
*
* @param secretStrategys
* the secretStrategys to set
*/
public void setSecretStrategys(String[] secretStrategys){
this.secretStrategys = secretStrategys;
}
}
| [
"venusdrogon@163.com"
] | venusdrogon@163.com |
3678ea33507831913d1e2683c6c2247410c3f877 | 8727b1cbb8ca63d30340e8482277307267635d81 | /PolarServer/src/com/game/player/manager/DefaultParmManager.java | ab38052fd55787c3b6da1b31dc60e2038fe7c6ba | [] | no_license | taohyson/Polar | 50026903ded017586eac21a7905b0f1c6b160032 | b0617f973fd3866bed62da14f63309eee56f6007 | refs/heads/master | 2021-05-08T12:22:18.884688 | 2015-12-11T01:44:18 | 2015-12-11T01:44:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,585 | java | //package com.game.player.manager;
//
//import java.util.List;
//
//import com.game.backpack.manager.BackpackManager;
//import com.game.backpack.structs.Equip;
//import com.game.backpack.structs.Item;
//import com.game.config.Config;
//import com.game.data.bean.Q_characterBean;
//import com.game.data.bean.Q_newrole_defaultvalueBean;
//import com.game.data.bean.Q_skill_modelBean;
//import com.game.data.manager.DataManager;
//import com.game.manager.ManagerPool;
//import com.game.player.message.ReqSyncPlayerLevelMessage;
//import com.game.player.message.ResPlayerLevelUpMessage;
//import com.game.player.structs.Player;
//import com.game.player.structs.PlayerAttributeType;
//import com.game.shortcut.manager.ShortCutManager;
//import com.game.skill.manager.SkillManager;
//import com.game.skill.structs.Skill;
//import com.game.structs.Reasons;
//import com.game.task.manager.TaskManager;
//import com.game.utils.Global;
//import com.game.utils.MessageUtil;
//import com.game.utils.StringUtil;
//import com.game.utils.Symbol;
//
//public class DefaultParmManager {
// public static void buildDefaultValue(Player player) {
// try{
// //出生等级
// Q_newrole_defaultvalueBean model = DataManager.getInstance().q_newrole_defaultvalueContainer.getMap().get((int)player.getSex());
// if(model==null){
// return;
// }
// int q_initlevel = model.getQ_initlevel();
// if(q_initlevel>1){
// setLevel(player, q_initlevel);
// }
// //默认装备
// addEquip(player,model.getQ_body1(),0);
// addEquip(player,model.getQ_body2(),1);
// addEquip(player,model.getQ_body3(),2);
// addEquip(player,model.getQ_body4(),3);
// addEquip(player,model.getQ_body5(),4);
// addEquip(player,model.getQ_body6(),5);
// addEquip(player,model.getQ_body7(),6);
// addEquip(player,model.getQ_body8(),7);
// addEquip(player,model.getQ_body9(),8);
//
// //包裹 物品
// String q_bageitems = model.getQ_bageitems();
// buildBagItems(player,q_bageitems);
//
// //默认学会技能
// String q_skills = model.getQ_skills();
// if(!StringUtil.isBlank(q_skills)){
// String[] split = q_skills.split(Symbol.FENHAO_REG);
// for (String string : split) {
// if(!StringUtil.isBlank(string)){
// String[] split2 = string.split(Symbol.DOUHAO_REG);
// int modelId = Integer.parseInt(split2[0]);int level = Integer.parseInt(split2[1]);
// SkillManager.getInstance().addSkill(player,modelId);
// if(level>1){
// Skill skill = SkillManager.getInstance().getSkillByModelId(player, modelId);
// SkillManager.getInstance().endUpLevel(player, skill,level, true);
// }
// }
// }
// }
// //快捷键
// String q_short_cut = model.getQ_short_cut();
// buildShortCut(player, q_short_cut);
// }catch(Exception e){
//// log.error(e,e);
// }
// }
//
// private static void setLevel(Player player,int level){
// if (level > Global.MAX_LEVEL) {
// return;
// }
// //设置等级
// player.setLevel(level);
//
// if (level == 30) {
// //30级自动切换一次全体pk
// PlayerManager.getInstance().changePkState(player, 3);
// //30级自动接受日常任务
// TaskManager.getInstance().acceptDailyTask(player);
// }
//
// ReqSyncPlayerLevelMessage syncmsg= new ReqSyncPlayerLevelMessage();
// syncmsg.setPlayerId(player.getId());
// syncmsg.setLevel(level);
// MessageUtil.send_to_world(syncmsg);
// //升级自动学会的
// SkillManager.getInstance().autoStudySkill(player);
//
// int level = player.getLevel();
// Q_characterBean model = ManagerPool.dataManager.q_characterContainer.getMap().get(level);
// if(model==null) return;
// int q_skill = model.getQ_skill();
// if(q_skill!=0){
// Q_skill_modelBean skillModel= ManagerPool.dataManager.q_skill_modelContainer.getMap().get(q_skill+"_"+1);
// if(skillModel!=null&&!SkillManager.getInstance().isHaveSkill(player, q_skill)){
// SkillManager.getInstance().study(player, q_skill, skillModel.getQ_study_needbook());
// }
// }
//
//
// //升级触发军衔升级
// ManagerPool.rankManager.rankup(player);
// //重新计算属性
// ManagerPool.playerAttributeManager.countPlayerAttribute(player, PlayerAttributeType.BASE);
// player.setHp(player.getMaxHp());
// player.setMp(player.getMaxMp());
// player.setSp(player.getMaxSp());
// }
//
// private static void addEquip(Player player, String q_body1, int i) {
// // 装备1(模型ID,是否绑定,强化等级,属性类型|属性值;属性类型|属性值)
// if(!StringUtil.isBlank(q_body1)){
// String[] split = q_body1.split(Symbol.DOUHAO);
// int modelId=Integer.parseInt(split[0]);
// boolean isbind=split[1].equals("1");
// int gradenum=Integer.parseInt(split[2]);
// String append="";
// if(split.length>4)
// append=split[3];
// List<Item> createItems = Item.createItems(modelId,1,isbind,0,gradenum, append);
// Item item = createItems.get(0);
// if (item instanceof Equip) {
// player.getEquips()[i] = (Equip) item;
// }
// }
// }
//
// private static void buildBagItems(Player player,String items){
// if(!StringUtil.isBlank(items)){
//// 包裹物品(模型ID,数量,是否绑定,强化等级,属性类型|属性值;属性类型|属性值:模型ID,数量,是否绑定,强化等级,属性类型|属性值;属性类型|属性值)
// long id = Config.getId();
// String[] split = items.split(Symbol.MAOHAO_REG);
// for (String string : split) {
// if(!StringUtil.isBlank(string)){
// String[] itemparm = string.split(Symbol.DOUHAO_REG);
// int modelId = Integer.parseInt(itemparm[0]);
// int num = Integer.parseInt(itemparm[1]);
// boolean isbind =itemparm[2].equals("1");
// int gradenum=Integer.parseInt(itemparm[3]);
// String append="";
// if(itemparm.length>4){
// append=itemparm[4];
// }
// List<Item> createItems = Item.createItems(modelId, num, isbind, 0,gradenum,append);
// BackpackManager.getInstance().addItems(player, createItems, Reasons.SYSTEM_GIFT, id);
// }
// }
// }
// }
//
// private static void buildShortCut(Player player,String cuts){
// if(!StringUtil.isBlank(cuts)){
// String[] split = cuts.split(Symbol.FENHAO_REG);
// for (int i = 0; i < split.length; i++) {
// String string = split[i];
// int parseInt = Integer.parseInt(string);
// Skill skillByModelId = SkillManager.getInstance().getSkillByModelId(player, parseInt);
// if(skillByModelId!=null){
// ShortCutManager.getInstance().addShortCut(player, 2, skillByModelId.getId(), parseInt, i+1);
// }
// }
// }
//
// }
//
//}
| [
"zhuyuanbiao@ZHUYUANBIAO.rd.com"
] | zhuyuanbiao@ZHUYUANBIAO.rd.com |
d9cc93a198fc0383ef45db93a61789fc85bd5d72 | 2ca0aaf98cfde45051152a1818a42255f19a2b28 | /weixin4j-base/src/main/java/com/foxinmy/weixin4j/payment/mch/RefundDetail.java | 55b87ece77a6d772eaeb87a76c802be1bb35e3ab | [
"Apache-2.0"
] | permissive | gufachongyang/weixin4j | 3b468481e6f2aba2596870ae577792ff8d619f97 | 5b31f1c8f03e4e1a2873300037343ce61e2f1359 | refs/heads/master | 2020-12-26T04:04:52.793695 | 2016-03-31T05:16:12 | 2016-03-31T05:16:12 | 55,131,830 | 2 | 0 | null | 2016-03-31T08:03:52 | 2016-03-31T08:03:51 | null | UTF-8 | Java | false | false | 7,501 | java | package com.foxinmy.weixin4j.payment.mch;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.alibaba.fastjson.annotation.JSONField;
import com.foxinmy.weixin4j.payment.coupon.CouponInfo;
import com.foxinmy.weixin4j.type.CurrencyType;
import com.foxinmy.weixin4j.type.RefundChannel;
import com.foxinmy.weixin4j.type.RefundStatus;
import com.foxinmy.weixin4j.xml.ListsuffixResult;
/**
* V3退款详细
*
* @className RefundDetail
* @author jy
* @date 2014年11月6日
* @since JDK 1.6
* @see
*/
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class RefundDetail extends MerchantResult {
private static final long serialVersionUID = -3687863914168618620L;
/**
* 商户退款单号
*/
@XmlElement(name = "out_refund_no")
@JSONField(name = "out_refund_no")
private String outRefundNo;
/**
* 微信退款单号
*/
@XmlElement(name = "refund_id")
@JSONField(name = "refund_id")
private String refundId;
/**
* 退款渠道:ORIGINAL—原路退款,默认 BALANCE—退回到余额
*/
@XmlElement(name = "refund_channel")
@JSONField(name = "refund_channel")
private String refundChannel;
/**
* 退款总金额,单位为分,可以做部分退款
*/
@XmlElement(name = "refund_fee")
@JSONField(name = "refund_fee")
private int refundFee;
/**
* 退款货币种类
*
* @see com.foxinmy.weixin4j.mp.type.CurrencyType
*/
@XmlElement(name = "refund_fee_type")
@JSONField(name = "refund_fee_type")
private String refundFeeType;
/**
* 订单总金额
*/
@XmlElement(name = "total_fee")
@JSONField(name = "total_fee")
private int totalFee;
/**
* 订单金额货币种类
*
* @see com.foxinmy.weixin4j.mp.type.CurrencyType
*/
@XmlElement(name = "fee_type")
@JSONField(name = "fee_type")
private String feeType;
/**
* 现金支付金额
*/
@XmlElement(name = "cash_fee")
@JSONField(name = "cash_fee")
private int cashFee;
/**
* 现金支付货币种类
*
* @see com.foxinmy.weixin4j.mp.type.CurrencyType
*/
@XmlElement(name = "cash_fee_type")
@JSONField(name = "cash_fee_type")
private String cashFeeType;
/**
* 现金退款金额
*/
@XmlElement(name = "cash_refund_fee")
@JSONField(name = "cash_refund_fee")
private Integer cashRefundFee;
/**
* 现金退款货币类型
*
* @see com.foxinmy.weixin4j.mp.type.CurrencyType
*/
@XmlElement(name = "cash_refund_fee_type")
@JSONField(name = "cash_refund_fee_type")
private String cashRefundFeeType;
/**
* 退款状态
*/
@XmlElement(name = "refund_status")
@JSONField(name = "refund_status")
private String refundStatus;
/**
* 现金券退款金额<=退款金额,退款金额-现金券退款金额为现金
*/
@XmlElement(name = "coupon_refund_fee")
@JSONField(name = "coupon_refund_fee")
private Integer couponRefundFee;
/**
* 代金券或立减优惠使用数量 <font
* color="red">微信支付文档上写的coupon_count,而实际测试拿到的是coupon_refund_count,做个记号。
* </font>
*/
@XmlElement(name = "coupon_refund_count")
@JSONField(name = "coupon_refund_count")
private Integer couponRefundCount;
/**
* 代金券信息
*
* @see com.foxinmy.weixin4j.payment.coupon.CouponInfo
*/
@ListsuffixResult
private List<CouponInfo> couponList;
protected RefundDetail() {
// jaxb required
}
public String getOutRefundNo() {
return outRefundNo;
}
public String getRefundId() {
return refundId;
}
public String getRefundChannel() {
return refundChannel;
}
@JSONField(serialize = false)
public RefundChannel getFormatRefundChannel() {
return refundChannel != null ? RefundChannel.valueOf(refundChannel
.toUpperCase()) : null;
}
public int getRefundFee() {
return refundFee;
}
public String getFeeType() {
return feeType;
}
@JSONField(serialize = false)
public CurrencyType getFormatFeeType() {
return feeType != null ? CurrencyType.valueOf(feeType.toUpperCase())
: null;
}
/**
* <font color="red">调用接口获取单位为分,get方法转换为元方便使用</font>
*
* @return 元单位
*/
@JSONField(serialize = false)
public double getFormatRefundFee() {
return refundFee / 100d;
}
public String getRefundStatus() {
return refundStatus;
}
@JSONField(serialize = false)
public RefundStatus getFormatRefundStatus() {
return refundStatus != null ? RefundStatus.valueOf(refundStatus
.toUpperCase()) : null;
}
public Integer getCouponRefundFee() {
return couponRefundFee;
}
/**
* <font color="red">调用接口获取单位为分,get方法转换为元方便使用</font>
*
* @return 元单位
*/
@JSONField(serialize = false)
public double getFormatCouponRefundFee() {
return couponRefundFee != null ? couponRefundFee.intValue() / 100d : 0d;
}
public String getRefundFeeType() {
return refundFeeType;
}
@JSONField(serialize = false)
public CurrencyType getFormatRefundFeeType() {
return refundFeeType != null ? CurrencyType.valueOf(refundFeeType
.toUpperCase()) : null;
}
public int getTotalFee() {
return totalFee;
}
/**
* <font color="red">调用接口获取单位为分,get方法转换为元方便使用</font>
*
* @return 元单位
*/
@JSONField(serialize = false)
public double getFormatTotalFee() {
return totalFee / 100d;
}
public int getCashFee() {
return cashFee;
}
/**
* <font color="red">调用接口获取单位为分,get方法转换为元方便使用</font>
*
* @return 元单位
*/
@JSONField(serialize = false)
public double getFormatCashFee() {
return cashFee / 100d;
}
public String getCashFeeType() {
return cashFeeType;
}
@JSONField(serialize = false)
public CurrencyType getFormatCashFeeType() {
return cashFeeType != null ? CurrencyType.valueOf(cashFeeType
.toUpperCase()) : null;
}
public Integer getCashRefundFee() {
return cashRefundFee;
}
/**
* <font color="red">调用接口获取单位为分,get方法转换为元方便使用</font>
*
* @return 元单位
*/
@JSONField(serialize = false)
public double getFormatCashRefundFee() {
return cashRefundFee != null ? cashRefundFee.intValue() / 100d : 0d;
}
public String getCashRefundFeeType() {
return cashRefundFeeType;
}
@JSONField(serialize = false)
public CurrencyType getFormatCashRefundFeeType() {
return cashRefundFeeType != null ? CurrencyType
.valueOf(cashRefundFeeType.toUpperCase()) : null;
}
public Integer getCouponRefundCount() {
return couponRefundCount;
}
public List<CouponInfo> getCouponList() {
return couponList;
}
public void setCouponList(List<CouponInfo> couponList) {
this.couponList = couponList;
}
@Override
public String toString() {
return "RefundDetail [outRefundNo=" + outRefundNo + ", refundId="
+ refundId + ", refundChannel=" + refundChannel
+ ", refundFee=" + getFormatRefundFee() + ", refundFeeType="
+ refundFeeType + ", totalFee=" + getFormatTotalFee()
+ ", feeType=" + feeType + ", cashFee=" + getFormatCashFee()
+ ", cashFeeType=" + cashFeeType + ", cashRefundFee="
+ getFormatCashRefundFee() + ", cashRefundFeeType="
+ cashRefundFeeType + ", refundStatus=" + refundStatus
+ ", couponRefundFee=" + getFormatCouponRefundFee()
+ ", couponRefundCount=" + couponRefundCount + ", couponList="
+ couponList + ", " + super.toString() + "]";
}
}
| [
"foxinmy@gmail.com"
] | foxinmy@gmail.com |
9e7603a52230ad08a6af72a5da80ba75920bfb83 | 49251bac7e32b1f0ded46ceb6373968cb2a7f958 | /02.IntroToJava-Exercises/src/IntroToJava/P10XBits.java | 6a289062b552b183130d0316192e63c28305d8d3 | [] | no_license | CarlitoBG/JavaAdvanced | 70de8a783f57819ae8bc5c29501288250c16524b | 851cb61524a9b31eda9917139bb5d8198e63524b | refs/heads/master | 2020-03-10T17:52:31.405707 | 2018-04-14T11:39:04 | 2018-04-14T11:39:04 | 129,510,932 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 887 | java | package IntroToJava;
import java.util.Scanner;
public class P10XBits {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String[] bits = new String[8];
for (int i = 0; i < 8; i++) {
bits[i] = String.format("%32s", Integer.toBinaryString(Integer.parseInt(scanner.nextLine())))
.replace(' ', '0');
}
int countXBits = 0;
for (int row = 0; row < 8 - 2; row++) {
for (int col = 0; col < 32 - 2; col++) {
if (bits[row].substring(col, col + 3).equals("101")
&& bits[row + 1].substring(col, col + 3).equals("010")
&& bits[row + 2].substring(col, col + 3).equals("101")){
countXBits++;
}
}
}
System.out.println(countXBits);
}
} | [
"dimitrov.dians@gmail.com"
] | dimitrov.dians@gmail.com |
54b2a372fefc71b8f37324efcfab31c78812fbd6 | 7b66d4fe7a7487f18805cd9a05caa3c1f47d659d | /src/main/java/com/surenpi/autotest/phoenix/repository/UserIdentityRepository.java | a45448c6bd2bd8b410987dc7fe1c3136c61bec0c | [
"MIT"
] | permissive | phoenix-autotest/phoenix.platform.server | 1c59d18175eea7d4f078c4b033390082f9879f1f | fcca82d0447f72fcfefb31bf01a4e92a9cf8bb44 | refs/heads/master | 2021-08-24T16:00:21.084932 | 2017-12-10T09:59:39 | 2017-12-10T09:59:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 328 | java | package com.surenpi.autotest.phoenix.repository;
import com.surenpi.autotest.phoenix.entity.UserIdentity;
import org.springframework.data.repository.CrudRepository;
import java.util.List;
public interface UserIdentityRepository extends CrudRepository<UserIdentity, Long>
{
List<UserIdentity> findByUserId(Long userId);
}
| [
"zxjlwt@126.com"
] | zxjlwt@126.com |
85a87f9c4ab3709711a99e8e1a4501f8c8ce40e2 | c33a0afeea42a6a0ffe2a8e2daafbb0da7a8be2e | /swipelayoutlib/src/main/java/com/phone/swipelayout/mode/SwipeMode.java | 765cb01f9b046d3cb564e761940f9b647f01a653 | [] | no_license | PhoneSj/SwipeLayout | 6b25d251d818a6eb5ccb583939d375b31eb9b2e7 | b145af252629730406a655b8cd38d94a70b002c8 | refs/heads/master | 2021-01-20T01:17:09.250249 | 2017-09-30T09:05:16 | 2017-09-30T09:05:16 | 89,248,799 | 10 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,457 | java | package com.phone.swipelayout.mode;
import android.view.View;
import com.phone.swipelayout.LogUtils;
import com.phone.swipelayout.SwipeLayout;
import static com.phone.swipelayout.SwipeLayout.DragEdge.Empty;
/**
* Created by Phone on 2017/4/20.
*/
public abstract class SwipeMode {
private final String TAG = "SwipeMode";
private static final boolean TAG_ENABLE = true;
/** 菜单关闭时控件偏移量 **/
int mDragCloseDistance = 0;
/** 菜单打开时控件偏移量 **/
int mDragOpenDistance = 0;
/** 当前是打开状态拉动控件,若当前显示比例为0.75则松手后进入打开状态 **/
float mWillOpenPercentAfterOpen = 0.75f;
/** 当前是关闭状态拉动控件,若当前显示比例为0.25则松手后进入打开状态 **/
float mWillOpenPercentAfterClose = 0.25f;
protected SwipeLayout swipeLayout;
public SwipeMode(SwipeLayout swipeLayout) {
this.swipeLayout = swipeLayout;
}
public abstract void layout();
public void onPull() {
LogUtils.showI(TAG, "onPull...", TAG_ENABLE);
View leftView = swipeLayout.getLeftView();
View rightView = swipeLayout.getRightView();
switch (swipeLayout.getCurrentDragEdge()) {
case Left: {
if (leftView != null) {
//left方向的滑动范围:0~leftView.getMeasuredWidth()
mDragCloseDistance = 0;
mDragOpenDistance = leftView.getMeasuredWidth();
swipeLayout.mCurrentOffset = Math.min(Math.max(swipeLayout.mCurrentOffset, mDragCloseDistance),
mDragOpenDistance);
}
break;
}
case Right: {
if (rightView != null) {
//right方向的滑动范围:-rightView.getMeasuredHeight()~0
mDragCloseDistance = 0;
mDragOpenDistance = -rightView.getMeasuredWidth();
swipeLayout.mCurrentOffset = Math.min(Math.max(swipeLayout.mCurrentOffset, mDragOpenDistance),
mDragCloseDistance);
}
break;
}
case Empty:
break;
}
}
public void onRelease() {
LogUtils.showI(TAG, "onRelease...", TAG_ENABLE);
View mainView = swipeLayout.getMainView();
if (mainView == null) {
return;
}
if (swipeLayout.getCurrentDragEdge() != Empty) {
//拖动偏移量百分比打开菜单阈值
float willOpenPercent = (swipeLayout.isCloseBeforeDragged() ? mWillOpenPercentAfterClose
: mWillOpenPercentAfterOpen);
// float willOpenPercent = mWillOpenPercent;
//当前拖动偏移量
int dragedDistance = swipeLayout.mCurrentOffset - mDragCloseDistance;
//最大偏移量
int totalDistance = mDragOpenDistance - mDragCloseDistance;
float openPercent = Math.abs(dragedDistance * 1.0f / totalDistance);
if (openPercent > willOpenPercent) {
openMenu();
} else {
closeMenu();
}
}
}
public abstract void offsetLeftAndRight(int offset);
public void openMenu() {
LogUtils.showI(TAG, "openMenu...", TAG_ENABLE);
View leftView = swipeLayout.getLeftView();
View rightView = swipeLayout.getRightView();
if (swipeLayout.getCurrentDragEdge() == SwipeLayout.DragEdge.Left) {
if (leftView != null) {
swipeLayout.smoothScrollTo(SwipeLayout.Status.Open, leftView.getMeasuredWidth());
}
} else if (swipeLayout.getCurrentDragEdge() == SwipeLayout.DragEdge.Right) {
if (rightView != null) {
swipeLayout.smoothScrollTo(SwipeLayout.Status.Open, -rightView.getMeasuredWidth());
}
}
}
public void closeMenu() {
LogUtils.showI(TAG, "closeMenu...", TAG_ENABLE);
swipeLayout.smoothScrollTo(SwipeLayout.Status.Close, 0);
}
}
| [
"724430327@qq.com"
] | 724430327@qq.com |
6fc13ffbe08580dce7011157e11558ebaeabc950 | 2cb20f78103e655db44066423228ab1351f892bf | /SoluctionVirtualVanets/SVVRoutingAlgorithm/src/java/br/com/virtualVanets/routingAlgorithm/Host.java | dd5caa8840415ad0f3a885129552f6b9ed40ca28 | [] | no_license | geoleite/Mestrado | 656202d719ed695fe80a9ee31317bc5be8f147d3 | 2c0ba91897678d4ed703a9da390eb53a74305378 | refs/heads/master | 2021-01-13T03:27:09.394299 | 2017-10-04T10:54:27 | 2017-10-04T10:54:27 | 77,549,594 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,341 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package br.com.virtualVanets.routingAlgorithm;
import br.com.virtualVanets.common.Device;
import br.com.virtualVanets.common.MobileAgent;
import com.google.gson.Gson;
/**
* Classe que representa um veículo ou um equipamento de infra, fazendo a ligação
* da rede virtual com os equipamentos
* @author georgejunior
*/
public class Host {
//private MobileAgent<Device> mobileAgent;
private Network network;
private Device device;
@Override
public String toString() {
return new Gson().toJson(this);
}
/**
* @return the network
*/
public Network getNetwork() {
return network;
}
/**
* @param network the network to set
*/
public void setNetwork(Network network) {
this.network = network;
}
/**
* @return the device
*/
public Device getDevice() {
return device;
}
/**
* @param device the device to set
*/
public void setDevice(Device device) {
this.device = device;
}
/**
* @return the address
*/
public String getAddress() {
return device.getId();
}
} | [
"georgeleitejunior@gmail.com"
] | georgeleitejunior@gmail.com |
d599424af46bdd8ccbcdba00ff9f3672da45883f | c0a717b3cae89fd5f7afd5270644774fde8b6ec1 | /server/src/java/com/sun/honeycomb/common/InsufficientSpaceException.java | 9f5afac8091a54db7f487c80912027fcef893174 | [] | no_license | elambert/honeycomb | c11f60ace76ca0ab664e61b4d2ff7ead4653e0de | abd6ce4381b5db36a6c6b23e84c1fb8e8412d7b5 | refs/heads/master | 2020-03-27T22:39:34.505640 | 2012-08-29T20:09:16 | 2012-08-29T20:09:16 | 472,780 | 3 | 1 | null | 2012-08-29T19:52:10 | 2010-01-14T23:39:04 | Java | WINDOWS-1252 | Java | false | false | 2,102 | java | /*
* Copyright © 2008, Sun Microsystems, Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of Sun Microsystems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.sun.honeycomb.common;
/**
* An <code>InsufficientSpaceException</code> is thrown when a Honeycomb
* cluster doesn't have enough space to complete a store request.
*/
public class InsufficientSpaceException extends ArchiveException {
public InsufficientSpaceException(String message) {
super(message);
}
public InsufficientSpaceException(Throwable cause) {
super(cause);
}
public InsufficientSpaceException(String message, Throwable cause) {
super(message, cause);
}
}
| [
"eric.d.lambert@gmail.com"
] | eric.d.lambert@gmail.com |
3c407d2ea671ecd7370cdac1237fe20b624bacb1 | 124df74bce796598d224c4380c60c8e95756f761 | /com.raytheon.uf.viz.collaboration.comm/src/com/raytheon/uf/viz/collaboration/comm/provider/event/LeaderChangeEvent.java | e4a022d80a8917cb01841073298b882027c75b6c | [] | no_license | Mapoet/AWIPS-Test | 19059bbd401573950995c8cc442ddd45588e6c9f | 43c5a7cc360b3cbec2ae94cb58594fe247253621 | refs/heads/master | 2020-04-17T03:35:57.762513 | 2017-02-06T17:17:58 | 2017-02-06T17:17:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,385 | java | /**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.viz.collaboration.comm.provider.event;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueParticipant;
/**
* An event that indicates that the leader of a shared display session changed
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Feb 11, 2014 njensen Initial creation
* Feb 19, 2014 2751 bclement added oldLeader field
*
* </pre>
*
* @author njensen
* @version 1.0
*/
@DynamicSerialize
public class LeaderChangeEvent {
@DynamicSerializeElement
private VenueParticipant newLeader;
@DynamicSerializeElement
private VenueParticipant oldLeader;
public LeaderChangeEvent() {
}
public LeaderChangeEvent(VenueParticipant newLeader,
VenueParticipant oldLeader) {
this.newLeader = newLeader;
this.oldLeader = oldLeader;
}
public VenueParticipant getNewLeader() {
return newLeader;
}
public void setNewLeader(VenueParticipant newLeader) {
this.newLeader = newLeader;
}
/**
* @return the oldLeader
*/
public VenueParticipant getOldLeader() {
return oldLeader;
}
/**
* @param oldLeader
* the oldLeader to set
*/
public void setOldLeader(VenueParticipant oldLeader) {
this.oldLeader = oldLeader;
}
}
| [
"joshua.t.love@saic.com"
] | joshua.t.love@saic.com |
180064b65757baec818f6778ca6cdb65a0b227d4 | 139960e2d7d55e71c15e6a63acb6609e142a2ace | /mobile_app1/module561/src/main/java/module561packageJava0/Foo14.java | 24ddea25eeab8e67059abfca21c0195cd7cf042c | [
"Apache-2.0"
] | permissive | uber-common/android-build-eval | 448bfe141b6911ad8a99268378c75217d431766f | 7723bfd0b9b1056892cef1fef02314b435b086f2 | refs/heads/master | 2023-02-18T22:25:15.121902 | 2023-02-06T19:35:34 | 2023-02-06T19:35:34 | 294,831,672 | 83 | 7 | Apache-2.0 | 2021-09-24T08:55:30 | 2020-09-11T23:27:37 | Java | UTF-8 | Java | false | false | 309 | java | package module561packageJava0;
import java.lang.Integer;
public class Foo14 {
Integer int0;
Integer int1;
public void foo0() {
new module561packageJava0.Foo13().foo3();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
}
| [
"oliviern@uber.com"
] | oliviern@uber.com |
d197673270a99c90fd5225ca06e3b10af67c500f | 17075a81497265bd94b1c7235a185e03bbe57dcc | /src/main/java/uk/ac/ebi/ena/sra/cram/impl/ByteArraySequenceBaseProvider.java | af580c540626d04a906cb31e0d6c1c75173baf67 | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | virajbdeshpande/crammer | 57194c01ee683ea1154fb095746c7540e20dc382 | 4786bfabbcf3758b5de4229204b40a471c249f59 | refs/heads/master | 2020-12-01T01:18:44.613413 | 2012-09-21T15:58:55 | 2012-09-21T15:58:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,393 | java | /*******************************************************************************
* Copyright 2012 EMBL-EBI, Hinxton outstation
*
* 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 uk.ac.ebi.ena.sra.cram.impl;
import java.io.IOException;
import java.util.Arrays;
import uk.ac.ebi.ena.sra.cram.SequenceBaseProvider;
public class ByteArraySequenceBaseProvider implements SequenceBaseProvider {
private byte[] sequence;
private boolean circular = false;
private int N_extension = 0;
public ByteArraySequenceBaseProvider(byte[] sequence) {
this.sequence = sequence;
}
@Override
public byte getBaseAt(String seqName, long position) {
if (position < sequence.length)
return sequence[(int) position];
if (circular)
return sequence[(int) (position % sequence.length)];
if (position < sequence.length + N_extension)
return 'N';
throw new RuntimeException(String.format(
"Reference position out of range: in sequence %s, length %d, position %d.", seqName, sequence.length,
position));
}
@Override
public void copyBases(String sequenceName, long from, int len, byte[] dest) throws IOException {
try {
if (from + len > sequence.length) {
Arrays.fill(dest, (byte) 'N');
System.arraycopy(sequence, (int) from, dest, 0, sequence.length - (int) from);
} else
System.arraycopy(sequence, (int) from, dest, 0, len);
} catch (ArrayIndexOutOfBoundsException e) {
System.err.printf("Offensive request: sequence %s from=%d len=%d\n", sequenceName, from, len);
throw e;
}
}
public boolean isCircular() {
return circular;
}
public void setCircular(boolean circular) {
this.circular = circular;
}
public int getN_extension() {
return N_extension;
}
public void setN_extension(int n_extension) {
N_extension = n_extension;
}
}
| [
"vadim.zalunin@gmail.com"
] | vadim.zalunin@gmail.com |
fb95f8336c8c6408d002f3f87756318e73f77658 | f1f93c5f04b0b967d08dba753b6fb74c4c9edbff | /src/main/java/pl/sdacademy/store/model/Customer.java | 811b00c20c7b77412e51f2d7f843afba2828aa26 | [] | no_license | adriankozlowski/presentation_store | e4bf9dca6cdd6c10f04d3b45d21c1069c575fe10 | d0422c51484fd7714a5bb2380433068475be1dfd | refs/heads/master | 2020-03-27T07:28:40.509338 | 2018-08-27T19:43:31 | 2018-08-27T19:43:31 | 146,193,296 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 275 | java | package pl.sdacademy.store.model;
import lombok.Data;
import java.io.Serializable;
@Data
public class Customer extends BaseModel implements Serializable {
private String name;
private String surname;
private String documentNo;
private String telephone;
}
| [
"adrian.kozlowski@outlook.com"
] | adrian.kozlowski@outlook.com |
9f530c4f18e6830c3f290ffb4239afab40298d42 | fcf495e737052b6b486be0980f04abab8fc5ae96 | /W_eclipse1_2/test/src/org/crazyit/desktop/StackWidgetService.java | 391fc5baa925e9a7d12591e7c9631751a8eed482 | [
"Apache-2.0"
] | permissive | 00wendi00/MyProject | 2141787e2f93c5007a90be7f5f927a8241de139c | 204a659c2d535d8ff588f6d926bf0edc7f417661 | refs/heads/master | 2021-01-15T10:46:57.630700 | 2015-04-19T01:35:56 | 2015-04-19T01:35:56 | 33,536,129 | 1 | 0 | null | null | null | null | GB18030 | Java | false | false | 3,031 | java | package org.crazyit.desktop;
import android.content.Context;
import android.content.Intent;
import android.widget.RemoteViews;
import android.widget.RemoteViewsService;
/**
* Description:
* <br/>网站: <a href="http://www.crazyit.org">疯狂Java联盟</a>
* <br/>Copyright (C), 2001-2014, Yeeku.H.Lee
* <br/>This program is protected by copyright laws.
* <br/>Program Name:
* <br/>Date:
* @author Yeeku.H.Lee kongyeeku@163.com
* @version 1.0
*/
public class StackWidgetService extends RemoteViewsService
{
// 重写该方法,该方法返回一个RemoteViewsFactory对象。
// RemoteViewsFactory对象的的作用类似于Adapter,
// 它负责为RemoteView中指定组件提供多个列表项。
@Override
public RemoteViewsFactory onGetViewFactory(Intent intent)
{
return new StackRemoteViewsFactory(this.getApplicationContext(),
intent); //①
}
class StackRemoteViewsFactory implements
RemoteViewsService.RemoteViewsFactory
{
// 定义一个数组来保存该组件生成的多个列表项
private int[] items = null;
private Context mContext;
public StackRemoteViewsFactory(Context context, Intent intent)
{
mContext = context;
}
@Override
public void onCreate()
{
// 初始化items数组
items = new int[] { R.drawable.bomb5, R.drawable.bomb6,
R.drawable.bomb7, R.drawable.bomb8, R.drawable.bomb9,
R.drawable.bomb10, R.drawable.bomb11, R.drawable.bomb12,
R.drawable.bomb13, R.drawable.bomb14, R.drawable.bomb15,
R.drawable.bomb16
};
}
@Override
public void onDestroy()
{
items = null;
}
// 该方法的返回值控制该对象包含多少个列表项
@Override
public int getCount()
{
return items.length;
}
// 该方法的返回值控制各位置所显示的RemoteViews
@Override
public RemoteViews getViewAt(int position)
{
// 创建RemoteViews对象,加载/res/layout目录下widget_item.xml文件
RemoteViews rv = new RemoteViews(mContext.getPackageName(),
R.layout.widget_item);
// 更新widget_item.xml布局文件中的widget_item组件
rv.setImageViewResource(R.id.widget_item,
items[position]);
// 创建Intent、用于传递数据
Intent fillInIntent = new Intent();
fillInIntent.putExtra(StackWidgetProvider.EXTRA_ITEM, position);
// 设置当单击该RemoteViews时传递fillInIntent包含的数据
rv.setOnClickFillInIntent(R.id.widget_item, fillInIntent);
// 此处使用让线程暂停0.5秒来模拟加载该组件
try
{
System.out.println("加载【" + position + "】位置的组件");
Thread.sleep(500);
}
catch (InterruptedException e)
{
e.printStackTrace();
}
return rv;
}
@Override
public RemoteViews getLoadingView()
{
return null;
}
@Override
public int getViewTypeCount()
{
return 1;
}
@Override
public long getItemId(int position)
{
return position;
}
@Override
public boolean hasStableIds()
{
return true;
}
@Override
public void onDataSetChanged()
{
}
}
}
| [
"842876912@qq.com"
] | 842876912@qq.com |
a98fb706a9b8d3c1e9460107c7cda9041975ecf4 | 4ca781c1f036a74365b5998c4be457a9d83ff9f0 | /chat-websockets-master/src/main/java/com/tatsinktechnologic/chat/repository/exceptions/IllegalOrphanException.java | 546337e138acc7a91cdcfc3ae88209731d7782d3 | [
"Apache-2.0",
"MIT"
] | permissive | olivier741/services | 30d9214de548af3f1599ee661ad4e3bfcee3ee47 | c73d139240f8490d58c4847cb4bf37a83b6c91f7 | refs/heads/service-v1.0 | 2023-01-22T10:52:36.284033 | 2020-05-11T19:57:22 | 2020-05-11T19:57:22 | 235,608,783 | 0 | 1 | Apache-2.0 | 2023-01-11T19:51:46 | 2020-01-22T15:58:52 | Java | UTF-8 | Java | false | false | 582 | java | package com.tatsinktechnologic.chat.repository.exceptions;
import java.util.ArrayList;
import java.util.List;
public class IllegalOrphanException extends Exception {
private List<String> messages;
public IllegalOrphanException(List<String> messages) {
super((messages != null && messages.size() > 0 ? messages.get(0) : null));
if (messages == null) {
this.messages = new ArrayList<String>();
}
else {
this.messages = messages;
}
}
public List<String> getMessages() {
return messages;
}
}
| [
"oliviertatsink@gmail.com"
] | oliviertatsink@gmail.com |
14cdccbee3eb359a0b298c30585ac42a3c01fe25 | c2bff73ce0a75637269f75a7317d91f3e6e8d098 | /ex06/src/main/java/org/zerock/controller/UploadController.java | d90fb73fc325d6cf9a6f103477cc853790f5f998 | [] | no_license | ohet9409/Spring_Study | b62c3754e1734a81ea44aad2abf8fab052da211b | 5d623dbd9b94408ffe32ee708656396978ddd403 | refs/heads/master | 2022-12-23T10:09:30.913079 | 2020-10-11T01:09:02 | 2020-10-11T01:09:02 | 244,122,780 | 0 | 0 | null | 2022-12-16T01:02:46 | 2020-03-01T09:41:47 | HTML | UHC | Java | false | false | 7,986 | java | package org.zerock.controller;
import java.io.File;
import java.io.FileOutputStream;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.nio.file.Files;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.UUID;
import org.springframework.core.io.FileSystemResource;
import org.springframework.core.io.Resource;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.util.FileCopyUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import org.zerock.domain.AttachFileDTO;
import lombok.extern.log4j.Log4j;
import net.coobird.thumbnailator.Thumbnailator;
@Controller
@Log4j
public class UploadController {
@PostMapping("/deleteFile")
@ResponseBody
public ResponseEntity<String> deleteFile(String fileName, String type) {
log.info("deleteFile: " + fileName);
File file;
try {
file = new File("c:\\upload\\" + URLDecoder.decode(fileName, "UTF-8"));
file.delete();
if (type.equals("image")) {
String largeFileName = file.getAbsolutePath().replace("s_", "");
log.info("largeFileName: " + largeFileName);
file = new File(largeFileName);
file.delete();
}
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
return new ResponseEntity<>(HttpStatus.NOT_FOUND);
}
return new ResponseEntity<String>("deleted", HttpStatus.OK);
}
@GetMapping("/uploadForm")
public void uploadForm() {
log.info("upload form");
}
@PostMapping("/uploadFormAction")
public void uploadFormPoat(MultipartFile[] uploadFile, Model model) {
log.info("aaaa");
log.info(uploadFile.length);
String uploadFolder = "C:\\upload";
for (MultipartFile multipartFile : uploadFile) {
log.info("-------------------------");
log.info("Upload File Name: " + multipartFile.getOriginalFilename());
log.info("Upload File Size: " + multipartFile.getSize());
File saveFile = new File(uploadFolder, multipartFile.getOriginalFilename());
try {
multipartFile.transferTo(saveFile);
} catch (Exception e) {
log.error(e.getMessage());
}
}
}
@GetMapping("/uploadAjax")
public void uploadAjax() {
log.info("upload Ajax");
}
@PostMapping(value="/uploadAjaxAction", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@ResponseBody
public ResponseEntity<List<AttachFileDTO>> uploadAjaxPost(MultipartFile[] uploadFile) {
log.info("update ajax post.......");
List<AttachFileDTO> list = new ArrayList<>();
String uploadFolder = "C:\\upload";
String uploadFolderPath = getFolder();
// make folder -----------
File uploadPath = new File(uploadFolder, uploadFolderPath);
System.out.println("upload path: " + uploadPath);
// 폴더가 존재하지 않으면 폴더 생성
if (uploadPath.exists() == false) {
uploadPath.mkdirs();
}
// make yyyy/MM/dd folder
for (MultipartFile multipartFile : uploadFile) {
AttachFileDTO attachDTO = new AttachFileDTO();
log.info("--------------------");
log.info("Upload File Name: " + multipartFile.getOriginalFilename());
log.info("Upload File Size: " + multipartFile.getSize());
String uploadFileName = multipartFile.getOriginalFilename();
// IE has file path
uploadFileName = uploadFileName.substring(uploadFileName.lastIndexOf("\\") + 1);
log.info("only file name: " + uploadFileName);
attachDTO.setFileName(uploadFileName);
// 중복 방지를 위한 UUID 적용
UUID uuid = UUID.randomUUID();
uploadFileName = uuid.toString() + "_" + uploadFileName;
File saveFile = new File(uploadPath, uploadFileName);
try {
// 업로드한 파일 데이터를 지정한 파일에 저장한다.
multipartFile.transferTo(saveFile);
attachDTO.setUuid(uuid.toString());
attachDTO.setUploadPath(uploadFolderPath);
// check image type file
if (checkImageType(saveFile)) {
attachDTO.setImage(true);
FileOutputStream thumbnail = new FileOutputStream(new File(uploadPath, "s_" + uploadFileName));
Thumbnailator.createThumbnail(multipartFile.getInputStream(), thumbnail, 100, 100);
thumbnail.close();
}
// add to list
list.add(attachDTO);
System.out.println("image: " + attachDTO.isImage());
} catch (Exception e) {
log.error(e.getMessage());
} // end catch
} // end for
return new ResponseEntity<>(list, HttpStatus.OK);
}
// 년/월/일 폴더의 생성
private String getFolder() {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date date = new Date();
String str = sdf.format(date);
return str.replace("-", File.separator);
}
// 업로드된 파일이 이미지파일인지 확인
private boolean checkImageType(File file) {
try {
String contentType = Files.probeContentType(file.toPath());
System.out.println("contentType: " + contentType.toString());
return contentType.startsWith("image");
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
}
return false;
}
// 특정한 파일 이름을 받아서 이미지 데이터를 전송하는 코드
@GetMapping("/display")
@ResponseBody
public ResponseEntity<byte[]> getFile(String fileName) {
log.info("fileName: " + fileName);
File file = new File("c:\\upload\\" + fileName);
log.info("file: " + file);
ResponseEntity<byte[]> result = null;
try {
HttpHeaders headers = new HttpHeaders();
headers.add("Content-Type", Files.probeContentType(file.toPath()));
log.info("headers: "+ headers.toString());
log.info("file: "+ FileCopyUtils.copyToByteArray(file));
result = new ResponseEntity<>(FileCopyUtils.copyToByteArray(file),headers,HttpStatus.OK);
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
}
return result;
}
@GetMapping(value = "/download", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
@ResponseBody
public ResponseEntity<Resource> downloadFile(@RequestHeader("User-Agent") String userAgent, String fileName) {
log.info("download file: " + fileName);
Resource resource = new FileSystemResource("C:\\upload\\" + fileName);
if (resource.exists() == false) {
return new ResponseEntity<>(HttpStatus.NOT_FOUND);
}
log.info("resource: " + resource);
String resourceName = resource.getFilename();
// remove UUID
String resourceOriginalName = resourceName.substring(resourceName.indexOf("_")+1);
HttpHeaders headers = new HttpHeaders();
try {
String downloadName = null;
log.info("userAgent: " + userAgent.toString());
if(userAgent.contains("Trident")) {
log.info("IE browser");
downloadName = URLEncoder.encode(resourceOriginalName, "UTF-8").replaceAll("\\+", " ");
} else if(userAgent.contains("Edge")) {
log.info("Edge browser");
downloadName = URLEncoder.encode(resourceOriginalName, "UTF-8");
log.info("Edge name: " + downloadName);
} else {
log.info("Chrome browser");
downloadName = new String(resourceOriginalName.getBytes("UTF-8"), "ISO-8859-1");
}
//headers.add("Content-Disposition", "attachment; filename=" + new String(resourceName.getBytes("UTF-8"), "ISO-8859-1"));
headers.add("Content-Disposition", "attachment; filename=" + downloadName);
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
}
return new ResponseEntity<Resource>(resource, headers, HttpStatus.OK);
}
}
| [
"dhdmsxor1@naver.com"
] | dhdmsxor1@naver.com |
061b955e2157a64547da5b4005ec22dc15ea1f13 | 0e0b9c6ab7c09ad92af642a779a98c28238d6d97 | /src/com/junpenghe/java/basic/polymophism/cleanup/Amphibian.java | c632386f2d6e9e478a45bfcdc3afad5c9ba45807 | [] | no_license | Junpengalaitp/java-learning-note | 0d141ba11f04d1bc27222fb91a621e1fd3514f3b | 218271f06707f0abeba302c1f0979ec27c874ec4 | refs/heads/master | 2023-04-08T05:25:43.384366 | 2021-04-26T09:39:11 | 2021-04-26T09:39:11 | 305,915,215 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 473 | java | package com.junpenghe.java.basic.polymophism.cleanup;
public class Amphibian extends Animal {
private Characteristic p = new Characteristic("can live in water");
private Description t = new Description("Both water and land");
Amphibian() {
System.out.println("Amphibian()");
}
@Override
protected void dispose() {
System.out.println("Amphibian dispose");
t.dispose();
p.dispose();
super.dispose();
}
}
| [
"hejunpeng2012@hotmail.com"
] | hejunpeng2012@hotmail.com |
d4e2c13e6f2524e153260950e9f4eb8e9d213000 | 173ee15a41be8ad81a053716ef06a75dcf29dec1 | /src/com/sforce/soap/enterprise/sobject/SObject.java | b498ad93d1eaf68e2ca304e5335499437b40592e | [] | no_license | des-albert/gustFX | b0c1ca1619cf76b6617b2eea49e65bb5b437afd3 | cbcf0f10cb8e62fb5dbfde89f97b84b272f7d9d5 | refs/heads/master | 2020-06-12T15:06:23.066047 | 2020-04-07T19:55:16 | 2020-04-07T19:55:16 | 194,340,150 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,076 | java | package com.sforce.soap.enterprise.sobject;
/**
* This is a generated class for the SObject Enterprise API.
* Do not edit this file, as your changes will be lost.
*/
public class SObject implements com.sforce.ws.bind.XMLizable {
/**
* Constructor
*/
public SObject() {}
/* Cache the typeInfo instead of declaring static fields throughout*/
private transient java.util.Map<String, com.sforce.ws.bind.TypeInfo> typeInfoCache = new java.util.HashMap<String, com.sforce.ws.bind.TypeInfo>();
private com.sforce.ws.bind.TypeInfo _lookupTypeInfo(String fieldName, String namespace, String name, String typeNS, String type, int minOcc, int maxOcc, boolean elementForm) {
com.sforce.ws.bind.TypeInfo typeInfo = typeInfoCache.get(fieldName);
if (typeInfo == null) {
typeInfo = new com.sforce.ws.bind.TypeInfo(namespace, name, typeNS, type, minOcc, maxOcc, elementForm);
typeInfoCache.put(fieldName, typeInfo);
}
return typeInfo;
}
/**
* element : fieldsToNull of type {http://www.w3.org/2001/XMLSchema}string
* java type: java.lang.String[]
*/
private boolean fieldsToNull__is_set = false;
private java.lang.String[] fieldsToNull = new java.lang.String[0];
public java.lang.String[] getFieldsToNull() {
return fieldsToNull;
}
public void setFieldsToNull(java.lang.String[] fieldsToNull) {
this.fieldsToNull = fieldsToNull;
fieldsToNull__is_set = true;
}
protected void setFieldsToNull(com.sforce.ws.parser.XmlInputStream __in,
com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException {
__in.peekTag();
if (__typeMapper.isElement(__in, _lookupTypeInfo("fieldsToNull", "urn:sobject.enterprise.soap.sforce.com","fieldsToNull","http://www.w3.org/2001/XMLSchema","string",0,-1,true))) {
setFieldsToNull((java.lang.String[])__typeMapper.readObject(__in, _lookupTypeInfo("fieldsToNull", "urn:sobject.enterprise.soap.sforce.com","fieldsToNull","http://www.w3.org/2001/XMLSchema","string",0,-1,true), java.lang.String[].class));
}
}
private void writeFieldFieldsToNull(com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException {
__typeMapper.writeObject(__out, _lookupTypeInfo("fieldsToNull", "urn:sobject.enterprise.soap.sforce.com","fieldsToNull","http://www.w3.org/2001/XMLSchema","string",0,-1,true), fieldsToNull, fieldsToNull__is_set);
}
/**
* element : Id of type {urn:enterprise.soap.sforce.com}ID
* java type: java.lang.String
*/
private boolean Id__is_set = false;
private java.lang.String Id;
public java.lang.String getId() {
return Id;
}
public void setId(java.lang.String Id) {
this.Id = Id;
Id__is_set = true;
}
protected void setId(com.sforce.ws.parser.XmlInputStream __in,
com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException {
__in.peekTag();
if (__typeMapper.verifyElement(__in, _lookupTypeInfo("Id", "urn:sobject.enterprise.soap.sforce.com","Id","urn:enterprise.soap.sforce.com","ID",1,1,true))) {
setId(__typeMapper.readString(__in, _lookupTypeInfo("Id", "urn:sobject.enterprise.soap.sforce.com","Id","urn:enterprise.soap.sforce.com","ID",1,1,true), java.lang.String.class));
}
}
private void writeFieldId(com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException {
__typeMapper.writeObject(__out, _lookupTypeInfo("Id", "urn:sobject.enterprise.soap.sforce.com","Id","urn:enterprise.soap.sforce.com","ID",1,1,true), Id, Id__is_set);
}
/**
*/
@Override
public void write(javax.xml.namespace.QName __element,
com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper)
throws java.io.IOException {
__out.writeStartTag(__element.getNamespaceURI(), __element.getLocalPart());
writeFields(__out, __typeMapper);
__out.writeEndTag(__element.getNamespaceURI(), __element.getLocalPart());
}
protected void writeFields(com.sforce.ws.parser.XmlOutputStream __out,
com.sforce.ws.bind.TypeMapper __typeMapper)
throws java.io.IOException {
writeFields1(__out, __typeMapper);
}
@Override
public void load(com.sforce.ws.parser.XmlInputStream __in,
com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException {
__typeMapper.consumeStartTag(__in);
loadFields(__in, __typeMapper);
__typeMapper.consumeEndTag(__in);
}
protected void loadFields(com.sforce.ws.parser.XmlInputStream __in,
com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException {
loadFields1(__in, __typeMapper);
}
@Override
public String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder();
sb.append("[SObject ");
toString1(sb);
sb.append("]\n");
return sb.toString();
}
private void toStringHelper(StringBuilder sb, String name, Object value) {
sb.append(' ').append(name).append("='").append(com.sforce.ws.util.Verbose.toString(value)).append("'\n");
}
private void writeFields1(com.sforce.ws.parser.XmlOutputStream __out,
com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException {
writeFieldFieldsToNull(__out, __typeMapper);
writeFieldId(__out, __typeMapper);
}
private void loadFields1(com.sforce.ws.parser.XmlInputStream __in,
com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException {
setFieldsToNull(__in, __typeMapper);
setId(__in, __typeMapper);
}
private void toString1(StringBuilder sb) {
toStringHelper(sb, "fieldsToNull", fieldsToNull);
toStringHelper(sb, "Id", Id);
}
}
| [
"dalbert@cray.com"
] | dalbert@cray.com |
e09d253fd64858c799b16feadd15b9f256abd29f | 3db0a3f26dcb4b695e135386ac22c7f360b38a81 | /app/src/main/java/com/zhkj/syyj/model/ShoppingAddressUpdateModel.java | 8e3401b584709d1f78991e0bb63edf09ab194136 | [] | no_license | PursueMxy/syyj | 2fcc2cd678087923cdff13adc603e2941f135da6 | 4754afc89988de7c52aca4f8ee314cee052305fb | refs/heads/master | 2020-07-11T17:07:29.078259 | 2019-12-17T09:53:13 | 2019-12-17T09:53:13 | 204,600,946 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,569 | java | package com.zhkj.syyj.model;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.StringCallback;
import com.lzy.okgo.model.Response;
import com.zhkj.syyj.Utils.RequstUrlUtils;
import com.zhkj.syyj.contract.ShoppingAddressUpdateContract;
import com.zhkj.syyj.presenter.ShoppingAddressUpdatePresenter;
public class ShoppingAddressUpdateModel implements ShoppingAddressUpdateContract.Model {
//更改收货地址
@Override
public void PostAddressUpdate(final ShoppingAddressUpdatePresenter addressUpdatePresenter, String uid, String token, String address_id, String mobile, String consignee, String province, String city, String district, String twon, String address, String zipcode, String is_default) {
OkGo.<String>post(RequstUrlUtils.URL.SaveAddress)
.params("uid",uid)
.params("token",token)
.params("address_id",address_id)
.params("mobile",mobile)
.params("consignee",consignee)
.params("province",province)
.params("city",city)
.params("district",district)
.params("twon",twon)
.params("address",address)
.params("zipcode",zipcode)
.params("is_default",is_default)
.execute(new StringCallback() {
@Override
public void onSuccess(Response<String> response) {
addressUpdatePresenter.SetAddressUpdate(response.body());
}
});
}
}
| [
"971679951@qq.com"
] | 971679951@qq.com |
1a3f9c92983379fdd029a675d7aafc4ab8c08169 | b91c3cae00cd14c5bed4325208cba07a4393d930 | /java/functional-java/src/main/java/com/revature/models/Animal.java | 9c84354e3a86ea1cb81726cf4036651bbfbe4936 | [
"MIT"
] | permissive | 210119-java-enterprise/demos | 79c4161a1a51b069d6bc197b859e73928e7bf07a | 6ddc72ce74f466df2b910ed88c967175d135c148 | refs/heads/main | 2023-03-26T17:59:30.855358 | 2021-03-24T19:06:57 | 2021-03-24T19:06:57 | 328,815,375 | 2 | 0 | MIT | 2021-03-19T21:00:51 | 2021-01-11T23:13:51 | Java | UTF-8 | Java | false | false | 135 | java | package com.revature.models;
public abstract class Animal {
public abstract void eat();
public abstract void makeSound();
}
| [
"wezley.singleton@gmail.com"
] | wezley.singleton@gmail.com |
3b72783838b8acf5822ceec5195353a11da6aac1 | 95e986913318deccc1b60236813092cdd8aa9af9 | /src/main/java/microsoft/exchange/webservices/data/ResponseObjectSchema.java | fc707470527262197e52c16981f26f8db6d761fb | [
"MIT"
] | permissive | Lauragra/ews-java-api | 69e49282b7c76e0780189675961cab8f08485471 | c0f1a7149f60f6193cc7fd45d795fbdfa95e5ed2 | refs/heads/master | 2021-01-22T08:38:17.078674 | 2014-09-11T17:55:49 | 2014-09-11T17:55:49 | 23,811,327 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,846 | java | /**************************************************************************
* copyright file="ResponseObjectSchema.java" company="Microsoft"
* Copyright (c) Microsoft Corporation. All rights reserved.
*
* Defines the ResponseObjectSchema.java.
**************************************************************************/
package microsoft.exchange.webservices.data;
import java.util.EnumSet;
/**
* Represents ResponseObject schema definition.
*/
class ResponseObjectSchema extends ServiceObjectSchema {
/** The Reference item id. */
public static PropertyDefinition ReferenceItemId =
new ComplexPropertyDefinition<ItemId>(
ItemId.class,
XmlElementNames.ReferenceItemId, EnumSet.of(
PropertyDefinitionFlags.AutoInstantiateOnRead,
PropertyDefinitionFlags.CanSet),
ExchangeVersion.Exchange2007_SP1,
new ICreateComplexPropertyDelegate<ItemId>() {
public ItemId createComplexProperty() {
return new ItemId();
};
});
/** The Body prefix. */
public static final PropertyDefinition BodyPrefix =
new ComplexPropertyDefinition<MessageBody>(
MessageBody.class,
XmlElementNames.NewBodyContent, EnumSet
.of(PropertyDefinitionFlags.CanSet),
ExchangeVersion.Exchange2007_SP1,
new ICreateComplexPropertyDelegate<MessageBody>() {
public MessageBody createComplexProperty() {
return new MessageBody();
};
});
/** This must be declared after the property definitions. */
protected static final ResponseObjectSchema Instance =
new ResponseObjectSchema();
/**
* Registers properties. IMPORTANT NOTE: PROPERTIES MUST BE REGISTERED IN
* SCHEMA ORDER (i.e. the same order as they are defined in types.xsd)
*/
@Override
protected void registerProperties() {
super.registerProperties();
this.registerProperty(ResponseObjectSchema.ReferenceItemId);
}
} | [
"vboctor@microsoft.com"
] | vboctor@microsoft.com |
a8c5fdc3ef9097e62c7f3013fc49381f74195627 | 9d93eadf80abc6f6e441451bbc1594161eedced6 | /src/java/hrms/dao/payroll/tpschedule/TPFScheduleDAO.java | 467361cc53654108f39cd0d3fd79b057e16e9d24 | [] | no_license | durgaprasad2882/HRMSOpenSourceFor466anydesk | 1bac7eb2e231a4fb3389b6b1cb8fb4384a757522 | e7ef76f77d7ecf98464e9bcccc2246b2091efeb4 | refs/heads/main | 2023-06-29T16:26:04.663376 | 2021-08-05T09:19:02 | 2021-08-05T09:19:02 | 392,978,868 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 337 | java | package hrms.dao.payroll.tpschedule;
import hrms.model.common.CommonReportParamBean;
import java.util.List;
public interface TPFScheduleDAO {
public List getEmployeeWiseTPFList(String billno);
public List getTPFAbstract(String billno);
public CommonReportParamBean getCommonReportParameter(String billNo);
}
| [
"dm.prasad@hotmail.com"
] | dm.prasad@hotmail.com |
a5e60ba1d5c130608772cf0aa469d9ea907eeb5e | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Chart/24/org/jfree/chart/encoders/EncoderUtil_encode_117.java | 4647859f6218942d98633a726267bb26313ae2fe | [] | 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 | 828 | java |
org jfree chart encod
collect util method encod imag return
write directli output stream outputstream
encod util encoderutil
encod imag specif format
param imag imag encod
param format link imag format imageformat
param qualiti qualiti imag encod support
imag encod imageencod
param encod alpha encodealpha encod alpha transpar support
imag encod imageencod
encod imag
except ioexcept
encod buffer imag bufferedimag imag string format
qualiti encod alpha encodealpha
except ioexcept
imag encod imageencod imag encod imageencod
imag encod factori imageencoderfactori instanc newinst format qualiti encod alpha encodealpha
imag encod imageencod encod imag
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
09fa6f971278546c8456be6636c87f8565dd1897 | e1e5bd6b116e71a60040ec1e1642289217d527b0 | /H5/L2Mythras/L2Mythras_2017_07_12/dist/gameserver/data/scripts/quests/_382_KailsMagicCoin.java | f9c37c66e54f95503bc9cc46a8f9f81f443b3d5d | [] | no_license | serk123/L2jOpenSource | 6d6e1988a421763a9467bba0e4ac1fe3796b34b3 | 603e784e5f58f7fd07b01f6282218e8492f7090b | refs/heads/master | 2023-03-18T01:51:23.867273 | 2020-04-23T10:44:41 | 2020-04-23T10:44:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,809 | java | package quests;
import java.util.HashMap;
import java.util.Map;
import l2f.commons.util.Rnd;
import l2f.gameserver.data.xml.holder.MultiSellHolder;
import l2f.gameserver.model.instances.NpcInstance;
import l2f.gameserver.model.quest.Quest;
import l2f.gameserver.model.quest.QuestState;
import l2f.gameserver.scripts.ScriptFile;
public class _382_KailsMagicCoin extends Quest implements ScriptFile
{
//Quest items
private static int ROYAL_MEMBERSHIP = 5898;
//NPCs
private static int VERGARA = 30687;
//MOBs and CHANCES
private static final Map<Integer, int[]> MOBS = new HashMap<Integer, int[]>();
static
{
MOBS.put(21017, new int[]{5961}); // Fallen Orc
MOBS.put(21019, new int[]{5962}); // Fallen Orc Archer
MOBS.put(21020, new int[]{5963}); // Fallen Orc Shaman
MOBS.put(21022, new int[]{
5961,
5962,
5963
}); // Fallen Orc Captain
//MOBS.put(21258, new int[] { 5961, 5962, 5963 }); // Fallen Orc Shaman - WereTiger
//MOBS.put(21259, new int[] { 5961, 5962, 5963 }); // Fallen Orc Shaman - WereTiger, transformed
}
@Override
public void onLoad()
{
}
@Override
public void onReload()
{
}
@Override
public void onShutdown()
{
}
public _382_KailsMagicCoin()
{
super(false);
addStartNpc(VERGARA);
for (int mobId : MOBS.keySet())
addKillId(mobId);
}
@Override
public String onEvent(String event, QuestState st, NpcInstance npc)
{
String htmltext = event;
if (event.equalsIgnoreCase("head_blacksmith_vergara_q0382_03.htm"))
if (st.getPlayer().getLevel() >= 55 && st.getQuestItemsCount(ROYAL_MEMBERSHIP) > 0)
{
st.setCond(1);
st.setState(STARTED);
st.playSound(SOUND_ACCEPT);
}
else
{
htmltext = "head_blacksmith_vergara_q0382_01.htm";
st.exitCurrentQuest(true);
}
else if (event.equalsIgnoreCase("list"))
{
MultiSellHolder.getInstance().SeparateAndSend(382, st.getPlayer(), 0);
htmltext = null;
}
return htmltext;
}
@Override
public String onTalk(NpcInstance npc, QuestState st)
{
String htmltext = "noquest";
int cond = st.getCond();
if (st.getQuestItemsCount(ROYAL_MEMBERSHIP) == 0 || st.getPlayer().getLevel() < 55)
{
htmltext = "head_blacksmith_vergara_q0382_01.htm";
st.exitCurrentQuest(true);
}
else if (cond == 0)
htmltext = "head_blacksmith_vergara_q0382_02.htm";
else
htmltext = "head_blacksmith_vergara_q0382_04.htm";
return htmltext;
}
@Override
public String onKill(NpcInstance npc, QuestState st)
{
if (st.getState() != STARTED || st.getQuestItemsCount(ROYAL_MEMBERSHIP) == 0)
return null;
int[] droplist = MOBS.get(npc.getNpcId());
st.rollAndGive(droplist[Rnd.get(droplist.length)], 1, 10);
return null;
}
} | [
"64197706+L2jOpenSource@users.noreply.github.com"
] | 64197706+L2jOpenSource@users.noreply.github.com |
1fce4167d6933fab16c2ef7365cda2b873ed86a0 | 60478ed6022a36ffb82db2413d0485f2eafab128 | /gps-service/src/main/java/com/mljr/gps/facade/GpsApprovalBackFacade.java | 6661d99a73ae5b609737bf19a4833b0d082d8f42 | [] | no_license | haitaogoon496/gps-web | dba4774bcc41eee2b8cd89efac8ee09b0ec5faeb | 794e141d2ee6d16572b24dd910e49c0209b7d0e7 | refs/heads/master | 2023-02-09T22:21:52.948079 | 2021-01-01T03:32:38 | 2021-01-01T03:32:38 | 325,910,671 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,179 | java | package com.mljr.gps.facade;
import com.alibaba.fastjson.JSON;
import com.lyqc.base.common.Result;
import com.lyqc.base.enums.AppInfoStatusEnum;
import com.lyqc.base.enums.GpsHistoryConstant;
import com.lyqc.base.enums.RemoteEnum;
import com.lyqc.gpsprovider.enums.CarGpsConstant;
import com.lyqc.gpsweb.enums.GpsApprovalBackEnum;
import com.mljr.annotation.LogMonitor;
import com.mljr.enums.LogTitleEnum;
import com.mljr.gps.component.GpsComponent;
import com.mljr.gps.entity.AppInfo;
import com.mljr.gps.entity.GpsHistory;
import com.mljr.gps.form.GpsApprovalBackForm;
import com.mljr.gps.service.AppInfoService;
import com.mljr.gps.service.GpsApproveService;
import com.mljr.gps.service.GpsHistoryService;
import com.mljr.gps.service.GpsOperateRecordService;
import com.mljr.util.CollectionsTools;
import com.mljr.util.StringTools;
import com.mljr.util.TimeTools;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.List;
import java.util.Optional;
/**
* @description: GPS审批退回
* @author zhaoxin
* @date 2018/7/6 下午3:41
**/
@Component
public class GpsApprovalBackFacade {
private final Logger LOGGER = LoggerFactory.getLogger(this.getClass());
private final String LOG_TITLE = LogTitleEnum.GPS_APPROVAL_BACK.getName();
@Autowired
private AppInfoService appInfoService;
@Autowired
private GpsOperateRecordService gpsOperateRecordService;
@Autowired
private GpsApproveService gpsApproveService;
@Autowired
private GpsComponent gpsComponent;
@Autowired
private GpsHistoryService gpsHistoryService;
@LogMonitor("GPS审批退回操作")
@Transactional(rollbackFor = Exception.class)
public Result<String> updateGpsInfo(String appCode) {
if (StringTools.isEmpty(appCode)){
return Result.fail(RemoteEnum.ERROR_WITH_EMPTY_PARAM);
}
AppInfo appInfo = appInfoService.queryAppInfo(appCode);
if(null == appInfo){
LOGGER.info("updateGpsInfo appCode={}信息不存在",appCode);
return Result.fail(RemoteEnum.FAILURE,"申请单不存在");
}
//判断订单状态,不是终审审批通过的订单不进行GPS审批信息修改操作
AppInfoStatusEnum appInfoStatusEnum = AppInfoStatusEnum.getByIndex(Integer.parseInt(appInfo.getStatus()));
final boolean predicate = AppInfoStatusEnum._17 == appInfoStatusEnum;
if (!predicate){
LOGGER.info("GPS审核退回, appCode={},status={} 不支持修改GPS安装状态", appCode, appInfo.getStatus());
return Result.suc("当前订单状态不允许修改GPS审批信息");
}
//判断gps是否安装
if(null != appInfo.getIsGps()){
CarGpsConstant.AppInfoIsGpsEnum isGpsEnum = CarGpsConstant.AppInfoIsGpsEnum.getByIndex(Integer.valueOf(appInfo.getIsGps()));
if(isGpsEnum != CarGpsConstant.AppInfoIsGpsEnum.UNINSTALL){
//修改信息
gpsComponent.updateAppInfo(caAppInfo -> {
caAppInfo.setAppCode(appCode);
caAppInfo.setIsGps(String.valueOf(CarGpsConstant.AppInfoIsGpsEnum.UNINSTALL.getIndex()));
});
}
}
this.gpsApproveService.backApprove(appInfo.getAppCode(),(x)-> predicate);
return Result.suc("GPS审核退回操作成功");
}
@LogMonitor("GPS审批退回添加操作记录")
public Result<String> insertOperateRecord(GpsApprovalBackForm form) {
if (form == null){
return Result.fail(RemoteEnum.ERROR_WITH_EMPTY_PARAM);
}
String approvalName = GpsApprovalBackEnum.getNameByIndex(form.getApprovalType());
try {
Integer submitUserId = Optional.ofNullable(form.getUserId()).orElse(-1);
String submitUserName = Optional.ofNullable(form.getUserName()).orElse("系统");
gpsOperateRecordService.createSubmitRecord(form.getAppCode(), submitUserId, submitUserName,(record) -> record.setRemark(approvalName));
LOGGER.info("{}添加GPS审批操作记录成功,appCode={},submitDTO={}",approvalName,form.getAppCode(), JSON.toJSON(form));
GpsHistory gpsHistory = gpsHistoryService.queryRecordNoApprove(form.getAppCode());
LOGGER.info("{}查看GPS历史记录表中是否有未审批记录,appCode={},gpsHistory={}",approvalName,form.getAppCode(), JSON.toJSON(gpsHistory));
if (gpsHistory != null){
LOGGER.info("{}GPS历史记录表中有未审批记录,appCode={},gpsHistory={}",approvalName,form.getAppCode(), JSON.toJSON(gpsHistory));
gpsHistory.setApprovalStatus(GpsHistoryConstant.GpsApprovalStatusEnum.REJECTED.getIndex());
gpsHistory.setApprovalIdea(approvalName);
gpsHistory.setApprovalProps(1,"系统",TimeTools.format4YYYYMMDDHHMISS(TimeTools.createNowTime()));
gpsHistory.setInstallStatus(GpsHistoryConstant.GpsInstallStatusEnum.INSTALLED.getIndex());
gpsHistoryService.updateCarGpsById(gpsHistory);
}
}catch (Exception e){
LOGGER.error("{}添加GPS审批操作记录异常,appCode={},submitDTO={}",approvalName,form.getAppCode(), JSON.toJSON(form),e);
return Result.fail(RemoteEnum.ERROR_IN_BUSINESS,"添加GPS审批操作记录失败");
}
return Result.suc();
}
@LogMonitor("直接审批经理跑批处理")
public Result<String> bactchUpdateGpsApprovalInfo(GpsApprovalBackForm form) {
if (form == null){
return Result.fail(RemoteEnum.ERROR_WITH_EMPTY_PARAM);
}
List<String> appCodes = Optional.ofNullable(form.getAppCodeList()).orElse(CollectionsTools.emptyList());
appCodes.forEach(appCode -> updateGpsInfo(appCode));
return Result.suc();
}
}
| [
"371564370@qq.com"
] | 371564370@qq.com |
5c693d1618eaaeba207379df5337841375549bb1 | 1f56143d9f8ab4e647a1ef03f9134778b299a674 | /app/src/main/java/com/example/dhy203dydhx/CustomToolBar.java | 31c19bac73729d22ae201b3e9cc3a92f0a30153e | [] | no_license | mdxiaohu/androidDydSeafood | 5e3f7f583790fcb7ce0994446c0244949a6ca54b | 0a549aa8cbca9f8dd01ac87c806070581ea2497b | refs/heads/master | 2020-03-25T22:46:33.078085 | 2018-08-10T05:40:44 | 2018-08-10T05:40:44 | 144,241,573 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,656 | java | package com.example.dhy203dydhx;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
/**
* Created by IT_ZJYANG on 2016/9/9.
* 标题栏
*/
public class CustomToolBar extends LinearLayout {
private Boolean isLeftBtnVisible;
private int leftResId;
private Boolean isLeftTvVisible;
private String leftTvText;
private Boolean isRightBtnVisible;
private int rightResId;
private Boolean isRightTvVisible;
private String rightTvText;
private Boolean isTitleVisible;
private String titleText;
private int backgroundResId;
public CustomToolBar(Context context) {
this(context, null);
}
public CustomToolBar(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public CustomToolBar(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
initView(attrs);
}
/**
* 初始化属性
* @param attrs
*/
public void initView(AttributeSet attrs){
TypedArray typedArray = getContext().obtainStyledAttributes(attrs, R.styleable.CustomToolBar);
/**-------------获取左边按钮属性------------*/
isLeftBtnVisible = typedArray.getBoolean(R.styleable.CustomToolBar_left_btn_visible, false);
leftResId = typedArray.getResourceId(R.styleable.CustomToolBar_left_btn_src, -1);
/**-------------获取左边文本属性------------*/
isLeftTvVisible = typedArray.getBoolean(R.styleable.CustomToolBar_left_tv_visible, false);
if(typedArray.hasValue(R.styleable.CustomToolBar_left_tv_text)){
leftTvText = typedArray.getString(R.styleable.CustomToolBar_left_tv_text);
}
/**-------------获取右边按钮属性------------*/
isRightBtnVisible = typedArray.getBoolean(R.styleable.CustomToolBar_right_btn_visible, false);
rightResId = typedArray.getResourceId(R.styleable.CustomToolBar_right_btn_src, -1);
/**-------------获取右边文本属性------------*/
isRightTvVisible = typedArray.getBoolean(R.styleable.CustomToolBar_right_tv_visible, false);
if(typedArray.hasValue(R.styleable.CustomToolBar_right_tv_text)){
rightTvText = typedArray.getString(R.styleable.CustomToolBar_right_tv_text);
}
/**-------------获取标题属性------------*/
isTitleVisible = typedArray.getBoolean(R.styleable.CustomToolBar_title_visible, false);
if(typedArray.hasValue(R.styleable.CustomToolBar_title_text)){
titleText = typedArray.getString(R.styleable.CustomToolBar_title_text);
}
/**-------------背景颜色------------*/
backgroundResId = typedArray.getResourceId(R.styleable.CustomToolBar_barBackground, -1);
typedArray.recycle();
/**-------------设置内容------------*/
View barLayoutView = View.inflate(getContext(), R.layout.layout_common_toolbar, null);
Button leftBtn = (Button)barLayoutView.findViewById(R.id.toolbar_left_btn);
TextView leftTv = (TextView)barLayoutView.findViewById(R.id.toolbar_left_tv);
TextView titleTv = (TextView)barLayoutView.findViewById(R.id.toolbar_title_tv);
Button rightBtn = (Button)barLayoutView.findViewById(R.id.toolbar_right_btn);
TextView rightTv = (TextView)barLayoutView.findViewById(R.id.toolbar_right_tv);
RelativeLayout barRlyt = (RelativeLayout)barLayoutView.findViewById(R.id.toolbar_content_rlyt);
if(isLeftBtnVisible){
leftBtn.setVisibility(VISIBLE);
}
if(isLeftTvVisible){
leftTv.setVisibility(VISIBLE);
}
if(isRightBtnVisible){
rightBtn.setVisibility(VISIBLE);
}
if(isRightTvVisible){
rightTv.setVisibility(VISIBLE);
}
if(isTitleVisible){
titleTv.setVisibility(VISIBLE);
}
leftTv.setText(leftTvText);
rightTv.setText(rightTvText);
titleTv.setText(titleText);
if(leftResId != -1){
leftBtn.setBackgroundResource(leftResId);
}
if(rightResId != -1){
rightBtn.setBackgroundResource(rightResId);
}
if(backgroundResId != -1){
barRlyt.setBackgroundColor(getResources().getColor(R.color.bg_toolbar));
}
//将设置完成之后的View添加到此LinearLayout中
addView(barLayoutView, 0);
}
} | [
"you@example.com"
] | you@example.com |
2ea973e130bf6c7ff3c09db979e629598bbcac87 | 108dc17e407b69c4e0fe29801de3d0d919e00ea6 | /com.carrotgarden.m2e/com.carrotgarden.m2e.scr/com.carrotgarden.m2e.scr.testing/src/main/java/root00/branch12/DummyComp_15.java | 845d67f6e55f33b2639849bd40888dcc5a5675eb | [
"BSD-3-Clause"
] | permissive | barchart/carrot-eclipse | c017013e4913a1ba9b1f651778026be329802809 | 50f4433c0996646fd96593cabecaeeb1de798426 | refs/heads/master | 2023-08-31T05:54:26.725744 | 2013-06-23T21:18:15 | 2013-06-23T21:18:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,008 | java | /**
* Copyright (C) 2010-2012 Andrei Pozolotin <Andrei.Pozolotin@gmail.com>
*
* All rights reserved. Licensed under the OSI BSD License.
*
* http://www.opensource.org/licenses/bsd-license.php
*/
package root00.branch12;
import java.util.concurrent.Executor;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Property;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.osgi.service.component.annotations.ReferencePolicy;
/** should ignore runnable */
@Component(// ////
factory = "factory-15", property = { "first-name=carrot", "last-name=garden" } //
)
public class DummyComp_15 implements Cloneable, Runnable {
// ////
@Property
static final String HELLO = "hello";
@Property
static final String HELLO_AGAIN = "hello-again";
@Property
static final String THANK_YOU = "thank-yours";
@Property
static final String PROP_01 = "property with index 1";
@Property
static final String PROP_02 = "property with index 2";
@Property
static final String PROP_03 = "property with index 3";
@Property
static final String PROP_04 = "property with index 4";
@Property
static final String PROP_05 = "property with index 5";
@Property
static final String PROP_07 = "property with index 7";
@Property
static final String PROP_08 = "property with index 8";
@Property
static final String PROP_09 = "property with index 9";
@Property
static final String PROP_10 = "property with index 10";
@Property
static final String PROP_11 = "property with index 11";
//
@Reference(name = "1133-1")
void bind1(final Executor executor) {
}
void unbind1(final Executor executor) {
}
@Reference(name = "1133-2")
void bind2(final Executor executor) {
}
void unbind2(final Executor executor) {
}
@Reference(name = "1133-3")
void bind3(final Executor executor) {
}
void unbind3(final Executor executor) {
}
@Reference(name = "1133-4")
void bind4(final Executor executor) {
}
void unbind4(final Executor executor) {
}
@Reference(name = "1133-5")
void bind5(final Executor executor) {
}
void unbind5(final Executor executor) {
}
@Reference(name = "1133-6")
void bind6(final Executor executor) {
}
void unbind6(final Executor executor) {
}
@Reference(name = "1133-add/remove")
void addExec(final Executor executor) {
}
void removeExec(final Executor executor) {
}
@Reference(name = "113311-a", policy = ReferencePolicy.DYNAMIC, cardinality = ReferenceCardinality.AT_LEAST_ONE)
void set1(final Runnable tasker) {
}
void unset1(final Runnable tasker) {
}
@Reference(name = "113311-b", //
policy = ReferencePolicy.DYNAMIC,//
cardinality = ReferenceCardinality.MULTIPLE,//
target ="&(first-name=carrot)(last-name=garden)(name=11*)")
void set2(final Runnable tasker) {
}
void unset2(final Runnable tasker) {
}
// ////////////
@Override
public void run() {
}
}
////////////
////////////
////////////
| [
"Andrei.Pozolotin@gmail.com"
] | Andrei.Pozolotin@gmail.com |
10f7b0a1f734a5526512916d0a911e1a31e713e1 | f55bf2a2e2c85cd39cfa83812c0f17c830990c5a | /src/me/armar/plugins/autorank/playerchecker/requirement/BlocksPlacedRequirement.java | 5e4ac825857def8537ae60f9f1523a9b43efd6f6 | [] | no_license | enesakkaya/Autorank-2 | 3ef7257e68056347091ccfe2968cfe5cf5db85d1 | 56310ac0a17a5952dde4c6dde071802cccf6f362 | refs/heads/master | 2020-07-11T06:21:44.831697 | 2016-07-21T20:15:08 | 2016-07-21T20:15:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,551 | java | package me.armar.plugins.autorank.playerchecker.requirement;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import me.armar.plugins.autorank.language.Lang;
import me.armar.plugins.autorank.statsmanager.handlers.StatsHandler;
import me.armar.plugins.autorank.util.AutorankTools;
public class BlocksPlacedRequirement extends Requirement {
BlocksPlacedWrapper wrapper = null;
@Override
public String getDescription() {
final ItemStack item = wrapper.getItem();
final StringBuilder arg = new StringBuilder(item.getAmount() + " ");
if (wrapper.getDisplayName() != null) {
// Show displayname instead of material name
arg.append(wrapper.getDisplayName());
} else {
if (item.getType().toString().contains("AIR")) {
arg.append("blocks");
} else {
arg.append(item.getType().toString().replace("_", " ").toLowerCase());
}
if (wrapper.showShortValue()) {
arg.append(" (Dam. value: " + item.getDurability() + ")");
}
}
String lang = Lang.PLACED_BLOCKS_REQUIREMENT.getConfigValue(arg.toString());
// Check if this requirement is world-specific
if (this.isWorldSpecific()) {
lang = lang.concat(" (in world '" + this.getWorld() + "')");
}
return lang;
}
@SuppressWarnings("deprecation")
@Override
public String getProgress(final Player player) {
int progressBar = 0;
if (wrapper.getItem().getTypeId() < 0) {
progressBar = getStatsPlugin().getNormalStat(StatsHandler.statTypes.TOTAL_BLOCKS_PLACED,
player.getUniqueId(), AutorankTools.makeStatsInfo());
} else {
if (wrapper.showShortValue()) {
// Use datavalue
progressBar = getStatsPlugin().getNormalStat(StatsHandler.statTypes.BLOCKS_PLACED, player.getUniqueId(),
AutorankTools.makeStatsInfo("world", this.getWorld(), "typeID", wrapper.getItem().getTypeId(),
"dataValue", wrapper.getItem().getDurability()));
} else {
if (wrapper.getItem().getType() == Material.AIR) {
// Id was not given so only check amount
progressBar = getStatsPlugin().getNormalStat(StatsHandler.statTypes.BLOCKS_PLACED, player.getUniqueId(),
AutorankTools.makeStatsInfo("world", this.getWorld()));
} else {
// ID was given, but no data value
progressBar = getStatsPlugin().getNormalStat(StatsHandler.statTypes.BLOCKS_PLACED, player.getUniqueId(),
AutorankTools.makeStatsInfo("world", this.getWorld(), "typeID", wrapper.getItem().getTypeId()));
}
}
}
return progressBar + "/" + wrapper.getBlocksPlaced();
}
@SuppressWarnings("deprecation")
@Override
public boolean meetsRequirement(final Player player) {
if (!getStatsPlugin().isEnabled())
return false;
int progress = 0;
if (wrapper.getItem().getTypeId() < 0) {
progress = getStatsPlugin().getNormalStat(StatsHandler.statTypes.BLOCKS_PLACED, player.getUniqueId(),
AutorankTools.makeStatsInfo("world", this.getWorld(), "typeID", wrapper.getItem().getTypeId(),
"dataValue", wrapper.getItem().getDurability()));
} else {
if (wrapper.showShortValue()) {
// Use datavalue
progress = getStatsPlugin().getNormalStat(StatsHandler.statTypes.BLOCKS_PLACED, player.getUniqueId(),
AutorankTools.makeStatsInfo("world", this.getWorld(), "typeID", wrapper.getItem().getTypeId(),
"dataValue", wrapper.getItem().getDurability()));
} else {
if (wrapper.getItem().getType() == Material.AIR) {
// Id was not given so only check amount
progress = getStatsPlugin().getNormalStat(StatsHandler.statTypes.BLOCKS_PLACED, player.getUniqueId(),
AutorankTools.makeStatsInfo("world", this.getWorld()));
} else {
// ID was given, but no data value
progress = getStatsPlugin().getNormalStat(StatsHandler.statTypes.BLOCKS_PLACED, player.getUniqueId(),
AutorankTools.makeStatsInfo("world", this.getWorld(), "typeID", wrapper.getItem().getTypeId()));
}
}
}
return progress >= wrapper.getBlocksPlaced();
}
@SuppressWarnings("deprecation")
@Override
public boolean setOptions(final String[] options) {
int id = -1;
int amount = 1;
short data = 0;
String displayName = null;
boolean showShortValue = false;
boolean useDisplayName = false;
if (options.length > 0) {
amount = Integer.parseInt(options[0].trim());
}
if (options.length > 1) {
id = AutorankTools.stringtoInt(options[0]);
amount = Integer.parseInt(options[1].trim());
}
if (options.length > 2) {
data = (short) AutorankTools.stringtoInt(options[2]);
// Short value can make a difference, thus we show it.
showShortValue = true;
}
if (options.length > 3) {
// Displayname
displayName = options[3];
}
if (options.length > 4) {
// use display name?
useDisplayName = (options[4].equalsIgnoreCase("true") ? true : false);
}
// item = new ItemStack(id, 1, (short) 0, data);
final ItemStack item = new ItemStack(id, amount, data);
wrapper = new BlocksPlacedWrapper(item, displayName, showShortValue, useDisplayName);
wrapper.setBlocksPlaced(amount);
return wrapper != null && amount > 0;
}
}
class BlocksPlacedWrapper extends ItemWrapper {
private int blocksPlaced; // How many items does the player need to place?
public BlocksPlacedWrapper(ItemStack item, String displayName, boolean showShortValue, boolean useDisplayName) {
super(item, displayName, showShortValue, useDisplayName);
}
public int getBlocksPlaced() {
return blocksPlaced;
}
public void setBlocksPlaced(final int blocksPlaced) {
this.blocksPlaced = blocksPlaced;
}
}
| [
"mijnleraar@msn.com"
] | mijnleraar@msn.com |
a7193b99a47c2cf51f85a4b5c40ffad24add58c9 | c6005eb6e298d8a7c0613cf43f2287ae66996e09 | /mpbase/src/main/java/com/tangdi/production/mpbase/service/impl/FileDownloadServiceImpl.java | 7de004fead62d579376ce28a2256c5ac0d001703 | [] | no_license | taotao365s/mbpay | 5c235a1969074893f991073472fadea6645fe246 | 95fff2efd817e9b37d6aa847498c15a9a5fc8c9e | refs/heads/master | 2022-02-17T06:30:37.919937 | 2019-08-28T07:49:51 | 2019-08-28T07:49:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,379 | java | package com.tangdi.production.mpbase.service.impl;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import com.tangdi.production.mpbase.bean.FileDownloadInf;
import com.tangdi.production.mpbase.dao.FileDownloadDao;
import com.tangdi.production.mpbase.service.FileDownloadService;
/**
* 文件下载接口实现类
* @author zhengqiang
* @version 1.0
*
*/
@Service
public class FileDownloadServiceImpl implements FileDownloadService{
private static final Logger log = LoggerFactory
.getLogger(FileDownloadServiceImpl.class);
@Autowired
private FileDownloadDao dao;
@Override
public List<FileDownloadInf> getListPage(FileDownloadInf entity) throws Exception {
return dao.selectList(entity);
}
@Override
public Integer getCount(FileDownloadInf entity) throws Exception {
return dao.countEntity(entity);
}
@Override
public FileDownloadInf getEntity(FileDownloadInf entity) throws Exception {
log.debug("方法参数:"+entity.debug());
FileDownloadInf fileDownloadInf = null;
try{
fileDownloadInf = dao.selectEntity(entity);
}catch(Exception e){
throw new Exception("查询信息异常!"+e.getMessage(),e);
}
log.debug("处理结果:",fileDownloadInf.debug());
return fileDownloadInf;
}
@Override @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
public int addEntity(FileDownloadInf entity) throws Exception {
int rt = 0;
log.debug("方法参数:{}",entity.debug());
try{
rt = dao.insertEntity(entity);
log.debug("处理结果:[{}]",rt);
}catch(Exception e){
log.error(e.getMessage(),e);
throw new Exception("插入数据异常!"+e.getMessage(),e);
}
return rt;
}
@Override @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
public int modifyEntity(FileDownloadInf entity) throws Exception {
int rt = 0;
log.debug("方法参数:{}",entity.debug());
try{
rt = dao.updateEntity(entity);
log.debug("处理结果:[{}]",rt);
}catch(Exception e){
log.error(e.getMessage(),e);
throw new Exception("更新数据异常!"+e.getMessage(),e);
}
return rt;
}
@Override @Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
public int removeEntity(FileDownloadInf entity) throws Exception {
int rt = 0;
log.debug("方法参数:{}",entity.debug());
try{
rt = dao.deleteEntity(entity);
log.debug("处理结果:[{}]",rt);
}catch(Exception e){
log.error(e.getMessage(),e);
throw new Exception("删除数据异常!"+e.getMessage(),e);
}
return rt;
}
@Override
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public int removeFile(String ids) throws Exception {
String[] idList = ids.split(",");
int sum = 0;
for(String id : idList){
try {
int con = dao.deleteFile(id);
sum = sum + con;
} catch (Exception e) {
log.error("删除文件异常!", e);
throw new Exception("删除文件异常!");
}
}
return sum;
}
}
| [
"w1037704496@163.com"
] | w1037704496@163.com |
8c9c5a30760e48e3949881ef08a06025f5454129 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/4/4_aef2dd35d6d574d4154cf283bb16f1d5bc38156b/Commandspawner/4_aef2dd35d6d574d4154cf283bb16f1d5bc38156b_Commandspawner_s.java | f73dce5fa834ac786ba32f6f262314b09feb8733 | [] | 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 | 985 | java | package com.earth2me.essentials.commands;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.block.Block;
import org.bukkit.block.CreatureSpawner;
import org.bukkit.entity.CreatureType;
public class Commandspawner extends EssentialsCommand
{
public Commandspawner()
{
super("spawner");
}
@Override
protected void run(Server server, User user, String commandLabel, String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
Block target = user.getTarget().getTargetBlock();
if (target.getType() != Material.MOB_SPAWNER)
{
throw new Exception(Util.i18n("mobSpawnTarget"));
}
charge(user);
try
{
((CreatureSpawner)target).setCreatureType(CreatureType.fromName(args[0]));
}
catch (Throwable ex)
{
throw new Exception(Util.i18n("mobSpawnError"), ex);
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.