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 |
|---|---|---|---|---|---|
ecdc0d66e105d15fe1eeb622f3aa6046fe3f513f | 1,220 | package common.controllers;
import io.sphere.sdk.models.Base;
public final class SunrisePageData extends Base implements PageData {
private PageHeader header;
private PageFooter footer;
private PageContent content;
private PageMeta meta;
public SunrisePageData() {
}
public SunrisePageDat... | 21.403509 | 126 | 0.641803 |
268f963a5168348e9889d17e79469d9daded2c38 | 8,058 | /*
* Copyright (c) 2017 Stephan D. Cote' - All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the MIT License which accompanies this distribution, and is
* available at http://creativecommons.org/licenses/MIT/
*
* Contributors:
* Stephan D. ... | 39.307317 | 135 | 0.670017 |
884ee9a13881d950358696714b224916667ce95d | 758 | package com.fast.ilumer.gank.model;
/**
* Created by ${ilumer} on 2/2/17.
*/
public class SearchRepo {
private String showItem;
private int tag;
private String Uri;
public SearchRepo(String showItem, int tag, String uri) {
this.showItem = showItem;
this.tag = tag;
this.Uri =... | 16.844444 | 61 | 0.564644 |
657a65934d3259646e736bff4462ed320576c70d | 2,086 | /*
* Created on Mar 7, 2005
*/
package compiler.analizer;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
import compiler.constants.Words;
import compiler.exception.AnalizerException;
/**
*
*/
public class ForAnalizer extends BlockAnalizer {
/**
... | 23.704545 | 96 | 0.563279 |
df7d57cd5f506b29bc8e6f6a915a1bcc375eaf41 | 352 | import java.util.Scanner;
class PowerOfCryptography {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n;
double p;
while (in.hasNextInt()) {
n = in.nextInt();
p = in.nextDouble();
System.out.println((int) Math.round(Math.pow(Math.E, Math.log(p) / n)))... | 18.526316 | 76 | 0.59375 |
b54e9dfe6ad984e2d7f07ab777ab941c607f6e92 | 1,369 | package com.mynamaneet.dolmodloader.file_classes;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
public class TweeFile {
public TweeFile (File _filePath, String _name, String _parent){
this.filePath = _filePath;
this.name = _name;
this.parent = _parent;
}
p... | 24.017544 | 88 | 0.633309 |
d092376bf3bca85ad3a2262881e83163843539b3 | 332 | package test.call_graph.implement;
/**
* @author adrninistrator
* @date 2021/8/10
* @description:
*/
public class ImplClassL2_1 extends AbstractClassL2 {
@Override
public void f1() {
System.out.println("");
}
@Override
public void f2() {
System.getProperty("");... | 16.6 | 53 | 0.575301 |
2218d2feb166e4f1754c1279308372d1cb60d956 | 1,367 | package io.appform.databuilderframework.cmplxscenariotest.builders;
import io.appform.databuilderframework.annotations.DataBuilderInfo;
import io.appform.databuilderframework.cmplxscenariotest.ThreadUtils;
import io.appform.databuilderframework.cmplxscenariotest.data.DataA;
import io.appform.databuilderframework.cmplx... | 42.71875 | 75 | 0.822238 |
7881ece10fd7302ae4e94a12fcf78b741fd8d508 | 286 | //API Credentials
//Create at https://dashboard.veridu.com
public class Settings {
// API Key (from https://dashboard.veridu.com/api)
public static final String CLIENT = "";
// API Secret (from https://dashboard.veridu.com/api)
public static final String SECRET = "";
}
| 31.777778 | 57 | 0.688811 |
8bedcfa2a74f86832d4658da2bb16d348041af1a | 6,385 | /*
* Copyright 2018 Nikita Shakarun
*
* 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... | 38.233533 | 208 | 0.753015 |
9493c5eb48791734e50ca1be87e05300a25a1144 | 1,579 | package travel_agency.users;
import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;
public class ClientTest {
private Client client;
private Address address;
private final double EPSILON=0.01;
@Before
public void setUp(){
address= new Address("Via Roma", 12, 23600);
client=new ... | 20.506494 | 108 | 0.699177 |
9b8a8e2563436ca902f0fd03983032db23c92a13 | 77 | package com.example.administrator.lphfirst;
public class DEl {
// 333个
}
| 12.833333 | 43 | 0.727273 |
6cf0172d903e260de2219f05ca9833ce73526b15 | 873 | package org.example.config;
import org.example.properties.DemoProperties;
import org.example.service.DemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfig... | 30.103448 | 87 | 0.783505 |
ea861f75494371859394f8d7b9e2c224aa03f86b | 1,045 | package cn.chuanwise.xiaoming.language;
import cn.chuanwise.toolkit.preservable.Preservable;
import cn.chuanwise.util.MapUtil;
import cn.chuanwise.xiaoming.language.sentence.Sentence;
import cn.chuanwise.xiaoming.object.PluginObject;
import java.io.File;
import java.util.Map;
import java.util.Optional;
/**
* 小明的提示文... | 30.735294 | 94 | 0.750239 |
25764e8fa8983e9969fdee884d93343d3cc3233e | 10,100 | /*
* Original author: Daniel Jaschob <djaschob .at. uw.edu>
*
* Copyright 2018 University of Washington - Seattle, WA
*
* 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
*
* ... | 32.899023 | 178 | 0.716436 |
30f2a81e478e11c04e9b8327d189eeae80781300 | 1,486 | package main;
import com.andrewmagid.gui.ParentWindow;
import processing.core.PApplet;
import java.util.ArrayList;
import java.util.Map;
import java.util.Random;
public class Helper {
public static ArrayList<Integer> unsortedArr = new ArrayList<>();
public static Random r = new Random();
public static Ar... | 27.518519 | 85 | 0.682369 |
6b8d33febfa0251f2f63d239df147713a2bf6edf | 760 | package com.springdataapi.model.jpa;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Transient;
@Entity
public class Entidade {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Lo... | 17.272727 | 52 | 0.751316 |
602e68854f74f36549321602bd3ca1812a081ad6 | 158 | package getta.gettaroo;
public class Constants {
public static final String MOD_ID = "gettaroo";
public static final int INVENTORY_ROW_SLOTS = 9;
}
| 19.75 | 52 | 0.740506 |
a7b70d1c2d26c168830b20986bbb6f628066dbe3 | 5,761 | package WeightLearner;
import org.ejml.data.SingularMatrixException;
import org.ejml.simple.SimpleMatrix;
import java.util.*;
public class LARS {
/**
* r,u,w都是列向量,即列数(column)为 1
*/
static SimpleMatrix r;
static SimpleMatrix u;
static SimpleMatrix w;
static SimpleMatrix X;
// public L... | 33.888235 | 96 | 0.540184 |
43c4637489fe86400f257fbce67867f51eb1bb00 | 1,243 | /*
* Apache License 2.0 见 LICENSE 文档
*
* https://github.com/srctar/bconfig-client
*/
package com.qyp.raft.hook;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
/**
* 用于集中管理系统里面的待销毁对象。
*
* @author yupeng.qin
* @since 2017-07-04
*/
public class DestroyAdaptor {
private fin... | 23.018519 | 72 | 0.558327 |
c2ee54cd9b29a83f5c8897e5586cb77929324458 | 2,811 | package xyz.jpenilla.wanderingtrades.command;
import cloud.commandframework.Command;
import cloud.commandframework.meta.CommandMeta;
import com.google.common.collect.ImmutableList;
import java.util.stream.Stream;
import org.bukkit.command.CommandSender;
import xyz.jpenilla.jmplib.Chat;
import xyz.jpenilla.wanderingtra... | 50.196429 | 238 | 0.647101 |
dbf13612f3bc5c65bf42fed45c84f3c684d45c91 | 1,993 | /*
* Copyright 2020 Justified Solutions
* SPDX-License-Identifier: Apache-2.0
*/
package com.justifiedsolutions.justpdf.pdf.doc;
import com.justifiedsolutions.justpdf.pdf.object.PDFIndirectObject;
import com.justifiedsolutions.justpdf.pdf.object.PDFInteger;
import com.justifiedsolutions.justpdf.pdf.object.PDFNull;... | 36.236364 | 99 | 0.723532 |
c686a223b2240f16ff0883c40ac7ecfece0fd829 | 240,751 | /**
* JacobGen generated file --- do not edit
*
* (http://www.sourceforge.net/projects/jacob-project */
package com.jacobgen.microsoft.msword;
import com.jacob.com.*;
public class _Application extends Dispatch {
public static final String componentName = "Word._Application";
public _Application() {
super(com... | 48.587487 | 564 | 0.761675 |
8a5de3635029490363ad497043b11edf511be1c1 | 510 | package com.zy.simpleORM;
import java.util.List;
import java.util.Map;
//数据库操作的接口,常用的增删改查,以及按照条件来查询
public interface GenericDAO<T> {
public void save(T t) throws Exception; //增加数据
public void delete(Object id, Class<T> clazz) throws Exception; //删除数据
public void update(T t) throws Exception; //更新数据
pub... | 28.333333 | 121 | 0.733333 |
1f89787141d19069cbe16e93801e976d7c18bf6d | 26,581 | package io.dashbase.parser;
import com.google.common.collect.Lists;
import io.dashbase.exception.ParserException;
import io.dashbase.lexer.QueryLexer;
import io.dashbase.lexer.token.ItemType;
import io.dashbase.lexer.token.TokenItem;
import lombok.NonNull;
import io.dashbase.parser.ast.Expr;
import io.dashbase.parser.... | 31.871703 | 142 | 0.499944 |
12dcc2c12f0e95a81769fcf313aac67e31b05609 | 407 | package com.ibm.streamsx.sample.weather;
public class Reading {
private Station station;
public Reading(double temp, Station station) {
this.station = station;
this.temp = temp;
}
double temp;
double getTemp(){
return temp;
}
public Station getStation() {
return station;
}
@Override
public String ... | 16.958333 | 68 | 0.68059 |
f45db217a32fb288ee34dd28c67ccf0bf84df8e0 | 458 | package com.bplow.netconn.query.dao;
import java.sql.SQLException;
import java.util.List;
/**
*
*/
import com.bplow.netconn.query.dao.entity.Ad;
public interface AdDao {
public void insertAd(Ad ad)throws SQLException;
public Ad queryAd(int id)throws SQLException;
public List queryAdList... | 18.32 | 52 | 0.713974 |
85de39c254c8fa13b70012ce48cb2471f595fdb7 | 3,234 | /*
* Copyright (c) 2016—2017 Andrei Tomashpolskiy and individual contributors.
*
* 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
*
* ... | 34.404255 | 123 | 0.636673 |
25d5e8884e9bee763a1463447d4dbadd167e8aa2 | 7,087 | package com.github.sendgrid;
import org.json.JSONException;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import java.io.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
import static org.junit.matchers.JUnitMatchers.hasItems;
public class SendGrid... | 29.777311 | 155 | 0.626358 |
4ab2ddb443c94754080cd5a7d3f5fd70dbadb8f1 | 3,328 | /*
* Copyright (c) 2019, Oracle and/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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless... | 36.173913 | 82 | 0.633113 |
30db5fe06598c7030b1df41fd2181adba6907738 | 1,121 | import java.util.ArrayList;
import java.util.List;
public class S1380LuckyNumbersMatrix {
public List<Integer> luckyNumbers (int[][] matrix) {
int M = matrix.length, N = matrix[0].length;
int[] min = new int[M];
for (int r = 0; r < M; r++) {
int m = Integer.MAX_VALUE;
... | 29.5 | 56 | 0.354148 |
90a9717e45003ecb0d72930ab05d04b311884187 | 11,150 | /*
* CPAchecker is a tool for configurable software verification.
* This file is part of CPAchecker.
*
* Copyright (C) 2007-2014 Dirk Beyer
* 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... | 33.383234 | 100 | 0.704753 |
6214103aa9287c22eff6f01c400728f648f94fbd | 6,364 | /**
*/
package org.openecomp.dcae.controller.inventory.impl;
import java.util.Collection;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEO... | 28.538117 | 207 | 0.713388 |
30e968c4810248de00fe1f1973456fc17ce83742 | 5,177 | /*
* Copyright 2020 Netflix, 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.823077 | 99 | 0.761831 |
0255a28c0065b01971623d4dae2f3fb69e3730bd | 325 | package com.liang;
/**
* Created by GBLiang on 9/22/2017.
*/
public class RNAlarmConstants {
public final static String REACT_NATIVE_ALARM = "REACT_NATIVE_ALARM";
public final static String REACT_NATIVE_ALARM_TITLE = "title";
public final static String REACT_NATIVE_ALARM_MUSIC_URI = "musicUri";... | 27.083333 | 74 | 0.729231 |
7b7af91d8eb07884751be3ae8a89b73c8c63aae9 | 11,208 | /*
* Copyright 2021 The University of Manchester
*
* 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 ... | 30.048257 | 140 | 0.613936 |
617653afcbc1cc7e882292c04c8051d9e75ef007 | 4,387 | /*
* 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... | 34.273438 | 97 | 0.715523 |
556ae42113efa78ac3c45f50ade79d29dd4bfed5 | 759 | package eu.nubomedia.af.kurento.net;
import org.vertx.java.core.json.JsonObject;
import eu.nubomedia.af.kurento.SessionHandler;
public interface NetworkService {
void createSession(String action, String sessionId, String from, String to, String content, String contentType, SessionHandler handler);
void acceptS... | 36.142857 | 137 | 0.810277 |
056ed715808ba369332cbb63de6474fda91cb33f | 9,983 | /*
ScoreBoard
Copyright © 2020 Adam Poole
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, modify, merge, publish, distri... | 39.14902 | 139 | 0.731544 |
f389f7f1e03260b3515e97700cb6148f73097e5d | 7,196 |
package generated.zcsclient.mail;
import java.util.ArrayList;
import java.util.List;
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 generated.zcsclient.zm.testAttributeNam... | 22.990415 | 107 | 0.533769 |
c1c499ba98563570abdb0388c8f890441660f670 | 3,353 | /*
Copyright 2014 BarD Software s.r.o
Copyright 2010-2013 GanttProject Team
This file is part of GanttProject, an opensource project management tool.
GanttProject is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation,... | 39.447059 | 127 | 0.716672 |
73e2c1c8b22e18e46055ad753134b68311e50163 | 2,921 | package entities;
import javax.persistence.*;
import java.util.Collection;
/**
* Created by Alexandre on 09/05/2016.
*/
@Entity
@Table(name = "parties", schema = "credit_mut", catalog = "")
public class PartiesEntity {
private int id;
private byte isPublic;
private String name;
private TournamentsEn... | 26.080357 | 96 | 0.64875 |
c8a40115bcd01eac44312c2917eb8cd16d71fe7d | 314 | package kernbeisser.CustomComponents.ObjectTable.Adjustors;
import javax.swing.table.DefaultTableCellRenderer;
public interface TableCellAdjustor<V> {
void customizeFor(
DefaultTableCellRenderer component,
V v,
boolean isSelected,
boolean hasFocus,
int row,
int column);
}
| 20.933333 | 59 | 0.732484 |
0a1f1ba1f3cb6e55f71c755134c4d78b3896b23d | 1,031 | import java.util.Vector;
import jbotsim.Clock;
import jbotsim.Link;
import jbotsim.Node;
import jbotsim.Topology;
import jbotsim.ui.JViewer;
public class RingMain {
public static void main(String args[]){
int nbNodes=30;
if(args.length < 1) System.out.println("Usage: RingMain <size-of-the-ring>");
else nbNode... | 26.435897 | 79 | 0.658584 |
fcf4c9a662a98dd02544382fbe0f1acdd455ba22 | 14,450 | /*
* Copyright 2020 Zhenjie Yan.
*
* 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... | 36.306533 | 114 | 0.597716 |
2958a635ca1c9f0f85bc349b2ecd32f84b89eefe | 3,671 | package GUI.controllers;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.Node;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.ChoiceBox;
i... | 33.372727 | 118 | 0.65459 |
8efebda578e38fdeaa50a52b93b275377bb1d871 | 14,062 | package org.smyld.gui.panels;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.ComponentOrientation;
import java.awt.FlowLayout;
import java.awt.GradientPaint;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.aw... | 29.234927 | 107 | 0.723795 |
23e12ef76fcc2e1a1a20adc7fc6baeb62beeb3bb | 8,539 | package edu.emmerson.camel3.cdi.eh;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.metrics.routepolicy.MetricsRoutePolicy;
import edu.emmerson.camel3.cdi.eh.routes.CallHttpBackendHttpRoute;
import edu.emmerson.camel3.cdi.eh.routes.CallHttpBackendUndertowRoute;
import edu.emmerson.cam... | 58.889655 | 178 | 0.728423 |
14579a3d1de051288717ede2c2961c564f558f17 | 15,894 | /* Woodstox XML processor
*
* Copyright (c) 2004 Tatu Saloranta, tatu.saloranta@iki.fi
*
* Licensed under the License specified in file LICENSE, included with
* the source code.
* You may not use this file except in compliance with the License.
*
* Unless required by applicable law or agreed to in writing, soft... | 37.663507 | 102 | 0.461935 |
905173088336b020743dffe49ce749dbb9c93212 | 801 | package uk.co.idv.context.entities.context.sequence;
import uk.co.idv.method.entities.eligibility.Ineligible;
import java.util.Collection;
public class SequenceIneligible extends Ineligible {
public SequenceIneligible(Collection<String> methodNames) {
super(toReason(methodNames));
}
private sta... | 29.666667 | 96 | 0.700375 |
7fc23d6671ca7c55d1d9ea7f86169b5dec2b4628 | 1,835 | package ag.algorithms.leetcode.solutions.strings;
import java.util.HashMap;
import java.util.Stack;
public class ValidParentheses {
public boolean isValid(String parenthesesList) {
if (parenthesesList == null || parenthesesList.isEmpty()) {
return false;
}
Stack<Character> st... | 27.80303 | 92 | 0.487193 |
ccc2a1622ca081bdfc967fb63a0cb4dfa4ae7b68 | 1,071 | package de.codecentric.jenkins.dashboard.api.environments;
import java.util.Date;
import com.amazonaws.services.ec2.model.InstanceState;
public class EnvironmentDetails {
private String version;
private String uri;
private String upTime;
private Date buildTime;
private String env;
private InstanceSta... | 14.671233 | 58 | 0.706816 |
103077ba244f925c2664774ebd94336fb0250497 | 1,511 | /*
* Copyright 2021 VMware, 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in... | 34.340909 | 121 | 0.735275 |
0d3dfd1f2698ecad4169663a158c50604b382f09 | 7,162 | /*
* 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 ... | 30.87069 | 117 | 0.583217 |
ee621d634cf83afede8637a17b4626159f902fd8 | 1,597 | /*
* Copyright (C) 2014-2021 Philip Helger (www.helger.com)
* philip[at]helger[dot]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/LICEN... | 32.591837 | 87 | 0.756418 |
8df58daae2014d9b197881444dc2898fe19b7f0c | 479 | package com.biemo.cloud.bbs.modular.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @date : 2020-09-01 9:31
* @description :
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.R... | 17.107143 | 47 | 0.676409 |
1fdba8b4248dbb92353eef5c77909951fde1c975 | 236 | package test;
public class Sample134 {
public static void main(String[] args) {
Boat boat1 = new Boat();
int seats = 8;
String colorSelect = "green";
boat1.setSeatColor(seats, colorSelect);
boat1.show();
}
}
| 15.733333 | 43 | 0.635593 |
f1575d42fe9495541da0f008132b81529ae74230 | 2,179 | /*
* Copyright (c) Huawei Technologies Co., Ltd. 2020-2022. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
... | 26.253012 | 103 | 0.659018 |
03bf47b64b3da2e891f12741ace55e067a821393 | 692 | class Solution {
public int search(int[] nums, int target) {
int low = 0, high = nums.length-1;
while(low <= high) {
int mid = low + (high-low)/2;
if (nums[mid] == target) return mid;
if (nums[low] <= nums[mid]) {
if (nums[low] <= target && target ... | 30.086957 | 65 | 0.348266 |
312e031d7d53364ae4100fe3a59147102356829d | 2,408 | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | 38.222222 | 95 | 0.773671 |
5ea0b56561c30cf0cb02cac0bfe3d1226e1dfcce | 6,731 | /*
* 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 ... | 42.872611 | 100 | 0.661417 |
ba15a4f8ed5f935634013b4876f9703b95b1c47d | 1,562 | package org.mahjong4j.nosituation;
import org.junit.Before;
import org.junit.Test;
import org.mahjong4j.Player;
import org.mahjong4j.hands.Hands;
import org.mahjong4j.tile.Tile;
import org.mahjong4j.yaku.yakuman.Yakuman;
import java.util.List;
import static junit.framework.TestCase.assertEquals;
import static org.ha... | 24.793651 | 64 | 0.633163 |
86678c0e4e8cc075fb01fd2ddc5c1595f034ace9 | 249 | package com.fpinjava.lists.exercise05_12;
import com.fpinjava.lists.exercise05_10.List;
public class Reverse {
public static <A> List<A> reverseViaFoldLeft(List<A> list) {
throw new IllegalStateException("To be implemented");
}
}
| 22.636364 | 64 | 0.730924 |
c42a49be63aee7cdfa6ed21a6285415fcdd08fc9 | 3,481 | /*
This file is licensed 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/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
di... | 36.642105 | 99 | 0.594944 |
fed17ecc4fe20a791a195a20773454c684439214 | 320 | package com.wayn.mall;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class WaynMallApplication {
public static void main(String[] args) {
SpringApplication.run(WaynMallApplication.class, args);
}
}
| 26.666667 | 68 | 0.79375 |
b68948275f7f46e2616bde4eabd184a989f0f9d6 | 1,691 | package picocli.examples.arggroup;
import picocli.CommandLine;
import picocli.CommandLine.ArgGroup;
import picocli.CommandLine.MutuallyExclusiveArgsException;
import picocli.CommandLine.Option;
/**
* <p>
* The example below defines a command with mutually exclusive options `-a`, `-b` and `-c`.
* </p><p>
* Note th... | 36.76087 | 109 | 0.66233 |
7689008b1e5bedbfac85979614c9fdeaca217b5d | 1,619 | package com.github.sdt.cypher.ui.activities.register;
import android.content.Context;
import androidx.fragment.app.FragmentManager;
import com.github.sdt.cypher.data.rxFirebase.InterfaceFirebase;
import dagger.internal.Factory;
import javax.annotation.processing.Generated;
import javax.inject.Provider;
@Generated(
... | 35.977778 | 87 | 0.791847 |
1be1280b4312e55b8430e1fb58ef46b0d7b56ced | 939 | package com.code10.xml.util;
import com.code10.xml.controller.exception.BadRequestException;
import javax.xml.XMLConstants;
import javax.xml.transform.stream.StreamSource;
import javax.xml.validation.Schema;
import javax.xml.validation.SchemaFactory;
import javax.xml.validation.Validator;
import java.io.FileInputStre... | 33.535714 | 100 | 0.72524 |
13479c13e7ccfd1ea3c8f8338c86a541f8b0ff9d | 1,580 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.delegatednetwork.models;
import com.azure.core.util.ExpandableStringEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
i... | 38.536585 | 92 | 0.751899 |
502c830825cb970dc04e56c0af135d4f1672c106 | 1,768 | /*
* Copyright (C) 2014-2021 D3X Systems - All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | 28.063492 | 76 | 0.705317 |
0f0adde571302a017020589c987f1108b4355681 | 2,716 | /*
* Copyright (C) 2016 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... | 31.952941 | 127 | 0.739691 |
09d3cb4797d7655cc01f0768f0e3d549e1b23219 | 520 | package com.minda.mindadaily.model;
public class CourseItem {
private String courseName;
private String numOfDay;
private String place;
public String getCourseName() {
return courseName;
}
public void setCourseName(String courseName) {
this.courseName = courseName;
}
public String getNumOfDay() {
return ... | 20 | 47 | 0.736538 |
aba526382088a5a45d2da79f629918134b33b72b | 2,736 | /*
* 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... | 37.479452 | 116 | 0.705044 |
21760bf22acb3e4e7fb64cc880003faa4e90275d | 223 | package com.edvinaskilbauskas.squarie;
/**
* Created by edvinas on 11/29/14.
*/
public enum GameState {
TransitionToMainScreen, MainScreen, TransitionToGame, Game, Dead, TransitionFromDeath, NextPlatformTransition
}
| 24.777778 | 113 | 0.780269 |
7ccf94058831151ef31eefd54a14ea5a05762af8 | 3,856 | package com.regitiny.catiny.service.impl;
import static org.elasticsearch.index.query.QueryBuilders.*;
import com.regitiny.catiny.GeneratedByJHipster;
import com.regitiny.catiny.domain.AccountStatus;
import com.regitiny.catiny.repository.AccountStatusRepository;
import com.regitiny.catiny.repository.search.AccountSta... | 35.703704 | 115 | 0.782417 |
d3d17215f56e35bde4f7037adde2d53038a93f01 | 1,126 | package csp.releaseplan.constraints;
import csp.ConstraintMapping;
import csp.releaseplan.ReleasePlanConsistencyModel;
import org.testng.Assert;
import org.testng.annotations.Test;
import releaseplan.Constraint;
import releaseplan.ConstraintHelper;
import releaseplan.ConstraintType;
import releaseplan.IndexBasedRelea... | 32.171429 | 135 | 0.745115 |
43ba134314fb4b7189eb3cfc1b3786d3f4b02c56 | 486 | package lk.ultratech.agent.sys.dao.custom.impl;
import lk.ultratech.agent.sys.entity.Worker;
import java.sql.SQLException;
class WorkerDaoImplTest {
public static void main(String[] args) throws SQLException, ClassNotFoundException {
new WorkerDaoImplTest().save();
}
void save() throws SQLExcep... | 28.588235 | 93 | 0.713992 |
df96c46580e9c8d47b6e95e5aac801432253049f | 768 | package com.github.tmarwen.micronaut.microstream.application.model;
import com.github.tmarwen.micronaut.microstream.annotation.Root;
import java.util.ArrayList;
import java.util.List;
/**
* The Chat Graph model root entity.
*
* @since 1.0.0
*/
@Root
public class ChatGraph {
private List<Thread> threads;
... | 18.731707 | 67 | 0.638021 |
9d36bd3e37946b56fb0d6d055646f04c29d899f3 | 2,868 | package com.huang.notetool.util;
import javax.swing.filechooser.FileFilter;
import java.io.File;
/**
* 继承文件拦截器FileFilter
* 实现对文件的限制访问
* 在jFileChooser可以使用他来指定打开文件的类型
*
* @author 黄先生
* @date 2019-05-05
*/
public class NormalFileFilter extends FileFilter {
/**
* 可接收的文件类型
*
* @param file 文件
... | 34.142857 | 65 | 0.509066 |
ff15c2774cc54b8170768eab31fdc2240dcda3c1 | 663 | package no.java.moosehead.web;
import org.assertj.core.api.Assertions;
import org.junit.Test;
import java.time.Instant;
import java.util.Optional;
import static org.assertj.core.api.Assertions.assertThat;
public class UtilsTest {
@Test
public void shouldConvertFromStringToInstant() throws Exception {
... | 24.555556 | 79 | 0.710407 |
edcd43bee33908c873dae33bfd9985f33cee65ad | 1,361 | package com.shieldui.wicket.examples;
import com.shieldui.wicket.calendar.ChangeEventListener;
import java.util.Date;
import java.util.HashMap;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.markup.html.WebPage;
public class Calendar extends WebPage
{
private static final long serialVer... | 32.404762 | 121 | 0.587068 |
043df0bca2e00ae7a2118bfa78d8ec55a5b890e4 | 1,503 | package com.blamejared.crafttweaker.impl_native.entity;
import com.blamejared.crafttweaker.api.annotations.ZenRegister;
import com.blamejared.crafttweaker.impl.entity.MCEntityType;
import com.blamejared.crafttweaker_annotations.annotations.Document;
import com.blamejared.crafttweaker_annotations.annotations.NativeType... | 39.552632 | 143 | 0.756487 |
1e577e8924800c189950f7fb24ad104603f15991 | 2,543 | /*
* Copyright (c) 2016, Salesforce.com, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
* that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list of cond... | 33.460526 | 109 | 0.719622 |
467576abf5858b335ff779a775c9d28d8ef525cd | 733 | package invoiceGeneratorEntitites;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Id;
@Embeddable
public class ShopRegistrationID implements Serializable{
/**
*
*/
private static final long serialVersionUID = 1L;
private Long owner... | 20.361111 | 56 | 0.773533 |
12872e7cb347d30a36143f387c50cab4a56ef149 | 1,829 | package no.mnemonic.act.platform.dao.cassandra.entity;
import com.datastax.oss.driver.api.mapper.annotations.ClusteringColumn;
import com.datastax.oss.driver.api.mapper.annotations.CqlName;
import com.datastax.oss.driver.api.mapper.annotations.Entity;
import com.datastax.oss.driver.api.mapper.annotations.PartitionKey;... | 24.065789 | 94 | 0.756698 |
7f4c8187fba2393286d1c142d602b5469b449161 | 2,768 | package com.yerseg.web;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
import org.apache.commons.codec.digest.MurmurHash3;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServl... | 36.421053 | 122 | 0.66763 |
066ffbf1701bb463818a88d111b53be5561a7f55 | 914 | public class InventoryManagement {
public static void refreshItem(Item item) {
System.out.print("Processing ");
item.printItem();
if (item.getQuantity() < 5)
System.out.println("Ordering more");
else
System.out.println("There is enough stock");
// if(item.getQuantity() < 5)
// System.out.println("Or... | 22.292683 | 70 | 0.647702 |
c76f5b34661d0add4b430ac692dbd820e3388b3f | 1,352 | package fr.AleksGirardey.Commands.City.Set.Permissions;
import fr.AleksGirardey.Commands.City.CityCommandAssistant;
import fr.AleksGirardey.Objects.Core;
import fr.AleksGirardey.Objects.DBObject.DBPlayer;
import fr.AleksGirardey.Objects.DBObject.Permission;
import org.spongepowered.api.command.CommandResult;
import or... | 34.666667 | 87 | 0.715237 |
4082db1563c535f41be1c3bb95c888f57f9a2936 | 7,825 | /*
* Copyright (C) 2014 Stefan Niederhauser (nidin@gmx.ch)
*
* 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 ... | 43.472222 | 129 | 0.659553 |
ed80ed5e7cc86f15d5978e5a213e7d688db899c8 | 1,005 | // This file is auto-generated, don't edit it. Thanks.
package com.antgroup.antchain.openapi.acm.models;
import com.aliyun.tea.*;
public class GetAntpassportTenantRequest extends TeaModel {
// OAuth模式下的授权token
@NameInMap("auth_token")
public String authToken;
// 蚂蚁通行证uid
@NameInMap("ant_uid")
... | 26.447368 | 100 | 0.686567 |
02d9408c3a143243473ce0f5484642e89938c6b8 | 3,972 | package io.advantageous.qbit.service.dispatchers;
import io.advantageous.boon.core.Sys;
import io.advantageous.qbit.reactive.Callback;
import io.advantageous.qbit.reactive.CallbackBuilder;
import io.advantageous.qbit.service.ServiceBundle;
import io.advantageous.qbit.service.ServiceBundleBuilder;
import io.advantageou... | 24.981132 | 127 | 0.606747 |
88405a15913d4e7a7c58bb1cffb5041de2bc7703 | 11,775 | /*
* gabien-app-r48 - Editing program for various formats
* Written starting in 2016 by contributors (see CREDITS.txt)
* To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed withou... | 42.053571 | 256 | 0.597452 |
191a73aaedef897d0ef8c9b06907d3b3525b89c0 | 8,572 | /**
* Copyright (c) 2014-2017 Netflix, Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | 34.425703 | 161 | 0.707186 |
ee70565288594862a983e2a37c19fc7bef06ce53 | 12,163 | package seedu.address.model.event;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static seedu.address.testutil.event.... | 40.408638 | 115 | 0.732961 |
6dc155c3c03212f5303b44e8deae841caf0f1828 | 2,773 | package com.orbitz.consul.model.acl;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotatio... | 33.011905 | 85 | 0.74432 |
c4f3e7d875056d93174db53fe1ae88058a70ffc8 | 142 | package com.archer.designpattern.demo.command;
/**
* Created by Archer on 2017/11/23.
*/
public interface Command {
void execute();
}
| 14.2 | 46 | 0.690141 |
728f9f553840d55e3735563ff5906b7f9a0d617f | 9,365 | /*------------------------------------------------------------------------------
Copyright (c) CovertJaguar, 2011-2019
http://railcraft.info
This code is the property of CovertJaguar
and may only be used with explicit written
permission unless otherwise specified on the
license page at http://railcraft.info/wiki... | 32.517361 | 155 | 0.648478 |
a8fe3d8767116a5072c424e19bf3ce385736934c | 898 | package com.sample.tools.operation.ops;
import java.io.File;
import java.util.List;
import com.sample.tools.config.Settings;
import com.sample.tools.operation.AbsOps;
import com.sample.tools.operation.OpsException;
import com.sample.tools.operation.OpsFile;
import com.sample.tools.operation.OpsFile.OpsEntry;
/**
* ... | 23.631579 | 90 | 0.685969 |
d59f0c65221e76e3492a027c8237600fee30afa2 | 290 | package com.demo.beanorder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @author ZhangShaowei on 2021/10/15 14:50
*/
@Configuration
public class B {
@Bean
public C c() {
return new C();
}
}
| 16.111111 | 60 | 0.693103 |
508a354ce8a93fa7a74e54b28cb5ce5ab04521bf | 4,715 | /*
* Copyright 2019-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ap... | 40.646552 | 118 | 0.682291 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.