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 |
|---|---|---|---|---|---|
5e8bad9d3e46b1c4748f1f23c879418c5edaafba | 9,716 | package com.yiciyuan.kernel.widget;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.TypedArray;
import android.graphics.Color;
import android.graphics.drawable.GradientDrawable;
import android.graphics.drawable.RippleDrawable;
i... | 32.172185 | 152 | 0.663545 |
0a50568dff9d63b52d4961ca14cbd6ba474c19f4 | 25,133 | package ru.fizteh.fivt.students.kamilTalipov.database.core;
import ru.fizteh.fivt.storage.structured.ColumnFormatException;
import ru.fizteh.fivt.storage.structured.Storeable;
import ru.fizteh.fivt.storage.structured.Table;
import ru.fizteh.fivt.students.kamilTalipov.database.servlet.TransactionHandler;
import ru.fizt... | 34.85853 | 112 | 0.542116 |
da8010b3b7e379318b53a1c39253a752647b54c1 | 802 | package tconstruct.modifiers;
import tconstruct.library.tools.ToolMod;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
public class ModPotion extends ToolMod
{
public ModPotion(ItemStack[] items, int effect, String dataKey)
{
super(new Ite... | 24.30303 | 89 | 0.679551 |
1d87d870143a184aa71db326ee4d55d528619f23 | 2,354 | package ru.stqa.pft.rest;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
import com.google.gson.reflect.TypeToken;
import org.apache.http.client.fluent.Executor;
import org.apache.http.client.fluent.Request;
import org.apache.http.message.BasicNameValuePair;
import ... | 39.233333 | 101 | 0.668649 |
c6d86593403f70980cbb6408beb9567f5eda5224 | 869 | package Sets.Controler;
import Sets.Model.IntRange;
import Sets.Model.MixedSet;
import Sets.Model.UniversalSet;
public class SetUtils {
public static MixedSet deepCopy(MixedSet set) {
String setStr = set.toStringNoIntersectionWithUniversalSet();
MixedSet setNew;
try {
setNew ... | 26.333333 | 86 | 0.644419 |
155ecd4494c37b04c6ad750b00bd1f0647d1578e | 2,682 | package com.c14.dao;
import com.c14.dao.provider.EmployeeDynaProvider;
import com.c14.model.Employee;
import org.apache.ibatis.annotations.*;
import javax.persistence.FetchType;
import java.util.List;
import java.util.Map;
import static com.c14.dao.HrmConstants.EMPLOYEETABLE;
public interface EmployeeDao {
@Se... | 46.241379 | 107 | 0.642058 |
cf351fd2c110189815c5f684edf7535d74e79f25 | 2,259 | package io.vertx.rabbitmq.impl;
import com.rabbitmq.client.AMQP;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.DefaultConsumer;
import com.rabbitmq.client.Envelope;
import com.rabbitmq.client.ShutdownSignalException;
import io.vertx.core.Context;
import io.vertx.core.Handler;
import io.vertx.core.Vert... | 32.271429 | 115 | 0.768482 |
012879ebb0a438b64c6743ad07a4b2b7f63bc038 | 2,581 | //© Copyright 2018 Hewlett Packard Enterprise Development LP
//Licensed under Apache License version 2.0: http://www.apache.org/licenses/LICENSE-2.0
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// See <a href="http://java.sun.com/xml/jaxb">http://java.... | 22.25 | 111 | 0.586982 |
5bfaf39a170f47f6c264a59de816e5166f5591f7 | 1,006 | /*
* BouncerAPILib
*
* This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
*/
package com.example.www.models;
import java.util.*;
public class SearchResultBuilder {
//the instance to build
private SearchResult searchResult;
/**
* Default constructor to initialize the ... | 23.952381 | 98 | 0.641153 |
4e7d5a3f0470b7de0dd383430ff73792c47f567b | 742 | package application.model.exceptions;
import javax.ejb.ApplicationException;
@ApplicationException
public class ConflictingReviewException extends RuntimeException {
public ConflictingReviewException() {
super();
}
public ConflictingReviewException(String message) {
super(message);
}... | 24.733333 | 102 | 0.722372 |
a9f580963839d888a5b63d0be9462cc876fb2deb | 533 | package com.filiphsandstrom.mineiago.packets.java;
import com.filiphsandstrom.mineiago.MineiaGoSession;
import com.github.steveice10.mc.protocol.packet.ingame.client.ClientKeepAlivePacket;
public class ServerKeepAlivePacket {
public ServerKeepAlivePacket(com.github.steveice10.mc.protocol.packet.ingame.server.Serv... | 38.071429 | 117 | 0.778612 |
dcdf75b33c262ddeb472f8243992245463b1b991 | 2,733 | /*
* Copyright ConsenSys Software Inc., 2022
*
* 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 agre... | 40.791045 | 118 | 0.740578 |
7bd51efeccc0f277fdbe06604c290d508a629698 | 274 | package ro.ase.csie.cts.g1088.laborator3.faza3.servicii;
public interface InterfataMarketing {
public static final int VECHIME_CLIENT_MAXIMA = 10;
public static final float DISCOUNT_CLIENT_MAXIM = 0.15f;
public float getDiscountFidelitate(int vechimeClientInAni);
}
| 27.4 | 60 | 0.813869 |
344c53cb37d4df2f05a5eba3156c844c75fb8875 | 474 | package br.odb.nodehunter.command;
import br.odb.gameapp.ConsoleApplication;
import br.odb.gameapp.UserCommandLineAction;
public class UseCommand extends UserCommandLineAction {
public UseCommand() {
}
@Override
public String getHelp() {
return null;
}
@Override
public int requiredOperands() {
return 1;... | 15.8 | 73 | 0.740506 |
e0a5ecfa0582bc825d94fab7ade306b36f3f66ca | 5,755 | /**
*
*/
package com.packtpub.mongo.cookbook;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.springframework.data.mongodb.core.aggregation.Aggregation.group;
import static org.springframework.data.mongod... | 28.490099 | 93 | 0.680104 |
c74bda0786dddae7eb8a83800fc699fc59f43658 | 4,971 | package com.paragon_software.sound_manager;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.paragon_software.article_manager.ArticleItem;
import com.paragon_software.dictionary_manager.Dictionary;
import com.paragon_software.dictionary_manager.DictionaryManagerAPI;
import com.parago... | 29.241176 | 149 | 0.719171 |
71e46565a661c9666cae6b3a8c6833ecf8f1801b | 458 | package com.apicatalog.projection.builder;
import java.util.Optional;
import com.apicatalog.projection.api.ProjectionError;
import com.apicatalog.projection.conversion.TypeConversions;
import com.apicatalog.projection.object.ObjectType;
public interface Builder<T> {
Optional<T> build(TypeConversions typeConverters... | 26.941176 | 74 | 0.829694 |
8e81ceca43bfc01386b72f36fac7595acfc811a6 | 2,441 | package mil.nga.tiff;
import mil.nga.tiff.util.TiffConstants;
/**
* TIFF File Directory Entry
*
* @author osbornb
*/
public class FileDirectoryEntry implements Comparable<FileDirectoryEntry> {
/**
* Field Tag Type
*/
private final FieldTagType fieldTag;
/**
* Field Type
*/
private final FieldType f... | 16.605442 | 75 | 0.631299 |
78faa280f0a961b308362eeca1df6e72e24eceab | 77 | package com.zd112.framework.net.callback;
public interface BaseCallback {
}
| 15.4 | 41 | 0.805195 |
0e680c40cd4d22153df7b3751a7252d927e41a9a | 626 | /*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
// $Id$
package org.hibernate.property;
import java.io.Serializable;
import java... | 19.5625 | 94 | 0.730032 |
aaea31e54e0142a86b09ef4d84353e6d363862ec | 507 | package com.glavsoft.rfb.protocol.auth;
import com.glavsoft.rfb.CapabilityContainer;
import com.glavsoft.rfb.IPasswordRetriever;
import com.glavsoft.transport.Reader;
import com.glavsoft.transport.Writer;
public class NoneAuthentication extends AuthHandler {
public boolean authenticate(Reader reader, Writer writer... | 29.823529 | 130 | 0.798817 |
aaea3cdffb1be27b50a7c368047b7546f082aee2 | 5,819 | package com.bt.pi.app.volumemanager.handlers;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.junit.Assert.assertThat;
import static org.mockito.Matchers.eq;
import static org.mockito.Matchers.isA;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.verify;
import static or... | 41.269504 | 160 | 0.715243 |
116cfb495c12072f7d4dcfcafae2d110607cfd46 | 19 | package com.meow;
| 6.333333 | 17 | 0.736842 |
f10ebf9f952ac0b678892c59fa6ac9f61c86bd44 | 235 | package io.github.com.pages;
import com.epam.jdi.light.elements.common.UIElement;
import com.epam.jdi.light.elements.pageobjects.annotations.locators.UI;
public class HomePageFrame {
@UI("img#user-icon") public UIElement userIcon;
} | 29.375 | 71 | 0.8 |
ff9b3f7f62f9f687a8692fd35f1ce38eb31a9eb0 | 1,994 | package com.dth.util;
/**
* DefaultWordProcessor is a small class that normalizes the {@code String} by
* altering it in numerous ways, so that the resulting {@code String} will only
* contain a sequence of alphabetic characters.
*
* <p>
* For example, in the following code, strings {code "a"}, {code "b"... | 35.607143 | 95 | 0.612337 |
fdeafc98e3490040cee5fe057608d1ca22fc9d7e | 1,882 | /**
* @author SANKALP SAXENA
*/
/* Hidden stub code will pass a root argument to the function below. Complete the function to solve the challenge. Hint: you may want to write one or more helper functions.
The Node class is defined as follows:
class Node {
int data;
Node left;
Node ri... | 27.275362 | 174 | 0.471838 |
2af9e4b881d79fc3537850de42678be11802acfa | 2,560 | package monopolyGUnit;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import monopoly.Wuerfel;
/**
* @author Tim
*@version 0.1
*/
/**
* JUnit Testklasse fuer die Wuerfelklasse.
*/
// TODO Eventuell noch mehr nicht triviale tests implementieren.(auch in
// hinsicht ob die maximalzahl der wue... | 26.391753 | 87 | 0.698047 |
12d0853231d44f244690c3be6ac87aec8beb9d95 | 4,387 | package org.honorato.diagnostics.models;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.AsyncTask;
import android.support.v4.os.AsyncTaskCompat;
import android.text.format.DateUtils;
import com.facebook.network.connectionclass.ConnectionClassM... | 31.335714 | 132 | 0.619102 |
883ef13ea1a3b75b4426a1b077c53b2881c39a6f | 319 | package com.github.alenfive.rocketapi.extend;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* 执行结果返回
*/
public interface IResultWrapper {
public Object wrapper(String code, String msg, Object data, HttpServletRequest request, HttpServletResponse response);
}
| 24.538462 | 122 | 0.799373 |
c8c81ff160eb35b47dacb68d9008653607acbaed | 902 | package org.livingdoc.converters.collection;
import org.junit.jupiter.api.Test;
import org.livingdoc.converters.TypeConvertersTestFixtures;
import java.lang.reflect.Field;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import static org.assertj.core.api.Assertions.assertThat;
class SetCon... | 28.1875 | 90 | 0.733925 |
7fafe8abf3ae091e7b10cb37ef97ec0eae9a4785 | 360 | package com.guircai.design.behavioral.visitor;
/**
* CPU
*/
public class CPU extends HardWare{
public CPU(String command) {
super(command);
}
@Override
public void work() {
System.out.println("CPU处理指令:" + command);
}
@Override
public void accept(Vistor vistor) {
... | 16.363636 | 49 | 0.588889 |
f9c5e7a45f547088f06f2599c4ee6725196a78fd | 3,058 | /**
* Copyright (c) 2018-2020, Sylvain Baudoin
*
* 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 la... | 27.54955 | 99 | 0.602354 |
13e1ecb7f0c956089ca854407e3a48c07c2b9e89 | 1,087 | /**
* Copyright 2015 Confluent 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 ... | 36.233333 | 100 | 0.782889 |
2f1c22442ba6f1f974324f2a5515a543ee8f3ef2 | 2,779 | /*
* This file is part of creative, licensed under the MIT license
*
* Copyright (c) 2021-2022 Unnamed Team
*
* 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, inclu... | 40.275362 | 94 | 0.693415 |
4b8b8edc7801b044edc43d9edd30d9d083fd7230 | 5,472 | package com.jurtz.marcel.sist;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.suppor... | 35.303226 | 138 | 0.69481 |
671cd5c7c0772e4e29c5ad3a662eb9f8e8bc83ae | 2,445 | package dev.controller;
import org.springframework.http.ResponseEntity;
import org.springframework.http.ResponseEntity.BodyBuilder;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import dev.exception.CollegueException;
import dev.excep... | 39.435484 | 101 | 0.837628 |
665f91d72773852e23136f1aff1a014a90c99e0f | 633 | package com.windea.study.springboot.main;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
@Configuration
@ConfigurationProperties("com.windea")
@PropertySource("classp... | 19.78125 | 75 | 0.774092 |
4a9ab71a9ea0b494908905674b75153e2d8696b9 | 541,215 | /*
*AVISO LEGAL
© Copyright
*Este programa esta protegido por la ley de derechos de autor.
*La reproduccion o distribucion ilicita de este programa o de cualquiera de
*sus partes esta penado por la ley con severas sanciones civiles y penales,
*y seran objeto de todas las sanciones legales que correspondan.
*Su... | 76.800766 | 392 | 0.868165 |
d8f8d28d241fb1a5a06300e983e66a5a8e2b2a49 | 1,754 | package com.starter.model.security;
import com.starter.dto.SessionDto;
import com.starter.model.AbstractEntity;
import com.starter.model.party.Person;
import org.hibernate.envers.Audited;
import javax.persistence.*;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
/**
* Created by adam.wells ... | 21.13253 | 57 | 0.659635 |
3aed06a6118c063eafaa6d888424ab774d0d8812 | 2,065 | package org.sagebionetworks.web.client.widget.upload;
/**
* Basic metadata about a file.
*
* @author John
*
*/
public class FileMetadata {
private String fileName;
private String contentType;
private double fileSize;
public FileMetadata(String fileName, String contentType, double fileSize) {
... | 22.944444 | 113 | 0.650363 |
7e1ef4c7f3d4a02692ca2b5015c2e7cc94fd8569 | 33,761 | package aggressor.bridges;
import aggressor.AggressorClient;
import aggressor.DataUtils;
import beacon.Registry;
import beacon.TaskBeacon;
import common.CommonUtils;
import common.ListenerUtils;
import common.ScListener;
import cortana.Cortana;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.S... | 48.576978 | 112 | 0.439442 |
14c84555122bc9ec596b8783fe6affe9e9096e45 | 848 | package edata.repository;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import org.springframework.test.annotation.Rollback;
import org.springframework.test.context.junit4.SpringRunner;
import static org.junit.Assert.*;
@RunWith(Spring... | 18.844444 | 71 | 0.70283 |
9ef40a6fc390b9c5661ed68132a8266c22ce68d0 | 586 | package org.coderclan.lock.redis;
import org.coderclan.lock.LockService;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* Created by aray.chou.cn(at)gmail(dot)com on... | 27.904762 | 81 | 0.778157 |
572c9f11f070a40844396f69c264cc6923e3a37d | 252 | package io.github.gozhuyinglong.designpatterns.singleton;
/**
* 单例模式 - 枚举类
*
* @author ZhuYinglong
* @date 2020/12/7 0007
*/
public enum SingletonEnum {
INSTANCE;
public void method() {
System.out.println("枚举类中定义方法!");
}
}
| 14 | 57 | 0.638889 |
e42046b69f1266c1fed11c261211e051bc6572fb | 320 | package com.cjburkey.voxicus.event;
public class EventPostObjectInit implements IEvent {
public String getName() {
return getClass().getSimpleName();
}
public boolean getCanCancel() {
return false;
}
public boolean getIsCancelled() {
return false;
}
public void cancel() {
}
} | 16 | 53 | 0.6625 |
4cf7b53f6de72a2dfe57920a5f34079542c5a5b5 | 4,927 | package com.divae.firstspirit.access;
import com.divae.firstspirit.BuilderMock;
import com.divae.firstspirit.BuilderMock.Builder;
import com.divae.firstspirit.BuilderMock.DefaultBuilder;
import com.divae.firstspirit.access.AdminServiceMock.AdminServiceBuilder;
import com.divae.firstspirit.access.AdminServiceMock.Defau... | 46.046729 | 165 | 0.727826 |
93cbda28d9d7b260dcae42538cc098fb2ec2dac7 | 1,495 | /*
* Copyright 2003-2011 JetBrains s.r.o.
*
* 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 agre... | 28.207547 | 75 | 0.711706 |
92b7901687a9b7e36a989a1ef22e35b838378088 | 159 | // Sample Java Program.
class Sample {
public static void main(String args[]) {
System.out.println("Hello World by Java");
}
} | 22.714286 | 58 | 0.566038 |
22ae8895a1344f9ff11cd8ae2d07784f91545edf | 1,625 | package com.example.blog.domain;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.hibernate.annotations.ColumnDefault;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.validation.constraints.Min;
/**
... | 21.666667 | 58 | 0.617231 |
0fe82f7d77ed946937d50a6344f130913a734536 | 227 | package com.rnkrsoft.gitserver.exception;
public class RepositoryCreateFailureException extends Exception {
public RepositoryCreateFailureException(String message, Throwable cause) {
super(message, cause);
}
}
| 28.375 | 78 | 0.779736 |
eca6de98efe4c997eac7c9736db61241007dc607 | 1,996 | /*
* Copyright (c) 2017 Intel Corporation
*
* 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... | 31.68254 | 79 | 0.689379 |
529e1fc4747caea0778b63312563a7fcfb68a8ea | 325 | package com.dlhjw.website.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dlhjw.website.bean.Message;
/**
* @author dlhjw
* @version 1.0
* @date 2021/6/4 19:50
*/
public interface MessageService extends IService<Message> {
boolean saveMess(Long uid, String name, String message... | 21.666667 | 60 | 0.747692 |
f1f924bac14731f10cf03e9af6715b8a202760bb | 2,143 | package ${package}.controllers;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.spring... | 37.596491 | 107 | 0.759216 |
205f7995310b94a8c0b632e6f50c6dc8073e5182 | 5,991 | package jetbrains.mps.build.behavior;
/*Generated by MPS */
import jetbrains.mps.core.aspects.behaviour.BaseBHDescriptor;
import org.jetbrains.mps.openapi.language.SAbstractConcept;
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;
import jetbrains.mps.core.aspects.behaviour.api.SMethod;
import jetbra... | 51.646552 | 326 | 0.786847 |
f7df5ca43e5d7b78f2ddf3b73d86ebcfa078155a | 270 | package io.github.xeonpowder.fabric.rpg.profession;
import nerdhub.cardinal.components.api.component.Component;
/**
* FabricRPGProfessionComponent
*/
public interface FabricRPGProfessionComponent extends Component {
public FabricRPGProfession getProfession();
} | 24.545455 | 65 | 0.818519 |
14736e187a25baae45fc2074b5c8dee7bc48d119 | 3,546 | package com.springboot.core.service;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.springboot.core.common.base.BaseService;
import com.springboot.core.common.support.ConvertUtil;
import com.springboot.core.mapper.auto.SysNoticeUserMapper;
import com.springboot.core.model.au... | 27.703125 | 94 | 0.763395 |
a1aa9af7ad41e5eaefbc1f206bd39f66e14b0cb4 | 370 | package uk.co.jpawlak.clicker.actions;
import java.awt.AWTException;
import java.awt.Robot;
class RobotSingleton {
private static final Robot robot;
static {
try {
robot = new Robot();
} catch (AWTException e) {
throw new RuntimeException(e);
}
}
stat... | 16.086957 | 42 | 0.578378 |
79c4b33b6ad882e821c9bcfcf95aa589c6df0013 | 298 | package ntut.csie.accountManagementService.useCase.modifyPersonalInformation;
import ntut.csie.accountManagementService.useCase.Output;
public interface ModifyPersonalInformationOutput extends Output {
public String getOutputMessage();
public void setOutputMessage(String outputMessage);
}
| 27.090909 | 77 | 0.852349 |
68a923463a5b58105d788f9cb7ce3366712986e0 | 2,799 | package com.christopherschmautz.algs4;
import edu.princeton.cs.algs4.StdOut;
public class ch1 {
// Exercise 1.1.1 - logic output
public static int ex111a() {
return (0 + 15) / 2;
}
public static double ex111b() {
return ((2.0) * Math.exp(-6) * 100000000.1);
}
public static b... | 24.552632 | 95 | 0.484816 |
ed56109bc719a642ec7a50bb149f580d4c87fed6 | 233 | package WayofTime.bloodmagic.routing;
import net.minecraft.util.EnumFacing;
public interface IItemRoutingNode extends IRoutingNode
{
boolean isInventoryConnectedToSide(EnumFacing side);
int getPriority(EnumFacing side);
}
| 21.181818 | 56 | 0.815451 |
b8a2fb4ada672a40bdd5953941050dd57360a486 | 476 | package com.dmelnyk.alarmquest.model;
import android.os.Parcel;
import android.os.Parcelable;
/**
* Created by d264 on 12/21/17.
*/
public interface Alarm extends Parcelable {
String getId();
String getTime();
String getDays();
boolean isEnable();
void setTime(String time);
void setDays(St... | 18.307692 | 45 | 0.684874 |
8f7c0c4bea083bc2ed5faeeb9acdf05747a15092 | 1,888 | package com.utopia.logan.gzip;
public class StatisticsDayEntity {
public String primaryKey = "";
public String tab = "statistics_day";
public String userId;
public String bookId;
public String date;
public int num = 0;
public long times;
public String pageNum;
public int totalWords;... | 25.513514 | 94 | 0.517479 |
3f3c988955f80a620a1c1005c58b3bff6f5d3c7f | 741 | package io.gatling.mojo;
import org.apache.maven.plugin.MojoFailureException;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import java.io.File;
class VerifyMojoTest {
@Test
void errors() {
VerifyMojo verifyMojo = new VerifyMojo();
verifyMojo.resultsFolder = new ... | 30.875 | 104 | 0.697706 |
616156da5c4186468cac6ea302d51a23c5b3ec74 | 2,919 | package tests;
import org.junit.Before;
import org.junit.Test;
import model.weights.*;
import java.util.ArrayList;
import static org.junit.Assert.assertEquals;
public class WeightsTest {
private Barbell barbell;
private Dumbbell dumbbell;
private Plate plate;
private ResistanceBand b... | 28.067308 | 62 | 0.588558 |
8dad545b518e7d3fef48539991dcf21861207a87 | 1,956 | package org.jtrim2.concurrent.query.io;
import java.io.IOException;
import java.nio.channels.FileChannel;
import java.nio.file.Path;
import java.nio.file.StandardOpenOption;
import java.nio.file.attribute.FileAttribute;
import java.util.Collections;
import java.util.Objects;
import java.util.Set;
/**
* Defines a {@c... | 33.724138 | 84 | 0.712168 |
84bb14e8f7130dbdd26e9932c8cbfdbc6dc6fe62 | 1,101 | package storm.spout;
import config.TopologyConfigurationReader;
import model.TrafficSensorDataDeserializer;
import org.apache.kafka.clients.consumer.ConsumerConfig;
import org.apache.storm.kafka.spout.KafkaSpout;
import org.apache.storm.kafka.spout.KafkaSpoutConfig;
public class KafkaSpoutBuilder {
private Topol... | 37.965517 | 168 | 0.791099 |
928872cbebc8c69ade76848946c620e648189c17 | 2,787 | package com.felypeganzert.cacapalavras.services.impl;
import static com.felypeganzert.cacapalavras.utils.AppConstantes.CACA_PALAVRAS;
import static com.felypeganzert.cacapalavras.utils.AppConstantes.ID;
import java.time.LocalDateTime;
import java.util.List;
import com.felypeganzert.cacapalavras.entidades.CacaPalavra... | 35.278481 | 115 | 0.787944 |
9ff76957df159bcb0334318023258406ad9e52f0 | 1,559 | package org.practice.graphs;
public class q1319 {
/*
Time Complexity: O(NlogN)
Space Complexity: O(N)
*/
class Solution {
int[] parent;
int[] rank;
public int makeConnected(int n, int[][] connections) {
int len = connections.length;
if(len < n-1) re... | 25.557377 | 71 | 0.420141 |
2b6e309294284ec0a825e86e95b5aca02f8adca1 | 2,404 | /*
* Copyright (c) Octopus Deploy and contributors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use
* these files 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... | 35.352941 | 102 | 0.735025 |
7366499a97a4a43194a9e469e027451dfe082a2a | 2,907 | package org.workcraft.plugins.stg.commands;
import org.workcraft.commands.NodeTransformer;
import org.workcraft.commands.AbstractTransformationCommand;
import org.workcraft.dom.visual.VisualModel;
import org.workcraft.dom.visual.VisualNode;
import org.workcraft.plugins.stg.SignalTransition;
import org.workcraft.plugin... | 31.597826 | 127 | 0.676643 |
0b62edb44546a68b68f3d333a39eb109b0155194 | 239 |
package iavanish.collegepal.CommonClasses;
/**
*
* @author iavanish
*/
/**
*
* College
*/
public class College {
public String collegeID;
public String collegeName;
public College() {
}
}
| 9.958333 | 42 | 0.560669 |
fbb9458e8ede019ff14de819718d30ad92db3460 | 162 | package cn.productai.api.pai.entity.productset;
import cn.productai.api.core.base.BaseResponse;
public class DeleteProductsSetResponse extends BaseResponse {
}
| 23.142857 | 61 | 0.833333 |
7980e7f4514f5ebcca6399134b3ac6ecd3e5e53f | 671 | package com.mbakgun.weatherlogger.utils;
/**
* Created by burakakgun on 13.08.2018.
*/
import android.annotation.SuppressLint;
import java.text.SimpleDateFormat;
import java.util.Date;
public class DateUtils {
public static String formatDate(String date) {
@SuppressLint("SimpleDateFormat") SimpleDate... | 29.173913 | 115 | 0.722802 |
3691fef244346da12422ec27509d81d35a87987a | 548 | package com.alexfu.sqlitequerybuilder.builder.delete;
import com.alexfu.sqlitequerybuilder.builder.SegmentBuilder;
import com.alexfu.sqlitequerybuilder.utils.Preconditions;
import com.alexfu.sqlitequerybuilder.utils.StringUtils;
public class DeleteBuilder extends SegmentBuilder {
public DeleteFromBuilder from(Strin... | 30.444444 | 76 | 0.779197 |
2b44fb3af826194faef6316ae183aa787761e0fc | 5,691 | //
// Copyright 2012 Nourredine Khadri
//
// 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 t... | 34.490909 | 123 | 0.780179 |
9442aabb5452ecd3a02791e60601e22c33f8bdd7 | 1,699 | package xyz.kovacs.aoc2021.day02;
import static xyz.kovacs.util.AocUtils.getAllLines;
import static xyz.kovacs.util.AocUtils.getLogger;
public class Day02 {
public static void main(String[] args) {
doPuzzle1("sample");
doPuzzle1("input");
doPuzzle2("sample");
doPuzzle2("input");
}
/**
* Solution for ... | 27.403226 | 121 | 0.623896 |
2a376237dc8724ee36e5b62f074a7f1a4af5d385 | 410 | /**
*
*/
package org.daas.ai.simulation.event.processing;
/**
* @author bhagvan.kommadi
*
*/
public class EventPath extends Event {
private double probability;
/**
* @return the probability
*/
public double getProbability() {
return probability;
}
/**
* @param probability the probability to set
*/
publ... | 14.137931 | 48 | 0.687805 |
45fade92e77873fcb8becb3f386ad1b57ae61e06 | 2,693 | /**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use ... | 34.088608 | 161 | 0.713702 |
18227d198a6203a945450a3c47eee3ee4f9e086b | 2,561 | package ruina.actions;
import com.megacrit.cardcrawl.actions.AbstractGameAction;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.cards.CardGroup;
import com.megacrit.cardcrawl.cards.CardGroup.CardGroupType;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.car... | 38.223881 | 96 | 0.655213 |
2603035414b90bce5f81b388b5e9f87640ed0853 | 633 | package org.schhx.concurrency.demo.commonunsafe;
import lombok.extern.slf4j.Slf4j;
import org.schhx.concurrency.anno.NotThreadSafe;
import org.schhx.concurrency.demo.BasicTest;
/**
* @author shanchao
* @date 2018-05-29
*/
@Slf4j
@NotThreadSafe
public class StringBuilderDemo extends BasicTest {
private static ... | 22.607143 | 69 | 0.7109 |
36e59ed36003770b281717e369875f506fd7bc9c | 1,824 | package com.awshousekeeping.controller;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.awshousekeeping.service... | 31.448276 | 73 | 0.763158 |
3ea6bde213f53eb27643eb836c30941ddc403265 | 638 | /*
* @lc app=leetcode id=152 lang=java
*
* [152] Maximum Product Subarray
*/
// @lc code=start
class Solution {
public int maxProduct(int[] nums) {
if (nums.length == 0) {
return 0;
}
int globalMax = nums[0];
int localMax = 1;
int localMin = 1;
for ... | 19.333333 | 54 | 0.495298 |
6a3cc59fc34acd33e3bad09a33906a56cbd92dbd | 58 | package com.webbdd.base;
public class ReportManager {
}
| 9.666667 | 28 | 0.758621 |
fc28d88c8d627b76eb86b60a4674bcb7d1c6f75e | 8,333 | /*
* Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved.
* http://www.jaspersoft.com.
*
* Unless you have purchased a commercial license agreement from Jaspersoft,
* the following license terms apply:
*
* This program is free software: you can redistribute it and/or modify
* it under the terms... | 38.224771 | 150 | 0.657506 |
cf1e2bd46e0334518193616d789a5da2ce863829 | 987 | import java.io.File;
import java.net.*;
import java.util.ArrayList;
// FTP Server
// Listens for clients to initiate a control connection to the server on port 21.
// Multi-threading is used to handle multiple clients.
public class FTPServer {
static String fileSeparator = System.getProperty("file.separator");
... | 34.034483 | 96 | 0.673759 |
86d2d80cd7a5e4548fd766b404eb5d2c65ddc52b | 3,968 | package com.psddev.dari.util;
import com.google.common.base.Preconditions;
import java.util.Iterator;
import java.util.NoSuchElementException;
/**
* Bounded series of data points occurring at a predictable interval.
* While the type argument is a non-primitive {@code Double}, no methods
* in this class will accep... | 27.748252 | 97 | 0.572581 |
097b3bdca34628a3f91fc87d0316196e2f5357ae | 1,601 | package com.groupcontroldroid.server.websocket.listener;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.UUID;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.corundumstudio.socketio.SocketIOCl... | 34.06383 | 91 | 0.754528 |
5418824d8dcc646505e57be6b6e98951be2db1d2 | 1,106 | package com.exercise.entity;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
@Entity
public class InvoiceLineItem {
... | 19.068966 | 59 | 0.770344 |
e3c9fbcdff2d04f3483f8c70d16a56701b05909a | 532 | package Regex.Applications;
import java.io.*;
import java.util.*;
/**
* HackerRank Regex Applications 16
* https://www.hackerrank.com/challenges/saying-hi/problem
* @author Hasol
*/
public class SayHi {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = Integ... | 28 | 58 | 0.603383 |
62598c79165e127a131cd6235e549a934390947f | 2,754 | package com.idugalic.reviews;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.mon... | 45.147541 | 111 | 0.761438 |
65b37b5823c3f55da0d8b2f4f45a204f03502006 | 1,204 | // automatically generated, do not modify
package grl.flatbuffer;
import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;
@SuppressWarnings("unused")
public final class Frame extends Struct {
public Frame __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; return this; }
... | 35.411765 | 205 | 0.738372 |
264af15f16ef5ecca948be7a713d03fe5d1e7dd5 | 1,465 | // Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
package frc.robot.subsystems;
import com.ctre.phoenix.motorcontrol.TalonSRXControlMode;
import com.ctre.phoenix.motorc... | 29.3 | 78 | 0.709898 |
af7de799f19ed71bfde6aca05b49d22196e88dc6 | 7,250 | /**
* Copyright (c) 2012 - 2017 by NirvanaXP, LLC. All Rights reserved. Express
* written consent required to use, copy, share, alter, distribute or transmit
* this source code in part or whole through any means physical or electronic.
**/
package com.nirvanaxp.types.entities.reservation;
import java.io.Serializab... | 21.706587 | 214 | 0.726069 |
ee79b4d0b0bdf19bc86b849202d9335d49690042 | 3,664 | package com.zejian.structures.Sort.Sort_N_2;
import com.zejian.structures.Sort.SortTestHelper;
/**
* Created by zejian on 2018/2/12.
* Blog : http://blog.csdn.net/javazejian [原文地址,请尊重原创]
* 插入排序算法核心思想:
* 检查第i个元素,如果在它的左边的元素比它大,进行交换,然后继续下去与前一个元素比较,
* 直到这个元素的左边元素比它还要小,就停止。插入排序法主要的回圈有两个变数:i和j,
* 每一次执行这个回圈,就会将第i个数字放到... | 28.403101 | 90 | 0.5131 |
2f8230d5554384f347229cfaecb155f5c521cc67 | 1,314 | /*
* Copyright 2002-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... | 27.375 | 75 | 0.738204 |
99a971716423a12f9cd7e3b81bfc8a3987e67b79 | 6,622 | /*
HTTP stub server written in Java with embedded Jetty
Copyright (C) 2012 Alexander Zagniotov, Isa Goksu and Eric Mrak
This program 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 Foundation, either version 3 of the Licens... | 50.938462 | 187 | 0.740713 |
41e154ec81edc2c06735483ddeb6ded7303b13cc | 903 | package com.adobe.dp.office.word;
public class NumberingLevelDefinition {
int start = 1;
int lvl = 0;
int lvlRestart = -1;
String lvlText = "";
String lvlJc = "left";
String numFmt = "decimal";
ParagraphProperties paragraphProperties;
RunProperties runProperties;
NumberingLabelIte... | 18.428571 | 63 | 0.694352 |
b63b7b3383e2373bf5bbbcbcbcb1eaf86de25731 | 3,337 | /* Key.java -- A abstract representation of a digital key
Copyright (C) 1998, 2000 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath 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... | 38.356322 | 107 | 0.746479 |
4217b9277f4df818a77c8a5c43cf0da9d2bb0503 | 722 | package scalafix.interfaces;
/**
* A unique identifier for this category of lint diagnostics
* <p>
* The contract of id is that all diagnostics of the same "category" will have the same id.
* For example, the DisableSyntax rule has a unique ID for each category such as "noSemicolon"
* or "noTabs".
*/
public inte... | 27.769231 | 94 | 0.67036 |
fc738dd63b7c1aa25764601615d8416325d97c31 | 8,825 | /*
* InputMethodSupport.java - Input method support for JEditTextArea
*
* :tabSize=4:indentSize=4:noTabs=false:
* :folding=explicit:collapseFolds=1:
*
* Copyright (C) 2006 Kazutoshi Satoda
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public Li... | 30.32646 | 113 | 0.721926 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.