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 |
|---|---|---|---|---|---|
895017868449681568b1a1bc8f1885fa677c5737 | 1,444 | package au.com.example.restful.persistence.dao.customer.entity;
import javax.persistence.*;
@Entity
@Table(name = "Customer")
public class CustomerEntity implements Cloneable {
private Long id;
private String firstName;
private String lastName;
public CustomerEntity() {
this(null, null, null);
}
public ... | 21.235294 | 68 | 0.623961 |
34420af3c96c261728a3046e9a9c53f81c0495d4 | 530 | package concurrency.ch5;
public class StaticSingleton {
private static int i = 5;
private StaticSingleton() {
System.out.println("StaticSingleton is create");
}
private static class SingletonHolder {
private static StaticSingleton instance = new StaticSingleton();
}
public st... | 24.090909 | 72 | 0.675472 |
1b352ed843ee8724c0bae38f24ee04ab31045ea5 | 1,603 | package actors;
import static org.junit.Assert.assertThat;
import org.hamcrest.CoreMatchers;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import com.fasterxml.jackson.databind.node.ObjectNode;
import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import akka.testkit.javadsl... | 27.637931 | 164 | 0.761697 |
3d16d340847c52bbe7af35b0403da8dc32ac19b1 | 277 | package com.yuanzf.ioc.order;
import org.springframework.stereotype.Component;
/**
* @Author: yzf
* @Date: 2020/2/19 11:16
* @Desoription:
*/
//@Component
public class IocOrderBean {
@Override
public String toString(){
return "com.yuanzf.ioc.priority.IocBean";
}
}
| 15.388889 | 48 | 0.703971 |
227f382372f3d004f93974b4654d690acdc6b975 | 1,397 | package com.quasar.backend.modules.base.enums;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.type.BaseTypeHandler;
import org.apache.ibatis.type.JdbcType;
import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
@Slf4j
public class Au... | 37.756757 | 153 | 0.76378 |
649ad974b9fd684e8309a3ca6149999324d18dc2 | 13,003 | // ============================================================================
//
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have... | 45.785211 | 123 | 0.638545 |
886b59a3a46307c9a3a5ef0dc8b5b81aa526c08b | 1,701 | package com.example.newsapi.controller;
import com.example.newsapi.model.Article;
import com.example.newsapi.service.ArticleService;
import lombok.RequiredArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org... | 28.830508 | 87 | 0.738977 |
2278654c63a093e2aea03638b2dade169270d0e6 | 5,719 | package com.currencyconverter.view;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;
import com.currencyconverter.R;
import com.currencyconverter.database.DataSource;
import com.currencyconverter.model.Converter;
import com.currencyconverter.model.Currency;
import android.os.Bundle;... | 30.913514 | 98 | 0.659556 |
1a3ed0bcfa147d796aaf5bc12b384d8bdfbe0889 | 6,818 | package org.jabref.logic.cleanup;
import java.util.ArrayList;
import java.util.List;
import org.jabref.logic.formatter.Formatters;
import org.jabref.logic.formatter.IdentityFormatter;
import org.jabref.logic.formatter.bibtexfields.HtmlToLatexFormatter;
import org.jabref.logic.formatter.bibtexfields.HtmlToUnic... | 50.132353 | 148 | 0.692578 |
5102b62526f43deb6f85de05d8c0d25865c0e31b | 1,622 | package com.nurseryapi.entity.user;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ForeignKey;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTabl... | 31.192308 | 112 | 0.778668 |
71a56c0b50b4d1fc6c819b793e925692afa241a6 | 1,848 | package ru.job4j.homeworks.tasks;
//11.12.* Заполнить массив:
// а) двадцатью первыми натуральными числами, делящимися нацело
// на 13 или на 17 и находящимися в интервале, левая граница которого равна 300;
// б) тридцатью первыми простыми числами (простым называется натураль-ное число,
// ... | 36.235294 | 97 | 0.502165 |
38bdc7b6b8069008eafa13d75f904726462440a5 | 812 | /*
* 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 interviews.sirionLabs;
/**
*
* @author bharat
*/
public class Hi {
static class A {
static void hi () {
... | 20.820513 | 79 | 0.46798 |
72a5e5d4d55ce42834b229ac3ea6d2f1fcea0f4b | 1,316 | // This is a generated file. Not intended for manual editing.
package com.dropbox.djinni.ideaplugin.psi;
import java.util.List;
import org.jetbrains.annotations.*;
import com.intellij.psi.PsiElement;
import com.dropbox.djinni.ideaplugin.psi.impl.DjinniPsiImplUtil.DjinniType;
import com.intellij.navigation.ItemPresenta... | 19.939394 | 75 | 0.781915 |
42ddd689d1ba18b5143d72a915658012bd00e71c | 1,069 | package io.github.tesla.ops.policy.vo;
import java.io.Serializable;
import java.util.List;
import com.google.common.collect.Lists;
/**
* @ClassName GwPolicyParamVo
* @Description Policy param vo
* @Author zhouchao
* @Date 2018/12/10 21:30
* @Version 1.0
**/
public class GwPolicyParamVo implements Serializable ... | 23.23913 | 71 | 0.689429 |
2dc16f358fd3aaeaa9ddaa3c73e2baf08c03bcc0 | 606 | package ru.stqa.pft.sandbox;
import org.testng.Assert;
import org.testng.annotations.Test;
public class EquationTests {
@Test
public void return0RootTest() {
Equation equation = new Equation(1, 1, 1);
Assert.assertEquals(equation.returnRoots(), 0);
}
@Test
public void return1Root... | 23.307692 | 56 | 0.643564 |
b491f739281b3a5f88bee16d496fa9acd4ef3d1a | 6,061 | package net.sf.javagimmicks.io;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
import java.util.Arrays;
import java.util.List;
import java.util.zip.Adler32;
import java.util.zip.CheckedInputStream;
impor... | 29.280193 | 117 | 0.546609 |
227cad538c5ce5dc22d6a1038dab5abd79a20b72 | 763 | package com.wpy.utils;
import com.wpy.bean.User;
import org.springframework.security.core.context.SecurityContextHolder;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* Created by sang on 2017/12/20.
*/
public class Util {
public static User getCurrentUser() {
User user = null;
... | 26.310345 | 100 | 0.68152 |
86bd63afe3644098ec9646787392eb4adfb924e7 | 1,466 | package com.github.liuche51.easyTaskX.cluster.task.leader;
import com.github.liuche51.easyTaskX.cluster.NodeService;
import com.github.liuche51.easyTaskX.cluster.leader.BakLeaderService;
import com.github.liuche51.easyTaskX.cluster.task.TimerTask;
import com.github.liuche51.easyTaskX.dto.BaseNode;
import java.util.Da... | 29.32 | 84 | 0.633697 |
564935543a7b3d836f384ec38382e2bb14c3e2db | 2,801 | /*
* 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... | 51.87037 | 124 | 0.774009 |
8f88aa7911bfe8f34027d7422978554054c8a2ca | 4,634 | /*
* Copyright 2019 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0/
*
* or in the "license" fil... | 31.739726 | 120 | 0.553517 |
c03a3d6df35d5d8197377bcee7b7988fc0614784 | 1,488 | package com.k_int.refine.es_recon.commands;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.json.JSONException;
import org.json.JSONWriter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactor... | 27.054545 | 77 | 0.677419 |
24b144a420bb28178e86b77058abb046401f9c89 | 885 | /*
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH under
* one or more contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright ownership.
* Licensed under the Zeebe Community License 1.1. You may not use this file
* ... | 35.4 | 81 | 0.822599 |
7a6bf84823e3eab4a9c44df36f916fd3d1521e55 | 2,609 | /*
* Copyright (c) 2020 Network New Technologies 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 appli... | 41.412698 | 137 | 0.711384 |
edbcd1487ffebed20ac33b683d1e3f50e90db944 | 803 | package com.coolio.templates;
/**
* Response Template for User Creation.
*
* @author Aseem Savio
* @since v1.0
*
*/
public class UserCreationResponse {
private String username;
private String firstName;
private String lastName;
public String getUsername() {
return username;
}
public void setUsername... | 17.085106 | 109 | 0.69863 |
e6e27c11c3a1099357a7a3258511243bd29f47ec | 2,009 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.epic.canvascontrollibrary;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author Gilgamesh
*/
public class CCLWordProcessorProps
{
public String CanvasID;
public Stri... | 29.985075 | 55 | 0.661523 |
8759b79244a277766b7700c636e184810f1b68e1 | 751 | package com.star.sync.elasticsearch;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
/**
* Created with I... | 26.821429 | 73 | 0.76032 |
b385f553a9a311c8642c1f214f331332389d7f77 | 529 | package jp.ac.keio.bio.fun.xitosbml;
import jp.ac.keio.bio.fun.xitosbml.xitosbml.MainModelValidator;
// TODO: Auto-generated Javadoc
/**
* Spatial SBML Plugin for ImageJ.
*
* @author Kaito Ii <ii@fun.bio.keio.ac.jp>
* @author Akira Funahashi <funa@bio.keio.ac.jp>
* Date Created: Oct 1, 2015
*/
public class Spat... | 22.041667 | 63 | 0.714556 |
2fe530aeeb7ac7743de66f320b2693c4ee65c9b8 | 120 | package model.persistence;
import model.User;
public interface IUserPersistance {
User readUser(String username);
} | 13.333333 | 35 | 0.791667 |
bf1f04337a43676901f365e024badd0b406614c6 | 1,845 | // Hash Table; Backtracking
// Write a program to solve a Sudoku puzzle by filling the empty cells.
// A sudoku solution must satisfy all of the following rules:
// Each of the digits 1-9 must occur exactly once in each row.
// Each of the digits 1-9 must occur exactly once in each column.
// Each of the the digits ... | 33.545455 | 133 | 0.500271 |
3b604f47bd56bec9390b6ae79ce073f068a2c1ce | 17,367 | /**********************************************************************
Copyright (c) 2003 Erik Bengtson and others. 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
h... | 40.201389 | 197 | 0.612599 |
97e0c7abbfa1d3f7dfc31d62bb9519cb45994855 | 2,834 | package pagamento;
import dao.DaoFactoryPSQL;
import java.sql.*;
import java.util.Vector;
import paciente.*;
import tipoconsulta.*;
import consulta.*;
import convenio.*;
public class DaoPagamentoPSQL implements DaoPagamento
{
PreparedStatement ps=null;
ResultSet r=null;
public boolean buscarConven... | 21.968992 | 339 | 0.58645 |
c26e58f21c977d85635982fc497a0334a12581bb | 13,208 | /*************************************************************************************
* Copyright (c) 2011, 2012, 2013 James Talbut.
* jim-emitters@spudsoft.co.uk
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
... | 41.665615 | 276 | 0.729331 |
0a01f5f55824e3d7c323accae45986490ab7590b | 2,322 | /*
* 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 glm.vec._2.i;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.IntBuffer;
/**
*
* @author GBarbieri
... | 20.368421 | 99 | 0.516796 |
b4794c2f7ba8d95119362cd891ae10837f00593c | 1,190 | /*
* Copyright 2013 Commonwealth Computer Research, 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 applica... | 35 | 85 | 0.691597 |
6bcb75dbfbdf67286f7f18fd1ac83045612ce86a | 1,670 | package mcjty.rftoolscontrol.items.vectorartmodule;
import mcjty.rftools.api.screens.IClientScreenModule;
import mcjty.rftools.api.screens.IModuleRenderHelper;
import mcjty.rftools.api.screens.ModuleRenderInfo;
import mcjty.rftoolscontrol.blocks.vectorart.GfxOp;
import mcjty.rftoolscontrol.compat.rftoolssupport.Module... | 28.793103 | 160 | 0.701796 |
1d540c3fcbd6a3336b144fe50be93142fa7413fe | 1,159 | /*
* Copyright (c) 2020-2021 Polyhedral Development
*
* The Terra API is licensed under the terms of the MIT License. For more details,
* reference the LICENSE file in the common/api directory.
*/
package com.dfsek.terra.api.config;
import com.dfsek.tectonic.api.exception.ConfigException;
import java.io.IOExcep... | 24.145833 | 102 | 0.684211 |
649b77a083828624c95cd084d603c104d8cec55c | 1,016 | package mage.cards.h;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.LearnEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.game.permanent.token.WitherbloomToken;
import java.util.UUID;
/**
* @author TheElk801... | 28.222222 | 108 | 0.714567 |
a4d4bb8be39dedd1557b6445109a585de1380fff | 4,108 | /**
* (C) Le Hong Phuong, phuonglh@gmail.com
* Vietnam National University, Hanoi, Vietnam.
*/
package vn.hus.nlp.graph.util;
import vn.hus.nlp.graph.AdjacencyListGraph;
import vn.hus.nlp.graph.AdjacencyMatrixGraph;
import vn.hus.nlp.graph.Edge;
import vn.hus.nlp.graph.IGraph;
import vn.hus.nlp.graph.IWeightedGrap... | 26.849673 | 78 | 0.603944 |
4c27b839856704ef34b13d115c11f55d7798fc71 | 555 | package kl.gamestore.services;
import kl.gamestore.domain.dtos.order.OrderAddItemDto;
import kl.gamestore.domain.dtos.order.OrderRemoveItemDto;
import kl.gamestore.domain.entities.Order;
import java.util.List;
public interface OrderService {
String addItem(OrderAddItemDto title, String usersEmail);
String r... | 29.210526 | 80 | 0.803604 |
95cb5fe3e99c428fdc6d37b1d5ba608927610fc1 | 1,686 | package model;
import java.time.LocalDate;
public class cliente {
private int id;
private String nome;
private String sobrenome;
private String telefone;
private LocalDate dataDeNascimento;
private long cpf;
private String email;
private String endereco;
public cliente(String nome, St... | 18.94382 | 136 | 0.689798 |
06171dc48a32c8793e36663a682cc8c84e04f6b3 | 4,237 | package com.socatel.models;
import com.socatel.models.relationships.UserFeedbackVote;
import com.socatel.utils.enums.ByOrgEnum;
import com.socatel.utils.enums.VisibleEnum;
import com.socatel.utils.enums.VoteTypeEnum;
import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Set;
@Entity
@Table(name = "... | 23.28022 | 124 | 0.629691 |
b084f03c088b2d6d97fabb31b93b20a367546106 | 3,649 | /*
* 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 BD;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import... | 34.424528 | 161 | 0.595232 |
3cbace989f4f3976629e43ca93dd87427c29b626 | 2,591 | // package tutorial_1_server.testing;
package com.mycompany.app;
import com.google.guiceberry.GuiceBerryEnvMain;
import com.google.guiceberry.GuiceBerryModule;
import com.google.guiceberry.TestId;
import com.google.guiceberry.TestScoped;
import com.google.guiceberry.controllable.IcMaster;
import com.google.guiceberry.... | 30.482353 | 81 | 0.740641 |
f7a3fddd08433c0a620cbb9f20c88b519b41aada | 4,360 | /**
*
*/
package com.legrig.jenkinsci.plugins.GitBranchJobGenerator;
import hudson.Extension;
import hudson.model.AbstractDescribableImpl;
import hudson.model.Descriptor;
import java.io.Serializable;
import java.util.List;
import java.util.Set;
import jenkins.model.Jenkins;
import org.kohsuke.stapler.DataBoundCo... | 22.244898 | 153 | 0.775 |
7fa6b8f111055a8e39dc24304b06425a42236119 | 1,374 | package com.readlearncode.mapping._default.javatypes;
import org.junit.Test;
import javax.json.bind.JsonbBuilder;
import java.net.MalformedURLException;
import java.net.URISyntaxException;
import static org.assertj.core.api.Java6Assertions.assertThat;
/**
* Source code github.com/readlearncode
*
* @author Alex ... | 31.953488 | 287 | 0.620815 |
e4962c4cb1c7143af4650d10cdafd141938b93d3 | 4,562 | /*
* 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 writing, software
* distribut... | 40.017544 | 174 | 0.681499 |
71a0249834001c9c18c5444d54fac5a491567e32 | 4,322 | package org.javaswift.joss.command.impl.container;
import mockit.Verifications;
import org.apache.http.client.methods.HttpRequestBase;
import org.javaswift.joss.command.impl.core.BaseCommandTest;
import org.javaswift.joss.exception.CommandException;
import org.javaswift.joss.exception.NotFoundException;
import org.jav... | 41.557692 | 153 | 0.713327 |
24d6d73a3df1fa0fdca242ebbbb697a22a8efdf1 | 1,449 | /*
* Copyright (C) 2013 Square, 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 agre... | 36.225 | 99 | 0.730849 |
52e0d5925a0c371197c3e51ebe9712d18f988d56 | 1,416 | package com.groupname.game.entities.enemies;
import com.groupname.framework.io.Content;
import com.groupname.framework.math.Vector2D;
import com.groupname.game.entities.EnemySpriteType;
import com.groupname.game.entities.SpriteFactory;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert... | 32.181818 | 115 | 0.714689 |
e53c0672e483fd9db665dcab4be151791eadb0d3 | 2,386 | // faster alternative to Matlab ppval
// @author Michael Kaess
package drake.systems.trajectories;
public class JavaPP {
double[] m_breaks;
double[][] m_coefs;
int m_order;
int m_dim1;
int m_dim2;
int m_cached_idx;
public JavaPP(double[] breaks, double[][] coefs, int order, int[] dims) {
m_breaks ... | 27.425287 | 93 | 0.571668 |
bfa26710294ae48f250ecaf929cd26799f328855 | 841 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package erp.mtrn.data;
/**
*
* @author Sergio Flores
*/
public class SDataDpsEntryCommissionsRow extends erp.lib.table.STableRow {
public SDataDpsEntryCommissionsRow(java.lang.Object data) {
moData = da... | 26.28125 | 81 | 0.686088 |
00ce9fb3dacc71cd95fbdf6cbd75502a60b05065 | 229 | package com.travel.dao;
import com.travel.domain.Seller;
/**
* @author Summerday
*/
public interface SellerDao {
/**
* 根据route的sid找到seller信息
* @param sid
* @return
*/
Seller findBySid(int sid);
}
| 13.470588 | 32 | 0.615721 |
ca750b4b31436f50fe6eeab63fe47623a7368649 | 764 | import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
import java.util.Scanner;
public class ObjectMapperTest {
public static void main(final String... args) throws IOException {
ObjectMapper obm = new ObjectMapper();
... | 34.727273 | 70 | 0.66623 |
75ea361480c68e4546c3fb31e076568642d97447 | 14,352 | package st.domain.ggviario.secret.fragments;
import android.app.FragmentManager;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.widget.RecyclerView;
import an... | 42.587537 | 162 | 0.662138 |
f9f9275d0777ea3ea936fe8f277ced4a99720cda | 766 | package piece;
import java.awt.Color;
import game.FieldSquare;
public class PieceShapeO extends PieceShape {
private static final Color COLOR = Color.PINK;
private static final FieldSquare[][][] SHAPES = {
{
{ FieldSquare.PIECE, FieldSquare.PIECE, FieldSquare.EMPTY, FieldSquare.EMPTY },
{ FieldSquare.... | 24.709677 | 84 | 0.71671 |
4ef7e06c119af25ce43e5440dc9099ddaab16974 | 1,475 | package samebutdifferent.trickortreat.effect;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.util.Mth;
import net.minecraft.world.effect.MobEffect;
import net.minecraft.world.effect.MobEffectCategory;
import net.minecraft.world.entity.LivingEntity;
impo... | 37.820513 | 156 | 0.642034 |
8d62b205c418ba375cc189c6c6121d5c3b177afd | 948 | import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.stream.Collectors;
public class AbusingMap {
int solution(int k, int[] score) {
Map<Integer, Integer> map = new HashMap<>();
Boolean[] check = new Boolean[score.length];
Arrays.fill(check, true);
for (int i = 0... | 27.882353 | 75 | 0.581224 |
0f83b857d003a6e16c4bafa4b640889434b67032 | 956 | package tests;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
import complex_numbers.Complex;
import complex_numbers.StatusComplex;
class AdditionTests {
@Test
void verify_add_with_complex_parameter() {
Complex n1 = new Complex(1, -1); // n1 = 1 - i
Complex n2 = new Com... | 26.555556 | 92 | 0.687238 |
92da454ad7f46a68aecbe293d06cc82143e73cfe | 1,164 | package org.nakedobjects.examples;
import org.nakedobjects.metamodel.spec.NakedObjectSpecification;
import org.nakedobjects.metamodel.spec.feature.NakedObjectAssociation;
import org.nakedobjects.runtime.context.NakedObjectsContext;
public class SpecificationExamples {
public void testSpecificatio... | 31.459459 | 95 | 0.610825 |
c6a7f0783be64948ae1befd5c261f06e82671748 | 1,250 | package com.bumptech.glide.h;
import java.util.LinkedHashMap;
import java.util.Map.Entry;
// compiled from: LruCache.java
public class e<T, Y> {
private int a;
public final LinkedHashMap<T, Y> b;
public int c;
private final int d;
public e(int i) {
this.b = new LinkedHashMap(100, 0.75f, t... | 20.16129 | 70 | 0.4536 |
60eea3e6c87d7393ba08f24c0c7b7b1cf842804a | 4,034 | //
// "This sample program is provided AS IS and may be used, executed, copied and modified without royalty payment by customer (a) for its own
// instruction and study, (b) in order to develop applications designed to run with an IBM WebSphere product, either for customer's own internal use
// or for redistribution b... | 22.920455 | 149 | 0.642291 |
7f38a7f3efa12a8d52c91db67452d08ad94388f3 | 2,001 | package de.lukaskoerfer.simplepnml;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.BeforeEach;
i... | 22.738636 | 60 | 0.641679 |
c8cefea061df2e7f3eb8291a5156ded73c3cc3bf | 314 | package com.cutter.point.blog.xo.mapper;
import com.cutter.point.blog.xo.entity.WebConfig;
import com.cutter.point.blog.base.mapper.SuperMapper;
/**
* <p>
* 网站配置表 Mapper 接口
* </p>
*
* @author xuzhixiang
* @since 2018年11月11日15:01:44
*/
public interface WebConfigMapper extends SuperMapper<WebConfig> {
}
| 18.470588 | 65 | 0.729299 |
7b550fa6e4a00fe557c88de8dbcc4ec992ced3e5 | 6,506 | /********************************************************************************************
*
* Logger.java
*
* Description:
*
* Created on Feb 8, 2006
* @author Douglas Pearson
*
* Developed by ThreePenny Software <a href="http://www.threepenny.net">www.threepenny.net</a>
***************************... | 32.049261 | 146 | 0.624193 |
446236c51e90b544ea99871e062948ebb0c6c5b3 | 994 | package pl.com.bottega.factory.demand.forecasting;
import lombok.AllArgsConstructor;
import pl.com.bottega.factory.demand.forecasting.ReviewRequired.ToReview;
import java.util.Collections;
import java.util.function.Function;
@AllArgsConstructor
public enum ReviewDecision {
IGNORE(r -> null),
PICK_PREVIOUS(To... | 29.235294 | 88 | 0.65996 |
3680a5f829a6beb56bd7efe7cafbcf4ece944214 | 5,447 | package com.voidaspect.jgol.game;
import com.voidaspect.jgol.grid.Grid;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.RepeatedTest;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.time.Duration;
import java.util.concurrent.Executors;
impo... | 30.430168 | 88 | 0.608041 |
768064ed7c1911411d1509c03bda48e58960474f | 1,483 | package edu.sdsc.mmtf.spark.datasets;
import org.apache.spark.api.java.JavaPairRDD;
import org.apache.spark.api.java.JavaRDD;
import org.apache.spark.sql.Dataset;
import org.apache.spark.sql.Row;
import org.apache.spark.sql.RowFactory;
import org.rcsb.mmtf.api.StructureDataInterface;
import edu.sdsc.mmtf.spark.mapper... | 30.895833 | 98 | 0.742414 |
c947ed7f073449646183fa2c96eabf003e4a10b8 | 632 | package org.traccar.protocol;
import io.netty.handler.codec.LengthFieldBasedFrameDecoder;
import org.traccar.BaseProtocol;
import org.traccar.PipelineBuilder;
import org.traccar.TrackerServer;
public class RadarProtocol extends BaseProtocol {
public RadarProtocol() {
addServer(new TrackerServer(false, ge... | 30.095238 | 88 | 0.69462 |
a382f30df6f2b3266e5084cc4b747de54d42c99d | 11,562 | class uurErkoX35lG {
}
class wHuc {
}
class t {
public dM4hwQwvkuLmQf[][][][][][] wlN2eKLotZk2;
public p2[][][] ARp1CCgB () {
int tBhVCG5kThI;
boolean lx8gIgyNv18I = wfwLdHELwWVzD0.kuI8cwU6xJ;
}
public static void qzhMyKbNP11t (String[] qYJsyvzdfvTXH) {
ZLeKnabKNyK Kp9Vh =... | 37.784314 | 260 | 0.493254 |
22d243a1bde2798cee3a6a1a6be57e5cc009d90d | 857 | package com;
import java.io.IOException;
import java.io.PrintWriter;
import java.net.Socket;
public class SendMessage {
public void InternetStatus(String room, String status) {
String host = null;
switch (room) {
case "618_1":
host = "192.168.14.27";
br... | 25.969697 | 84 | 0.47958 |
d020c8e85f46debead1c46404d6e18eb508751a8 | 775 | package test.objects;
import cz.mg.vulkan.Vk;
import cz.mg.vulkan.VkDevice;
import cz.mg.vulkan.VkPhysicalDevice;
import static cz.mg.vulkan.Vk.*;
public class TextureImage extends Image {
public TextureImage(Vk vk, VkPhysicalDevice physicalDevice, VkDevice device, int width, int height, int mipLevelCount) {
... | 40.789474 | 206 | 0.781935 |
3c002d878fe38e1daf083b2e82d93d29ec3f4e83 | 79 | /**
* Service layer beans.
*/
package com.bcmc.xor.flare.client.api.service;
| 15.8 | 46 | 0.696203 |
183a8b407c140aff63a7503b08d073c15b42b24e | 1,664 | package com.hdl.myhttputilssimple.view;
import android.app.ProgressDialog;
import android.content.Intent;
import android.graphics.drawable.StateListDrawable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Toast;
impor... | 29.192982 | 68 | 0.75 |
10f517c88e354340edaf9f622aa438a9318b8ae1 | 7,628 | package com.my.judge_in_proxy;
import android.util.ArrayMap;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import org.jetbrains.annotations.NotNull;
import org.json.JSONObject;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.Proxy;
import java.util.concurrent.TimeUn... | 34.36036 | 179 | 0.562402 |
4f02f19902ff4bd91841e6fdcdd1635c8fcbd2fe | 7,577 | package io.jari.fingerprint;
import android.Manifest;
import android.content.pm.PackageManager;
import androidx.core.hardware.fingerprint.FingerprintManagerCompat;
import androidx.core.os.CancellationSignal;
import androidx.core.app.ActivityCompat;
import android.util.Log;
import com.facebook.react.bridge.Promise;
im... | 39.056701 | 214 | 0.67375 |
d6c1cec8278ec1da70ef1c43da0c1e8b9d428aa4 | 970 | package im.actor.sdk.controllers.fragment.settings;
import android.os.Bundle;
import im.actor.sdk.R;
import im.actor.sdk.controllers.Intents;
import im.actor.sdk.controllers.activity.BaseFragmentActivity;
public class EditAboutActivity extends BaseFragmentActivity {
public static final int TYPE_ME = 0;
publ... | 30.3125 | 78 | 0.68866 |
217da54019067c4bd3ac2cefe07fda0b9eaf270d | 817 | package frc.robot;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj2.command.button.*;
public class JoyButton extends Button {
private JoyDir joyDir;
private Joystick stick;
private int axis;
public enum JoyDir {
DOWN,UP;
}
/**
* Uses Joystick as a button input.
* @param joystick... | 17.020833 | 66 | 0.648715 |
a0bdfcf369ca1325256aa6b22a4098c27a2a8463 | 1,510 | package com.googlecode.l10nmavenplugin.validators.property.format;
import static org.junit.Assert.*;
import java.util.Properties;
import org.junit.Before;
import org.junit.Test;
import com.googlecode.l10nmavenplugin.model.BundlePropertiesFile;
import com.googlecode.l10nmavenplugin.model.PropertiesFile;
i... | 35.116279 | 114 | 0.745033 |
85b28f4a692241624c4e42569bedc8eaabf7769a | 784 | package com.academy.datastax.api;
import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
@ComponentScan(basePackages= {"com.academy.datastax"})
@Enabl... | 37.333333 | 98 | 0.784439 |
e4dd3c13d375c3ce5412286da229ef13ba3d145f | 5,178 | /*
* Copyright 2015 AT&T
*
* 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 wr... | 25.89 | 99 | 0.69776 |
e2992a15d8b2c7b5a4e42d4580715d5b0945d01b | 898 | package com.dpgrandslam.stockdataservice.acceptance;
import com.dpgrandslam.stockdataservice.StockDataServiceApplication;
import io.cucumber.spring.CucumberContextConfiguration;
import org.junit.Ignore;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springfra... | 33.259259 | 84 | 0.848552 |
d128e429cb23bf9352e97d745804da970b658214 | 1,701 | package jdbcUtils;
import java.io.IOException;
import java.io.InputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Properties;
/**
* jdbc连接工具类 v3
* @author Administrator
* @date 2018年4月3日... | 21.807692 | 83 | 0.677837 |
880688ec70da912065249dda95ea9d1e1162e20b | 961 | package client.messages.commands.gm;
import client.MapleClient;
import client.messages.Command;
public class LevelCommand extends Command {
@Override
public void execute(MapleClient c, String[] splitted){
short maxLevel = 255;
short level = c.getPlayer().getLevel();
try {
l... | 32.033333 | 103 | 0.57128 |
4126973e1d5ed99e80502afcfb91cebf98bf30c1 | 3,240 | package com.truextend.firstProblem.controllers;
import java.util.List;
import java.util.Optional;
import java.util.Set;
import javax.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.... | 34.105263 | 98 | 0.791975 |
f15eb2c9e46485f4b5037ce044e672d51144c487 | 1,637 | package io.github.pedroermarinho.comandalivreapi.domain.usecases.employeea_at_organization;
import io.github.pedroermarinho.comandalivreapi.domain.dtos.EmployeeAtOrganizationDTO;
import io.github.pedroermarinho.comandalivreapi.domain.repositories.EmployeeAtOrganizationRepository;
import io.github.pedroermarinho.comand... | 39.926829 | 108 | 0.814905 |
760b585c159889e30d74636eab604af5854769e3 | 1,223 | package com.example.android.bluetoothlegatt;
import android.bluetooth.BluetoothGattCharacteristic;
import android.bluetooth.BluetoothGattService;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import java.util.List;
import java.util.UUID;
import static java.l... | 27.177778 | 98 | 0.700736 |
0ad1eaeb963116a29717823d88a56e6557f163b3 | 4,687 | /*
* 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 ... | 36.053846 | 120 | 0.670792 |
9949f258108ceb9459b9e33f85fc74a36bc65bed | 1,107 | package com.braintreegateway.unittest;
import org.junit.Test;
import java.util.ArrayList;
import java.util.List;
import com.braintreegateway.PaginatedCollection;
import com.braintreegateway.PaginatedResult;
import com.braintreegateway.SimplePager;
import static org.mockito.Matchers.any;
import static org.mockito.Mo... | 29.131579 | 90 | 0.718157 |
6b78fa4da35d1628cd587e9eeb3c959338156184 | 6,547 | /**
* Copyright 2014 Meruvian
*
* 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 i... | 38.970238 | 110 | 0.803574 |
ef33f5cbf50916224831d865dccdebe3ac7e92cb | 1,244 | package com.dyvak.crm.controller;
import com.dyvak.crm.aspects.Benchmark;
import com.dyvak.crm.aspects.LoggedArgs;
import com.dyvak.crm.aspects.LoggedReturn;
import com.dyvak.crm.domain.User;
import com.dyvak.crm.security.UserRole;
import com.dyvak.crm.service.UserService;
import lombok.AllArgsConstructor;
import org.... | 27.043478 | 80 | 0.69373 |
b09b3011b4079b3c3bee8cc445399e9d10fa8bd7 | 5,116 | /*
* Copyright 2018 Lake Zhang
*
* 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 wr... | 25.969543 | 89 | 0.56509 |
537bc5a63f500e28cb1ab7af14e23f2bbd61aff8 | 764 | package ru.hixon.springredisclustertestcontainers;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.Optional;
class NumberServiceTests extends AbstractIntegrationTest {
@Autowired
private NumberService... | 25.466667 | 63 | 0.657068 |
cebc0136f8b5cad8ce7538692d93f2ef8d1bf059 | 794 | package br.sprintdev.model.service;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import br.sprintdev.model.dao.TaskDao;
import br.sprintdev.model.entity.Task;
@Ser... | 18.045455 | 64 | 0.751889 |
b060b49c13bb2fa2e0729eba90e337eaa62f6cb2 | 20,598 | /*
* Copyright 2019 The FATE Authors. 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 a... | 38.645403 | 138 | 0.559181 |
6ef98cfa30de875422ec4036f3a04f56c3a69c11 | 2,344 | /*
* 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 ... | 38.42623 | 110 | 0.720137 |
50e8635466ba1e0e3fa331fb413d876da4319235 | 511 | package it.cnr.istc.stlab.pss.harvester;
public class LocalDestination {
private String localPath;
public LocalDestination(String localPath) {
super();
this.localPath = localPath;
}
public String getLocalPath() {
return localPath;
}
public String getDownloadedFile() {
return localPath + "/downloaded.... | 17.62069 | 51 | 0.726027 |
e8c3c198af2ea0415cf24de795442f8ae0d67456 | 89 | package org.zstack.sdk;
public enum MdevDeviceStatus {
Active,
Attached,
Reserved,
}
| 11.125 | 30 | 0.752809 |
9ea344f5167bb78dd17dd625e049584a84ac2041 | 2,315 | /*******************************************************************************
* Copyright 2014 IBM
*
* 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/lice... | 30.866667 | 100 | 0.638013 |
26418d6308e7b7c719474d61cc64393e413bf3e0 | 434 | /*
* @test /nodynamiccopyright/
* @bug 7034511 7040883 7041019
* @summary Loophole in typesafety
* @compile/fail/ref=T7034511a.out -XDrawDiagnostics T7034511a.java
*/
class T7034511a {
interface A<T> {
void foo(T x);
}
interface B<T> extends A<T[]> { }
static abstract class C implem... | 19.727273 | 67 | 0.582949 |
255a0da6e4dbae4a29034cb9c3f89832cbcc1828 | 1,135 | package com.egojit.cloud.common.base;
import com.egojit.cloud.common.utils.GuidUtils;
import org.apache.commons.lang3.StringUtils;
import javax.persistence.Id;
import java.util.Date;
import java.util.UUID;
/**
* 基础数据库对象,所有数据库对象必须继承
*
* @author 高露 QQ:408365330
* @date $date$
*/
public abstract class BaseDbEntity... | 15.985915 | 51 | 0.569163 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.