file_id stringlengths 5 8 | content stringlengths 131 14.4k | repo stringlengths 9 59 | path stringlengths 8 120 | token_length int64 36 3.49k | original_comment stringlengths 5 791 | comment_type stringclasses 2
values | detected_lang stringclasses 1
value | masked_comment stringlengths 135 14.3k | excluded float64 0 0 | file-tokens-Qwen/Qwen2-7B int64 30 3.27k | comment-tokens-Qwen/Qwen2-7B int64 2 459 | file-tokens-bigcode/starcoder2-7b int64 35 3.49k | comment-tokens-bigcode/starcoder2-7b int64 3 483 | file-tokens-google/codegemma-7b int64 36 3.61k | comment-tokens-google/codegemma-7b int64 3 465 | file-tokens-ibm-granite/granite-8b-code-base int64 35 3.49k | comment-tokens-ibm-granite/granite-8b-code-base int64 3 483 | file-tokens-meta-llama/CodeLlama-7b-hf int64 44 4.13k | comment-tokens-meta-llama/CodeLlama-7b-hf int64 4 592 | excluded-based-on-tokenizer-Qwen/Qwen2-7B bool 2
classes | excluded-based-on-tokenizer-bigcode/starcoder2-7b bool 2
classes | excluded-based-on-tokenizer-google/codegemma-7b bool 2
classes | excluded-based-on-tokenizer-ibm-granite/granite-8b-code-base bool 2
classes | excluded-based-on-tokenizer-meta-llama/CodeLlama-7b-hf bool 2
classes | include-for-inference bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
56954_1 | package View;
import Configure.ViewConfigure;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
/**
* @author dmrfcoder
* @date 2019-04-17
*/
public class SwichButton extends JLab... | DmrfCoder/SimulationRouter | src/View/SwichButton.java | 524 | //0代表开始/绿色(停止中),1代表结束/红色(运行中) | line_comment | zh-cn | package View;
import Configure.ViewConfigure;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
/**
* @author dmrfcoder
* @date 2019-04-17
*/
public class SwichButton extends JLab... | 0 | 463 | 19 | 524 | 22 | 569 | 19 | 524 | 22 | 669 | 34 | false | false | false | false | false | true |
56936_1 | package game;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
public class GameFrame extends JFrame implements ActionListener{
static boolean judge = true;
static String name;
pu... | DmuFreeCoding/DMU-cs-course | Java/MrLeea/src/game/GameFrame.java | 884 | //窗口位于电脑的正中间; | line_comment | zh-cn | package game;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
public class GameFrame extends JFrame implements ActionListener{
static boolean judge = true;
static String name;
pu... | 0 | 688 | 8 | 884 | 10 | 843 | 8 | 884 | 10 | 1,132 | 16 | false | false | false | false | false | true |
45653_7 | package com.dnake.panel;
import com.dnake.misc.SysTalk;
import com.dnake.misc.sCaller;
import com.dnake.misc.Sound;
import com.dnake.v700.dmsg;
import com.dnake.v700.dxml;
import com.dnake.v700.sys;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.media.MediaPlayer;
import android... | DnakeFace/Face | ui/talk/src/com/dnake/panel/TalkLabel.java | 2,408 | // 对讲结束
| line_comment | zh-cn | package com.dnake.panel;
import com.dnake.misc.SysTalk;
import com.dnake.misc.sCaller;
import com.dnake.misc.Sound;
import com.dnake.v700.dmsg;
import com.dnake.v700.dxml;
import com.dnake.v700.sys;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.media.MediaPlayer;
import android... | 0 | 1,925 | 5 | 2,393 | 5 | 2,344 | 5 | 2,393 | 5 | 3,012 | 11 | false | false | false | false | false | true |
53010_2 | package com.randian.win.model;
import java.io.Serializable;
import java.util.List;
/**
* Created by lily on 15-6-24.
*/
public class Coach implements Serializable {
private int id;
private int level;//等级 1:中级 2:高级 3:特级 4:专家
private int distance;
private int order_num;
private int comment_num;
... | DoTalkLily/AppKit | app/src/main/java/com/randian/win/model/Coach.java | 1,205 | //教练对应的课程列表 | line_comment | zh-cn | package com.randian.win.model;
import java.io.Serializable;
import java.util.List;
/**
* Created by lily on 15-6-24.
*/
public class Coach implements Serializable {
private int id;
private int level;//等级 1:中级 2:高级 3:特级 4:专家
private int distance;
private int order_num;
private int comment_num;
... | 0 | 1,033 | 5 | 1,205 | 6 | 1,338 | 5 | 1,205 | 6 | 1,473 | 14 | false | false | false | false | false | true |
11898_0 | package xyz.doikki.dkplayer.widget.component;
import android.app.Activity;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.animation.Animation;
import android.widget.FrameLayout;
import android.widget.ImageView;
import ... | Doikki/DKVideoPlayer | dkplayer-sample/src/main/java/xyz/doikki/dkplayer/widget/component/AdControlView.java | 1,178 | //暂未实现全面屏适配逻辑,需要你自己补全 | line_comment | zh-cn | package xyz.doikki.dkplayer.widget.component;
import android.app.Activity;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.animation.Animation;
import android.widget.FrameLayout;
import android.widget.ImageView;
import ... | 0 | 986 | 14 | 1,178 | 16 | 1,264 | 13 | 1,178 | 16 | 1,430 | 34 | false | false | false | false | false | true |
43668_5 | import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
/**
* 显示帮助信息的对话框
*/
public class HelpDialog extends JDialog implements ActionListener {
// 确认按钮
private JButton okay;
// 取消按钮
private JButton cancel;
public HelpDialog(Frame parent,String title) {
super(parent,title,true... | DolphinHome/java-mc-astar | src/HelpDialog.java | 397 | // 监听事件 | line_comment | zh-cn | import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
/**
* 显示帮助信息的对话框
*/
public class HelpDialog extends JDialog implements ActionListener {
// 确认按钮
private JButton okay;
// 取消按钮
private JButton cancel;
public HelpDialog(Frame parent,String title) {
super(parent,title,true... | 0 | 350 | 5 | 397 | 4 | 400 | 4 | 397 | 4 | 525 | 10 | false | false | false | false | false | true |
38345_5 | import java.util.HashMap;
/**
* LRU算法 最近最常使用算法,内存加载
*/
public class LRU {
public static class Node<V> {
public Node<V> pre;
public Node<V> next;
public V value;
public Node(V value) {
this.value = value;
}
}
public static class MyCache<K, V> {
//map可保证为(1)的查询对应关系
private HashMap<K, Node<V>> k... | Dongyang666/leetcode | src/LRU.java | 967 | //先断开之前的位置 | line_comment | zh-cn | import java.util.HashMap;
/**
* LRU算法 最近最常使用算法,内存加载
*/
public class LRU {
public static class Node<V> {
public Node<V> pre;
public Node<V> next;
public V value;
public Node(V value) {
this.value = value;
}
}
public static class MyCache<K, V> {
//map可保证为(1)的查询对应关系
private HashMap<K, Node<V>> k... | 0 | 788 | 6 | 967 | 7 | 956 | 6 | 967 | 7 | 1,264 | 9 | false | false | false | false | false | true |
53109_2 | /**
* MIT License
*
* Copyright (c) 2017 CaiDongyu
*
* 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, mod... | DongyuCai/Axe | axe/src/main/java/org/axe/helper/aop/AopHelper.java | 1,335 | //真正的创建目标类的代理对象 | line_comment | zh-cn | /**
* MIT License
*
* Copyright (c) 2017 CaiDongyu
*
* 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, mod... | 0 | 1,204 | 8 | 1,335 | 9 | 1,381 | 7 | 1,335 | 9 | 1,749 | 14 | false | false | false | false | false | true |
22120_2 | package com.software.job.vo;
import java.sql.Date;
import com.software.job.po.Users;
/*
* 此javaBean为了方便展示页面数据,故和数据库类型不一样
*/
public class UserInfo {
private int id;
private String uname;
private String pwd;
private String email;
private String phone;
private int age;
private String gender;//数据类型改变
private St... | DonkeyHu/TypicalWebProject | src/com/software/job/vo/UserInfo.java | 1,100 | //数据类型改变 | line_comment | zh-cn | package com.software.job.vo;
import java.sql.Date;
import com.software.job.po.Users;
/*
* 此javaBean为了方便展示页面数据,故和数据库类型不一样
*/
public class UserInfo {
private int id;
private String uname;
private String pwd;
private String email;
private String phone;
private int age;
private String gender;//数据类型改变
private St... | 0 | 835 | 4 | 1,100 | 4 | 1,090 | 4 | 1,100 | 4 | 1,283 | 7 | false | false | false | false | false | true |
63609_7 | package priv.fruits.controller.web;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.RandomUtil;
import cn.hutool.extra.mail.MailAccount;
import cn.hutool.extra.mail.MailUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springf... | DouFoUncle/daily-fruits | src/main/java/priv/fruits/controller/web/EmailController.java | 733 | // 判断是注册还是修改密码, 保存不同的名字 | line_comment | zh-cn | package priv.fruits.controller.web;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.RandomUtil;
import cn.hutool.extra.mail.MailAccount;
import cn.hutool.extra.mail.MailUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springf... | 0 | 625 | 13 | 733 | 12 | 740 | 11 | 733 | 12 | 984 | 24 | false | false | false | false | false | true |
43767_3 | package controllers.admin;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Random;
import models.mag_article;
import models.mag_banner;
import models.mag_works;
import models.mag_worksclass;
import play.Play;
import play.libs.Files;
import play.mv... | DreamCoord/DreamCMS | app/controllers/admin/Banner.java | 959 | //检查目录写权限 | line_comment | zh-cn | package controllers.admin;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Random;
import models.mag_article;
import models.mag_banner;
import models.mag_works;
import models.mag_worksclass;
import play.Play;
import play.libs.Files;
import play.mv... | 0 | 773 | 5 | 959 | 5 | 970 | 5 | 959 | 5 | 1,252 | 12 | false | false | false | false | false | true |
36160_53 | package cwp.moneycharge.dao;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import com.cwp.cmoneycharge.R;
import java.util.ArrayList;
import java.util.List;
import cwp.moneycharge.model.Tb_ptype;
//收入类型的数据库
public class PtypeDAO {
// (_id INTEGER NO... | Dreamer206602/QuickMoney | app/src/main/java/cwp/moneycharge/dao/PtypeDAO.java | 2,796 | // 获取收入类型表中的最大编号 | line_comment | zh-cn | package cwp.moneycharge.dao;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import com.cwp.cmoneycharge.R;
import java.util.ArrayList;
import java.util.List;
import cwp.moneycharge.model.Tb_ptype;
//收入类型的数据库
public class PtypeDAO {
// (_id INTEGER NO... | 0 | 2,374 | 8 | 2,796 | 9 | 2,756 | 8 | 2,796 | 9 | 3,683 | 15 | false | false | false | false | false | true |
34101_19 |
package net.paoding.analysis;
import java.io.StringReader;
import junit.framework.TestCase;
import net.paoding.analysis.analyzer.PaodingAnalyzer;
import org.apache.lucene.analysis.Token;
import org.apache.lucene.analysis.TokenStream;
public class AnalyzerTest extends TestCase {
protected PaodingAnalyzer analyzer... | DrizztLei/code | work/java/ROBOT/src/net/paoding/analysis/AnalyzerTest.java | 2,518 | /**
* 仅两个字的非词汇串(古哥,谷歌,收狗,搜狗)
*/ | block_comment | zh-cn |
package net.paoding.analysis;
import java.io.StringReader;
import junit.framework.TestCase;
import net.paoding.analysis.analyzer.PaodingAnalyzer;
import org.apache.lucene.analysis.Token;
import org.apache.lucene.analysis.TokenStream;
public class AnalyzerTest extends TestCase {
protected PaodingAnalyzer analyzer... | 0 | 1,982 | 25 | 2,515 | 33 | 2,355 | 27 | 2,515 | 33 | 3,181 | 44 | false | false | false | false | false | true |
13765_40 | package com.d.greendao;
import de.greenrobot.daogenerator.DaoGenerator;
import de.greenrobot.daogenerator.Entity;
import de.greenrobot.daogenerator.Schema;
/**
* GreenDaoGenerator
* Created by D on 2017/4/27.
*/
public class GreenDaoGenerator {
public static void main(String[] args) throws Exception {
... | Dsiner/DMusic | lib_greendao_generator/src/main/java/com/d/greendao/GreenDaoGenerator.java | 1,588 | // 父文件夹绝对路径 | line_comment | zh-cn | package com.d.greendao;
import de.greenrobot.daogenerator.DaoGenerator;
import de.greenrobot.daogenerator.Entity;
import de.greenrobot.daogenerator.Schema;
/**
* GreenDaoGenerator
* Created by D on 2017/4/27.
*/
public class GreenDaoGenerator {
public static void main(String[] args) throws Exception {
... | 0 | 1,513 | 8 | 1,588 | 7 | 1,572 | 5 | 1,588 | 7 | 2,073 | 18 | false | false | false | false | false | true |
64189_9 | package xu.problem.mc;
import java.util.ArrayList;
import core.problem.Action;
import core.problem.Problem;
import core.problem.State;
public class McProblem extends Problem {
@Override
public State result(State parent, Action action) {
int m = ((McState) parent).getM();
int c = ((McState) parent).getC();
... | Du-Sen-Lin/AI | Searching_student/src/xu/problem/mc/McProblem.java | 984 | //如果船在右岸,计算出右岸的人数 | line_comment | zh-cn | package xu.problem.mc;
import java.util.ArrayList;
import core.problem.Action;
import core.problem.Problem;
import core.problem.State;
public class McProblem extends Problem {
@Override
public State result(State parent, Action action) {
int m = ((McState) parent).getM();
int c = ((McState) parent).getC();
... | 0 | 844 | 13 | 983 | 16 | 971 | 13 | 984 | 16 | 1,209 | 22 | false | false | false | false | false | true |
669_2 | package cn.itcast_03;
import java.util.ArrayList;
import java.util.Collections;
/*
* 模拟斗地主洗牌和发牌
*
* 扑克牌:54
* 小王
* 大王
* 黑桃A,黑桃2,黑桃3,黑桃4,黑桃...,黑桃10,黑桃J,黑桃Q,黑桃K
* 红桃...
* 梅花...
* 方块...
*
* 分析:
* A:造一个牌盒(集合)
* B:造每一张牌,然后存储到牌盒里面去
* C:洗牌
* D:发牌
* E:看牌
*/
public class PokerDemo {
public static ... | DuGuQiuBai/Java | day18/code/day18_Collections/src/cn/itcast_03/PokerDemo.java | 813 | // 造每一张牌,然后存储到牌盒里面去 | line_comment | zh-cn | package cn.itcast_03;
import java.util.ArrayList;
import java.util.Collections;
/*
* 模拟斗地主洗牌和发牌
*
* 扑克牌:54
* 小王
* 大王
* 黑桃A,黑桃2,黑桃3,黑桃4,黑桃...,黑桃10,黑桃J,黑桃Q,黑桃K
* 红桃...
* 梅花...
* 方块...
*
* 分析:
* A:造一个牌盒(集合)
* B:造每一张牌,然后存储到牌盒里面去
* C:洗牌
* D:发牌
* E:看牌
*/
public class PokerDemo {
public static ... | 0 | 710 | 14 | 813 | 16 | 747 | 13 | 813 | 16 | 1,025 | 26 | false | false | false | false | false | true |
51009_11 | package com.duan.musicoco.modle;
import android.provider.MediaStore;
/**
* Created by DuanJiaNing on 2017/5/24.
*/
final public class SongInfo implements MediaStore.Audio.AudioColumns {
//用于搜索、排序、分类
private String title_key;
private String artist_key;
private String album_key;
private int id;... | DuanJiaNing/Musicoco | app/src/main/java/com/duan/musicoco/modle/SongInfo.java | 1,007 | //显示的名字 | line_comment | zh-cn | package com.duan.musicoco.modle;
import android.provider.MediaStore;
/**
* Created by DuanJiaNing on 2017/5/24.
*/
final public class SongInfo implements MediaStore.Audio.AudioColumns {
//用于搜索、排序、分类
private String title_key;
private String artist_key;
private String album_key;
private int id;... | 0 | 885 | 3 | 1,007 | 4 | 1,122 | 3 | 1,007 | 4 | 1,317 | 6 | false | false | false | false | false | true |
11959_6 | package com.fuckwzxy.util;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.fuckwzxy.bean.ApiInfo;
import com.fuckwzxy.bean.SignMessage;
import com.fuckwzxy.bean.UserInfo;
import com.fuck... | Duangdi/fuck-wozaixiaoyuan | src/main/java/com/fuckwzxy/util/SendUtil.java | 1,384 | //得到返回的JSON并解析 | line_comment | zh-cn | package com.fuckwzxy.util;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.fuckwzxy.bean.ApiInfo;
import com.fuckwzxy.bean.SignMessage;
import com.fuckwzxy.bean.UserInfo;
import com.fuck... | 0 | 1,236 | 7 | 1,384 | 7 | 1,466 | 7 | 1,384 | 7 | 1,673 | 12 | false | false | false | false | false | true |
36283_1 | package com.boring.duanqifeng.tku;
/* 段其沣于2017年10月9日
在四川大学江安校区创建
*/
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
public class Leibie extends AppCompatAct... | Duanxiaoer/Android_TKU | app/src/main/java/com/boring/duanqifeng/tku/Leibie.java | 1,362 | //每种类别的题目数 | line_comment | zh-cn | package com.boring.duanqifeng.tku;
/* 段其沣于2017年10月9日
在四川大学江安校区创建
*/
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
public class Leibie extends AppCompatAct... | 0 | 1,129 | 6 | 1,362 | 9 | 1,410 | 6 | 1,362 | 9 | 1,663 | 11 | false | false | false | false | false | true |
33092_8 | package net.messi.early.controller;
import net.messi.early.request.ProductInventoryCacheRefreshRequest;
import net.messi.early.request.ProductInventoryDBUpdateRequest;
import net.messi.early.request.Request;
import net.messi.early.service.GoodsService;
import net.messi.early.service.ProductInventoryService;
import net... | DuncanPlayer/quickearly | controller/ProductInventoryController.java | 684 | //没有查到 | line_comment | zh-cn | package net.messi.early.controller;
import net.messi.early.request.ProductInventoryCacheRefreshRequest;
import net.messi.early.request.ProductInventoryDBUpdateRequest;
import net.messi.early.request.Request;
import net.messi.early.service.GoodsService;
import net.messi.early.service.ProductInventoryService;
import net... | 0 | 628 | 4 | 684 | 4 | 731 | 4 | 684 | 4 | 923 | 5 | false | false | false | false | false | true |
64649_2 | package org.lanqiao.algo.elementary._03sort;
import org.assertj.core.api.Assertions;
import org.lanqiao.algo.util.Util;
import java.util.Arrays;
/**
* 思路:首先要知道大顶堆和小顶堆,数组就是一个堆,每个i节点的左右孩子是2i+1和2i+2<br />
* 有了堆,将其堆化:从n/2-1个元素开始向下修复,将每个节点修复为小(大)顶堆<br />
* 修复完成后,数组具有小(大)顶堆的性质<br />
* 按序输出:小顶堆可以对数组逆序排序,... | Dxoca/Algorithm_LanQiao | src/main/java/org/lanqiao/algo/elementary/_03sort/_7HeapSort.java | 982 | //左孩子已经越界,i就是叶子节点 | line_comment | zh-cn | package org.lanqiao.algo.elementary._03sort;
import org.assertj.core.api.Assertions;
import org.lanqiao.algo.util.Util;
import java.util.Arrays;
/**
* 思路:首先要知道大顶堆和小顶堆,数组就是一个堆,每个i节点的左右孩子是2i+1和2i+2<br />
* 有了堆,将其堆化:从n/2-1个元素开始向下修复,将每个节点修复为小(大)顶堆<br />
* 修复完成后,数组具有小(大)顶堆的性质<br />
* 按序输出:小顶堆可以对数组逆序排序,... | 0 | 879 | 11 | 982 | 14 | 969 | 11 | 982 | 14 | 1,301 | 20 | false | false | false | false | false | true |
16805_4 | package comm;
import java.sql.*;
import java.util.Objects;
import static comm.DBConfig.*;
public class Card {
private String cardID;
private String userName;
private String passWord;
private int balance;
private boolean exist;
public int getBalance() {
return balance;
}
// public void setBanlance(float banl... | Dycley/ATM | src/comm/Card.java | 1,527 | // 注册 JDBC 驱动 | line_comment | zh-cn | package comm;
import java.sql.*;
import java.util.Objects;
import static comm.DBConfig.*;
public class Card {
private String cardID;
private String userName;
private String passWord;
private int balance;
private boolean exist;
public int getBalance() {
return balance;
}
// public void setBanlance(float banl... | 0 | 1,278 | 8 | 1,527 | 6 | 1,478 | 5 | 1,527 | 6 | 2,171 | 13 | false | false | false | false | false | true |
34199_18 | package com.aochat.ui;
import com.aochat.ui.module.*;
import com.aochat.ui.module.Labels;
import com.aochat.ui.module.Menu;
import javax.swing.*;
import java.awt.*;
public class Frame {
JPanel rootPanel = new JPanel(); // 新建根窗口
JFrame frame = new JFrame("AoChat"); // 初始化窗口,并命名
Menu menuBar = new Menu(ro... | DylanAo/AHU-AI-Repository | 专业选修课/Java/AoChat/com/aochat/ui/Frame.java | 519 | // 显示窗口
| line_comment | zh-cn | package com.aochat.ui;
import com.aochat.ui.module.*;
import com.aochat.ui.module.Labels;
import com.aochat.ui.module.Menu;
import javax.swing.*;
import java.awt.*;
public class Frame {
JPanel rootPanel = new JPanel(); // 新建根窗口
JFrame frame = new JFrame("AoChat"); // 初始化窗口,并命名
Menu menuBar = new Menu(ro... | 0 | 482 | 5 | 515 | 5 | 541 | 4 | 515 | 5 | 733 | 9 | false | false | false | false | false | true |
24092_10 | package com.dyman.opencvtest.utils;
import android.graphics.Bitmap;
import android.util.Log;
import org.opencv.android.Utils;
import org.opencv.core.Mat;
import org.opencv.core.MatOfPoint;
import org.opencv.core.MatOfPoint2f;
import org.opencv.core.Point;
import org.opencv.core.RotatedRect;
import org.opencv.core.Siz... | DymanZy/OpenCVTest | app/src/main/java/com/dyman/opencvtest/utils/Scanner.java | 2,479 | // 筛选去除相近的点 | line_comment | zh-cn | package com.dyman.opencvtest.utils;
import android.graphics.Bitmap;
import android.util.Log;
import org.opencv.android.Utils;
import org.opencv.core.Mat;
import org.opencv.core.MatOfPoint;
import org.opencv.core.MatOfPoint2f;
import org.opencv.core.Point;
import org.opencv.core.RotatedRect;
import org.opencv.core.Siz... | 0 | 2,294 | 10 | 2,478 | 12 | 2,611 | 8 | 2,479 | 12 | 2,927 | 12 | false | false | false | false | false | true |
19394_1 | package dynamilize;
/**所有动态对象依赖的接口,描述了动态对象具有的基本行为,关于接口的实现应当由生成器生成。
* <p>实现此接口通常不应该从外部进行,而应当通过{@link DynamicMaker#makeClassInfo(Class, Class[], Class[])}生成,对于生成器生成的实现类应当满足下列行为:
* <ul>
* <li>分配对象保存{@linkplain DataPool 数据池}的字段,字段具有private final修饰符
* <li>分配对象保存{@linkplain DynamicClass 动态类}的字段,字段具有private final修饰符
* <... | EB-wilson/JavaDynamilizer | core/src/main/java/dynamilize/DynamicObject.java | 3,041 | /**获取对象的动态类型
* <p>生成器实施应当实现此方法返回生成的动态类型字段
*
* @return 此对象的动态类型*/ | block_comment | zh-cn | package dynamilize;
/**所有动态对象依赖的接口,描述了动态对象具有的基本行为,关于接口的实现应当由生成器生成。
* <p>实现此接口通常不应该从外部进行,而应当通过{@link DynamicMaker#makeClassInfo(Class, Class[], Class[])}生成,对于生成器生成的实现类应当满足下列行为:
* <ul>
* <li>分配对象保存{@linkplain DataPool 数据池}的字段,字段具有private final修饰符
* <li>分配对象保存{@linkplain DynamicClass 动态类}的字段,字段具有private final修饰符
* <... | 0 | 2,824 | 39 | 3,041 | 36 | 3,216 | 36 | 3,041 | 36 | 3,947 | 59 | false | false | false | false | false | true |
29762_1 | package Ai;
import control.GameControl;
import dto.GameInfo;
import dto.Grassman;
import music.Player;
public class Ai {
private GameControl gameControl;
private GameInfo info;
private Grassman aiMan;
private int moveDirection;
private int offendDirection;
public Ai(GameControl gameControl){
this.game... | ELCyber/GrassCraft | src/Ai/Ai.java | 2,176 | //获取游戏信息 | line_comment | zh-cn | package Ai;
import control.GameControl;
import dto.GameInfo;
import dto.Grassman;
import music.Player;
public class Ai {
private GameControl gameControl;
private GameInfo info;
private Grassman aiMan;
private int moveDirection;
private int offendDirection;
public Ai(GameControl gameControl){
this.game... | 0 | 1,880 | 4 | 2,176 | 4 | 2,196 | 4 | 2,176 | 4 | 2,911 | 11 | false | false | false | false | false | true |
57884_2 | package io.github.emanual.app.ui;
import android.app.ProgressDialog;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.widget.Toast;
import com.loopj.android.http.AsyncHttpResponseHand... | EManual/EManual-Android | app/src/main/java/io/github/emanual/app/ui/InterviewFeedsActivity.java | 1,433 | //删除压缩包 | line_comment | zh-cn | package io.github.emanual.app.ui;
import android.app.ProgressDialog;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.widget.Toast;
import com.loopj.android.http.AsyncHttpResponseHand... | 0 | 1,133 | 4 | 1,433 | 4 | 1,435 | 4 | 1,433 | 4 | 1,712 | 10 | false | false | false | false | false | true |
40957_21 | package com.cn.main;
import com.cn.util.HttpClientUtil;
import org.apache.commons.io.FileUtils;
import org.apache.http.HttpEntity;
import org.apache.http.HttpHost;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.Http... | ERYhua/nyaHentaiCrawler | src/main/java/com/cn/main/nyaPictureMain.java | 1,357 | //缓存完后暂停几秒 | line_comment | zh-cn | package com.cn.main;
import com.cn.util.HttpClientUtil;
import org.apache.commons.io.FileUtils;
import org.apache.http.HttpEntity;
import org.apache.http.HttpHost;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.Http... | 0 | 1,160 | 8 | 1,357 | 8 | 1,404 | 7 | 1,357 | 8 | 1,662 | 19 | false | false | false | false | false | true |
50426_10 | package exp.libs.ui.cpt.win;
import exp.libs.utils.concurrent.ThreadUtils;
/**
* <PRE>
* swing右下角通知窗口
* (使用_show方法显示窗体, 可触发自动渐隐消失)
* </PRE>
* <br/><B>PROJECT : </B> exp-libs
* <br/><B>SUPPORT : </B> <a href="https://exp-blog.com" target="_blank">https://exp-blog.com</a>
* @version 2022-03-06
* @author ... | EXP-Codes/exp-libs-refactor | exp-libs-ui/src/main/java/exp/libs/ui/cpt/win/NoticeWindow.java | 724 | // 销毁窗体 | line_comment | zh-cn | package exp.libs.ui.cpt.win;
import exp.libs.utils.concurrent.ThreadUtils;
/**
* <PRE>
* swing右下角通知窗口
* (使用_show方法显示窗体, 可触发自动渐隐消失)
* </PRE>
* <br/><B>PROJECT : </B> exp-libs
* <br/><B>SUPPORT : </B> <a href="https://exp-blog.com" target="_blank">https://exp-blog.com</a>
* @version 2022-03-06
* @author ... | 0 | 622 | 6 | 724 | 7 | 737 | 5 | 724 | 7 | 921 | 12 | false | false | false | false | false | true |
23210_2 | import java.io.*;
import java.net.ServerSocket;
import java.net.Socket;
/**
* @author yangda
* @description:
* @create 2023-05-21-14:53
*/
public class MyTomcat {
public static void main(String[] args) throws IOException {
ServerSocket serverSocket = new ServerSocket(9999);
int i = 0;
... | EXsYang/mycode | javaweb/tomcat/src/MyTomcat.java | 311 | // 等待浏览器/客户端连接,得到socket | line_comment | zh-cn | import java.io.*;
import java.net.ServerSocket;
import java.net.Socket;
/**
* @author yangda
* @description:
* @create 2023-05-21-14:53
*/
public class MyTomcat {
public static void main(String[] args) throws IOException {
ServerSocket serverSocket = new ServerSocket(9999);
int i = 0;
... | 0 | 274 | 12 | 311 | 10 | 315 | 10 | 311 | 10 | 390 | 25 | false | false | false | false | false | true |
36401_4 | package name.ealen.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.*;
import java.util.Set;
/**
* Created by EalenXie on 2018/10/16 16:13.
* 典型的 多层级 分类
* <p>
* :@NamedEntityGraph :注解在实体上 , 解决典型的N+1问题
* name表示实体图名, 与 reposito... | EalenXie/springboot-jpa-N-plus-One | src/main/java/name/ealen/entity/Category.java | 743 | //四级延伸 | line_comment | zh-cn | package name.ealen.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.*;
import java.util.Set;
/**
* Created by EalenXie on 2018/10/16 16:13.
* 典型的 多层级 分类
* <p>
* :@NamedEntityGraph :注解在实体上 , 解决典型的N+1问题
* name表示实体图名, 与 reposito... | 0 | 658 | 3 | 743 | 6 | 736 | 4 | 743 | 6 | 949 | 11 | false | false | false | false | false | true |
41467_46 | package leetcode.One.Thousand.boxDelivering;
//你有一辆货运卡车,你需要用这一辆车把一些箱子从仓库运送到码头。这辆卡车每次运输有 箱子数目的限制 和 总重量的限制 。
//
// 给你一个箱子数组 boxes 和三个整数 portsCount, maxBoxes 和 maxWeight ,其中 boxes[i] = [portsi,
// weighti] 。
//
//
// portsi 表示第 i 个箱子需要送达的码头, weightsi 是第 i 个箱子的重量。
// portsCount 是码头的数目。
// maxBoxes 和 maxWeight 分别是卡车每趟运输箱子数... | EarWheat/LeetCode | src/main/java/leetcode/One/Thousand/boxDelivering/Solution.java | 1,965 | //- 卡车运输第五个箱子,到达码头 3 ,然后回到仓库,总共 2 趟行程。 | line_comment | zh-cn | package leetcode.One.Thousand.boxDelivering;
//你有一辆货运卡车,你需要用这一辆车把一些箱子从仓库运送到码头。这辆卡车每次运输有 箱子数目的限制 和 总重量的限制 。
//
// 给你一个箱子数组 boxes 和三个整数 portsCount, maxBoxes 和 maxWeight ,其中 boxes[i] = [portsi,
// weighti] 。
//
//
// portsi 表示第 i 个箱子需要送达的码头, weightsi 是第 i 个箱子的重量。
// portsCount 是码头的数目。
// maxBoxes 和 maxWeight 分别是卡车每趟运输箱子数... | 0 | 1,631 | 26 | 1,965 | 35 | 1,797 | 27 | 1,965 | 35 | 2,585 | 49 | false | false | false | false | false | true |
46861_2 | package JavaBasicAPI;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.testng.Assert;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import BrowserDrivers.GetBrowserDriver;... | Eason0731/MySeleniumCases | src/JavaBasicAPI/GetWebElementAttributeTesting.java | 304 | //将搜索框的id实例化 | line_comment | zh-cn | package JavaBasicAPI;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.testng.Assert;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import BrowserDrivers.GetBrowserDriver;... | 0 | 238 | 8 | 304 | 8 | 325 | 8 | 304 | 8 | 409 | 14 | false | false | false | false | false | true |
38290_63 | package com.example.woops.cookit.activity;
import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.Environment;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.wi... | Eccolala/BCCookIt | app/src/main/java/com/example/woops/cookit/activity/ItaActivity.java | 2,987 | // 以下代码用于获取与云端的会话id,当业务出错时将会话id提供给技术支持人员,可用于查询会话日志,定位出错原因 | line_comment | zh-cn | package com.example.woops.cookit.activity;
import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.Environment;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.wi... | 0 | 2,679 | 37 | 2,987 | 40 | 3,100 | 34 | 2,987 | 40 | 4,040 | 62 | false | false | false | false | false | true |
55510_2 | class Solution529 {
public char[][] updateBoard(char[][] board, int[] click) {
boolean[][] visited = new boolean[board.length][board[0].length];
if (board[click[0]][click[1]] == 'M') {
// 规则 1,点到雷改为X退出游戏
board[click[0]][click[1]] = 'X';
} else if (board[click[0]][clic... | Echlorine/leetcode-solution | Java/Solution529.java | 733 | // 访问当前结点 | line_comment | zh-cn | class Solution529 {
public char[][] updateBoard(char[][] board, int[] click) {
boolean[][] visited = new boolean[board.length][board[0].length];
if (board[click[0]][click[1]] == 'M') {
// 规则 1,点到雷改为X退出游戏
board[click[0]][click[1]] = 'X';
} else if (board[click[0]][clic... | 0 | 685 | 7 | 733 | 5 | 739 | 6 | 733 | 5 | 911 | 10 | false | false | false | false | false | true |
66465_14 | package alg_02_train_dm._17_day_二叉树二_二刷;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
/**
* @Author Wuyj
* @DateTime 2023-08-10 19:10
* @Version 1.0
*/
public class _10_257_binary_tree_paths2 {
// KeyPoint 方法二 BFS => 高性能,打败 100 % => 需要掌握
public L... | EchoWuyj/LeetCode | LC_douma/src/main/java/alg_02_train_dm/_17_day_二叉树二_二刷/_10_257_binary_tree_paths2.java | 565 | // 同时,因为对 node.left 已经做了判空,不存在空指针异常 | line_comment | zh-cn | package alg_02_train_dm._17_day_二叉树二_二刷;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
/**
* @Author Wuyj
* @DateTime 2023-08-10 19:10
* @Version 1.0
*/
public class _10_257_binary_tree_paths2 {
// KeyPoint 方法二 BFS => 高性能,打败 100 % => 需要掌握
public L... | 0 | 498 | 21 | 565 | 20 | 584 | 19 | 565 | 20 | 706 | 33 | false | false | false | false | false | true |
24845_2 | package ch12DP;
import java.util.Scanner;
public class Karma46TakeMaterial {
public static void main(String[] args) {
int[] weight = {1,3,4};
int[] value = {15,20,30};
int bagSize = 4;
testWeightBagProblem2(weight,value,bagSize);
}
/**
* 动态规划获得结果
* @param weight ... | EddieAy/Leetcode | ch12DP/Karma46TakeMaterial.java | 1,097 | // 获取物品的数量 | line_comment | zh-cn | package ch12DP;
import java.util.Scanner;
public class Karma46TakeMaterial {
public static void main(String[] args) {
int[] weight = {1,3,4};
int[] value = {15,20,30};
int bagSize = 4;
testWeightBagProblem2(weight,value,bagSize);
}
/**
* 动态规划获得结果
* @param weight ... | 0 | 1,017 | 4 | 1,097 | 6 | 1,086 | 4 | 1,097 | 6 | 1,468 | 9 | false | false | false | false | false | true |
20918_7 | /**
* 面试题:写一个固定容量同步容器,拥有put和get方法,以及getCount方法,
* 能够支持2个生产者线程以及10个消费者线程的阻塞调用
*
* 使用wait和notify/notifyAll来实现
*
* @author mashibing
*/
package yxxy.c_021;
import java.util.LinkedList;
import java.util.concurrent.TimeUnit;
public class MyContainer1<T> {
final private LinkedList<T> lists = new LinkedList<>();
... | EduMoral/edu | concurrent/src/yxxy/c_021/MyContainer1.java | 562 | //启动生产者线程
| line_comment | zh-cn | /**
* 面试题:写一个固定容量同步容器,拥有put和get方法,以及getCount方法,
* 能够支持2个生产者线程以及10个消费者线程的阻塞调用
*
* 使用wait和notify/notifyAll来实现
*
* @author mashibing
*/
package yxxy.c_021;
import java.util.LinkedList;
import java.util.concurrent.TimeUnit;
public class MyContainer1<T> {
final private LinkedList<T> lists = new LinkedList<>();
... | 0 | 486 | 7 | 558 | 6 | 561 | 6 | 558 | 6 | 733 | 13 | false | false | false | false | false | true |
17113_2 | package tmall.bean;
/**
* Created by Edward on 2018/7/3
*/
/**
* 属性表
* 商品详情标签下的产品属性
* 不同的商品可能有相同的属性,如能效等级
*/
public class Property {
// 属性的唯一识别的 id
private int id;
// 属性的名称
private String name;
// 和分类表的多对一关系
private Category category;
// Get, Set
public int getId() {
r... | EdwardLiu-Aurora/Tmall | src/tmall/bean/Property.java | 205 | // 属性的唯一识别的 id | line_comment | zh-cn | package tmall.bean;
/**
* Created by Edward on 2018/7/3
*/
/**
* 属性表
* 商品详情标签下的产品属性
* 不同的商品可能有相同的属性,如能效等级
*/
public class Property {
// 属性 <SUF>
private int id;
// 属性的名称
private String name;
// 和分类表的多对一关系
private Category category;
// Get, Set
public int getId() {
retu... | 0 | 190 | 8 | 205 | 7 | 220 | 7 | 205 | 7 | 279 | 17 | false | false | false | false | false | true |
62038_2 | package com.dd.entity;
import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Id;
import org.nutz.dao.entity.annotation.Table;
import java.util.Date;
/**
* Describe:消息Entity
* Author:蛋蛋
* Age:Eighteen
* Time:2017年4月25日 下午3:10:24
*/
@Table("message")
public class Message {
@Id
priv... | EggsBlue/LuliChat | src/main/java/com/dd/entity/Message.java | 998 | //消息内容 | line_comment | zh-cn | package com.dd.entity;
import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Id;
import org.nutz.dao.entity.annotation.Table;
import java.util.Date;
/**
* Describe:消息Entity
* Author:蛋蛋
* Age:Eighteen
* Time:2017年4月25日 下午3:10:24
*/
@Table("message")
public class Message {
@Id
priv... | 0 | 770 | 3 | 998 | 3 | 990 | 3 | 998 | 3 | 1,113 | 5 | false | false | false | false | false | true |
20796_7 | package com.mychat.controol;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpSession;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.json.Json;
import o... | EggsBlue/MyChat | MyChat/src/com/mychat/controol/UserModule.java | 2,702 | //0未读 | line_comment | zh-cn | package com.mychat.controol;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpSession;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.json.Json;
import o... | 0 | 2,353 | 4 | 2,702 | 4 | 2,771 | 4 | 2,702 | 4 | 3,293 | 6 | false | false | false | false | false | true |
60092_10 | package cn.eiden.hsm.enums;
/**
* 多职业组
* @author Eiden J.P Zhou
* @date 2020/8/5 17:22
*/
public enum MultiClassGroup {
/**无效*/
INVALID(0),
/**污手党*/
GRIMY_GOONS(1),
/**玉莲帮*/
JADE_LOTUS(2),
/**暗金教*/
KABAL(3),
/**骑士-牧师*/
PALADIN_PRIEST(4),
/**牧师-术士*/
PRIEST_WARLOCK(5),... | EidenRitto/hearthstone | hearth-core/src/main/java/cn/eiden/hsm/enums/MultiClassGroup.java | 385 | /**德鲁伊-萨满*/ | block_comment | zh-cn | package cn.eiden.hsm.enums;
/**
* 多职业组
* @author Eiden J.P Zhou
* @date 2020/8/5 17:22
*/
public enum MultiClassGroup {
/**无效*/
INVALID(0),
/**污手党*/
GRIMY_GOONS(1),
/**玉莲帮*/
JADE_LOTUS(2),
/**暗金教*/
KABAL(3),
/**骑士-牧师*/
PALADIN_PRIEST(4),
/**牧师-术士*/
PRIEST_WARLOCK(5),... | 0 | 322 | 8 | 385 | 11 | 368 | 8 | 385 | 11 | 476 | 14 | false | false | false | false | false | true |
31992_9 | package top.ysccx.myfirstapp;
import android.app.AlertDialog;
import android.content.ContentValues;
import android.content.DialogInterface;
import android.content.Intent;
import android.database.sqlite.SQLiteDatabase;
import android.graphics.Point;
import android.media.AudioAttributes;
import android.media.AudioManage... | Ellsom1945/lianliankan | app/src/main/java/top/ysccx/myfirstapp/Tab1Fragment.java | 3,057 | // 停止计时 | line_comment | zh-cn | package top.ysccx.myfirstapp;
import android.app.AlertDialog;
import android.content.ContentValues;
import android.content.DialogInterface;
import android.content.Intent;
import android.database.sqlite.SQLiteDatabase;
import android.graphics.Point;
import android.media.AudioAttributes;
import android.media.AudioManage... | 0 | 2,686 | 7 | 3,056 | 5 | 3,244 | 4 | 3,057 | 5 | 3,988 | 8 | false | false | false | false | false | true |
42778_13 | package com.foodClass.model;
import java.util.List;
public class TestFoodClass {
public static void main(String[] args) {
I_FoodClassDAO fdclasstest = new FoodClassJDBCDAO();
FoodClassVO fdvo = new FoodClassVO();
// 新增=====================================
// fdvo.setFd_class_name("好吃");
// fdvo.setFd_clas... | EmeryWeng/CFA102G5 | src/com/foodClass/model/TestFoodClass.java | 463 | // 查詢===================================== | line_comment | zh-cn | package com.foodClass.model;
import java.util.List;
public class TestFoodClass {
public static void main(String[] args) {
I_FoodClassDAO fdclasstest = new FoodClassJDBCDAO();
FoodClassVO fdvo = new FoodClassVO();
// 新增=====================================
// fdvo.setFd_class_name("好吃");
// fdvo.setFd_clas... | 0 | 332 | 5 | 463 | 6 | 447 | 6 | 463 | 6 | 561 | 10 | false | false | false | false | false | true |
17847_1 | package com.zhu56.util;
import cn.hutool.core.util.ReflectUtil;
import com.zhu56.inter.SerFunction;
import lombok.SneakyThrows;
import lombok.experimental.UtilityClass;
import java.io.Serializable;
import java.lang.invoke.SerializedLambda;
import java.lang.reflect.Method;
import java.util.Map;
import java.util.concur... | EmperorZhu56/ztream | src/main/java/com/zhu56/util/LambdaUtil.java | 603 | /**
* 类型λ缓存
*/ | block_comment | zh-cn | package com.zhu56.util;
import cn.hutool.core.util.ReflectUtil;
import com.zhu56.inter.SerFunction;
import lombok.SneakyThrows;
import lombok.experimental.UtilityClass;
import java.io.Serializable;
import java.lang.invoke.SerializedLambda;
import java.lang.reflect.Method;
import java.util.Map;
import java.util.concur... | 0 | 536 | 11 | 603 | 9 | 642 | 10 | 603 | 9 | 777 | 15 | false | false | false | false | false | true |
53794_6 | package com.ezreal.multiselecttreeview;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;
import com.ezreal.treevieewlib.AndroidTreeView;
import com.ezreal.treevieewlib.NodeIDFormat;
import com.ezreal.treevieewlib.OnTreeNodeClickListener;
import com.ezreal.tree... | Enjoylone1y/MutiSelectTreeView | app/src/main/java/com/ezreal/multiselecttreeview/SingleSelectActivity.java | 719 | // 根据 层级关系,设置好 PID ID 构造测试数据 | line_comment | zh-cn | package com.ezreal.multiselecttreeview;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;
import com.ezreal.treevieewlib.AndroidTreeView;
import com.ezreal.treevieewlib.NodeIDFormat;
import com.ezreal.treevieewlib.OnTreeNodeClickListener;
import com.ezreal.tree... | 0 | 613 | 18 | 719 | 15 | 727 | 13 | 719 | 15 | 882 | 27 | false | false | false | false | false | true |
55495_24 | package rip;
import java.util.HashMap;
public class Router {
private final int routerId;
private RouterTable routerTable;
private int[] nearRouter;
private int[] nearNetwork;
public RouterTable getRouterTable() {
return routerTable;
}
public void setRouterTable(RouterTable routerTable) {
this.routerTab... | EricLi404/Java-Demos | Rip-Demo/Router.java | 1,763 | //TODO 记录临近的网络
| line_comment | zh-cn | package rip;
import java.util.HashMap;
public class Router {
private final int routerId;
private RouterTable routerTable;
private int[] nearRouter;
private int[] nearNetwork;
public RouterTable getRouterTable() {
return routerTable;
}
public void setRouterTable(RouterTable routerTable) {
this.routerTab... | 0 | 1,481 | 9 | 1,751 | 9 | 1,726 | 8 | 1,751 | 9 | 2,314 | 16 | false | false | false | false | false | true |
22789_44 | /**
* Copyright(c) Jade Techonologies Co., Ltd.
*/
package cn.eric.jdktools.data;
import java.math.BigDecimal;
/**
* 格式化数字工具类
*/
public class NumUtil
{
/**
* 保留两位小数点
* @param value
* @return
*/
public static double keepTwoPoint(double value)
{
BigDecimal b = new BigDecimal(... | EricLoveMia/JavaTools | src/main/java/cn/eric/jdktools/data/NumUtil.java | 2,585 | // "亿","万","元"这些单位有些情况是不能省的,需要保留下来 | line_comment | zh-cn | /**
* Copyright(c) Jade Techonologies Co., Ltd.
*/
package cn.eric.jdktools.data;
import java.math.BigDecimal;
/**
* 格式化数字工具类
*/
public class NumUtil
{
/**
* 保留两位小数点
* @param value
* @return
*/
public static double keepTwoPoint(double value)
{
BigDecimal b = new BigDecimal(... | 0 | 2,431 | 20 | 2,585 | 23 | 2,619 | 20 | 2,585 | 23 | 3,612 | 34 | false | false | false | false | false | true |
25178_6 | package com.example.guohouxiao.musicalbum.utils;
/**
* Created by guohouxiao on 2017/9/5.
* 表的属性
*/
public class Config {
public static final String USER_TABLE = "_User";//用户表
public static final String AVATAR = "avatar";//用户头像
public static final String NICKNAME = "nickname";//用户昵称
public static ... | ErisRolo/MusicAlbum | app/src/main/java/com/example/guohouxiao/musicalbum/utils/Config.java | 358 | //音乐相册表 | line_comment | zh-cn | package com.example.guohouxiao.musicalbum.utils;
/**
* Created by guohouxiao on 2017/9/5.
* 表的属性
*/
public class Config {
public static final String USER_TABLE = "_User";//用户表
public static final String AVATAR = "avatar";//用户头像
public static final String NICKNAME = "nickname";//用户昵称
public static ... | 0 | 322 | 5 | 358 | 6 | 319 | 5 | 358 | 6 | 428 | 8 | false | false | false | false | false | true |
45050_10 | package cn.com.fusio.event.merge;
import cn.com.fusio.event.BaseEvent;
import cn.com.fusio.event.entity.ArticleInfo;
import cn.com.fusio.event.entity.FormInfo;
import cn.com.fusio.event.entity.UserInfo;
import cn.com.fusio.event.raw.PinganBehaviorData;
import org.drools.core.util.StringUtils;
/**
* @Description: 丰富 ... | ErnestMing/Drools-CEP-EventFlow | src/main/java/cn/com/fusio/event/merge/PinganEduPVEnrich.java | 1,237 | //暂时 表单 标签都作为 心理。 | line_comment | zh-cn | package cn.com.fusio.event.merge;
import cn.com.fusio.event.BaseEvent;
import cn.com.fusio.event.entity.ArticleInfo;
import cn.com.fusio.event.entity.FormInfo;
import cn.com.fusio.event.entity.UserInfo;
import cn.com.fusio.event.raw.PinganBehaviorData;
import org.drools.core.util.StringUtils;
/**
* @Description: 丰富 ... | 0 | 1,167 | 14 | 1,237 | 13 | 1,342 | 10 | 1,237 | 13 | 1,579 | 20 | false | false | false | false | false | true |
32949_5 | package com.eshel.takeout.permission;
import android.app.Activity;
import android.content.pm.PackageManager;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import com.eshel.takeout.utils.UIUtils;
/**
* 项目名称: GooglePlay
* 创建人: Eshel
* 创建时间:2017/7/12 19时02分
* 描述: TOD... | EshelGuo/PermissionsUtil | permission/RequestPermissionUtil.java | 322 | //已经授权 | line_comment | zh-cn | package com.eshel.takeout.permission;
import android.app.Activity;
import android.content.pm.PackageManager;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import com.eshel.takeout.utils.UIUtils;
/**
* 项目名称: GooglePlay
* 创建人: Eshel
* 创建时间:2017/7/12 19时02分
* 描述: TOD... | 0 | 251 | 3 | 322 | 3 | 299 | 3 | 322 | 3 | 412 | 9 | false | false | false | false | false | true |
61598_4 | /**
* 创建时间:2016-2-23
*/
package cn.aofeng.demo.httpclient;
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.NameValuePair;
import org.apache... | Estom/notes | Java/Java源代码/codedemo/httpclient/HttpClientBasic.java | 1,046 | // 获取状态信息 | line_comment | zh-cn | /**
* 创建时间:2016-2-23
*/
package cn.aofeng.demo.httpclient;
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.NameValuePair;
import org.apache... | 0 | 881 | 4 | 1,046 | 4 | 1,110 | 4 | 1,046 | 4 | 1,284 | 8 | false | false | false | false | false | true |
47478_1 | package com.dcx.concurrency.dcxTest;
//作者:卡巴拉的树
// 链接:https://juejin.im/post/5a38d2046fb9a045076fcb1f
// 来源:掘金
// 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
//厕所
//种族
import java.util.Random;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.S... | EthanDCX/High-concurrency | src/main/java/com/dcx/concurrency/dcxTest/ToiletRace.java | 424 | // 链接:https://juejin.im/post/5a38d2046fb9a045076fcb1f | line_comment | zh-cn | package com.dcx.concurrency.dcxTest;
//作者:卡巴拉的树
// 链接 <SUF>
// 来源:掘金
// 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
//厕所
//种族
import java.util.Random;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Semaphore;
import java.util.concurrent.Time... | 0 | 352 | 37 | 424 | 34 | 429 | 35 | 424 | 34 | 532 | 39 | false | false | false | false | false | true |
28574_6 | package TanXin;
import java.util.*;
/**
* @description:
* @author: wuboyu
* @date: 2022-07-21 16:58
*/
public class L56 {
//56. 合并区间
//以数组 intervals 表示若干个区间的集合,其中单个区间为 intervals[i] = [starti, endi] 。请你合并所有重叠的区间,并返回 一个不重叠的区间数组,该数组需恰好覆盖输入中的所有区间 。
//
//
//
//示例 1:
//
//输入:intervals = ... | Etherstrings/Algorithm | src/TanXin/L56.java | 639 | //解释:区间 [1,3] 和 [2,6] 重叠, 将它们合并为 [1,6]. | line_comment | zh-cn | package TanXin;
import java.util.*;
/**
* @description:
* @author: wuboyu
* @date: 2022-07-21 16:58
*/
public class L56 {
//56. 合并区间
//以数组 intervals 表示若干个区间的集合,其中单个区间为 intervals[i] = [starti, endi] 。请你合并所有重叠的区间,并返回 一个不重叠的区间数组,该数组需恰好覆盖输入中的所有区间 。
//
//
//
//示例 1:
//
//输入:intervals = ... | 0 | 598 | 29 | 639 | 30 | 657 | 27 | 639 | 30 | 791 | 40 | false | false | false | false | false | true |
46976_0 | package web;
import my_music.*;
import java.util.ArrayList;
import java.util.List;
public class Constants {
public static MusicDemo ErGe = new MusicDemo("快乐儿歌","无","佚名",0,0);
public final static MusicDemo Jiangjunling = new MusicDemo("将军令","五月天", "YOUR LEGEND ~燃烧的生命~", 0,0);
private static final User u... | Ethylene9160/SUSTC_EE317_Android_applications | musicPlayer/src_server/web/Constants.java | 814 | //一些例子 | line_comment | zh-cn | package web;
import my_music.*;
import java.util.ArrayList;
import java.util.List;
public class Constants {
public static MusicDemo ErGe = new MusicDemo("快乐儿歌","无","佚名",0,0);
public final static MusicDemo Jiangjunling = new MusicDemo("将军令","五月天", "YOUR LEGEND ~燃烧的生命~", 0,0);
private static final User u... | 0 | 705 | 3 | 814 | 3 | 791 | 3 | 814 | 3 | 925 | 5 | false | false | false | false | false | true |
45491_6 | package com.rookie.stack.ai.domain.chat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
/**
* @author eumenides
* @description
* ... | Eumenides1/rookie-gpt-sdk-java | src/main/java/com/rookie/stack/ai/domain/chat/ChatCompletionRequest.java | 678 | /** 是否为流式输出;就是一蹦一蹦的,出来结果 */ | block_comment | zh-cn | package com.rookie.stack.ai.domain.chat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
/**
* @author eumenides
* @description
* ... | 0 | 595 | 17 | 678 | 21 | 655 | 17 | 678 | 21 | 924 | 27 | false | false | false | false | false | true |
29042_0 | public class RealSubject implements Subject{
@Override
public void eat() {//吃饭
System.out.println("eating");
}
}
| Euraxluo/ProjectPractice | java/DesignPatternInJAVA/Proxy/src/RealSubject.java | 36 | //吃饭
| line_comment | zh-cn | public class RealSubject implements Subject{
@Override
public void eat() {//吃饭 <SUF>
System.out.println("eating");
}
}
| 0 | 30 | 3 | 35 | 5 | 36 | 3 | 35 | 5 | 44 | 8 | false | false | false | false | false | true |
56716_0 | class Solution {
public int ladderLength(String beginWord, String endWord, List<String> wordList){
if (beginWord == null || endWord == null
|| beginWord.length() == 0 || endWord.length() == 0
|| beginWord.length() != endWord.length())
return 0;
// 此题关键是去重,还有去除和beginWord,相同的单词
Set<Str... | Eurus-Holmes/LCED | Word Ladder.java | 490 | // 此题关键是去重,还有去除和beginWord,相同的单词 | line_comment | zh-cn | class Solution {
public int ladderLength(String beginWord, String endWord, List<String> wordList){
if (beginWord == null || endWord == null
|| beginWord.length() == 0 || endWord.length() == 0
|| beginWord.length() != endWord.length())
return 0;
// 此题 <SUF>
Set<String> set = new HashS... | 0 | 426 | 16 | 490 | 19 | 489 | 16 | 490 | 19 | 624 | 27 | false | false | false | false | false | true |
31939_10 | package client.data;
import jxl.Workbook;
import jxl.write.Label;
import jxl.write.WritableSheet;
import jxl.write.WritableWorkbook;
import jxl.write.WriteException;
import jxl.write.biff.RowsExceededException;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.util.Scanner;
/**
*
*/
public c... | Evelynn1014/BJTU-cxd-Slime-java-project | client/data/Txt2Excel.java | 1,373 | // 将读取的txt文件
| line_comment | zh-cn | package client.data;
import jxl.Workbook;
import jxl.write.Label;
import jxl.write.WritableSheet;
import jxl.write.WritableWorkbook;
import jxl.write.WriteException;
import jxl.write.biff.RowsExceededException;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.util.Scanner;
/**
*
*/
public c... | 0 | 1,234 | 9 | 1,364 | 7 | 1,462 | 7 | 1,364 | 7 | 1,731 | 12 | false | false | false | false | false | true |
16451_1 | package db.log.sim;
import android.Manifest;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.pm.PackageManager;
import android.support.v4.app.ActivityCompat;
import android.telephony.TelephonyManager;
import lombok.Data;
/**
* @Author : YangFan
* @Date : 2020年11月19日 1... | EvolvedHumans/EdgeAgent | CPE1/app/src/main/java/db/log/sim/Phone.java | 736 | /**
* READ_PHONE_STATE
* @return 是否有读取手机状态的权限
* 电话 READ_PHONE_STATE 危险 允许对电话状态进行只读访问,包括设备的电话号码,当前蜂窝网络信息,任何正在进行的呼叫的状态以及设备上注册的任何PhoneAccounts列表
* 电话 CALL_PHONE 危险 允许应用程序在不通过拨号器用户界面的情况下发起电话呼叫,以便用户确认呼叫
* 电话 READ_CALL_LOG 危险 允许应用程序读取用户的通话记录
* 电话 WRITE_CALL_LOG 危险 允许应用程序写入(但不读取)用户的呼叫日志数据
* ... | block_comment | zh-cn | package db.log.sim;
import android.Manifest;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.pm.PackageManager;
import android.support.v4.app.ActivityCompat;
import android.telephony.TelephonyManager;
import lombok.Data;
/**
* @Author : YangFan
* @Date : 2020年11月19日 1... | 0 | 601 | 233 | 736 | 284 | 714 | 247 | 736 | 284 | 1,036 | 494 | true | true | true | true | true | false |
3166_29 | package cn.exrick.xboot.common.utils;
import cn.exrick.xboot.common.exception.CaptchaException;
import cn.hutool.core.util.StrUtil;
import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.OutputStream;
import java.security.SecureRandom;
/**
* ... | Exrick/xboot | xboot-fast/src/main/java/cn/exrick/xboot/common/utils/CreateVerifyCode.java | 2,567 | // 设置干扰线 | line_comment | zh-cn | package cn.exrick.xboot.common.utils;
import cn.exrick.xboot.common.exception.CaptchaException;
import cn.hutool.core.util.StrUtil;
import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.OutputStream;
import java.security.SecureRandom;
/**
* ... | 0 | 2,359 | 4 | 2,567 | 6 | 2,720 | 4 | 2,567 | 6 | 3,185 | 11 | false | false | false | false | false | true |
4963_1 | package cn.exrick.service.impl;
import cn.exrick.bean.Pay;
import cn.exrick.bean.dto.Count;
import cn.exrick.common.utils.DateUtils;
import cn.exrick.common.utils.StringUtils;
import cn.exrick.dao.PayDao;
import cn.exrick.service.PayService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springfra... | Exrick/xpay | xpay-code/src/main/java/cn/exrick/service/impl/PayServiceImpl.java | 1,487 | //模糊搜素
| line_comment | zh-cn | package cn.exrick.service.impl;
import cn.exrick.bean.Pay;
import cn.exrick.bean.dto.Count;
import cn.exrick.common.utils.DateUtils;
import cn.exrick.common.utils.StringUtils;
import cn.exrick.dao.PayDao;
import cn.exrick.service.PayService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springfra... | 0 | 1,252 | 5 | 1,467 | 8 | 1,559 | 5 | 1,467 | 8 | 1,814 | 10 | false | false | false | false | false | true |
52668_1 | package com.atguigu.practiceNo2.juc;
import java.util.Random;
import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
public class SemaphoreDemo {
public static void main(String[] args) {
//6辆汽车停三个停车位
Semaphore semaphore = new Semaphore(3);
for (int i = 0; i <= 6; i+... | Ezrabin/juc_atguigu | src/com/atguigu/practiceNo2/juc/SemaphoreDemo.java | 217 | //随机停车时间 | line_comment | zh-cn | package com.atguigu.practiceNo2.juc;
import java.util.Random;
import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
public class SemaphoreDemo {
public static void main(String[] args) {
//6辆汽车停三个停车位
Semaphore semaphore = new Semaphore(3);
for (int i = 0; i <= 6; i+... | 0 | 179 | 4 | 217 | 5 | 225 | 4 | 217 | 5 | 298 | 13 | false | false | false | false | false | true |
58892_37 | package com.videogo.ui.login;
import java.util.ArrayList;
import java.util.List;
/**
* 开放平台服务端在分为海外和国内,海外又分为5个大区
* (北美、南美、新加坡(亚洲)、俄罗斯、欧洲)
* 必须根据当前使用的AppKey对应大区切换到所在大区的服务器
* 否则EZOpenSDK的接口调用将会出现异常
*/
public enum ServerAreasEnum {
/**
* 国内
*/
ASIA_CHINA(0,"Asia-China", "https://open.ys7.com",
... | Ezviz-Open/EzvizSDK-Android | app/src/main/java/com/videogo/ui/login/ServerAreasEnum.java | 1,598 | /**
* 华住
*/ | block_comment | zh-cn | package com.videogo.ui.login;
import java.util.ArrayList;
import java.util.List;
/**
* 开放平台服务端在分为海外和国内,海外又分为5个大区
* (北美、南美、新加坡(亚洲)、俄罗斯、欧洲)
* 必须根据当前使用的AppKey对应大区切换到所在大区的服务器
* 否则EZOpenSDK的接口调用将会出现异常
*/
public enum ServerAreasEnum {
/**
* 国内
*/
ASIA_CHINA(0,"Asia-China", "https://open.ys7.com",
... | 0 | 1,472 | 9 | 1,592 | 8 | 1,620 | 9 | 1,592 | 8 | 1,886 | 12 | false | false | false | false | false | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.