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 |
|---|---|---|---|---|---|
8c01008a9cc4c656b20a18bf0ebcda37e096277c | 3,024 | package io.github.pascalgrimaud.qualitoast.service;
import io.github.pascalgrimaud.qualitoast.domain.Campagne;
import io.github.pascalgrimaud.qualitoast.repository.CampagneRepository;
import io.github.pascalgrimaud.qualitoast.repository.search.CampagneSearchRepository;
import org.slf4j.Logger;
import org.slf4j.LoggerF... | 31.5 | 118 | 0.703042 |
e425297cd4eb37659f123f660e57af47b9af7267 | 79 | package org.firstinspires.ftc.teamcode.Autonomous;
public class BlueRight {
}
| 15.8 | 50 | 0.810127 |
15596c6c803628d3f2df0fc7cd4caa6938e2daf2 | 7,269 | /*
* Copyright 2021. Huawei Technologies Co., Ltd. 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/LICEN... | 34.779904 | 120 | 0.651396 |
51aac54378900d59f5b60bbd3e700ba57086d567 | 4,240 | /*
* Copyright (c) 2010-2021 Allette Systems (Australia)
* http://www.allette.com.au
*
* 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... | 31.879699 | 111 | 0.729245 |
6be77fe96ffe78350c8f3fa2eed909fcaeb4e6ef | 12,202 | /*
* <copyright>
*
* Copyright (c) 1996,97
* Institute for Information Processing and Computer Supported New Media (IICM),
* Graz University of Technology, Austria.
*
* This file is part of the `pw' VRML 2.0 parser.
*
* </copyright>
*/
/*
* ProtoInstance.java - instance of a PROTO node
*
* created: mpichle... | 25.906582 | 101 | 0.558597 |
879e530820d61dcb7c8bec2187652d1f4503ed2a | 4,799 | package net.instant.tools.console_client.jmx;
import java.io.IOException;
import javax.management.AttributeNotFoundException;
import javax.management.InstanceNotFoundException;
import javax.management.MBeanException;
import javax.management.MBeanServerConnection;
import javax.management.MalformedObjectNameException;
i... | 36.633588 | 78 | 0.608043 |
f7ce2730ca5ffd83549d5e5858cc2766935a0380 | 3,363 | /*
* 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 EntityBeans;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import ja... | 27.793388 | 128 | 0.633958 |
9120c18fbc8e8c3e9abbb46466a1ad9f26a2cfef | 2,072 | /*
* 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 exercicio4_28;
/**
*4.28 (Outro problema do else oscilante) Modifique o código dado para produzir a saída mostrada em
* cad... | 31.393939 | 134 | 0.560811 |
b6546b32a24e6b561f46c863982c24c5e2d31a1f | 3,004 | package automaton.vfx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.math.MathUtils;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.core.CardCrawlGame;
import com.megacrit.cardcrawl.core.Settings;
import com.megacrit.cardcrawl.helpers.ScreenShake;
import com.megacrit.... | 44.176471 | 173 | 0.694075 |
c3128c49b26dadab592c463c3508a784c26a3034 | 823 | // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.util.text;
import com.intellij.openapi.extensions.ExtensionPointName;
import com.intellij.openapi.extensions.RequiredElement;
import com.intellij.util.xmlb.a... | 30.481481 | 140 | 0.786148 |
3c9d77ff0be2effed942d64935bf21050f1aa8e1 | 2,266 | package com.github.danielflower.mavenplugins.release;
import org.apache.maven.plugins.annotations.Parameter;
import org.eclipse.jgit.lib.Repository;
import java.util.Collection;
import static java.util.Arrays.asList;
public class VersionNamer {
/**
* <p>
* The delimiter used to append the build numbe... | 31.915493 | 132 | 0.619153 |
825761a7409300ab104c53eec4686e11a4b7dbfe | 1,856 | /**
* 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... | 32 | 78 | 0.738147 |
c89171ae8a529b163e3c3e15d9e5fc27a632cb36 | 955 | package co.uk.jaycarr.lyrically.config;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
public final class GsonConfig implements Config {
private final boolean debug;
private final int interval;
private final boolean quoteWrap;
private final String[] lyrics;
public GsonConfig(Gso... | 24.487179 | 85 | 0.65445 |
d81b8641d35332f007f473bb6157a32923a2626a | 933 | package com.github.highcharts4gwt.generator.model.highsoft;
import javax.annotation.CheckForNull;
public enum ConfigurationType
{
Option
{
@Override
@CheckForNull
public <IN, OUT> OUT accept(ConfigurationTypeVisitor<IN, OUT> visitor, IN in)
{
return visitor.visitOpt... | 21.697674 | 91 | 0.580922 |
e8f521dedb1fac6fc0e3f89b029ee57525f5a459 | 5,971 | package primal.bukkit.world;
import java.util.Iterator;
import org.bukkit.Chunk;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import primal.lang.collection.GList;
/**
* 4x4 ... | 16.403846 | 95 | 0.583989 |
f813f8583dc00c78e77576b5fa13e6375df7914d | 530 | package org.hdmorales.apiservlet.webapp.headers.models.entities;
import jakarta.persistence.*;
@Entity
@Table(name = "categorias")
public class Categoria {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String nombre;
public Long getId() {
return id;
... | 17.096774 | 64 | 0.632075 |
c6197fd9e51280989d6fc39b18c84e6119188dc8 | 9,357 | package com.legend.springbootmybatis.controller;
import com.alibaba.fastjson.JSONObject;
import com.legend.springbootmybatis.domain.City;
import com.legend.springbootmybatis.service.CityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.... | 29.240625 | 97 | 0.582986 |
64f455376a53e5a7f823ecdfd70170d66d83bdd0 | 474 | package org.klepecl.gmap;
import org.junit.Before;
import org.junit.Test;
import static org.hamcrest.MatcherAssert.*;
import static org.hamcrest.Matchers.*;
/**
* Created by luka on 23.5.2016.
*/
public class ImageSizeTest {
private ImageSize size;
@Before
public void setUp() throws Exception {
... | 18.96 | 48 | 0.664557 |
aaf52ce9d980049d2657190d4c9d396adf2d6808 | 334 | package com.ffbit.maven.solr;
import com.ffbit.maven.solr.AbstractSolrMojoExecutionTest;
import java.io.File;
public class SolrMojo_default_ExecutionTest extends
AbstractSolrMojoExecutionTest {
@Override
public File getPom() {
return new File(getBasedir(), "src/test/resources/poms/def/pom.xm... | 20.875 | 77 | 0.733533 |
6a063f539cafe5aab815026147a69352244aaaf8 | 1,389 | package arrays;
/*
Given N array elements count the number of Equilibrium Indexes in the array.
An index is Equilibrium Index if sum of all elements before it and sum of all elements after the index are equals.
Ex: [-7, 1 ,5, 2,-4, 3, 0] Result: Index 3 and 6 are Equilibrium Index with sum equals to -1 and 0 respect... | 34.725 | 115 | 0.537077 |
05a91001f50ce472a29e2c1b9d70b5ebe478beb0 | 2,998 | package com.bence.songbook.api.assembler;
import com.bence.projector.common.dto.SongCollectionDTO;
import com.bence.projector.common.dto.SongCollectionElementDTO;
import com.bence.songbook.ProgressMessage;
import com.bence.songbook.models.SongCollection;
import com.bence.songbook.models.SongCollectionElement;
import ... | 39.973333 | 123 | 0.701468 |
307062f7b80edeb681e8d9751afe71a239e9cc3d | 862 | package one.future2;
import java.util.concurrent.TimeUnit;
/**
* @author chenxinwei
* @date 2021/1/28 18:11
**/
public class Main {
public static void main(String[] args) {
System.out.println("main BEGIN");
Host host = new Host();
Data data1 = host.request(10, 'A');
Data data2 ... | 26.121212 | 60 | 0.574246 |
c9d05752ceb35a29b6c3522e8197dbb6ad58016d | 20,176 | package com.naver.mei.sdk.image.cropper;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Matrix;
import android.graphics.Rect;
import android.graphics.RectF;
import android.net.Uri;
import android.prov... | 38.430476 | 225 | 0.646759 |
8dcd8add173f18df636e3753789e3b2e7ca80f6d | 2,756 | package com.fw.controller.impl;
import static org.springframework.web.bind.annotation.RequestMethod.GET;
import static org.springframework.web.bind.annotation.RequestMethod.PATCH;
import static org.springframework.web.bind.annotation.RequestMethod.DELETE;
import static org.springframework.web.bind.annotation.RequestMe... | 38.277778 | 117 | 0.817852 |
45ae8e2746d78dc809794e936adaa45d06a79c92 | 2,692 | /*
* Copyright 2019 Amazon.com, Inc. 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 applic... | 37.388889 | 111 | 0.71211 |
6d613b4f049dcced1fe401cea05db820b2220aa0 | 1,911 | /*
* 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 ... | 36.056604 | 97 | 0.697017 |
be422b83bbcad7f2664d14184c1aa7ee968c5280 | 3,160 | package com.romaway.common.protocol.tougu;
import android.text.TextUtils;
import com.romaway.common.protocol.AProtocolCoder;
import com.romaway.common.protocol.ProtocolParserException;
import com.romaway.common.protocol.coder.RequestCoder;
import com.romaway.common.protocol.coder.ResponseDecoder;
import com.romaway.c... | 44.507042 | 125 | 0.577532 |
b09e8f9dad7dd51172b193cb6e7a52b2fd10e771 | 1,760 | /*
* Copyright 2014 Sebastiano Poggi and Francesco Pontillo
*
* 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 ... | 32 | 96 | 0.686364 |
bb5f1f04691acddec38f06abcb4340c7d74de29e | 4,349 | package com.github.alex1304.ultimategdbot.dbentities;
import sx.blah.discord.handle.obj.IGuild;
/**
* Database entity for guild settings
*
* @author Alex1304
*/
public class GuildSettings {
private IGuild guildInstance;
private long guildID;
private long roleAwardedLevels;
private long channelAwardedLevels;... | 20.908654 | 109 | 0.723155 |
768e8a4ff91923bd881d319c601b9eb1cd108304 | 7,118 | /*
* Copyright 2013 Google 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 ... | 29.292181 | 96 | 0.652852 |
654684b01973c1071391d284ccbccbc26bdec2e4 | 2,502 | /*
* Copyright (c) 2011, Cloudera, Inc. All Rights Reserved.
*
* Cloudera, Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"). You may not use this file except in
* compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICE... | 29.785714 | 104 | 0.619504 |
fa1b9bb4c41c4807de85832b28a14b9ceae8d047 | 124 | static boolean isAncestor(int ancestor, int node) {
return tin[ancestor] <= tin[node] && tout[ancestor] >= tout[node];
} | 41.333333 | 70 | 0.685484 |
0ad361cd781ce0c361525f973a5beb43a6a9b0ad | 2,762 | /*
* Copyright (c) Numerical Method Inc.
* http://www.numericalmethod.com/
*
* THIS SOFTWARE IS LICENSED, NOT SOLD.
*
* YOU MAY USE THIS SOFTWARE ONLY AS DESCRIBED IN THE LICENSE.
* IF YOU ARE NOT AWARE OF AND/OR DO NOT AGREE TO THE TERMS OF THE LICENSE,
* DO NOT USE THIS SOFTWARE.
*
* THE SOFTWARE IS PROV... | 30.351648 | 168 | 0.653512 |
22f357491fde02c18bb9457f47c4cce701c2fea7 | 433 | package com.github.guang19.jvm;
/**
* @author yangguang
* @date 2020/2/27
* @description <p>常量池测试</p>
*/
public class ConstantPool
{
private final int a = 10;
private static final int B = 12;
private int c = 13;
private final String str1 = "abc";
private static String str2 = "abd";
priva... | 16.653846 | 42 | 0.6097 |
19b5103bff6b2571bc15d532578ce5c62d07676a | 1,636 | package i2.act.lala.ast;
import i2.act.lala.ast.visitors.LanguageSpecificationVisitor;
import i2.act.lala.info.SourceRange;
import i2.act.lala.semantics.symbols.AnnotationSymbol;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public final class ProductionClassDeclaration extends Cla... | 27.266667 | 97 | 0.778117 |
9f9025dfbed59ce869f1863850cfab742f4a32e7 | 2,148 | package org.jeets.dcs;
import java.util.Date;
import org.apache.camel.Handler;
import org.jeets.protobuf.Jeets;
import org.jeets.protobuf.Jeets.AlarmType;
import org.jeets.protobuf.Jeets.Device;
import org.jeets.protobuf.Jeets.Event;
import org.jeets.protobuf.Jeets.EventType;
import org.jeets.protobuf.Jeets.Position;
... | 35.213115 | 100 | 0.744413 |
4879aefe9484170db5b1d7c649bbb4b645fb0601 | 120 | /**
* Contains the exceptions that can be thrown by Coalesce.
*/
package com.incadencecorp.coalesce.common.exceptions; | 30 | 58 | 0.775 |
619e3db4c1564d771e94dcdade0ea0aed748449b | 651 | package com.tmall.xdyuan.pojo;
public class ProductImage {
private int id;
private int pid;
private String type;
private String image;
public void setId(int id) {
this.id = id;
}
public int getId() {
return id;
}
public void setPid(int pid) {
this.pid = p... | 15.878049 | 40 | 0.546851 |
27187cd3319fa0818ea64bfabd2b45f24c4083e3 | 2,213 | package seedu.address.model.colabfolderhistory;
import static java.util.Objects.requireNonNull;
import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;
import java.util.Objects;
import seedu.address.logic.commands.CommandResult;
import seedu.address.model.ReadOnlyColabFolder;
/**
* Encapsulates ... | 30.315068 | 109 | 0.680524 |
ecb67ff9be4bb2dc8f3a87df26122e989fa8e803 | 845 | package EffectiveJava3rd.lSerialization;
//87 考虑使用自定义的序列化形式
public class L87 {
//在没有考虑默认序列化形式是否合适之前,不要接受它。
//如果对象的物理表示与其逻辑内容相同,则默认的序列化形式可能是合适的。
//即使你认为默认的序列化形式是合适的,你通常也必须提供readObject方法来确保不变性和安全性。
//当对象的物理表示与其逻辑数据内容有很大差异时,使用默认的序列化形式有四个缺点:
// 它将导出的API永久地绑定到当前的内部实现。
// 它会占用过多的空间。
// 它会消耗过多的时间... | 32.5 | 82 | 0.788166 |
acdbe89e92b6330e55818ae77df99e11557a156b | 1,112 | /*
* Copyright 2015 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | 34.75 | 108 | 0.722122 |
e36490b05d92386cb6615f60bfd170ae2f42c77a | 10,241 | /*
* Copyright (c) 2018 - 2020 - Werner Elsler, Frank Hossfeld
*
* 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 require... | 43.21097 | 111 | 0.534713 |
494a494d7e7bb64d4dff60ab31ace0d2fa265fb9 | 5,931 | /*
* 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
* distributed u... | 24.508264 | 122 | 0.716574 |
519aba7fccd9fd8e7e6e30006fefa61cdd9e77e1 | 1,778 | package com.baldcat.entity;
import com.baldcat.repository.UserRepository;
import java.sql.Date;
public class BlogComment {
private int CommentID;
private int BlogID;
private int UserID;
private Date DateTime;
private String Content;
public int getCommentID() {
return CommentID;
}... | 20.674419 | 94 | 0.56243 |
2c0afe8d2354affaea2c1fcc6eb904c3b6416799 | 270 | package com.cloud.service;
import org.springframework.web.multipart.MultipartFile;
public interface BaseClient {
public String uploadFile(MultipartFile multipartFile, String userId) throws Exception;
public String deleteFile(String fileUrl) throws Exception;
}
| 22.5 | 87 | 0.818519 |
77876b60fff696dc38b6a28fb1bb83239748c609 | 81 | package com.vgk.vgkmod;
public class VgkServerProxy extends VgkCommonProxy {
}
| 13.5 | 52 | 0.802469 |
d3fa8e0f7fb4a97d586b1ad6c969446cd8ca720c | 10,109 | package com.gx.morgan.customviewgroup.fragment;
import android.content.Context;
import android.graphics.Color;
import android.os.Bundle;
import android.support.annotation.ColorInt;
import android.support.annotation.ColorRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import ... | 40.115079 | 120 | 0.67979 |
a29e343f5f16b5967820b35f5a2b56b884f8d4c9 | 2,165 | package com.desmond.foreigntrade.company.controller;
import com.desmond.foreigntrade.entity.User;
import com.desmond.foreigntrade.service.CategoryService;
import com.desmond.foreigntrade.service.UserService;
import com.desmond.foreigntrade.vo.CategoryVO;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4... | 38.660714 | 382 | 0.747344 |
0b288b2beb8c4041599cd8b27e51c63129ce2f09 | 984 | /** ----------------------------------------------------------------------------
*
* --- HF- Application Development ---
* Copyright (c) 2014, ... All Rights Reserved
*
*
* Project : dac
*
* File : ModelBase.java
*
* Author(s) : hf
*
* Created ... | 21.391304 | 80 | 0.472561 |
a005dd74aac2cb49f352e6987b984c67e95bbbe3 | 264 | package BehavioralPatterns.GoF.Strategy;
public class Airplane extends Vehicle {
public Airplane() {
transportType = new AirTransport();
}
@Override
public void showMe() {
System.out.println("I'm a plane, watch me fly");
}
}
| 18.857143 | 56 | 0.640152 |
88e5f985daf46500c5e330aa34bd0b10b3be0ac0 | 1,391 | package com.github.sovaalexandr.corner_nodes;
import java.util.StringJoiner;
/**
* {@see https://practice.geeksforgeeks.org/problems/leftmost-and-rightmost-nodes-of-binary-tree/1}
*/
public class Search
{
public String cornerNodes(Edge[] edges) {
Node root = null;
for (Edge edge: edges) {
... | 31.613636 | 101 | 0.500359 |
ee9f62c0cb1d03a646e36903a0995b9000e1ceae | 670 | package org.enricogiurin.codingchallenges.sof;
public class SimpleClass<T> {
private final Class<T> clazz;
SimpleClass(Class<T> clazz) {
this.clazz = clazz;
}
public T getObject() throws IllegalAccessException, InstantiationException {
// Should return a new object based on the class ... | 31.904762 | 98 | 0.7 |
36390c567efc680b4b421573395fb1ffbfe88d35 | 824 | package com.cremaconsulting.simpleorganiser.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.time.LocalDateTime;
@Entity
public class Comment {
@Id
@GeneratedValue(strategy= GenerationType.AUTO)
... | 19.162791 | 55 | 0.671117 |
0ea4756108a1705a0b366d6788f03f78c77a0db0 | 5,367 | package com.amazonaws.services.neptune.io;
import com.amazonaws.services.neptune.profiles.neptune_ml.JsonFromResource;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ArrayNode;
import org.junit.Test;
import java.io.IOException;
import java.util.*;
import static org.junit.A... | 39.755556 | 120 | 0.705981 |
bcbcdf2779c95d6fe0ce721e64f537912cdc7288 | 1,848 | package com.zendesk.maxwell.schema.columndef;
import com.zendesk.maxwell.producer.MaxwellOutputConfig;
import java.math.BigInteger;
import java.util.Objects;
public class BigIntColumnDef extends ColumnDef {
static private final BigInteger longlong_max = BigInteger.ONE.shiftLeft(64);
private boolean signed;
priv... | 25.666667 | 95 | 0.704004 |
934673a174a78fcc7e28efb4c91505d7ec83f46f | 2,839 | package org.podcastpedia.core.userinteraction;
import org.podcastpedia.core.suggestpodcast.SuggestedPodcast;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.Date;
public class UserInteractionServiceImpl implements UserInteractionService {
@Autowired
private UserInteractionDao userI... | 28.676768 | 75 | 0.751673 |
ddf95d03d9de33b49a63a2154f6ba8954ca5e702 | 12,295 | package org.apache.jsp.admin;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.solr.core.SolrCore;
import org.apache.solr.schema.IndexSchema;
import java.io.BufferedReader;
import java.io.File;
import java.io.FilenameFilter;
import java.io.FileReader;
import java.net.I... | 33.051075 | 142 | 0.552176 |
83c7f1386e1b98ae44aee84ebea00b6770439ac7 | 1,085 | // DP solution O(n) time and O(1) space.
// Taken from here:
// https://discuss.leetcode.com/topic/4417/possibly-simplest-solution-with-o-n-time-complexity
class Solution {
public int maxProduct(int[] nums) {
// store the result that is the max we have found so far
int r = nums[0];
// imax/imin stores th... | 33.90625 | 94 | 0.62212 |
bb63ef27d3feaf2042e356def04705c187aca4cc | 185 | package cn.lemonit.tencent_cloud_im_server_sdk.model.group;
/**
* 群组 ID 数据
*/
public class RespQueryAllGroup_GroupIdData {
/**
* 群组 ID
*/
private String GroupId;
}
| 15.416667 | 59 | 0.664865 |
72ff0a4cb0d76a8830f1f543611281c3dfa75866 | 1,827 | /*
* The Gemma project
*
* Copyright (c) 2011 University of British Columbia
*
* 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 ... | 37.285714 | 118 | 0.756979 |
4d49902d4dbe2001fc8512527b44071d034aaaf8 | 5,946 | package de.gsi.dataset.spi;
import java.util.ArrayDeque;
import de.gsi.dataset.DataSet;
import de.gsi.dataset.DataSet2D;
import de.gsi.dataset.event.AddedDataEvent;
/**
* TODO: Change to ErrorDataSet and calculate standard deviation.
*
* @author braeun
*/
public class AveragingDataSet extends AbstractDataSet<Av... | 27.527778 | 120 | 0.546922 |
ba29bc3a2688ecce22e377df00c7ca985b61c801 | 1,063 | package com.example.heartrateapp;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ProgressBar;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity implements View.OnClickListener {
... | 25.309524 | 85 | 0.680151 |
186ad8a02e95633325e91b642af2389c596d1cd0 | 3,141 |
package org.mulesoft.schema.mule.core;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
/**
* <p>Java class for dataReferenceType comp... | 22.119718 | 112 | 0.558103 |
c2fcfb1a0a759d1a0b1134f1f63900db11e9e964 | 791 | package dk.kb.tvsubtitleocr.lib.postprocessing;
import java.util.List;
public class FrameSubtitle {
private int startTime;
private int endTime;
List<String> text;
public FrameSubtitle(int startTime, int endTime, List<String> text) {
this.startTime = startTime;
this.endTime = endTime;
... | 20.282051 | 73 | 0.616941 |
76b7ff657d60446c26b1f3d46d49c20cab11424d | 2,354 | package com.acme.extorderapp.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRootName;
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonRootName(value = "d")
public class SalesOrder {
private Stri... | 25.868132 | 107 | 0.77825 |
5ecc6d917a612bc0575fa581e13d46c7c03e6614 | 7,024 | package test_locally.app_backend.interactive_messages.payload;
import com.github.seratch.jslack.app_backend.interactive_messages.payload.BlockActionPayload;
import com.github.seratch.jslack.common.json.GsonFactory;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatch... | 42.829268 | 129 | 0.404043 |
a51db075ae17478ba9cfe9300722eaab53b3f628 | 5,899 | package hellogbye.com.hellogbyeandroid.adapters.flights;
import android.content.Context;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v7.widget.CardView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import ... | 35.969512 | 124 | 0.718257 |
a967e7a11e455d197e20feb430d718c9b2262856 | 377 | package me.SaberAspect.SpectClient.client.module.modules.bot;
import org.lwjgl.input.Keyboard;
import me.SaberAspect.SpectClient.client.module.Category;
import me.SaberAspect.SpectClient.client.module.Module;
public class OffHandBot extends Module {
public OffHandBot() {
super("offHandBot", "A bot that manages ... | 25.133333 | 92 | 0.785146 |
99f08fa725c885f8e9dc1eb9b072304367e9b071 | 1,200 | package com.vulcan.flightlogger.logger;
public class LogEntry {
double mLat;
double mLon;
float mAlt;
float mSpeed;
double mGpsAlt;
public LogEntry()
{
this.mLat = 0;
this.mLon = 0;
this.mAlt = 0; // need to know the difference between true 0 and no response.
this.mSpeed = 0;
this.mGpsAlt = 0;
}... | 21.428571 | 94 | 0.669167 |
acb686d7be893b9213eef851386fec73193d89e8 | 362 | package interop;
public class CustomerJava {
public String customerName;
public CustomerJava(String customerName) {
this.customerName = customerName;
}
public void printCustomerName() {
System.out.println(customerName);
}
public static void main(String... args) {
Syst... | 18.1 | 46 | 0.657459 |
d1f03d90811b93bdb6c2a7f690950f684002709d | 11,588 | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: AntMessage.proto
package com.github.mxsm.serialization.protobuf;
public final class AntMessage {
private AntMessage() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static... | 66.217143 | 184 | 0.771143 |
7c5f70edb92ef0787c20be7fff2238e875cc547a | 2,228 | package es.urjc.code.pricing.handler;
import java.io.IOException;
import org.mvel2.CompileException;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.ann... | 32.289855 | 68 | 0.664273 |
9c459b73026a483f9a332eb0f87f348bfebe480c | 4,243 | // 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... | 48.770115 | 135 | 0.719302 |
04d9b84ee0542c401819024aa3d34809c7cd1c4f | 873 | package com.icepoint.framework.sample.module.sample.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.icepoint.framework.data.domain.LongStdEntity;
import lombok.*;
import lombok.... | 24.25 | 61 | 0.768614 |
65fd37b37c69b21192d1de8cafd3a4d71b28abce | 2,587 | package dialogs;
import android.app.Dialog;
import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.view.View;
import android.widget.TextView;
import com.softcsoftware.aio.R;
import view_holder.Views;
@SuppressWarnings("UnusedDeclaration")
public c... | 32.746835 | 92 | 0.537688 |
bbc6b0eb7bdaeb915e9a7a22214c2eac47d02110 | 8,393 | package com.duzzi.mywanandroid.ui.activity;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.NavigationView;
import android.support.design.widget.Snackbar;
import android.support.v4.app.Fragment;
import ... | 34.117886 | 93 | 0.657929 |
5e94ff4fc5e48aa1bf033577dc4d2ff67d8035e8 | 10,123 | package il.co.hebrewnlp.morphology;
import java.io.Serializable;
import java.util.Collection;
import org.json.JSONArray;
import org.json.JSONObject;
import il.co.hebrewnlp.HebrewNLP;
import il.co.hebrewnlp.HttpUtils;
public class HebrewMorphology {
public static final String MORPH_NORMALIZE_ENDPOINT = "/service/... | 48.204762 | 197 | 0.707399 |
f57df88076c9a7f613728b587b429561dfe36ce9 | 19,616 | package ru.progrm_jarvis.ultimatemessenger.format.placeholder;
import lombok.AccessLevel;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
import lombok.experimental.FieldDefaults;
import org.jetbrains.annotations.NotNull;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.params.Parameteri... | 52.449198 | 116 | 0.507749 |
aa989d926a414eabdf7d97ebe7b46189c7519c4f | 644 | package id.rojak.auth.application.command;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Date;
/**
* Created by inagi on 8/3/17.
*/
public class CreatePermissionCommand {
@JsonProperty("name")
private String name;
@JsonProperty("description")
private String description;
... | 18.4 | 69 | 0.67236 |
6b8b1e27cb64a1c837b77d2fe0def562a17ebd19 | 2,988 | package org.jmock.integration.junit4;
import org.jmock.auto.internal.Mockomatic;
import org.jmock.internal.AllDeclaredFields;
import org.junit.rules.MethodRule;
import org.junit.runners.model.FrameworkMethod;
import org.junit.runners.model.Statement;
import java.lang.reflect.Field;
import java.util.List;
import stat... | 36.439024 | 97 | 0.598059 |
3e7184e37fff5dc812a7181481e0b96f841de168 | 1,809 | // ========================================================================
// Copyright 2006-2013 NEXCOM Systems
// ------------------------------------------------------------------------
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the Lice... | 34.788462 | 103 | 0.522388 |
bab6d71f53076ea3a03cce17c2a739e71e0490f5 | 898 | package com.hoserdude.samples.boot.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class SuchA... | 30.965517 | 73 | 0.741648 |
4a80e56d578761118656dd9105f9eef0c5bc91c6 | 1,605 | package org.togglz.microprofile.repository;
import java.util.Arrays;
import org.eclipse.microprofile.config.Config;
import org.eclipse.microprofile.config.ConfigProvider;
import org.togglz.core.Feature;
import org.togglz.core.repository.FeatureState;
import org.togglz.core.repository.StateRepository;
/**
... | 33.4375 | 107 | 0.670405 |
89c9da9ecda45a5ac884b872724d8d079ae945da | 842 | //ry
/**
* Definition for a binary tree node.
* public class TreeNode {
* int val;
* TreeNode left;
* TreeNode right;
* TreeNode(int x) { val = x; }
* }
*/
class Solution {
public TreeNode invertTree(TreeNode root) {
if(root == null) return null;
Queue<TreeNode> queue = new ... | 26.3125 | 59 | 0.541568 |
c11c0a26c3d260dd214d8f36617aa0fc71fb4c18 | 670 | package com.liuhll.hl.auth.client.conf;
import com.liuhll.hl.auth.client.interceptor.OnlyUserHlAuthRestIntterceptor;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.context.annotation.Bean;
//@Configuration
public class HlOnlyUserAuthConfiguration {
@Bean
... | 24.814815 | 76 | 0.753731 |
9f250e22b3577beb2434b9a2cfd9fd9220f3c0ed | 3,308 | package com.swql.myapp.pageobjects;
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.How;
import org.openqa.selenium.support.ui.Select;
import org.testng.Asse... | 41.873418 | 202 | 0.70526 |
a66bdf71e87d02406bdadf5c88e4aa9dce26027a | 495 | package com.globant.line_up_tracker;
import android.os.Bundle;
import com.crashlytics.android.Crashlytics;
import io.fabric.sdk.android.Fabric;
import io.flutter.app.FlutterActivity;
import io.flutter.plugins.GeneratedPluginRegistrant;
public class MainActivity extends FlutterActivity {
@Override
protected void o... | 29.117647 | 54 | 0.806061 |
b8d9bd592b16dd0f65bbecc4765bedb00ce90a51 | 929 | package com.minlia.module.bible.v2.entity;
import static com.minlia.module.bible.v2.entity.BibleField.ENTITY_NAME;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.minlia.module.data.entity.AbstractEntity;
import javax.persistence.Entity;
import j... | 23.225 | 71 | 0.809473 |
6c26bfc91b679fc23f25d6e0a69575af09488ba6 | 2,828 | package com.sequenceiq.freeipa.api.v1.kerberos;
import static com.sequenceiq.freeipa.api.v1.kerberos.doc.KerberosConfigNotes.KERBEROS_CONFIG_NOTES;
import static com.sequenceiq.freeipa.api.v1.kerberos.doc.KerberosConfigOperationDescription.CREATE_FOR_ENVIRONMENT;
import static com.sequenceiq.freeipa.api.v1.kerberos.do... | 50.5 | 158 | 0.817539 |
56781e952f1debad1f9c9a8ac79ac18105c57cee | 4,460 | /*
* Muspellheim Commons FX
* Copyright (c) 2019 Falko Schumann
*/
package de.muspellheim.commons.fx.chart;
import static org.junit.jupiter.api.Assertions.assertAll;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupi... | 32.554745 | 99 | 0.653812 |
9404967e3068a0692f4980027a818887e27247d7 | 721 | package example.simple.springboot.ddd.libraries.utils;
/**
* @author chenweichuan
*/
public class UniqueIdUtil {
final private static Integer ID_SUFFIX_MIN_NUM = 100;
final private static Integer ID_SUFFIX_MAX_NUM = 999;
private static Integer idSuffixNum = 100;
public static Long generateDigitalId(... | 30.041667 | 104 | 0.675451 |
d9492f56b3f4ac7c1a15280683bf413271df50a8 | 14,730 | /*
* Copyright 2020 LinkedIn 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 i... | 37.480916 | 103 | 0.681806 |
5de98e395dccc9676c9695ead67c57db0a820236 | 758 | //using array
class Main6_1 {
public static int kthbig(int[] arr, int k) {
int size = arr.length;
int[] rank = new int[size]; // rank[i] : arr의 원소들 중 arr[i] 보다 큰 수의 갯수
for (int i = 0; i < size; i++) {
int n_largerthan_me = 0; // arr[i] 보다 큰 수의 갯수
for (int j = 0; j < size; j++... | 29.153846 | 76 | 0.472296 |
0a20541315314209a7b5a94779efe47ee1bcb376 | 1,831 | /*
* Groovy Bot - The core component of the Groovy Discord music bot
*
* Copyright (C) 2018 Oskar Lang & Michael Rittmeister & Sergej Herdt & Yannick Seeger & Justus Kliem & Leon Kappes
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License... | 39.804348 | 174 | 0.737848 |
18a15bf9e6ea7aca0f3162c83fcd7e287daea3f3 | 681 | package exception;
import java.util.*;
class LoginException extends Exception {
LoginException(String msg) {
super(msg);
}
}
public class ExceptionTest53 {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("input username");
String uname = s... | 21.28125 | 62 | 0.653451 |
65570b9f8824e50cd376a48ca83e5e4dc3d519f3 | 1,366 | package cn.jzy.seckill.service;
import java.util.List;
import cn.jzy.pojo.TbSeckillOrder;
import entity.PageResult;
/**
* 服务层接口
* @author Administrator
*
*/
public interface SeckillOrderService {
/**
* 返回全部列表
* @return
*/
public List<TbSeckillOrder> findAll();
/**
* 返回分页列表
* @return
*/
public ... | 15.522727 | 84 | 0.647145 |
0d422edf4fdaacf007ad8c5f920cb4653129dcca | 14,205 | package org.robolectric.shadows;
import static android.os.Build.VERSION_CODES.LOLLIPOP;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
import static org.robolectric.Shadows.shadowOf;
impo... | 38.391892 | 100 | 0.740444 |
439fc4d848bff9acfd0347f3b133b0ca517573fb | 11,856 | /*
* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.o... | 46.494118 | 120 | 0.655955 |
f7a60dc21ce87687be977a1d8779596d3048921d | 7,708 | /*
* The MIT License (MIT)
*
* Copyright (c) 2015 doe300
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy,... | 25.189542 | 149 | 0.706798 |
693b09b7d53158b96d7a719b5ffc016a5e593c83 | 1,224 | package com.sly.demo.thinkinjava.chapter10.parcel11;
import com.sly.demo.thinkinjava.chapter10.parcel4.Contents;
import com.sly.demo.thinkinjava.chapter10.parcel4.Destination;
/**
*
* @author sly
* @time 2019年5月31日
*/
public class Parcel11 {
private static class ParcelContents implements Contents {
private in... | 18 | 66 | 0.694444 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.