code stringlengths 3 1.04M | repo_name stringlengths 5 109 | path stringlengths 6 306 | language stringclasses 1
value | license stringclasses 15
values | size int64 3 1.04M |
|---|---|---|---|---|---|
package battleships.backend;
import java.util.List;
import game.api.GameState;
import game.impl.Board;
import game.impl.DieRollFactory;
import game.impl.Move;
import game.impl.Player;
import battleships.backend.GameActionsHandler;
import battleships.backend.State;
public class BattleShipsGameState implements GameSta... | Grupp2/GameBoard-API-Games | src/battleships/backend/BattleShipsGameState.java | Java | unlicense | 1,674 |
package com.led.weatherdemo.util;
import android.content.Context;
public class DensityUtil {
/**
* 根据手机的分辨率从 dp 的单位 转成为 px(像素)
*/
public static int dip2px(Context context, float dpValue) {
final float scale = context.getResources().getDisplayMetrics().density;
retur... | heibai01/bts_work | WeatherDemo/src/com/led/weatherdemo/util/DensityUtil.java | Java | unlicense | 707 |
package es.uniovi.asw.persistence.impl;
import es.uniovi.asw.persistence.CircunscripcionDao;
import es.uniovi.asw.persistence.ColegioElectoralDao;
import es.uniovi.asw.persistence.ComunidadAutonomaDao;
import es.uniovi.asw.persistence.OpcionDao;
import es.uniovi.asw.persistence.PersistenceFactory;
import es.uniovi.asw... | ferraobox/ASWuo213306Julio | src/main/java/es/uniovi/asw/persistence/impl/SimplePersistenceFactory.java | Java | unlicense | 1,413 |
package org.webonise.multihostpoc.daoimpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import org.webonise.multihostpoc.dao.GenericDao;
import org.webonise.multihostpoc.models.Person;
import org.webon... | ameyawebonise/hibernate-multi-host-poc | src/test/java/org/webonise/multihostpoc/daoimpl/PersonDAOImplTests.java | Java | unlicense | 2,047 |
package ayrat.salavatovich.gmail.com.day_108.servicekillserver;
import android.os.Build;
public class Log {
static {
VERBOSE = android.util.Log.VERBOSE;
DEBUG = android.util.Log.DEBUG;
INFO = android.util.Log.INFO;
WARN = android.util.Log.WARN;
ERROR = android.util.Log.ERROR;
ASSERT = android.util.Log.A... | Ayrat-Salavatovich/Learn_Android_Programming | Day 108/ServiceKillServer/src/ayrat/salavatovich/gmail/com/day_108/servicekillserver/Log.java | Java | unlicense | 2,235 |
/**
* This class contains class (static) methods
* that will help you test the Picture class
* methods. Uncomment the methods and the code
* in the main to test.
*
* @author Barbara Ericson
*/
public class PictureTester
{
/** Method to test zeroBlue */
public static void testZeroBlue()
{
... | WesleyRogers/AP-CompSci | Wk28-PixelLab/pixLab/classes/PictureTester.java | Java | unlicense | 3,952 |
package samples;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.event.ActionEvent;
import java.awt.image.BufferedImage;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.A... | terifan/ListView | src/samples/TestStyles.java | Java | unlicense | 7,926 |
package de.incub8.tomeefreezetestcase;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Entity
@NoArgsConstructor
public class DerivedDataEntity
{
@Id
@GeneratedValue
private Long id;
pr... | JanDoerrenhaus/tomeefreezetestcase | src/main/java/de/incub8/tomeefreezetestcase/DerivedDataEntity.java | Java | unlicense | 449 |
import java.util.Scanner;
public class Question5_44a
{
public static void main(String[] args)
{
Scanner scanner = new Scanner(System.in);
System.out.println("Enter an integer. ");
int input = scanner.nextInt();
String output = "";
for (int i = 1; i <= 16; i++)
{
output = (input & 1) + output;
input... | SubhamSatyajeet/JavaRough | Liang/Chapter5/Question5_44a.java | Java | unlicense | 392 |
package be.normegil.librarium.model.dao;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
@Suite.SuiteClasses({
UTUniverseDatabaseDAOSafety.class,
UTUniverseDatabaseDAO.class
})
public class UniverseDatabaseDAOTestSuite {
} | Normegil/Librarium-Server | src/test/java/be/normegil/librarium/model/dao/UniverseDatabaseDAOTestSuite.java | Java | unlicense | 267 |
package com.mobium.client.api.networking;
import com.mobium.reference.utils.executing.ExecutingException;
import org.json.JSONObject;
/**
* on 15.10.15.
*/
public interface IExtraApiInterface extends ApiInterface {
JSONObject DoApiRequest(String method, JSONObject args, JSONObject extra) throws NetworkingExce... | naebomium/android | app/src/main/java/com/mobium/client/api/networking/IExtraApiInterface.java | Java | unlicense | 383 |
/*
* Copyright 2015 Schedo 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 required by applic... | ipalermo/schedo | android/src/main/java/com/ncode/android/apps/schedo/gcm/GCMCommand.java | Java | apache-2.0 | 813 |
package com.likebamboo.osa.android.request;
import android.text.TextUtils;
import com.android.volley.Request;
import com.android.volley.Response;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.Map;
/**
* Created by likebamboo on 2015/5/12.
*/
public abstract class BaseRequest<T> exte... | likebamboo/AndroidBlog | app/src/main/java/com/likebamboo/osa/android/request/BaseRequest.java | Java | apache-2.0 | 2,200 |
package com.devin.util;
import android.content.Context;
import android.media.AudioManager;
/**
* <p>Description:
* <p>Company:
* <p>Email:bjxm2013@163.com
* <p>Created by Devin Sun on 2017/11/6.
*/
public class SpeakerUtils {
/**
* 扬声器开关
* @param context
* @param enableSpeaker 是否打开扬声器,true:打... | sundevin/utilsLibrary | utilslibrary/src/main/java/com/devin/util/SpeakerUtils.java | Java | apache-2.0 | 1,961 |
package com.taobao.tddl.repo.bdb.executor;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Future;
import com.taobao.tddl.common.exception.TddlException;
import com.taobao.tddl.common.model.Group;
import com.taobao.tddl.common.model.lifecycle.AbstractLifecycle;
imp... | sdgdsffdsfff/tddl | tddl-repo-bdb/src/main/java/com/taobao/tddl/repo/bdb/executor/BDBGroupExecutor.java | Java | apache-2.0 | 6,080 |
/*
* Copyright 2022 Crown Copyright
*
* 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... | gchq/stroom | stroom-lmdb/src/main/java/stroom/bytebuffer/ByteBufferSupport.java | Java | apache-2.0 | 4,197 |
/*
* 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 ... | kkhatua/drill | exec/java-exec/src/test/java/org/apache/drill/TestFunctionsQuery.java | Java | apache-2.0 | 47,791 |
/**
* Copyright Google 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 required by applicable law ... | googlecodelabs/android-smart-lock | app/src/main/java/com/google/codelab/smartlock/SplashFragment.java | Java | apache-2.0 | 1,068 |
/*
* Copyright 2000-2016 JetBrains s.r.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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | semonte/intellij-community | platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/DaemonCodeAnalyzerImpl.java | Java | apache-2.0 | 39,395 |
package org.tendons.manager;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Unit test for simple App.
*/
public class AppTest
extends TestCase
{
/**
* Create the test case
*
* @param testName name of the test case
*/... | wind-clothes/tendons | tendons-manager/src/test/java/org/tendons/manager/AppTest.java | Java | apache-2.0 | 685 |
package com.jpettersson.wearify;
import android.content.Context;
import android.net.Uri;
import android.util.Log;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.common.data.FreezableUtils;
import com.google.android.gms.wea... | jpettersson/wearify | wear/src/main/java/com/jpettersson/wearify/DataLayerListenerService.java | Java | apache-2.0 | 2,265 |
/*
* Copyright 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 applica... | lsmaira/gradle | subprojects/launcher/src/main/java/org/gradle/launcher/exec/RunAsBuildOperationBuildActionRunner.java | Java | apache-2.0 | 2,807 |
/* Generic definitions */
/* Assertions (useful to generate conditional code) */
/* Current type and class (and size, if applicable) */
/* Value methods */
/* Interfaces (keys) */
/* Interfaces (values) */
/* Abstract implementations (keys) */
/* Abstract implementations (values) */
/* Static containers (keys) */
/... | karussell/fastutil | src/it/unimi/dsi/fastutil/ints/Int2ReferenceMaps.java | Java | apache-2.0 | 14,114 |
/*
* Copyright 2014 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... | fariagu/dashbuilder | dashbuilder-backend/dashbuilder-dataset-sql/src/test/java/org/dashbuilder/dataprovider/sql/SQLTableDataSetLookupTest.java | Java | apache-2.0 | 13,322 |
package com.google.android.apps.forscience.whistlepunk.cloudsync;
import android.content.Context;
import java.io.IOException;
/** An interface that defines a service used to sync data to and from a cloud storage provider. */
public interface CloudSyncManager {
/** Syncs the Experiment Library file to cloud storage... | googlearchive/science-journal | OpenScienceJournal/whistlepunk_library/src/main/java/com/google/android/apps/forscience/whistlepunk/cloudsync/CloudSyncManager.java | Java | apache-2.0 | 492 |
package cs.si.stavor.settings;
import cs.si.stavor.R;
import cs.si.stavor.MainActivity;
import cs.si.stavor.StavorApplication;
import android.app.Activity;
import android.os.Bundle;
import android.preference.PreferenceFragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGrou... | CS-SI/Stavor | stavor/src/main/java/cs/si/stavor/settings/SettingsGeneralFragment.java | Java | apache-2.0 | 1,968 |
/*
* Copyright 2000-2015 JetBrains s.r.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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | pwoodworth/intellij-community | platform/platform-impl/src/com/intellij/openapi/components/impl/stores/StorageUtil.java | Java | apache-2.0 | 15,918 |
package fr.javatronic.blog.massive.annotation1.sub1;
import fr.javatronic.blog.processor.Annotation_001;
@Annotation_001
public class Class_0940 {
}
| lesaint/experimenting-annotation-processing | experimenting-rounds/massive-count-of-annotated-classes/src/main/java/fr/javatronic/blog/massive/annotation1/sub1/Class_0940.java | Java | apache-2.0 | 151 |
package com.github.yuukis.businessmap.util;
public class StringJUtils {
private static final char[] HANKAKU_KATAKANA = { '。', '「', '」', '、', '・',
'ヲ', 'ァ', 'ィ', 'ゥ', 'ェ', 'ォ', 'ャ', 'ュ', 'ョ', 'ッ', 'ー', 'ア', 'イ',
'ウ', 'エ', 'オ', 'カ', 'キ', 'ク', 'ケ', 'コ', 'サ', 'シ', 'ス', 'セ', 'ソ',
'タ', 'チ', 'ツ', 'テ', 'ト', ... | yuukis/businessmap | src/com/github/yuukis/businessmap/util/StringJUtils.java | Java | apache-2.0 | 4,463 |
/*******************************************************************************
*
* Copyright 2011-2014 Spiffy UI Team
*
* 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
*
... | spiffyui/spiffyui | spiffyui/src/main/java/org/spiffyui/client/rest/RESTLoginCallBack.java | Java | apache-2.0 | 1,518 |
package com.orangeclk.service;
import com.orangeclk.model.entity.CityEntity;
import java.util.Optional;
/**
* Created by orangeclk on 1/9/17.
*/
public interface CityService {
Optional<CityEntity> findByName(String name);
CityEntity save(String name);
CityEntity findOne(int id);
}
| orangeclk/huiyin | src/main/java/com/orangeclk/service/CityService.java | Java | apache-2.0 | 299 |
/**
*
* Copyright (C) 2014 Ash (Tuxdude) <tuxdude.github@gmail.com>
*
* This file is part of logback-colorizer.
*
* 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://... | Tuxdude/logback-colorizer | colorizer/src/test/java/org/tuxdude/logback/extensions/tests/package-info.java | Java | apache-2.0 | 880 |
/*
* Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights
* Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "l... | mhurne/aws-sdk-java | aws-java-sdk-dms/src/main/java/com/amazonaws/services/databasemigrationservice/model/transform/DescribeReplicationTasksRequestMarshaller.java | Java | apache-2.0 | 4,015 |
package com.altarit.berry.persist.service.impl;
import com.altarit.berry.model.entity.User;
import com.altarit.berry.persist.dao.UserDao;
import com.altarit.berry.persist.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.spring... | altarit/spring-berry | berry-parent/berry-persist/src/main/java/com/altarit/berry/persist/service/impl/UserServiceImpl.java | Java | apache-2.0 | 1,684 |
/**
* (c) Copyright 2016 Admios. The software in this package is published under the terms of the Apache License Version 2.0, a copy of which has been included with this distribution in the LICENSE.md file.
*/
package org.mule.modules.watsonalchemylanguage.model;
import org.mule.api.annotations.param.Optional;
/**
... | Admios/watson-alchemy-language-connector | src/main/java/org/mule/modules/watsonalchemylanguage/model/SentimentAnalysisRequest.java | Java | apache-2.0 | 2,670 |
/*
Copyright 2013 Demon Developers Ltd
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... | slightfoot/android-tandem-scroll | Library/src/com/demondevelopers/tandemscroll/TandemController.java | Java | apache-2.0 | 1,510 |
/*******************************************************************************
* Copyright 2019 See AUTHORS file
*
* 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.apac... | mini2Dx/mini2Dx | ui/src/main/java/org/mini2Dx/ui/effect/SlideDirection.java | Java | apache-2.0 | 894 |
/* -------------------------------------------------------------------------- */
/* Copyright 2002-2013, GridWay Project Leads (GridWay.org) */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may ... | GridWay/gridway | src/drmaa/drmaa1.0/org/ggf/drmaa/SimpleJobTemplate.java | Java | apache-2.0 | 33,332 |
package com.caul.modules.sys.controller;
import com.caul.modules.base.AdminBaseController;
import net.sf.json.JSONObject;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* Created by BlueDream on 2016-05-29.
*/
@RestController
public ... | sdliang1013/account-import | src/main/java/com/caul/modules/sys/controller/PermissionController.java | Java | apache-2.0 | 637 |
package com.baidu.beidou.navi.client.attachment;
import com.baidu.beidou.navi.server.vo.RequestDTO;
import com.baidu.beidou.navi.util.StringUtil;
/**
* ClassName: AuthAttachmentHandler <br/>
* Function: 带有权限处理的handler
*
* @author Zhang Xu
*/
public class AuthAttachmentHandler implements AttachmentHandler {
... | neoremind/navi | navi/src/main/java/com/baidu/beidou/navi/client/attachment/AuthAttachmentHandler.java | Java | apache-2.0 | 1,909 |
/*
* Copyright (C) 2016 Singular Studios (a.k.a Atom Tecnologia) - www.opensingular.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
... | opensingular/singular-server | requirement/requirement-sei-30-connector/src/main/java/org/opensingular/requirement/connector/sei30/ws/ArrayOfUnidade.java | Java | apache-2.0 | 2,461 |
// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
// Copyright (c) 2011, 2012 Open Networking Foundation
// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
// This library was generated by the LoxiGen Compiler.
// See the file LICENSE.txt which should have been included in the sour... | floodlight/loxigen-artifacts | openflowj/gen-src/main/java/org/projectfloodlight/openflow/protocol/ver14/OFBsnPduTxRequestVer14.java | Java | apache-2.0 | 18,089 |
/*
* Copyright 2013 The GDG Frisbee Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | gdgjodhpur/gdgapp | app/src/main/java/org/gdg/frisbee/android/app/GdgVolley.java | Java | apache-2.0 | 3,200 |
package com.quakearts.appbase.test.experiments;
public interface TestSubInject {
void doSomething();
}
| kwakutwumasi/Quakearts-JSF-Webtools | qa-appbase/src/test/java/com/quakearts/appbase/test/experiments/TestSubInject.java | Java | apache-2.0 | 105 |
/**
* Copyright 2015-2016 Debmalya Jash
* <p/>
* 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
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* Unless required by applicabl... | debmalya/mapDB | src/main/java/scrapper/ThoughtOfTheDay.java | Java | apache-2.0 | 2,360 |
package org.alloytools.alloy.lsp.provider;
import java.io.File;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Random;
import edu.mit.csail.sdg.alloy4.Err;
import edu.mit.csail.sdg.alloy4.ErrorFatal;
import edu.mit.csail.sdg.alloy4.OurDialog;
import edu.mit.csail.sdg.alloy4... | AlloyTools/org.alloytools.alloy | org.alloytools.alloy.lsp/src/main/java/org/alloytools/alloy/lsp/provider/AlloyAppUtil.java | Java | apache-2.0 | 4,470 |
/*
* Copyright © 2014 - 2019 Leipzig University (Database Research 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
*
* Unles... | rostam/gradoop | gradoop-flink/src/main/java/org/gradoop/flink/io/api/DataSink.java | Java | apache-2.0 | 1,799 |
/*
* Copyright 2002-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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | spring-cloud/spring-cloud-cloudfoundry-service-broker | spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceRequestTest.java | Java | apache-2.0 | 5,585 |
/**
* Copyright 2010 Bazaarvoice, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | jryans/jless | src/main/java/com/bazaarvoice/jless/ast/node/ExpressionPhraseNode.java | Java | apache-2.0 | 1,449 |
package android.widget;
/*
* #%L
* Matos
* $Id:$
* $HeadURL:$
* %%
* Copyright (C) 2010 - 2014 Orange SA
* %%
* 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.a... | Orange-OpenSource/matos-profiles | matos-android/src/main/java/android/widget/ImageButton.java | Java | apache-2.0 | 1,537 |
/*
* Copyright (C) 2008 The Guava 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 applicable la... | mariusj/org.openntf.domino | domino/externals/guava/src/main/java/com/google/common/primitives/Shorts.java | Java | apache-2.0 | 21,441 |
package com.flipkart.foxtrot.core.exception;
import com.google.common.collect.Maps;
import lombok.Getter;
import java.util.Map;
/**
* Created by rishabh.goyal on 19/12/15.
*/
@Getter
public class TableExistsException extends FoxtrotException {
private final String table;
protected TableExistsException(St... | Flipkart/foxtrot | foxtrot-core/src/main/java/com/flipkart/foxtrot/core/exception/TableExistsException.java | Java | apache-2.0 | 590 |
package fi.bitrite.android.ws.persistence.converters;
import fi.bitrite.android.ws.model.Feedback;
public final class RatingConverter {
private static final int CODE_POSITIVE = 0;
private static final int CODE_NEUTRAL = 1;
private static final int CODE_NEGATIVE = 2;
public static Integer ratingToInt(... | CyrilWendl/wsandroid | app/src/main/java/fi/bitrite/android/ws/persistence/converters/RatingConverter.java | Java | apache-2.0 | 1,185 |
package com.lijuyong.startup.auth;
import com.lijuyong.startup.auth.filter.JwtAuthenticationFilter;
import com.lijuyong.startup.auth.filter.JwtLoginFilter;
import com.lijuyong.startup.auth.security.JwtAuthenticationSuccessHandler;
import com.lijuyong.startup.auth.security.RestAuthenticationEntryPoint;
import org.sprin... | capesonlee/tangtang-spring-cloud | zuul-server/src/main/java/com/lijuyong/startup/auth/WebSecurityConfig.java | Java | apache-2.0 | 3,843 |
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package Leveleditor;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.eclipse.emf.common.util.Enumerator;
/**
* <!-- begin-user-doc -->
* A representation of the literals of the enumeration '<em><b>EElement</b... | sarquah/Gelamen | TowerOfZaldagor.leveleditor/src/Leveleditor/EElement.java | Java | apache-2.0 | 6,502 |
package com.pwnscone.pewpew.actor;
import java.util.ArrayList;
import java.util.HashMap;
import com.pwnscone.pewpew.Game;
import com.pwnscone.pewpew.Particle;
import com.pwnscone.pewpew.Simulation;
import com.pwnscone.pewpew.Spring;
import com.pwnscone.pewpew.util.Pool;
public class Hub extends Actor {
public stati... | underclocker/pewpew | core/src/com/pwnscone/pewpew/actor/Hub.java | Java | apache-2.0 | 3,699 |
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2016.10.... | leonmaybe/eLong-OpenAPI-JAVA-demo | src/elong/EnumDrrRuleCode.java | Java | apache-2.0 | 2,346 |
/*
* Copyright 2015 Odnoklassniki Ltd, Mail.Ru 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 applica... | odnoklassniki/one-nio | src/one/nio/mem/SharedMemoryStringMap.java | Java | apache-2.0 | 2,649 |
package com.demo.amazing.activity;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import com.demo.amazing.R;
public class ConstraintActivity extends Activity {
public static void start(Context context) {
Int... | FreeSunny/Amazing | app/src/main/java/com/demo/amazing/activity/ConstraintActivity.java | Java | apache-2.0 | 1,111 |
/*
* Copyright 2017 StreamSets 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... | z123/datacollector | hdfs-protolib/src/main/java/com/streamsets/pipeline/stage/destination/hdfs/writer/ActiveRecordWriters.java | Java | apache-2.0 | 6,511 |
/**
* Copyright 2014 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 in writing, sof... | linkedin/MTBT | mt-proxy/src/main/java/com/linkedin/proxy/pool/BlockingMysqlConnectionPool.java | Java | apache-2.0 | 4,253 |
/**
* OLAT - Online Learning and Training<br />
* http://www.olat.org
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); <br />
* you may not use this file except in compliance with the License.<br />
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2... | huihoo/olat | OLAT-LMS/src/main/java/org/olat/system/exception/OLATRuntimeException.java | Java | apache-2.0 | 4,805 |
package com.coolweather.android.db;
import org.litepal.crud.DataSupport;
/**
* Created by Drug on 2017/6/15.
* 创建一个市类,包括,市ID,市名字cityName,市编码cityCode,省ID:provinceId
*/
public class City extends DataSupport {
private int id; //市id
private String cityName; //市名
private int cityCode; //市编码
pri... | fengbin15/coolweather | app/src/main/java/com/coolweather/android/db/City.java | Java | apache-2.0 | 982 |
/*
* Copyright 2021 Google LLC
*
* 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... | googleapis/java-video-intelligence | google-cloud-video-intelligence/src/test/java/com/google/cloud/videointelligence/v1p3beta1/VideoIntelligenceServiceClientTest.java | Java | apache-2.0 | 4,977 |
/*******************************************************************************
* Copyright 2014 DEIB - Politecnico di Milano
*
* Marco Balduini (marco.balduini@polimi.it)
* Emanuele Della Valle (emanuele.dellavalle@polimi.it)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not ... | streamreasoning/rsp-services-csparql | src/main/java/it/polimi/deib/rsp_services_csparql/queries/utilities/Csparql_Observer_Descriptor.java | Java | apache-2.0 | 1,618 |
package de.dailab.newsreel.recommender.common.util;
import org.apache.commons.lang.NullArgumentException;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
/**
* Created by jens on 02.03.16.
*/
public class EvalLevelTest {
public static void main(String[] args) {
Logger logger = Logger.get... | jasjisdo/spark-newsreel-recommender | common/src/test/java/de/dailab/newsreel/recommender/common/util/EvalLevelTest.java | Java | apache-2.0 | 685 |
/*
*
* Copyright 2015 Stephen Cameron Data Services
*
*
* 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... | Stephen-Cameron-Data-Services/isis-chats | dom/src/main/java/au/com/scds/chats/dom/general/names/ClassificationValue.java | Java | apache-2.0 | 2,524 |
package com.qszxin.asterism.activity;
import android.os.Bundle;
import android.support.v4.app.FragmentPagerAdapter;
import android.view.View;
import android.support.design.widget.NavigationView;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.... | wubohnu/Asterism | app/src/main/java/com/qszxin/asterism/activity/MainActivity.java | Java | apache-2.0 | 6,927 |
/*
* Copyright (C) 2016 the original author or authors.
*
* This file is part of jGrades Application Project.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*/
package org.jgrades.security.utils... | jgrades/jgrades | jg-backend/implementation/base/jg-security/implementation/src/main/java/org/jgrades/security/utils/UserDetailsImpl.java | Java | apache-2.0 | 1,029 |
package com.ccs.ir;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.uti... | tintin1343/Information-Retrieval | fourth_assignment_ir/code/hw4/src/com/ccs/ir/HitsQuery.java | Java | apache-2.0 | 5,626 |
/*
* Copyright 2010-2013 Ning, Inc.
* Copyright 2014-2016 Groupon, Inc
* Copyright 2014-2016 The Billing Project, LLC
*
* The Billing Project licenses this file to you under the Apache License, version 2.0
* (the "License"); you may not use this file except in compliance with the
* License. You may obtain a cop... | andrenpaes/killbill | entitlement/src/main/java/org/killbill/billing/entitlement/engine/core/EventsStreamBuilder.java | Java | apache-2.0 | 26,014 |
package org.gekko.test.service.shops;
public enum CarShopType {
sport, vacation, business;
}
| epanikas/gekko | src/test/java/org/gekko/test/service/shops/CarShopType.java | Java | apache-2.0 | 97 |
// Copyright 2004, 2005 The Apache Software Foundation
//
// 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... | Abnaxos/gaderian | core/src/test/java/gaderian/test/services/SimpleService.java | Java | apache-2.0 | 797 |
package uk.ac.ncl.cs.csc8101.weblogcoursework;
import java.io.File;
import java.io.PrintWriter;
public class TestImplementation {
/**
* @param args
*/
public static void main(String[] args) {
try
{
/**** Test ActivitiesBetweenTimes class: uncomment a line to test it ***/
ActivitiesBetweenTimes act... | b0354345/project | src/main/java/uk/ac/ncl/cs/csc8101/weblogcoursework/TestImplementation.java | Java | apache-2.0 | 1,154 |
/*
* Copyright 2012-2015 JetBrains s.r.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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | anqidong/jetpad-mapper | mapper/src/main/java/jetbrains/jetpad/mapper/ObservableCollectionRoleSynchronizer.java | Java | apache-2.0 | 2,653 |
package com.mrprona.dota2assitant.player.fragment;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import ... | mrprona92/SecretBrand | app/src/main/java/com/mrprona/dota2assitant/player/fragment/PlayerByHeroStatsFilter.java | Java | apache-2.0 | 5,771 |
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2022 DBeaver Corp and others
*
* 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/LICE... | dbeaver/dbeaver | plugins/org.jkiss.dbeaver.ext.kognitio/src/org/jkiss/dbeaver/ext/kognitio/KognitioDataSourceProvider.java | Java | apache-2.0 | 970 |
package ar_ubin.benotified.data.source.beacons;
import android.support.annotation.NonNull;
import java.util.List;
import ar_ubin.benotified.data.models.Beacon;
public interface BeaconDataSource
{
interface LoadBeaconCallback
{
void onBeaconLoaded( List<Beacon> beacons );
void onDataNotAvai... | ar-ubin/BeNotified | app/src/main/java/ar_ubin/benotified/data/source/beacons/BeaconDataSource.java | Java | apache-2.0 | 991 |
package com.icesecret.ex;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
* Created by charlie on 17/10/31.
*/
public class MemOrderBook extends Printabl... | Brucecarl/e-wallet | src/main/java/com/icesecret/ex/MemOrderBook.java | Java | apache-2.0 | 2,589 |
package de.unvilgames.dodgingking.graph.effects;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.utils.Pool;
import de.unvilgames.dodgingking.graph.SizeEvaluator;
/**
* Created by timjk on 04.08.2017.
*/
public abstract class Effect implements Pool.Poolable {
protected boolean isAl... | mit1234123/Dodgingking | core/src/de/unvilgames/dodgingking/graph/effects/Effect.java | Java | apache-2.0 | 860 |
package com.littlechoc.olddriver.obd.commands;
/**
* @author Junhao Zhou 2017/4/22
*/
public class ObdCommandInterval extends ObdCommandProxy {
private static final long DEFAULT_INTERVAL = 1000;
private long lastTime;
private long interval;
public ObdCommandInterval(ObdCommand other) {
this(other, D... | junhaozhou/old-driver | obd/src/main/java/com/littlechoc/olddriver/obd/commands/ObdCommandInterval.java | Java | apache-2.0 | 653 |
/*
* 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 ... | ecarm002/incubator-asterixdb | asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/java/base/JDateTime.java | Java | apache-2.0 | 2,062 |
package heng.shi.controller;
import heng.shi.entity.User;
import heng.shi.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.a... | Pabears/happy-reading-happy-writing | src/main/java/heng/shi/controller/UserController.java | Java | apache-2.0 | 911 |
// Copyright 2015 The Bazel Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appl... | Asana/bazel | src/main/java/com/google/devtools/build/lib/worker/WorkerSpawnStrategy.java | Java | apache-2.0 | 17,363 |
package org.wordcounthbase;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
public class DirectoryScanner {
public static List<File> getFileList(String directoryPath) {
List<File> fileList = new ArrayList<File>();
addTree(new File(directoryPath... | arks-api/arks-api | modules-samples/wordcount-hbase/src/org/wordcounthbase/DirectoryScanner.java | Java | apache-2.0 | 651 |
/**
* 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... | afs/jena-reports | src/dev/ElementTransformCleanGroups.java | Java | apache-2.0 | 6,396 |
package egovframework.com.sts.bst.service;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
/**
* 게시물 통계 집계를 위한 스케줄링 클래스
* @author 공통서비스 개발팀 박지욱
* @since 2009.04.16
* @version 1.0
* @see
*
* <pre>
* << 개정이력(Modification Information) >>
*
* 수정일 수정자 ... | dasomel/egovframework | common-component/v2.3.2/src/main/java/egovframework/com/sts/bst/service/EgovBbsStatsScheduling.java | Java | apache-2.0 | 1,036 |
package com.bq.corbel.iam.service;
import java.util.List;
import org.springframework.dao.DataIntegrityViolationException;
import com.bq.corbel.iam.exception.DuplicatedOauthServiceIdentityException;
import com.bq.corbel.iam.exception.IdentityAlreadyExistsException;
import com.bq.corbel.iam.model.Identity;
import com.... | bq/corbel | iam/src/main/java/com/bq/corbel/iam/service/DefaultIdentityService.java | Java | apache-2.0 | 1,605 |
package apycazo.codex.testing.spring;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@Slf4j
@Service
public class SpringService {
private final SpringComponent component;
public SpringService(SpringComponent component) {
this.component = component;
}
public void init()... | apycazo/codex | codex-testing/src/main/java/apycazo/codex/testing/spring/SpringService.java | Java | apache-2.0 | 537 |
/*
* Copyright (C) 2017-2019 Dremio 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 l... | dremio/dremio-oss | sabot/kernel/src/test/java/com/dremio/exec/store/TestAffinityCalculator.java | Java | apache-2.0 | 2,516 |
/* 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... | yvoswillens/flowable-engine | modules/flowable-rest/src/test/java/org/flowable/rest/service/api/runtime/ProcessInstanceDiagramResourceTest.java | Java | apache-2.0 | 2,517 |
package org.slc.sli.context;
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
im... | inbloom/datastore-portal | portlets/headerfooter-portlet/docroot/WEB-INF/src/org/slc/sli/context/HTTPRequestFilter.java | Java | apache-2.0 | 1,461 |
package dh.algorithms.classification.kmeans;
import dh.algorithms.classification.ClassificationModel;
import dh.data.column.special.NominalDataColumn;
import dh.repository.Table;
public class KMeansModel extends ClassificationModel {
private static final long serialVersionUID = 1L;
String[] columnNames;
boolean... | gabormakrai/datahammer | src/dh/algorithms/classification/kmeans/KMeansModel.java | Java | apache-2.0 | 2,368 |
/*
* Copyright (c) 2017 by the original author
*
* 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... | powertac/powertac-server | genco/src/test/java/org/powertac/genco/MisoBuyerTest.java | Java | apache-2.0 | 10,945 |
/*
* =============================================================================
*
* Copyright (c) 2011-2016, The THYMELEAF team (http://www.thymeleaf.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may ... | thymeleaf/thymeleaf-tests | src/test/java/org/thymeleaf/templateengine/conversion/conversion1/TestStandardConversionService1.java | Java | apache-2.0 | 1,379 |
package com.jongsoft.harvester.query.neo4j;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.jongsoft.harvester.query.NotOperator;
import com.jongsoft.harvester.query.Operation;
/**
*
* @author gerben
*/
@JsonTypeName(value = "not")
public class... | gjong/web-harvester | repository/src/main/java/com/jongsoft/harvester/query/neo4j/Neo4jNotOperator.java | Java | apache-2.0 | 736 |
package org.immutables.samples.json.immutables;
import org.immutables.moshi.Json;
import com.google.common.base.Optional;
import java.util.List;
import java.util.Set;
import javax.annotation.Nullable;
import org.immutables.gson.Gson;
import org.immutables.value.Value;
@Value.Immutable
@Value.Enclosing
@Gson.TypeAdapt... | immutables/samples | json/src/org/immutables/samples/json/immutables/Gocument.java | Java | apache-2.0 | 1,088 |
package ru.job4j.cartrade.controller.main;
import com.google.gson.Gson;
import ru.job4j.cartrade.controller.authorization.UserIdentification;
import ru.job4j.cartrade.model.advertisement.Advertisement;
import ru.job4j.cartrade.model.user.User;
import ru.job4j.cartrade.storage.Storage;
import ru.job4j.cartrade.storage.... | TimKap/tkapkaev | chapter_008/src/main/java/ru/job4j/cartrade/controller/main/ChangeStatus.java | Java | apache-2.0 | 2,344 |
package info.u250.c2d.accessors;
import info.u250.c2d.engine.Flip3DCamera;
import aurelienribon.tweenengine.TweenAccessor;
/** change some attributes of the camera
* @author lycying@gmail.com*/
public class Flip3DCameraAccessor implements TweenAccessor<Flip3DCamera>{
public final static int Zoom = 1;
public final... | shiguang1120/c2d-engine | c2d/src/info/u250/c2d/accessors/Flip3DCameraAccessor.java | Java | apache-2.0 | 1,502 |
/*
* 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 not ... | smanvi-pivotal/geode | geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestFunctionExecuteDUnitTest.java | Java | apache-2.0 | 4,913 |