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 |
|---|---|---|---|---|---|
130aad9b1bbdde8c7456bd95149552cb675f1559 | 1,191 | package org.apache.hadoop.chukwa.extraction.demux.processor;
import java.io.IOException;
import org.apache.hadoop.chukwa.extraction.engine.ChukwaRecord;
import org.apache.hadoop.chukwa.extraction.engine.ChukwaRecordKey;
import org.apache.hadoop.mapred.OutputCollector;
import org.apache.hadoop.mapred.Reporter;
public... | 35.029412 | 94 | 0.72628 |
be25ae5c3997ae29aa49b06d6c300267de754462 | 751 | /*
* 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 Chapter5;
import java.util.Scanner;
/**
*
* @author User
*/
public class DoWhile2 {
public static void main(String[] ... | 24.225806 | 79 | 0.568575 |
90121fc90b6366241208b68eba7ed30bf2e71014 | 630 | package com.genesys.purecloud.response;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
public class PutRecordsResponse {
@JsonProperty("FailedRecordCount")
private int failedRecordCount;
@JsonProperty("Records")
private List<PutRecordResponse> records;
public int g... | 24.230769 | 85 | 0.739683 |
b457553021943a51fe4d555235593d937bf8c260 | 709 | package hr.fer.zemris.java.tecaj_14.utility;
/**
* Contains a static method which is used to "clean" the user input.
*/
public class HTTPSupport {
/**
* Same functionality as 'escapeForHTMLBody'.
*/
public static String escapeForTagAttribute(String text) {
return escapeForHTMLBody(text);
}
/**
* Esca... | 22.870968 | 68 | 0.655853 |
6be8f23b4348d08007d761c330a38f5db332b421 | 8,059 | /**
* Ionic Deeplinks Plugin.
* License: MIT
*
* Thanks to Eddy Verbruggen and nordnet for the great custom URl scheme and
* unviversal links plugins this plugin was inspired by.
*
* https://github.com/EddyVerbruggen/Custom-URL-scheme
* https://github.com/nordnet/cordova-universal-links-plugin
*/
package io.io... | 30.296992 | 138 | 0.668321 |
7129369746be62a4262ab2033e590d4b01332d5d | 5,123 | package me.xudaojie.loadmore;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import java.util.List;
/**
* Created by xdj on 2016/12/14.
* 利用适配器实现的上拉加载
*/
public abstract class LoadMoreAdap... | 24.748792 | 107 | 0.580519 |
bd336ab293ef0f5d807879994d4f326de8ee4c24 | 8,930 | /**
* Copyright 2005-2015 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... | 29.569536 | 140 | 0.708623 |
505a44cb44df8069d7ddd8cca7e69578036a3654 | 14,049 | package com.example.mosei.control;
import android.content.DialogInterface;
import android.graphics.Color;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.v7.app.AlertDialog;
import android.util.Log;
import android.view.View;
import android.widget.ArrayAdapter;
imp... | 37.068602 | 112 | 0.574988 |
6e6c67344d4cab1239548d72099774bd2008090f | 6,093 | package vizceral.hystrix;
import rx.schedulers.Schedulers;
import rx.subjects.ReplaySubject;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import jav... | 37.380368 | 207 | 0.645495 |
347a60f9ea61b7f44e086e93de23d207e55425ca | 6,530 | /*-
* ============LICENSE_START=======================================================
* SDC
* ================================================================================
* Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
* ===================================================================... | 39.575758 | 119 | 0.643645 |
3861a57ca676477d8c246fe8b82ea2e4267f595b | 1,015 | package test;
import main.Util;
import main.algorithms.sort.InsertionSort;
import org.junit.Assert;
import org.junit.Test;
public class InsertionSortTest {
final int[] sortedData = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
@Test
public void sortWorstCase() {
int[] data = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1... | 26.025641 | 64 | 0.60197 |
40e7d64fe89689f0d3175cec1ba24542636499ee | 5,689 | /**
* Employee.java
*
* Version 1.0
*
* Mar 07, 2022
*
* Apache-2.0 License
*/
package bankingapp;
import java.util.Scanner;
import bankingexceptions.*;
/**
* The Employee Class provides data and menus specific to bank employee users. Employees
* can view any customer's personal data, and approve or d... | 22.486166 | 93 | 0.620144 |
91415a0c58739da219d7a3948a9784dcdfd8dc20 | 1,245 | package codecarver.chapter2.cyclicBarrier;
import java.util.concurrent.CyclicBarrier;
/**
* @ClassName demo3
* @Description TODO
* @Author lenovo
* @Date 2019/1/30 16:20
**/
public class CyclicBarrierDemo {
// 自定义工作线程
private static class Worker extends Thread {
private CyclicBarrier cyclicBarrie... | 27.065217 | 82 | 0.563052 |
c58010c03d9e861f15e59c807a6bc300d39b0a4b | 2,239 | /**
* 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... | 43.901961 | 165 | 0.757928 |
41f8cadb6e530eab531726331516781d203fad38 | 887 | package com.example;
import java.util.concurrent.TimeUnit;
import com.example.lottery.service.LotteryService;
import com.example.lottery.service.business.FastRandomNumberService;
import com.example.lottery.service.business.StandardLotteryService;
public class AsyncLotteryApplication {
public static void main(Strin... | 35.48 | 91 | 0.704622 |
05b1593af874dee9161b9445448460bca9c291b7 | 2,163 | package com.juyss.bean;
public class Tablespaces {
private String tablespaceName;
private String engine;
private String tablespaceType;
private String logfileGroupName;
private Long extentSize;
private Long autoextendSize;
private Long maximumSize;
private Long nodegroupId;
... | 23.258065 | 93 | 0.669441 |
a357945a8fdb5255145d5ec2e3f32dcbb9dca466 | 738 | package br.com.ti4b.dao;
import br.com.ti4b.modelo.Veterinario;
import br.com.ti4b.util.ConexaoUtil;
import javax.persistence.EntityManager;
public class VeterinarioDAO extends DAOGenerico<Veterinario> {
public boolean deletar(String crmv) {
EntityManager manager = ConexaoUtil.getEntityManager()... | 29.52 | 77 | 0.619241 |
3239013e96ff20eafc65da6c45b9145cf4f9e546 | 3,480 | package fi.csc.chipster.tools.ngs;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.LinkedList;
import fi.csc.chipster.tools.model.Exon;
import fi.csc.chipster.tools.model.Gene;
import ... | 26.976744 | 186 | 0.634195 |
c2a1c8b96f4a89bbf2f890bd54ea0f4d480d165a | 4,227 | package com.gamealoon.database.daos;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import play.data.DynamicForm;
import com.gamealoon.database.GloonDAO;
import com.gamealoon.database.interfaces.AchievementInterface;
import com... | 29.767606 | 120 | 0.7445 |
34b15b8f726ef5fb6d230b6f66df67cace074436 | 2,923 | /**
* Copyright © 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
*/
package com.thinkgem.jeesite.modules.sys.entity;
import org.hibernate.validator.constraints.Length;
import com.thinkgem.jeesite.common.persistence.DataEntity;
/**
* 定时任务Entity
* @author 大胖老师
* @ver... | 23.959016 | 108 | 0.723572 |
4bc6ac3b75f2e0beaa9f0c84374874bb97e688ab | 649 | /**
*
*/
package util;
import com.sun.jna.platform.win32.Advapi32Util;
import com.sun.jna.platform.win32.WinReg;
/**
* @author subhro
*
*/
public class RegUtil {
public static String regGetStr(WinReg.HKEY hkey, String key,
String value) {
try {
return Advapi32Util.registryGetStringValue... | 19.666667 | 75 | 0.647149 |
059a799891c23eac01678f3067b650bf6f27a420 | 4,801 | package blackjacktest;
import org.junit.jupiter.api.Test;
import java.util.Arrays;
import static org.junit.jupiter.api.Assertions.*;
class GameTest {
@Test
void shuffleDeck() {
String[] startingDeck = {"C2", "C3", "C4", "C5", "C6", "C7", "C8", "C9", "C10", "CJ", "CQ", "CK", "CA",
"D2... | 33.110345 | 111 | 0.547594 |
6f31196e5432cc4d65a3ef530f9f497f4d697b55 | 1,878 | package org.zstack.core.progress;
import org.zstack.header.core.progress.TaskProgressRange;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Consumer;
/**
* Created by MaJin on 2019/10/15.
*/
public class ParallelTaskStage {
private final Map<Integer, Integer> subTas... | 36.115385 | 128 | 0.683174 |
e7e63d4f9480fdbc563da4c3852669e790f8dda3 | 2,507 | package com.samyak.listeners;
import com.samyak.Home;
import com.samyak.UploadThread;
import com.samyak.components.ErrorMsgDisplay;
import com.samyak.components.UploadVideoDialog;
import javax.swing.*;
import javax.swing.filechooser.FileFilter;
import javax.swing.filechooser.FileNameExtensionFilter;
import java.awt.*... | 37.41791 | 141 | 0.646191 |
600afc283c76cbd658ff0aaec3b236d270a394ee | 454 | package org.infinispan.server.infinispan.spi.service;
import org.jboss.msc.service.ServiceName;
/**
* Enumeration of service name factories for services associated with a counter.
*
* @author Vladimir Blagojevic
*/
public class CounterServiceName {
public static ServiceName getServiceName(String container, S... | 26.705882 | 103 | 0.781938 |
2e4b68eb1caa3027e5ead801236d8b7e8d2abf63 | 1,927 | package cn.ibaijia.tfb.http;
import cn.ibaijia.tfb.Consts;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
public class HttpRequestEntity extends HttpEntity {
public ByteBuffer bodyBuffer = null;
public boolean chunked = false;
public int contentLeng... | 22.670588 | 68 | 0.59782 |
26d33d4d9bfd327fe14898978140857b12cdbd92 | 8,416 | /*
* Copyright 2006-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | 36.751092 | 137 | 0.659696 |
f54642bfb65f6cecf7bbee6063805e3da917dd64 | 940 | package com.billybyte.marketdata;
import java.math.BigDecimal;
import com.billybyte.marketdata.SecEnums.SecCurrency;
import com.billybyte.marketdata.SecEnums.SecExchange;
import com.billybyte.marketdata.SecEnums.SecSymbolType;
public interface SecDef {
public String getShortName();
public String getSy... | 29.375 | 56 | 0.724468 |
27aac0efeb21e585875d6449d27a3ad893c30399 | 1,213 | package com.luoyu.easyexcel.util;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
/**
* @Description:
* @Author: jinhaoxun
* @Date: 2020/4/14 下午5:26
* @Version: 1.0.0
*/
public class DataConvertUtil {
/**
* @Author: jinh... | 25.808511 | 89 | 0.638087 |
b4ca92fb4cf01aaff51967e1253ed496239d797d | 1,206 | package com.elex.oa.entity;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
/**
*@author hugo.zhao
*@since 2018/4/8 16:54
*/
public class ActProcessDef {
private String processDefId;
private String processKey;
private String processName;
private Map<String, ActNodeDef> n... | 21.535714 | 63 | 0.66335 |
8d8990bba9dc8700beaa4faadfa142e07722f5bd | 4,695 | /* */ package org.apache.oozie.example;
/* */
/* */ import java.util.Calendar;
/* */ import java.util.Date;
/* */ import java.util.TimeZone;
/* */
/* */ public class Repeatable
/* */ {
/* */ private String name;
/* */ private Date baseline;
/* */ private TimeZone time... | 34.777778 | 114 | 0.512034 |
4b2ef5828dc821d5c152c734c56c74183811d345 | 254 | package com.twu.biblioteca;
public class Librarian extends User {
public Librarian(String libraryNumber, String password, String name, String emailid, String phoneNumber) {
super(libraryNumber, password, name, emailid, phoneNumber);
}
}
| 31.75 | 110 | 0.748031 |
0cfa31572caef5ba3d6badc16ec9738c984cba9b | 1,425 | package com.emu.apps.qcm.rest.mappers;
import com.emu.apps.qcm.domain.mappers.*;
import com.emu.apps.qcm.rest.controllers.secured.resources.AccountResource;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
i... | 30.978261 | 99 | 0.774035 |
40d023cbb3e8e47c61616ebf8400b8f2c3cd4cc0 | 16,949 | /*
* 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 ... | 85.170854 | 150 | 0.72193 |
31619bb4d8bfe8c0faa0056ceab4387bac01c70e | 1,185 | /**
* Copyright (c) 2012 Edgar Espina
*
* This file is part of Handlebars.java.
*
* 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
*
... | 24.183673 | 75 | 0.706329 |
5e07f79aacf9d03471052469df707b5d9f0ce041 | 1,864 | /**
* Copyright 2015-现在 广州市领课网络科技有限公司
*/
package com.roncoo.education.web.boss.service.dao.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import com.roncoo.education.util.base.Page;
import com.roncoo.education.util.base.... | 31.59322 | 113 | 0.800429 |
c2ab1bb457f8800168f49d915dbd3541a312e046 | 3,664 | package io.resys.hdes.client.spi.decision.ast;
/*-
* #%L
* hdes-client-api
* %%
* Copyright (C) 2020 - 2021 Copyright 2020 ReSys 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... | 42.604651 | 180 | 0.72762 |
d574a9a1dfcd768ee9021a131850c8f0a0701ba0 | 7,712 | package com.carrotgarden.maven.flatten;
import static org.codehaus.plexus.util.StringUtils.isEmpty;
import java.io.File;
import java.io.StringReader;
import java.io.StringWriter;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.u... | 33.098712 | 103 | 0.739108 |
416dc758c8fb3dd6d7341d73bbefe685d47d0e74 | 2,272 | package cz.metacentrum.perun.spRegistration.rest.controllers.common;
import cz.metacentrum.perun.spRegistration.persistence.configs.AppConfig;
import cz.metacentrum.perun.spRegistration.persistence.exceptions.ConnectorException;
import cz.metacentrum.perun.spRegistration.persistence.models.User;
import cz.metacentrum.... | 31.555556 | 85 | 0.761884 |
a627513bf148437ebf4d3aa215712e0534caf35b | 4,031 | package core2.chapter06b.demo1;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
import java.nio.channels.ServerSocketChannel;
import java.nio.channels.SocketChannel;
import java.util.Iterator;
import ja... | 37.324074 | 102 | 0.553709 |
38edcf086214235829f1875526dad8be05c5f57f | 2,917 | package com.caih.cloud.iscs.charge.scoket;
import com.caih.cloud.iscs.charge.scoket.Util.HexUtil;
import com.caih.cloud.iscs.charge.scoket.Util.MianCore;
import com.caih.cloud.iscs.charge.scoket.Util.SessionUtil;
import org.apache.mina.core.buffer.IoBuffer;
import org.apache.mina.core.service.IoHandlerAdapter;
import ... | 30.385417 | 131 | 0.682893 |
00591452eb61451e68ae707b0ccf145550a0ecc1 | 388 | package me.ajlane.geo.repast.succession.pathway.coded;
import me.ajlane.geo.repast.succession.pathway.EnvrConsequent;
public class CodedEnvrConsequent extends EnvrConsequent<Integer, Integer> {
private static final long serialVersionUID = 8000285165547623493L;
public CodedEnvrConsequent(Integer targetState, Inte... | 32.333333 | 75 | 0.81701 |
53b7cdc4356f337d7bc31cbaf616cfa937552489 | 4,062 | /*
* 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 ... | 35.321739 | 85 | 0.760955 |
1b519037de6715ba13c9ed2ec705b10159716f59 | 110 | //package com.shilpasayura;
abstract class Animal{
//abstract method
public abstract void sound();
}
| 15.714286 | 33 | 0.709091 |
396a44e62b3360b0dae0351fd3f368d0a2de1bd3 | 97 | /**
* the package that contains tracker classes.
*/
package tr.com.infumia.infumialib.tracker;
| 19.4 | 45 | 0.742268 |
045eebefa5eee1349dfdb4c671b0203921417718 | 74 | package ru.otus.services;
public interface TestService {
void test();
}
| 12.333333 | 30 | 0.743243 |
cfa35ff27eff8def508c03727d0673e078e5808f | 1,702 | /*
* 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... | 30.945455 | 87 | 0.66275 |
377cc38bf06775ae578530e26ebe55c859e23b90 | 5,409 | package ch.frostnova.module1.web;
import ch.frostnova.common.service.scope.TaskScope;
import ch.frostnova.module1.api.model.Note;
import ch.frostnova.module1.web.client.NoteClient;
import ch.frostnova.spring.boot.platform.model.UserInfo;
import ch.frostnova.spring.boot.platform.service.TokenAuthenticator;
import jaka... | 34.018868 | 127 | 0.668885 |
70b33d5a9d6995135d0b302cdeafc1a821d183a5 | 2,175 | package com.codeborne.selenide.impl;
import org.apache.commons.io.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.net.URL;
import java.util.Iterator;
import java.util.Map;
import java.util.ServiceLoader;
import java.util.concurrent.ConcurrentHashMap;
import s... | 31.521739 | 114 | 0.693333 |
ccb6e8cb452704405a12fdcef10292469aa9b195 | 500 | /*******************************************************************************
* Copyright (C) Philipp Seelos - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
* Written by Philipp Seelos <seelos@outlook.com>, December 2017
******... | 41.666667 | 81 | 0.51 |
22d4fa81b2a9063c4562a76e92dfd25da3291e41 | 112 | package yyl.example.design_pattern.structural.decorator;
public interface Beverage {
String getName();
}
| 18.666667 | 57 | 0.767857 |
da3c0bc0c51ec2248aa31f07a4474e40382618c8 | 2,391 | import java.util.Deque;
import java.util.LinkedList;
/**
* 给你一个整数数组 nums ,数组中共有 n 个整数。132 模式的子序列 由三个整数 nums[i]、nums[j] 和 nums[k] 组成,并同时满足:i < j < k 和 nums[i] < nums[k] < nums[j] 。
* <p>
* 如果 nums 中存在 132 模式的子序列 ,返回 true ;否则,返回 false 。
* <p>
* <p>
* <p>
* 进阶:很容易想到时间复杂度为 O(n^2) 的解决方案,你可以设计一个时间复杂度为 O(n logn) 或 O(n... | 27.802326 | 162 | 0.557089 |
20204ad0043f06c33acc38c8574d01b393cb46d4 | 2,434 | /*
The Java-program Matrix below first asks the user for the number of rows and
columns in a matrix. After this the program asks for the values of the elements.
Finally, program prints the elements of the matrix and their sum on screen.
When printing the matrix, values on the same row are separated using tabulator.
E... | 28.302326 | 102 | 0.556697 |
8946de4c1e74cb0edadef5c93cc752e5e25cf308 | 1,042 | package es.ujaen.rlc00008.transactions_library;
import com.google.gson.Gson;
import com.google.gson.JsonParseException;
import java.io.UnsupportedEncodingException;
/**
* Created by Ricardo on 23/6/16.
*/
public class NFCTransactionUtils {
private static final String ENCODING = "UTF-8";
public static byte[] se... | 29.771429 | 83 | 0.757198 |
85bd94c8b1918b9068f9fb2f06259bdc54d1da39 | 1,634 | /*
* 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"); yo... | 35.521739 | 76 | 0.69339 |
5aae89a0ad4f93ed5e3a49df14479f3efa0d9d87 | 261 | package com.test;
class Student
{
public Student(String name, int mark, String grade)
{
this.name = name;
this.mark = mark;
this.grade = grade;
}
private String name;
private int mark;
private String grade;
} | 16.3125 | 56 | 0.590038 |
c6147995c79ca1610bd70e9d2d5fc60ab4ec8db5 | 953 | /*
* Copyright 2021. Santanu Sinha
*
* 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 w... | 25.756757 | 103 | 0.729276 |
f6553ab3a98f8f8f9d073648c0884c064d9e0cab | 1,227 | /*
* Copyright 1999-2019 Seata.io Group.
*
* 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 l... | 23.596154 | 76 | 0.617767 |
d011d6ab3806ab39645fb6ccc99f628c48396e0e | 819 | package org.jessenpan.leetcode.array;
/**
* @author jessenpan
* tag:
*/
public class S1014BestSightseeingPair {
public int maxScoreSightseeingPair(int[] a) {
int len = a.length;
int[] lefts = new int[len], rights = new int[len];
//TODO 前连个for 可以合并
for (int i = 0; i < len; i++) {... | 23.4 | 59 | 0.416361 |
1ad8980408aa45052cc5500b3178c11382b6ddc7 | 5,653 | /*
* 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 com.rmsoft.controller;
import com.rmsoft.constant.VistaConstant;
import com.rmsoft.model.ReservacionModel;
import com.rmsoft.m... | 35.778481 | 128 | 0.667256 |
b4467f387d451ee7a8beacb77692a024a915936a | 1,725 | package com.space.cornerstone.framework.core.util;
import cn.hutool.core.util.EscapeUtil;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
/**
* @author chen qi
* @version 1.0.... | 32.54717 | 117 | 0.609855 |
7cb99ba499b2ac8f79e1265ec25444541c6c90c6 | 7,743 | package com.jd.o2o.db4o.core;
import java.util.Comparator;
import com.db4o.ObjectContainer;
import com.db4o.ObjectSet;
import com.db4o.config.Configuration;
import com.db4o.ext.DatabaseClosedException;
import com.db4o.ext.DatabaseReadOnlyException;
import com.db4o.ext.Db4oDatabase;
import com.db4o.ext.Db4oIOException... | 26.517123 | 99 | 0.752422 |
b63a95db2d2db9c85a31ee9adfe26515459990ed | 2,346 | package dk.treecreate.api.discount.dto;
import dk.treecreate.api.discount.DiscountType;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;... | 22.342857 | 91 | 0.653026 |
f8297d746568bb3319179019322f4a4993fe0832 | 8,588 | package me.elmira.stayfocused.today;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
... | 33.416342 | 143 | 0.700047 |
3e3cea6107fb23d3de0e20a78fb1a913faf5cf00 | 5,248 | package szszhospital.cn.com.mobilenurse.utils;
import android.graphics.Bitmap;
import android.util.Log;
import com.blankj.utilcode.util.ImageUtils;
import org.dcm4che3.android.Raster;
import org.dcm4che3.android.RasterUtil;
import org.dcm4che3.android.imageio.dicom.DicomImageReader;
import org.dcm4che3.data.Attribut... | 37.485714 | 94 | 0.564405 |
ba54500cb5ecee227e29d6d835f23a7ac40b8a7b | 2,177 | /**
* Copyright (C) 2016 - 2030 youtongluan.
*
* 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 applicab... | 25.022989 | 76 | 0.651814 |
612645471da1babc50d3858a9c601b26a64eae4f | 1,739 | package br.com.zupacademy.mateus.mercadolivre.compra.gateway.pagseguro;
import javax.validation.constraints.NotBlank;
import br.com.zupacademy.mateus.mercadolivre.compra.Compra;
import br.com.zupacademy.mateus.mercadolivre.compra.gateway.GatewayRetornoRequest;
import br.com.zupacademy.mateus.mercadolivre.compra.pagam... | 29.982759 | 125 | 0.779183 |
cc1753f8dea88133abe1eaed18791b9a8d44f8e0 | 389 | package hw;
import java.util.Scanner;
//讓使用者輸入一正整數n,計算1/(12)+1/(34)+1/(56)+…+1/[(2n1)(2n)]並輸出結果
public class hw04 {
public static void main(String[] args) {
Scanner scn = new Scanner(System.in);
System.out.println("請輸入一整數");
int n = scn.nextInt();
float a = 0;
for (float i = 1; i <= n; i++) {
a += (1... | 18.52381 | 57 | 0.560411 |
13f976e21fc42d3af5917a7253b5f9c0e2878d1e | 4,281 | /*
* Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package sun.font;
import java.awt.Font;
import java.awt.geom.AffineTransform;
import java.awt.geom.Gen... | 28.925676 | 83 | 0.653586 |
07918979965daba6593f4cb550a81b8bfeccc9ea | 2,867 | /*
* The MIT License
*
* Copyright 2015 Andy Law (s1578554@sms.ed.ac.uk)
*
* 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
... | 34.130952 | 80 | 0.688873 |
ef64e685812bfaa7480f6ebf3630603a5ae5cb9a | 517 | package seedu.address.logic.parser.itinerary.eventview.edit;
import seedu.address.logic.commands.itinerary.events.edit.DoneEditEventCommand;
import seedu.address.logic.parser.Parser;
import seedu.address.logic.parser.exceptions.ParseException;
/**
* Parser for {@link DoneEditEventCommand}
*/
public class DoneEditEv... | 32.3125 | 79 | 0.796905 |
7de85a8885e6e34f231ee42c859343ebae9bafdd | 2,594 | /**
* Copyright 2010 Hewlett-Packard. All rights reserved. <br>
* HP Confidential. Use is subject to license terms.
*/
package com.hp.security.jauth.core.service;
import java.util.List;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotat... | 31.253012 | 97 | 0.721665 |
30af6a6db18785b11981728135acb247d42acc7a | 605 | package pl.marcinchwedczuk.xox.game;
public class ScoredMove {
public final Move move;
public final double score;
public Object debugInfo = "No debug info provided.";
public ScoredMove(Move move, double score) {
this.move = move;
this.score = score;
}
public ScoredMove max(Sc... | 23.269231 | 56 | 0.642975 |
f6c5bc211d093618164705fb1cb8479e68bc01fc | 3,769 | /* ###
* IP: GHIDRA
*
* 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 writin... | 27.510949 | 97 | 0.715044 |
4034aa4e82ffb2b6279947b0b9a3f25fae67e6ec | 7,025 | /**
* Copyright (C) 2006-2017 Talend Inc. - www.talend.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 by appli... | 46.217105 | 130 | 0.58306 |
ee82e51352029727e778608c437443a664ed76dc | 25,019 | /*******************************************************************************
* Copyright (c) 2012 Secure Software Engineering Group at EC SPRIDE.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this... | 36.577485 | 114 | 0.74971 |
decf211dd18f2f4bab67e5083dfa14833aa18009 | 3,001 | package igrad.logic.commands.requirement;
//@@author yjskrs
import static igrad.logic.commands.CommandTestUtil.assertCommandFailure;
import static igrad.logic.commands.requirement.RequirementCommand.MESSAGE_REQUIREMENT_NON_EXISTENT;
import static igrad.logic.commands.requirement.RequirementCommandTestUtil.VALID_REQ_C... | 44.791045 | 107 | 0.807398 |
f7a522b68b13a6f91bc4f49649e240fde3f34625 | 6,084 | /**
* The MIT License
* Copyright (c) 2018 Estonian Information System Authority (RIA),
* Nordic Institute for Interoperability Solutions (NIIS), Population Register Centre (VRK)
* Copyright (c) 2015-2017 Estonian Information System Authority (RIA), Population Register Centre (VRK)
*
* Permission is hereby grante... | 37.097561 | 120 | 0.664037 |
789c00ca0674f50e7c8ca59217b954effc327880 | 9,078 | /*
* Copyright 2016 Red Hat, Inc. and/or 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 by a... | 31.964789 | 114 | 0.623816 |
5879364bea8a37c69f469ad06718f61dc69b0398 | 730 | package servlets;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
//i powrót do formularza z efektem przekierowania
@WebSe... | 22.8125 | 97 | 0.773973 |
718f44b2cc3ae85540310e5344cf2d94a8769068 | 3,724 | package code.aha.lottery.draw;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
/**
*
* @author aha
*/
public class DefaultDrawManager implements DrawManager
{
privat... | 28.868217 | 119 | 0.574114 |
d083b925cffdc0f17d2dad276dcb6480029a4a39 | 949 | package com.windea.study.springmvc.main.domain;
import java.io.Serializable;
import java.util.Date;
/**
* 用户类
* <br>属性名要与数据库表字段相对应。
*/
public class User implements Serializable {
private static final long serialVersionUID = 3459374343484731365L;
protected Integer id;
protected String username;
protected Date ... | 16.084746 | 67 | 0.711275 |
b7e40d1a87827b6473c6973df6cc538a1ae2dc72 | 251 | package com.baeldung.spring.cloud.archaius.jdbconfig.jdbc;
import javax.persistence.Entity;
import javax.persistence.Id;
@Entity
public class Properties {
@Id
private String key;
@SuppressWarnings("unused")
private String value;
}
| 16.733333 | 58 | 0.74502 |
18eee7cdc6cf85705d74e2250ea2ed7d4f260be4 | 1,143 | /*
* 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 conversores;
/**
*
* @author Matias
*/
public class Temperatura {
public double valor; //En Kelvin
public Tempera... | 23.326531 | 84 | 0.47769 |
43151be2c320d8a567a1b6bff83124a121874ffc | 553 | package w8;
public class InvertirArreglo {
public static int[] invertir(int[] a) {
int[] newArr = new int[a.length];
int x = 0;
for (int i = a.length - 1; i >= 0; i--) {
newArr[x] = a[i];
x++;
}
return newArr;
}
public static void imprimir(i... | 22.12 | 49 | 0.399638 |
93cefe4552f3898edede89f0defcc7d2daeda783 | 10,466 | package com.thinkjoy.admin.controller.manage;
import com.baidu.unbiz.fluentvalidator.ComplexResult;
import com.baidu.unbiz.fluentvalidator.FluentValidator;
import com.baidu.unbiz.fluentvalidator.ResultCollectors;
import com.thinkjoy.common.base.BaseController;
import com.thinkjoy.common.validator.ContainBlankValidator;... | 46.309735 | 248 | 0.70065 |
8637ffe868ddcaccb41cc71ab95b92e97603100f | 1,643 | package org.vatplanner.archiver.local;
import static org.assertj.core.api.Assertions.assertThat;
import java.util.stream.Stream;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
import org.junit.jupiter.param... | 35.717391 | 113 | 0.727937 |
f5bc076437bf333479d028ee31ddea344ccd1243 | 1,003 | package se.hertzole.playerregions.runnables;
import org.bukkit.Location;
import org.bukkit.Particle;
import org.bukkit.entity.Player;
import java.util.HashMap;
import java.util.List;
public class PreviewRunnable implements Runnable {
private HashMap<Player, List<Location>> previews;
public PreviewRunnable(... | 25.075 | 75 | 0.633101 |
2981327d944b5078477c6f82e5de7542d53ecfae | 1,313 | package se.purplescout.pong.competition.server;
import javafx.application.Platform;
import javafx.fxml.FXML;
import javafx.scene.control.ScrollPane;
import se.purplescout.pong.competition.headless.AutoFight;
import se.purplescout.pong.competition.headless.AutoFightHandler;
import se.purplescout.pong.competition.server... | 29.840909 | 88 | 0.738005 |
87202db5dbf7ffda78e3791210f79cfde07e99d6 | 1,558 | package org.functionalrefactoring;
import org.functionalrefactoring.models.*;
import java.math.BigDecimal;
public class App {
public static void applyDiscount(CartId cartId, Storage<Cart> storage) {
Cart cart = loadCart(cartId);
if (cart != Cart.MissingCart) {
DiscountRule rule = look... | 34.622222 | 106 | 0.6457 |
67f4a8e7246f43d980eeebbac882d3977187a9b4 | 279 | package org.rxjava.service.goods.form;
import lombok.Data;
import java.util.List;
/**
* @author happy 2019-03-23 00:21
*/
@Data
public class GoodsListForm {
/**
* 类目Id
*/
private String categoryId;
/**
* 品牌Id
*/
private String brandId;
}
| 13.285714 | 38 | 0.602151 |
5ab7c8334753eec37f8e28c000872e039fbe3200 | 1,389 | package com.kandy.tissot.dubbo.spi;
import com.alibaba.dubbo.config.ApplicationConfig;
import com.alibaba.dubbo.config.ProtocolConfig;
import com.alibaba.dubbo.config.ReferenceConfig;
import com.alibaba.dubbo.config.RegistryConfig;
import com.kandy.tissot.dubbo.DubboConfigBuilder;
import org.springframework.beans.fact... | 28.9375 | 68 | 0.794816 |
708468e8e1107b3ec499784b419f053bcd5aca10 | 1,194 | package br.com.centralit.citcorpore.bean;
import java.sql.Date;
import br.com.citframework.dto.IDto;
/**
* @author thiago.monteiro
*/
public class OrigemOcorrenciaDTO implements IDto {
private static final long serialVersionUID = 9050009857127616153L;
private Integer idOrigemOcorrencia;
private String nome;
... | 15.92 | 67 | 0.685092 |
1a7ed3191251cb5653aba8b4c29d05919e7534b8 | 849 | package org.webcurator.core.visualization.modification.service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.webcurator.core.visualization.modification.metadata.ModifyApplyCommand;
import org.webcurator.core.visualization.modification.metadata.ModifyResult;
import org.webcurator.core.visualizati... | 40.428571 | 94 | 0.846879 |
061a35e614e1647309d4d22cac30c128c8e95a77 | 62,194 | /*
*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... | 37.241916 | 849 | 0.787134 |
81c055d2b63a4e9b5e7d7ea8fc98df4889fc0471 | 747 | /*
* 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 ejercicio2;
/**
*
* @author Beltrán
*/
public abstract class OperacionBinaria implements Expresion{
Expresion HijoIzqui... | 23.34375 | 79 | 0.682731 |
69d523b34b7df81c2d304b7ff80dd67146fd548f | 342 | /*
* Copyright (c) AirBolt Pty Ltd - All Rights Reserved.
*/
package com.karl.template.model.json;
/**
* Created by Karl Gao on 27/1/17.
*/
public class mMessage {
String message;
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.messa... | 14.869565 | 55 | 0.619883 |
8753bd007a245c1ca87417766d4b54d5a78e8423 | 1,345 | package frodez.service.user.facade;
import frodez.config.aop.validation.annotation.Check;
import frodez.config.swagger.annotation.Success;
import frodez.config.swagger.annotation.Success.Container;
import frodez.constant.annotations.decoration.Page;
import frodez.dao.model.table.user.Role;
import frodez.dao.param.user... | 20.692308 | 64 | 0.728625 |
cb3a35dd0a4d6ead5f8e1da9387e8123c1a2c95a | 382 | package com.qiwenge.android.act;
import android.os.Bundle;
import com.qiwenge.android.base.BaseActivity;
import com.qiwenge.android.fragments.LegalFragment;
public class LegalActivity extends BaseActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceS... | 21.222222 | 56 | 0.759162 |
3df2b52fbf40a12cddfc3196a514618be1d55819 | 8,915 | package org.notima.generic.businessobjects;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import io.github.threetenjaxb.core.LocalDa... | 21.585956 | 110 | 0.697027 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.