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 |
|---|---|---|---|---|---|
0d80dd2813d0e847bef311dd39c4257d5338dda9 | 805 | package com.study.LXF01.Package06Reflection;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
public class GetField {
public static void main(String[] args) throws Exception {
Field f = String.class.getDeclaredField("value");
f.getName();
f.getType();
int m = f.ge... | 28.75 | 93 | 0.688199 |
02d9e4302ca8ffedc59c79f36693084ba474f0b2 | 4,717 | /*
* Copyright (c) 2010-2015 Pivotal Software, Inc. 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 req... | 35.734848 | 79 | 0.717193 |
6c10cbde95cb2fa5d3f3f2f759f121a7e7fbe5e5 | 1,993 | package org.jboss.resteasy.test.resource.param.resource;
import org.jboss.resteasy.test.resource.param.QueryParamAsPrimitiveTest;
import org.junit.Assert;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
@Path("/default/null")
public class QueryParamAsPrimi... | 28.884058 | 91 | 0.698445 |
70c3a52c37571500cb65cf8ac248715157c630e1 | 1,018 | package ru.alexproject.blogserver.services;
import org.junit.Assert;
import org.junit.Test;
import ru.alexproject.blogserver.BaseTest;
import ru.alexproject.blogserver.model.domain.Post;
import ru.alexproject.blogserver.model.dto.PostDto;
public class PostServiceTest extends BaseTest {
@Test
public void crea... | 35.103448 | 98 | 0.726916 |
376c973143aff338a941076c85ee9e05fcd3729c | 3,618 | /**
* Leetcode - Algorithm - PalindromePermutation
*/
package com.ciaoshen.leetcode;
import java.util.*;
import com.ciaoshen.leetcode.myUtils.*;
/**
* Each problem is initialized with 3 solutions.
* You can expand more solutions.
* Before using your new solutions, don't forget to register them to the solution ... | 31.189655 | 114 | 0.52764 |
9cea608eff3904952a870def7983da114f233b06 | 885 | package dev.dankom.game.minecraft.hypixel.player.friend;
import dev.dankom.game.minecraft.hypixel.HypixelAPI;
import dev.dankom.game.minecraft.hypixel.player.PlayerWrapper;
import dev.dankom.game.minecraft.hypixel.reader.HypixelReader;
import dev.dankom.util.general.MapBuilder;
import org.json.simple.JSONArray;
import... | 32.777778 | 98 | 0.724294 |
742b67fc4a25b828d8850fc00183fd2517dadfb1 | 518 | package edu.kit.ss17.chatsys.team1.shared.ProtocolError;
import edu.kit.ss17.chatsys.team1.shared.ProtocolError.ErrorElements.ErrorElement;
/**
* Used to describe errors.
*/
public interface ProtocolErrorInterface {
/**
* @return the error message
*/
String getErrorMessage();
/**
* @return if this error ... | 20.72 | 103 | 0.723938 |
538318085c9726e5d33530e25db967e730818782 | 2,619 | package com.ctbri.wxcc.entity;
import java.util.List;
public class CommunityCommentBean {
private CommunityCommentContaienr data;
public CommunityCommentContaienr getData() {
return data;
}
public void setData(CommunityCommentContaienr data) {
this.data = data;
}
public static... | 24.027523 | 61 | 0.65903 |
881700f19d053460ff886d596332b4acd8e6868c | 327 | package com.example.android.sunshine.app;
import android.app.Application;
import com.facebook.stetho.Stetho;
/**
* Created by safwanx on 7/17/16.
*/
public class MainApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
Stetho.initializeWithDefaults(this);
... | 19.235294 | 50 | 0.700306 |
741bd02c528733beaaf69ca9a9e1cb0c0c241641 | 442 | package com.wrc.tutor.upms.back.service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wrc.tutor.common.entity.po.Organisation;
import com.wrc.tutor.common.mapper.OrganisationMapper;
import org.springframework.stereotype.Service;
/**
* <p>
* 服务实现类
* </p>
*
* @author wrc
* @sinc... | 22.1 | 92 | 0.771493 |
cc560561c2d0c03ad8f1992196dc4b0a86e4fc20 | 14,324 | package com.diozero.internal.provider.remote.grpc;
/*-
* #%L
* Organisation: diozero
* Project: diozero - Remote Provider
* Filename: GrpcClientI2CDevice.java
*
* This file is part of the diozero project. More information about this project
* can be found at https://www.diozero.com/.
* %%
* Copyrigh... | 38.197333 | 111 | 0.730941 |
d63195587ba6524d18713f4f8ed7b1081028bf22 | 1,085 | package display;
import display.internal.Shader;
import display.internal.Window;
import imgui.ImGui;
import imgui.extension.implot.ImPlot;
import imgui.extension.implot.ImPlotContext;
public abstract class Application implements AutoCloseable {
public Window window;
public ImPlotContext imPlotContext = ImPlot.crea... | 20.865385 | 61 | 0.727189 |
d189e5ab777c54d0afad61a6c73618ce20b16fe3 | 989 | package ${package}.tapestry.integration.pages;
import org.apache.tapestry5.test.SeleniumTestCase;
import org.testng.annotations.Test;
public class LoginTest extends SeleniumTestCase {
@Test
void loginSuccess() {
// given
open("/login");
assertTrue(getTitle().startsWith("Login"));
... | 24.121951 | 68 | 0.55814 |
ba3f70a27a7bf35fd92a943192ac99a5815870aa | 7,401 | package org.openrdf.http.object.chain;
import java.io.IOException;
import java.io.InputStream;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import junit.framework.TestCase;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.HttpException;... | 33.188341 | 97 | 0.738279 |
4ccca027bed5b9ddc2f9a2413b6c558e6158dd4a | 1,981 | /*
* Copyright 2015-2018 Micro Focus or one of its affiliates.
*
* 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... | 40.428571 | 127 | 0.760727 |
8d535d732fe6dba10bef429695b78b05ef3bc5ff | 246 | package com.aaron.demo.patterns.strategy;
public class CashReturn implements CashSuper {
@Override
public double acceptCash(double money) {
if (money >= 300) {
return money - 300;
}
return 0;
}
}
| 18.923077 | 46 | 0.597561 |
9c78765cba1ecc077056279ef24271b7209d4a27 | 1,164 | package com.loserico.pattern.singleton;
import java.lang.reflect.Constructor;
/**
* 懒汉式v2版在反射的作用下,单例结构是会被破坏的
*
* <p>
* Copyright: Copyright (c) 2018-05-05 20:40
* <p>
* Company: DataSense
* <p>
* @author Rico Yu ricoyu520@gmail.com
* @version 1.0
* @on
*/
public class SynchronizedLazySingl... | 27.069767 | 88 | 0.698454 |
f7634bde94798bcaa5907ffd711a313782c5411c | 2,377 | /*
* Copyright (C) 2013 - 2018 Michael Bulla [michaelbulla@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
*
... | 36.569231 | 114 | 0.730753 |
1f83b87d95acb73cb599799126e1d4eaf3d91591 | 2,232 | /*
* Cloud Resource & Information Management System (CRIMSy)
* Copyright 2020 Leibniz-Institut f. Pflanzenbiochemie
*
* 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.... | 29.368421 | 77 | 0.709229 |
ef36b452764c28614e4b8347e984b525865a2674 | 1,768 | package co.currere.controller;
import co.currere.domain.Game;
import co.currere.service.GameService;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factor... | 34 | 86 | 0.811652 |
134e73cb5b41916a7a7c0a312ad05eebe39a7a31 | 710 | import java.util.*;
import java.io.*;
class gcd {
// naive approach-->O(n)
static int findGcd(int a,int b){
int min=Math.min(a,b);
int ans=1;
for(int i=2;i<=min;i++){
ans=(a%i==0 && b%i==0)?i:ans;
}
return ans;
}
// optimized approach--->O(log(min(a,b... | 22.903226 | 45 | 0.474648 |
7a844e9e712752ab15944af140962ddf3c76d652 | 7,375 | package study.daydayup.wolf.business.trade.buy.biz.loan.entity;
import org.springframework.validation.annotation.Validated;
import study.daydayup.wolf.business.trade.api.config.TradeTag;
import study.daydayup.wolf.business.trade.api.domain.entity.Contract;
import study.daydayup.wolf.business.trade.api.domain.entity.Or... | 33.071749 | 96 | 0.639864 |
f75b58a6d3e9937a2e3d3795ad51dc74311662ec | 668 | /**
*
*/
package com.ugiant.common.utils.excel.fieldtype;
import org.apache.commons.lang3.StringUtils;
import com.ugiant.modules.sys.model.Office;
import com.ugiant.modules.sys.utils.UserUtils;
/**
* 字段类型转换
*
* @version 2013-03-10
*/
public class OfficeType {
/**
* 获取对象值(导入)
*/
public static Object ge... | 16.7 | 57 | 0.639222 |
f5f3e8e78c191c4a95aca3d95c9833f36f42ec59 | 289 | package in.brewcode.api.persistence.dao;
import in.brewcode.api.persistence.dao.common.IOperationsDao;
import in.brewcode.api.persistence.entity.Content;
import java.util.List;
public interface IContentDao extends IOperationsDao<Content>{
List<Content> getArticleContents(Long id);
}
| 24.083333 | 61 | 0.820069 |
b8ef92a6d3bd1c5226344947caa92fa871d94ee1 | 759 | package projects.nyinyihtunlwin.talks.adapters;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import projects.nyinyihtunlwin.talks.R;
import projects.nyinyihtunlwin.talks.data.vo.PlaylistsVO;
import projects.nyinyihtunlwin.talks.viewholders.PlaylistsViewHolder;
/**
* Creat... | 26.172414 | 89 | 0.769433 |
6493d68f891faa0b05a9139969d8281454bac7d0 | 1,778 | package com.lambkit.core.api.route;
/**
* @author Henry Yang 杨勇 (gismail@foxmail.com)
* @version 1.0
* @Package com.lambkit.core.api.route
*/
public class ApiRequest {
private String memberId;
private String accessToken;
private String sign;
private String uCode;
private String eCode;
private ... | 17.431373 | 50 | 0.670979 |
d64cc49e373ec95b036de166571b9dd7799a8c8a | 13,892 | /*
* Copyright © 2016 Intel Corporation. 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,
* this list of condit... | 40.979351 | 112 | 0.606464 |
d6f53ae0626ce2429558683f4f165d93d679bf82 | 3,133 | package app;
import java.util.concurrent.TimeUnit;
public class Time {
private long time;
private Clock clock, inspection, delay;
private Scramble scramble;
private boolean onInspection = false;
private boolean onDelay = false;
private int inspectionTime = 15;
public boolean pressed = false;
public int ho... | 18.538462 | 66 | 0.644111 |
9ce6745dc8652a2e78bb43f68d69e21c0fad36de | 2,488 | /*
* Copyright 2014 Shazam Entertainment Limited
*
* 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 ... | 40.786885 | 118 | 0.745579 |
cb4b7df917e19e0df725800634d6dcf04aae7c30 | 6,122 | package com.app.app1.activities.user;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import... | 36.011765 | 123 | 0.688337 |
e56955de6d5e16f1dfc21f13824def878f9170b6 | 974 | package cn.hutool.core.comparator;
import cn.hutool.core.util.ClassUtil;
import cn.hutool.core.util.StrUtil;
import java.lang.reflect.Field;
/**
* Bean字段排序器<br>
* 参阅feilong-core中的PropertyComparator
*
* @param <T> 被比较的Bean
* @author Looly
*/
public class FieldComparator<T> extends BaseFieldComparator<T> {
priv... | 20.723404 | 124 | 0.701232 |
0e1e82a13360ac2dd6251f830ea6511ea653e736 | 782 | import java.util.ArrayList;
import java.util.Iterator;
class ProgressMonitor {
/**
* Return a snapshot of the ProgressSource list
*/
public ArrayList<ProgressSource> getProgressSources() {
ArrayList<ProgressSource> snapshot = new ArrayList<>();
try {
synchronized (progressSo... | 25.225806 | 103 | 0.694373 |
c54573764a5609b9a8f8320fd0de2d162c4652cb | 4,362 | package com.github.extermania.leetcode;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
public class Temp {
class Solution {
List<Character> pos(char[][] board, int i, int j){
int[] arr = new int[9];
for(int n=0; n<9; n++) //check ... | 31.608696 | 68 | 0.340899 |
3b7320bae74c36d8e10d5cbab89380a11ba33145 | 8,189 | package de.metas.event.log;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import de.metas.cache.CCache;
import de.metas.common.util.time.SystemTime;
import de.metas.error.AdIssueId;
import de.metas.event.model.I_AD_EventLog;
import de.metas.event.model.I_AD_EventLog_Entr... | 34.263598 | 131 | 0.718525 |
2f85fa753505960c73793fd1760f67b294310cfe | 2,438 | /*
* Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/... | 38.698413 | 91 | 0.662838 |
bb8de8c4d7c394d65a1be06a823578d9560d6dc0 | 952 | package com.frontbackend.thymeleaf.bootstrap.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.Reques... | 32.827586 | 112 | 0.795168 |
6cb12ae943d99d539118915f957ae83603fda86a | 4,471 | package io.blockchainetl.anomaloustransactions.domain.bitcoin;
import com.google.common.base.Objects;
import org.apache.avro.reflect.Nullable;
import org.apache.beam.sdk.coders.AvroCoder;
import org.apache.beam.sdk.coders.DefaultCoder;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jack... | 25.548571 | 110 | 0.645046 |
881ba53f884cbeb9c631f4b77a07f3f7d7786bd6 | 4,975 | /*
* Copyright (C) 2009-2014 Steve Rowe <sarowe@gmail.com>
* Copyright (C) 2017-2021 Google, LLC.
*
* License: https://opensource.org/licenses/BSD-3-Clause
*
* Redistribution and use in source and binary forms, with or without modification, are permitted
* provided that the following conditions are met:
*
* 1.... | 42.887931 | 103 | 0.757588 |
ebedad890d341e254eacd97af508867890879af3 | 1,582 | /*
* Copyright 2017-2019 EPAM Systems, Inc. (https://www.epam.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 requ... | 25.934426 | 91 | 0.659292 |
35b30c266cb34f416aa49214d459bbd15ec32915 | 773 | /*
* KIELER - Kiel Integrated Environment for Layout Eclipse RichClient
*
* http://www.informatik.uni-kiel.de/rtsys/kieler/
*
* Copyright 2010 by
* + Christian-Albrechts-University of Kiel
* + Department of Computer Science
* + Real-Time and Embedded Systems Group
*
* This code is provided under the t... | 23.424242 | 77 | 0.670116 |
1e7e4bafd7282504d0d2e7411b7e67d880d2cdd3 | 3,480 | /*******************************************************************************
* Copyright (c) 2021 Microsoft Research. All rights reserved.
*
* The MIT License (MIT)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "S... | 37.419355 | 111 | 0.701724 |
5381c6d0dad2c4a04eb91a4d1fa6e7a32dbeeca8 | 3,807 | package net.sourceforge.ganttproject.export;
import org.apache.fop.fonts.FontFileReader;
import org.apache.fop.fonts.TTFFile;
import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.FileInputStream;
import java.util.ArrayList;
import java.awt.*;
/**
* Created by IntelliJ IDEA... | 32.262712 | 103 | 0.596795 |
758656c98eeb6c8fbc3a90a62d51af9f52ec2bd2 | 264 | package org.nutz.castor;
public enum AlipayNotifyType {
StatusSync("trade_status_sync");
private String state;
private AlipayNotifyType(String s) {
state = s;
}
@Override
public String toString() {
return state;
}
}
| 15.529412 | 40 | 0.628788 |
77bf1c7f53f31d17a9d9de4baa7e5bb10ea2da1f | 318 | package com.synopsys.integration.jira.oauth;
import com.google.api.client.auth.oauth.OAuthGetAccessToken;
public class JiraOAuthGetAccessToken extends OAuthGetAccessToken {
public JiraOAuthGetAccessToken(String accessTokenRequestUrl) {
super(accessTokenRequestUrl);
this.usePost = true;
}
}
| 26.5 | 66 | 0.77673 |
26025c6f0f97469f9ad93b644090f09c73937885 | 3,600 | package de.dfki.nlp.loader;
import com.google.common.base.Joiner;
import com.google.common.collect.Lists;
import de.dfki.nlp.config.AnnotatorConfig;
import de.dfki.nlp.domain.IdList;
import de.dfki.nlp.domain.ParsedInputText;
import de.dfki.nlp.io.RetryHandler;
import lombok.extern.slf4j.Slf4j;
import org.apache.commo... | 37.113402 | 135 | 0.689167 |
2e4ecc6513a27d8011724f30221a93bc9755325e | 602 | package net.emaze.dysfunctional.dispatching.actions;
import java.util.function.BiConsumer;
/**
* A null binary functor with no return value effectively doing nothing. Much
* better than {@literal Noop<T>}.
*
* @param <T1> the former type parameter
* @param <T2> the latter type parameter
* @author rferranti
*/
... | 24.08 | 77 | 0.681063 |
ffe87d391c56e3af4e8efbcdab954f809fa113e6 | 9,474 | package com.tw.go.authentication;
import com.thoughtworks.go.plugin.api.GoApplicationAccessor;
import com.thoughtworks.go.plugin.api.GoPlugin;
import com.thoughtworks.go.plugin.api.GoPluginIdentifier;
import com.thoughtworks.go.plugin.api.annotation.Extension;
import com.thoughtworks.go.plugin.api.logging.Logger;
impo... | 41.920354 | 161 | 0.681022 |
65557e3aaa1d2b55200fab0566fcb7d33600b7a9 | 3,187 | package com.weychain.erp.service;
import com.weychain.erp.domain.DO.Unit;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
<<<<<<< HEAD
public interface UnitService {
Unit getUnit(long id)throws Exception;
List<Unit> getUni... | 36.632184 | 89 | 0.767493 |
9991db35903dfa69acf4ae3a6094785ee85fbdce | 879 | package com.bitlove.fetlife.model.pojos.fetlife.json;
import com.bitlove.fetlife.model.pojos.fetlife.dbjson.Member;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
@JsonIgnoreProperties(ignoreUnknown = true)
public class Mention {
@JsonProperty(... | 20.44186 | 61 | 0.667804 |
5d34eb7fe8218ca8877f4f5a60065abe13707397 | 26,058 | /*
* Copyright 2011 JBoss 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 ... | 41.165877 | 245 | 0.551961 |
36abd204d088e514e962001a3f83d87654b5b0cc | 1,712 | /*
* Copyright (C) 2016 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 app... | 33.568627 | 100 | 0.761098 |
10c4707b31a022d286d188d013984f05a5f3799b | 2,933 | package seedu.address.logic.parser;
import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;
import static seedu.address.commons.core.Messages.MESSAGE_TOO_MANY_TAG_FIELDS;
import static seedu.address.logic.parser.CliSyntax.PREFIX_CARDNUMBER;
import static seedu.address.logic.parser.CliSyntax.P... | 47.306452 | 114 | 0.765428 |
52f2817b2e25e3bb272579d99155a7930ca74940 | 7,872 | /* Copyright 2016 Sven van der Meer <vdmeer.sven@mykolab.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 r... | 38.588235 | 136 | 0.714812 |
60ee2c30a55f58e29ce59c9a0cf2e847a9955c5f | 2,516 | package com.gentics.cr.lucene.didyoumean;
import java.io.IOException;
import java.util.Collection;
import org.apache.log4j.Logger;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.search.spell.CustomSpellChecker;
import org.apache.lucene.search.spell.LuceneDictionary;
import com.gentics.cr.CRConf... | 32.25641 | 119 | 0.766693 |
feaa0943fb86a61f8206ad369e5e3ea764b1e50b | 1,133 | package problems.medium;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Random;
import java.util.Set;
/**
* Given an integer n and a list of integers l, write a function that randomly
* generates a number from 0 to n-1 that isn't in l (uniform).
*
* @author Andrew
... | 22.215686 | 78 | 0.60459 |
db49c7f593d479c55294decd86209bfb2c7625ce | 4,407 | import edu.princeton.cs.algs4.WeightedQuickUnionUF;
public class Percolation {
//setting variables used in multiple functions
int count;
int n;
boolean open[];
int grid[];
WeightedQuickUnionUF quickUnion;
//Creating the nxn grid, all sites blocked
public Percolation(int n) {
if(n <= 0) { //throwing an exce... | 39 | 174 | 0.677332 |
480d773aaa7b6734bce78ee14b7c07cb266e2714 | 15,880 | package com.example.myapplication;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.constraintlayout.solver.state.State;
import androidx.constraintlayout.widget.ConstraintLayout;
import android.annotation.SuppressLint;
import android.graphics.Color;
import android.g... | 33.361345 | 145 | 0.57097 |
a348870a81807c8b85e4231e1d8932575f66c244 | 4,373 | package org.markdownwriterfx.options;
import java.util.List;
import java.util.prefs.Preferences;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.StringProperty;
import javafx.scene.text.Font;
import or... | 31.460432 | 94 | 0.697233 |
5d10b41271e6c78054f53f152fb796bcc733f740 | 2,399 | /*
* Copyright 2018 LINE Corporation
*
* LINE Corporation licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | 34.768116 | 100 | 0.725719 |
a73c56cf6a2a6a586370f73030c14b3e861f1471 | 8,025 | /*
* ==========================================================================
* Copyright (C) 2019-2021 HCL America, Inc. ( http://www.hcl.com/ )
* All rights reserved.
* ==========================================================================
* Licensed under the Apache License, Ve... | 36.981567 | 132 | 0.635514 |
cc8e64e6cfd84653ba1f6680fea05da05cf61d25 | 220 | /**
* Author: markliu
* Time : 16-9-3 下午4:43
*/
public class ClientTest {
public static void main(String[] args) {
Account account = new CurrentAccount();
account.handlerTemplate("test", "111111", 12000);
}
}
| 18.333333 | 51 | 0.659091 |
6d7f5d877a00e2802a467dceabb942ffe213a041 | 3,446 | /*
* __ .__ .__ ._____.
* _/ |_ _______ __|__| ____ | | |__\_ |__ ______
* \ __\/ _ \ \/ / |/ ___\| | | || __ \ / ___/
* | | ( <_> > <| \ \___| |_| || \_\ \\___ \
* |__| \____/__/\_ \__|\___ >____/__||___ /____ >
* \/ \/ ... | 26.921875 | 80 | 0.588218 |
7c3e3300243e0bfe7475ea226b7e0cb49078cd37 | 17,325 | /*
* Copyright 2011 University of Southern California
*
* 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 requ... | 31.272563 | 144 | 0.593131 |
52601a719060cc4398cd9e8f50b02796f3da23bd | 1,480 | /*
* Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/li... | 37 | 82 | 0.750676 |
bd67b220885c1aea2b5890f11df7543c48e87706 | 6,785 | /*
* (C) Copyright 2010-2018 Nuxeo (http://nuxeo.com/) and others.
*
* 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 requi... | 33.423645 | 139 | 0.690789 |
64b3edc95c7a13d57bd3e2bf843a32f41ec7e7c4 | 1,747 | package nc.unc.cs.services.communal.controllers.mock.price.tax.correct;
import static org.hamcrest.Matchers.containsString;
import static org.mockito.Mockito.when;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcRe... | 43.675 | 100 | 0.785346 |
70fcd5f37fa316a33f768b9de76b1ab7c3701b27 | 6,759 | /*
* This file is part of Nucleus, licensed under the MIT License (MIT). See the LICENSE.txt file
* at the root of this project for more details.
*/
package io.github.nucleuspowered.nucleus.api.module.rtp;
import io.github.nucleuspowered.nucleus.api.module.rtp.kernel.RTPKernel;
import org.spongepowered.api.world.Lo... | 31.004587 | 127 | 0.58559 |
17da1fcacf976795a4f74a6012d6a5f033933170 | 5,338 | /**
* Copyright (c) 2021, OSChina (oschina.net@gmail.com).
* <p>
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless requi... | 23.93722 | 160 | 0.642188 |
78b6813b3411d4ece0dc13146e642ccb52877d74 | 30,553 | package ekraft.verysimplerest.annotation;
import ekraft.verysimplerest.RestClient;
import ekraft.verysimplerest.RestServer;
import ekraft.verysimplerest.examples.AsyncAnnotationTodoService;
import ekraft.verysimplerest.examples.AnnotationTodoRestService;
import ekraft.verysimplerest.utils.RestException;
import ekraft... | 44.864905 | 115 | 0.738618 |
fc0a109f95fae512e3f1302683c055a713ca93b5 | 2,508 | package com.packt.quarkus.chapter6;
import org.eclipse.microprofile.faulttolerance.Asynchronous;
import org.eclipse.microprofile.faulttolerance.Bulkhead;
import org.eclipse.microprofile.faulttolerance.CircuitBreaker;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.enterprise.context.ApplicationS... | 34.356164 | 115 | 0.695375 |
4431d0ab75ef83fe64234b3c1385560e911d10aa | 1,207 | class Student extends Person{
private int[] testScores;
/*
* Class Constructor
*
* @param firstName - A string denoting the Person's first name.
* @param lastName - A string denoting the Person's last name.
* @param id - An integer denoting the Person's ID number.
* @param sc... | 25.680851 | 79 | 0.523612 |
76cc7513783fee46199a331be1fe07f289ec5c21 | 2,144 | package graphql.execution;
import graphql.PublicApi;
import graphql.language.SourceLocation;
import graphql.schema.DataFetchingEnvironment;
import graphql.schema.GraphQLFieldDefinition;
import java.util.Map;
/**
* The parameters available to {@link DataFetcherExceptionHandler}s
*/
@PublicApi
public class DataFetch... | 27.487179 | 97 | 0.711754 |
9eab1df2ad466499e926b9bec01b119db0aeac19 | 3,035 | package dgm.modules.elasticsearch;
import dgm.GraphUtilities;
import dgm.ID;
import dgm.trees.Pair;
import org.elasticsearch.action.get.GetResponse;
import org.nnsoft.guice.sli4j.core.InjectLogger;
import org.slf4j.Logger;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.base.Function;
im... | 34.488636 | 106 | 0.63888 |
0dc292ea00c4936895ae1c0b93b3017e563050c5 | 2,492 | /*
* Copyright 2019 Scott Logic Ltd
*
* 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... | 36.115942 | 136 | 0.74679 |
13efec4afee02b8953e7829f633aacb3d84b9ddd | 1,088 | package com.dianping.phoenix.spi.internal;
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.ArrayList;
import java.util.List;
import com.dianping.phoenix.spi.WebappProvider;
public class OrderingReservedWepappPr... | 23.652174 | 95 | 0.75 |
1c1747ec2db67a66a015796b926bddfd90440aff | 6,774 | package me.gingerninja.authenticator.data.adapter;
import android.content.res.ColorStateList;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;
import ... | 34.212121 | 137 | 0.653381 |
7d75eccb058cbb72d867830205764922245e63b7 | 3,593 | package com.huaweicloud.sdk.vpcep.v1.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.huaweicloud.sdk.core.SdkResponse;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.function.Consumer;
/** Resp... | 30.193277 | 113 | 0.654606 |
ef1a7af2af9742d0e865742cdb3b85e722e0c5e6 | 1,282 | package com.bloomhousemc.thermus;
import com.bloomhousemc.thermus.client.UserHud;
import com.bloomhousemc.thermus.client.renderer.BoilerBlockEntityRenderer;
import com.bloomhousemc.thermus.client.renderer.PipeBlockEntityRenderer;
import com.bloomhousemc.thermus.common.registry.ThermusObjects;
import net.fabricmc.api.C... | 53.416667 | 169 | 0.859594 |
93ae491eee3c0fc360f6f5b38aaeccb614322d75 | 1,419 | package com.github.zhenwei.pkix.util.oer.its;
import com.github.zhenwei.core.asn1.ASN1Integer;
import java.math.BigInteger;
/**
* NinetyDegreeInt ::= INTEGER { min (-900000000), max (900000000), unknown (900000001) }
*/
public class OneEightyDegreeInt
extends ASN1Integer {
private static final BigInteger low... | 24.894737 | 97 | 0.693446 |
df9b4f67802dc12a43b30d7ec9178c3e2d538938 | 477 | package de.quinscape.automaton.runtime.filter.impl;
import de.quinscape.automaton.runtime.filter.Filter;
import de.quinscape.automaton.runtime.filter.FilterEvaluationContext;
public final class NotFilter
implements Filter
{
private final Filter filter;
public NotFilter(Filter filter)
{
this... | 19.08 | 69 | 0.719078 |
d25594ecb9f47d9933b5e6a2c0f8422b638addba | 833 | package org.benetech.servicenet.service.dto.provider;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
@Data
public class ProviderFilterDTO implements Serializable {
private static final long serialVersionUID = 1L;
private String city;
private String r... | 25.242424 | 99 | 0.656663 |
1804e6017e182920ed6b75a2ca1919efa8359b48 | 5,446 | package team.hollow.neutronia.client.entity.render.model.model;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.model.Cuboid;
import net.minecraft.client.render.entity.model.EntityModel;
import net.minecraft.entity.Entity;
/**
* Axoleen - Undefined
* Created using Tabula 7.0.0
*/
pub... | 44.639344 | 130 | 0.622475 |
716fd6e492c833ed2f5814781ae9408e61de6d99 | 1,710 | package edu.jhu.pacaya.autodiff.tensor;
import org.junit.Test;
import edu.jhu.pacaya.autodiff.AbstractModuleTest;
import edu.jhu.pacaya.autodiff.AbstractModuleTest.Tensor2Factory;
import edu.jhu.pacaya.autodiff.Module;
import edu.jhu.pacaya.autodiff.Tensor;
import edu.jhu.pacaya.autodiff.TensorUtils;
import edu.jhu.p... | 34.2 | 90 | 0.635673 |
e3b9df745fbf4302bbb0c87c31349edfd3709499 | 13,118 | package com.randomappsinc.simpleflashcards.activities;
import android.animation.Animator;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.MenuItem;
import android.view.View;
import android.widget.RadioButton;
import android.widget.RadioGroup;
imp... | 34.430446 | 109 | 0.576841 |
69963933fc74247b430cfe01cfb3daf6125c4b95 | 753 | package net.lshift.spki.suiteb.sexpstructs;
import net.lshift.spki.convert.Convert;
import org.bouncycastle.crypto.AsymmetricCipherKeyPair;
import org.bouncycastle.crypto.params.ECPublicKeyParameters;
import org.bouncycastle.math.ec.ECPoint;
/**
* Serialization format for public encryption keys
*/
@Convert.Require... | 26.892857 | 73 | 0.759628 |
1a788a62ab4305a933b8c79e8a38875a669d130c | 15,612 |
package com.trovebox.android.app;
import java.lang.ref.WeakReference;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import org.holoeverywhere.addon.AddonSlider;
import org.holoeverywhere.addon.AddonSlider.AddonSliderA;
import org.... | 33.146497 | 122 | 0.594607 |
f6fb75e1d5c9ef68e78347a335b34b895f49d0f4 | 2,632 | /**
* Copyright (c) 2002-2013 "Neo Technology,"
* Network Engine for Objects in Lund AB [http://neotechnology.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundati... | 37.070423 | 110 | 0.677812 |
33c727e68658a33e156a27ee45487ede71d58781 | 3,721 | package org.firstinspires.ftc.teamcode.test;
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
import com.qualcomm.robotcore.util.ElapsedTime;
import org.firstinspires.ftc.teamcode.hardware.Button;
import org.firstinspires.ftc.teamcode.hardware.Carouse... | 30.5 | 115 | 0.53749 |
cb4c23f5bdb43cec61bf7aed25d4b9fed5d23c21 | 2,676 | /**
* RobotLib Version Number. Update for each release. Also update overview.html for
* the JavaDoc as well as the readme.md and gradle.properties files.
*/
package Team4450.Lib;
/**
* Provides static access to current version of the library.
*/
public class LibraryVersion
{
/**
* Returns current version of ... | 45.355932 | 95 | 0.741779 |
9e78c07d5f8ce6069e32b88bafe2858b4ac77e61 | 3,067 | package com.todolistapp.restservice;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestP... | 44.449275 | 217 | 0.658298 |
08ce288d479bf98d5d504a5c4c7e0dd03250dd53 | 2,526 | package com.tuling.tulingmall.service.impl;
import com.github.pagehelper.PageHelper;
import com.tuling.tulingmall.mapper.SmsHomeBrandMapper;
import com.tuling.tulingmall.model.SmsHomeBrand;
import com.tuling.tulingmall.model.SmsHomeBrandExample;
import com.tuling.tulingmall.service.SmsHomeBrandService;
import org.spri... | 35.577465 | 114 | 0.719715 |
1945bb11b8fc2570ce3b66485849488839a328c2 | 4,302 | package net.fishbulb.jcod;
import mockit.Mocked;
import net.fishbulb.jcod.display.TileDisplay;
import net.fishbulb.jcod.display.Tileset;
import org.testng.annotations.Test;
import org.testng.log4testng.Logger;
import java.nio.charset.Charset;
import static org.testng.Assert.assertEquals;
public class ConsoleTest {
... | 43.02 | 123 | 0.682008 |
ce0a628e1e9a81919f54c7f21376f7d1fc6f43d1 | 3,848 | package org.sunbird.badge.service.impl;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import java.io.IOException;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mockito;
import org.powermock.api.mockito.PowerMockito;
i... | 40.083333 | 99 | 0.785863 |
210541ae41bdec0e0ed8d9b7a94829cd4e6d9fad | 754 | package io.horizon.market.handler;
import org.junit.Test;
public class MarketDataMulticasterTest {
@Test
public void test() {
// private final MarketDataMulticaster<FtdcDepthMarketData, FastMarketDataBridge> multicaster = new MarketDataMulticaster<>(
// getAdaptorId(), FastMarketDataBridge::newInstance, (market... | 31.416667 | 125 | 0.758621 |
80357ead6f2752637a1d988066d792ddff54dc1a | 2,928 | package com.kyperbox.systems;
import com.badlogic.gdx.maps.MapProperties;
import com.kyperbox.objects.GameLayer;
import com.kyperbox.objects.GameObject;
import com.kyperbox.objects.GameObject.GameObjectChangeType;
import com.kyperbox.umisc.Event;
import com.kyperbox.umisc.EventListener;
public abstract class LayerSy... | 27.111111 | 87 | 0.767418 |
a0429d21c678fddcf9beac2d81b97d8e7ee37487 | 3,777 | /*
* MIT License
*
* Copyright (c) 2021 Brandon Li
*
* 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, modif... | 38.540816 | 99 | 0.694731 |
d160695399e8f1c9a57d35876a0d3585de87ee0a | 2,204 | package org.sonar.plugins.coverageevolution;
import org.junit.Test;
import org.sonar.api.resources.File;
import org.sonar.api.resources.Project;
import org.sonar.api.resources.Resource;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.ass... | 33.907692 | 98 | 0.705535 |
eebe7bcfd374efec3a45a4736412d696dd49d5e9 | 2,307 | package com.jetlag.jcreator.pictures;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
import android.provider.MediaStore;
/**
* Created by vince on 17/04/16.
*/
public class DevicePicture implements Picture, Parcelable {
private String storeId;
private double latitude;
private... | 20.783784 | 87 | 0.690507 |
13854ebfb2ce14853840d84bd63cc1c8095b59fd | 366 | package ua.block06.trainigcod.exceptions.part_II;
/**
* Created on 22.02.2019.
*
* @author Aleks Sidorenko (alek.sidorenko1979@gmail.com).
* @version $Id$.
* @since 0.1.
*/
public class App23 {
public static void f0(Throwable t) throws Exception {
//throw t;
}
public static void f1(Object re... | 19.263158 | 58 | 0.622951 |
7a42fb42223b967fe9b0fbb2efcfe7c1d9022c20 | 7,519 | package com.cisco.flare.trilateral;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.PixelFormat;
import android.graphics.PointF;
import android.graphics.PorterDuff;
import android.graphics.RectF;
import android.util.A... | 29.256809 | 113 | 0.729219 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.