content stringlengths 263 5.24M | pred_label stringclasses 1
value | pred_score_pos float64 0.6 1 |
|---|---|---|
package algorithm;
/**
* Created by aping.foo
* N的阶乘末尾有多少个O
*
*/
public class Exercise14 {
public static void main(String[] args) {
int n = fun2(20);
System.out.println(n);
n = fun1(110);
System.out.println(n);
}
/**
* 要计算Z,最直接的方法就是求出N的阶乘的所有因式(1,2,3,...,N)分解中5的指数。... | __label__POS | 1.00001 |
package algorithm;
import java.util.HashMap;
import java.util.Map;
/**
* Created by aping.foo.
* 最大不重复字串
* 思路:用一个hashmap存放扫描过的字符和位置,记录当前不重复开始位置和最大长度已经历史不重复开始位置和最大长度
* 2个对比
* 时间复杂度 o(n)
*/
public class NoDuplication {
public static void main(String[] args) {
String s = "abcdeadfweqradf"; //目标串
... | __label__POS | 0.999844 |
package algorithm;
/**
* Created by aping.foo
* 练习题16
* 数组中出现次数超过一半的数字
* 时间复杂度 O(n)
*
* 大部分的人,可能想到的是每个元素进行遍历,来统计出现次数,那么这样时间复杂度可能会是o(n2)
* 下面咱们一起来找出一个好一点的方案
*/
public class Exercise16 {
public static void main(String[] args) {
int array[] = {1, 2, 3, 2, 2, 2, 5, 4, 6};
fun(array);
}
... | __label__POS | 1.000007 |
package org.apereo.cas.ticket.registry;
import org.apereo.cas.authentication.Authentication;
import org.apereo.cas.authentication.principal.Principal;
import org.apereo.cas.configuration.support.RelaxedPropertyNames;
import org.apereo.cas.jpa.AbstractJpaEntityFactory;
import org.apereo.cas.ticket.AuthenticationAwareTi... | __label__POS | 0.689759 |
**算法练习题**
<br>
每天一道算法题,督促自己学习
<br>
`1、QuickSort :快速排序,排序思想:分治法,时间复杂度o(nlg(n)),最坏的情况下(有序时)时间复杂度是o(n^2)`
<br>
`2、InsertSort:插入排序,排序思想:假定一个有序数组,将一个数插入到改有序数组内,时间复杂度O(n2)`
<br>
`3、Tree 二叉树构建,大于等于放右节点,小于放左节点`
<br>
`4、TreeNoRecursion 二叉树非递归遍历,前序,中序`
<br>
`5、TreeSequence 二叉树层序遍历,前序,中序`
<br>
`6、ChoiceSort 选择排序,思想,同冒泡排序一样,只是选择排... | __label__POS | 0.999587 |
package algorithm;
import java.util.concurrent.ThreadLocalRandom;
/**
* Created by aping.foo
* 在游戏里,现在有很抢红包的功能,如何让红包分散的更均匀呢
* 下面来分享一个在游戏里实现的一个红包算法
*
* 避免出现一个大包,其他都是1块
* 因为我们之前采用随机方式,结果出现了这种情况,让玩家投诉了
*/
public class Exercise10 {
public static void main(String[] args) {
System.out.println(Math.floor... | __label__POS | 1.000007 |
package algorithm;
/**
* Created by aping.foo.
* 判断点是否在扇形内,游戏里经常用到
* 通过夹角和半径距离来判断
*/
public class Exercise2 {
public static void main(String[] args) {
boolean ret = checkInSectorRange(0, 0, 10, 1, 121, 45, 15);
System.out.println(ret);
}
/**
* 方案一、 设圆点c(baseX,baseY),p(targetX,ta... | __label__POS | 0.99995 |
package algorithm;
/**
* Created by aping.foo
* 给定2个链表,找链表的交点
* 解题思路:先判断是否相交,这个只要判断最后一个节点是否相同,即可判断2个链表是否相交
* 如果相交,abs(链表1的长度-链表2的长度),长的链表先移动2个链表长度差值,然后开始同时移动,找出第一个相交节点
*/
public class Exercise9 {
/**
* 查找第一个相同的节点,
*
* @param node1
* @param node2
* @return
*/
private Node sear... | __label__POS | 0.999946 |
package bitcoin;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
/**
* Created by lucky on 2017/12/18.
*/
public class Encrypt {
/**
* 传入文本内容,返回 SHA-256 串
*
* @param strText
* @return
*/
public static String SHA256(final String strText) {
r... | __label__POS | 0.867078 |
package bitcoin;
import javax.sound.midi.Soundbank;
import java.math.BigInteger;
/**
* Created by lucky on 2017/12/18.
*/
public class ProofofworkModule {
private static final int targetBits = 24;
private static final long maxNonce = Long.MAX_VALUE;
public ProofOfWork createProofOfWork(Block block) {
... | __label__POS | 0.997123 |
package bitcoin;
import com.google.common.collect.Lists;
import com.google.inject.Inject;
import java.util.List;
/**
* Created by lucky on 2017/12/18.
*/
public class BlockModule {
private final ProofofworkModule proofofworkModule;
@Inject
public BlockModule(ProofofworkModule proofofworkModule) {
... | __label__POS | 0.976868 |
package zk;
import org.apache.curator.framework.recipes.nodes.PersistentEphemeralNode;
import org.apache.zookeeper.CreateMode;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.TimeUnit;
/**
* Created by lucky on 2017/7/18.
*/
public class FightServer {
private PersistentEphemeralNode ... | __label__POS | 0.999949 |
package zk;
import org.apache.curator.framework.recipes.nodes.PersistentNode;
import java.util.concurrent.Executors;
/**
* Created by lucky on 2017/7/18.
*/
public class ManagerServer {
public static void main(String[] args) throws Exception {
NodeDiscovery.NodeDataParser<String> PARSER = new NodeDis... | __label__POS | 0.999822 |
package zk;
import com.game.util.RandomUtil;
import org.apache.curator.RetryPolicy;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.CuratorFrameworkFactory;
import org.apache.curator.framework.recipes.leader.LeaderLatch;
import org.apache.curator.framework.recipes.leader.Leade... | __label__POS | 0.986245 |
package zk;
import org.apache.curator.framework.recipes.cache.ChildData;
import org.apache.curator.framework.recipes.cache.NodeCache;
import org.apache.curator.framework.recipes.cache.NodeCacheListener;
import org.apache.curator.framework.recipes.nodes.PersistentNode;
import org.apache.zookeeper.CreateMode;
import ja... | __label__POS | 0.990093 |
package com.fsp;
import Hot.Run;
import com.game.module.worldboss.HurtRecord;
import com.google.common.collect.Lists;
import com.google.common.collect.Range;
import com.google.common.collect.RangeMap;
import com.google.common.collect.TreeRangeMap;
import com.google.inject.Guice;
import com.google.inject.Injector;
impo... | __label__POS | 0.903344 |
package com.fsp;
import javax.sound.midi.Soundbank;
import java.util.concurrent.BrokenBarrierException;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.CyclicBarrier;
/**
* Created by lucky on 2017/7/24.
*/
public class ClassLoaderMain {
static {
System.out.println(ClassLoaderMai... | __label__POS | 0.999792 |
package com.fsp.disrup;
import com.google.common.collect.Lists;
import com.lmax.disruptor.RingBuffer;
import com.lmax.disruptor.dsl.Disruptor;
import io.netty.util.concurrent.DefaultThreadFactory;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Executor;
import java.... | __label__POS | 0.997648 |
package org.apereo.cas;
import org.apereo.cas.mock.MockTicketGrantingTicket;
import org.apereo.cas.services.RegisteredServiceTestUtils;
import org.apereo.cas.support.oauth.OAuth20Constants;
import org.apereo.cas.support.oauth.OAuth20GrantTypes;
import org.apereo.cas.ticket.TicketGrantingTicket;
import org.apereo.cas.t... | __label__POS | 0.904884 |
package org.apereo.cas;
import org.apereo.cas.authentication.Authentication;
import org.apereo.cas.authentication.CoreAuthenticationTestUtils;
import org.apereo.cas.authentication.DefaultAuthenticationBuilder;
import org.apereo.cas.authentication.DefaultAuthenticationHandlerExecutionResult;
import org.apereo.cas.authe... | __label__POS | 0.865637 |
package com.test;
import io.netty.bootstrap.Bootstrap;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelOption;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.SimpleChannelInboundHandler;
import io.netty.channel.nio.NioEventLoopGroup;
import... | __label__POS | 0.92269 |
package com.test;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.TreeMap;
import java.util.concurrent.atomic.AtomicInteger;
import com.game.util.TimeUtil;
public class TimeTest {
public static void main(String[] args) throws Interrup... | __label__POS | 0.999765 |
/**
* FX Historical REST API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: support@apibricks.io
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* ht... | __label__POS | 0.689377 |
/**
* FX Historical REST API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: support@apibricks.io
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* ht... | __label__POS | 0.847851 |
package com.test;
import com.game.module.player.PlayerData;
import com.game.util.CompressUtil;
import com.game.util.JsonUtils;
import com.game.util.StopWatch;
public class JsonTest {
public static void main(String[] args) {
PlayerData data = new PlayerData();
data.getDailyData().put(111, 111);
JsonUtils... | __label__POS | 0.998054 |
package org.apereo.cas.ticket.device;
import org.apereo.cas.AbstractOAuth20Tests;
import org.apereo.cas.services.RegisteredServiceTestUtils;
import org.apereo.cas.support.oauth.OAuth20Constants;
import org.apereo.cas.support.oauth.services.DefaultRegisteredServiceOAuthDeviceTokenExpirationPolicy;
import org.apereo.cas... | __label__POS | 0.680712 |
package com.test;
import java.io.BufferedOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.Socket;
import java.net.UnknownHostException;
import com.dyuproject.protostuff.ProtobufIOUtil;
import com.dyuproject.protostuff.Schema;
import com.dyuproject.protostuff.runtime.RuntimeSchema;... | __label__POS | 0.911465 |
package com.test;
import org.apache.log4j.xml.DOMConfigurator;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;
import com.game.SysConfig;
import com.game.event.ShutdownHandler;
import com.game.event.StartHandler;
import com.game.util.B... | __label__POS | 0.874627 |
package com.test;
import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
public class UDPClient {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
new UDPServer(8888).launch();... | __label__POS | 0.999876 |
package org.apereo.cas.ticket.device;
import org.apereo.cas.AbstractOAuth20Tests;
import org.apereo.cas.services.RegisteredServiceTestUtils;
import org.apereo.cas.support.oauth.services.DefaultRegisteredServiceOAuthDeviceTokenExpirationPolicy;
import org.apereo.cas.ticket.code.OAuth20Code;
import lombok.val;
import o... | __label__POS | 0.840268 |
package com.game;
import java.io.File;
import java.io.FileInputStream;
import java.net.Socket;
import java.util.Properties;
import com.game.module.system.RunClassParam;
import com.server.util.Util;
/**
* 动态执行某些东西,慎用
*/
public class HotSwap {
public static void main(String[] args) throws Exception {
if (args ==... | __label__POS | 0.995126 |
package com.game;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import org.apache.log4j.xml.DOMConfigurator;
import java.util.List;
import java.util.Map;
/**
* 模拟发包工具
*/
public class RobotManager {
private static Map<String, List<Roboter>> robotMap = Maps.newConcurrentMap();
... | __label__POS | 0.996079 |
package com.game;
import com.game.params.StringParam;
import com.game.params.player.CRegVo;
import com.server.util.Util;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.FileInputStream;
import java.io.InputStream;
import java.net.Socket;
import java.nio.file.Path;
import java.nio.file.... | __label__POS | 0.94068 |
package com.game;
import com.game.params.IntParam;
import com.game.params.LongParam;
import com.game.params.StringParam;
import com.game.params.mail.MailVo;
import com.game.params.player.CRegVo;
import com.game.params.scene.CEnterScene;
import com.server.util.Util;
import org.apache.log4j.xml.DOMConfigurator;
import ... | __label__POS | 0.821399 |
/**
* FX Historical REST API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: support@apibricks.io
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* ht... | __label__POS | 0.834253 |
/**
* FX Historical REST API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: support@apibricks.io
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* ht... | __label__POS | 0.799294 |
package com.game;
import com.game.params.StringParam;
import com.game.params.player.CRegVo;
import com.server.util.Util;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.FileInputStream;
import java.io.InputStream;
import java.net.Socket;
import java.nio.file.Path;
import java.nio.file.... | __label__POS | 0.843251 |
/**
* FX Historical REST API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: support@apibricks.io
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* ht... | __label__POS | 0.927876 |
package com.game;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.net.Socket;
import java.util.Properties;
import com.game.params.IntParam;
import com.server.util.Util;
/**
* 关闭服务器
*/
public class GameStop {
private Socket socket;
... | __label__POS | 0.965402 |
/**
* FX Historical REST API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: support@apibricks.io
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* ht... | __label__POS | 0.700078 |
package com.game;
import com.game.params.IntParam;
import com.server.util.Util;
import java.io.File;
import java.io.FileInputStream;
import java.net.Socket;
import java.util.Properties;
/**
* Created by lucky on 2017/12/28.
*/
public class GameReload {
private Socket socket;
private String host;
privat... | __label__POS | 0.982617 |
package com.game;
import java.io.File;
import java.io.FileInputStream;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Properties;
import com.game.util.TimeUtil;
import com.server.util.Profile;
import com.server.util.ServerLogger;
import com.server.validate.AntiCh... | __label__POS | 0.995083 |
package com.tool;
import java.io.BufferedReader;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.List;
public class CodeGenerator {
private static final String INSERT = "insert into xx(%s) value(%s);";
private static final String UPDATE = "UPDATE XX SET %s where";
private static final Str... | __label__POS | 0.994928 |
/**
* FX Historical REST API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: support@apibricks.io
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* ht... | __label__POS | 0.824115 |
/**
* FX Historical REST API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: support@apibricks.io
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* ht... | __label__POS | 0.61135 |
package com.tool;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
public class GenServerConfig {
public static final String CONTENT = "<root>\n"+
"<ProgramVersion>1.3.3.2</ProgramVersion>\n"+
"<ResourceVersion>1.3.4.4</ResourceVersion>\n"+
... | __label__POS | 0.999142 |
package com.test.testnetty;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.SocketChannel;
import io.netty.channel.socket.n... | __label__POS | 0.999608 |
/**
* FX Historical REST API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: support@apibricks.io
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* ht... | __label__POS | 0.631581 |
package com.test.testnetty;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;
import java.net.UnknownHostException;
import com.game.util.RandomUtil;
public class NettyClientTest extends Thread {
private Socket socket;
... | __label__POS | 0.997012 |
package org.apereo.cas.support.oauth.util;
import org.apereo.cas.AbstractOAuth20Tests;
import org.apereo.cas.CasProtocolConstants;
import org.apereo.cas.authentication.principal.Principal;
import org.apereo.cas.services.FullRegexRegisteredServiceMatchingStrategy;
import org.apereo.cas.services.RegisteredServiceTestUti... | __label__POS | 0.856322 |
class Attendance {
/**
* @param {string} id - Unique identifier for the attendance record
* @param {string} employeeId - Employee ID associated with the attendance
* @param {string} checkInTime - Time of check-in (expected format: HH:mm:ss)
* @param {string | Date} checkInDate - Date of check-i... | __label__POS | 0.638311 |
package com.test.testnetty;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.channel.group.ChannelGroup;
import io.netty.channel.group.DefaultChannelGroup;
import io.netty.util.concurren... | __label__POS | 0.865689 |
class JobApplication {
/**
* @param {string} id - Unique identifier for the job application
* @param {string} applicantName - Name of the applicant
* @param {string} applicantEmail - Email address of the applicant
* @param {string} resume - Resume of the applicant (URL or base64 encoded string)
... | __label__POS | 0.669796 |
class LeaveTypeDetail {
/**
* @param {string} name - Name of the leave type
* @param {string} icon - Icon associated with the leave type
* @param {string} color - Color identifier for the leave type
* @param {string} paymentMethod - Payment method for the leave
* @param {number} leaveCount ... | __label__POS | 0.617477 |
/**
* FX Historical REST API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: support@apibricks.io
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* ht... | __label__POS | 0.715392 |
package com.game.cache;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutionException;
import com.game.SysConfig;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
import com.serve... | __label__POS | 0.958722 |
var Parse = {
// 压缩JSON
compress: function (source) {
var index = 0, length = source.length, symbol, position, result = ""
while (index < length) {
symbol = source[index];
if ("\t\r\n ".indexOf(symbol) > -1) {
// Skip whitespace tokens.
index++;
} else if (symbol == "/") {... | __label__POS | 0.828906 |
package com.game.params;
import java.util.List;
import java.util.ArrayList;
//每日数据(工具自动生成,请勿手动修改!)
public class DailyVo implements IProtocol {
public long monthCardEnd;//月卡到期时间
public boolean monthCard;//是否月卡
public List<Integer> vipBag;//vip礼包领取记录
public List<Integer> charges;//特殊类型的充值记录
public boolean todayVip... | __label__POS | 0.991867 |
package org.apereo.cas.support.oauth.authenticator;
import org.apereo.cas.support.oauth.OAuth20Constants;
import org.apereo.cas.support.oauth.OAuth20GrantTypes;
import lombok.val;
import org.junit.jupiter.api.Tag;
import org.junitpioneer.jupiter.RetryingTest;
import org.pac4j.core.context.CallContext;
import org.pac4j... | __label__POS | 0.671278 |
package com.game.params;
import java.util.List;
import java.util.ArrayList;
//试练(工具自动生成,请勿手动修改!)
public class TrainVo implements IProtocol {
public List<Integer> ids;//已经通关关卡ID列表
public List<Int2Param> rewards;//类型,剩余次数
public void decode(BufferBuilder bb) {
this.ids = bb.getIntList();
if (bb.getNul... | __label__POS | 0.998673 |
package com.game.params;
import java.util.List;
import java.util.ArrayList;
//掉落奖励(工具自动生成,请勿手动修改!)
public class DropReward implements IProtocol {
public List<Reward> rewards;//奖励
public int id;//唯一怪物id
public int keyCode;//服务器校验码
public float x;//x
public float y;//y
public float z;//z
public void decode(Buf... | __label__POS | 0.824442 |
package com.game.params;
import java.util.List;
import java.util.ArrayList;
//活动信息(工具自动生成,请勿手动修改!)
public class ActivityVo implements IProtocol {
public short id;//活动id
public String name;//名称
public byte isOpen;//是否开启
public byte bigType;//大类型
public String icon;//图标
public String logo;//标志
public short sortR... | __label__POS | 0.688947 |
package org.apereo.cas.support.oauth.authenticator;
import org.apereo.cas.support.oauth.web.response.accesstoken.response.OAuth20JwtAccessTokenEncoder;
import org.apereo.cas.ticket.InvalidTicketException;
import lombok.val;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.pac4j.core.cont... | __label__POS | 0.691344 |
package com.game.params;
import java.util.List;
import java.util.ArrayList;
//商城数据(工具自动生成,请勿手动修改!)
public class ShopInfo implements IProtocol {
public int type;//商店类型
public List<Integer> refreshShopIds;//刷新出的商品id
public int refreshCount;//当天刷新的次数
public List<Int2Param> limitShops;//限购商品的购买记录List[{id,数量}]
publ... | __label__POS | 0.99785 |
package com.game.params;
import java.util.List;
import java.util.ArrayList;
//声望信息(工具自动生成,请勿手动修改!)
public class FameListVO implements IProtocol {
public List<FameVo> fames;//声望信息列表
public void decode(BufferBuilder bb) {
if (bb.getNullFlag())
this.fames = null;
else {
int... | __label__POS | 0.999448 |
package org.apereo.cas.support.oauth.authenticator;
import org.apereo.cas.authentication.CoreAuthenticationTestUtils;
import org.apereo.cas.authentication.principal.NullPrincipal;
import org.apereo.cas.authentication.principal.PrincipalResolver;
import org.apereo.cas.support.oauth.OAuth20Constants;
import org.apereo.c... | __label__POS | 0.761245 |
package com.game.params;
import java.util.List;
import java.util.ArrayList;
//字典-数组(工具自动生成,请勿手动修改!)
public class MapVo implements IProtocol {
public int id;//id
public List<Int2Param> rewards;//奖励
public void decode(BufferBuilder bb) {
this.id = bb.getInt();
if (bb.getNullFlag())
this.re... | __label__POS | 0.998354 |
package com.game.params;
import java.util.List;
import java.util.ArrayList;
//时装列表信息(工具自动生成,请勿手动修改!)
public class FashionInfo implements IProtocol {
public List<FashionVO> fashions;//所有时装
public int cloth;//当前穿戴的衣服
public int weapon;//武器
public int head;//头部
public void decode(BufferBuilder bb) {
if... | __label__POS | 0.997456 |
package com.game.params;
import java.util.List;
import java.util.ArrayList;
//副本扫荡奖励(工具自动生成,请勿手动修改!)
public class CopyReward implements IProtocol {
public int code;//错误码
public List<RewardList> reward;//副本奖励
public boolean showMystery;//是否触发神秘商店
public void decode(BufferBuilder bb) {
this.code = bb.getInt();
... | __label__POS | 0.997404 |
package org.apereo.cas.support.oauth.authenticator;
import org.apereo.cas.services.DefaultRegisteredServiceAccessStrategy;
import org.apereo.cas.support.oauth.OAuth20Constants;
import org.apereo.cas.support.oauth.services.OAuthRegisteredService;
import org.apereo.cas.util.RandomUtils;
import org.apereo.cas.util.http.H... | __label__POS | 0.718667 |
package com.game.params;
import java.util.List;
import java.util.ArrayList;
//CDK兑换奖励(工具自动生成,请勿手动修改!)
public class CDKRewardVo implements IProtocol {
public int errCode;//错误码
public List<Reward> rewards;//奖励
public void decode(BufferBuilder bb) {
this.errCode = bb.getInt();
if (bb.getNullFlag())
... | __label__POS | 0.998277 |
package org.apereo.cas.support.oauth.authenticator;
import org.apereo.cas.CasProtocolConstants;
import org.apereo.cas.services.RegisteredServiceTestUtils;
import org.apereo.cas.support.oauth.OAuth20Constants;
import lombok.val;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.pac4j.cas.... | __label__POS | 0.724319 |
package com.game.params;
import java.util.List;
import java.util.ArrayList;
//奖励列表(工具自动生成,请勿手动修改!)
public class RewardList implements IProtocol {
public List<Reward> rewards;//奖励
public void decode(BufferBuilder bb) {
if (bb.getNullFlag())
this.rewards = null;
else {
int... | __label__POS | 0.999307 |
package com.game.util;
/**
* 新建一个扩展,就在这里做个标记
*/
public class ExtensionConfig {
public static final int SystemExtension = 99;
public static final int PlayerExtension = 10;
public static final int SceneExtension = 11;
public static final int BagExtension = 12;
public static final int TaskExtension = 13;
public... | __label__POS | 1.00001 |
package org.apereo.cas.support.oauth.validator;
import org.apereo.cas.AbstractOAuth20Tests;
import org.apereo.cas.support.oauth.services.OAuthRegisteredService;
import org.apereo.cas.util.EncodingUtils;
import org.apereo.cas.util.RandomUtils;
import org.apereo.cas.util.spring.SpringExpressionLanguageValueResolver;
im... | __label__POS | 0.954761 |
package com.game.util;
import com.game.SysConfig;
import com.game.data.*;
import com.game.module.copy.CopyInstance;
import com.game.module.giftbag.ActivationCode;
import com.game.module.shop.ShopService;
import com.game.module.task.Task;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
im... | __label__POS | 0.842194 |
package com.game.util;
import com.server.util.ServerLogger;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoField;
import java.time.temporal... | __label__POS | 0.998659 |
package com.game.util;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
public class StringUtil {
/**
* 组装成 key二级分割val一级分割
*
* @param map
* @param oneSp
* @param tw... | __label__POS | 0.999996 |
package org.apereo.cas.support.oauth.profile;
import org.apereo.cas.AbstractOAuth20Tests;
import org.apereo.cas.support.oauth.OAuth20ClientIdAwareProfileManager;
import org.apereo.cas.support.oauth.OAuth20Constants;
import org.apereo.cas.support.oauth.services.OAuthRegisteredService;
import lombok.val;
import org.juni... | __label__POS | 0.799385 |
package org.apereo.cas.support.oauth.profile;
import org.apereo.cas.AbstractOAuth20Tests;
import org.apereo.cas.services.RegisteredServiceTestUtils;
import org.apereo.cas.ticket.accesstoken.OAuth20AccessToken;
import lombok.val;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.springfra... | __label__POS | 0.730106 |
package org.apereo.cas.support.oauth.profile;
import org.apereo.cas.AbstractOAuth20Tests;
import org.apereo.cas.support.oauth.web.views.OAuth20UserProfileViewRenderer;
import lombok.val;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.springframework... | __label__POS | 0.789676 |
package com.game.util;
/**
* @author luojian
* 一些消息,纯粹由后端发起的命令 在这里定义一个交易码,定义的时候顺便详细说明一下返回参数
*/
public class SystemMsg {
/**
* 已经登录过了,强制之前的退出
*/
public static final String FORCE_LOGOUT = "000001";
// 关服报文
public static final String CLOSE_SERVER = "000002";
//有人进入场景
public static final String ENTER_SCEN... | __label__POS | 1.000007 |
package com.game.util;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import org.springframework.stereotype.Component;
import com.game.SysConfig;
import com.server.util.MyTheadFactory;
import com.server.util.ServerLogger;
/**
* 线程池统一管理
*
... | __label__POS | 0.70733 |
package com.game.util;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import com.server.util.ServerLogger;
/**
* 序列化工具类
*/
public class SerializeUtil {
// 反序列化
public static Object deserial(byte[] data) {
try {
... | __label__POS | 0.977006 |
package com.game.util;
import java.io.StringWriter;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.ObjectMapper;
impo... | __label__POS | 0.958943 |
package com.game.util;
import java.lang.reflect.Method;
import java.util.Arrays;
import com.server.util.ServerLogger;
public class TimerObject {
private static final int ALL = -1;// *
private static final int AMONG = -2;// ,
private static final int ONE = -3;// 1
private static final int RANGE = -4;// -
privat... | __label__POS | 0.969671 |
package org.apereo.cas.support.oauth.web;
import org.apereo.cas.authentication.AuthenticationEventExecutionPlan;
import org.apereo.cas.authentication.AuthenticationEventExecutionPlanConfigurer;
import org.apereo.cas.authentication.handler.support.SimpleTestUsernamePasswordAuthenticationHandler;
import org.apereo.cas.a... | __label__POS | 0.724485 |
package com.game.util;
import java.util.List;
import java.util.Random;
import java.util.concurrent.ThreadLocalRandom;
/**
* 随机工具类
*/
public class RandomUtil {
private static Random rand = new Random();
private static final int GAUSSIAN_PARAM = 4;// 正太分布的参数,越大就越精确
/**
*
* @param rates
* 和加起来为1... | __label__POS | 0.999907 |
package com.game.util;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.SocketTimeoutException;
import java.net.URL;
import java.net.URLConnection;
import java.util.List;
import java.util.Map;
/**
* @作者 周聪
* @时间 2018/9/18 15:01
... | __label__POS | 0.960036 |
package org.apereo.cas.support.oauth.web;
import org.apereo.cas.AbstractOAuth20Tests;
import org.apereo.cas.configuration.model.support.oauth.OAuthCsrfCookieProperties;
import lombok.val;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.springframework.test.context.TestPropertySource;
... | __label__POS | 0.938413 |
package com.game.util;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import com.game.module.serial.SerialDataService;
import org.springframework.context.ApplicationContext;
import com.game.event.InitHandler;
/**
* 管理同类型的bean,登陆,下线,初始化触发等
*
* @author luojian
*
*/
public class BeanMa... | __label__POS | 0.946837 |
package org.apereo.cas.support.oauth.web;
import org.apereo.cas.AbstractOAuth20Tests;
import org.apereo.cas.support.oauth.OAuth20Constants;
import org.apereo.cas.support.oauth.OAuth20GrantTypes;
import org.apereo.cas.support.oauth.OAuth20ResponseTypes;
import lombok.val;
import org.junit.jupiter.api.Tag;
import org.ju... | __label__POS | 0.739696 |
package io.apiman.manager.api.beans.actions;
import io.apiman.manager.api.beans.contracts.ContractStatus;
/**
* @author Marc Savy {@literal <marc@blackparrotlabs.io>}
*/
public class ContractActionDto {
private Long contractId;
private ContractStatus status;
private String rejectionReason;
private b... | __label__POS | 0.889786 |
package com.game.util;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import org.springframework.s... | __label__POS | 0.768226 |
package com.game.util;
import java.io.UnsupportedEncodingException;
import java.math.BigInteger;
import java.net.SocketAddress;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.nio.charset.Charset;
import java.security.KeyFactory;
import java.security.MessageDigest;
import java.security.NoSuchAlgori... | __label__POS | 0.996093 |
package com.game.util;
import java.util.concurrent.Callable;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import com.server.util.MyTheadFactory;
import com.server.util.ServerLogger;
... | __label__POS | 0.986617 |
package org.apereo.cas.support.oauth.web;
import org.apereo.cas.AbstractOAuth20Tests;
import org.apereo.cas.support.oauth.web.endpoints.OAuth20AccessTokenEndpointController;
import org.apereo.cas.ticket.accesstoken.OAuth20AccessToken;
import org.apereo.cas.ticket.refreshtoken.OAuth20RefreshToken;
import lombok.val;
im... | __label__POS | 0.768828 |
package com.game.event;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import org.springframework.stereotype.Service;
import com.game.SysConfig;
import com.game.util.BeanManager;
imp... | __label__POS | 0.927093 |
package org.apereo.cas.support.oauth.services;
import org.apereo.cas.authentication.principal.WebApplicationService;
import org.apereo.cas.services.RegisteredServiceTestUtils;
import org.apereo.cas.util.RandomUtils;
import org.apereo.cas.util.serialization.JacksonObjectMapperFactory;
import com.fasterxml.jackson.datab... | __label__POS | 0.880526 |
package com.game.sdk;
import com.game.SysConfig;
import com.game.sdk.utils.WebHandler;
import com.game.sdk.web.SdkServlet;
import com.game.util.ClassUtil;
import com.server.util.ServerLogger;
import org.eclipse.jetty.server.*;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.Ser... | __label__POS | 0.841381 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.