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 |
|---|---|---|---|---|---|
0c24f67ee7001fce834ba6c607070ce783901da3 | 1,861 | package zhinan.liang.entitys;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;
import org.junit.Test;
import org.springframework.context.Applic... | 29.539683 | 104 | 0.626008 |
e91c96a8ba17c792d537a382e17cbddeac095032 | 2,908 | /*
* 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 ... | 23.079365 | 83 | 0.595942 |
587ad737033e228eb49c24a4eef281a448611553 | 4,017 | /*
* Copyright 2019 Pivotal, 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 ... | 39.382353 | 91 | 0.76475 |
2b3786d3ec7be59b7097abd896db01e5923491f3 | 9,946 | /*
* Copyright (C) 2020 Reincarnation Development Team
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*/
package reincarnation.decompiler.me... | 21.389247 | 115 | 0.49075 |
314526c8695ef8c8238a622644f27627d3c048ec | 3,181 | package com.fshtank.sanbox.controller;
import com.fshtank.sanbox.exception.SanboxException;
import com.fshtank.sanbox.model.SanboxWebRequest;
import com.fshtank.sanbox.model.SanboxWebResponse;
import com.fshtank.sanbox.service.SbxService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframew... | 35.344444 | 116 | 0.684376 |
b3519e1978a3f91f5e9195bd34985a3821db11b6 | 8,167 | /*
* Copyright © 2017 Mathieu Carbou (mathieu.carbou@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required... | 40.231527 | 158 | 0.750092 |
2c91eb8c79031c097e9e76bc836c5b8e93a2fbfe | 2,331 | package com.fix.remote;
import com.fix.common.domain.configs.Platform;
import com.fix.common.utils.RemoteUrlUtils;
import com.fix.exceptions.PlatformNotFoundException;
import com.fix.exceptions.PlatformRegistryNotFoundException;
import com.fix.model.mappers.PlatformMapper;
import com.netflix.appinfo.InstanceInfo;
impo... | 36.421875 | 118 | 0.750322 |
af76c0c9c164b06e2869a10aff065fc30efba8e7 | 3,064 | /*
This SDK is licensed under the MIT license (MIT)
Copyright (c) 2015- Applied Technologies Internet SAS (registration number B 403 261 258 - Trade and Companies Register of Bordeaux – France)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation fi... | 31.587629 | 141 | 0.657637 |
0b9b4061f8fc13ea7c741df888edd993d8608db8 | 11,501 | /*
* 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 oslp;
/**
*
* @author Artpicks
*/
import java.awt.*;
import javax.swing.*;
import javax.swing.border.*;
import java.util.*... | 40.073171 | 124 | 0.590296 |
08b20921156ce94bcff52380ca5c32ece3607182 | 1,658 | /*
* 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 ... | 35.276596 | 132 | 0.721954 |
8f9d9d8631d4e9221c6494dd42e22acf9e7242b1 | 4,116 | /* Copyright (c) 2014 Boundless and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Distribution License v1.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/org/documents/edl-v10.html
*
* Contribut... | 38.111111 | 78 | 0.6793 |
d87aff940d6e09af7e4ed2b780e819d947d7cc94 | 1,743 | package com.ssp.ding;
import com.ssp.ding.message.ActionCardMessage;
import com.ssp.ding.message.DingMessage;
import com.ssp.ding.message.LinkMessage;
import com.ssp.ding.message.OAMessage;
import java.time.Duration;
/**
* 消息发送根据类型
* 接口文档:https://ding-doc.dingtalk.com/doc#/serverapi2/ye8tup
*
* @author: sunshaop... | 19.58427 | 71 | 0.611589 |
117d6754f29fcee0a9229111b84ca1388d9bb810 | 5,011 | /*
* 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... | 50.616162 | 149 | 0.737777 |
20d82a9fc3b09089204279d9bfcd87fa626240a3 | 17,823 | package com.wecook.yelinaung.database.local;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import com.wecook.yelinaung.database.DrinkDbModel;
import com.wecook.yelinaung.databa... | 47.528 | 101 | 0.723223 |
bdc1b182ddbfa613983c3ed11384cfd7caa1a7d8 | 456 | package katas.kyu6;
public class FactorsOfTriangleNumbers {
public static int calculate(int n) {
int i = 1;
for (; ; i++) {
int number = (i * (i + 1)) / 2;
int count = 0;
for (int j = 1; j <= Math.sqrt(number); j++) {
if (number % j == 0) if (numb... | 26.823529 | 66 | 0.425439 |
b1e8c62501a3bdce682b483471813f371e60727d | 12,029 | // The MIT License (MIT)
//
// Copyright (c) 2015 Kristian Stangeland
//
// 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, ... | 29.482843 | 129 | 0.650012 |
8bd61ac07d135acbb4fd0f4b732c9ff167c16934 | 95,718 | package com.google.mu.util;
import static com.google.common.collect.ImmutableListMultimap.toImmutableListMultimap;
import static com.google.common.truth.Truth.assertThat;
import static com.google.common.truth.Truth8.assertThat;
import static com.google.mu.util.Substring.BEGINNING;
import static com.google.mu.util.Subs... | 41.098325 | 164 | 0.668098 |
770cd73d6bafe373091dba200f714c0ed662c40a | 1,347 | import javax.swing.JFrame;
import javax.swing.JLabel;
// Creating JFrame object inside main()
public class P1 {
public static void main(String[] args) {
var myFrame = new JFrame();
var myMsg = new JLabel("Inside Main!");
myFrame.add(myMsg);
myFrame.setSize(500, 400);
myFra... | 27.489796 | 80 | 0.631032 |
192090001fbac9d801033941b0035035042359a4 | 102,124 |
//----------------------------------------------------
// The following code was generated by CUP v0.11b 20160615 (GIT 4ac7450)
//----------------------------------------------------
package parser;
import java_cup.runtime.*;
import java_cup.runtime.ComplexSymbolFactory.ComplexSymbol;
import java.util.List;
import j... | 57.212325 | 239 | 0.639389 |
54af6e7a9afd0413d543b33aaadad278d174b76a | 22,781 | /*
* Copyright 2015-2017 OpenCB
*
* 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 ... | 49.416486 | 140 | 0.594267 |
c1a9f9d34c7196e2c2c292956c3b35e6b3652f8b | 1,088 | package com.yarashevich.kiryl.ipd;
import android.os.Bundle;
import android.support.v4.app.NavUtils;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
public class ExampleMaterialAboutFragmentActivity extends AppCompatActivity {
@O... | 32.969697 | 118 | 0.700368 |
3525b25f6f28751bdf5a1d75e97d43750532e748 | 678 | package org.jtrim2.cache;
/**
* @see GenericReference#getNoReference()
*/
final class NoVolatileReference<ReferentType>
implements VolatileReference<ReferentType> {
private static final NoVolatileReference<?> INSTANCE
= new NoVolatileReference<>();
@SuppressWarnings("unchecked")
pub... | 19.941176 | 60 | 0.644543 |
508fe08c6e6d11553066d6fb6b6f3d742cfe46da | 894 | package com.domain.food.consts;
import com.domain.food.config.BusinessException;
import lombok.Getter;
/**
* 错误码
*/
@Getter
public enum ErrorCode {
OK(200, "业务执行成功"),
BAD(500, "服务器错误"),
ILLEGAL_ARGUMENTS(1000, "参数错误"),
CONDITION_CHECK(1001, "业务检查未通过"),
/*------------------ 登陆错误 5000 - 5010 ... | 19.866667 | 68 | 0.543624 |
a62bbec27f2d06d9bfdcb04a459379face8500c0 | 2,404 | package algs.coding_jam;
/*
A string S of lowercase letters is given. We want to partition this
string into as many parts as possible so that each letter appears
in at most one part, and return a list of integers representing the
size of these parts.
Example 1:
Input: S = "ababcbacadefegdehijhklij"
Output: [9,7,8]
Ex... | 24.783505 | 98 | 0.473794 |
082240b0f6b4588c0d734ae260f16ddfcc0907ae | 1,998 | package com.example.schemainfer.protogen.rules;
import com.example.schemainfer.protogen.utils.CommonUtils;
import com.example.schemainfer.protogen.utils.Constants ;
import org.apache.commons.lang3.StringUtils;
import java.text.DecimalFormat;
public class InferJsonDatatype {
public static String determineInferDa... | 38.423077 | 123 | 0.607107 |
d4e752391e4e734afe673514b2370e9ea68afd11 | 860 | package net.kodar.restaurantapi.business.transformer.param.menuitem;
import org.springframework.stereotype.Component;
import net.kodar.restaurantapi.business.transformer.param.ParamTransformer;
import net.kodar.restaurantapi.data.entities.MenuItem;
import net.kodar.restaurantapi.presentation.param.MenuItemParam;
@Com... | 28.666667 | 102 | 0.777907 |
4d29a1081475a48a2f2a5a0c12dc11a8ae6f685f | 598 | // Copyright (c) Committed Software 2018, opensource@committed.io
package uk.gov.dstl.baleen.graph.value;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import org.junit.Test;
import com.google.common.collect.ImmutableList;
public class MinValueStrategyTest {
@Test
pub... | 28.47619 | 77 | 0.747492 |
dd606ced80eebf1426e58b2da3a3d93eafb0d0e7 | 4,700 | /*
* Copyright (c) 2015 Spotify AB.
*
* 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... | 37.903226 | 99 | 0.7 |
1c5f49388d8536f0667c28d72ab7ab538fc70eda | 1,564 | /*
* Tencent is pleased to support the open source community by making Polaris available.
*
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the BSD 3-Clause License (the "License");
* you may not use this file except in compliance with the License.
* You ma... | 32.583333 | 104 | 0.713555 |
0ea430626e6251704bb9385c06b94ae8414007fb | 58,176 | package com.aviary.android.feather.widget;
import it.sephiroth.android.library.imagezoom.easing.Easing;
import it.sephiroth.android.library.imagezoom.easing.Expo;
import it.sephiroth.android.library.imagezoom.easing.Linear;
import android.content.ContentResolver;
import android.content.Context;
import android.content.... | 27.928949 | 130 | 0.662576 |
261787753aaba402bb85a13b4201aa11640a7981 | 4,597 | package com.arnaudpiroelle.muzei.marvel.ui.settings.fragment;
import android.app.Fragment;
import android.content.Context;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.EditorInfo;
im... | 25.39779 | 119 | 0.636285 |
71f4f8bd86c89bfd348936462936ccf711625f55 | 39,175 | package fr.insee.arc.web.dao;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.sql.SQLException;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import ... | 45.341435 | 358 | 0.710785 |
7fe18e6cb0f51193867d0376a437026a694b0591 | 5,863 | /*
* Copyright (C) 2021 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... | 38.320261 | 99 | 0.645574 |
98bbfb51bc188814efd376875d1494a90296cd28 | 2,151 | package ie.tudublin;
import java.util.ArrayList;
import processing.core.PApplet;
import processing.data.Table;
import processing.data.TableRow;
public class ScoreDisplay extends PApplet
{
public ArrayList<Note> convertStringToArrayList(String score)
{
ArrayList<Note> notes = new ArrayList<Note>();
... | 20.485714 | 77 | 0.541144 |
4adbe2f8b96b27c0e552c05ca1c4d8b1684d7aea | 486 | package org.knowm.xchange.okcoin.v5.dto.account;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.knowm.xchange.okcoin.v5.OkexResultV5;
import java.util.List;
public class AccountConfigResult extends OkexResultV5<List<AccountConfig>> {
public AccountConfigResult(
@JsonProperty("code"... | 28.588235 | 76 | 0.707819 |
76c9243ef7a8b168286f4b39c7aec03ac5c2eab3 | 292 | package ar.com.zumma.sparrow.repositories;
import ar.com.zumma.sparrow.model.User;
import org.springframework.data.repository.CrudRepository;
import java.util.Optional;
public interface UserRepository extends CrudRepository<User, String> {
Optional<User> findByEmail(String email);
}
| 24.333333 | 70 | 0.808219 |
c033f1f930578951f49fc1ca21c88bfa1d573635 | 1,404 | package cn.jzvd.task;
import java.util.Timer;
import java.util.TimerTask;
import cn.jzvd.JZVideoPlayer;
public class DismissControlViewTimerTask extends TimerTask {
private static Timer DISMISS_CONTROL_VIEW_TIMER;
private static DismissControlViewTimerTask task;
private final JZVideoPlayer player;
... | 26.490566 | 74 | 0.606125 |
1c2090981ef87df72bb0a95022aba691587bb626 | 1,160 | /**
* Definition for binary tree with next pointer.
* public class TreeLinkNode {
* int val;
* TreeLinkNode left, right, next;
* TreeLinkNode(int x) { val = x; }
* }
*/
public class PopulatingNextRightPointersInEachNodeII {
public void connect(TreeLinkNode root) {
if (root == null) return... | 29.74359 | 55 | 0.461207 |
8f27a90d402e848e32857ef9ed8316a5780ae83f | 10,251 | /* Xholon Runtime Framework - executes event-driven & dynamic applications
* Copyright (C) 2014 Ken Webb
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1
* of th... | 30.783784 | 604 | 0.671642 |
38784c24654e24481cf934b758196a4c521e499b | 512 | package server.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import server.entity.LinkEntity;
import server.service.LinkService;
@RestControll... | 21.333333 | 62 | 0.810547 |
8f051d9d1349d35bf2d08039d0417ae2baed7a7d | 2,575 | /*
* Copyright 2012 The Netty Project
* Copyright 2013 Red Hat, Inc.
*
* The Netty Project 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... | 36.267606 | 116 | 0.699806 |
f97d89d6d5e92c5bac0df21804753304af29cc2c | 2,558 |
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
import static org.hamcrest.CoreMatchers.instanceOf;
import org.junit.Test;
import controllers.AcceptController;
import controllers.PlayController;
import controllers.ResumeController;
import controllers.StartController;
public cla... | 34.106667 | 78 | 0.705238 |
e33258f99d1ad9f2293b3d033d58bec5f1c5f943 | 515 | package com.example.first.fragment.news;
/**
* @ClassName: News
* @Description: 描述
* @Author: 范琳琳
* @CreateDate: 2019/4/6 11:31
* @Version: 1.0
*/
public class News {
private String title;
private String content;
public String getTitle() {
return title;
}
public void setTitle(Strin... | 16.612903 | 44 | 0.603883 |
96d9acbe558dad15030f9e3b55c71e4fb52a3ae2 | 1,586 | package net.avalara.avatax.rest.client.enums;
/*
* AvaTax Software Development Kit for Java JRE based environments
*
* (c) 2004-2018 Avalara, Inc.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @author Dustin Welden <dustin... | 13.555556 | 74 | 0.503783 |
f400be98c6742e24e00d4d04e6c8eb670801beff | 2,730 | package com.vaani.leetcode.graph;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
/**
* https://leetcode.com/problems/flower-planting-with-no-adjacent/
* <p>
* 1042. Flower Planting With No Adjacent
* Easy
* <p>
* You have N gardens, labelled 1 to N. In each gard... | 31.37931 | 198 | 0.553846 |
09d5a0c83d6deb684683cbe07447db10f0f0dff7 | 4,223 | /**
* Copyright 2004-2014 The Kuali Foundation
*
* Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php
*
* Unless requ... | 42.23 | 128 | 0.696661 |
313b38c6e0ef05175894f5df487ad74750b68e80 | 285 | package com.javahelps.smartagent.monitor;
/**
* Created by gobinath on 18/07/17.
*/
public interface Monitor {
void start();
void stop();
void addStateChangeListener(StateChangeListener listener);
void removeStateChangeListener(StateChangeListener listener);
}
| 16.764706 | 65 | 0.733333 |
246e86569750426a0a5cbf53785f83f957d58242 | 225 | package com.linkedin.jsf;
import java.io.Serializable;
public interface InventoryService extends Serializable {
public void createItem(Long catalogItemId, String name);
public Long getQuantity(Long catalogItemId);
}
| 18.75 | 57 | 0.8 |
25e105fb4a604b5ac88af86bb83c807061f7e4f6 | 3,661 | package eu.humanbrainproject.mip.algorithms.serializers.pfa;
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import eu.humanbrainproject.mip.algorithms.NullableInputAlgori... | 36.61 | 124 | 0.751707 |
97cd992398e0334b4b5518dca530a8c724486fc7 | 108 | package com.appjangle.opsunit;
public interface JobContext {
public JobListener getListener();
}
| 13.5 | 35 | 0.731481 |
5cef2ee90fb35aa2b669023c67f3a1295c52fc77 | 105 | package com.br.zupacademy.hugo.mercadolivre.compra;
public enum Status {
INICIADA,
FINALIZADA
}
| 15 | 51 | 0.742857 |
b38ca14d42e98d7a5b9a210139bcb52257ab2bbb | 1,019 | package hw;
import java.util.Scanner;
/*志明跟春嬌是班上的一對情侶,他們有寫交換日記來打發時間的習慣,為了防止他們 寫的內容被幫忙傳的同學,或者是不小心被老師沒收,而曝光了裡面寫的東西,他們 想到了一個辦法,就是把內容的所有字母都往後數幾次的字母替代,而往後數幾次的 數目就寫在內容的下一行。但是,問題來了,春嬌覺得每次寫完都要在數來數去的轉 化成”加密”格式,實在是太麻煩了。但又礙於不想被輕易的看到內容,於是她拜託你 寫個程式幫忙她可以直接把寫好的內容轉化成”加密”的型態。加密結果不會影響原字 母的大小寫,且數字部分亦作相同處理,但不處理符號及特殊字元及中文。(第一行為想輸入的內容,不超過... | 29.970588 | 320 | 0.62316 |
c4c5363708acaa32dc480d9fce953baeb39908b4 | 15,967 | package com.seq.api;
import com.google.gson.JsonObject;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.*;
import java.util.concurrent.TimeUnit;
import com.seq.exception.*;
import com.seq.http.*;
/**
* A transaction is an atomic update to the state of ... | 28.461676 | 85 | 0.591533 |
7d7d321a5adc0003d090332bf5785c2f578bb57d | 179 | package io.renren.modules.app.entity;
import lombok.Data;
@Data
public class AccessToken {
private String token;
private Integer expiresIn;
private Long tokenTime;
} | 17.9 | 37 | 0.748603 |
cf63f9bfd1c6ece0b36f382690cd70e8a3716c9c | 1,117 | package com.ruisi.vdop.bean;
import java.util.UUID;
public class Summary
{
private String summary_id;
private String act_id;
private String act_bg;
private String act_exp;
private String act_creativity;
private String act_lesson;
public Summary()
{
this.summary_id = UUID.randomUUID().toString();
}
publi... | 19.946429 | 55 | 0.735004 |
4c96d4b4049fc63734da065c3f5a06f7dfb5c62c | 3,971 | /***************************************************************************
* Copyright 2017 Kieker Project (http://kieker-monitoring.net)
*
* 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 a... | 46.717647 | 154 | 0.768572 |
c8ca94c5271f6b5e1c606cefab3d12106a0d51ff | 4,604 | package info.u_team.u_team_core.screen;
import java.util.ArrayList;
import java.util.List;
import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.vertex.PoseStack;
import info.u_team.u_team_core.gui.renderer.FluidInventoryRenderer;
import info.u_team.u_team_core.intern.init.UCoreNetwork;
import in... | 35.145038 | 141 | 0.754996 |
70e3f6374601181cd3b88fa628e5b92906f269e1 | 3,831 | //给你 k 枚相同的鸡蛋,并可以使用一栋从第 1 层到第 n 层共有 n 层楼的建筑。
//
// 已知存在楼层 f ,满足 0 <= f <= n ,任何从 高于 f 的楼层落下的鸡蛋都会碎,从 f 楼层或比它低的楼层落下的鸡蛋都不会破。
//
// 每次操作,你可以取一枚没有碎的鸡蛋并把它从任一楼层 x 扔下(满足 1 <= x <= n)。如果鸡蛋碎了,你就不能再次使用它。如果某枚鸡蛋扔下后没有摔碎
//,则可以在之后的操作中 重复使用 这枚鸡蛋。
//
// 请你计算并返回要确定 f 确切的值 的 最小操作次数 是多少?
//
//
// 示例 1:
//
//
//输入:k = 1, n = 2
//输出:2
//解释:... | 28.377778 | 100 | 0.453667 |
75537ded12764562c7e2858101676010346dcc85 | 1,018 | package de.mpicbg.knime.knutils;
import org.knime.core.data.*;
import java.util.HashSet;
import java.util.Set;
/**
* An atttribute implementation that allows for an automatic creation of a proper attribute domain.
*
* @author Holger Brandl
*/
public class DomainCacheAttribute extends Attribute {
private Se... | 23.674419 | 99 | 0.699411 |
0b1841e2be0597afda07d4d99819d124f731583d | 3,150 | package br.com.apssystem.algafood.api.controller;
import br.com.apssystem.algafood.api.controller.openapi.controller.CozinhaControllerOpenApi;
import br.com.apssystem.algafood.api.mapper.CozinhaMapper;
import br.com.apssystem.algafood.api.model.CozinhaModel;
import br.com.apssystem.algafood.api.model.input.CozinhaInpu... | 40.909091 | 105 | 0.756508 |
4d57aa065127b3f6dfa7eb2214c5a9f7f7643faa | 319 | package com.company;
public class ShopManager {
public void addToProduct(Products products){
System.out.println(products.productName+" adlı ürün eklendi");
}
public void createCustomer(Customer customer){
System.out.println(customer.customerName+" adlı müşteri eklendi");
}
}
| 29 | 75 | 0.69279 |
b3b1339dec3c2e29d15b82e34b0d8a668d541d7c | 607 | package ru.job4j.streamapi.algorithms;
public class Sort {
public static void main(String[] args) {
int[] arr = new int[]{9,2,5,3,9,8};
int[] result = new int[arr.length];
for (int i = 0; i < result.length; i++) {
int counter = 0;
for (int j = 0; j < arr.length; j++)... | 24.28 | 50 | 0.420099 |
a88615ffbddafb8cc371647403851014bd34b130 | 4,364 | /*
* Licensed to Jasig under one or more contributor license
* agreements. See the NOTICE file distributed with this work
* for additional information regarding copyright ownership.
* Jasig licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file
* except ... | 39.672727 | 142 | 0.688588 |
93733b3e59a57bb38426961411d440b6d9494c8a | 767 | package net.minidev.ovh.api.email.domain;
/**
* Account List
*/
public class OvhAccountDelegated {
/**
* List of allowed sizes for this account in bytes
*
* canBeNull && readOnly
*/
public Long[] allowedAccountSize;
/**
* Size of your account in bytes
*
* canBeNull && readOnly
*/
public Long siz... | 13.696429 | 51 | 0.6206 |
0b535e8c2fefefc352709e9695369d2760fa338a | 8,935 | /*
* Copyright 2014 NAVER Corp.
*
* 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 ... | 38.512931 | 148 | 0.63671 |
c9a3d5a7d313166a2a51e0d9c48ca39f70a432db | 6,369 | /**
* Copyright © 2018 The Lambico Datatest Team (lucio.benfante@gmail.com)
*
* This file is part of lambico-datatest-jpa.
*
* 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
*
* htt... | 36.394286 | 116 | 0.625687 |
036a7963c3ee46ae3f50cb7f0cf1e28aa4c83133 | 5,342 | /*
* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
* This program are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.
*/
package com.supermap.gaf.cache;
import com.fa... | 46.452174 | 152 | 0.774242 |
9d909c107eea77b1751fc5c0dad102f890b5fcde | 6,080 | /*
* Copyright (c) 2015 The CyanogenMod 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 applicable ... | 38.726115 | 102 | 0.699507 |
55c8a1145c252865fcf92be18587cda94e9811a2 | 1,056 | package com.alibaba.datax.plugin.writer.odpswriter.model;
import java.io.Serializable;
import java.util.List;
public class UserDefinedFunction implements Serializable {
private static final long serialVersionUID = 1L;
private String name;
private String expression;
private String inputColumn;
private Li... | 23.466667 | 77 | 0.694129 |
1ea214734bf250ce114cbad029b5d53629960e62 | 964 | package org.jenkinsci.plugins.lambdatestrunner.jenkins.request;
import org.junit.Test;
import java.util.Collections;
import static org.junit.Assert.assertEquals;
public class RequestMapperTest {
@Test
public void testAsString() {
Request rawRequest = new Request();
rawRequest.setRepoUri("ht... | 41.913043 | 272 | 0.71888 |
f58ee9069cceb3ce475832e27a345f4d3373fb3b | 2,822 | package se.l4.otter.model.internal;
import java.util.HashMap;
import java.util.Map;
import se.l4.otter.EventHelper;
import se.l4.otter.lock.CloseableLock;
import se.l4.otter.model.SharedMap;
import se.l4.otter.model.spi.AbstractSharedObject;
import se.l4.otter.model.spi.DataValues;
import se.l4.otter.model.spi.Shared... | 20.449275 | 81 | 0.708009 |
fa8f714758c9b0a966a444c9e3d48b0b65b55174 | 10,165 | /*
* Copyright 2016-2021 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 "licen... | 33.110749 | 120 | 0.678406 |
df58bb560c3e8707b4d692a7959501153d4e160a | 732 | package box.star.bin.sh.promise;
import box.star.bin.sh.SharedMap;
import box.star.bin.sh.Streams;
import box.star.contract.Nullable;
import java.io.Closeable;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
public interface StreamCatalog<Host> {
Host writeErrorTo(@Nullable OutputSt... | 20.914286 | 52 | 0.759563 |
ab462e61240362dee40a9588cfae3508b97b9c75 | 7,815 | /*
* Copyright © 2018 HarborIO, 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... | 31.897959 | 162 | 0.628279 |
33738f539cd7fe597a55ad9c4fabf7478090f8b7 | 208 | package com.soracasus.survivegame.tiles;
import com.soracasus.survivegame.gfx.Assets;
public class DirtTile extends Tile {
public DirtTile(int id) {
super(Assets.INSTANCE.getTexture("dirt"), id);
}
}
| 17.333333 | 48 | 0.754808 |
1e8f9976ea98cda9fab63c3a6ee4ef17e2f381a8 | 3,689 | package io.github.strikerrocker.vt.content.items;
import io.github.strikerrocker.vt.VanillaTweaks;
import io.github.strikerrocker.vt.base.Feature;
import io.github.strikerrocker.vt.content.blocks.Blocks;
import io.github.strikerrocker.vt.content.items.craftingpad.CraftingPadItem;
import io.github.strikerrocker.vt.cont... | 57.640625 | 173 | 0.73814 |
8b1008a62752f8312402f6b11a69223effab11c9 | 4,633 | /*******************************************************************************
* Copyright 2016-2018 Research group REMEX, Hochschule der Medien (Stuttgart, Germany)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You ... | 52.05618 | 197 | 0.696957 |
e1c368fe1ce621e2bb0aa8e4e40ac7a407001b4b | 4,991 | //package reco.serenade.dataio;
//
//import com.google.api.core.ApiFuture;
//import com.google.cloud.bigtable.admin.v2.BigtableTableAdminClient;
//import com.google.cloud.bigtable.admin.v2.BigtableTableAdminSettings;
//import com.google.cloud.bigtable.admin.v2.models.CreateTableRequest;
//import com.google.cloud.bigtab... | 48.456311 | 137 | 0.718093 |
5292f26be2237414d2ab3c99f1b8057dff8e69a2 | 5,346 | /*
* Copyright (c) 2013 The CCP project authors. All Rights Reserved.
*
* Use of this source code is governed by a Beijing Speedtong Information Technology Co.,Ltd license
* that can be found in the LICENSE file in the root of the web site.
*
* http://www.yuntongxun.com
*
* An additional intellectual prop... | 23.654867 | 101 | 0.684811 |
c7e02b53a6b2b3447625059b5a6a81b5d37615b2 | 1,013 | package cn.code.chameleon.utils;
import java.io.File;
/**
* @author liumingyu
* @create 2018-04-11 下午7:34
*/
public class FilePersistent {
protected String path;
public static String PATH_SPLIT = "/";
static {
String property = System.getProperty("file.separator");
PATH_SPLIT = prope... | 21.553191 | 63 | 0.572557 |
0df9aa0ea853632dbe39667889ca00a1c76e12f1 | 325 | package com.cgy.weixin.ui.view;
import android.widget.Button;
import android.widget.EditText;
/**
* Created by cgy
* 2018/5/29 9:18
*/
public interface IRegisterView {
EditText getEtNickName();
EditText getEtPhone();
EditText getEtPwd();
EditText getEtVerifyCode();
Button getBtnSendCode()... | 14.130435 | 32 | 0.692308 |
1725f0d285e50fd7aadafc444ba957239101657c | 7,560 |
import java.util.Map;
import java.util.HashMap;
import java.util.List;
import java.util.ArrayList;
import spark.ModelAndView;
import spark.template.velocity.VelocityTemplateEngine;
import static spark.Spark.*;
public class App {
public static void main(String[] args){
staticFileLocation("/public");
... | 41.086957 | 110 | 0.594312 |
b1b11b30d676cd36f205b81770d158f93359ffb7 | 461 | package TEST;
import java.io.IOException;
public class zd {
public static void main(String[] args) {
// TODO Auto-generated method stub
try {
Runtime.getRuntime().exec("sudo chmod 755 /usr/local/apache-tomcat-9.0.0.M11/bin/*.sh");
Runtime.getRuntime().exec("cd /usr/local/apache-tomcat-9.0.0.M11");
R... | 21.952381 | 91 | 0.67462 |
e4f4a29cfa605393728f99afe8ce2ec3befaa56b | 2,512 | package com.stevengiblin.spring.taleemdb.util;
import java.util.Locale;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.MessageSource;
import org.springframework.security.core.Authentication;
import org.spring... | 28.224719 | 98 | 0.762739 |
dd20c376cf60c95e56aa1d6cea8834ff20b8e925 | 607 | package ejb;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import facade.AbstractFacade;
import facade.PartidoMetricaFacade;
import model.PartidoMetrica;
@Stateless
public class PartidoMetricaFacadeEJB extends AbstractFacade<PartidoMetrica> implement... | 22.481481 | 109 | 0.7743 |
10661fefdff3e462f7d8c3159e3ae6e664d118cf | 2,926 | package breadth_first_search;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.LinkedList;
import java.util.Queue;
import java.util.StringTokenizer;
/**
*
* @author minchoba
* 백준 13565번: 침투
*
* @see https://www.acmicpc.net/problem/13565/
*
*/
public class Boj13565 {
private s... | 23.596774 | 78 | 0.580998 |
26eb2bcf82a961d598a9a51838f1681c0fb388b5 | 1,595 | package com.edu.service.classctr;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.fh.dao.DaoSupport;
import com.fh.entity.Page;
import com.fh.util.PageData;
@Service("classattendanceService")
public class ClassAttendanceService {
... | 20.448718 | 86 | 0.698433 |
0974efc5003ed2e25fc0db2e5b7ede3d7df0d6b1 | 471 | package java;
import Servlet.LanguageTranslationServlet;
import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;
public class LangTest{
private LanguageTranslationServlet lang;
@Before
public void initializelangath(){
lang = new LanguageTranslationServlet();
}
... | 20.478261 | 65 | 0.740977 |
67c877699c48c4ac0c35b59dc8cce9e41f47c359 | 1,659 | package nil.ed.livechat.common.enums;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/**
* Created at 2019-12-12
*
* @author lidelin
*/
public enum NginxNotificationType {
/**
* All notification type of nginx_rtmp
*/
PUBLISH("publish", "notify when video is published")... | 28.603448 | 93 | 0.68053 |
ed85f0a296e0b7618a7fa3dced87a1346cb8dd59 | 7,829 | /*
* Copyright 2008-2009 MOSPA(Ministry of Security and Public Administration).
*
* 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
*
... | 28.060932 | 116 | 0.567761 |
d3777434b56d71122e17fc688d20dac6b1828c54 | 2,151 | package com.bluebox.security.authenticationserver.persistence.repository;
import com.bluebox.security.authenticationserver.util.CustomDBUnitExtension;
import com.github.database.rider.core.api.configuration.DBUnit;
import com.github.database.rider.core.api.dataset.DataSet;
import com.github.database.rider.junit5.DBUni... | 39.109091 | 83 | 0.733612 |
0171a88f4a69b6fb5959b8e57da52d05a5be75fa | 2,628 | /*
* Copyright 2010-2012 Amazon 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://aws.amazon.com/apache2.0
*
* This file is distributed on an... | 36.5 | 182 | 0.723744 |
ba387fc215ea4948bb525de5ca7d43092160bf3c | 1,940 | /**
* 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... | 41.276596 | 100 | 0.770619 |
82ac28cd460961a320e051a5954960f6aa327074 | 488 | package org.rioproject.resolver;
import java.net.HttpURLConnection;
import java.net.URL;
class ConnectionCheck {
static boolean connected() {
boolean online = true;
try {
URL url = new URL("http://www.rio-project.org/maven2");
HttpURLConnection connection = (HttpURLConnecti... | 25.684211 | 84 | 0.610656 |
a82f1b7ad8a39a96a0909952c1dfa551ef332c3a | 149 | package envoriment;
public class EnvironmentInfo {
public static boolean isRunningOnCI() {
return System.getenv("CI") != null;
}
}
| 16.555556 | 43 | 0.66443 |
dcaec8452ce9f834b6587099825c6c9772ef891b | 1,185 | package at.meinedomain.CheckIt.Pieces;
import at.meinedomain.CheckIt.Assets;
import at.meinedomain.CheckIt.Board;
import at.meinedomain.CheckIt.Color;
import at.meinedomain.CheckIt.MoveType;
import at.meinedomain.CheckIt.Point;
public class Knight extends AbstractPiece {
public Knight(Board b, Color c, Point pt){
... | 19.112903 | 62 | 0.670042 |
f489b3e61bc25663d6eed85ed15f261dcedb86de | 1,519 | package fr.insee.rmes.model.structures;
import fr.insee.rmes.exceptions.RmesException;
public class ComponentDefinition {
private String id;
private String created;
private String modified;
private String order;
private String[] attachment = new String[0];
private Boolean required = false;
... | 19.986842 | 61 | 0.63002 |
907c14329373a22fb2dd8e8a8d1a488929ef12f2 | 3,647 | package com.example.davinci.adapter;
import android.annotation.SuppressLint;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
i... | 31.439655 | 150 | 0.664656 |
1df47d4695e65a5353f1df9c2401dfe0f0341cbe | 1,175 | package com.hotpot.domain;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import java.util.Optional;
@Slf4j
@AllArgsConstructor
public class ServiceObjectiveEvaluator {
private final ServiceDataSourcePicker serviceDataSourcePicker;
public Optional<ServiceObjectiveResult> runOnService(S... | 28.658537 | 103 | 0.666383 |
27e960d914c13550dee35e73ce28f5252368039d | 816 | public class LongestPalindromicSubstring {
private LongestPalindromicSubstring() {
}
public static String findLongestPalindrome(String string) {
int length = 0;
int beginIndex = 0;
boolean event = string.length() % 2 == 0;
for (int i = 1; i < string.length() - 1; i++) {
... | 31.384615 | 116 | 0.509804 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.