file_id int64 1 66.7k | content stringlengths 14 343k | repo stringlengths 6 92 | path stringlengths 5 169 |
|---|---|---|---|
1 | package edu.stanford.nlp.coref.data;
import java.util.Arrays;
import java.util.Set;
import edu.stanford.nlp.util.Generics;
/** Word lists for Chinese and English used in the coref system.
*
* @author Heeyoung Lee
* @author Rob Voigt
* @author Christopher Manning
*/
public class WordLists {
private WordLis... | stanfordnlp/CoreNLP | src/edu/stanford/nlp/coref/data/WordLists.java |
2 | /*Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved.
This source code is licensed under the Apache License Version 2.0.*/
package apijson;
import java.io.File;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.Objects;
import java.util.regex.Pattern;
/**通用字符串(S... | Tencent/APIJSON | APIJSONORM/src/main/java/apijson/StringUtil.java |
3 | package org.nutz.lang;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.Closeable;
import java.io.File;
import java.io.FileInputStrea... | nutzam/nutz | src/org/nutz/lang/Streams.java |
4 | package stack;
/**
* 基于链表实现的栈。
*
* Author: Zheng
*/
public class StackBasedOnLinkedList {
private Node top = null;
public void push(int value) {
Node newNode = new Node(value, null);
// 判断是否栈空
if (top == null) {
top = newNode;
} else {
newNode.next = top;
top = newNode;
}... | wangzheng0822/algo | java/08_stack/StackBasedOnLinkedList.java |
5 | package com.crossoverjie.guava.callback;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Function:
*
* @author crossoverJie
* Date: 2018/7/15 13:52
* @since JDK 1.8
*/
public class Caller {
private final static Logger LOGGER = LoggerFactory.getLogger(Caller.class);
private CallB... | crossoverJie/JCSprout | src/main/java/com/crossoverjie/guava/callback/Caller.java |
6 | package org.yousharp.julycoding.string;
/**
* 1.2 字符串包含
* (july github链接:https://github.com/julycoding/The-Art-Of-Programming-By-July/blob/master/ebook/zh/01.02.md)
*
* User: lingguo
* Date: 14-6-29
*/
public class StringContain {
/**
* * 问题描述:
* 给定两个分别由字母组成的字符串A和字符串B,字符串B的长度比字符串A短。请问,如何最快地判断字符串... | julycoding/The-Art-Of-Programming-By-July-2nd | ebook/code/java/chapter1/1.2:字符串包含.java |
7 | /**
* DFA全称为:Deterministic Finite Automaton,即确定有穷自动机。<br>
* 解释起来原理其实也不难,就是用所有关键字构造一棵树,然后用正文遍历这棵树,遍历到叶子节点即表示文章中存在这个关键字。<br>
* 我们暂且忽略构建关键词树的时间,每次查找正文只需要O(n)复杂度就可以搞定。<br>
*
* @author looly
*
*/
package cn.hutool.dfa; | dromara/hutool | hutool-dfa/src/main/java/cn/hutool/dfa/package-info.java |
8 | M
1520921982
tags: Binary Search
二分的思想: 判断的是一个 validate() function, 而不是简单的'=='
不需要sort! 为什么呢? 因为我们不是在given array上面二分, 我们是根据最大值在[0, max]上二分.
Overall time: O(nLogM), where M = largest wood length
```
/*
Given n pieces of wood with length L[i] (integer array). Cut them into small pieces to guarantee you could have equ... | awangdev/leet-code | Java/Wood Cut.java |
9 | package org.ansj.util;
import java.io.IOException;
import java.io.Reader;
/**
* 我又剽窃了下jdk...职业嫖客 为了效率这个流的操作是不支持多线程的,要么就是长时间不写这种东西了。发现好费劲啊 这个reader的特点。。只会输入
* 句子不会输出\r\n .会有一个start来记录当前返回字符串。起始偏移量
*
* @author ansj
*
*/
public class AnsjReader extends Reader {
private Reader in;
private char cb[];
private... | NLPchina/ansj_seg | src/main/java/org/ansj/util/AnsjReader.java |
10 | /*
* Copyright 2016 jeasonlzy(廖子尧)
*
* 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... | jeasonlzy/okhttp-OkGo | demo/src/main/java/com/lzy/demo/utils/Urls.java |
11 | package com.xkcoding.rbac.security.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* <p>
* JWT 配置
* </p>
*
* @author yangkai.shen
* @date Created in 2018-12-07 13:42
*/
@ConfigurationProperties(prefix = "jwt.config")
@Data
public class JwtConfig {
... | xkcoding/spring-boot-demo | demo-rbac-security/src/main/java/com/xkcoding/rbac/security/config/JwtConfig.java |
12 | package com.blankj.base;
import android.app.Application;
import android.content.Context;
import androidx.multidex.MultiDex;
import com.blankj.utilcode.util.AppUtils;
import com.blankj.utilcode.util.CrashUtils;
import com.blankj.utilcode.util.LogUtils;
import com.blankj.utilcode.util.ProcessUtils;
import com.blankj.u... | Blankj/AndroidUtilCode | lib/base/src/main/java/com/blankj/base/BaseApplication.java |
13 | /** Half width Katakana variants (FF00 - <TYPO>FFEF</TYPO>)
* ワタシハジャバガスキデス。
*/
/** Full width ASCII variants (FF00 - <TYPO>FFEF</TYPO>)
* I LOVE JAVA
*/
/** Hiragana (3040 - 309F)
* わたしはじゃばがすきです。
*/
/** Katakana (30A0 - 30FF)
* ワタシハジャバガスキデス。
*/
/** CJK Unified Ideographs (4E00 - 9FBF)
* 我愛爪哇
*/
/** CJK Co... | JetBrains/intellij-community | plugins/java-i18n/testData/inspections/spellchecker/Japanese.java |
14 | package me.zhyd.oauth.enums.scope;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 微博平台 OAuth 授权范围
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0.0
* @since 1.0.0
*/
@Getter
@AllArgsConstructor
public enum AuthWeiboScope implements AuthScope {
/**
* {@code scope} ... | justauth/JustAuth | src/main/java/me/zhyd/oauth/enums/scope/AuthWeiboScope.java |
15 | package dshomewrok;
import java.util.*;
/*ZigZagging on a Tree
*/
public class Zigzagtree {
public static class TreeNode {
int val;
TreeNode left;
TreeNode right;
TreeNode(int x) {
val = x;
}
}
private static int find(int[] array, int v) {
for (int i... | QSCTech/zju-icicles | 数据结构基础/作业/dsHomework/tree/Zigzagtree.java |
16 | package decaf.frontend;
import java.util.List;
import decaf.Location;
import decaf.tree.Tree;
import decaf.tree.Tree.ClassDef;
import decaf.tree.Tree.Expr;
import decaf.tree.Tree.GuardedES;
import decaf.tree.Tree.MethodDef;
import decaf.tree.Tree.LValue;
import decaf.tree.Tree.TopLevel;
import decaf.tree.Tree.VarDef;... | PKUanonym/REKCARC-TSC-UHT | 大三上/编译原理/hw/2015_刘智峰_PA/PA2/src/decaf/frontend/SemValue.java |
17 | /*
* Copyright (c) 2020, OpenCloudDB/MyCAT and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software;Designed and Developed mainly by many Chinese
* opensource volunteers. you can redistribute it and/or modify it under the
* terms of... | MyCATApache/Mycat-Server | src/main/java/io/mycat/config/ConfigInitializer.java |
18 | /*
* Copyright (C) 2013 Chen Hui <calmer91@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... | bilibili/DanmakuFlameMaster | Sample/src/main/java/com/sample/BiliDanmukuParser.java |
19 | package com.macro.mall;
import org.mybatis.generator.api.MyBatisGenerator;
import org.mybatis.generator.config.Configuration;
import org.mybatis.generator.config.xml.ConfigurationParser;
import org.mybatis.generator.internal.DefaultShellCallback;
import java.io.InputStream;
import java.util.ArrayList;
import java.uti... | macrozheng/mall | mall-mbg/src/main/java/com/macro/mall/Generator.java |
20 | package com.alibaba.datax.core.job;
import com.alibaba.datax.common.constant.PluginType;
import com.alibaba.datax.common.exception.DataXException;
import com.alibaba.datax.common.plugin.AbstractJobPlugin;
import com.alibaba.datax.common.plugin.JobPluginCollector;
import com.alibaba.datax.common.spi.Reader;
import com.... | alibaba/DataX | core/src/main/java/com/alibaba/datax/core/job/JobContainer.java |
21 | package com.neo.config;
import org.apache.shiro.authc.credential.HashedCredentialsMatcher;
import org.apache.shiro.mgt.SecurityManager;
import org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor;
import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
import org.apache.shiro.web.mgt.Def... | ityouknow/spring-boot-examples | 2.x/spring-boot-shiro/src/main/java/com/neo/config/ShiroConfig.java |
22 | package com.zheng.common.util.key;
import java.sql.Timestamp;
import java.util.concurrent.*;
import java.util.concurrent.atomic.AtomicLong;
/**
* 高并发场景下System.currentTimeMillis()的性能问题的优化
* <p><p>
* System.currentTimeMillis()的调用比new一个普通对象要耗时的多(具体耗时高出多少我还没测试过,有人说是100倍左右)<p>
* System.currentTimeMillis()之所以慢是因为去跟系统打了... | shuzheng/zheng | zheng-common/src/main/java/com/zheng/common/util/key/SystemClock.java |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 5