hexsha stringlengths 40 40 | size int64 8 1.04M | content stringlengths 8 1.04M | avg_line_length float64 2.24 100 | max_line_length int64 4 1k | alphanum_fraction float64 0.25 0.97 |
|---|---|---|---|---|---|
98ef6c6e0efef3fec644556d32f62ad3bec2a219 | 566 | package vaop.annotation.util;
import android.support.annotation.IntDef;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@IntDef({
ThreadType.SINGLE,
ThreadType.FIXED,
ThreadType.DISK,
ThreadType.NETWORK,
})
@Retention(RetentionPolicy.RUNTIME)
public... | 15.722222 | 44 | 0.588339 |
63411574ad7a31fde433e9959c090ac419f2bb29 | 36 | string empty string main string args | 36 | 36 | 0.861111 |
1ca8e96ee3cbcd04b9799dd9b45ba10ece600542 | 3,512 | package com.cococloud.admin.util;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.core.toolkit.StringPool;
import com.baomidou.mybatisplus.generator.AutoGenerator;
import com.baomidou.mybatisplus.generator.InjectionConfig;
import com.baomidou.mybatisplus.generator.config.*;
import co... | 36.583333 | 107 | 0.600513 |
9fce8bc2e0cb0bca9e1e036791ce65ff44b24bee | 856 | package ru.stqa.sandbox;
import JAVA_TEST.Sandbox.FirstLesson.Point;
import org.testng.Assert;
import org.testng.annotations.Test;
/**
* Created by Сергей on 02.04.2018.
*/
public class DistantTest {
@Test
public void testDistance(){
Point A = new Point(1.0,2.0);
Point B = new Point(1.0,-2.0);
Asser... | 25.176471 | 72 | 0.617991 |
6c4cee4a74d5fca5e864e0fe5ee1cf2dca0217a4 | 2,243 | package net.astraloof.manx.engine;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import com.synthbot.jasiohost.AsioChannel;
import com.synthbot.jasiohost.AsioDriver;
import net.astraloof.manx.Logger;
public class AudioInterface
{
private Logger log = new Logger... | 22.887755 | 86 | 0.678556 |
bf6a197b5dc8056b189bfe371dcedcef7a284d8f | 1,742 | /*
* Copyright 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | 34.84 | 92 | 0.732491 |
7ad1e0cd67eff19dc59dbb17debdd4ed1a614293 | 1,124 | package net.npg.abattle.client.commands;
import com.google.common.base.Optional;
import net.npg.abattle.common.model.client.ClientGame;
import net.npg.abattle.common.utils.Validate;
import net.npg.abattle.communication.command.CommandProcessor;
import net.npg.abattle.communication.command.CommandUpdateNotifier;
... | 34.060606 | 92 | 0.761566 |
6c2e2231ccaa07830bd448d5301bd2d3120e0b95 | 23,307 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.network.fluent;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.co... | 54.202326 | 115 | 0.748445 |
f7215ef76a53a87277475f708cdf83f1b8b597bc | 1,717 | /*
* Copyright 2020-2021 original authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | 33.666667 | 119 | 0.748981 |
4f15d1687e1f4fcbc5cc544c29db060f52ac80b8 | 3,065 | package models;
public class Fixtures {
public static String userJson = "{\n"
+ "\"email\" : \"jim@simpson.com\" ,\n"
+ "\"firstName\": \"Jim\" ,\n"
+ "\"lastName\" : \"Simpson\" ,\n"
+ "\"password\" : \"secret\" \n"
... | 41.986301 | 73 | 0.358891 |
810cb671126c3002edc49183ff9f21f04eda7660 | 626 | class Solution {
public String getPermutation(int n, int k) {
List<Integer> num = new LinkedList<Integer>();
int[] fact = new int[n];
k--;
for(int i=0; i<n; i++) {
num.add(i+1);
if (i==0) {
fact[i] = 1;
} else {
fact... | 26.083333 | 54 | 0.397764 |
78ead8aee3c6f4c78075ff994b63595648d704af | 303 | package org.doubleysoft.leveldb4j.api.exceptions;
public class InitialDataBaseException extends DataAccessException {
public InitialDataBaseException(String msg) {
super(msg);
}
public InitialDataBaseException(ExceptionEnum exceptionEnum) {
super(exceptionEnum);
}
}
| 21.642857 | 67 | 0.742574 |
7e9eb2ece8e1ddd4b65d2c4cb1ef16e1eb82cc3e | 1,665 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | 26.854839 | 75 | 0.725526 |
438f392c87f7eecf763721ce0e596fc28f2187d8 | 2,956 | /*
* JBoss, Home of Professional Open Source.
* Copyright 2014 Red Hat, Inc., and individual contributors
* as indicated by the @author tags.
*
* 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 Licen... | 29.858586 | 100 | 0.695196 |
493b9f1a41d2ca7d2677efc19ca318a3509da09a | 416 | // Run simple test on simplex optimizer
package com.boim.optimize.tests;
//import java.io.*;
import com.boim.optimize.*;
public class Test1 {
public static void main(String[] args) {
QualityMetric a = new TestMetric();
NelderMeadSimplex b = new NelderMeadSimplex();
double[] x = {1,1};
... | 26 | 62 | 0.612981 |
a16cd37c78aa7468d06ec5d55437c9307ee1913f | 792 | package leetcode.easy.array_all;
/****
*
* 题目描述:给定一个int数组,求出能不能最多改动一位数字,使得整个数组变成升序
*
* 包含两种case:
*
* 1,7,3,4 =》 1,3,3,4
*
* 4,7,3,9 =》 4,7,7,9
*
*/
public class NonDecreasingArray {
public static boolean checkPossibility(int[] nums) {
int count=0;
for (int i = 0; i + 1<nums.length ; i++)... | 19.317073 | 56 | 0.468434 |
099375588792a3263fd34ef26f605bd51da5717a | 187 | package com.chris.some.code.y2020.m09.d01;
import lombok.Data;
@Data
public class CreditPbcSummary {
private String roleTyp;
private String intfSeq;
private String code;
}
| 15.583333 | 42 | 0.737968 |
1b27669bd00e9e459c1bbaa620fd973ab582dc67 | 5,613 | package msp.game.network;
import framework.GDB;
import framework.GProperty;
import framework.GUtils;
import msp.game.MSPGameWindow;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.IOException... | 33.610778 | 120 | 0.496704 |
31f5e7565c0cf6f6e7c71de7cb15891ef5a4bce2 | 1,240 |
/*
* @lc app=leetcode.cn id=1146 lang=java
*
* [1146] 快照数组
*/
import java.util.HashMap;
class SnapshotArray {
private int snapCount = 0;
// 使用Map维护索引处各代的数值
private HashMap<Integer, Integer>[] snapStore;
public SnapshotArray(int length) {
snapStore = new HashMap[length];
}
// 直接... | 21.37931 | 73 | 0.566935 |
6fb40d31967b8339d6aaa3aa2e0266df557da9d3 | 1,086 | package uk.co.devworx.jdbc.incrementer;
import java.util.Optional;
/**
* Describes an individual schema transform step.
* E.g. mapping one column to another etc.
*/
public class TableSchemaTransformStep
{
public static enum StepType
{
NoChange, //To indicate no change from the before to the after columns
In... | 19.745455 | 73 | 0.743094 |
c1795f6583b73eb41c1cf3a062817429ad3803a5 | 3,558 | package com.wsayan.huckster.core.utility;
public final class HttpStatusCodes {
public static final int CONTINUE = 100;
public static final int SWITCHING_PROTOCOLS = 101;
public static final int PROCESSING = 102;
public static final int OK = 200;
public static final int CREATED = 201;
public st... | 46.815789 | 71 | 0.752951 |
598b22f7dabec059c414c91e99e228d9ae05e7ac | 1,963 | package tools;
import android.bluetooth.BluetoothSocket;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
/**
* Created by 张佳亮 on 2016/8/10.
*/
public class ConnectedThread extends Thread {
privat... | 24.848101 | 69 | 0.580744 |
e80d1bb1f9c3ad057b9bb097ab79eae394704bc0 | 3,147 | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2011.1... | 22.478571 | 124 | 0.578646 |
231724d518a526855ba3cf03be73fe989939245d | 1,398 | package de.tom.ref.webshop.entities.products;
import de.tom.ref.webshop.errorhandling.ProductNotFoundException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.math.BigDecimal;
import java.util.List;
@RestController
@RequestMapping(path = "... | 30.391304 | 110 | 0.691702 |
274e9a53ef2c4f6b218cd85eb248d989a5cd0aa4 | 3,756 | /*------------------------------------------------------------------------------
Copyright (c) CovertJaguar, 2011-2018
http://railcraft.info
This code is the property of CovertJaguar
and may only be used with explicit written
permission unless otherwise specified on the
license page at http://railcraft.info/wiki... | 37.188119 | 110 | 0.661608 |
730bd10d2967daec7261e6f2d2033aaaa265391a | 1,028 | package no.javazone.cake.redux;
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
public class SecurityFilter implements Filter {
@Override
public void init(FilterConfig filterConfig) throws ServletException {
}
@Override
public void doFilter(Servl... | 27.783784 | 124 | 0.654669 |
dc28340aa3abef8197661f93e1fe01818c0f9b7f | 81 | package org.embulk.output.aerospike;
public class TestAerospikeOutputPlugin
{
}
| 13.5 | 38 | 0.82716 |
bba8c5983f347415a30420a7376e5cb5edc9f5aa | 5,505 | package nl.datavisual.domain.repo.custom.impl;
import com.querydsl.core.Tuple;
import com.querydsl.core.types.Predicate;
import com.querydsl.jpa.impl.JPAQueryFactory;
import nl.datavisual.domain.entity.*;
import nl.datavisual.domain.repo.custom.UserRepositoryCustom;
import org.springframework.transaction.annotation.T... | 35.288462 | 176 | 0.677566 |
1a818a941529313bd87aba3160df6a4b80d93031 | 1,046 | package com.alipay.dw.jstorm.example;
import java.io.Serializable;
public class IntervalCheck implements Serializable {
/**
*
*/
private static final long serialVersionUID = 8952971673547362883L;
long lastCheck = System.currentTimeMillis();
// default interval is 1 second
long interval = 1;
/*
* if l... | 17.728814 | 73 | 0.674952 |
d8795107de9a8ca9800a076233900a0b2094544c | 601 | package ru.job4j.carplace.dto;
import ru.job4j.carplace.persistens.models.Advert;
/**
* Описывает объект, для передачи с фронта объявления, и требуемого действия с ним.
* @author Denis Seleznev
* @version $Id$
* @since 0.1
*/
public class AddAdvertDTO {
private Advert advert;
private String action;
... | 19.387097 | 83 | 0.648918 |
558131ebbdf0b804db3de9b4ca247bc2e5a0f277 | 916 | package com.mopub.mobileads.test.support;
import com.mopub.mobileads.factories.AdFetcherFactory;
import com.mopub.mobileads.factories.HttpClientFactory;
import org.robolectric.DefaultTestLifecycle;
import org.robolectric.RobolectricTestRunner;
import org.junit.runners.model.InitializationError;
import org.mockito.Mock... | 31.586207 | 83 | 0.774017 |
9c2b76c3cd46798d93caca5b81540a65cd138e95 | 1,627 | /**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may... | 31.288462 | 75 | 0.729564 |
53ac33ed84a6667fe467e9e2d1eeae27a91eb50f | 327 | package mgfsm;
import java.io.IOException;
/**
* A writer interface that receives a sequence and the number of its occurrences and
* it outputs them to a predefined output.
*
* @author Spyros Zoupanos
*/
public interface FsmWriter {
void write(int[] sequence, long count) throws IOException, InterruptedExcept... | 23.357143 | 84 | 0.749235 |
ea3943a2ffac33eb3bae5c48234c1cdfa26ad5e7 | 1,935 | package JGJAR.libraries.MyMath.linearAlgebra;
import JGJAR.libraries.MyMath.complex.*;
/**<h1>ComplexMatrix class</h1>
*
* @author JavaGamesJAR
* @version 0.5
* @since 2.0.0
*
*/
public class ComplexMatrix
{
public ComplexMatrix(Complex[][] c)
{
this.c = c;
this.l = c.length;
this.h =... | 16.826087 | 62 | 0.505943 |
1bd728dba5653e1f74e18cf4502c911d22177e2e | 3,008 | /*
* Copyright (C) 2016 Lukoh Nam, goForer
*
* 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 o... | 39.064935 | 99 | 0.728723 |
14545ab7c5967f1e3d870294aba099f50d27560f | 3,535 | package linchom.com.linchomspace.homepage.Entity;
import java.util.List;
/**
* Created by Administrator on 2016/10/10.
*/
public class ArticleListBean {
public String result;
public Data data;//不能定义成静态
public String msg;
public String url;
public class Data{
public List<Article_li... | 29.458333 | 234 | 0.607355 |
9060190018dc8f601d968c8c3126a360fdcc2b0c | 3,699 | /*
* GridGain Community Edition Licensing
* Copyright 2019 GridGain Systems, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License") modified with Commons Clause
* Restriction; you may not use this file except in compliance with the License. You may obtain a
* c... | 37.744898 | 101 | 0.717491 |
5ad2c45495c8b2492f6108a2f0a8fa15212d4a1a | 138 | package duc.uscript.execution.interpreter.statement;
@SuppressWarnings("all")
public class AssigmentAspectAssignmentAspectProperties {
}
| 23 | 56 | 0.847826 |
da3e0cf46b7e2f71ca102f5f86536016806c9ebe | 1,181 | package com.structures.Stack;
import com.structures.Iterator.IteratorInterface;
public interface StackInterface<T>
{
/**
* Return the top of the stack.
* @return the top of the stack.
*/
public T getTop ();
/**
* Insert an element into the stack
* @param element to be added.
* @return stack ... | 20.719298 | 52 | 0.639289 |
4483df597bc8df3918a2cbd1f28c3fe252f1058d | 649 | package com.github.kornilova_l.flamegraph.plugin.configuration;
import com.github.kornilova_l.flamegraph.configuration.Configuration;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.State;
@State(name = "flamegraph-profiler")
public class ConfigStorage implement... | 28.217391 | 79 | 0.761171 |
72b8e04f5ec6d21b8343354c14593cfa34d8a519 | 3,447 | /*
* Copyright 2014-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | 44.766234 | 96 | 0.454888 |
25aeb04c3f04b9b0837f00334cfb0a778bb193b6 | 6,322 | package org.globsframework.metamodel.fields.impl;
import org.globsframework.metamodel.GlobType;
import org.globsframework.metamodel.fields.*;
import org.globsframework.metamodel.type.DataType;
import org.globsframework.model.Glob;
import org.globsframework.utils.exceptions.InvalidParameter;
import org.globsframework.u... | 33.62766 | 123 | 0.558526 |
492da3a18c03bbf3cd2120435505f1b8af9792d8 | 3,480 | package uk.ac.ebi.embl.api.validation.check.entries;
import java.sql.SQLException;
import java.util.ArrayList;
import uk.ac.ebi.embl.api.entry.Entry;
import uk.ac.ebi.embl.api.validation.EmblEntryValidationCheck;
import uk.ac.ebi.embl.api.validation.EntryValidations;
import uk.ac.ebi.embl.api.validation.Origin;
impor... | 25.40146 | 121 | 0.747414 |
1ae4393b36660af58a8203af88ab354f4a4ac0db | 1,764 | package com.github.huifer.full.shiro.service.impl;
import com.github.huifer.full.shiro.dao.ShiroCompanyDao;
import com.github.huifer.full.shiro.dao.ShiroUserExtendDao;
import com.github.huifer.full.shiro.entity.ShiroCompany;
import com.github.huifer.full.shiro.ex.ServerEx;
import com.github.huifer.full.shiro.model.req... | 28.918033 | 73 | 0.765873 |
0c96d77eb0a9aa85cdf7ba795fa1f91dbd0b3306 | 191 | package org.gradle;
import junit.framework.TestCase;
public class Junit3Test extends TestCase {
public void testRenamesItself() {
setName("a test that renames itself");
}
}
| 19.1 | 46 | 0.712042 |
f79fc4ed5638b02dd5360e45bb2a6b4dc58e5647 | 382 | package seedu.address.model.medicine.exceptions;
/**
* Signals that the operation will result in duplicate Medicines (Medicines are considered duplicates if they have
* the same identity).
*/
public class DuplicateMedicineException extends RuntimeException {
public DuplicateMedicineException() {
sup... | 29.384615 | 114 | 0.756545 |
cf66e41e896ce5069306ded9e0700a59c7bd5f17 | 3,288 | /**
*
* This file is part of the https://github.com/BITPlan/com.bitplan.javafx open source project
*
* The copyright and license below holds true
* for all files except
* - the ones in the stackoverflow package
* - SwingFXUtils.java from Oracle which is provided e.g. for the raspberry env
*
* Copyright 2... | 36.94382 | 139 | 0.701642 |
f3d8707cbc8e8493fdb08005323ce49f8422f8ad | 2,447 | package com.zing.wordbook;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import com.zing.wordbook.domain.Word... | 35.463768 | 98 | 0.627707 |
f96205cdf964fe0ba66afc5a9a2ae0845ee22882 | 632 | package Goldsack.DiscoSheep;
import org.bukkit.block.Block;
import org.bukkit.entity.Entity;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockListener;
public class DiscoListenerBlock extends BlockListener{
DiscoSheep plugin;
public DiscoListenerBlock(DiscoSheep discoShe... | 25.28 | 64 | 0.740506 |
ef73aaccc4cfac92e80dba598cebb5df292455f5 | 464 | package com.Hsia.sharding.parser;
import com.Hsia.sharding.route.ShardingRule;
import com.Hsia.sharding.utils.ShardingUtil;
import org.junit.Test;
public class WriteVSReadTest {
ShardingRule shardingRule = new ShardingRule();
@Test
public void parseWR() {
System.out.println(String.valueOf(Shardin... | 29 | 92 | 0.752155 |
5f3bdfc6ecc472b33418fa0e9fcd7de0ca24648d | 10,058 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | 61.705521 | 171 | 0.794691 |
349a69f4a2cf047f7b80f483d0fc93bcc849c1b6 | 772 | import java.util.*;
import java.io.*;
public class StringDuplicationRemove {
static String removeDups(String S)
{
char[]ch = S.toCharArray();
String str = "";
LinkedHashSet<Character> lhs = new LinkedHashSet();
for(char i : ch)
{
lhs.add(i);
}
for(char i : lhs)
str += i;
return ... | 15.137255 | 83 | 0.620466 |
c5219f6810881ab6f5185e7c005874642424ff59 | 6,355 | /*
* Copyright 2020-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | 34.726776 | 117 | 0.797168 |
40ec63917fc4c1e42e3d5363093f80968f2b7039 | 1,118 | package fi.aalto.cs.apluscourses.presentation.exercise;
import static fi.aalto.cs.apluscourses.utils.PluginResourceBundle.getText;
import fi.aalto.cs.apluscourses.model.SubmissionResult;
import fi.aalto.cs.apluscourses.presentation.base.SelectableNodeViewModel;
import org.jetbrains.annotations.NotNull;
public class ... | 30.216216 | 96 | 0.742397 |
37d5ef2b155e479bc525d04a9712a593b1fadc30 | 420 | package com.maven.dao;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.maven.base.dao.BaseDao;
import com.maven.entity.LogOperationDetail;
@Repository
public interface LogOperationDetailDao extends BaseDao<LogOperationDetail> {
/**
* 查询操作日记详情
* @param... | 18.26087 | 76 | 0.77381 |
b84a1a520de45b8ab1de49427b95b099b0d8b43a | 1,081 | /*
* Copyright 2019 TWO SIGMA OPEN SOURCE, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... | 27.025 | 75 | 0.698427 |
cd7de42a02028cc36f5a10a3b4d4f8735dd23186 | 1,498 | package com.lauren.saveandgetxml20161206;
import android.content.Context;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
import com.lauren.utils.SmsUtils;
public class MainActivity extends AppCompatActiv... | 27.236364 | 96 | 0.627503 |
dc73f5c8b122a84d40084015a7c5375da60c3279 | 3,092 | /**
* Copyright 2013 Illumina
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writ... | 26.886957 | 281 | 0.655563 |
a29071c2ff7cec381becaf4c67414b5e05c3abdd | 144 | package uk.co.benjiweber.expressions.function;
public interface VarFunction<T, R> {
@SuppressWarnings("unchecked")
R apply(T... t);
}
| 18 | 46 | 0.701389 |
7b5fb3e0103bf67a7e872596f824fa9494284399 | 1,046 | package com.google.cloud.bigquery.dwhassessment.extractiontool.dumper;
import static com.google.common.truth.Truth.assertThat;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.function.Function;
import junit.framework.TestCase;
import org.junit.Before;
import org.jun... | 28.27027 | 91 | 0.782027 |
cd98b28a6dd5aa50e77aa9d3c07048d62e1d1ad8 | 568 |
public class Swap<T> {
private T first, second;
public Swap(T first, T second) {
this.first = first;
this.second = second;
}
public T getFirst() {
return first;
}
public void setFirst(T first) {
this.first = first;
}
public T getSecond() {
return second;
}
public void setS... | 14.564103 | 66 | 0.558099 |
54783562470215f78da4b68b05e6dc0ea58087df | 1,314 | package com.brentonbostick.capsloc.geom;
import com.brentonbostick.capsloc.world.Stroke;
import com.brentonbostick.capsloc.world.graph.Merger;
import com.brentonbostick.capsloc.world.graph.Road;
import com.brentonbostick.capsloc.world.graph.Vertex;
public enum SweepEventType {
ENTERROADCAPSULE,
EXITROADCAPSULE,
... | 21.540984 | 53 | 0.747336 |
31b32ea7dc4fc0baee7645c48051780dd1ce8655 | 364 | /**
*
*/
package org.hamster.weixinmp.dao.repository.resp;
import org.hamster.weixinmp.dao.entity.resp.WxRespVideoEntity;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
* @author honey.zhao@aliyun.com
* @version Jul 28, 2013
*
*/
public interface WxRespVideoDao extends PagingAndSor... | 21.411765 | 93 | 0.777473 |
bf8fbdafd88cb021e94c9e4ab820718b72db1bba | 419 | package rlbot.cppinterop;
// Keep in sync with enum defined in TcpClient.hpp
public enum DataType {
psyonix_flatbuffer,
live_data_packet, // In flatbuffer format
field_info_packet, // In flatbuffer format
rlbot_match_settings,
rlbot_player_input,
actor_mapping_data,
computer_id, /* Sent ... | 32.230769 | 122 | 0.747017 |
352356818e29ade054f627816fe1e2df041394ae | 759 | // Given an array of integers of stock prices per day, find the best day to buy and to sell, return the profit.
// Given [1, 5, 7, 4], the solution would be 6, buying at 1 and selling at 7.
class Solution {
public int maxProfit(int[] prices) {
int acc = 0;
for (int current = 0; current < prices.le... | 37.95 | 112 | 0.525692 |
5f21ce7f8234e74c8fcd551d5349c1728fd1374e | 27,839 | /*
* Copyright (C) 2009-2014 The Project Lombok Authors.
*
* 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, ... | 40.700292 | 217 | 0.732426 |
4315cd55f06c2a743348492d333ca8f5c060d0c7 | 5,956 | package de.uhd.ifi.se.decision.management.jira.mocks;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import com.atlassian.jira.avatar.Avatar;
import com.atlassian.jira.avatar.AvatarFormatPolicy;
im... | 26.122807 | 116 | 0.790128 |
e20bec1320606b2ddc5006ab4d2e28c847a9512e | 1,237 | /*
* BSD 3-Clause License
*
* Copyright (c) 2015-2020, Jianping Zeng.
* All rights reserved.
*
* Please refer the LICENSE for detail.
*/
package backend.mc;
/**
* This record contains all of the information known about a
* particular register. The subRegs field (if not null) is an array of
* registers that ... | 25.244898 | 75 | 0.643492 |
c7db1e6a3753ee27268c0e1a33becad891ddabca | 964 | package com.giscafer.schedule.check;
import java.util.List;
import com.jfinal.plugin.activerecord.Model;
import com.jfinal.plugin.activerecord.Page;
import data.general.DataService;
import data.general.QueryFilter;
/**
*
* @ClassName: Check
* @Description: TODO(考勤签到统计)
* @author giscafer
* @date 2015-11-2... | 25.368421 | 107 | 0.741701 |
7f4b7c988233fc9c487119e89f4fb6dd64836868 | 1,205 | package it.polimi.ingsw.model;
import it.polimi.ingsw.model.God.God;
import java.util.ArrayList;
/**
* This class represent a player.
*/
public class Player {
private final String name;
private final int playerNumber;
private final ArrayList<Worker> workers;
private final God godCard;
public ... | 20.423729 | 90 | 0.605809 |
95ea60e3c927fcadd0d054f7514683b5a260ae81 | 235 | package ru.job4j.beans;
/**
* @author Aleksandr Belov (whiterabbit.nsk@gmail.com)
* @since 26.12.2018
*/
public class DefaultConstructedBean {
public DefaultConstructedBean() {
System.out.println("by default");
}
}
| 19.583333 | 54 | 0.680851 |
20154ab47c237cf16ed9ad7458a58117b223e65d | 2,648 | /*
* Copyright (C) 2020 Dipl.-Inform. Kai Hofmann. All rights reserved!
*/
package de.powerstat.validation.values;
import java.util.Objects;
/**
* Second.
*
* Not DSGVO relevant.
*
* TODO Constructor with day, month, year, hour, minute
* TODO nextSecond, previousSecond
*/
public final class Second im... | 19.470588 | 130 | 0.616692 |
2b55be84447f96ceff07368c2880ae80525a5eda | 1,393 | // Copyright (c) 2019, the R8 project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.android.tools.r8.graph.analysis;
import com.android.tools.r8.graph.DexEncodedField;
import co... | 38.694444 | 100 | 0.760948 |
144fb8a310eb48f2bcc1099bdd7dea724c0b127e | 4,173 | /*
* Copyright DataStax, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in wri... | 34.775 | 93 | 0.727534 |
e28dc56fad94d171837b060a86641bf1f02eae19 | 1,174 | package com.quickstart.test;
public class StringTrim {
public static void main(String[] args) {
/*JAVA中去掉空格
1. String.trim()
trim()是去掉首尾空格
2.str.replace(" ", ""); 去掉所有空格,包括首尾、中间
复制代码 代码如下:String str = " hell o ";
String str2 = str.replaceAll(" ", "");
... | 30.894737 | 79 | 0.539182 |
9cec70137941364279fc36ebef33d3a574539170 | 2,227 | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Reportes;
import java.awt.Frame;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
im... | 27.158537 | 91 | 0.569376 |
12b089d9ad17f71252ebc59ea09dc1135b1192e0 | 1,489 | package i5.las2peer.services.ocd.algorithms;
import static org.junit.Assert.*;
import i5.las2peer.services.ocd.adapters.AdapterException;
import i5.las2peer.services.ocd.algorithms.utils.OcdAlgorithmException;
import i5.las2peer.services.ocd.graphs.Cover;
import i5.las2peer.services.ocd.graphs.CoverCreationLog;
import... | 37.225 | 151 | 0.811954 |
4b439b05a865f632981672cd11b2d23a9a65256d | 1,597 | package alekseybykov.portfolio.springboot.component.advice;
import alekseybykov.portfolio.springboot.component.response.NegativeResponse;
import alekseybykov.portfolio.springboot.component.response.ResponseAPI;
import alekseybykov.portfolio.springboot.component.response.StatusCode;
import lombok.extern.slf4j.Slf4j;
im... | 37.139535 | 104 | 0.773325 |
d81f97ba6392d7ed0272c71c339e7f6b5417395e | 8,627 | package marioandweegee3.toolbuilder.common.tools.tooltypes;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import java.util.function.Predicate;
import marioandweegee3.toolbuilder.ToolBuilder;
import ... | 40.693396 | 215 | 0.657471 |
24dc2d946b6ca213c4bb4c9d13a2d8afa65275f5 | 2,902 | // Copyright (c) 2003-present, Jodd Team (http://jodd.org)
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// th... | 30.547368 | 115 | 0.722261 |
603be0d62fad4274efdd82eb60e93ef89542261d | 4,033 | package dp.effective_java;
import java.util.ArrayList;
import java.util.List;
/**
* Builder Pattern of "Effective Java"
*
* Generated with https://riversun.github.io/java-builder/
*
*/
public class Person {
private String name;
private Integer age;
private String gender;
private Integer height;... | 31.023077 | 184 | 0.526407 |
7e10a8114c6e357872870d60127ffa4c69e3aad2 | 6,436 | /*
* Copyright (c) 2010, Stanislav Muhametsin. All Rights Reserved.
*
* 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... | 36.568182 | 184 | 0.653822 |
73a949ae7ae779fde6b3e19d0e4dd056112c0336 | 1,583 | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ejb.sessions;
import ejb.entities.Reservation;
import ejb.entities.Reservation_;
import java.util.List;
import javax.ejb.State... | 31.039216 | 102 | 0.748579 |
6c444bcd989ab066c5880d42be2d363059ede8f4 | 947 | package com.hzqing.system.domain;
import lombok.Data;
import java.util.*;
/**
*
* @description 部门管理
* @author hzqing
*/
@Data
public class Department {
/**
*
*/
private String departId;
/**
* 部门名称
*/
private String departName;
/**
* 排序
*/
private Integer de... | 11.987342 | 37 | 0.477297 |
b6907a3b83dd9adff47d927a4a52c03725188844 | 609 | package top.mowang.shop.ware;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.Enab... | 30.45 | 72 | 0.827586 |
6c54718fb6fa5b211ef1755e0c85d05721c95890 | 6,297 | package uk.gov.ons.ssdc.responseoperations.security;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.when;
import java.util.List;
import java.util.Optional;
im... | 36.398844 | 99 | 0.732412 |
be56bfce2e2f31a2cad0971c85ad2b6884ee7979 | 1,080 | package JavAsteroids.Utilities;
import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
/**
* Created by ODaynes on 26/02/2017.
*/
public class ImageManager {
private fina... | 25.116279 | 80 | 0.624074 |
9615f43572c2045c7cef53ca4fed14a9e001ceec | 2,060 | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License")... | 29.428571 | 79 | 0.690777 |
b561b2feddd75a4d6ab4a1743bf7b5836a4ff243 | 8,184 | /*
* Copyright 2017 Andrey Burov.
*
* 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 ... | 33.268293 | 103 | 0.663001 |
c616039b0989d668d2866a43f1dfad06f74be772 | 3,859 | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2016.10.... | 24.579618 | 122 | 0.603783 |
115fae5bebf3fd20ba28749bbcfea07be0829d2c | 3,435 | package cn.pintia.zjo.practice.test.problem1111;
import cn.pintia.zjo.practice.problem1111.Card;
import java.util.ArrayList;
import java.util.List;
public abstract class PokerCardsUtil {
/** Sample cards */
protected Card _2C, _3C, _4C, _5C, _6C, _7C, _8C, _9C, _TC, _JC, _QC, _KC,
_AC;
protec... | 42.9375 | 78 | 0.588064 |
a375fe22cf6d127ee16025bc3ddc6d9995a89ed7 | 5,730 | package info.spicyclient.modules.beta;
import java.net.MalformedURLException;
import java.net.URL;
import java.text.DecimalFormat;
import java.util.Base64;
import java.util.Random;
import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.GL11;
import com.sun.javafx.geom.Vec3d;
import info.spicyclient.SpicyClient;
i... | 37.207792 | 83 | 0.823211 |
2ca20108379d2b85a811757dcc030ff515141dec | 545 | package com.github.zachdeibert.jlinq.installer.conversions;
import com.github.zachdeibert.jlinq.installer.conversions.classes.AbstractClassConverter;
public class InjectableClass<T> {
private final AbstractClassConverter converter;
private final Class<? extends T> cls;
public AbstractClassConverter getConverter()... | 24.772727 | 89 | 0.779817 |
c750d8afbb021e4fcb0166fa6ebc589fdfa27c2d | 7,991 | package org.sxchinacourt.activity;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Handler;
import android.os.Message;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widg... | 34.296137 | 126 | 0.55137 |
bebfaad3939376dd61435d8be246b60486c33b7d | 3,574 | package tfb.status.service;
import com.google.errorprone.annotations.concurrent.GuardedBy;
import jakarta.inject.Inject;
import java.lang.management.ManagementFactory;
import java.time.Duration;
import java.util.Arrays;
import java.util.Objects;
import java.util.concurrent.Future;
import org.checkerframework.checker.n... | 28.365079 | 81 | 0.665361 |
b0e661db0e0c6ccb5c68a94d483280c58ea8651b | 1,787 | package mat.client.shared.search;
import mat.client.measure.service.SaveCQLLibraryResult;
import mat.shared.StringUtility;
import com.google.gwt.user.client.ui.TextBox;
/**
* The Class SearchResultUpdate.
*/
public class SearchResultUpdate {
/**
* Update.
*
* @param result
* the result
* @p... | 29.295082 | 109 | 0.70901 |
e8684bf3fb6743be2d37ec53d4393deafd554fee | 1,985 | package org.wavecraft.graphics.view;
import org.wavecraft.gameobject.GameObjectMovingOriented;
import org.wavecraft.geometry.Coord3d;
public class ViewBuilder {
public static View viewFullFrameFPS(){
View view = new View();
view.camera = new CameraFPS();
view.projection = new ProjectionPerspective();
return ... | 30.075758 | 93 | 0.721411 |
6c0e8ce26055d8d1b98090a5d826f7a1836a5729 | 5,334 | package com.codingchili.core.listener;
import io.vertx.core.Promise;
import io.vertx.core.buffer.Buffer;
import io.vertx.core.json.JsonObject;
import io.vertx.ext.unit.Async;
import io.vertx.ext.unit.TestContext;
import io.vertx.ext.unit.junit.Timeout;
import io.vertx.ext.unit.junit.VertxUnitRunner;
import org.junit.*... | 29.307692 | 95 | 0.630671 |
744cf5d5753e3103defcc149bacd39b68021f17a | 304 | package com.bullet.metricscloud.domain;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import io.vavr.Tuple2;
import lombok.ToString;
import java.util.List;
@ToString
@Getter
@RequiredArgsConstructor
public class ErrorMessage {
private final List<Tuple2<Category,String>> headers;
}
| 19 | 56 | 0.809211 |
6c36dca16de6f515799aeb30c513fcebc560254d | 21,376 | package com.philihp.weblabora.model;
import com.google.common.collect.ImmutableMap;
import com.philihp.weblabora.model.Scorecard.PlayerScore;
import com.philihp.weblabora.model.building.*;
import org.junit.Before;
import org.junit.Test;
import java.util.Map;
import java.util.Map.Entry;
import static org.hamcrest.Mat... | 51.016706 | 91 | 0.730679 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.