blob_id stringlengths 40 40 | language stringclasses 1
value | repo_name stringlengths 5 132 | path stringlengths 2 382 | src_encoding stringclasses 34
values | length_bytes int64 9 3.8M | score float64 1.5 4.94 | int_score int64 2 5 | detected_licenses listlengths 0 142 | license_type stringclasses 2
values | text stringlengths 9 3.8M | download_success bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|
5394f67d66368d132690fb80449fc3cbd94f98ac | Java | YangHua1011/game-fir | /src/com/javastudy/game/drawcard/App.java | UTF-8 | 198 | 1.820313 | 2 | [
"MIT"
] | permissive | package com.javastudy.game.drawcard;
import com.javastudy.game.drawcard.model.Game;
public class App {
public static void main(String[] args) {
Game game=new Game();
game.start();
}
}
| true |
8e675bfbcc361fdc5990b9310c117caf821daf8e | Java | u201515982/PSI | /TicketApp/app/src/main/java/com/psi/ticketapp/CreateTicket.java | UTF-8 | 19,789 | 1.757813 | 2 | [] | no_license | package com.psi.ticketapp;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.os.Bundle;
import android.view.ContextTh... | true |
cdb8b40db937ac5408817eb1edec98e621a367a7 | Java | jasonthorne/OCA_JavaProgrammer | /Workspace/Section1.5/src/com/android/Insect.java | UTF-8 | 1,458 | 3.765625 | 4 | [] | no_license | package com.android;
//ONLY concrete classes HAVE TO override the abstract methods of an interface. (which is why this doesnt!):
public abstract class Insect implements Behaviour {
//Overriding the joy() method, but we DONT HAVE TO!
public void joy() {
System.out.println("Insect joy");
}
void crawl() {
... | true |
b287669d6589f35eab0f0035afb3508c24976fb2 | Java | PavellF/snippets | /springMvcWebServer/src/services/NotificationService.java | UTF-8 | 653 | 1.976563 | 2 | [] | no_license | package services;
import java.util.List;
import enums.NotificationType;
import enums.Order;
import enums.Status;
import objects.Notification;
public interface NotificationService {
public Notification send(long by, long forUser, NotificationType notificationType, String content);
public Status expire(List<Long>... | true |
b4b3fc53266efc740dd171919af57796e57153b4 | Java | jlixerkun/ConexionBD | /app/src/main/java/com/example/android/conexionbd/CursoAdapter.java | UTF-8 | 1,309 | 2.453125 | 2 | [] | no_license | package com.example.android.conexionbd;
import android.app.Activity;
import android.content.Context;
import android.support.annotation.LayoutRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View... | true |
f2c45c9f855c763ddc3ad04c52ad1dbe78ab4c7d | Java | krissh-git/workspace | /spring/spring-boot-auth-jwt/src/main/java/com/example/demo/config/JwtTokenUtil.java | UTF-8 | 2,081 | 2.453125 | 2 | [] | no_license | package com.example.demo.config;
import java.util.Arrays;
import java.util.Date;
import java.util.Objects;
import java.util.function.Function;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.stereot... | true |
ae3af58de675184099e5e24d045d5554d06bd907 | Java | nullllun/switch-monitor | /src/main/java/cn/albumenj/switchmonitor/dto/PortStatusDto.java | UTF-8 | 2,123 | 2.1875 | 2 | [] | no_license | package cn.albumenj.switchmonitor.dto;
/**
* 端口状态
*
* @author Albumen
*/
public class PortStatusDto {
private String portIndex;
private Long inData;
private Long outData;
private String des;
private Long inSpeed;
private Long outSpeed;
private Integer speed;
private String name;
... | true |
eb66dc538463063f6533e3d5d51cdb8d65cc1cf8 | Java | jimador/narrative | /core/src/main/java/org/narrative/network/core/user/services/DeleteUserAccountContentTask.java | UTF-8 | 7,870 | 1.8125 | 2 | [
"MIT"
] | permissive | package org.narrative.network.core.user.services;
import org.narrative.common.persistence.OID;
import org.narrative.common.util.SubListIterator;
import org.narrative.network.core.area.user.AreaUser;
import org.narrative.network.core.area.user.AreaUserRlm;
import org.narrative.network.core.cluster.partition.Partition;
... | true |
7c408ec6761dff5ee6a109fa5e6ec7e22e86e28f | Java | wanghengquan/repository | /tmp_client/src/gui_interface/capture_detail.java | UTF-8 | 5,474 | 2.4375 | 2 | [] | no_license | /*
* File: main_frame.java
* Description: Software command line parser definition
* Author: Jason.Wang
* Date:2017/03/11
* Modifier:
* Date:
* Description:
*/
package gui_interface;
import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.GridLayout;
import java.awt.Image;
import... | true |
210ade7a67935c6533a20220264ceef3035dbd6f | Java | michael-spadafora/coms | /src/main/java/seafoamgreen/coms/services/SeriesService.java | UTF-8 | 2,515 | 2.421875 | 2 | [] | no_license | package seafoamgreen.coms.services;
import seafoamgreen.coms.model.Comic;
import seafoamgreen.coms.model.Series;
import seafoamgreen.coms.model.User;
import seafoamgreen.coms.repositories.ComicRepository;
import seafoamgreen.coms.repositories.SeriesRepository;
import seafoamgreen.coms.repositories.UserRepository;
imp... | true |
284c030e99a107fbb0425fe98d342d198495cae8 | Java | alexander-pimenov/lessons-job4j | /chapter_tutorial/src/main/java/ru/job4j/tutorial/list/linkedList3/LinkedContainer.java | UTF-8 | 13,178 | 3.734375 | 4 | [
"Apache-2.0"
] | permissive | package ru.job4j.tutorial.list.linkedList3;
import java.util.Iterator;
/**
* Вся работа в нашем ссылочном контейнере LinkedContainer
* сводится к тому, что бы организовать взаимосвязь между нашими Node.
* Например, перебросить наши ссылки в момент добавления/удаления
* элементов.
* <p>
* Здесь будет реализован ... | true |
b68dd056c686bdff291bd88a60e53829e554d2c4 | Java | jodastephen/kijaro | /kijaro/langtools/test/tools/javadoc/lib/Tester.java | UTF-8 | 11,359 | 2.421875 | 2 | [] | no_license | /*
* Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Fou... | true |
82d17f9b64feedce9dab7657bd5f3dbc93a54442 | Java | brzozos/arkanoid | /TUT/src/Tutu/Game.java | UTF-8 | 3,004 | 2.796875 | 3 | [] | no_license | package Tutu;
import java.awt.Canvas;
import java.awt.Graphics;
import java.awt.image.BufferStrategy;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
public class Game extends Canvas implements Runnable {
private static final long se... | true |
da7cbe1bd63f3f8f5120c5b5d2d7bb18e447fc7e | Java | Ibarra-AZ/Swax | /swax-webservice/src/main/java/swax/webservice/service/user/IUserService.java | UTF-8 | 970 | 1.75 | 2 | [] | no_license | package swax.webservice.service.user;
import java.util.List;
import java.util.Map;
import swax.webservice.entity.user.User;
public interface IUserService {
public List<User> findAll();
public User findByUserId(int userId);
public Integer createUpdateEntity(User user);
public User findByEmailAndPassword(... | true |
a31a6d1a037c6fef32468e3b910979d7724eb330 | Java | zhongxingyu/Seer | /Diff-Raw-Data/2/2_d5ef4b32cfcdcd3603de6d25317f139e949cca2e/UserProviderTest/2_d5ef4b32cfcdcd3603de6d25317f139e949cca2e_UserProviderTest_t.java | UTF-8 | 1,610 | 2.25 | 2 | [] | no_license | package org.timadorus.webapp.tests.server;
import junit.framework.Assert;
import org.junit.Before;
import org.junit.Test;
import org.timadorus.webapp.beans.User;
import org.timadorus.webapp.server.rpc.service.UserServiceImpl;
public class UserProviderTest {
private User user1;
... | true |
af6869c1a10c83c68396dd596e4f630378ef4c71 | Java | Rune-Status/open-osrs-osrs-android | /src/main/java/hj.java | UTF-8 | 19,704 | 1.703125 | 2 | [] | no_license | public class hj extends bm {
int ad;
int ae;
df aj;
int al;
int an;
int ap;
int aq;
int ar;
int ax;
static final int ba = 0x7F;
static final int bs = 10;
static es ga;
hj(int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, boolean arg9, bm arg10) {
... | true |
8453f4a357d36b0cc5a9b7dc778a58a51b2a8a4a | Java | pranudech/MJURescueWeb | /MJURescueSystem/src/com/itsci/mjurescue/staff/web/removespecifications/SpecificationsBean.java | UTF-8 | 3,250 | 1.796875 | 2 | [] | no_license | package com.itsci.mjurescue.staff.web.removespecifications;
import java.util.Vector;
public class SpecificationsBean {
private int FormStaffID;
private String numberOperations;
private String receiveNotification;
private String accidentLocation;
private String statusCase;
private String licensePlate;
... | true |
2611ca3a421ee840d94681faed544bc2f8760b64 | Java | stetter/dh_art_-_museum | /app/src/main/java/com/stetter/dhartmuseum/service/MyFirebaseMessagingService.java | UTF-8 | 2,937 | 2.25 | 2 | [] | no_license | package com.stetter.dhartmuseum.service;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.media.RingtoneManager;... | true |
3513b6ada144a184e048642037c0e77c68c9d3c2 | Java | chodkos/event-manager | /src/main/java/pl/training/backend/model/MeetingRepository.java | UTF-8 | 221 | 1.5 | 2 | [] | no_license | package pl.training.backend.model;
import org.springframework.data.jpa.repository.JpaRepository;
/**
* Created by Raynor on 2017-07-26.
*/
public interface MeetingRepository extends JpaRepository<Meeting, Long> {
}
| true |
51e9125d77d429cdd615b486b9dc871cbe49df7f | Java | Marveliu/marvel-springboot | /marvel-web/src/main/java/com/marveliu/web/dao/entity/Resource.java | UTF-8 | 1,647 | 2.234375 | 2 | [
"Apache-2.0"
] | permissive | package com.marveliu.web.dao.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.marveliu.web.component.domain.AbstractModel;
import lombok.Data;
import lombok.ToString;
import org.hibernate.annotations.Target;
import javax.persistence.*;
import java.util.List;
/**
* @Author: Marveliu
* @Date: 2... | true |
ab4b9b0b66d2cb682b82cfc6c6a8f8f83e5d80ec | Java | 0Gz2bflQyU0hpW/portal | /falcon/src/main/java/com/weibo/dip/data/platform/falcon/kafka/metric/ZookeeperOperation.java | UTF-8 | 7,900 | 2.34375 | 2 | [] | no_license | package com.weibo.dip.data.platform.falcon.kafka.metric;
import com.weibo.dip.data.platform.commons.util.GsonUtil;
import org.apache.commons.lang.exception.ExceptionUtils;
import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.WatchedEvent;
import org.apache.zookeeper.Watcher;
import org.apache.zooke... | true |
cbb037b4181c60d6a80f5846a04b07235cd1147c | Java | zhoyuhao/dzw | /src/main/java/com/accp/action/zyh/zyhServiceAction.java | UTF-8 | 3,780 | 2.1875 | 2 | [] | no_license | package com.accp.action.zyh;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotati... | true |
d84badda0153df130aca84e9cfe04fa29aa1e1da | Java | RagavanPV/HotelManagementSystemJDBC | /src/main/java/com/ragavan/dao/FoodTypeDAO.java | UTF-8 | 2,271 | 2.578125 | 3 | [] | no_license | package com.ragavan.dao;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
import org.springframework.jdbc.core.JdbcTemplate;
import com.ragavan.model.FoodType;
import com.ragavan.util.ConnectionUtil;
public class FoodTypeDAO {
JdbcTemplate jdbcTemplate = ConnectionUtil.getJdbcTemplat... | true |
ea2c67f68b40863e229ba7914a126070551d436c | Java | melhindi/java_client-server_template | /src/main/java/clientServer_template/TCPServer.java | UTF-8 | 1,188 | 3.0625 | 3 | [
"Apache-2.0"
] | permissive | package clientServer_template;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.SocketException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class TCPServer extends Thread {
private AbstractHandler handler;
private Serve... | true |
03c0b6008a144f3caa90045f0ec9a091a1eb0c35 | Java | heilexuan/Selenium-Auto-Test | /Source/src/com/excelsh/core/common/PropertiesManager.java | UTF-8 | 772 | 2.296875 | 2 | [] | no_license | /**
*
*/
package com.excelsh.core.common;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;
/**
* @author loki
*
*/
public class PropertiesManager {
public Properties loadProperties(String straPropFilePath,String strapropName){
//... | true |
e83bc98cce96e180cf19663c67d54c8bf5d07ce2 | Java | tobias-jenkner/org.eclipse.ece2011.roguebundles | /org.eclipse.ece2011.roguebundles.bundlejail/src/org/eclipse/ece2011/roguebundles/bundlejail/resolverhook/BundleJailResolverHookFactory.java | UTF-8 | 612 | 1.898438 | 2 | [] | no_license | package org.eclipse.ece2011.roguebundles.bundlejail.resolverhook;
import java.util.Collection;
import org.osgi.framework.hooks.resolver.ResolverHook;
import org.osgi.framework.hooks.resolver.ResolverHookFactory;
import org.osgi.framework.wiring.BundleRevision;
/**
* {@link ResolverHookFactory} that creates... | true |
533c6370b127b9936cfca2b3f2ef020614619de8 | Java | chihobear/OutBreak | /src/model/LevelItem.java | UTF-8 | 779 | 2.796875 | 3 | [] | no_license | package model;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.Observable;
import javafx.scene.Node;
/**
* Represents a single item in the level.
*
* @author Chenghao Xiong
*
*/
public abstract class LevelItem extends Observable {
// Shapes to represe... | true |
25587dd80f7ba99b6dfaa4c0d02c24764a6d10c1 | Java | EduardoGit-1/ServerSocketProject | /Server/src/project/payload/PresencesAndMessagesResponse.java | UTF-8 | 1,070 | 2.140625 | 2 | [] | no_license | /*
* 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 project.payload;
import java.util.ArrayList;
import project.model.Message;
/**
*
* @author Eduardo
*/
publ... | true |
6bd3b7db2c68bbfa233c013ce9c75ce67d401f88 | Java | lf1175914768/redis-java | /src/main/java/com/qb/utils/JedisService.java | UTF-8 | 406 | 1.8125 | 2 | [] | no_license | package com.qb.utils;
/**
* @author Liufeng
* Created on 2018年9月6日 下午11:10:56
*/
public interface JedisService {
/**
* The default password.
*/
String DEFAULT_PASSWORD = "xyyyhtl12";
/**
* The default port.
*/
int DEFAULT_PORT = 6379;
/**
* The default host.
*/
String DEFAULT_HOST = "localho... | true |
d16469ab360d630bba6f2bf7e9db010861ab108f | Java | loicbarrault/MANY | /src/edu/lium/mt/MANY.java | UTF-8 | 13,671 | 1.695313 | 2 | [] | no_license | /*
* Copyright 2009 Loic BARRAULT.
* Portions Copyright BBN and UMD (see LICENSE_TERP.txt).
* Portions Copyright 1999-2008 CMU (see LICENSE_SPHINX4.txt).
* All Rights Reserved. Use is subject to license terms.
*
* See the file "LICENSE.txt" for information on usage and
* redistribution of this file, and fo... | true |
fbe9a573a2757ae5e288a59b5892be19d8f4b7d7 | Java | aashigupta165/Smart-Class | /app/src/main/java/com/education/smartclass/modules/Organisation/fragments/OrganisationProfileFragment.java | UTF-8 | 2,586 | 2.125 | 2 | [] | no_license | package com.education.smartclass.modules.Organisation.fragments;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.os.Handler;
import android.os.StrictMode;
import android.view.LayoutInflater;
import android.view.Vie... | true |
4f7e75c5b683ba1e9c6ab9a02ae97269fc4b777e | Java | NoaBoston/JavaProjects | /Yahtzee/src/ScoreKeeping.java | UTF-8 | 3,225 | 3.0625 | 3 | [] | no_license | public class ScoreKeeping
{
public static boolean[][] used(String inputChoiceString, boolean[][] inputUsed, int playerNumber, int numberPlayers, int[] inputDice, int[][] inputPrinting)
{
String lastCase;
int inputChoice = Integer.parseInt(inputChoiceString);
boolean[][] outputUsed;
if (inputChoice == 0)
... | true |
7128732d9dd04981d9c15419e8ea9293821ac772 | Java | cgarchbold/battle-game | /src/soldiers/Barbarian.java | UTF-8 | 1,724 | 3.578125 | 4 | [] | no_license | package soldiers;
import java.awt.Color;
public class Barbarian extends Warrior{
private boolean angry;
//constructor
public Barbarian(boolean ev){
super(ev);
//setting armor to half
setArmor(getArmor()/2);
//set block chance to false
setBlockChance(getBlockChance()/2);
//a barbarian is... | true |
505fac3d348a34fdf56258b005f8e990a8d593fc | Java | drummduck/allMySchoolStuff | /CS4150/CS4150 PS3-2/src/PS3_2/Select.java | UTF-8 | 761 | 3.28125 | 3 | [] | no_license | package PS3_2;
import java.lang.reflect.Array;
public class Select {
public static void main(String[] args) {
int[] A = {2, 5, 7, 22};
int[] B = {7, 8, 9, 14};
System.out.println(find(A, 0, A.length-1, B, 0, B.length-1, 4));
}
public static int find(int[] A, int loA, int hiA, int[] B, int loB, int hiB,... | true |
19ad329ea0b6929a57339301c9ed4b42c9a93731 | Java | Evincere/mateu-mdd | /mdd-core/src/main/java/io/mateu/mdd/core/app/MDDRunnableAction.java | UTF-8 | 228 | 2.078125 | 2 | [
"Beerware"
] | permissive | package io.mateu.mdd.core.app;
public abstract class MDDRunnableAction extends AbstractAction {
public MDDRunnableAction(String caption) {
super(caption);
}
public abstract void run() throws Throwable;
}
| true |
9c02a871f532724085e10047b56fb7a536c1805c | Java | kushan22/Startup-Firstcopy | /app/src/main/java/com/socialbuy/firstcopy/adapters/MyCustomPagerAdapter.java | UTF-8 | 2,418 | 2.390625 | 2 | [] | no_license | package com.socialbuy.firstcopy.adapters;
import android.content.Context;
import android.graphics.Typeface;
import android.os.Parcelable;
import android.support.v4.view.PagerAdapter;
import android.support.v7.widget.CardView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
... | true |
86f7177ce4c99d387d9fbd1f2bd3d552b77b356d | Java | HHIED/MobileSystemsApp | /CleanTheStreet/app/src/main/java/dk/sdu/lahan14/cleanthestreet/Util/User.java | UTF-8 | 548 | 2.5 | 2 | [] | no_license | package dk.sdu.lahan14.cleanthestreet.Util;
/**
* Created by Simon-PC on 21-11-2017.
*/
public class User {
public static int userId;
private int id;
private String name;
public int getId() {
return id;
}
public String getName() {
return name;
}
public void setId(... | true |
fe8686681da6715645d7a8da3c6c316356983f99 | Java | 84EH-FHJ4-2K5L/INT8-CL1N-GT42 | /main/java/gregtech/api/food/FoodValues.java | UTF-8 | 1,504 | 2.8125 | 3 | [] | no_license | package gregtech.api.food;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
public class FoodValues
{
public final int hunger;
public final float saturationModifier;
public FoodValues(int hunger, float saturationModifier)
{
this.hunger = hunger;
this.saturationModifier = ... | true |
e56126891188fb3a9f34c15556527bc1dee04d52 | Java | Softwerke-Java-School-2018/kabanov | /src/main/java/com/softwerke/salesregister/menu/browselist/BrowseInvoiceListMenu.java | UTF-8 | 2,251 | 2.515625 | 3 | [] | no_license | package com.softwerke.salesregister.menu.browselist;
import com.softwerke.salesregister.io.Formatter;
import com.softwerke.salesregister.io.StringLiterals;
import com.softwerke.salesregister.menu.base.Menu;
import com.softwerke.salesregister.menu.base.MenuItem;
import com.softwerke.salesregister.menu.filterlist.Filter... | true |
8d1b2ea1163aea8a6d114f111360e82fb027c60a | Java | Nayeemr45/Project1 | /Admin_show.java | UTF-8 | 1,589 | 2.90625 | 3 | [] | no_license | import java.awt.Button;
import java.awt.Color;
import java.awt.FlowLayout;
import java.awt.Frame;
import java.awt.Graphics;
import java.awt.Label;
import java.awt.TextArea;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.ResultSet;
public class Admin_show extends Fra... | true |
ca3b559ed3afdeae405c87d3a4a325480f65e25b | Java | neolord0/webserver | /src/main/java/kr/dogfoot/webserver/server/resource/performer/NegoFilePerformer.java | UTF-8 | 5,496 | 2.140625 | 2 | [] | no_license | package kr.dogfoot.webserver.server.resource.performer;
import kr.dogfoot.webserver.httpMessage.header.HeaderItem;
import kr.dogfoot.webserver.httpMessage.header.HeaderList;
import kr.dogfoot.webserver.httpMessage.header.HeaderSort;
import kr.dogfoot.webserver.httpMessage.header.valueobj.HeaderValue;
import kr.dogfoo... | true |
5db6d501f66fa9a94cc05b0dfa241c6f9ea0c36f | Java | Bryanavalos-dev/LabSys | /build/web/WEB-INF/lib/src/java/interfaz/CRUD_Horario.java | UTF-8 | 276 | 1.820313 | 2 | [] | no_license | package interfaz;
import modelo.Horario;
import java.util.List;
public interface CRUD_Horario {
public List listar();
public Horario list(int id);
public boolean add(Horario per);
public boolean edit(Horario per);
public boolean eliminar(int id);
}
| true |
445a32835f8ba586a6f40d4cb493ac14ac820e74 | Java | XinyiYan/Fotag | /src/main/java/ImageView.java | UTF-8 | 1,212 | 3.0625 | 3 | [] | no_license | import javax.swing.*;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
public class ImageView extends JPanel implements Observer{
private ImageModel imageModel;
private Dimension imageDim = new Dimension(300, 250);
public ImageView(ImageModel imodel) {
... | true |
4e5c8b8570de58940b8d1b209745de2ab3ce3ca4 | Java | yuanjinliang1/Scientific-Award-of-CIC | /src/main/java/com/dicipulus/app/JDBC/SixthPaperMonographNTJdbc.java | UTF-8 | 3,003 | 2.28125 | 2 | [] | no_license | package com.dicipulus.app.JDBC;
import java.util.List;
import javax.sql.DataSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;
import com.dic... | true |
3adf351e2efa0a1aa0d186e4734345cf90bfe102 | Java | AbertLi/testProject | /FistTestProject/sample/bundle_two/src/main/java/one/example/com/bundletwo/AdViewOneItem.java | UTF-8 | 1,067 | 2.125 | 2 | [] | no_license | package one.example.com.bundletwo;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import java.util.Map;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import one.example.com.myapplication3.R;
import ... | true |
3e9885e64cc73df67ca81c249aa389639d1f12a3 | Java | turgot/test | /src/main/java/com/icanbuy/utils/ApiTemplates/ResponseContent/LENDER_LOGO_CLICK_URL.java | UTF-8 | 872 | 2.53125 | 3 | [] | no_license | package com.icanbuy.utils.ApiTemplates.ResponseContent;
/**
* <p>«LENDER_LOGO_CLICK_URL» tag (class name is used as tag name so should be like in response)</p>
* <p>From api doc: «Use this path when you want to submit a click to the Informa platform. This click will redirect
* the user to the lenders landing page»<... | true |
bd311c3df7d652b6bb59011208de4238a45b9f68 | Java | caiolarroza/SCS-Medicamentos | /SistemaFarmacia/src/DAO/DinheiroDAO.java | UTF-8 | 3,528 | 2.71875 | 3 | [] | no_license | /*
* 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 DAO;
import Model.Dinheiro;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import... | true |
55ddd70ec42260a0dc047b4086aef659496e830c | Java | AthinaZintro/Thesis_AthinaZintro | /src/register/FileManagerFactory.java | UTF-8 | 132 | 1.8125 | 2 | [] | no_license | package register;
public class FileManagerFactory {
public IFileManager generateFileManager() {
return new FileManager();
}
}
| true |
2cf8abf59fbfa5b82383e50bf571279b1e91ce9e | Java | devindi/robo-meter | /robometer/src/main/java/com/devindi/robometer/duration/SimpleTracker.java | UTF-8 | 317 | 2.328125 | 2 | [
"Apache-2.0"
] | permissive | package com.devindi.robometer.duration;
import com.devindi.robometer.Robometer;
import java.util.concurrent.TimeUnit;
public class SimpleTracker {
public void track(String key, long duration, TimeUnit timeUnit) {
Robometer.getInstance().sendMeasurement(new Duration(key, duration, timeUnit));
}
}
| true |
b4e4da4a785d9cd3b4a80062d17f9002b006fae5 | Java | eduardodonato/Exercicios_POO_JAVA | /ExceptionsPersonalizadas/src/ExceptionsPersonalizadas.java | ISO-8859-1 | 1,064 | 4.09375 | 4 | [] | no_license | /*Objetivo: Criar um programa que apresente uma exception personalizada.
Neste caso, a exception ocorrer no momento da diviso de um nmero impar
por um numero par, informando que o resultado gerar um nmero real
(no inteiro) diferente dos tipos dos dois arrays criados*/
public class ExceptionsPersonalizadas{
public st... | true |
e84d9e69c38bcfdba3651b03e36b2b141568351e | Java | jpgros/CycabJava | /Vanet/Vanet/src/engine/GoalEngine.java | UTF-8 | 210 | 2.21875 | 2 | [] | no_license | package engine;
import individual.Population;
public abstract class GoalEngine
{
public abstract boolean searchShouldStop (GeneticEngine genetic, Population population);
public abstract String getName();
}
| true |
5b0ad7df848263fb7901c3ecb75ee9b50018761c | Java | Zjie/704station | /src/main/java/cn/edu/ustb/sem/process/web/model/ProcessSearchForm.java | UTF-8 | 741 | 2.078125 | 2 | [] | no_license | package cn.edu.ustb.sem.process.web.model;
import cn.edu.ustb.sem.core.web.model.SearchFormModel;
public class ProcessSearchForm extends SearchFormModel {
private int pid;
private String phase;
private String content;
private int groupName;
public int getPid() {
return pid;
}
public void setPi... | true |
d694b88d4361222f43a49c1d0225ba3671e3272e | Java | makespace-re-good/backend | /后端/src/main/java/com/xmu/makerspace/model/Team/TeamMessage.java | UTF-8 | 1,449 | 2.21875 | 2 | [] | no_license | package com.xmu.makerspace.model.Team;
/*
用来存放团队列表应该展示的数据
*/
import java.sql.Date;
public class TeamMessage {
int teamId;
String team_name;
String project_name;
String belong_field;
String project_type;
Date register_date;
int message;
public void setTeamId(int teamId) {
this.... | true |
2013806a5d6a6f8a12db7909cf276f60fa99b772 | Java | huiGod/jdk8 | /src/main/java/com/huigod/java8/stream/MapAndFlatMap.java | UTF-8 | 2,196 | 3.796875 | 4 | [] | no_license | package com.huigod.java8.stream;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static java.util.stream.Collectors.toList;
public class MapAndFlatMap {
public static void main(String[] args) {
Student student1 = new Student("zha... | true |
f7cf2d622774b3dae0e62516f895023d18744de5 | Java | hjindal/hackerrank | /src/main/java/hackerrank/algorithms/dp/BricksGame.java | UTF-8 | 1,295 | 3.34375 | 3 | [] | no_license | package hackerrank.algorithms.dp;
import java.util.Scanner;
/**
* Created by hjindal on 9/20/2015.
*/
public class BricksGame {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int t = s.nextInt();
while(t > 0) {
t--;
int n = s.nextInt();
long[] a = ne... | true |
2a0313542f71356d54bd0c2ecd0509db1986b83f | Java | RenMingNeng/xultimate-resource | /xultimate-toolkit/xultimate-shard/src/main/java/org/danielli/xultimate/shard/po/PartitionedTable.java | UTF-8 | 1,201 | 2.1875 | 2 | [] | no_license | package org.danielli.xultimate.shard.po;
import java.io.Serializable;
import java.util.Date;
/**
* 物理分区表。
*
* @author Daniel Li
* @since 15 Jun 2013
*/
public class PartitionedTable implements Serializable {
private static final long serialVersionUID = 5256793836881573L;
/** 标识 */
private Long id;
/** 虚拟表... | true |
6acce3bfaf9fe0155436b91fbd3f6c09d8ee38b7 | Java | rupertwaldron/credential-manager | /src/test/java/com/ruppyrup/credentialmanager/controller/CredentialControllerTest.java | UTF-8 | 8,848 | 1.914063 | 2 | [] | no_license | package com.ruppyrup.credentialmanager.controller;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.ruppyrup.credentialmanager.config.JwtContextManagerTestImpl;
import com.ruppyrup.credentialmanager.dao.CredentialDao;
import com.ruppyrup.credenti... | true |
90c8e67c71d6fb5b4d85c018f46078d733b5c81a | Java | byz8866/niceapp | /app/src/main/java/com/niceapp/service/interfaces/IXlmDepositRecordService.java | UTF-8 | 590 | 2.03125 | 2 | [] | no_license | package com.niceapp.service.interfaces;
import com.niceapp.model.request.EosDepositRecordRequest;
import com.niceapp.model.request.SendMessage;
import com.niceapp.model.result.EosDepositRecordResult;
import com.niceapp.model.result.ResultMessage;
import retrofit2.http.Body;
import retrofit2.http.POST;
import rx.Obser... | true |
18dca0e8b6f302fda3d8a55786f05c536b7f8dd8 | Java | zsdai/gyl | /gyl/src/main/java/com/myself/gyl/business/xsgl/service/impl/XsysServiceImpl.java | UTF-8 | 2,849 | 2.03125 | 2 | [] | no_license | package com.myself.gyl.business.xsgl.service.impl;
import java.util.HashSet;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.myself.gyl.base.dao.BaseDao;
import com.myself.g... | true |
11dbecb14bfa0f9be1183a0b3b1e89730748e8eb | Java | SophyaTs/VI_semester | /OOP/Problem3/src/main/java/server/ServerObject.java | UTF-8 | 2,852 | 3.0625 | 3 | [] | no_license | package server;
import common.MessageObject;
import common.ServerInterface;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
import java.util.concurrent.atomic.AtomicInteger;
public class ServerObject implements ServerInterface {
AtomicInteger numberOfPlayers = new AtomicInteger(0);
... | true |
ec715f0eeea347ed2b7631187775c03e8e9c5b83 | Java | KanadeSong/webserver | /smartmining/src/main/java/com/seater/smartmining/service/impl/CarBrandServiceImpl.java | UTF-8 | 2,111 | 2.140625 | 2 | [] | no_license | package com.seater.smartmining.service.impl;
import com.seater.smartmining.dao.CarBrandDaoI;
import com.seater.smartmining.entity.CarBrand;
import com.seater.smartmining.entity.CarType;
import com.seater.smartmining.service.CarBrandServiceI;
import org.springframework.beans.factory.annotation.Autowired;
import org.spr... | true |
3f3d5a6b47bb7269ea75e0af30a1964d179ea9b8 | Java | zapper59/RangerHale---Space-Adventure | /src/org/enemies/SmashBlock.java | UTF-8 | 2,325 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | package org.enemies;
import java.awt.image.BufferedImage;
import org.items.Health;
import org.players.Player;
import org.resources.Collisions;
import org.resources.ImagePack;
import org.rooms.Room;
import org.walls.Wall;
import static java.lang.Math.*;
public class SmashBlock extends Enemy {
static final BufferedI... | true |
619cfb9c32c90cf613a0e3fce055b27209563a3a | Java | wilbertcargeson/ShadowDefend | /src/PlaneDirection.java | UTF-8 | 110 | 1.929688 | 2 | [] | no_license | /**
* The direction in which the plane flies with
*/
public enum PlaneDirection {
VERTICAL,HORIZONTAL
}
| true |
7f61ff006c7f5b1f819bbacdf2451472f44d42fc | Java | rosylee/Code-Monster | /Code-Monster_complete_SW/20180927/app/src/main/java/com/example/dwu/a20180927/Certification/CertificationActivity.java | UTF-8 | 1,745 | 2.078125 | 2 | [] | no_license | package com.example.dwu.a20180927.Certification;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import com.example.dwu.management.R... | true |
0863e95bc7a0873118b8412042bd7795b12eb1f3 | Java | povloid/voyager | /voyager/src/main/java/pk/home/voyager/service/HotelServiceImpl.java | UTF-8 | 1,129 | 2.453125 | 2 | [] | no_license |
/**
*
*/
package pk.home.voyager.service;
import java.io.Serializable;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import pk.home.pulibs.basic.intefaces.dao.DAOCRUDFunctional;
import ... | true |
feffc4fb65cee0a256c3b90d1d1acd00a825358c | Java | harshwall/MNNITDean | /app/src/main/java/com/example/mnnit/mnnitdean/user.java | UTF-8 | 312 | 2.265625 | 2 | [] | no_license | package com.example.mnnit.mnnitdean;
public class user {
String name,fathername,regno,email;
public user(String name,String fathername,String regno,String email){
this.name=name;
this.fathername=fathername;
this.regno=regno;
this.email=email;
}
user(){
}
}
| true |
333ec5e85491417a2959ab52bf16e77da9e4e5bf | Java | nikitaden03/MyFood | /app/src/main/java/com/example/myfood/components/login/ui/TypeAccountDialog.java | UTF-8 | 673 | 1.78125 | 2 | [] | no_license | package com.example.myfood.components.login.ui;
import android.app.AlertDialog;
import android.app.Dialog;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.DialogFragment;
import com.example.myfood.R;
public class TypeAccountDialog exten... | true |
3e910f430e0fff288154762cf1fc719521b6245f | Java | WeiChungChang/ExoPlayer | /library/src/main/java/com/google/android/exoplayer2/audio/BufferProcessor.java | UTF-8 | 2,372 | 2.421875 | 2 | [
"Apache-2.0"
] | permissive | /*
* Copyright (C) 2017 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... | true |
7b9372396a4488d357d9dae5f666b0462e51da25 | Java | mtaylor/data-broker | /data-ws/src/main/java/com/arjuna/databroker/data/ws/EndpointFactorySetup.java | UTF-8 | 910 | 1.8125 | 2 | [] | no_license | /*
* Copyright (c) 2013-2014, Arjuna Technologies Limited, Newcastle-upon-Tyne, England. All rights reserved.
*/
package com.arjuna.databroker.data.ws;
import java.util.Collections;
import javax.annotation.PostConstruct;
import javax.ejb.EJB;
import javax.ejb.Singleton;
import javax.ejb.Startup;
import com.arjuna.d... | true |
41875237c59dad1395ac27b5a21dd49e6c69b79d | Java | lzd931201/roll_call | /attendance /app/src/main/java/com/example/xiao/attendance/export.java | UTF-8 | 6,726 | 2.03125 | 2 | [] | no_license | package com.example.xiao.attendance;
import android.app.AlertDialog;
import android.content.ContentValues;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Configuration;
import android.database.sqlite.SQLiteDatabase;
import andr... | true |
9e979f454352f84dd763f29aef522b2316033327 | Java | bhasin11/Algorithms-in-Java | /BST/size.java | UTF-8 | 181 | 2.765625 | 3 | [] | no_license | /*
Given a BST, find the number of node in the tree.
*/
public int size(Node root){
if(root!=null){
size(root.leftChild);
size++;
size(root.rightChild);
}
return size;
} | true |
6aaa628cb7011c964c94728648c557621c0b1b76 | Java | saidmh577/PFE2 | /app/src/main/java/com/app/pfe2/MainHome.java | UTF-8 | 828 | 1.742188 | 2 | [] | no_license | package com.app.pfe2;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
public class MainHome extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState... | true |
3b4fa923a9cf0fe3a3737393c259c9ffd49b415b | Java | KenHoang16CDTH12/Library-Manager-Project | /src/kenhoang/refresh/IDataSet.java | UTF-8 | 138 | 1.578125 | 2 | [] | no_license | package kenhoang.refresh;
/**
* Created by sample on 5/28/17.
*/
public interface IDataSet {
public void refreshDataTableBook();
}
| true |
bd1384e9c1bb11bf78039fd7ed712ad98394eb35 | Java | trinodb/trino | /plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/TestingAccumuloServer.java | UTF-8 | 3,796 | 1.929688 | 2 | [
"Apache-2.0"
] | permissive | /*
* 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... | true |
12ff687de0a5b2744a9923887eb2801e340da7b6 | Java | kennycaiguo/itheima-base | /2017-04-15基础班/day10_作业_陈仲尧/src/com/itheima/Test3.java | UTF-8 | 1,378 | 3.265625 | 3 | [] | no_license | package com.itheima;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
/*
分析以下需求,并用代码实现
项目根路径下有text.txt文件,内容如下:
我爱黑马
123456
利用IO流的知识读取text.txt文件的内容反转后写入text.txt文件中
写入后文件的内容为:
654321
马黑爱我
*/
publ... | true |
9afa6dca2b41e7edb5135e9314e5e91868e16e57 | Java | brunotarditi/Proyectos-Java-UTN | /Programacion-2/Practica_1_arreglos/src/map_list/ejercicio_3.java | UTF-8 | 1,792 | 3.875 | 4 | [] | no_license | package map_list;
import java.util.HashMap;
/*
3.(NumPrimos2.java) Almacenar en un arreglo de 10 posiciones los 10
números primos comprendidos entre 100 y 300. Luego mostrarlos en pantalla.
*/
/**
*
* @author Bruno Tarditi
*/
public class ejercicio_3 {
public static void main(String[] args) {
HashM... | true |
c48eace1c53c3fdc370f019a228e032061f88407 | Java | cllkfan/eda-shopping | /src/main/java/com/eda/service/impl/VipServiceImpl.java | UTF-8 | 436 | 1.648438 | 2 | [] | no_license | package com.eda.service.impl;
import com.eda.entity.Vip;
import com.eda.service.VipService;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import javax.annotation.Resource;
/**
* (Vip)表服务实现类
*
* @author makejava
* @sinc... | true |
cb7fed6c70120b456662313de39db0c4de8fbfba | Java | thisfardi/keibai-api | /src/main/java/servlets/user/UserUpdateCredit.java | UTF-8 | 2,860 | 2.390625 | 2 | [
"Apache-2.0"
] | permissive | package main.java.servlets.user;
import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
import main.java.dao.DAOException;
import main.java.dao.UserDAO;
import main.java.dao.sql.UserDAOSQL;
import main.java.gson.BetterGson;
import main.java.models.User;
import main.java.utils.HttpRequest;
import main... | true |
908eedd18e28fb15f6684f323bb0d4dc933434e4 | Java | Manifold0/adcom_decompile | /sources/com/google/android/gms/games/stats/Stats.java | UTF-8 | 617 | 1.789063 | 2 | [] | no_license | package com.google.android.gms.games.stats;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.common.api.PendingResult;
import com.google.android.gms.common.api.Releasable;
import com.google.android.gms.common.api.Result;
import com.google.android.gms.common.util.VisibleForTesting... | true |
9f1e227207d55398fe4690e0c445058d4b70ab76 | Java | pointer95/leetcode | /algorithms/java/src/permutations/Solution.java | UTF-8 | 1,054 | 3.1875 | 3 | [] | no_license | package permutations;
import java.util.ArrayList;
import java.util.List;
/**
* source: https://leetcode-cn.com/problems/permutations/
* date: 2019/10/29
*/
class Solution {
public List<List<Integer>> permute(int[] nums) {
List<List<Integer>> res = new ArrayList<>();
if (nums.length == 0) return... | true |
e5497c2e0261f05d0eed3d96166ecdc1c4e00ab2 | Java | sebastienduche/MyCellar | /src/mycellar/search/SearchTableModel.java | UTF-8 | 4,016 | 2.25 | 2 | [] | no_license | package mycellar.search;
import mycellar.MyCellarUtils;
import mycellar.Program;
import mycellar.core.MyCellarObject;
import mycellar.core.text.LabelProperty;
import mycellar.general.ProgramPanels;
import javax.swing.table.AbstractTableModel;
import java.util.ArrayList;
import java.util.List;
import static mycellar.... | true |
351a9072e360defaa46611019d1ea2012a8ace60 | Java | CoderNoOne/Hibernate-Project | /src/main/java/converters/impl/ProductDtoListJsonConverter.java | UTF-8 | 283 | 1.820313 | 2 | [
"MIT"
] | permissive | package converters.impl;
import converters.JsonConverter;
import dto.ProductDto;
import java.util.List;
public class ProductDtoListJsonConverter extends JsonConverter <List<ProductDto>> {
public ProductDtoListJsonConverter(String jsonFilename) {
super(jsonFilename);
}
}
| true |
7e0322be204d41079bc46e2d6f54ddc99d6b382a | Java | hyponet/ayanami | /src/main/java/xyz/acmer/service/impl/ContestServiceImpl.java | UTF-8 | 14,027 | 2.328125 | 2 | [
"MIT"
] | permissive | package xyz.acmer.service.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import xyz.acmer.entity.contest.ContestAnnouncement;
import xyz.acmer.entity.contest.ContestInfo;
import xyz.acmer.entity.contest.ContestProblem;
import xyz.acmer.entity.contest... | true |
dfc0a89a6899f3946137969d4820383a0e8a3a2d | Java | 5mm/balsize | /Source/DontTouchMe/DontTouchMe/app/src/main/java/com/devroo/donttouchme/FourFragment.java | UTF-8 | 3,337 | 2.40625 | 2 | [] | no_license | package com.devroo.donttouchme;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterV... | true |
66d0073c268f62be5d3b9040d47c69559105368b | Java | mrajput-systango/movies-app-android | /app/src/main/java/com/otb/mvvmboilerplate/viewmodel/MoviesViewModel.java | UTF-8 | 1,587 | 2.390625 | 2 | [] | no_license | package com.otb.mvvmboilerplate.viewmodel;
import android.arch.lifecycle.MutableLiveData;
import android.arch.lifecycle.ViewModel;
import com.otb.mvvmboilerplate.data.MovieRepository;
import com.otb.mvvmboilerplate.network.response.ApiResponse;
import javax.inject.Inject;
import io.reactivex.android.schedulers.Andr... | true |
adfd81be130b2695944204507c0ea22361879756 | Java | nikitasah/Library-Management | /src/main/java/com/utd/libmgmnt/model/Fine.java | UTF-8 | 1,046 | 2.828125 | 3 | [] | no_license | package com.utd.libmgmnt.model;
/*
* Description : Author is used to get and set the parameters of the fine table in the application.
* @author : nikita
*/
public class Fine {
private int loanId;
private float fineAmt;
private boolean paid;
private Loan loan;
private Borrower borrower;
public Borrower getB... | true |
e42bd275a2d5de99ad1aa267e11754f79f565356 | Java | csr88/Java_Codes | /TernaryOperators.java | UTF-8 | 952 | 4.1875 | 4 | [] | no_license | package com.company;
public class TernaryOperators {
public static void main(String[] args) {
//know if the number num is even or odd
int num = 10;
String res;
//if remainder of num/2 is true i.e. 0 then it will give even if it is false then print odd
res = (num%2==0)?"even"... | true |
a5dc26770a3cf4f42420ff917ff7835a1b256561 | Java | forste/tagaprice | /src/main/java/org/tagaprice/client/gwt/shared/logging/LoggerFactory.java | UTF-8 | 205 | 1.890625 | 2 | [] | no_license | package org.tagaprice.client.gwt.shared.logging;
public class LoggerFactory {
@SuppressWarnings("rawtypes")
public static MyLogger getLogger(Class theClass) {
return new MyLoggerImpl(theClass);
}
}
| true |
12aece8f55c4ce251c621a3dedc781ced914c45f | Java | mingwei-cheng/spring-cloud-seata-demo | /common/src/main/java/ch/cheng/seata/service/AccountService.java | UTF-8 | 249 | 1.820313 | 2 | [] | no_license | package ch.cheng.seata.service;
public interface AccountService {
/**
* 扣减用户余额
*
* @param userId 用户id
* @param price 价格
*/
Boolean reduceBalance(Long userId, Integer price) throws Exception;
}
| true |
8c4bcababd5691066ae144c20d701c3063f98e33 | Java | wubo19961213/HelloWorld | /src/com/Animal/Animal.java | GB18030 | 268 | 3.34375 | 3 | [] | no_license | package com.Animal;
public abstract class Animal {
protected int legs;
protected Animal(int legs) {
this.legs = legs;
}
public abstract void eat();
public void walk(Animal a) {
System.out.println("Ǹ"+a.legs+"·Ķ");
}
}
| true |
6ca2a98f760599ddfde02447937f9e022a3a62ec | Java | leetcode-1533/Leetcode_Practice | /insertion_sort_list/Solution.java | UTF-8 | 1,571 | 3.25 | 3 | [] | no_license | package insertion_sort_list;
import edu.princeton.cs.algs4.StdOut;
public class Solution {
public ListNode insertionSortList(ListNode head) {
if(head == null) {
return null;
}
ListNode dummy = new ListNode(0);
dummy.next = head;
// ListNode pointer = head;
... | true |
ddd46e7814a6ad0b585b112de8949bf7782c4631 | Java | anilrewatown/eclipse-workspace | /PracticeJava/src/streamapi/Test1.java | UTF-8 | 1,194 | 2.796875 | 3 | [] | no_license | package streamapi;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
public class Test1 {
public static void main(String[] args) {
String s = "my name is anil and my country name is in... | true |
d25627b072d65c191ed6579872bef10153c67ea0 | Java | dnoise/IG-6.9.1-decompiled | /src/com/instagram/android/directshare/d/o.java | UTF-8 | 764 | 1.609375 | 2 | [] | no_license | // Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.instagram.android.directshare.d;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.In... | true |
7bd543c064f968e4bbeca05122bc19c0d9ac7a41 | Java | yaneeves/Interview | /src/main/java/com/mobli/interview/broker/MessageBrokerImpl.java | UTF-8 | 464 | 2.0625 | 2 | [] | no_license | package com.mobli.interview.broker;
import com.mobli.interview.consumer.SmsConsumer;
import com.mobli.interview.data.SmsMessage;
public class MessageBrokerImpl implements MessageBroker {
@Override
public void addSubscriber(SmsConsumer consumer) {
}
@Override
public void removeSubscriber(SmsConsu... | true |
47992853bd7e6e4488d53b386c317f26848c04cd | Java | capybarin/DB_Client | /src/sample/controllers/AddManufacture.java | UTF-8 | 1,242 | 2.53125 | 3 | [] | no_license | package sample.controllers;
import io.reactivex.Scheduler;
import io.reactivex.rxjavafx.schedulers.JavaFxScheduler;
import io.reactivex.schedulers.Schedulers;
import javafx.event.ActionEvent;
import javafx.scene.Node;
import javafx.scene.control.TextField;
import sample.data.Database;
public class AddManufacture {
... | true |
f49ebac21b7d16d93dc8919759c21acaa199269c | Java | sunkaiiii/instabtbu | /instabtbu/src/main/java/hk/ypw/instabtbu/xiaoyuanka_guashi.java | UTF-8 | 1,062 | 1.984375 | 2 | [] | no_license | package hk.ypw.instabtbu;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.view.View;
import android.widget.RelativeLayout.LayoutParams;
import me.imid.swipebacklayout.lib.ap... | true |
837170ac39a2a4e1f776063b2a8f5ecb91bb0b2d | Java | travel-cloud/Cheddar | /cheddar/cheddar-integration-aws/src/main/java/com/clicktravel/infrastructure/persistence/aws/elasticache/MemcachedItemCache.java | UTF-8 | 2,256 | 2.34375 | 2 | [
"Apache-2.0"
] | permissive | /*
* Copyright 2014 Click Travel 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 ... | true |
fd33517682939bf7f87612e0e494034ac1022197 | Java | ibisTime/xn-forum | /src/main/java/com/std/forum/api/impl/XN610025.java | UTF-8 | 1,724 | 2.078125 | 2 | [] | no_license | package com.std.forum.api.impl;
import org.apache.commons.lang3.StringUtils;
import com.std.forum.ao.IBplateAO;
import com.std.forum.ao.IBplateTemplateAO;
import com.std.forum.api.AProcessor;
import com.std.forum.common.JsonUtil;
import com.std.forum.core.StringValidater;
import com.std.forum.domain.Bplate;
... | true |
3bb07f0b0e54f9f9d5108c92fdbc76dbd01f22e7 | Java | evtimovi/MemoryManagers | /Process.java | UTF-8 | 7,370 | 3.609375 | 4 | [] | no_license | /**
* represents a process and thus holds a page table and allows the Controller to tell it to read or write from a given virtual address.
*
* CS 406 Operating Systems
* Spring 2016, Lafayette College
* Professor Amir Sadovnik
*
* Project 3
*
* Renan Dincer and Ivan Evtimov
*
* @author Renan Dincer
* @autho... | true |
32c06ef2102526da665d88055b9e0733fb04da7f | Java | CleanstoneMC/Cleanstone | /src/main/java/rocks/cleanstone/endpoint/minecraft/vanilla/modern/v1_14/net/protocol/MinecraftProtocolLayer_v1_14_3.java | UTF-8 | 848 | 1.90625 | 2 | [
"MIT",
"CC-BY-4.0"
] | permissive | package rocks.cleanstone.endpoint.minecraft.vanilla.modern.v1_14.net.protocol;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import rocks.cleanstone.endpoint.minecraft.vanilla.net.protocol.MinecraftClientProtocolLayer;
import rocks.cleanstone.net.packet... | true |