blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 7
390
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
35
| license_type
stringclasses 2
values | repo_name
stringlengths 6
132
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringclasses 539
values | visit_date
timestamp[us]date 2016-08-02 21:09:20
2023-09-06 10:10:07
| revision_date
timestamp[us]date 1990-01-30 01:55:47
2023-09-05 21:45:37
| committer_date
timestamp[us]date 2003-07-12 18:48:29
2023-09-05 21:45:37
| github_id
int64 7.28k
684M
⌀ | star_events_count
int64 0
77.7k
| fork_events_count
int64 0
48k
| gha_license_id
stringclasses 13
values | gha_event_created_at
timestamp[us]date 2012-06-11 04:05:37
2023-09-14 21:59:18
⌀ | gha_created_at
timestamp[us]date 2008-05-22 07:58:19
2023-08-28 02:39:21
⌀ | gha_language
stringclasses 62
values | src_encoding
stringclasses 26
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 128
12.8k
| extension
stringclasses 11
values | content
stringlengths 128
8.19k
| authors
listlengths 1
1
| author_id
stringlengths 1
79
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ce78b8dac91b1217a7d2b333e003cd7ee18392e7
|
cb91955a8a42f3084170c80f600ab98c17611201
|
/src/de/jungblut/nlp/mr/TextIntPairWritable.java
|
bb9c40252c3d016493178bd65f2f87e6d1319298
|
[
"Apache-2.0"
] |
permissive
|
EtashGuha/thomasjungblut-common
|
bb4c5279feb95e2127295b328b86d74d069b2bb8
|
26c694dfbf43259394f95a0e88b7114b1b89122a
|
refs/heads/master
| 2020-03-28T07:24:04.294149
| 2017-07-01T16:46:50
| 2017-07-01T16:46:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,321
|
java
|
package de.jungblut.nlp.mr;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.io.WritableComparable;
import com.google.common.collect.ComparisonChain;
public final class TextIntPairWritable implements
WritableComparable<TextIntPairWritable> {
private Text first;
private IntWritable second;
public TextIntPairWritable() {
}
public TextIntPairWritable(Text first, IntWritable second) {
this.first = first;
this.second = second;
}
@Override
public void readFields(DataInput in) throws IOException {
first = new Text();
first.readFields(in);
second = new IntWritable();
second.readFields(in);
}
@Override
public void write(DataOutput out) throws IOException {
first.write(out);
second.write(out);
}
@Override
public int compareTo(TextIntPairWritable o) {
return ComparisonChain.start().compare(first, o.first)
.compare(second, o.second).result();
}
public Text getFirst() {
return first;
}
public IntWritable getSecond() {
return second;
}
@Override
public String toString() {
return "Pair [" + (first != null ? "first=" + first + ", " : "")
+ (second != null ? "second=" + second : "") + "]";
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((first == null) ? 0 : first.hashCode());
result = prime * result + ((second == null) ? 0 : second.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
TextIntPairWritable other = (TextIntPairWritable) obj;
if (first == null) {
if (other.first != null) {
return false;
}
} else if (!first.equals(other.first)) {
return false;
}
if (second == null) {
if (other.second != null) {
return false;
}
} else if (!second.equals(other.second)) {
return false;
}
return true;
}
}
|
[
"thomas.jungblut@gmail.com"
] |
thomas.jungblut@gmail.com
|
78acb8b54f52fe495053eb2ef0a994addb5c511b
|
38f884715438585d662becdfeb11477217379b60
|
/PracticaUnidad4 POO/Juego.java
|
2f604a910533083d2ceef59d3296c0c92045bb26
|
[] |
no_license
|
GabrielaGonzales/Fundamentos-e-introduccion-a-la-programacion-en-java
|
0e4d4202ed6f27c096c764e6b984fcd620dc3414
|
1f5cee02c8242cacee41cbd0bcde02f4f48dc205
|
refs/heads/main
| 2023-04-16T11:29:31.160584
| 2021-04-23T22:44:18
| 2021-04-23T22:44:18
| 347,158,022
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,786
|
java
|
public class Juego {
private int intentosJugador;
private int coordenadaX;
private int coordenadaY;
public Juego() {
intentosJugador = 3;
coordenadaX = (int) (Math.random()*11);
coordenadaY = (int) (Math.random()*11);
}
public String jugar(int numX, int numY){
String mensaje;
String mensajeX;
String mensajeY;
String m = " ";
if(intentosJugador > 0){
intentosJugador = intentosJugador - 1;
if(numX == coordenadaX){
mensajeX = "X esta en su posicion // ";
if(numY == coordenadaY){
mensaje = "Felicidades, acabas de encontrar el Tesoro del DracoCornio";
m = mensaje;
}else if(numY == (coordenadaY - 1) || numY == (coordenadaY - 2)){
mensajeY = "Y esta cerca";
m = mensajeX + mensajeY;
}else if(numY == (coordenadaY + 1) || numY == (coordenadaY + 2)){
mensajeY = "Y esta cerca";
m = mensajeX + mensajeY;
}else{
mensajeY = "Y esta lejos";
m = mensajeX + mensajeY;
}
}else if(numX == (coordenadaX - 1) || numX == (coordenadaX - 2)){
mensajeX = "X esta cerca // ";
if(numY == coordenadaY){
mensajeY = "Y esta en su posicion";
m = mensajeX + mensajeY;
}else if(numY == (coordenadaY - 1) || numY == (coordenadaY - 2)){
mensajeY = "Y esta cerca";
m = mensajeX + mensajeY;
}else if(numY == (coordenadaY + 1) || numY == (coordenadaY + 2)){
mensajeY = "Y esta cerca";
m = mensajeX + mensajeY;
}else{
mensajeY = "Y esta lejos";
m = mensajeX + mensajeY;
}
}else if(numX == (coordenadaX + 1) || numX == (coordenadaX + 2)){
mensajeX = "X esta cerca // ";
if(numY == coordenadaY){
mensajeY = "Y esta en su posicion";
m = mensajeX + mensajeY;
}else if(numY == (coordenadaY - 1) || numY == (coordenadaY - 2)){
mensajeY = "Y esta cerca";
m = mensajeX + mensajeY;
}else if(numY == (coordenadaY + 1) || numY == (coordenadaY + 2)){
mensajeY = "Y esta cerca";
m = mensajeX + mensajeY;
}else{
mensajeY = "Y esta lejos";
m = mensajeX + mensajeY;
}
}else{
mensajeX = "X esta lejos // ";
if(numY == coordenadaY){
mensajeY = "Y esta en su posicion";
m = mensajeX + mensajeY;
}else if(numY == (coordenadaY - 1) || numY == (coordenadaY - 2)){
mensajeY = "Y esta cerca";
m = mensajeX + mensajeY;
}else if(numY == (coordenadaY + 1) || numY == (coordenadaY + 2)){
mensajeY = "Y esta cerca";
m = mensajeX + mensajeY;
}else{
mensajeY = "Y esta lejos";
m = mensajeX + mensajeY;
}
}
}else if(intentosJugador == 0){
mensaje = "Lo siento, perdiste, me saludas al Megalodon";
m = mensaje;
}
return m;
}
public void reiniciarJuego(){
intentosJugador = 3;
coordenadaX = (int) (Math.random()*11);
coordenadaY = (int) (Math.random()*11);
}
}
|
[
"you@example.com"
] |
you@example.com
|
92738b0cf5679cc4bccd6c5b36dfd85376629c2f
|
eb36ddb1e9c25d2a35d1fc94abaa6ef0f8fa6f7b
|
/src/main/java/POGOProtos/Rpc/DeclineCombatChallengeOutProtoOrBuilder.java
|
ae233726f66f4a08abd57c196e97e27b2dd77e58
|
[
"BSD-3-Clause"
] |
permissive
|
pokemongo-dev-contrib/pogoprotos-java
|
bbc941b238c051fd1430d364fae108604b13eebd
|
af129776faf08bfbfc69b32e19e8293bff2e8991
|
refs/heads/master
| 2021-06-10T15:45:44.441267
| 2021-02-04T21:46:16
| 2021-02-04T21:46:16
| 83,863,204
| 6
| 1
|
NOASSERTION
| 2020-10-17T20:10:32
| 2017-03-04T03:51:45
|
Java
|
UTF-8
|
Java
| false
| true
| 695
|
java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: POGOProtos.Rpc.proto
package POGOProtos.Rpc;
public interface DeclineCombatChallengeOutProtoOrBuilder extends
// @@protoc_insertion_point(interface_extends:POGOProtos.Rpc.DeclineCombatChallengeOutProto)
com.google.protobuf.MessageOrBuilder {
/**
* <code>.POGOProtos.Rpc.DeclineCombatChallengeOutProto.Result result = 1;</code>
* @return The enum numeric value on the wire for result.
*/
int getResultValue();
/**
* <code>.POGOProtos.Rpc.DeclineCombatChallengeOutProto.Result result = 1;</code>
* @return The result.
*/
POGOProtos.Rpc.DeclineCombatChallengeOutProto.Result getResult();
}
|
[
"msntchat@hotmail.fr"
] |
msntchat@hotmail.fr
|
7a1df00c940c5f6b64734c1ff59675037b214c4f
|
27b052c54bcf922e1a85cad89c4a43adfca831ba
|
/src/android/support/v4/widget/ListPopupWindowCompat$ListPopupWindowImpl.java
|
8bb55cb0de9bd326e877d5665f186fb15e25d51a
|
[] |
no_license
|
dreadiscool/YikYak-Decompiled
|
7169fd91f589f917b994487045916c56a261a3e8
|
ebd9e9dd8dba0e657613c2c3b7036f7ecc3fc95d
|
refs/heads/master
| 2020-04-01T10:30:36.903680
| 2015-04-14T15:40:09
| 2015-04-14T15:40:09
| 33,902,809
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 494
|
java
|
package android.support.v4.widget;
import android.view.View;
import android.view.View.OnTouchListener;
abstract interface ListPopupWindowCompat$ListPopupWindowImpl
{
public abstract View.OnTouchListener createDragToOpenListener(Object paramObject, View paramView);
}
/* Location: C:\Users\dreadiscool\Desktop\tools\classes-dex2jar.jar
* Qualified Name: android.support.v4.widget.ListPopupWindowCompat.ListPopupWindowImpl
* JD-Core Version: 0.7.0.1
*/
|
[
"paras@protrafsolutions.com"
] |
paras@protrafsolutions.com
|
0827453161633fdfc35ab1e4980b0cf0e91ab342
|
aaa23aeb62910e094784b161adf07ca4bdcec17d
|
/src/main/java/com/gmail/socraticphoenix/forge/randore/crafting/forge/CraftiniumDelegateSmelt.java
|
904baa0e636b4a8aa919541499508e4955e3d582
|
[] |
no_license
|
Randores/Randores
|
2a0615222ad4b6e60e7ffb8f4ec6a17149538a98
|
0da6e9b6ffd158314793757a9203237e8a802fac
|
refs/heads/master
| 2021-06-20T16:21:34.430950
| 2017-08-04T17:06:47
| 2017-08-04T17:06:47
| 81,740,671
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,345
|
java
|
/*
* The MIT License (MIT)
*
* Copyright (c) 2016 socraticphoenix@gmail.com
* Copyright (c) 2016 contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or
* substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
* NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.gmail.socraticphoenix.forge.randore.crafting.forge;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
public class CraftiniumDelegateSmelt implements CraftiniumSmelt {
private ItemStack in;
private ItemStack out;
private float xp;
public CraftiniumDelegateSmelt(ItemStack in, ItemStack out, float xp) {
this.in = in;
this.out = out;
this.xp = xp;
}
@Override
public boolean matches(ItemStack in, World worldIn, BlockPos forge) {
return this.in.getItem().equals(in.getItem());
}
@Override
public ItemStack result(ItemStack in, World worldIn, BlockPos forge) {
return this.out.copy();
}
@Override
public boolean matchesExperience(ItemStack out, World world, BlockPos forge) {
return this.out.getItem().equals(out.getItem());
}
@Override
public float experience(ItemStack in, World worldIn, BlockPos forge) {
return this.xp;
}
@Override
public int maxResult(ItemStack in, World worldIn, BlockPos forge) {
return this.out.getCount();
}
}
|
[
"socraticphoenix@gmail.com"
] |
socraticphoenix@gmail.com
|
a7ac9191c8c32719c818c0cc32eddfb9d8fd7c39
|
3fa4bb7dfd40c43431cf785d216d9334ed7db20a
|
/smallrye-reactive-messaging-kafka/src/test/java/io/smallrye/reactive/messaging/kafka/perf/PauseResumePerfTest.java
|
f59c5cb0a40b139580c1a352b039cb8a7fdecbc9
|
[
"Apache-2.0"
] |
permissive
|
smallrye/smallrye-reactive-messaging
|
677ecfe15a49996068bf00e69d52ab6f47dd6dfa
|
a7eadceb0b4c4c568ecff0325d8a765254542a62
|
refs/heads/main
| 2023-09-01T20:46:44.874999
| 2023-08-31T07:02:37
| 2023-08-31T07:02:37
| 153,155,267
| 209
| 176
|
Apache-2.0
| 2023-09-13T09:27:12
| 2018-10-15T17:36:05
|
Java
|
UTF-8
|
Java
| false
| false
| 7,904
|
java
|
package io.smallrye.reactive.messaging.kafka.perf;
import static org.assertj.core.api.Assertions.assertThat;
import static org.awaitility.Awaitility.await;
import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.CompletionStage;
import java.util.concurrent.atomic.LongAdder;
import jakarta.enterprise.context.ApplicationScoped;
import org.apache.kafka.clients.producer.ProducerRecord;
import org.apache.kafka.common.serialization.StringDeserializer;
import org.eclipse.microprofile.reactive.messaging.Incoming;
import org.eclipse.microprofile.reactive.messaging.Message;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import io.smallrye.reactive.messaging.annotations.Blocking;
import io.smallrye.reactive.messaging.kafka.TestTags;
import io.smallrye.reactive.messaging.kafka.base.KafkaCompanionTestBase;
import io.smallrye.reactive.messaging.kafka.base.KafkaMapBasedConfig;
import io.smallrye.reactive.messaging.kafka.base.PerfTestUtils;
@Tag(TestTags.PERFORMANCE)
@Tag(TestTags.SLOW)
public class PauseResumePerfTest extends KafkaCompanionTestBase {
public static final int TIMEOUT_IN_SECONDS = 400;
public static final int COUNT = 50_000;
public static String topic = UUID.randomUUID().toString();
private static ArrayList<String> expected;
@BeforeAll
static void insertRecords() {
expected = new ArrayList<>();
companion.produceStrings().withConcurrency().usingGenerator(i -> {
expected.add(Long.toString(i));
return new ProducerRecord<>(topic, "key", Long.toString(i));
}, COUNT).awaitCompletion(Duration.ofMinutes(5));
}
private KafkaMapBasedConfig commonConfig() {
return kafkaConfig("mp.messaging.incoming.data")
.put("topic", topic)
.put("cloud-events", false)
.put("commit-strategy", "throttled")
.put("auto.offset.reset", "earliest")
.put("value.deserializer", StringDeserializer.class.getName())
.put("key.deserializer", StringDeserializer.class.getName());
}
@Test
public void test_noop_consumer() {
NoopConsumer application = runApplication(commonConfig().put("pause-if-no-requests", false),
NoopConsumer.class);
long start = System.currentTimeMillis();
await()
.atMost(Duration.ofSeconds(TIMEOUT_IN_SECONDS))
.until(() -> application.getCount() == COUNT);
long end = System.currentTimeMillis();
assertThat(application.get()).containsExactlyElementsOf(expected);
System.out.println("No-op consumer / No pause/resume - Estimate: " + (end - start) + " ms");
}
@Test
public void test_noop_consumer_pause_resume() {
NoopConsumer application = runApplication(commonConfig().put("pause-if-no-requests", true),
NoopConsumer.class);
long start = System.currentTimeMillis();
await()
.atMost(Duration.ofSeconds(TIMEOUT_IN_SECONDS))
.until(() -> application.getCount() == COUNT);
long end = System.currentTimeMillis();
assertThat(application.get()).containsExactlyElementsOf(expected);
System.out.println("No-op consumer / pause/resume - Estimate: " + (end - start) + " ms");
}
@Test
public void test_hard_working_consumer() {
HardWorkingConsumerWithAck application = runApplication(commonConfig()
.put("pause-if-no-requests", false),
HardWorkingConsumerWithAck.class);
long start = System.currentTimeMillis();
await()
.atMost(Duration.ofSeconds(TIMEOUT_IN_SECONDS))
.until(() -> application.getCount() == COUNT);
long end = System.currentTimeMillis();
assertThat(application.get()).containsExactlyElementsOf(expected);
System.out.println("Blocking consumer / No pause/resume - Estimate: " + (end - start) + " ms");
}
@Test
public void test_hard_working_consumer_pause_resume() {
HardWorkingConsumerWithAck application = runApplication(commonConfig()
.put("pause-if-no-requests", true),
HardWorkingConsumerWithAck.class);
long start = System.currentTimeMillis();
await()
.atMost(Duration.ofSeconds(TIMEOUT_IN_SECONDS))
.until(() -> application.getCount() == COUNT);
long end = System.currentTimeMillis();
assertThat(application.get()).containsExactlyElementsOf(expected);
System.out.println("Blocking consumer / pause/resume - Estimate: " + (end - start) + " ms");
}
@Test
public void test_hard_working_consumer_without_ack() {
HardWorkingConsumerWithoutAck application = runApplication(commonConfig()
.put("enable.auto.commit", true)
.put("pause-if-no-requests", false),
HardWorkingConsumerWithoutAck.class);
long start = System.currentTimeMillis();
await()
.atMost(Duration.ofSeconds(TIMEOUT_IN_SECONDS))
.until(() -> application.getCount() == COUNT);
long end = System.currentTimeMillis();
assertThat(application.get()).containsExactlyElementsOf(expected);
System.out.println("Blocking consumer without ack / No pause/resume - Estimate: " + (end - start) + " ms");
}
@Test
public void test_hard_working_consumer_without_ack_pause_resume() {
HardWorkingConsumerWithoutAck application = runApplication(commonConfig()
.put("enable.auto.commit", true)
.put("pause-if-no-requests", true),
HardWorkingConsumerWithoutAck.class);
long start = System.currentTimeMillis();
await()
.atMost(Duration.ofSeconds(TIMEOUT_IN_SECONDS))
.until(() -> application.getCount() == COUNT);
long end = System.currentTimeMillis();
assertThat(application.get()).containsExactlyElementsOf(expected);
System.out.println("Blocking consumer without ack / pause/resume - Estimate: " + (end - start) + " ms");
}
@ApplicationScoped
public static class NoopConsumer {
LongAdder count = new LongAdder();
List<String> list = new ArrayList<>();
@Incoming("data")
public void consume(String message) {
list.add(message);
count.increment();
}
public List<String> get() {
return list;
}
public long getCount() {
return count.longValue();
}
}
@ApplicationScoped
public static class HardWorkingConsumerWithAck {
LongAdder count = new LongAdder();
List<String> list = new ArrayList<>();
@Incoming("data")
@Blocking
public CompletionStage<Void> consume(Message<String> message) {
PerfTestUtils.consumeCPU(1_000_000);
list.add(message.getPayload());
count.increment();
return message.ack();
}
public List<String> get() {
return list;
}
public long getCount() {
return count.longValue();
}
}
@ApplicationScoped
public static class HardWorkingConsumerWithoutAck {
LongAdder count = new LongAdder();
List<String> list = new ArrayList<>();
@Incoming("data")
@Blocking
public void consume(String message) {
PerfTestUtils.consumeCPU(1_000_000);
list.add(message);
count.increment();
}
public List<String> get() {
return list;
}
public long getCount() {
return count.longValue();
}
}
}
|
[
"ozangunalp@gmail.com"
] |
ozangunalp@gmail.com
|
e57ce8a6fe8a9d1da223f6d6eca4806c1a55ecc3
|
24d8cf871b092b2d60fc85d5320e1bc761a7cbe2
|
/DrJava/rev5266-5336-compilers-hj/right-branch-5336/platform/src-eclipse/edu/rice/cs/drjava/model/compiler/EclipseCompiler.java
|
44ef4261f817067d838784943a73eb02137096fb
|
[] |
no_license
|
joliebig/featurehouse_fstmerge_examples
|
af1b963537839d13e834f829cf51f8ad5e6ffe76
|
1a99c1788f0eb9f1e5d8c2ced3892d00cd9449ad
|
refs/heads/master
| 2016-09-05T10:24:50.974902
| 2013-03-28T16:28:47
| 2013-03-28T16:28:47
| 9,080,611
| 3
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,701
|
java
|
package edu.rice.cs.drjava.model.compiler;
import java.io.*;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.LinkedList;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.Iterator;
import java.util.ResourceBundle;
import java.util.Locale;
import javax.tools.JavaFileManager;
import javax.tools.JavaFileObject;
import javax.tools.Diagnostic;
import javax.tools.DiagnosticListener;
import javax.tools.StandardJavaFileManager;
import javax.tools.JavaCompiler;
import javax.tools.StandardLocation;
import edu.rice.cs.drjava.model.DJError;
import edu.rice.cs.drjava.model.compiler.Javac160FilteringCompiler;
import edu.rice.cs.plt.reflect.JavaVersion;
import edu.rice.cs.plt.io.IOUtil;
import edu.rice.cs.plt.iter.IterUtil;
import static edu.rice.cs.plt.debug.DebugUtil.debug;
import static edu.rice.cs.plt.debug.DebugUtil.error;
public class EclipseCompiler extends Javac160FilteringCompiler {
public EclipseCompiler(JavaVersion.FullVersion version, String location, List<? extends File> defaultBootClassPath) {
super(version, location, defaultBootClassPath);
}
public boolean isAvailable() {
try {
Class<?> diagnostic = Class.forName("javax.tools.Diagnostic");
diagnostic.getMethod("getKind");
Class.forName("org.eclipse.jdt.internal.compiler.tool.EclipseCompiler");
return true;
}
catch (Exception e) { return false; }
catch (LinkageError e) { return false; }
}
public List<? extends DJError> compile(List<? extends File> files, List<? extends File> classPath,
List<? extends File> sourcePath, File destination,
List<? extends File> bootClassPath, String sourceVersion, boolean showWarnings) {
debug.logStart("compile()");
debug.logValues(new String[]{ "this", "files", "classPath", "sourcePath", "destination", "bootClassPath",
"sourceVersion", "showWarnings" },
this, files, classPath, sourcePath, destination, bootClassPath, sourceVersion, showWarnings);
List<File> filteredClassPath = null;
if (classPath!=null) {
filteredClassPath = new LinkedList<File>(classPath);
if (_filterExe) {
FileFilter filter = IOUtil.extensionFilePredicate("exe");
Iterator<? extends File> i = filteredClassPath.iterator();
while (i.hasNext()) {
if (filter.accept(i.next())) { i.remove(); }
}
if (_tempJUnit!=null) { filteredClassPath.add(_tempJUnit); }
}
}
LinkedList<DJError> errors = new LinkedList<DJError>();
JavaCompiler compiler = new org.eclipse.jdt.internal.compiler.tool.EclipseCompiler();
CompilerErrorListener diagnosticListener = new CompilerErrorListener(errors);
StandardJavaFileManager fileManager = compiler.getStandardFileManager(diagnosticListener, null, null);
Iterable<? extends JavaFileObject> compilationUnits = fileManager.getJavaFileObjectsFromFiles(files);
Writer out = new OutputStreamWriter(new OutputStream() {
public void write(int b) { }
});
Iterable<String> classes = null;
Iterable<String> options = _getOptions(fileManager,
filteredClassPath, sourcePath, destination,
bootClassPath, sourceVersion, showWarnings);
try {
JavaCompiler.CompilationTask task = compiler.getTask(out, fileManager, diagnosticListener, options, classes, compilationUnits);
boolean res = task.call();
if (!res && (errors.size()==0)) throw new AssertionError("Compile failed. There should be compiler errors, but there aren't.");
}
catch(Throwable t) {
errors.addFirst(new DJError("Compile exception: " + t, false));
error.log(t);
}
debug.logEnd("compile()");
return errors;
}
public String getName() {
try {
ResourceBundle bundle = ResourceBundle.getBundle("org.eclipse.jdt.internal.compiler.batch.messages");
String ecjVersion = bundle.getString("compiler.version");
int commaPos = ecjVersion.indexOf(',');
if (commaPos>=0) { ecjVersion = ecjVersion.substring(0, commaPos); }
return "Eclipse Compiler "+ecjVersion;
}
catch(Throwable t) {
return "Eclipse Compiler " + _version.versionString();
}
}
private static void addOption(List<String> options, String s) {
if (s.length()>0) options.add(s);
}
private Iterable<String> _getOptions(StandardJavaFileManager fileManager,
List<? extends File> classPath, List<? extends File> sourcePath, File destination,
List<? extends File> bootClassPath, String sourceVersion, boolean showWarnings) {
if (bootClassPath == null) { bootClassPath = _defaultBootClassPath; }
List<String> options = new ArrayList<String>();
for (Map.Entry<String, String> e : CompilerOptions.getOptions(showWarnings).entrySet()) {
addOption(options,e.getKey());
addOption(options,e.getValue());
}
addOption(options,"-g");
if (classPath != null) {
addOption(options,"-classpath");
addOption(options,IOUtil.pathToString(classPath));
try {
fileManager.setLocation(StandardLocation.CLASS_PATH, classPath);
}
catch(IOException ioe) { }
}
if (sourcePath != null) {
addOption(options,"-sourcepath");
addOption(options,IOUtil.pathToString(sourcePath));
try {
fileManager.setLocation(StandardLocation.SOURCE_PATH, sourcePath);
}
catch(IOException ioe) { }
}
if (destination != null) {
addOption(options,"-d");
addOption(options,destination.getPath());
try {
fileManager.setLocation(StandardLocation.CLASS_OUTPUT, IterUtil.asIterable(destination));
}
catch(IOException ioe) { }
}
if (bootClassPath != null) {
addOption(options,"-bootclasspath");
addOption(options,IOUtil.pathToString(bootClassPath));
try {
fileManager.setLocation(StandardLocation.PLATFORM_CLASS_PATH, bootClassPath);
}
catch(IOException ioe) { }
}
if (sourceVersion != null) {
addOption(options,"-source");
addOption(options,sourceVersion);
}
if (!showWarnings) {
addOption(options,"-nowarn");
}
return options;
}
private static class CompilerErrorListener implements DiagnosticListener<JavaFileObject> {
private List<? super DJError> _errors;
public CompilerErrorListener(List<? super DJError> errors) {
_errors = errors;
}
public void report(Diagnostic<? extends JavaFileObject> d) {
Diagnostic.Kind dt = d.getKind();
boolean isWarning = false;
switch (dt) {
case OTHER: return;
case NOTE: return;
case MANDATORY_WARNING: isWarning = true; break;
case WARNING: isWarning = true; break;
case ERROR: isWarning = false; break;
}
if (d.getSource()!=null) {
_errors.add(new DJError(new File(d.getSource().toUri().getPath()),
((int) d.getLineNumber()) - 1,
((int) d.getColumnNumber()) - 1,
d.getMessage(Locale.getDefault()),
isWarning));
}
else {
_errors.add(new DJError(d.getMessage(Locale.getDefault()), isWarning));
}
}
}
}
|
[
"joliebig@fim.uni-passau.de"
] |
joliebig@fim.uni-passau.de
|
1d42f0a8ca7e234ef313c28e6bb6a0b4b231d79a
|
d07675d46c63bc037bd7c59f0657355348d86dfc
|
/fxgl-samples/src/main/java/s01basics/PlatformerSample.java
|
2cbb044275a8633ff2cdcca3c3adce49b6193590
|
[
"MIT"
] |
permissive
|
cping/FXGL
|
06844138b1f8a456b1be3cb83711695856e4caa4
|
3558d63e5c391b3365affc2180915b738edef28d
|
refs/heads/master
| 2020-05-04T06:22:07.538445
| 2019-03-17T10:15:59
| 2019-03-17T10:15:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,366
|
java
|
/*
* FXGL - JavaFX Game Library. The MIT License (MIT).
* Copyright (c) AlmasB (almaslvl@gmail.com).
* See LICENSE for details.
*/
package s01basics;
import com.almasb.fxgl.app.GameApplication;
import com.almasb.fxgl.app.GameSettings;
import com.almasb.fxgl.entity.Entity;
import com.almasb.fxgl.input.Input;
import com.almasb.fxgl.input.UserAction;
import com.almasb.fxgl.physics.BoundingShape;
import com.almasb.fxgl.physics.HitBox;
import com.almasb.fxgl.physics.PhysicsComponent;
import com.almasb.fxgl.physics.box2d.dynamics.BodyType;
import javafx.geometry.Point2D;
import javafx.scene.input.KeyCode;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import static com.almasb.fxgl.dsl.FXGL.*;
/**
* Sample that shows how to use ChainShape for platforms.
*
* @author Almas Baimagambetov (AlmasB) (almaslvl@gmail.com)
*/
public class PlatformerSample extends GameApplication {
private Entity player;
@Override
protected void initSettings(GameSettings settings) {
settings.setWidth(800);
settings.setHeight(600);
settings.setTitle("PlatformerSample");
settings.setVersion("0.1");
}
@Override
protected void initInput() {
Input input = getInput();
input.addAction(new UserAction("Left") {
@Override
protected void onActionBegin() {
player.getComponent(PhysicsComponent.class).setVelocityX(-200);
}
}, KeyCode.A);
input.addAction(new UserAction("Right") {
@Override
protected void onActionBegin() {
player.getComponent(PhysicsComponent.class).setVelocityX(200);
}
}, KeyCode.D);
input.addAction(new UserAction("Jump") {
@Override
protected void onActionBegin() {
PhysicsComponent physics = player.getComponent(PhysicsComponent.class);
if (physics.isOnGround()) {
physics.setVelocityY(-300);
}
}
}, KeyCode.W);
onKeyDown(KeyCode.I, "Info", () -> System.out.println(player.getCenter()));
input.addAction(new UserAction("Grow") {
@Override
protected void onActionBegin() {
player.setScaleX(player.getScaleX() * 1.25);
player.setScaleY(player.getScaleY() * 1.25);
// double x = player.getX();
// double y = player.getY();
//
// player.removeFromWorld();
//
// player = createPlayer(x, y, 60, 80);
}
}, KeyCode.SPACE);
}
@Override
protected void initGame() {
createPlatforms();
player = createPlayer(100, 100, 40, 60);
player.getTransformComponent().setScaleOrigin(new Point2D(20, 30));
}
private void createPlatforms() {
entityBuilder()
.at(0, 500)
.view(new Rectangle(120, 100, Color.GRAY))
.bbox(new HitBox("Main", BoundingShape.chain(
new Point2D(0, 0),
new Point2D(120, 0),
new Point2D(120, 100),
new Point2D(0, 100)
)))
.with(new PhysicsComponent())
.buildAndAttach();
entityBuilder()
.at(180, 500)
.view(new Rectangle(400, 100, Color.GRAY))
.bbox(new HitBox("Main", BoundingShape.chain(
new Point2D(0, 0),
new Point2D(400, 0),
new Point2D(400, 100),
new Point2D(0, 100)
)))
.with(new PhysicsComponent())
.buildAndAttach();
}
private Entity createPlayer(double x, double y, double width, double height) {
PhysicsComponent physics = new PhysicsComponent();
physics.addGroundSensor(new HitBox(new Point2D(0, height - 5), BoundingShape.box(width, 10)));
physics.setBodyType(BodyType.DYNAMIC);
return entityBuilder()
.at(x, y)
.viewWithBBox(new Rectangle(width, height, Color.BLUE))
.with(physics)
.buildAndAttach();
}
public static void main(String[] args) {
launch(args);
}
}
|
[
"almaslvl@gmail.com"
] |
almaslvl@gmail.com
|
5db3bffced382243f7eab8d3e635e8d734e81a52
|
34d16f315bdb5415b1b7f1343a6e105fdb430adf
|
/src/cn/tju/chp04/s02/collection/ListIteratorDemo.java
|
096e242928c977753f66ffe30f74155e0b57c2fa
|
[] |
no_license
|
tjuwangzan/advjava2020
|
a57105fa28654e3680f9f4f89df413a639442bb5
|
d8617f47dd1f2136cab0b9188670d91e6d26aeaf
|
refs/heads/master
| 2021-01-01T02:53:56.649948
| 2020-04-15T03:16:06
| 2020-04-15T03:16:06
| 239,150,596
| 9
| 27
| null | 2023-01-14T02:17:44
| 2020-02-08T15:02:26
|
Java
|
UTF-8
|
Java
| false
| false
| 643
|
java
|
package cn.tju.chp04.s02.collection;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.ListIterator;
public class ListIteratorDemo {
public static void main(String[] args) {
List<String> all = new ArrayList<String>();
all.add("A");
all.add("B");
all.add("C");
System.out.println("由前向后输出:");
ListIterator<String> iter = all.listIterator();
while(iter.hasNext()) {
String str = iter.next();
System.out.print(str + ",");
}
System.out.println("\n由后向前输出:");
while(iter.hasPrevious()) {
System.out.print(iter.previous()+",");
}
}
}
|
[
"wangzan@tju.edu.cn"
] |
wangzan@tju.edu.cn
|
1b609361f8f1e700abbabd2e22debc1ed8f958f6
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/mockito--mockito/3fe3b62d2bc5ac60bb85c4bed8870f51109d167c/after/UnusedStubsFinder.java
|
effc74b2a9fafe4e928e73b534d696fe1415faca
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,096
|
java
|
/*
* Copyright (c) 2007 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockito.internal.invocation;
import org.mockito.internal.InternalMockHandler;
import org.mockito.internal.stubbing.StubbedInvocationMatcher;
import org.mockito.internal.util.MockUtil;
import org.mockito.invocation.Invocation;
import java.util.*;
public class UnusedStubsFinder {
/**
* Finds all unused stubs for given mocks
*
* @param mocks full list of mocks
*/
public List<Invocation> find(List<?> mocks) {
List<Invocation> unused = new LinkedList<Invocation>();
for (Object mock : mocks) {
InternalMockHandler<Object> handler = MockUtil.getMockHandler(mock);
List<StubbedInvocationMatcher> fromSingleMock = handler.getInvocationContainer().getStubbedInvocations();
for(StubbedInvocationMatcher s : fromSingleMock) {
if (!s.wasUsed()) {
unused.add(s.getInvocation());
}
}
}
return unused;
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
6a5ba1e2d618b2db5e1e3438d4b087aff2c2b974
|
4a0115bc1ef56e5dceec0f836527cd1e7ca9b32b
|
/droidparts-support/src/org/droidparts/fragment/support/v4/Fragment.java
|
6688560229bba0b157ce6e093c089b135c82ef54
|
[
"Apache-2.0"
] |
permissive
|
sangupandi/droidparts
|
0ea1740b7fcdaf0a7e97df24c9b96a9f89edc87c
|
b1544203838ee5810470f49e899ed91575150310
|
refs/heads/master
| 2021-01-17T22:26:56.675617
| 2015-02-20T14:22:38
| 2015-02-20T14:22:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,394
|
java
|
/**
* Copyright 2014 Alex Yanchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.droidparts.fragment.support.v4;
import org.droidparts.Injector;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
public class Fragment extends android.support.v4.app.Fragment {
private boolean injected;
@Override
public final View onCreateView(LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {
View view = onCreateView(savedInstanceState, inflater, container);
Injector.inject(view, this);
injected = true;
return view;
}
public View onCreateView(Bundle savedInstanceState,
LayoutInflater inflater, ViewGroup container) {
return super.onCreateView(inflater, container, savedInstanceState);
}
public final boolean isInjected() {
return injected;
}
}
|
[
"alex@yanchenko.com"
] |
alex@yanchenko.com
|
96fd5662355486a5d1643e2355a60dd899453f23
|
61c1d98ba3a4658c979bee871500ba4752e86f90
|
/src/main/java/mongoutils/testing/Engine.java
|
30e97144cd8631869d0d11a1320048cfa0baef36
|
[] |
no_license
|
Acrylic125/MongoUtils
|
b6a98ff32a976f9f8660daaff561bce4240f6061
|
2b12ea15f1557104370029f58fda1deccac1250d
|
refs/heads/master
| 2023-03-15T16:33:34.359057
| 2021-02-27T11:59:00
| 2021-02-27T11:59:00
| 341,802,630
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 332
|
java
|
package mongoutils.testing;
public class Engine extends CarComponent {
private float horsePower;
public long hash = 58813991939191L;
public float getHorsePower() {
return horsePower;
}
public Engine setHorsePower(float horsePower) {
this.horsePower = horsePower;
return this;
}
}
|
[
"acrylic125email@gmail.com"
] |
acrylic125email@gmail.com
|
d36cdb04aa323ed3ab529b95943c9e8bd7a49d91
|
9b9c3236cc1d970ba92e4a2a49f77efcea3a7ea5
|
/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q10575_LetsGoFishing/Q10575_LetsGoFishing.java
|
aeb896a52f5a03654a80881cf49144789e55e988
|
[] |
no_license
|
BETAJIb/ikol
|
73018f8b7c3e1262266b6f7d0a7f6bbdf284621d
|
f3709ea10be2d155b0bf1dee487f53c723f570cf
|
refs/heads/master
| 2021-01-05T10:37:17.831153
| 2019-12-24T22:23:02
| 2019-12-24T22:23:02
| 240,993,482
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,603
|
java
|
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package quests.Q10575_LetsGoFishing;
import java.util.HashSet;
import java.util.Set;
import org.l2jmobius.gameserver.enums.QuestSound;
import org.l2jmobius.gameserver.enums.QuestType;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.events.EventType;
import org.l2jmobius.gameserver.model.events.ListenerRegisterType;
import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
import org.l2jmobius.gameserver.model.events.annotations.RegisterType;
import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerFishing;
import org.l2jmobius.gameserver.model.holders.NpcLogListHolder;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.quest.State;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.serverpackets.ExTutorialShowId;
import org.l2jmobius.gameserver.network.serverpackets.fishing.ExFishingEnd.FishingEndReason;
import quests.Q10566_BestChoice.Q10566_BestChoice;
/**
* Let's Go Fishing (10575)
* @URL https://l2wiki.com/Let%27s_Go_Fishing
* @author NightBR / htmls: by Werum
*/
public class Q10575_LetsGoFishing extends Quest
{
// NPCs
private static final int SANTIAGO = 34138;
// Items
private static final int PRACTICE_BAIT = 46737;
private static final int PRACTICE_FISH = 46736;
private static final int PRACTICE_FISHING_ROD = 46738;
// Misc
private static final int MIN_LEVEL = 95;
private static final String COUNT_VAR = "FishWinCount";
private static final int NPCSTRING_ID = NpcStringId.CATCH_PRACTICE_FISH.getId();
// Rewards
private static final int XP = 597699960;
private static final int SP = 597690;
private static final int CERTIFICATE_FROM_SANTIAGO = 48173;
private static final int FISHING_SHOT = 38154;
private static final int REWARD_FISHING_ROD_PACK = 46739;
private static final int BAIT = 48537;
public Q10575_LetsGoFishing()
{
super(10575);
addStartNpc(SANTIAGO);
addTalkId(SANTIAGO);
registerQuestItems(PRACTICE_BAIT, PRACTICE_FISH, PRACTICE_FISHING_ROD);
addCondMinLevel(MIN_LEVEL, "noLevel.htm");
addCondStartedQuest(Q10566_BestChoice.class.getSimpleName(), "34138-99.html");
}
@Override
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return null;
}
String htmltext = null;
switch (event)
{
case "34138-03.html":
case "34138-04.html":
{
htmltext = event;
break;
}
case "34138-02.htm":
{
qs.startQuest();
htmltext = event;
break;
}
case "34138-05.html":
{
// show Service/Help/Fishing page
player.sendPacket(new ExTutorialShowId(111));
qs.setCond(2, true);
giveItems(player, PRACTICE_BAIT, 50);
giveItems(player, PRACTICE_FISHING_ROD, 1);
htmltext = event;
break;
}
case "34138-07.html":
{
if (qs.isCond(3))
{
addExpAndSp(player, XP, SP);
giveItems(player, CERTIFICATE_FROM_SANTIAGO, 1);
giveItems(player, FISHING_SHOT, 60);
giveItems(player, REWARD_FISHING_ROD_PACK, 1);
giveItems(player, BAIT, 60);
qs.unset(COUNT_VAR);
qs.exitQuest(QuestType.ONE_TIME, true);
htmltext = event;
}
break;
}
}
return htmltext;
}
@Override
public String onTalk(Npc npc, PlayerInstance player)
{
final QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
switch (qs.getState())
{
case State.CREATED:
{
htmltext = "34138-01.htm";
break;
}
case State.STARTED:
{
htmltext = (qs.getCond() <= 2) ? "34138-05.html" : "34138-06.html";
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
@RegisterEvent(EventType.ON_PLAYER_FISHING)
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
public void onPlayerFishing(OnPlayerFishing event)
{
final PlayerInstance player = event.getPlayer();
final QuestState qs = getQuestState(player, false);
if ((qs != null) && qs.isCond(2) && (event.getReason() == FishingEndReason.WIN))
{
int count = qs.getInt(COUNT_VAR);
qs.set(COUNT_VAR, ++count);
if (count >= 5)
{
qs.setCond(3, true);
}
else
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
sendNpcLogList(player);
}
}
@Override
public Set<NpcLogListHolder> getNpcLogList(PlayerInstance player)
{
final QuestState qs = getQuestState(player, false);
if ((qs != null) && qs.isCond(2))
{
final Set<NpcLogListHolder> holder = new HashSet<>();
holder.add(new NpcLogListHolder(NPCSTRING_ID, true, qs.getInt(COUNT_VAR)));
return holder;
}
return super.getNpcLogList(player);
}
}
|
[
"mobius@cyber-wizard.com"
] |
mobius@cyber-wizard.com
|
3b9d0273ff6f3486c0ad5948fcc82d05af1b61e7
|
7a27d708d4b53b3c9c1609f76b23af928c1d1d28
|
/src/main/java/net/bridgesapi/api/parties/PartiesManager.java
|
50c7a2bd7fe61004c2365f6b1f6052269858b476
|
[] |
no_license
|
BridgeAPIs/BukkitBridge
|
13621bc2d5ce95a9e9a8de0a6b5e4a599c4cad73
|
fbad88fe76a78ac21781aaf5d7de03aaddd259fa
|
refs/heads/master
| 2021-01-18T23:25:51.357627
| 2015-10-02T16:35:35
| 2015-10-02T16:35:35
| 35,945,593
| 1
| 6
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 461
|
java
|
package net.bridgesapi.api.parties;
import java.util.HashMap;
import java.util.UUID;
/**
* This file is a part of the SamaGames project
* This code is absolutely confidential.
* Created by zyuiop
* (C) Copyright Elydra Network 2015
* All rights reserved.
*/
public interface PartiesManager {
UUID getPlayerParty(UUID player);
HashMap<UUID, String> getPlayersInParty(UUID party);
String getCurrentServer(UUID party);
UUID getLeader(UUID party);
}
|
[
"zyuiop@zyuiop.net"
] |
zyuiop@zyuiop.net
|
e58c9d0fbe9a83f38386e7da6ce96cbd20af99ae
|
6b23d8ae464de075ad006c204bd7e946971b0570
|
/WEB-INF/plugin/file/src/jp/groupsession/v2/fil/fil130kn/Fil130knForm.java
|
eae636e8b179fc52bf66f6370880dde0c84a2833
|
[] |
no_license
|
kosuke8/gsession
|
a259c71857ed36811bd8eeac19c456aa8f96c61e
|
edd22517a22d1fb2c9339fc7f2a52e4122fc1992
|
refs/heads/master
| 2021-08-20T05:43:09.431268
| 2017-11-28T07:10:08
| 2017-11-28T07:10:08
| 112,293,459
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 310
|
java
|
package jp.groupsession.v2.fil.fil130kn;
import jp.groupsession.v2.fil.fil130.Fil130Form;
/**
* <br>[機 能] 個人設定 ショートメール通知設定確認画面のフォーム
* <br>[解 説]
* <br>[備 考]
*
* @author JTS
*/
public class Fil130knForm extends Fil130Form {
}
|
[
"PK140601-29@PK140601-29"
] |
PK140601-29@PK140601-29
|
f17811c2f7fed9a8b54f8b09c3b96a4578f7ca99
|
b2f068bb58c322f45b14d318c597323f3b974439
|
/sources/datacenter/data-show/src/main/java/com/dm/data/show/repository/NowResourceRepository.java
|
94f38faea9071b0b826eaaca5e280ca5e7a91d01
|
[] |
no_license
|
SuperRookieMam/linfen
|
a947dc0b1dfa6c92ee9f7e727b26eba8be598277
|
6115fa74152d9679f482a0a7b3147bbe10ad2a70
|
refs/heads/master
| 2023-01-07T09:54:34.624497
| 2019-12-03T07:43:36
| 2019-12-03T07:43:36
| 219,668,625
| 0
| 0
| null | 2023-01-04T14:46:52
| 2019-11-05T05:56:49
|
Vue
|
UTF-8
|
Java
| false
| false
| 339
|
java
|
package com.dm.data.show.repository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
import com.dm.data.show.entity.NowResource;
public interface NowResourceRepository extends JpaRepository<NowResource, Long>, QuerydslPredicateExecutor<NowResource> {
}
|
[
"422375723@qq.com"
] |
422375723@qq.com
|
a2b2345bad68ac61276c987eccf655c0d77fabae
|
b81fdeb0ae5a5a685fb1992fc060e5c35b6fd59b
|
/src/main/java/org/acz/leveldb/LevelDbNative.java
|
80dcc3eb705eb5a90748bd01892dfa901e5b6c2b
|
[] |
no_license
|
electrum/leveldb-jni
|
20ca88906892bbfd012bf4879ff2b1cb009c4eef
|
932c2016e13ce749c01db60e07ea1574df01a7af
|
refs/heads/master
| 2021-01-22T03:39:22.820321
| 2011-08-01T02:33:40
| 2011-08-01T02:33:40
| 2,127,201
| 5
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,424
|
java
|
package org.acz.leveldb;
import java.io.File;
import java.util.Iterator;
public class LevelDbNative
implements LevelDb
{
static {
System.load(new File("libleveldbnative.so").getAbsolutePath());
}
private long handle;
private String statusString;
private native boolean open0(String path, boolean create, boolean exclusive);
private native void close0();
private native byte[] get0(byte[] key);
private native boolean put0(byte[] key, byte[] value);
private native boolean delete0(byte[] key);
private LevelDbNative(File path, boolean create, boolean exclusive)
throws LevelDbException
{
if (!open0(path.getAbsolutePath(), create, exclusive)) {
throw new LevelDbException(statusString);
}
}
public static LevelDbNative create(File path)
throws LevelDbException
{
return new LevelDbNative(path, true, true);
}
public static LevelDbNative update(File path)
throws LevelDbException
{
return new LevelDbNative(path, false, false);
}
public static LevelDbNative createOrUpdate(File path)
throws LevelDbException
{
return new LevelDbNative(path, true, false);
}
@Override
public void close()
throws LevelDbException
{
close0();
}
@Override
public byte[] get(byte[] key)
throws LevelDbException
{
byte[] value = get0(key);
if (value == null) {
throw new LevelDbException(statusString);
}
return value;
}
@Override
public void put(byte[] key, byte[] value)
throws LevelDbException
{
if (!put0(key, value)) {
throw new LevelDbException(statusString);
}
}
@Override
public void delete(byte[] key)
throws LevelDbException
{
if (!delete0(key)) {
throw new LevelDbException(statusString);
}
}
@Override
public void writeBatch(WriteBatch batch)
throws LevelDbException
{
throw new UnsupportedOperationException();
}
@Override
public Iterator<Entry> iterator()
{
throw new UnsupportedOperationException();
}
@Override
public Iterator<Entry> iterator(byte[] keyStart)
{
throw new UnsupportedOperationException();
}
}
|
[
"david@acz.org"
] |
david@acz.org
|
efaca46fa371c6acc799e70c57acd55a8b3f6a13
|
38c10c01007624cd2056884f25e0d6ab85442194
|
/components/variations/android/java/src/org/chromium/components/variations/VariationsAssociatedData.java
|
4a49a921833aa0333031fbe036387bcc025a495f
|
[
"BSD-3-Clause"
] |
permissive
|
zenoalbisser/chromium
|
6ecf37b6c030c84f1b26282bc4ef95769c62a9b2
|
e71f21b9b4b9b839f5093301974a45545dad2691
|
refs/heads/master
| 2022-12-25T14:23:18.568575
| 2016-07-14T21:49:52
| 2016-07-23T08:02:51
| 63,980,627
| 0
| 2
|
BSD-3-Clause
| 2022-12-12T12:43:41
| 2016-07-22T20:14:04
| null |
UTF-8
|
Java
| false
| false
| 992
|
java
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.components.variations;
import org.chromium.base.annotations.JNINamespace;
/**
* Wrapper for variations.
*/
@JNINamespace("variations::android")
public final class VariationsAssociatedData {
private VariationsAssociatedData() {
}
/**
* @param trialName The name of the trial to get the param value for.
* @param paramName The name of the param for which to get the value.
* @return The parameter value. Empty string if the field trial does not exist or the specified
* parameter does not exist.
*/
public static String getVariationParamValue(String trialName, String paramName) {
return nativeGetVariationParamValue(trialName, paramName);
}
private static native String nativeGetVariationParamValue(String trialName, String paramName);
}
|
[
"zeno.albisser@hemispherian.com"
] |
zeno.albisser@hemispherian.com
|
bdaf07e0f16c3093dbd679095da35ecade1423c8
|
6707de58adf6be486c213bd622cad7c5fcc4baa1
|
/src/main/java/org/brijframework/college/model/LoginRole.java
|
8098acfd51d369b28afe61d7612d46541035957c
|
[] |
no_license
|
ramkishor05/project-brijframework-college
|
43c463d8d4697da7f0aaf4bfa5cfd48e3907ba80
|
d5e3bb128e72c4cf72cd4dc553c16e6ca3b5177d
|
refs/heads/master
| 2022-07-25T23:30:02.236393
| 2021-12-09T14:50:27
| 2021-12-09T14:50:27
| 189,605,485
| 0
| 0
| null | 2022-07-08T19:20:07
| 2019-05-31T14:15:20
|
Java
|
UTF-8
|
Java
| false
| false
| 1,428
|
java
|
package org.brijframework.college.model;
// Generated Sep 18, 2013 11:58:04 PM by Hibernate Tools 4.0.0
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
/**
* Role generated by hbm2java
*/
@Entity
@Table(name = "login_role", uniqueConstraints = @UniqueConstraint(columnNames = "NAME"))
public class LoginRole extends AbstractPO<Integer> {
/**
*
*/
private static final long serialVersionUID = 1L;
private String name;
private String description;
@Id
@GeneratedValue(strategy = IDENTITY)
@Column(name = "ID", unique = true, nullable = false)
public Integer getId() {
return this.id;
}
public void setId(Integer id) {
this.id = id;
}
@Column(name = "NAME", unique = true, nullable = false, length = 50)
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
@Column(name = "DESCRIPTION", length = 100)
public String getDescription() {
return this.description;
}
public void setDescription(String description) {
this.description = description;
}
@OneToMany(fetch = FetchType.LAZY, mappedBy = "userRolePrimaryKey.role")
UserRole userRole;
}
|
[
"ramkishor0509@gmail.com"
] |
ramkishor0509@gmail.com
|
a9ff0788db8977268e6046c93fa0077015a09ca1
|
308b3f320c5bc53091725dfa40460505ab7b5555
|
/DisplayCore/src/main/java/org/softwareFm/displayCore/api/IDisplayContainerForTests.java
|
bc3ba2a6bc295357c695074d0d86b97943a5c1b8
|
[] |
no_license
|
phil-rice/Arc4Eclipse
|
75134c3032a9d9173fef551c326686a7ca28bb8a
|
95948538ceac12f9793546b1ed85cd0bca8a34d0
|
refs/heads/master
| 2020-04-19T15:52:38.952070
| 2011-09-09T10:57:41
| 2011-09-09T10:57:41
| 2,031,297
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 367
|
java
|
package org.softwareFm.displayCore.api;
import org.eclipse.swt.widgets.Composite;
/** This represents the data about an entity */
public interface IDisplayContainerForTests extends IDisplayContainer {
Composite compButtons();
public <L> L getLargeControlFor(String key);
public <C> C getSmallControlFor(String key);
IRegisteredItems getRegisteredItems();
}
|
[
"phil.rice@iee.org"
] |
phil.rice@iee.org
|
692dcd0f9fbe06e99b016faf1553471aee7809b7
|
86fc030462b34185e0b1e956b70ece610ad6c77a
|
/src/main/java/com/alipay/api/response/ZhimaDataBatchFeedbackResponse.java
|
e10139af43c61dc6e6a2e9187e0109440ed97cf7
|
[] |
no_license
|
xiang2shen/magic-box-alipay
|
53cba5c93eb1094f069777c402662330b458e868
|
58573e0f61334748cbb9e580c51bd15b4003f8c8
|
refs/heads/master
| 2021-05-08T21:50:15.993077
| 2018-11-12T07:49:35
| 2018-11-12T07:49:35
| 119,653,252
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 362
|
java
|
package com.alipay.api.response;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: zhima.data.batch.feedback response.
*
* @author auto create
* @since 1.0, 2017-05-02 14:40:53
*/
public class ZhimaDataBatchFeedbackResponse extends AlipayResponse {
private static final long serialVersionUID = 7297241176514566861L;
}
|
[
"xiangshuo@10.17.6.161"
] |
xiangshuo@10.17.6.161
|
af5cddbaaa8e849080b203e783d9810b8d7e879d
|
369270a14e669687b5b506b35895ef385dad11ab
|
/jdk.internal.vm.compiler/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Long02.java
|
de969eefa8cb9f451318957ffd2a47f7e3af400b
|
[] |
no_license
|
zcc888/Java9Source
|
39254262bd6751203c2002d9fc020da533f78731
|
7776908d8053678b0b987101a50d68995c65b431
|
refs/heads/master
| 2021-09-10T05:49:56.469417
| 2018-03-20T06:26:03
| 2018-03-20T06:26:03
| 125,970,208
| 3
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,373
|
java
|
/*
* Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package org.graalvm.compiler.jtt.optimize;
import org.junit.Test;
import org.graalvm.compiler.jtt.JTTTest;
/*
* Tests optimization of integer operations.
*/
public class VN_Long02 extends JTTTest {
public static long test(int arg) {
if (arg == 0) {
return shift0(arg + 10);
}
if (arg == 1) {
return shift1(arg + 10);
}
if (arg == 2) {
return shift2(arg + 10);
}
return 0;
}
public static long shift0(long x) {
long c = 1;
long t = x >> c;
long u = x >> c;
return t + u;
}
public static long shift1(long x) {
long c = 1;
long t = x >>> c;
long u = x >>> c;
return t + u;
}
public static long shift2(long x) {
long c = 1;
long t = x << c;
long u = x << c;
return t + u;
}
@Test
public void run0() throws Throwable {
runTest("test", 0);
}
@Test
public void run1() throws Throwable {
runTest("test", 1);
}
@Test
public void run2() throws Throwable {
runTest("test", 2);
}
}
|
[
"841617433@qq.com"
] |
841617433@qq.com
|
8e43a8acbbf5268bda4ff25e20c60dde99792e8c
|
aaabffe8bf55973bfb1390cf7635fd00ca8ca945
|
/src/main/java/com/microsoft/graph/requests/generated/BaseWorkbookFunctionsHypGeom_DistRequest.java
|
0d5abdef54c1c67228055ee161f62b92fa604310
|
[
"MIT"
] |
permissive
|
rgrebski/msgraph-sdk-java
|
e595e17db01c44b9c39d74d26cd925b0b0dfe863
|
759d5a81eb5eeda12d3ed1223deeafd108d7b818
|
refs/heads/master
| 2020-03-20T19:41:06.630857
| 2018-03-16T17:31:43
| 2018-03-16T17:31:43
| 137,648,798
| 0
| 0
| null | 2018-06-17T11:07:06
| 2018-06-17T11:07:05
| null |
UTF-8
|
Java
| false
| false
| 2,999
|
java
|
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
package com.microsoft.graph.requests.generated;
import com.microsoft.graph.concurrency.*;
import com.microsoft.graph.core.*;
import com.microsoft.graph.models.extensions.*;
import com.microsoft.graph.models.generated.*;
import com.microsoft.graph.http.*;
import com.microsoft.graph.requests.extensions.*;
import com.microsoft.graph.requests.generated.*;
import com.microsoft.graph.options.*;
import com.microsoft.graph.serializer.*;
import java.util.Arrays;
import java.util.EnumSet;
// **NOTE** This file was generated by a tool and any changes will be overwritten.
/**
* The class for the Base Workbook Functions Hyp Geom_Dist Request.
*/
public class BaseWorkbookFunctionsHypGeom_DistRequest extends BaseRequest implements IBaseWorkbookFunctionsHypGeom_DistRequest {
protected final WorkbookFunctionsHypGeom_DistBody body;
/**
* The request for this WorkbookFunctionsHypGeom_Dist
*
* @param requestUrl the request URL
* @param client the service client
* @param requestOptions the options for this request
*/
public BaseWorkbookFunctionsHypGeom_DistRequest(final String requestUrl, final IBaseClient client, final java.util.List<? extends Option> requestOptions) {
super(requestUrl, client, requestOptions, WorkbookFunctionResult.class);
body = new WorkbookFunctionsHypGeom_DistBody();
}
public void post(final ICallback<WorkbookFunctionResult> callback) {
send(HttpMethod.POST, callback, body);
}
public WorkbookFunctionResult post() throws ClientException {
return send(HttpMethod.POST, body);
}
/**
* Sets the select clause for the request
*
* @param value the select clause
* @return the updated request
*/
public IWorkbookFunctionsHypGeom_DistRequest select(final String value) {
getQueryOptions().add(new QueryOption("$select", value));
return (WorkbookFunctionsHypGeom_DistRequest)this;
}
/**
* Sets the top value for the request
*
* @param value the max number of items to return
* @return the updated request
*/
public IWorkbookFunctionsHypGeom_DistRequest top(final int value) {
getQueryOptions().add(new QueryOption("$top", value+""));
return (WorkbookFunctionsHypGeom_DistRequest)this;
}
/**
* Sets the expand clause for the request
*
* @param value the expand clause
* @return the updated request
*/
public IWorkbookFunctionsHypGeom_DistRequest expand(final String value) {
getQueryOptions().add(new QueryOption("$expand", value));
return (WorkbookFunctionsHypGeom_DistRequest)this;
}
}
|
[
"caitbal@microsoft.com"
] |
caitbal@microsoft.com
|
144c82f5d287051c390b018d9337730b187370a3
|
ce4eb2eae06c749eb10339b14cfb73d635578e43
|
/RQ3/PreFest test converted to Expresso/Timber/com/naman14/timber/activities/testcase2_002.java
|
7ebb58a4bc19c8995a60f3fe08d235f09076cb8a
|
[] |
no_license
|
julianharty/icst2020
|
ebd5fd335b8ddcdfa2bccf588e4d20bdeeb6cd81
|
550f420a1022e835746fceecdee9781e69b524b8
|
refs/heads/master
| 2022-03-14T18:21:38.626193
| 2019-10-14T20:23:42
| 2019-10-14T20:23:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,208
|
java
|
package com.naman14.timber.activities;
import android.util.Log;
import org.junit.*;
import org.junit.runner.RunWith;
import org.hamcrest.*;
import android.view.View;
import androidx.test.espresso.NoActivityResumedException;
import androidx.test.espresso.NoMatchingViewException;
import androidx.test.espresso.PerformException;
import androidx.test.espresso.ViewInteraction;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.LargeTest;
import androidx.test.rule.ActivityTestRule;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.action.ViewActions.click;
import static androidx.test.espresso.action.ViewActions.pressKey;
import static androidx.test.espresso.matcher.ViewMatchers.isRoot;
import static androidx.test.espresso.matcher.ViewMatchers.withContentDescription;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static androidx.test.espresso.matcher.ViewMatchers.withText;
import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
import static androidx.test.espresso.matcher.ViewMatchers.isAssignableFrom;
import static org.hamcrest.CoreMatchers.allOf;
import android.widget.EditText;
import static androidx.test.espresso.action.ViewActions.clearText;
import static androidx.test.espresso.action.ViewActions.typeText;@RunWith(AndroidJUnit4.class)
@LargeTest
public class testcase2_002 {
@Rule
public ActivityTestRule<MainActivity> activityRule = new ActivityTestRule<>(MainActivity.class);
@Rule
public RepeatedTestRule repeatRule = new RepeatedTestRule();
@Test
@RepeatTest(times = 1)
public void test() throws InterruptedException {
ViewInteraction last = null;
long testStartTime = System.currentTimeMillis();
// driver.press_keycode(4)
try{onView(isRoot()).perform(pressKey(4));}
//hitting BACK button may have caused the activity to exit
catch(NoActivityResumedException e){
long testFinishTime = System.currentTimeMillis();
Log.d("IN-VIVO", "Test: "+ getClass().getName()+", duration: " + ((testFinishTime-testStartTime)) + " ms");
// TimePrinter.getInstance().log("" + getClass().getName() + ", " + (testFinishTime-testStartTime));
return;
};
Thread.sleep(1000);
long testFinishTime = System.currentTimeMillis();
Log.d("IN-VIVO", "Test: "+ getClass().getName()+", duration: " + ((testFinishTime-testStartTime)) + " ms");
// TimePrinter.getInstance().log("" + getClass().getName() + ", " + (testFinishTime-testStartTime));
}
private Matcher<View> withIndex(final Matcher<View> matcher, final int index) {
return new TypeSafeMatcher<View>() {
int currentIndex = 0;
@Override
public void describeTo(Description description) {
description.appendText("with index: ");
description.appendValue(index);
matcher.describeTo(description);
}
@Override
public boolean matchesSafely(View view) {
return matcher.matches(view) && currentIndex++ == index;
}
};
}
}
|
[
"corradini@fbk.eu"
] |
corradini@fbk.eu
|
e07ee61edc55bc630a4dde926e6fe30415878db3
|
f97d6643da2e5fd7762cac83bff6f6f6615b6a15
|
/src/main/java/com/schantz/remotecq/client/CopyHealthGroupCommand.java
|
ae5622c122fe00be034c4bc580842ec0c95e8639
|
[] |
no_license
|
roo104/dls-middleware
|
51229bca28e12cb98fd849d2389c7c8a47973caf
|
14158ac6dc849b6c6a2cbfb39aef7d4f99960ed8
|
refs/heads/master
| 2021-05-01T05:12:40.195450
| 2017-02-09T08:55:22
| 2017-02-09T08:55:22
| 79,714,673
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,137
|
java
|
package com.schantz.remotecq.client;
import java.io.*;
import java.time.*;
import com.fasterxml.jackson.annotation.*;
public class CopyHealthGroupCommand implements Serializable {
@JsonProperty("healtGroupName")
private String healtGroupName = null;
@JsonProperty("startDate")
private LocalDate startDate = null;
@JsonProperty("versionNote")
private String versionNote = null;
@JsonProperty("copyMe")
private HealthGroupVersionIdCq copyMe = null;
public String getHealtGroupName() {
return healtGroupName;
}
public void setHealtGroupName(String healtGroupName) {
this.healtGroupName = healtGroupName;
}
public LocalDate getStartDate() {
return startDate;
}
public void setStartDate(LocalDate startDate) {
this.startDate = startDate;
}
public String getVersionNote() {
return versionNote;
}
public void setVersionNote(String versionNote) {
this.versionNote = versionNote;
}
public HealthGroupVersionIdCq getCopyMe() {
return copyMe;
}
public void setCopyMe(HealthGroupVersionIdCq copyMe) {
this.copyMe = copyMe;
}
}
|
[
"jonasp@schantz.com"
] |
jonasp@schantz.com
|
fa5b1f950a461e9ea37a627653144917efd6b0bc
|
97111be75ee99ce2c397e89d96849d6b77cc5386
|
/his-cloud/his-cloud-service-pms/src/main/java/com/neu/his/cloud/service/pms/mapper/BmsInvoiceRecordMapper.java
|
1c48b4fa013d8a9083dbf45d159dccefd65a7091
|
[
"Apache-2.0"
] |
permissive
|
ZainZhao/HIS
|
f75f3c681cb280efd14652ac0c7014ecb217c492
|
e9ee047d3efd54df6a71172f0210f666572e9699
|
refs/heads/master
| 2023-05-13T20:32:37.844243
| 2022-12-16T06:46:25
| 2022-12-16T06:46:25
| 196,420,709
| 1,046
| 478
|
Apache-2.0
| 2023-05-06T06:42:33
| 2019-07-11T15:28:30
|
Java
|
UTF-8
|
Java
| false
| false
| 1,027
|
java
|
package com.neu.his.cloud.service.pms.mapper;
import com.neu.his.cloud.service.pms.model.BmsInvoiceRecord;
import com.neu.his.cloud.service.pms.model.BmsInvoiceRecordExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface BmsInvoiceRecordMapper {
int countByExample(BmsInvoiceRecordExample example);
int deleteByExample(BmsInvoiceRecordExample example);
int deleteByPrimaryKey(Long id);
int insert(BmsInvoiceRecord record);
int insertSelective(BmsInvoiceRecord record);
List<BmsInvoiceRecord> selectByExample(BmsInvoiceRecordExample example);
BmsInvoiceRecord selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") BmsInvoiceRecord record, @Param("example") BmsInvoiceRecordExample example);
int updateByExample(@Param("record") BmsInvoiceRecord record, @Param("example") BmsInvoiceRecordExample example);
int updateByPrimaryKeySelective(BmsInvoiceRecord record);
int updateByPrimaryKey(BmsInvoiceRecord record);
}
|
[
"ZainZhao@994130442@qq.com"
] |
ZainZhao@994130442@qq.com
|
bb7856f3606c953a9d9de22aa99ebc0c61c28a61
|
7bda7971c5953d65e33bdf054360bdf4488aa7eb
|
/src/com/arcsoft/office/fc/xls/XLSReader.java
|
6ac542fe8bdd21045d8b4672647e00c4219ce9bb
|
[
"Apache-2.0"
] |
permissive
|
daddybh/iOffice
|
ee5dd5938f258d7dcfc0757b1809d31662dd07ef
|
d1d6b57fb0d496db5c5649f5bc3751b2a1539f83
|
refs/heads/master
| 2021-12-10T20:47:15.238083
| 2016-09-20T12:14:17
| 2016-09-20T12:14:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,216
|
java
|
/*
* 文件名称: XLSReader2.java
*
* 编译器: android2.2
* 时间: 上午11:12:41
*/
package com.arcsoft.office.fc.xls;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Iterator;
import java.util.List;
import com.arcsoft.office.fc.hssf.formula.eval.ErrorEval;
import com.arcsoft.office.fc.hssf.model.InternalSheet;
import com.arcsoft.office.fc.hssf.model.InternalWorkbook;
import com.arcsoft.office.fc.hssf.model.RecordStream;
import com.arcsoft.office.fc.hssf.record.BoolErrRecord;
import com.arcsoft.office.fc.hssf.record.CellValueRecordInterface;
import com.arcsoft.office.fc.hssf.record.NameRecord;
import com.arcsoft.office.fc.hssf.record.NumberRecord;
import com.arcsoft.office.fc.hssf.record.Record;
import com.arcsoft.office.fc.hssf.record.RecordFactory;
import com.arcsoft.office.fc.poifs.filesystem.DirectoryNode;
import com.arcsoft.office.fc.poifs.filesystem.POIFSFileSystem;
import com.arcsoft.office.ss.model.XLSModel.ACell;
import com.arcsoft.office.ss.model.XLSModel.AWorkbook;
import com.arcsoft.office.ss.model.baseModel.Cell;
import com.arcsoft.office.ss.model.baseModel.Workbook;
import com.arcsoft.office.system.AbortReaderError;
import com.arcsoft.office.system.IControl;
/**
* TODO: 文件注释
* <p>
* <p>
* Read版本: Read V1.0
* <p>
* 作者: jqin
* <p>
* 日期: 2012-7-19
* <p>
* 负责人: jqin
* <p>
* 负责小组:
* <p>
* <p>
*/
public class XLSReader extends SSReader
{
/**
*
* @param filePath
*/
public XLSReader(IControl control, String filePath)
{
this.control = control;
this.filePath = filePath;
}
/**
*
*/
public Object getModel() throws Exception
{
FileInputStream is = new FileInputStream(filePath);
Workbook book = new AWorkbook(is, this);
return book;
}
/**
*
* @param file
* @param key
* @return
*/
public boolean searchContent(File file, String key) throws Exception
{
try
{
key = key.toLowerCase();
FileInputStream is = new FileInputStream(file.getAbsolutePath());
DirectoryNode directory = new POIFSFileSystem(is).getRoot();
String workbookName = AWorkbook.getWorkbookDirEntryName(directory);
// Grab the data from the workbook stream, however
// it happens to be spelled.
InputStream stream = directory.createDocumentInputStream(workbookName);
List<Record> records = RecordFactory.createRecords(stream, this);
InternalWorkbook workbook = InternalWorkbook.createWorkbook(records, this);
//sheet name
int numSheets = workbook.getNumSheets();
int sheetIndex = 0;
while(sheetIndex < numSheets)
{
if(workbook.getSheetName(sheetIndex++).toLowerCase().contains(key))
{
return true;
}
}
// shared string
int size = workbook.getSSTUniqueStringSize();
for(int i = 0; i < size; i++)
{
checkAbortReader();
if(workbook.getSSTString(i).getString().toLowerCase().contains(key))
{
return true;
}
}
//cell of every sheet
int recOffset = workbook.getNumRecords();
RecordStream rs = new RecordStream(records, recOffset);
sheetIndex = 0;
while (rs.hasNext())
{
InternalSheet internalSheet = InternalSheet.createSheet(rs, this);
if(search_Sheet(internalSheet, key))
{
return true;
}
}
//name
for (int i = 0; i < workbook.getNumNames(); ++i)
{
NameRecord nameRecord = workbook.getNameRecord(i);
if(nameRecord.getNameText().toLowerCase().contains(key))
{
return true;
}
}
return false;
}
catch(Exception e)
{
e.printStackTrace();
return false;
}
}
private boolean search_Sheet(InternalSheet sheet, String key)
{
Iterator<CellValueRecordInterface> iter = sheet.getCellValueIterator();
// Add every cell to its row
while (iter.hasNext())
{
CellValueRecordInterface cval = iter.next();
checkAbortReader();
if(search_Cell(cval, key))
{
return true;
}
}
return false;
}
private boolean search_Cell(CellValueRecordInterface cval, String key)
{
short cellType = (short)ACell.determineType(cval);
switch (cellType)
{
case Cell.CELL_TYPE_NUMERIC:
return String.valueOf(((NumberRecord)cval).getValue()).contains(key);
case Cell.CELL_TYPE_STRING:
case Cell.CELL_TYPE_BLANK:
case Cell.CELL_TYPE_FORMULA:
break;
case Cell.CELL_TYPE_BOOLEAN:
return String.valueOf((( BoolErrRecord )cval).getBooleanValue()).toLowerCase().contains(key);
case Cell.CELL_TYPE_ERROR:
return ErrorEval.getText(((BoolErrRecord)cval).getErrorValue()).toLowerCase().contains(key);
}
return false;
}
private void checkAbortReader()
{
if (abortReader)
{
throw new AbortReaderError("abort Reader");
}
}
/**
*
*/
public void dispose()
{
super.dispose();
filePath = null;
}
// 文件路径
private String filePath;
}
|
[
"ljj@xinlonghang.cn"
] |
ljj@xinlonghang.cn
|
12c81737fb90ac0f9c1306b1213c0bbcd1e7faee
|
863a834bab40e8e479fb68b878ca94ba7c8f0794
|
/easy-cloud-core-parent/easy-cloud-core-mq/easy-cloud-core-mq/src/main/java/com/easy/cloud/core/mq/App.java
|
ac8d5bd25f7ab28c33e7fb71412ba137659a0bb0
|
[
"MIT"
] |
permissive
|
rjzfrj/easy-cloud
|
afb35cf83a46f95247ee8eeb0d95a979cb5c48b6
|
db199c69eeb7653d525f65aacf24c0f4676a1923
|
refs/heads/master
| 2020-03-18T08:33:56.843570
| 2018-05-02T12:50:45
| 2018-05-02T12:50:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 185
|
java
|
package com.easy.cloud.core.mq;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
}
}
|
[
"466608943@qq.com"
] |
466608943@qq.com
|
9ab42e3f30dc9e310045149e9a026e451d32ea1c
|
129f58086770fc74c171e9c1edfd63b4257210f3
|
/src/testcases/CWE191_Integer_Underflow/CWE191_Integer_Underflow__short_console_readLine_sub_54d.java
|
3f0e246b43545bce6691d8fa8fbb12c03c6c4114
|
[] |
no_license
|
glopezGitHub/Android23
|
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
|
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
|
refs/heads/master
| 2023-03-07T15:14:59.447795
| 2023-02-06T13:59:49
| 2023-02-06T13:59:49
| 6,856,387
| 0
| 3
| null | 2023-02-06T18:38:17
| 2012-11-25T22:04:23
|
Java
|
UTF-8
|
Java
| false
| false
| 1,482
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE191_Integer_Underflow__short_console_readLine_sub_54d.java
Label Definition File: CWE191_Integer_Underflow.label.xml
Template File: sources-sinks-54d.tmpl.java
*/
/*
* @description
* CWE: 191 Integer Underflow
* BadSource: console_readLine Read data from the console using readLine
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: sub
* GoodSink: Ensure there will not be an underflow before subtracting 1 from data
* BadSink : Subtract 1 from data, which can cause an Underflow
* Flow Variant: 54 Data flow: data passed as an argument from one method through three others to a fifth; all five functions are in different classes in the same package
*
* */
package testcases.CWE191_Integer_Underflow;
import testcasesupport.*;
public class CWE191_Integer_Underflow__short_console_readLine_sub_54d
{
public void bad_sink(short data ) throws Throwable
{
(new CWE191_Integer_Underflow__short_console_readLine_sub_54e()).bad_sink(data );
}
/* goodG2B() - use goodsource and badsink */
public void goodG2B_sink(short data ) throws Throwable
{
(new CWE191_Integer_Underflow__short_console_readLine_sub_54e()).goodG2B_sink(data );
}
/* goodB2G() - use badsource and goodsink */
public void goodB2G_sink(short data ) throws Throwable
{
(new CWE191_Integer_Underflow__short_console_readLine_sub_54e()).goodB2G_sink(data );
}
}
|
[
"guillermo.pando@gmail.com"
] |
guillermo.pando@gmail.com
|
ed145d9c481bb52f8def1d8053261c8ca5b9de09
|
f13e2382359691b6245f8574573fd3126c2f0a90
|
/repository/connector/src/main/java/org/hippoecm/repository/decorating/server/ServerWorkflowManager.java
|
62c9d229e29c6aa6759793c40be6de9582f3913c
|
[
"Apache-2.0"
] |
permissive
|
CapeSepias/hippo-1
|
cd8cbbf2b0f6cd89806a3861c0214d72ac5ee80f
|
3a7a97ec2740d0e3745859f7067666fdafe58a64
|
refs/heads/master
| 2023-04-27T21:04:19.976319
| 2013-12-13T13:01:51
| 2013-12-13T13:01:51
| 306,922,672
| 0
| 0
|
NOASSERTION
| 2023-04-17T17:42:23
| 2020-10-24T16:17:22
| null |
UTF-8
|
Java
| false
| false
| 4,225
|
java
|
/*
* Copyright 2008-2013 Hippo B.V. (http://www.onehippo.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hippoecm.repository.decorating.server;
import java.rmi.RemoteException;
import javax.jcr.Node;
import javax.jcr.RepositoryException;
import org.apache.jackrabbit.rmi.server.ServerObject;
import org.hippoecm.repository.api.Document;
import org.hippoecm.repository.api.Workflow;
import org.hippoecm.repository.api.WorkflowDescriptor;
import org.hippoecm.repository.api.WorkflowManager;
import org.hippoecm.repository.decorating.remote.RemoteWorkflowDescriptor;
import org.hippoecm.repository.decorating.remote.RemoteWorkflowManager;
public class ServerWorkflowManager extends ServerObject implements RemoteWorkflowManager {
private WorkflowManager workflowManager;
private ServerServicingAdapterFactory factory;
protected ServerWorkflowManager(WorkflowManager manager, ServerServicingAdapterFactory factory) throws RemoteException {
super(factory);
this.factory = factory;
this.workflowManager = manager;
}
public RemoteWorkflowDescriptor getWorkflowDescriptor(String category, String uuid) throws RepositoryException,
RemoteException {
try {
Node node = workflowManager.getSession().getNodeByUUID(uuid);
WorkflowDescriptor descriptor = workflowManager.getWorkflowDescriptor(category, node);
if (descriptor != null) {
return new ServerWorkflowDescriptor(factory, descriptor, workflowManager);
} else {
return null;
}
} catch (RepositoryException ex) {
throw getRepositoryException(ex);
}
}
public Workflow getWorkflow(String category, String absPath) throws RepositoryException, RemoteException {
try {
String path = absPath;
if (absPath.startsWith("/"))
path = path.substring(1);
Node node = workflowManager.getSession().getRootNode();
if (!path.equals(""))
node = node.getNode(path);
Workflow workflow = workflowManager.getWorkflow(category, node);
if (workflow != null) {
factory.export(workflow);
}
return workflow;
} catch (RepositoryException ex) {
throw getRepositoryException(ex);
}
}
public Workflow getWorkflow(String category, Document document) throws RepositoryException, RemoteException {
try {
Workflow workflow = workflowManager.getWorkflow(category, document);
if (workflow != null) {
factory.export(workflow);
}
return workflow;
} catch (RepositoryException ex) {
throw getRepositoryException(ex);
}
}
public Workflow getWorkflow(RemoteWorkflowDescriptor descriptor) throws RepositoryException, RemoteException {
try {
ServerWorkflowDescriptor serverDescriptor = (ServerWorkflowDescriptor) descriptor;
Workflow workflow = workflowManager.getWorkflow(serverDescriptor.descriptor);
if (workflow != null) {
factory.export(workflow);
}
return workflow;
} catch (RepositoryException ex) {
throw getRepositoryException(ex);
}
}
public WorkflowManager getContextWorkflowManager(Object specification) throws RepositoryException, RemoteException {
try {
return workflowManager.getContextWorkflowManager(specification);
} catch (RepositoryException ex) {
throw getRepositoryException(ex);
}
}
}
|
[
"m.denburger@onehippo.com"
] |
m.denburger@onehippo.com
|
a1594fe2ebcc4639bf424249b2b5497d8ca4365b
|
297aa14030ca7a285229d4096ef526c2d8c0cee9
|
/src/main/java/com/ly/study/thinkjava/encrypt/Test.java
|
ecdef1f47533ef0eef61ed4156f3406a3ef2ab68
|
[] |
no_license
|
1064447034/thinkjava
|
2311cd84f7b30d401daae7ca4ac6f6d63b73e1c5
|
c08e4c3635fa068f9bae485ea18209c7fd502b03
|
refs/heads/master
| 2020-04-06T13:22:26.096788
| 2019-01-02T05:48:48
| 2019-01-02T05:48:48
| 157,496,979
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,052
|
java
|
package com.ly.study.thinkjava.encrypt;
import java.util.UUID;
class Parent{
static String a = "hello";
{
System.out.println("name1 " + name);
System.out.println("3 parent block");
}
public Parent(){
System.out.println("name2 " + name);
System.out.println("4 parent constructor");
}
static int name = new Integer(3);
static {
System.out.println("name0 " + name);
System.out.println("1 parent static block");
}
}
class Child extends Parent{
static String childName = "hello";
{
System.out.println("5 child block");
}
static {
System.out.println("2 child static block");
}
public Child(){
System.out.println("6 child constructor");
}
}
public class Test {
public static void main(String[] args) {
System.out.println( UUID.randomUUID().toString());
new Child();//语句(*)
}
}
|
[
"zbs39170@ly.com"
] |
zbs39170@ly.com
|
799d409a3cd32b8b704a7f8f00b6d92ece376f45
|
7e1a576f0f6121ebad169a51703adf903790e2b2
|
/output/PHTMLHeadElement.java
|
132b0be410c66f46b9e4be948c7b2375b13431d0
|
[
"Apache-2.0"
] |
permissive
|
thuhiensp/Generator
|
5e118d868bb68b96070bc07d8f97108b87c18fcd
|
808cf825247825a0ca8efeb7a46a66ca394f3a97
|
refs/heads/master
| 2022-05-26T22:49:35.910572
| 2019-09-27T16:02:56
| 2019-09-27T16:02:56
| 211,355,898
| 0
| 0
| null | 2022-05-20T21:10:04
| 2019-09-27T16:03:41
|
Java
|
UTF-8
|
Java
| false
| false
| 1,152
|
java
|
/*
* Copyright 2019 SmartTrade Technologies
* Pony SDK
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.ponysdk.core.ui2;
import com.ponysdk.core.model.ServerToClientModel;
import com.ponysdk.core.writer.ModelWriter;
import com.ponysdk.core.server.application.UIContext;
import com.ponysdk.core.ui2.PLeafTypeNoArgs;
public class PHTMLHeadElement extends PHTMLElement {
public PHTMLHeadElement() {
}
@Override
protected PLeafTypeNoArgs widgetNoArgs() {
return PLeafTypeNoArgs.HTML_HEAD_ELEMENT;
}
@Override
protected PLeafTypeWithArgs widgetWithArgs() {
return null;
}
}
|
[
"hle@smart-trade.net"
] |
hle@smart-trade.net
|
6a4df14d96fbdffb089224180f6701c490a28754
|
05f3f98734263a9aeaa4f8df57a129cc3f251fed
|
/hotelBooking-1/src/main/java/fpt/com/HotelBooking1Application.java
|
fc6369f1959870f60992662721b0282a335b1015
|
[] |
no_license
|
huyhue/Spring-Framework
|
05e7b015157242c44b61386e1abbfe7e0741f8c9
|
774f2d88ae0b01b60ce3edcfa1c357a9d91db064
|
refs/heads/master
| 2023-04-25T01:27:15.155064
| 2021-05-15T16:35:39
| 2021-05-15T16:35:39
| 326,152,867
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 314
|
java
|
package fpt.com;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class HotelBooking1Application {
public static void main(String[] args) {
SpringApplication.run(HotelBooking1Application.class, args);
}
}
|
[
"tpgiahuy5@gmail.com"
] |
tpgiahuy5@gmail.com
|
7a8426a64db9aeb90f3f891e018cfb269f96f000
|
c164d8f1a6068b871372bae8262609fd279d774c
|
/src/main/java/edu/uiowa/slis/VIVOISF/PostdocPosition/PostdocPositionRelates.java
|
9a491a75c9808cf4c04f8f6df571c8b2d15b4def
|
[
"Apache-2.0"
] |
permissive
|
eichmann/VIVOISF
|
ad0a299df177d303ec851ff2453cbcbd7cae1ef8
|
e80cd8b74915974fac7ebae8e5e7be8615355262
|
refs/heads/master
| 2020-03-19T03:44:27.662527
| 2018-06-03T22:44:58
| 2018-06-03T22:44:58
| 135,757,275
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,013
|
java
|
package edu.uiowa.slis.VIVOISF.PostdocPosition;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspTagException;
@SuppressWarnings("serial")
public class PostdocPositionRelates extends edu.uiowa.slis.VIVOISF.TagLibSupport {
static PostdocPositionRelates currentInstance = null;
private static final Log log = LogFactory.getLog(PostdocPositionRelates.class);
// object property
public int doStartTag() throws JspException {
try {
PostdocPositionRelatesIterator thePostdocPositionRelatesIterator = (PostdocPositionRelatesIterator)findAncestorWithClass(this, PostdocPositionRelatesIterator.class);
pageContext.getOut().print(thePostdocPositionRelatesIterator.getRelates());
} catch (Exception e) {
log.error("Can't find enclosing PostdocPosition for relates tag ", e);
throw new JspTagException("Error: Can't find enclosing PostdocPosition for relates tag ");
}
return SKIP_BODY;
}
}
|
[
"david-eichmann@uiowa.edu"
] |
david-eichmann@uiowa.edu
|
e71465d3f339c463682688fd73dc0d6260eb11ac
|
783fce313a8addbbea828a045f24526cd285bf6f
|
/src/main/java/edu/uci/ics/luci/p2p4java/impl/content/defprovider/ActiveTransfer.java
|
fed6f8534fb1248c1388a5a5d026454c4e928f47
|
[] |
no_license
|
djp3/p2p4java
|
6c175f0c77f1a9dfe63b7e4d509cedc5335580e4
|
a1f3f8183cecaae8ede105a73cb27988abd988f5
|
refs/heads/production
| 2021-01-15T13:18:31.871703
| 2014-04-11T23:56:48
| 2014-04-11T23:58:05
| 11,042,321
| 13
| 2
| null | 2013-11-18T22:16:44
| 2013-06-29T01:05:40
|
Java
|
UTF-8
|
Java
| false
| false
| 7,039
|
java
|
/*
* The Sun Project JXTA(TM) Software License
*
* Copyright (c) 2001-2007 Sun Microsystems, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. The end-user documentation included with the redistribution, if any, must
* include the following acknowledgment: "This product includes software
* developed by Sun Microsystems, Inc. for JXTA(TM) technology."
* Alternately, this acknowledgment may appear in the software itself, if
* and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must
* not be used to endorse or promote products derived from this software
* without prior written permission. For written permission, please contact
* Project JXTA at http://www.jxta.org.
*
* 5. Products derived from this software may not be called "JXTA", nor may
* "JXTA" appear in their name, without prior written permission of Sun.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN
* MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* JXTA is a registered trademark of Sun Microsystems, Inc. in the United
* States and other countries.
*
* Please see the license information page at :
* <http://www.jxta.org/project/www/license.html> for instructions on use of
* the license in source files.
*
* ====================================================================
* This software consists of voluntary contributions made by many individuals
* on behalf of Project JXTA. For more information on Project JXTA, please see
* http://www.jxta.org.
*
* This license is based on the BSD license adopted by the Apache Foundation.
*/
package edu.uci.ics.luci.p2p4java.impl.content.defprovider;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.OutputStream;
import edu.uci.ics.luci.p2p4java.content.Content;
import edu.uci.ics.luci.p2p4java.document.Document;
import edu.uci.ics.luci.p2p4java.peergroup.PeerGroup;
import edu.uci.ics.luci.p2p4java.pipe.OutputPipe;
import edu.uci.ics.luci.p2p4java.pipe.PipeService;
import edu.uci.ics.luci.p2p4java.protocol.PipeAdvertisement;
/**
* A node being tracked by the ActiveTransferTracker class. This class acts
* as a session object of sorts, maintaining client/request specific
* information for use in the near future.
*/
public class ActiveTransfer {
/**
* Amount of time which must elapse before a client will be considered
* inactive - forfeiting it's slot - in seconds.
*/
private static final long CLIENT_TIMEOUT =
Long.getLong(ActiveTransfer.class.getName()
+ ".clientTimeout", 45).intValue() * 1000;
/**
* Timeout used for output pipe resolution, in seconds.
*/
private static final int PIPE_TIMEOUT =
Integer.getInteger(ActiveTransfer.class.getName()
+ ".pipeTimeout", 10).intValue() * 1000;
/**
* OutputPipe to send response data to.
*/
private final OutputPipe destPipe;
/**
* Recovery window used to maintain temporary references to recent data
* in the event the client needs to retry.
*/
private final RecoveryWindow window;
/**
* The share which we are serving.
*/
private final DefaultContentShare share;
/**
* The last time data was requested from this transfer client.
*/
private long lastAccess = System.currentTimeMillis();
/**
* Constructs a new transfer client node.
*/
public ActiveTransfer(
PeerGroup peerGroup,
DefaultContentShare toShare,
PipeAdvertisement destination) throws IOException {
// Setup a pipe to the source
PipeService pipeService = peerGroup.getPipeService();
destPipe = pipeService.createOutputPipe(destination, PIPE_TIMEOUT);
share = toShare;
Content content = toShare.getContent();
Document doc = content.getDocument();
BufferedInputStream in = new BufferedInputStream(doc.getStream());
window = new RecoveryWindow(in);
}
/**
* Attempt to get the data specified for the destination given.
*
* @param offset position in the file of the beginning of the data
* @param length number of bytes desired
* @param out stream to write the data to
* @return negative X when X bytes have been copied and EOF has been
* reached, positive X when X bytes have been copied and EOF was
* not reached, or 0 if no bytes could be copied.
* @throws IOException when a problem arises working with IO
*/
public synchronized int getData(
long offset, int length, OutputStream out)
throws IOException {
int result;
result = window.getData(offset, length, out);
lastAccess = System.currentTimeMillis();
return result;
}
/**
* Determines whether or not this session has been idle for too long.
*
* @return true if the session is idle, false if it has been reasonably
* active
*/
public synchronized boolean isIdle() {
return (System.currentTimeMillis() - lastAccess) > CLIENT_TIMEOUT;
}
/**
* Close out this session.
*
* @throws IOException when IO problem arises
*/
public synchronized void close() throws IOException {
window.close();
destPipe.close();
}
/**
* Gets the output pipe for sending responses back to this client.
*
* @return output pipe
*/
public OutputPipe getOutputPipe() {
return destPipe;
}
/**
* Gets the ContentShare object that this transfer session is
* serving.
*
* @return content share instance
*/
public DefaultContentShare getContentShare() {
return share;
}
}
|
[
"d_j_p_3@djp3.net"
] |
d_j_p_3@djp3.net
|
f001842472e581f2e9e2e2485364f3af5de5753a
|
72b32da4e06500cc705ecea0c949d81fc03dcabb
|
/Code/chapter_16/exercises/16.c-16.d-16.e-16.f-16.g-16.h/Bean.java
|
56047d28d2367349b6a7036b800587d80b5054b9
|
[] |
no_license
|
desioc/JFACode
|
358c941f52a0a6a75e0c8be6ce4708296aa11e64
|
e0f40b14dde2fe43b3193fa02a865bc875e937e7
|
refs/heads/master
| 2023-05-15T03:01:00.575551
| 2021-06-09T07:48:52
| 2021-06-09T07:48:52
| 347,454,318
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 433
|
java
|
package metadata;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
public @interface Bean {
int methodsMaxNumber();
int variablesMinNumber();
}
|
[
"61605795+desioc@users.noreply.github.com"
] |
61605795+desioc@users.noreply.github.com
|
056fb0d79f6db04314f2fbe363119e9f452bc51b
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project84/src/test/java/org/gradle/test/performance84_4/Test84_387.java
|
83f1aa25bc14a030bcdf31e00a018aa2d60a1836
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 292
|
java
|
package org.gradle.test.performance84_4;
import static org.junit.Assert.*;
public class Test84_387 {
private final Production84_387 production = new Production84_387("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
08b641297f2376d14cf8d57cfefffd08fb578279
|
e5fcecd08dc30e947cf11d1440136994226187c6
|
/spagobi-core/src/main/java/it/eng/spagobi/tools/dataset/cache/impl/sqldbcache/SelectBuilder.java
|
6f2b339ad29c6a414c6c3d1462497fa69e72d915
|
[] |
no_license
|
skoppe/SpagoBI
|
16851fa5a6949b5829702eaea2724cee0629560b
|
7a295c096e3cca9fb53e5c125b9566983472b259
|
refs/heads/master
| 2021-05-05T10:18:35.120113
| 2017-11-27T10:26:44
| 2017-11-27T10:26:44
| 104,053,911
| 0
| 0
| null | 2017-09-19T09:19:44
| 2017-09-19T09:19:43
| null |
UTF-8
|
Java
| false
| false
| 3,680
|
java
|
/**
SpagoBI - The Business Intelligence Free Platform
Copyright (C) 2005-2010 Engineering Ingegneria Informatica S.p.A.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
**/
package it.eng.spagobi.tools.dataset.cache.impl.sqldbcache;
import java.util.ArrayList;
import java.util.List;
/**
* @author John Krasnay - original code http://john.krasnay.ca/2010/02/15/building-sql-in-java.html Licensed under the Apache License, Version 2.0
* http://www.apache.org/licenses/
*
*/
public class SelectBuilder {
protected boolean distinctEnabled = false;
protected List<String> columns = new ArrayList<String>();
protected List<String> tables = new ArrayList<String>();
protected List<String> joins = new ArrayList<String>();
protected List<String> leftJoins = new ArrayList<String>();
protected List<String> wheres = new ArrayList<String>();
protected List<String> orderBys = new ArrayList<String>();
protected List<String> groupBys = new ArrayList<String>();
protected List<String> havings = new ArrayList<String>();
public SelectBuilder() {
}
public SelectBuilder(String table) {
tables.add(table);
}
protected void appendList(StringBuilder sql, List<String> list, String init, String sep) {
boolean first = true;
for (String s : list) {
if (first) {
sql.append(init);
} else {
sql.append(sep);
}
sql.append(s);
first = false;
}
}
public SelectBuilder column(String name) {
columns.add(name);
return this;
}
public SelectBuilder column(String name, boolean groupBy) {
columns.add(name);
if (groupBy) {
groupBys.add(name);
}
return this;
}
public SelectBuilder from(String table) {
tables.add(table);
return this;
}
public SelectBuilder groupBy(String expr) {
groupBys.add(expr);
return this;
}
public SelectBuilder having(String expr) {
havings.add(expr);
return this;
}
public SelectBuilder join(String join) {
joins.add(join);
return this;
}
public SelectBuilder leftJoin(String join) {
leftJoins.add(join);
return this;
}
public SelectBuilder orderBy(String name) {
orderBys.add(name);
return this;
}
@Override
public String toString() {
StringBuilder sql = new StringBuilder("select ");
if (isDistinctEnabled()) {
sql.append(" distinct ");
}
if (columns.size() == 0) {
sql.append("*");
} else {
appendList(sql, columns, "", ", ");
}
appendList(sql, tables, " from ", ", ");
appendList(sql, joins, " join ", " join ");
appendList(sql, leftJoins, " left join ", " left join ");
appendList(sql, wheres, " where ", " and ");
appendList(sql, groupBys, " group by ", ", ");
appendList(sql, havings, " having ", " and ");
appendList(sql, orderBys, " order by ", ", ");
return sql.toString();
}
public SelectBuilder where(String expr) {
wheres.add(expr);
return this;
}
public boolean isDistinctEnabled() {
return distinctEnabled;
}
public void setDistinctEnabled(boolean distinctEnabled) {
this.distinctEnabled = distinctEnabled;
}
}
|
[
"mail@skoppe.eu"
] |
mail@skoppe.eu
|
cb8fe216bf8392551a51fedf67d39f10a7706ffc
|
b4e4ab3fdaf818b8a48fe945391ae1be74b4008f
|
/source/utils/utils-http/src/main/java/com/jd/blockchain/utils/http/agent/DefaultResponseConverterFactory.java
|
9f2483fc6b7435e5913ae660ba8b40f34e69a73c
|
[
"Apache-2.0"
] |
permissive
|
Spark3122/jdchain
|
78ef86ffdec066a1514c3152b35a42955fa2866d
|
3378c0321b2fcffa5b91eb9739001784751742c5
|
refs/heads/master
| 2020-07-27T20:27:35.258501
| 2019-09-04T17:51:15
| 2019-09-04T17:51:15
| 209,207,377
| 1
| 0
|
Apache-2.0
| 2019-09-18T03:17:36
| 2019-09-18T03:17:36
| null |
UTF-8
|
Java
| false
| false
| 1,203
|
java
|
package com.jd.blockchain.utils.http.agent;
import java.lang.reflect.Method;
import com.jd.blockchain.utils.http.HttpAction;
import com.jd.blockchain.utils.http.ResponseBodyConverterFactory;
import com.jd.blockchain.utils.http.ResponseConverter;
import com.jd.blockchain.utils.http.converters.ByteArrayResponseConverter;
import com.jd.blockchain.utils.http.converters.JsonResponseConverter;
import com.jd.blockchain.utils.http.converters.StringResponseConverter;
public class DefaultResponseConverterFactory implements ResponseBodyConverterFactory {
public static final DefaultResponseConverterFactory INSTANCE = new DefaultResponseConverterFactory();
private DefaultResponseConverterFactory() {
}
@Override
public ResponseConverter createResponseConverter(HttpAction actionDef, Method mth) {
Class<?> retnClazz = mth.getReturnType();
// create default response converter;
if (byte[].class == retnClazz) {
return ByteArrayResponseConverter.INSTANCE;
}
if (String.class == retnClazz) {
return StringResponseConverter.INSTANCE;
}
// TODO:未处理 基本类型、输入输出流;
return new JsonResponseConverter(retnClazz);
}
}
|
[
"huanghaiquan@jd.com"
] |
huanghaiquan@jd.com
|
6a9def46bc2a4ef718c3f74f0c8cecc6f2195fd5
|
281fc20ae4900efb21e46e8de4e7c1e476f0d132
|
/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/custom/UserBean.java
|
e13407d0d61964b791dfcfc67f862ff3ebf7de35
|
[] |
no_license
|
nuxeo/richfaces-3.3
|
c23b31e69668810219cf3376281f669fa4bf256f
|
485749c5f49ac6169d9187cc448110d477acab3b
|
refs/heads/master
| 2023-08-25T13:27:08.790730
| 2015-01-05T10:42:11
| 2015-01-05T10:42:11
| 10,627,040
| 3
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 478
|
java
|
package org.richfaces.helloworld.domain.custom;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
@Name("userBean")
@Scope(ScopeType.SESSION)
public class UserBean {
private String name;
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name
* the name to set
*/
public void setName(String name) {
this.name = name;
}
}
|
[
"grenard@nuxeo.com"
] |
grenard@nuxeo.com
|
bb92b873cbda3f8b4a7741bb8e47ab775a56914b
|
8ef2179ef743a8aadf41ce6bd6f652d28f2c0595
|
/Hibernate/Spring Data Intro/Exercises/spring/src/main/java/com/spring/project/spring/bookshop/entities/Author.java
|
377f7b1bf8a9b3060f6d501bba3508348777c8b0
|
[
"MIT"
] |
permissive
|
mikaelparsekyan/Softuni-Task-Solutions
|
d511fcbd6e682ae6fc498c9c39b7dd1249a68dac
|
7344384d0894caa39e0488f33179bb3b25d78c57
|
refs/heads/master
| 2022-12-28T04:26:47.921734
| 2020-04-19T18:34:14
| 2020-04-19T18:34:14
| 197,333,233
| 0
| 0
|
MIT
| 2022-12-10T05:58:56
| 2019-07-17T06:57:30
|
Java
|
UTF-8
|
Java
| false
| false
| 1,218
|
java
|
package com.spring.project.spring.bookshop.entities;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
import javax.persistence.*;
import java.util.Objects;
import java.util.Set;
@Entity
@Table(name = "authors")
@Data
@NoArgsConstructor
@RequiredArgsConstructor
public class Author extends BaseEntity {
@NonNull
@Column(name = "first_name")
private String firstName;
@NonNull
@Column(name = "last_name", nullable = false)
private String lastName;
@OneToMany(mappedBy = "author",fetch = FetchType.EAGER,cascade = CascadeType.ALL)
private Set<Book> books;
@Override
public String toString() {
return "Author{}";
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
Author author = (Author) o;
return Objects.equals(firstName, author.firstName) &&
Objects.equals(lastName, author.lastName);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), firstName, lastName);
}
}
|
[
"mikael90@abv.bg"
] |
mikael90@abv.bg
|
ed9de97448e45e1f1a42e10e2e3fac54ba7ab6ae
|
399b2072a17c5302a3461179c19f7eaf05147717
|
/RTD_RTS2/src/eu/gloria/rts2/rtd/RotatorRTD.java
|
00e610240d5625a18c739438ea7bc0e9a52a7a4a
|
[] |
no_license
|
mclopez-uma/GLORIA_RTSInteractiveRTS2
|
544006bb99d1f12dd643a9950efc31371de076e1
|
b526c6a2970714799c2cddcc70921d3dafdc8d79
|
refs/heads/master
| 2021-01-25T03:54:52.348241
| 2014-05-20T11:35:01
| 2014-05-20T11:35:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,513
|
java
|
package eu.gloria.rts2.rtd;
import java.util.ArrayList;
import java.util.List;
import eu.gloria.rt.entity.device.DeviceProperty;
import eu.gloria.rt.exception.RTException;
import eu.gloria.rtd.RTDRotatorInterface;
import eu.gloria.rts2.http.Rts2Date;
import eu.gloria.rts2.http.Rts2MessageType;
import eu.gloria.rts2.http.Rts2Messages;
/**
* RTS2 RTDRotatorInterface implementation for generic RTS2 rotad device.
*
* @author mclopez
*
*/
public class RotatorRTD extends DeviceRTD implements RTDRotatorInterface{
/**
* Constructor
*/
public RotatorRTD() {
}
/**
* {@inheritDoc}
* <p>
* Recovers "CUR_POS" from RTS2 rotad.
*/
@Override
public double rttGetCurrentPosition() throws RTException {
DeviceProperty property = this.devGetDeviceProperty("CUR_POS");
return Double.valueOf(property.getValue().get(0));
}
/**
* {@inheritDoc}
* <p>
* Sets "TAR_POS" from RTS2 rotad.
*/
@Override
public void rttSetTargetPosition(double position) throws RTException {
List<String> valueProp = new ArrayList<String>();
valueProp.add(String.valueOf(position));
long time = Rts2Date.now();
if(!this.devUpdateDeviceProperty("TAR_POS", valueProp))
throw new RTException("Cannot change target position");
//Message recovering
String message = Rts2Messages.getMessageText (Rts2MessageType.error, getDeviceId(), time);
if (message != null)
throw new RTException(message);
}
}
|
[
"mclopezc@uma.es"
] |
mclopezc@uma.es
|
a16b646329fd15e6fd6aeaa96754bfc0f97986da
|
bd8e7b5b2a85ea0198397a556cdab56b396f6e76
|
/src/test/java/org/squiddev/cobalt/compiler/CompileTestHelper.java
|
b3df9045c21a38d9ac2aaba841c6cfd2b22f03b2
|
[
"MIT"
] |
permissive
|
debus/Cobalt
|
463994441ed081cc6ffb8f41f10d100feacd34a8
|
466edd9080a59e4fe19b8dcd344587e33e0195dc
|
refs/heads/master
| 2020-08-31T09:28:39.383802
| 2019-08-18T14:18:55
| 2019-08-18T14:18:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,551
|
java
|
package org.squiddev.cobalt.compiler;
import org.squiddev.cobalt.Print;
import org.squiddev.cobalt.Prototype;
import java.io.*;
import static org.junit.Assert.assertEquals;
import static org.squiddev.cobalt.ValueFactory.valueOf;
public class CompileTestHelper {
/**
* Compiled and compares the bytecode
*
* @param file The path of the file to use
* @throws IOException
*/
public static void compareResults(String dir, String file) throws IOException, CompileException {
// Compile in memory
String sourceBytecode = protoToString(LuaC.compile(new ByteArrayInputStream(bytesFromJar(dir + file + ".lua")), "@" + file + ".lua"));
// Load expected value from jar
Prototype expectedPrototype = loadFromBytes(bytesFromJar(dir + file + ".lc"), file + ".lua");
String expectedBytecode = protoToString(expectedPrototype);
// compare results
assertEquals(expectedBytecode, sourceBytecode);
// Redo bytecode
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
DumpState.dump(expectedPrototype, outputStream, false);
String redumpBytecode = protoToString(loadFromBytes(outputStream.toByteArray(), file + ".lua"));
// compare again
assertEquals(sourceBytecode, redumpBytecode);
}
/**
* Read bytes from a resource
*
* @param path The path to the resource
* @return A byte array containing the file
*/
private static byte[] bytesFromJar(String path) throws IOException {
InputStream is = CompileTestHelper.class.getResourceAsStream(path);
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
byte[] buffer = new byte[2048];
int n;
while ((n = is.read(buffer)) >= 0) {
outputStream.write(buffer, 0, n);
}
is.close();
return outputStream.toByteArray();
}
/**
* Load a file from the bytes
*
* @param bytes The bytes to load from
* @param script The name of the file to use
* @return A Prototype from the compiled bytecode
*/
private static Prototype loadFromBytes(byte[] bytes, String script) throws IOException, CompileException {
InputStream is = new ByteArrayInputStream(bytes);
return LoadState.loadBinaryChunk(is.read(), is, valueOf(script));
}
/**
* Pretty print a prototype as a String
*
* @param p The prototype to use
* @return String containing a pretty version of the prototype
*/
private static String protoToString(Prototype p) {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
Print.ps = new PrintStream(outputStream);
Print.printFunction(p, true);
return outputStream.toString();
}
}
|
[
"bonzoweb@hotmail.co.uk"
] |
bonzoweb@hotmail.co.uk
|
da3d58fa3d72e2b51c473a8443429413a3630ee0
|
7b4914bf95af54caa07050e3cf23ebf47b590af9
|
/WEB-INF/src/com/bureaueye/beacon/ajax/quotation/RefreshQuohdrListServlet.java
|
30df48b6f3370001c3d01a38837053785f252c6d
|
[
"Apache-2.0"
] |
permissive
|
avesus/beacon
|
fd1874799f91c7b84e5244eb9b3e8e243a81c3c8
|
d6626f97153acc8c1eb0f0c5d51f5693c9815a06
|
refs/heads/master
| 2022-01-08T11:52:49.468174
| 2019-07-08T08:02:03
| 2019-07-08T08:02:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,069
|
java
|
package com.bureaueye.beacon.ajax.quotation;
import java.io.IOException;
import java.util.Calendar;
import java.util.Iterator;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.bureaueye.beacon.ajax.BaseAJAX;
import com.bureaueye.beacon.bean.Constants;
import com.bureaueye.beacon.exception.ApplicationException;
import com.bureaueye.beacon.form.ListForm;
import com.bureaueye.beacon.model.quotation.Quohdr;
import com.bureaueye.beacon.model.quotation.bd.QuohdrBD;
import com.bureaueye.beacon.model.system.SystemcodePK;
import com.bureaueye.beacon.model.standard.bd.AddressBD;
import com.bureaueye.beacon.model.system.bd.SystemcodeBD;
import javax.servlet.*;
public final class RefreshQuohdrListServlet extends BaseAJAX {
private static final long serialVersionUID = 1L;
protected void execute(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
// get input parameters
String userid = "";
try {
userid = request.getParameter("userid");
} catch (Exception e) {}
log.debug("[" + this.getClass().getName() + "] " + new java.util.Date()
+ " userid: " + userid
);
// init output
StringBuffer results = new StringBuffer("");
results.append("<channel>");
// process if input parameters found
if (userid != null) {
// init business delegate fields
ListForm listForm = new ListForm();
listForm.setMaxResults(Constants.MAX_TOTAL_RESULTS);
listForm.setGotoPage(0);
listForm.setSearchString1(userid);
AddressBD addressbd = new AddressBD(this.getSessionFactoryClusterMap());
Calendar c = Calendar.getInstance();
int dateRangeDays = 7;
try{
dateRangeDays = new Integer(new SystemcodeBD(this.getSessionFactoryClusterMap())
.read(new SystemcodePK("DATERANGEDAYS","LISTQUOHDR"))
.getDescr())
.intValue();
}catch(Exception e){}
// quote date 'from'
if (listForm.getSearchDate1() == null) {
c.add(Calendar.DATE,-1*dateRangeDays);
// default 'from' date to today minus 7
try {
listForm.setSearchDate1(c.getTime());
} catch (Exception e) {
}
}
// quote date 'to'
if (listForm.getSearchDate2() == null) {
// default 'to' date plus 7
c.add(Calendar.DATE,dateRangeDays);
try {
listForm.setSearchDate2(c.getTime());
} catch (Exception e) {
}
}
listForm.setOrderBy("Quotedate");
listForm.setOrderByDesc("Desc");
try {
listForm.setLineItems(new QuohdrBD(this.getSessionFactoryClusterMap()).findQuohdrsByKey1(listForm));
} catch (ApplicationException ae) {}
for(Iterator it = listForm.getLineItems().iterator(); it.hasNext();) {
Quohdr dao = (Quohdr)it.next();
results.append("<quohdrlist>");
results.append("<quohdrid><![CDATA[");
results.append(dao.getId());
results.append("]]></quohdrid>");
results.append("<quotno><![CDATA[");
results.append(dao.getQuotno());
results.append("]]></quotno>");
results.append("<customeraddrkey><![CDATA[");
try {
results.append(addressbd.read(dao.getCustomeraddrkey()).getName());
} catch (Exception e) {}
results.append("]]></customeraddrkey>");
results.append("<quotestatus><![CDATA[");
results.append(dao.getQuotestatus());
results.append("]]></quotestatus>");
results.append("<quotedate><![CDATA[");
results.append(dao.getQuotedate());
results.append("]]></quotedate>");
results.append("</quohdrlist>");
}
}
results.append("</channel>");
log.debug("[" + this.getClass().getName() + "] "
+ new java.util.Date() + " results: " + results.toString());
response.setContentType("text/xml");
response.setHeader("Cache-Control", "no-cache");
response.getWriter().write(results.toString());
}
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
processRequest(request, response);
}
}
|
[
"nicktankard@gmail.com"
] |
nicktankard@gmail.com
|
22d212eda8ebe9ae8a885e0c5078de03d5ce0ba2
|
c6c1a124eb1ff2fc561213d43d093f84d1ab2c43
|
/game-server/src/game/activity/ParticipationBase.java
|
6193c2b80d56b46906c411b03b39dbe888dea6f7
|
[] |
no_license
|
fantasylincen/javaplus
|
69201dba21af0973dfb224c53b749a3c0440317e
|
36fc370b03afe952a96776927452b6d430b55efd
|
refs/heads/master
| 2016-09-06T01:55:33.244591
| 2015-08-15T12:15:51
| 2015-08-15T12:15:51
| 15,601,930
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,072
|
java
|
package game.activity;
import util.SystemTimer;
import lombok.Getter;
import lombok.Setter;
/**
* 参与活动的玩家
*/
public class ParticipationBase {
// 玩家唯一ID
private int _nUID;
// 对大龙 累计 伤害
private int _nValue = 0;
// 挑战大龙次数
private byte _count;
// 是否全部死亡
@Getter
private boolean isDie;
// 记录时间
@Getter @Setter
private int time;
// 复活次数
private int[] resurgenceTimes = { 0,0 };
private boolean isInspire;
//开始进入战斗
@Getter @Setter
private boolean isEnterCombat = false;
public ParticipationBase( int uid ){
this._nUID = uid;
_count = 0;
_nValue = 0;
}
public int getUID(){
return this._nUID;
}
public int getValue() {
return this._nValue;
}
public void setValue( int damage ) {
this._nValue += damage;
}
public byte getCount(){
return _count;
}
public void setIsDie( boolean attackIsAllDie ) {
time = 0;
isDie = attackIsAllDie;
if( isDie )
time = SystemTimer.currentTimeSecond();
}
public boolean isEnter() {
updatatime();
return isDie;
}
/** 获得剩余时间 */
public int getResidueTime(){
updatatime();
if( time == 0 ) return 0;
// int residue = 15 - (SystemTimer.currentTimeSecond() - time);
int residue = 20 - (SystemTimer.currentTimeSecond() - time);
if( residue <= 0 ) residue = 1;
return residue;
}
private void updatatime(){
if( time == 0 || !isDie ) return ;
// int s = 15;
int s = 20;
int curt = SystemTimer.currentTimeSecond() - time;
if( curt >= s )
{
time = 0;
isDie = false;
}
}
/** 强制复活
* @param type */
public void resurgence() {
time = 0;
isDie = false;
}
public void jiluRresurgenceTimes( int index ){
++resurgenceTimes[index];
}
public int getRresurgenceTimes( int index ){
return resurgenceTimes[index];
}
public boolean isInspire() {
return this.isInspire;
}
public void stratInspire() {
isInspire = true;
}
public void closeInspire(){
isInspire = false;
}
}
|
[
"12-2"
] |
12-2
|
db165eeaf1ffd342824b694bd7534829a2acb86c
|
9cf5e794e28cae068caa7adc3f98da7edee06a7e
|
/src/test/java/com/test/boot/UserControllerTest.java
|
8a00469a6a4351c5e0255e0e0fcbcbb71816fdd8
|
[] |
no_license
|
aqib1/JenkinsWithDocker
|
c22687cd214b362b98e0dfb0c0716c8811ea3bbb
|
b741237bf378c49b339f7c71d5fd9a13aad26a89
|
refs/heads/master
| 2023-02-14T16:52:33.660440
| 2021-01-11T01:02:46
| 2021-01-11T01:02:46
| 328,492,201
| 0
| 0
| null | 2021-01-11T01:02:48
| 2021-01-10T22:27:59
|
Java
|
UTF-8
|
Java
| false
| false
| 592
|
java
|
package com.test.boot;
import com.test.boot.controllers.UserController;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.springframework.test.util.AssertionErrors;
import java.util.Arrays;
import java.util.List;
public class UserControllerTest {
private UserController controller = new UserController();
@Test
public void testUsers() {
List<String> users = controller.getUsers();
AssertionErrors.assertEquals("",users, Arrays.asList("Aqib","Ali", "Ahmad"));
}
}
|
[
"aqibbutt3078@gmail.com"
] |
aqibbutt3078@gmail.com
|
706445b2bb2428e16b4282f859b4d6bf256e7a73
|
04cd8c95a681b091d1bd95000cf22fbdb62a0111
|
/ntsiot-system/src/main/java/com/nts/iot/modules/monitor/config/LogFilter.java
|
2a6c2c8c8fb20a4b578e30ab390df98d001efe76
|
[
"Apache-2.0"
] |
permissive
|
iOS-Lab/tracker-server
|
c2aa674989949d138fbfabf10e203c044c3a7477
|
74f81cc9e511c0bc75a98440d1fad2a25a827ce3
|
refs/heads/master
| 2023-01-08T14:33:44.711624
| 2020-11-04T06:31:40
| 2020-11-04T06:31:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 969
|
java
|
package com.nts.iot.modules.monitor.config;
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.filter.Filter;
import ch.qos.logback.core.spi.FilterReply;
import com.nts.iot.modules.monitor.domain.LogMessage;
import java.text.DateFormat;
import java.util.Date;
/**
* 定义Logfilter拦截输出日志
* @author jie
* @reference https://cloud.tencent.com/developer/article/1096792
* @date 2018-12-24
*/
public class LogFilter extends Filter<ILoggingEvent>{
@Override
public FilterReply decide(ILoggingEvent event) {
LogMessage loggerMessage = new LogMessage(
event.getFormattedMessage(),
DateFormat.getDateTimeInstance().format(new Date(event.getTimeStamp())),
event.getThreadName(),
event.getLoggerName(),
event.getLevel().levelStr
);
LoggerQueue.getInstance().push(loggerMessage);
return FilterReply.ACCEPT;
}
}
|
[
"18687269789@163.com"
] |
18687269789@163.com
|
efe218ebeb74c3c748c15ea9acdb506072b370f4
|
8939970ffdad8557ae91e04659e73f0360feeddf
|
/plugins/IntelliLang/intellilang-jps-plugin/testData/patternInstrumenter/TestAssert.java
|
b85b0cda685c114e1bb1474fff1cdb8e9aaadafb
|
[
"Apache-2.0"
] |
permissive
|
kishorechanti/intellij-community
|
79c510e0a7a283af7de4fae4987353da7bb698ab
|
02b7d90489e66fe5cae020b46d1901b2cc48e5c4
|
refs/heads/master
| 2020-04-01T05:32:43.433518
| 2018-10-09T05:13:19
| 2018-10-13T14:54:21
| 152,908,241
| 1
| 0
|
Apache-2.0
| 2018-10-13T19:42:50
| 2018-10-13T19:42:50
| null |
UTF-8
|
Java
| false
| false
| 355
|
java
|
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
import org.intellij.lang.annotations.Pattern;
public class TestAssert {
static {
assert TestAssert.class.getName().length() > 0;
}
@Pattern("\\d+")
public String simpleReturn() {
return "-";
}
}
|
[
"roman.shevchenko@jetbrains.com"
] |
roman.shevchenko@jetbrains.com
|
a39e8c7f1a337679ecbd38b4721b433859a03ac2
|
5fe537dfdb680932a19f86b22b8370263fc12f81
|
/src/com/open/taogubaweex/component/WeeXWeb.java
|
2cdd5edcc91db0fe99c6c4d7b2bcd34bdd13141e
|
[] |
no_license
|
fengmingxuan/weexandroideclipse
|
3963e13e08438bdec2e5205783e9a0fbbcf071b7
|
8a286c17fed1c5dc552b9d5637772f7d8211a180
|
refs/heads/master
| 2021-01-17T07:37:07.131482
| 2017-06-09T09:49:44
| 2017-06-09T09:49:44
| 83,776,806
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,597
|
java
|
/**
*/
package com.open.taogubaweex.component;
import android.content.Context;
import android.net.Uri;
import android.support.annotation.NonNull;
import android.text.TextUtils;
import android.view.View;
import com.taobao.weex.WXSDKInstance;
import com.taobao.weex.annotation.Component;
import com.taobao.weex.adapter.URIAdapter;
import com.taobao.weex.common.Constants;
import com.taobao.weex.dom.WXDomObject;
import com.taobao.weex.ui.component.WXComponent;
import com.taobao.weex.ui.component.WXComponentProp;
import com.taobao.weex.ui.component.WXVContainer;
import com.taobao.weex.utils.WXUtils;
import java.util.HashMap;
import java.util.Map;
@Component(lazyload = false)
public class WeeXWeb extends WXComponent {
public static final String GO_BACK = "goBack";
public static final String GO_FORWARD = "goForward";
public static final String RELOAD = "reload";
public static final String CALL_NATIVE_H5 = "callnativeh5";
protected IWeexWebView mWebView;
@Deprecated
public WeeXWeb(WXSDKInstance instance, WXDomObject dom, WXVContainer parent, String instanceId, boolean isLazy) {
this(instance,dom,parent,isLazy);
}
public WeeXWeb(WXSDKInstance instance, WXDomObject dom, WXVContainer parent, boolean isLazy) {
super(instance, dom, parent, isLazy);
createWebView();
}
protected void createWebView(){
mWebView = new WeeXWebView(getContext());
}
@Override
protected View initComponentHostView(@NonNull Context context) {
mWebView.setOnErrorListener(new IWeexWebView.OnErrorListener() {
@Override
public void onError(String type, Object message) {
fireEvent(type, message);
}
});
mWebView.setOnPageListener(new IWeexWebView.OnPageListener() {
@Override
public void onReceivedTitle(String title) {
if (getDomObject().getEvents().contains(Constants.Event.RECEIVEDTITLE)) {
Map<String, Object> params = new HashMap<>();
params.put("title", title);
fireEvent(Constants.Event.RECEIVEDTITLE, params);
}
}
@Override
public void onPageStart(String url) {
if ( getDomObject().getEvents().contains(Constants.Event.PAGESTART)) {
Map<String, Object> params = new HashMap<>();
params.put("url", url);
fireEvent(Constants.Event.PAGESTART, params);
}
}
@Override
public void onPageFinish(String url, boolean canGoBack, boolean canGoForward) {
if ( getDomObject().getEvents().contains(Constants.Event.PAGEFINISH)) {
Map<String, Object> params = new HashMap<>();
params.put("url", url);
params.put("canGoBack", canGoBack);
params.put("canGoForward", canGoForward);
fireEvent(Constants.Event.PAGEFINISH, params);
}
}
});
return mWebView.getView();
}
@Override
public void destroy() {
super.destroy();
getWebView().destroy();
}
@Override
protected boolean setProperty(String key, Object param) {
switch (key) {
case Constants.Name.SHOW_LOADING:
Boolean result = WXUtils.getBoolean(param,null);
if (result != null)
setShowLoading(result);
return true;
case Constants.Name.SRC:
String src = WXUtils.getString(param,null);
if (src != null)
setUrl(src);
return true;
}
return super.setProperty(key,param);
}
@WXComponentProp(name = Constants.Name.SHOW_LOADING)
public void setShowLoading(boolean showLoading) {
getWebView().setShowLoading(showLoading);
}
@WXComponentProp(name = Constants.Name.SRC)
public void setUrl(String url) {
if (TextUtils.isEmpty(url) || getHostView() == null) {
return;
}
if (!TextUtils.isEmpty(url)) {
loadUrl(getInstance().rewriteUri(Uri.parse(url), URIAdapter.WEB).toString());
}
}
public void setAction(String action,String ref,String json) {
if (!TextUtils.isEmpty(action)) {
if (action.equals(GO_BACK)) {
goBack();
} else if (action.equals(GO_FORWARD)) {
goForward();
} else if (action.equals(RELOAD)) {
reload();
} else if (action.equals(CALL_NATIVE_H5)) {
callnativeh5(ref,json);
}
}
}
private void fireEvent(String type, Object message) {
if (getDomObject().getEvents().contains(Constants.Event.ERROR)) {
Map<String, Object> params = new HashMap<>();
params.put("type", type);
params.put("errorMsg", message);
fireEvent(Constants.Event.ERROR, params);
}
}
private void loadUrl(String url) {
getWebView().loadUrl(url);
}
private void reload() {
getWebView().reload();
}
private void callnativeh5(String ref,String json) {
getWebView().callnativeh5(ref,json);
}
private void goForward() {
getWebView().goForward();
}
private void goBack() {
getWebView().goBack();
}
private IWeexWebView getWebView() {
return mWebView;
}
}
|
[
"624926379@qq.com"
] |
624926379@qq.com
|
8ac32a2c6d4ea2f0fa129a76f2dc04e54289971e
|
b42dcd372be067479457963338aad2f74ca6ff6e
|
/Community/src/main/java/com/koreait/community/board/BoardMapper.java
|
87d90035c3a8219c7db7259e4eec2029d08a4a54
|
[] |
no_license
|
sbsteacher/2020JavaDevClass_Community
|
e720b11e471a0b1faec544dacc17251b4693613c
|
f9aa2a73a725a2204f70724b30fd45be26058baf
|
refs/heads/main
| 2023-03-11T02:12:19.034870
| 2021-02-17T08:42:53
| 2021-02-17T08:42:53
| 333,022,785
| 0
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 466
|
java
|
package com.koreait.community.board;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import com.koreait.community.model.BoardDTO;
import com.koreait.community.model.BoardDomain;
import com.koreait.community.model.BoardEntity;
@Mapper
public interface BoardMapper {
int insBoard(BoardEntity p);
int selMaxPageNum(BoardDTO p);
List<BoardDomain> selBoardList(BoardDTO p);
BoardDomain selBoard(BoardDTO p);
int updBoard(BoardEntity p);
}
|
[
"Administrator@DESKTOP-ISVFPRU"
] |
Administrator@DESKTOP-ISVFPRU
|
9cfd4ad2f16fba49be2c86d6b033b2964fb585a2
|
4be2623b3cc95e039f214f2ad8d9fc14fa404ee9
|
/src/interviewQuestions/RemoveOrReplacePartOfAStringInJava/_1_StringAPI.java
|
945a204bfbd831f99d67e6b1aaca451eb6623736
|
[] |
no_license
|
maainul/Java
|
df6364f57e5c4cdca3ff83894b633f19197b541e
|
81681c9f48946b07c4f839f1db6d9953fe47a9df
|
refs/heads/master
| 2023-04-26T22:13:27.395026
| 2021-04-29T20:47:41
| 2021-04-29T20:47:41
| 229,538,242
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 371
|
java
|
package interviewQuestions.RemoveOrReplacePartOfAStringInJava;
public class _1_StringAPI {
public static void main(String[] args) {
String originalString = "Hello how are you?";
String targetedString = "Hello";
String replaceString = "Hi";
String resultString = originalString.replace(targetedString, replaceString);
System.out.println(resultString);
}
}
|
[
"mainul080@yahoo.com"
] |
mainul080@yahoo.com
|
5875c6f7eb0e29c1016fe4e52101ac882683d244
|
27cda5e6fb5da7ae2dea91450ca1082bcaa55424
|
/Source/Java/ImagingBaseWebFacade/main/src/java/gov/va/med/imaging/wado/DocumentServlet.java
|
9605ac53a8abc45b8630705a05031340c7f8f260
|
[
"Apache-2.0"
] |
permissive
|
VHAINNOVATIONS/Telepathology
|
85552f179d58624e658b0b266ce83e905480acf2
|
989c06ccc602b0282c58c4af3455c5e0a33c8593
|
refs/heads/master
| 2021-01-01T19:15:40.693105
| 2015-11-16T22:39:23
| 2015-11-16T22:39:23
| 32,991,526
| 3
| 9
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,601
|
java
|
/**
* Package: MAG - VistA Imaging
* WARNING: Per VHA Directive 2004-038, this routine should not be modified.
* Date Created: Apr 17, 2008
* Site Name: Washington OI Field Office, Silver Spring, MD
* @author VHAISWBECKEC
* @version 1.0
*
* ----------------------------------------------------------------
* Property of the US Government.
* No permission to copy or redistribute this software is given.
* Use of unreleased versions of this software requires the user
* to execute a written test agreement with the VistA Imaging
* Development Office of the Department of Veterans Affairs,
* telephone (301) 734-0100.
*
* The Food and Drug Administration classifies this software as
* a Class II medical device. As such, it may not be changed
* in any way. Modifications to this software may result in an
* adulterated medical device under 21CFR820, the use of which
* is considered to be a violation of US Federal Statutes.
* ----------------------------------------------------------------
*/
package gov.va.med.imaging.wado;
import gov.va.med.GlobalArtifactIdentifierFactory;
import gov.va.med.OctetSequenceEscaping;
import gov.va.med.imaging.channels.ByteStreamPump;
import gov.va.med.imaging.channels.AbstractBytePump.TRANSFER_TYPE;
import gov.va.med.imaging.exchange.business.documents.DocumentRetrieveResult;
import gov.va.med.imaging.transactioncontext.TransactionContext;
import gov.va.med.imaging.transactioncontext.TransactionContextFactory;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;
/**
* @author VHAISWBECKEC
*
*/
public class DocumentServlet
extends AbstractBaseImageServlet
{
private static final long serialVersionUID = 1L;
private Logger logger = Logger.getLogger(this.getClass());
/**
*
*/
public DocumentServlet()
{
}
/**
* The request URL must specify the document identifiers in the form:
* <home community ID>/<repository ID>/<document ID>
*
* @see gov.va.med.imaging.wado.AbstractBaseImageServlet#doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
*/
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException
{
TransactionContext transactionContext = TransactionContextFactory.get();
String pathInfo = req.getPathInfo(); // includes the URL after the servlet and before the query string
if(pathInfo == null || pathInfo.isEmpty())
{
resp.sendError(HttpServletResponse.SC_BAD_REQUEST, "The document identifiers should be included in the path of the URL.");
return;
}
pathInfo = pathInfo.substring(1); // get rid of the leading forward slash
String[] documentIdentifiers = pathInfo.split("/");
if(documentIdentifiers == null || documentIdentifiers.length < 3)
{
resp.sendError(HttpServletResponse.SC_BAD_REQUEST, "The document identifiers were not specified in the URL and must be.");
return;
}
OctetSequenceEscaping rfc2141EscapeEngine = OctetSequenceEscaping.createRFC2141EscapeEngine();
String homeCommunityId = rfc2141EscapeEngine.unescapeIllegalCharacters(documentIdentifiers[0]);
String repositoryId = rfc2141EscapeEngine.unescapeIllegalCharacters(documentIdentifiers[1]);
String documentId = rfc2141EscapeEngine.unescapeIllegalCharacters(documentIdentifiers[2]);
logger.info("Getting document ID '" + homeCommunityId + ":" + repositoryId + ":" + documentId + "'");
DocumentRetrieveResult drr = null;
try
{
drr = retrieveDocument(
GlobalArtifactIdentifierFactory.create(homeCommunityId, repositoryId, documentId)
);
ByteStreamPump pump = ByteStreamPump.getByteStreamPump(TRANSFER_TYPE.NetworkToNetwork);
resp.setContentType( drr.getDocumentStream().getImageFormat().getMime() );
pump.xfer( drr.getDocumentStream(), resp.getOutputStream() );
}
catch (ImageServletException isX)
{
resp.sendError(isX.getResponseCode(), isX.getMessage());
}
catch(Exception ex)
{
logger.error(ex.getMessage(), ex);
resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, ex.getMessage());
}
finally
{
try{drr.getDocumentStream().close();}catch(Throwable t){}
}
}
/* (non-Javadoc)
* @see gov.va.med.imaging.wado.AbstractBaseImageServlet#getUserSiteNumber()
*/
@Override
public String getUserSiteNumber()
{
TransactionContext context = TransactionContextFactory.get();
return context.getLoggerSiteNumber();
}
}
|
[
"ctitton@vitelnet.com"
] |
ctitton@vitelnet.com
|
b8f22b8fca1267709028e842e032eec8c4aa9483
|
c8c949b3710fbb4b983d03697ec9173a0ad3f79f
|
/src/List/ReverseLinkedList.java
|
aa2973b8b91fd6696561d38bdd6d8f9f912d8ac8
|
[] |
no_license
|
mxx626/myleet
|
ae4409dec30d81eaaef26518cdf52a75fd3810bc
|
5da424b2f09342947ba6a9fffb1cca31b7101cf0
|
refs/heads/master
| 2020-03-22T15:11:07.145406
| 2018-07-09T05:12:28
| 2018-07-09T05:12:28
| 140,234,151
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 987
|
java
|
package List;
/**
* 206. Reverse Linked List
Reverse a singly linked list.
Example:
Input: 1->2->3->4->5->NULL
Output: 5->4->3->2->1->NULL
Follow up:
A linked list can be reversed either iteratively or recursively. Could you implement both?
*/
public class ReverseLinkedList {
public ListNode reverseList(ListNode head) {
ListNode prev = null;
ListNode curr = head;
while (curr != null) {
ListNode nextTemp = curr.next;
curr.next = prev;
prev = curr;
curr = nextTemp;
}
return prev;
}
public ListNode reverseList2(ListNode head) {
if (head == null || head.next == null) return head;
ListNode p = reverseList(head.next);
head.next.next = head;
head.next = null;
return p;
}
public class ListNode {
int val;
ListNode next;
ListNode(int x) { val = x; }
}
}
|
[
"mxx626@outlook.com"
] |
mxx626@outlook.com
|
0d142a9ec083a2b7c4fc43f59c124050ee54e415
|
108bb12692b37a72b61445f7ac99135759a84ad4
|
/src/main/java/io/github/jhipster/gatewayapplication/config/DatabaseConfiguration.java
|
8e863344a7dda878225ddce4aa5ec4b7b1d22543
|
[] |
no_license
|
newfacer/jhipsterSampleGatewayApplication
|
8a80cbf8d28bc4dd8bd22a083ceed312792a1342
|
d28f882be1c625ac342336574d269da3d589a807
|
refs/heads/master
| 2021-05-08T05:40:18.331992
| 2017-10-11T05:12:44
| 2017-10-11T05:12:44
| 106,508,555
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,328
|
java
|
package io.github.jhipster.gatewayapplication.config;
import io.github.jhipster.config.JHipsterConstants;
import io.github.jhipster.config.liquibase.AsyncSpringLiquibase;
import liquibase.integration.spring.SpringLiquibase;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.core.task.TaskExecutor;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import javax.sql.DataSource;
@Configuration
@EnableJpaRepositories("io.github.jhipster.gatewayapplication.repository")
@EnableJpaAuditing(auditorAwareRef = "springSecurityAuditorAware")
@EnableTransactionManagement
public class DatabaseConfiguration {
private final Logger log = LoggerFactory.getLogger(DatabaseConfiguration.class);
private final Environment env;
public DatabaseConfiguration(Environment env) {
this.env = env;
}
@Bean
public SpringLiquibase liquibase(@Qualifier("taskExecutor") TaskExecutor taskExecutor,
DataSource dataSource, LiquibaseProperties liquibaseProperties) {
// Use liquibase.integration.spring.SpringLiquibase if you don't want Liquibase to start asynchronously
SpringLiquibase liquibase = new AsyncSpringLiquibase(taskExecutor, env);
liquibase.setDataSource(dataSource);
liquibase.setChangeLog("classpath:config/liquibase/master.xml");
liquibase.setContexts(liquibaseProperties.getContexts());
liquibase.setDefaultSchema(liquibaseProperties.getDefaultSchema());
liquibase.setDropFirst(liquibaseProperties.isDropFirst());
if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_NO_LIQUIBASE)) {
liquibase.setShouldRun(false);
} else {
liquibase.setShouldRun(liquibaseProperties.isEnabled());
log.debug("Configuring Liquibase");
}
return liquibase;
}
}
|
[
"jhipster-bot@users.noreply.github.com"
] |
jhipster-bot@users.noreply.github.com
|
760b6a4614757d75f678dfcaf9ec40e3dc43493c
|
d7bdaadca23880af130724d2a5813d56c9148f1b
|
/TrNetCompilation/test-src/activitymigrationoriginal/TrNetPat61Instance.java
|
6c8f044e2d915c69632f4a47c629ff914bddf7e0
|
[] |
no_license
|
clagms/TrNet
|
14b957e4ba8b8fb81925ca9acf2e64bc805c12e1
|
5b14e0f0fb352b6f1bf6a684cc1d4aaa0104ab47
|
refs/heads/master
| 2021-01-01T03:41:58.483993
| 2016-04-26T14:20:22
| 2016-04-26T14:20:22
| 57,108,988
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 980
|
java
|
package activitymigrationoriginal;
import generic.*;
public class TrNetPat61Instance{
public ModelNode pseudostate0;
public ModelNode forkNode0;
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((pseudostate0==null) ? 0 : pseudostate0.hashCode());
result = prime * result + ((forkNode0==null) ? 0 : forkNode0.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
TrNetPat61Instance other = (TrNetPat61Instance) obj;
if (pseudostate0==null) {
if (other.pseudostate0 != null) {
return false;
}
} else if (! pseudostate0.equals(other.pseudostate0)) {
return false;
}
if (forkNode0==null) {
if (other.forkNode0 != null) {
return false;
}
} else if (! forkNode0.equals(other.forkNode0)) {
return false;
}
return true;
}
}
|
[
"cla.gms@gmail.com"
] |
cla.gms@gmail.com
|
fda0809463601beb550ae410185db68b70588b39
|
e2a4b0c419e10d5b1d26b6044f086053b12d65eb
|
/tags/pre_filenameparsing/src/test/org/apache/commons/vfs/provider/test/JunctionTests.java
|
d61ad00452ce7af0d9a228f2294d1d2b7d613ef1
|
[
"Apache-2.0"
] |
permissive
|
JLLeitschuh/commons-vfs
|
a2a05ec1f234520f4cb50b2ba2e4a83cc1225a10
|
459418c3dc06c36fc2eac8e0630e82d33593aa2f
|
refs/heads/master
| 2021-01-02T21:07:39.360603
| 2015-01-11T23:11:44
| 2015-01-11T23:11:44
| 239,800,971
| 0
| 0
| null | 2020-11-17T18:51:51
| 2020-02-11T15:49:20
| null |
UTF-8
|
Java
| false
| false
| 3,400
|
java
|
/*
* Copyright 2002, 2003,2004 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 applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.vfs.provider.test;
import org.apache.commons.AbstractVfsTestCase;
import org.apache.commons.vfs.FileObject;
import org.apache.commons.vfs.FileSystem;
import org.apache.commons.vfs.FileSystemException;
import org.apache.commons.vfs.test.AbstractProviderTestCase;
import java.io.File;
/**
* Additional junction test cases.
*
* @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
* @version $Revision$ $Date$
*/
public class JunctionTests
extends AbstractProviderTestCase
{
private FileObject getBaseDir() throws FileSystemException
{
final File file = AbstractVfsTestCase.getTestDirectoryFile();
assertTrue(file.exists());
return getManager().toFileObject(file);
}
/**
* Checks nested junctions are not supported.
*/
public void testNestedJunction() throws Exception
{
final FileSystem fs = getManager().createVirtualFileSystem("vfs:").getFileSystem();
final FileObject baseDir = getBaseDir();
fs.addJunction("/a", baseDir);
// Nested
try
{
fs.addJunction("/a/b", baseDir);
fail();
}
catch (final Exception e)
{
assertSameMessage("vfs.impl/nested-junction.error", "vfs:/a/b", e);
}
// At same point
try
{
fs.addJunction("/a", baseDir);
fail();
}
catch (final Exception e)
{
assertSameMessage("vfs.impl/nested-junction.error", "vfs:/a", e);
}
}
/**
* Checks ancestors are created when a junction is created.
*/
public void testAncestors() throws Exception
{
final FileSystem fs = getManager().createVirtualFileSystem("vfs://").getFileSystem();
final FileObject baseDir = getBaseDir();
// Make sure the file at the junction point and its ancestors do not exist
FileObject file = fs.resolveFile("/a/b");
assertFalse(file.exists());
file = file.getParent();
assertFalse(file.exists());
file = file.getParent();
assertFalse(file.exists());
// Add the junction
fs.addJunction("/a/b", baseDir);
// Make sure the file at the junction point and its ancestors exist
file = fs.resolveFile("/a/b");
assertTrue("Does not exist", file.exists());
file = file.getParent();
assertTrue("Does not exist", file.exists());
file = file.getParent();
assertTrue("Does not exist", file.exists());
}
// Check that file @ junction point exists only when backing file exists
// Add 2 junctions with common parent
// Compare real and virtual files
// Events
// Remove junctions
}
|
[
"bayard@13f79535-47bb-0310-9956-ffa450edef68"
] |
bayard@13f79535-47bb-0310-9956-ffa450edef68
|
c839bf98e77b06d0a2ca0b11c70924f0e8e9ec25
|
0cb4dcbf49a81d273492fee2290da24135fb24d5
|
/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/Privilege.java
|
77852100593ceb021434722458736e8ce849c29b
|
[
"Apache-2.0"
] |
permissive
|
garyxiong123/yy-apollo
|
d8779f30107fafc3cad9cfeb50deabfcddcce8dd
|
f04aa0ac409d1ca9704c2bc9151477050c6102ae
|
refs/heads/master
| 2022-11-17T01:15:07.170824
| 2018-12-26T01:13:02
| 2018-12-26T01:13:02
| 160,760,515
| 15
| 1
|
Apache-2.0
| 2022-11-05T07:15:34
| 2018-12-07T02:36:06
|
Java
|
UTF-8
|
Java
| false
| false
| 1,263
|
java
|
package com.ctrip.framework.apollo.portal.entity;
import com.ctrip.framework.apollo.common.entity.BaseEntity;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
@Entity
@Table(name = "Privilege")
@SQLDelete(sql = "Update Privilege set isDeleted = 1 where id = ?")
@Where(clause = "isDeleted = 0")
public class Privilege extends BaseEntity {
@Column(name = "Name", nullable = false)
private String name;
@Column(name = "PrivilType", nullable = false)
private String privilType;
@Column(name = "NamespaceId")
private long namespaceId;
public String getName() {
return name;
}
public long getNamespaceId() {
return namespaceId;
}
public String getPrivilType() {
return privilType;
}
public void setName(String name) {
this.name = name;
}
public void setNamespaceId(long namespaceId) {
this.namespaceId = namespaceId;
}
public void setPrivilType(String privilType) {
this.privilType = privilType;
}
public String toString() {
return toStringHelper().add("namespaceId", namespaceId).add("privilType", privilType)
.add("name", name).toString();
}
}
|
[
"xiongchengwei@yofish.com"
] |
xiongchengwei@yofish.com
|
3c39d48ce9a7c0d5cc85db224c02198a4b858f25
|
dafdbbb0234b1f423970776259c985e6b571401f
|
/j2me/games/PickupLayerJavaLibraryM/src/main/java/allbinary/game/layer/pickup/PickupLayer.java
|
b336279587d5fe28b7a971c456123aede99c3c5d
|
[
"LicenseRef-scancode-warranty-disclaimer"
] |
no_license
|
biddyweb/AllBinary-Platform
|
3581664e8613592b64f20fc3f688dc1515d646ae
|
9b61bc529b0a5e2c647aa1b7ba59b6386f7900ad
|
refs/heads/master
| 2020-12-03T10:38:18.654527
| 2013-11-17T11:17:35
| 2013-11-17T11:17:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,259
|
java
|
/*
* AllBinary Open License Version 1
* Copyright (c) 2011 AllBinary
*
* By agreeing to this license you and any business entity you represent are
* legally bound to the AllBinary Open License Version 1 legal agreement.
*
* You may obtain the AllBinary Open License Version 1 legal agreement from
* AllBinary or the root directory of AllBinary's AllBinary Platform repository.
*
* Created By: Travis Berthelot
*
*/
package allbinary.game.layer.pickup;
import javax.microedition.khronos.opengles.GL;
import javax.microedition.lcdui.Graphics;
import org.allbinary.game.layer.pickup.PickedUpLayerInterface;
import org.allbinary.game.layer.pickup.PickedUpLayerInterfaceFactoryInterface;
import org.allbinary.game.layer.pickup.PickupableInterface;
import org.allbinary.game.multiplayer.layer.MultiPlayerGameLayer;
import org.allbinary.image.opengles.OpenGLSurfaceChangedInterface;
import abcs.logic.basic.string.StringUtil;
import allbinary.animation.Animation;
import allbinary.game.collision.CollidableAlwaysPickupNeverCollideBehaviorFactory;
import allbinary.game.combat.destroy.DestroyedLayerProcessor;
import allbinary.game.identification.BasicGroupFactory;
import allbinary.graphics.PointFactory;
import allbinary.graphics.Rectangle;
import allbinary.view.ViewPosition;
public class PickupLayer
extends MultiPlayerGameLayer
implements PickedUpLayerInterface, PickupableInterface
{
private PickedUpLayerInterfaceFactoryInterface pickedUpLayerInterfaceFactoryInterface;
private boolean destroyed;
private Animation animationInterface;
public PickupLayer(String username, int actorSessionId, ViewPosition viewPosition) throws Exception
{
super(username, actorSessionId, BasicGroupFactory.getInstance().NONE, new Rectangle(PointFactory.getInstance().ZERO_ZERO, 0, 0), viewPosition);
//this.setCollidableInferface(new CollidableAlwaysPickupNeverCollideBehavior(this, true));
this.setCollidableInferface(CollidableAlwaysPickupNeverCollideBehaviorFactory.getInstance());
this.setLayerWidth(10);
this.setLayerHeight(10);
}
public PickupLayer(
String username, int actorSessionId, int total,
PickedUpLayerInterfaceFactoryInterface pickedUpLayerInterfaceFactoryInterface,
Animation animationInterface, Rectangle rectangle, ViewPosition viewPosition)
throws Exception
{
super(username, actorSessionId, BasicGroupFactory.getInstance().NONE, rectangle, viewPosition);
//this.setCollidableInferface(new CollidableAlwaysPickupNeverCollideBehavior(this, true));
this.setCollidableInferface(CollidableAlwaysPickupNeverCollideBehaviorFactory.getInstance());
this.setLayerWidth(10);
this.setLayerHeight(10);
this.init(pickedUpLayerInterfaceFactoryInterface, animationInterface);
}
public PickupLayer(ViewPosition viewPosition) throws Exception
{
this(StringUtil.getInstance().EMPTY_STRING, -1, viewPosition);
}
public PickupLayer(int total,
PickedUpLayerInterfaceFactoryInterface pickedUpLayerInterfaceFactoryInterface,
Animation animationInterface, Rectangle rectangle, ViewPosition viewPosition) throws Exception
{
this(StringUtil.getInstance().EMPTY_STRING, -1,
total, pickedUpLayerInterfaceFactoryInterface,
animationInterface, rectangle, viewPosition);
}
public void init(
PickedUpLayerInterfaceFactoryInterface pickedUpLayerInterfaceFactoryInterface,
Animation animationInterface)
{
this.pickedUpLayerInterfaceFactoryInterface = pickedUpLayerInterfaceFactoryInterface;
this.animationInterface = animationInterface;
this.setDestroyed(false);
}
public void init(int x, int y, int z)
{
this.setPosition(x, y, z);
}
public void paint(Graphics graphics)
{
ViewPosition viewPosition = this.getViewPosition();
int viewX = viewPosition.getX();
int viewY = viewPosition.getY();
this.animationInterface.paint(graphics, viewX, viewY);
}
public void paintThreed(Graphics graphics)
{
ViewPosition viewPosition = this.getViewPosition();
int viewX = viewPosition.getX();
int viewY = viewPosition.getY();
this.animationInterface.paintThreed(graphics, viewX, viewY, 3);
}
public PickedUpLayerInterfaceFactoryInterface getPickedUpLayerInterfaceFactoryInterface()
{
return this.pickedUpLayerInterfaceFactoryInterface;
}
public void setPickedUp()
{
this.setDestroyed(true);
}
public boolean isDestroyed()
{
return destroyed;
}
public void setDestroyed(boolean destroyed)
{
this.destroyed = destroyed;
if (this.isDestroyed())
{
DestroyedLayerProcessor.getInstance().add(this);
}
}
public void damage(int damage, int damageType)
{
}
public int getDamage(int damageType)
{
return 0;
}
public void set(GL gl) throws Exception
{
//OpenGLSurfaceChangedInterface
OpenGLSurfaceChangedInterface openGLSurfaceChangedInterface =
(OpenGLSurfaceChangedInterface) this.animationInterface;
openGLSurfaceChangedInterface.set(gl);
}
}
|
[
"travisberthelot@hotmail.com"
] |
travisberthelot@hotmail.com
|
4a27c78c7620285d70f3722e436accc35b34b53b
|
3e32df055027c751de161a9d978ad4823f46a38c
|
/character-generator/src/main/java/nz/co/fitnet/characterGenerator/core/builders/AbilitiesBuilder.java
|
3152e59e4c1d93cd8214b6a4c3fe54bc3ad971f3
|
[] |
no_license
|
williamanzac/dnd-tools
|
11d28c7130c6cfcc3f8050085f0d7da663c192d3
|
aeb6530920a5c7aba095f1944a49a2d98bc5f9c1
|
refs/heads/master
| 2023-08-16T05:42:49.673734
| 2023-03-30T19:28:10
| 2023-03-30T19:28:10
| 123,676,485
| 0
| 0
| null | 2023-08-15T14:59:43
| 2018-03-03T09:09:13
|
Java
|
UTF-8
|
Java
| false
| false
| 361
|
java
|
package nz.co.fitnet.characterGenerator.core.builders;
import java.util.Map;
import nz.co.fitnet.characterGenerator.api.Ability;
public interface AbilitiesBuilder {
AbilitiesBuilder withAbilityScores(Map<Ability, Integer> abilityScores);
AbilitiesBuilder withAbilityScore(Ability ability, Integer score);
Map<Ability, Integer> build();
}
|
[
"william.anzac@gmail.com"
] |
william.anzac@gmail.com
|
27575f77cd0fbf0c95c05ea4ff43cc09bc641f8c
|
062ab1db4c39e994610e937d66acc45acd74982a
|
/io/fabric/sdk/android/services/events/EventsManager.java
|
5051ae0c3ba328edfd9158be6352eed65a18a844
|
[] |
no_license
|
Ravinther/Navigation
|
838804535c86e664258b83d958f39b1994e8311b
|
7dd6a07aea47aafe616b2f7e58a8012bef9899a1
|
refs/heads/master
| 2021-01-20T18:15:10.681957
| 2016-08-16T01:12:57
| 2016-08-16T01:12:57
| 65,776,099
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 138
|
java
|
package io.fabric.sdk.android.services.events;
public interface EventsManager<T> {
void deleteAllEvents();
void sendEvents();
}
|
[
"m.ravinther@yahoo.com"
] |
m.ravinther@yahoo.com
|
0ef5dc2c55d516f33de0237af045d74d57c50f4b
|
0fbe46c51de164b6bc277e32a5d80920eaed6157
|
/FirstOracle/FirstOracle-Engine/src/main/java/com/firststory/firstoracle/vulkan/exceptions/CannotCreateVulkanLogicDeviceException.java
|
9cf75979f33840431837e582ee45d5311058e490
|
[] |
no_license
|
n1t4chi/FirstStory
|
4a6aef0dc20c9ca2c5cca8683dfcb85c29f550d0
|
9e5cdb94c81566ccfba29ae1f0c6e2589aad5434
|
refs/heads/master
| 2021-08-12T07:58:46.224222
| 2021-06-14T13:52:31
| 2021-06-14T13:52:31
| 95,231,814
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 486
|
java
|
/*
* Copyright (c) 2018 Piotr "n1t4chi" Olejarz
*/
package com.firststory.firstoracle.vulkan.exceptions;
import com.firststory.firstoracle.vulkan.physicaldevice.VulkanPhysicalDevice;
/**
* @author n1t4chi
*/
public class CannotCreateVulkanLogicDeviceException extends CannotCreateVulkanPhysicalDeviceException {
public CannotCreateVulkanLogicDeviceException( VulkanPhysicalDevice physicalDevice, Integer errorCode ) {
super( physicalDevice, errorCode );
}
}
|
[
"n1t4chi@interia.pl"
] |
n1t4chi@interia.pl
|
2d05ec466e9442ecd101859f4118c3eed11a8fc8
|
6060bb2be9d5fef22d81d71d12859767808ea796
|
/src/hw20part2/Client.java
|
66c140f787e83f96ade4fd5ce57de3dd5bef57fa
|
[] |
no_license
|
AndriiVKR/lessons
|
711a822fe6d2445c2b60197bf6f27462f23fa537
|
c808fd4206eb941b242fa5ca6b1953b5ba553825
|
refs/heads/main
| 2023-02-22T00:56:46.014635
| 2021-01-20T09:00:22
| 2021-01-20T09:00:22
| 330,599,358
| 0
| 0
| null | 2021-01-20T09:00:23
| 2021-01-18T08:20:36
|
Java
|
UTF-8
|
Java
| false
| false
| 392
|
java
|
package hw20part2;
public class Client {
public double amount;
private String firsName;
private String lastName;
public Client(String firstName, String lastName) {
this.firsName = firstName;
this.lastName = lastName;
}
public String getFirsName() {
return firsName;
}
public String getLastName() {
return lastName;
}
}
|
[
"you@example.com"
] |
you@example.com
|
e1058c14fac0738573af7945a49f9fee09c4be2f
|
475f2201400c172145f1df837391991d2e805644
|
/src/main/java/com/catpp/design_patterns/structural_type_8/facade_pattern/impl/Square.java
|
302ec888d92231acca00bb7dbfb4a28b029febf1
|
[] |
no_license
|
Maopp/design_patterns
|
f849a19da30c12ca4198c3a7d6b801d352ac5001
|
c41907894ba7d79c4ce033282a890a42c81de456
|
refs/heads/master
| 2020-04-14T15:06:38.305395
| 2019-01-28T09:50:22
| 2019-01-28T09:50:22
| 163,916,164
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 411
|
java
|
package com.catpp.design_patterns.structural_type_8.facade_pattern.impl;
import com.catpp.design_patterns.structural_type_8.facade_pattern.Shape;
/**
* com.catpp.design_patterns.structural_type_8.facade_pattern.impl
*
* @Author cat_pp
* @Date 2019/1/18
* @Description
*/
public class Square implements Shape {
@Override
public void draw() {
System.out.println("Square::draw()");
}
}
|
[
"1121266440@qq.com"
] |
1121266440@qq.com
|
2cbcafa0214809478e88a23efaa686450655086c
|
95dbfa751b6a319edbecb429eaa06f3402f984e9
|
/service-loader-ext/src/test/java/com/quorum/tessera/serviceloader/SampleService.java
|
6fbf797b8dbe813ea219f19a909b81bb7312013e
|
[
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] |
permissive
|
NicolasMassart/tessera
|
d6e19d47d09dc572edbf189f6a80f3638df371ed
|
83f7ddf80a8943486e389bca2846204e2c8ec199
|
refs/heads/master
| 2023-02-24T17:57:11.273075
| 2021-02-02T16:24:04
| 2021-02-02T16:24:04
| 281,362,460
| 0
| 0
|
Apache-2.0
| 2020-07-21T10:06:31
| 2020-07-21T10:06:30
| null |
UTF-8
|
Java
| false
| false
| 199
|
java
|
package com.quorum.tessera.serviceloader;
public interface SampleService {
static SampleService create() {
return ServiceLoaderExt.load(SampleService.class).findFirst().get();
}
}
|
[
"melowe.quorum@gmail.com"
] |
melowe.quorum@gmail.com
|
baaab807620f77cb7bca318aed50f6b2e8fad5ad
|
8246da9a0ea49ef6e70bfb6bc05148fb6134ed89
|
/dianping2/src/main/java/com/qq/taf/jce/dynamic/DynamicOutputStream.java
|
863ef215055e104bc1d3b30fad6fa2e69d520dcd
|
[] |
no_license
|
hezhongqiang/Dianping
|
2708824e30339e1abfb85e028bd27778e26adb56
|
b1a4641be06857fcf65466ce04f3de6b0b6f05ef
|
refs/heads/master
| 2020-05-29T08:48:38.251791
| 2016-01-13T08:09:05
| 2016-01-13T08:09:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,102
|
java
|
package com.qq.taf.jce.dynamic;
import com.qq.taf.jce.JceDecodeException;
import com.qq.taf.jce.JceOutputStream;
import java.nio.ByteBuffer;
public final class DynamicOutputStream extends JceOutputStream
{
public DynamicOutputStream()
{
}
public DynamicOutputStream(int paramInt)
{
super(paramInt);
}
public DynamicOutputStream(ByteBuffer paramByteBuffer)
{
super(paramByteBuffer);
}
public void write(JceField paramJceField)
{
int i = paramJceField.getTag();
if ((paramJceField instanceof ZeroField))
write(0, i);
int j;
while (true)
{
return;
if ((paramJceField instanceof IntField))
{
write(((IntField)paramJceField).get(), i);
return;
}
if ((paramJceField instanceof ShortField))
{
write(((ShortField)paramJceField).get(), i);
return;
}
if ((paramJceField instanceof ByteField))
{
write(((ByteField)paramJceField).get(), i);
return;
}
if ((paramJceField instanceof StringField))
{
write(((StringField)paramJceField).get(), i);
return;
}
if ((paramJceField instanceof ByteArrayField))
{
write(((ByteArrayField)paramJceField).get(), i);
return;
}
if ((paramJceField instanceof ListField))
{
paramJceField = (ListField)paramJceField;
reserve(8);
writeHead(9, i);
write(paramJceField.size(), 0);
paramJceField = paramJceField.get();
j = paramJceField.length;
i = 0;
while (i < j)
{
write(paramJceField[i]);
i += 1;
}
continue;
}
if (!(paramJceField instanceof MapField))
break;
paramJceField = (MapField)paramJceField;
reserve(8);
writeHead(8, i);
j = paramJceField.size();
write(j, 0);
i = 0;
while (i < j)
{
write(paramJceField.getKey(i));
write(paramJceField.getValue(i));
i += 1;
}
}
if ((paramJceField instanceof StructField))
{
paramJceField = (StructField)paramJceField;
reserve(2);
writeHead(10, i);
paramJceField = paramJceField.get();
j = paramJceField.length;
i = 0;
while (i < j)
{
write(paramJceField[i]);
i += 1;
}
reserve(2);
writeHead(11, 0);
return;
}
if ((paramJceField instanceof LongField))
{
write(((LongField)paramJceField).get(), i);
return;
}
if ((paramJceField instanceof FloatField))
{
write(((FloatField)paramJceField).get(), i);
return;
}
if ((paramJceField instanceof DoubleField))
{
write(((DoubleField)paramJceField).get(), i);
return;
}
throw new JceDecodeException("unknow JceField type: " + paramJceField.getClass().getName());
}
}
/* Location: C:\Users\xuetong\Desktop\dazhongdianping7.9.6\ProjectSrc\classes-dex2jar.jar
* Qualified Name: com.qq.taf.jce.dynamic.DynamicOutputStream
* JD-Core Version: 0.6.0
*/
|
[
"xuetong@dkhs.com"
] |
xuetong@dkhs.com
|
2b3f1e7fce22209b8e3cdc0d72715caa07a6b4bd
|
ee8a76aab0d9735a426a320c127244f245ae75d6
|
/SpringPost/springdatajdbc/src/main/java/com/javabom/springdatajdbc/embedded/onetomany/RacingCars.java
|
5365265e77015013ad4d2e3f6a12fd1e5446e6a9
|
[] |
no_license
|
YiMyungHwan/post-for-blog
|
4388896358979aa00a532fcb0bad8cc228d91641
|
b454561a14e65e73961c2a5bd09eb58739d2e589
|
refs/heads/master
| 2023-05-19T18:50:47.099325
| 2021-06-06T18:02:56
| 2021-06-06T18:02:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 367
|
java
|
package com.javabom.springdatajdbc.embedded.onetomany;
import java.util.HashSet;
import java.util.Set;
public class RacingCars {
private Set<RacingCar> racingCars;
public RacingCars(final Set<RacingCar> racingCars) {
this.racingCars = racingCars;
}
public Set<RacingCar> getRacingCars() {
return new HashSet<>(racingCars);
}
}
|
[
"pci2676@gmail.com"
] |
pci2676@gmail.com
|
7b47bd3d7a3049b01dec91f55f99f83a1f3f6d99
|
7826588e64bb04dfb79c8262bad01235eb409b3d
|
/proxies/com/microsoft/bingads/v13/campaignmanagement/RuleItemGroup.java
|
c2078ff684b9e7b50b26a55f9a42abf2e9de58d4
|
[
"MIT"
] |
permissive
|
BingAds/BingAds-Java-SDK
|
dcd43e5a1beeab0b59c1679da1151d7dd1658d50
|
a3d904bbf93a0a93d9c117bfff40f6911ad71d2f
|
refs/heads/main
| 2023-08-28T13:48:34.535773
| 2023-08-18T06:41:51
| 2023-08-18T06:41:51
| 29,510,248
| 33
| 44
|
NOASSERTION
| 2023-08-23T01:29:18
| 2015-01-20T03:40:03
|
Java
|
UTF-8
|
Java
| false
| false
| 1,507
|
java
|
package com.microsoft.bingads.v13.campaignmanagement;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlType;
/**
* <p>Java class for RuleItemGroup complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>{@code
* <complexType name="RuleItemGroup">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Items" type="{https://bingads.microsoft.com/CampaignManagement/v13}ArrayOfRuleItem" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* }</pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "RuleItemGroup", propOrder = {
"items"
})
public class RuleItemGroup {
@XmlElement(name = "Items", nillable = true)
protected ArrayOfRuleItem items;
/**
* Gets the value of the items property.
*
* @return
* possible object is
* {@link ArrayOfRuleItem }
*
*/
public ArrayOfRuleItem getItems() {
return items;
}
/**
* Sets the value of the items property.
*
* @param value
* allowed object is
* {@link ArrayOfRuleItem }
*
*/
public void setItems(ArrayOfRuleItem value) {
this.items = value;
}
}
|
[
"qitia@microsoft.com"
] |
qitia@microsoft.com
|
911a314e0d2b5cd5dbb6a1f24cc38ae94a6d0239
|
8711300cc171308377eaae88ef9ebd18a8bc4949
|
/java/src/creational/factory/abstractfactory/F16Engine.java
|
43a9451eea0fb71925cb47db0d8bb7c9e60aac98
|
[] |
no_license
|
thecomputerguy/designpatterns
|
34207722090f3cd36f8ace6846f1b1dedc24dd21
|
bf17fddc34aa17bf7c628efa5ec4d2296fe863f5
|
refs/heads/master
| 2022-12-08T10:08:09.349999
| 2020-08-15T05:41:16
| 2020-08-15T05:41:16
| 286,061,523
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 133
|
java
|
public class F16Engine implements IEngine {
@Override
public void run() {
System.out.println("F16Engine");
}
}
|
[
"varunsharma12@outlook.com"
] |
varunsharma12@outlook.com
|
9d341761b89b28df7807995f4560bdbb98e24327
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/14/14_e46d6e9c275bf52d5227596251bb79c37a874ee1/TCSettingBool/14_e46d6e9c275bf52d5227596251bb79c37a874ee1_TCSettingBool_s.java
|
42ecc1ab5d77c22dda7db0583dbbc069331c7a13
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 2,623
|
java
|
package acs.tabbychat.settings;
import org.lwjgl.opengl.GL11;
import net.minecraft.client.Minecraft;
import net.minecraft.src.FontRenderer;
public class TCSettingBool extends TCSetting implements ITCSetting {
{
this.type = "bool";
}
public TCSettingBool(Object theSetting, String theProperty, String theCategory, int theID) {
super(theSetting, theProperty, theCategory, theID);
this.width = 9;
this.height = 9;
}
public TCSettingBool(Object theSetting, String theProperty, String theCategory, int theID, FormatCodeEnum theFormat) {
super(theSetting, theProperty, theCategory, theID, theFormat);
}
public void actionPerformed() {
this.toggle();
}
public void drawButton(Minecraft par1, int cursorX, int cursorY) {
int centerX = this.xPosition + this.width / 2;
int centerY = this.yPosition + this.height / 2;
int tmpWidth = 9;
int tmpHeight = 9;
int tmpX = centerX - 4;
int tmpY = centerY - 4;
int fgcolor = 0x99a0a0a0;
if(!this.enabled) {
fgcolor = -0x995f5f60;
} else if(this.hovered(cursorX, cursorY)) {
fgcolor = 0x99ffffa0;
}
int labelColor = (this.enabled) ? 0xffffff : 0x666666;
drawRect(tmpX+1, tmpY, tmpX+tmpWidth-1, tmpY+1, fgcolor);
drawRect(tmpX+1, tmpY+tmpHeight-1, tmpX+tmpWidth-1, tmpY+tmpHeight, fgcolor);
drawRect(tmpX, tmpY+1, tmpX+1, tmpY+tmpHeight-1, fgcolor);
drawRect(tmpX+tmpWidth-1, tmpY+1, tmpX+tmpWidth, tmpY+tmpHeight-1, fgcolor);
drawRect(tmpX+1, tmpY+1, tmpX+tmpWidth-1, tmpY+tmpHeight-1, 0xff000000);
if ((Boolean)this.tempValue) {
drawRect(centerX-2, centerY, centerX-1, centerY+1, this.buttonColor);
drawRect(centerX-1, centerY+1, centerX, centerY+2, this.buttonColor);
drawRect(centerX, centerY+2, centerX+1, centerY+3, this.buttonColor);
drawRect(centerX+1, centerY+2, centerX+2, centerY, this.buttonColor);
drawRect(centerX+2, centerY, centerX+3, centerY-2, this.buttonColor);
drawRect(centerX+3, centerY-2, centerX+4, centerY-4, this.buttonColor);
}
this.drawCenteredString(mc.fontRenderer, this.description, this.labelX + mc.fontRenderer.getStringWidth(this.description)/2, this.yPosition + (this.height - 6) / 2, labelColor);
}
public Boolean getTempValue() {
return (Boolean)this.tempValue;
}
public Boolean getValue() {
return (Boolean)this.value;
}
public void setCleanValue(Object _input) {
if(_input == null) this.clear();
else {
this.value = (Boolean)Boolean.parseBoolean(_input.toString());
}
}
public void toggle() {
this.tempValue = !(Boolean)this.tempValue;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
e2dbe4af3d2c89541ed5f7ea287b6dbf9e14f4ca
|
1dc8b58c0e85fb5a8574b17748774d11d7621b83
|
/java/aba.java
|
e3f9c7593854859a30f93fd286f65f5b29190fe5
|
[] |
no_license
|
AndroidAppz/OGYouTube
|
74800e1dc0bcf7fddab9e4eeac1f358404b0ad2d
|
09b18440e90832ded189161e99dd384d6550fcd0
|
refs/heads/master
| 2021-06-26T13:00:20.421413
| 2017-06-27T11:31:32
| 2017-06-27T11:31:32
| 74,985,874
| 7
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 722
|
java
|
/*
* Decompiled with CFR 0_110.
*
* Could not load the following classes:
* android.support.v7.app.OverlayListView
* android.view.View
* android.view.View$OnClickListener
* java.lang.Object
*/
import android.support.v7.app.OverlayListView;
import android.view.View;
final class aba
implements View.OnClickListener {
private /* synthetic */ aas a;
aba(aas aas2) {
this.a = aas2;
}
/*
* Enabled aggressive block sorting
*/
public final void onClick(View view) {
aas aas2 = this.a;
boolean bl2 = !this.a.I;
aas2.I = bl2;
if (this.a.I) {
this.a.n.setVisibility(0);
}
this.a.e();
this.a.d(true);
}
}
|
[
"admin@timo.de.vc"
] |
admin@timo.de.vc
|
d75967890d86ed9d0022a64844420607917ae605
|
7543eb6be4db4124084b6eac0b26131bcdfea563
|
/sources/com/twitter/sdk/android/core/TwitterCore.java
|
e8b52cd18b50455df79703c15ed837bcfa2ca7bc
|
[] |
no_license
|
n0misain/6-1_source_from_JADX
|
bea3bc861ba84c62c27231e7bcff6df49e2f21c9
|
e0e00915f0b376e7c1d0c162bf7d6697153ce7b1
|
refs/heads/master
| 2022-07-19T05:28:02.911308
| 2020-05-17T00:12:26
| 2020-05-17T00:12:26
| 264,563,027
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,523
|
java
|
package com.twitter.sdk.android.core;
import android.app.Activity;
import com.twitter.sdk.android.core.GuestSession.Serializer;
import com.twitter.sdk.android.core.identity.TwitterAuthClient;
import com.twitter.sdk.android.core.internal.MigrationHelper;
import com.twitter.sdk.android.core.internal.SessionMonitor;
import com.twitter.sdk.android.core.internal.TwitterApi;
import com.twitter.sdk.android.core.internal.TwitterSessionVerifier;
import com.twitter.sdk.android.core.internal.oauth.OAuth2Service;
import com.twitter.sdk.android.core.internal.scribe.TwitterCoreScribeClientHolder;
import io.fabric.sdk.android.Fabric;
import io.fabric.sdk.android.Kit;
import io.fabric.sdk.android.services.network.NetworkUtils;
import io.fabric.sdk.android.services.persistence.PreferenceStoreImpl;
import java.util.concurrent.ConcurrentHashMap;
import javax.net.ssl.SSLSocketFactory;
public class TwitterCore extends Kit<Boolean> {
static final String PREF_KEY_ACTIVE_GUEST_SESSION = "active_guestsession";
static final String PREF_KEY_ACTIVE_TWITTER_SESSION = "active_twittersession";
static final String PREF_KEY_GUEST_SESSION = "guestsession";
static final String PREF_KEY_TWITTER_SESSION = "twittersession";
static final String SESSION_PREF_FILE_NAME = "session_store";
public static final String TAG = "Twitter";
private final ConcurrentHashMap<Session, TwitterApiClient> apiClients;
private final TwitterAuthConfig authConfig;
private volatile TwitterApiClient guestClient;
SessionManager<GuestSession> guestSessionManager;
private volatile GuestSessionProvider guestSessionProvider;
SessionMonitor<TwitterSession> sessionMonitor;
private volatile SSLSocketFactory sslSocketFactory;
SessionManager<TwitterSession> twitterSessionManager;
public TwitterCore(TwitterAuthConfig authConfig) {
this(authConfig, new ConcurrentHashMap(), null);
}
TwitterCore(TwitterAuthConfig authConfig, ConcurrentHashMap<Session, TwitterApiClient> apiClients, TwitterApiClient guestClient) {
this.authConfig = authConfig;
this.apiClients = apiClients;
this.guestClient = guestClient;
}
public static TwitterCore getInstance() {
checkInitialized();
return (TwitterCore) Fabric.getKit(TwitterCore.class);
}
public String getVersion() {
return "2.3.0.163";
}
public TwitterAuthConfig getAuthConfig() {
return this.authConfig;
}
public SSLSocketFactory getSSLSocketFactory() {
checkInitialized();
if (this.sslSocketFactory == null) {
createSSLSocketFactory();
}
return this.sslSocketFactory;
}
private synchronized void createSSLSocketFactory() {
if (this.sslSocketFactory == null) {
try {
this.sslSocketFactory = NetworkUtils.getSSLSocketFactory(new TwitterPinningInfoProvider(getContext()));
Fabric.getLogger().mo4333d(TAG, "Custom SSL pinning enabled");
} catch (Exception e) {
Fabric.getLogger().mo4336e(TAG, "Exception setting up custom SSL pinning", e);
}
}
}
protected boolean onPreExecute() {
new MigrationHelper().migrateSessionStore(getContext(), getIdentifier(), getIdentifier() + ":" + SESSION_PREF_FILE_NAME + ".xml");
this.twitterSessionManager = new PersistedSessionManager(new PreferenceStoreImpl(getContext(), SESSION_PREF_FILE_NAME), new Serializer(), PREF_KEY_ACTIVE_TWITTER_SESSION, PREF_KEY_TWITTER_SESSION);
this.guestSessionManager = new PersistedSessionManager(new PreferenceStoreImpl(getContext(), SESSION_PREF_FILE_NAME), new Serializer(), PREF_KEY_ACTIVE_GUEST_SESSION, PREF_KEY_GUEST_SESSION);
this.sessionMonitor = new SessionMonitor(this.twitterSessionManager, getFabric().getExecutorService(), new TwitterSessionVerifier());
return true;
}
protected Boolean doInBackground() {
this.twitterSessionManager.getActiveSession();
this.guestSessionManager.getActiveSession();
getSSLSocketFactory();
getGuestSessionProvider();
initializeScribeClient();
this.sessionMonitor.monitorActivityLifecycle(getFabric().getActivityLifecycleManager());
return Boolean.valueOf(true);
}
public String getIdentifier() {
return "com.twitter.sdk.android:twitter-core";
}
private static void checkInitialized() {
if (Fabric.getKit(TwitterCore.class) == null) {
throw new IllegalStateException("Must start Twitter Kit with Fabric.with() first");
}
}
private void initializeScribeClient() {
TwitterCoreScribeClientHolder.initialize(this, getSessionManager(), getGuestSessionProvider(), getIdManager());
}
public void logIn(Activity activity, Callback<TwitterSession> callback) {
checkInitialized();
new TwitterAuthClient().authorize(activity, callback);
}
public void logOut() {
checkInitialized();
SessionManager<TwitterSession> sessionManager = getSessionManager();
if (sessionManager != null) {
sessionManager.clearActiveSession();
}
}
public SessionManager<TwitterSession> getSessionManager() {
checkInitialized();
return this.twitterSessionManager;
}
public GuestSessionProvider getGuestSessionProvider() {
checkInitialized();
if (this.guestSessionProvider == null) {
createGuestSessionProvider();
}
return this.guestSessionProvider;
}
private synchronized void createGuestSessionProvider() {
if (this.guestSessionProvider == null) {
this.guestSessionProvider = new GuestSessionProvider(new OAuth2Service(this, getSSLSocketFactory(), new TwitterApi()), this.guestSessionManager);
}
}
public TwitterApiClient getApiClient() {
checkInitialized();
TwitterSession session = (TwitterSession) this.twitterSessionManager.getActiveSession();
if (session == null) {
return getGuestApiClient();
}
return getApiClient(session);
}
public TwitterApiClient getApiClient(TwitterSession session) {
checkInitialized();
if (!this.apiClients.containsKey(session)) {
this.apiClients.putIfAbsent(session, new TwitterApiClient(session));
}
return (TwitterApiClient) this.apiClients.get(session);
}
public void addGuestApiClient(TwitterApiClient customTwitterApiClient) {
checkInitialized();
if (this.guestClient == null) {
createGuestClient(customTwitterApiClient);
}
}
public void addApiClient(TwitterSession session, TwitterApiClient customTwitterApiClient) {
checkInitialized();
if (!this.apiClients.containsKey(session)) {
this.apiClients.putIfAbsent(session, customTwitterApiClient);
}
}
public TwitterApiClient getGuestApiClient() {
checkInitialized();
if (this.guestClient == null) {
createGuestClient();
}
return this.guestClient;
}
private synchronized void createGuestClient() {
if (this.guestClient == null) {
this.guestClient = new TwitterApiClient();
}
}
private synchronized void createGuestClient(TwitterApiClient twitterApiClient) {
if (this.guestClient == null) {
this.guestClient = twitterApiClient;
}
}
}
|
[
"jaycrandell3@gmail.com"
] |
jaycrandell3@gmail.com
|
f7a57b0d8f65b15837b8ac9bfdf3c48fca0affb9
|
dfd7e70936b123ee98e8a2d34ef41e4260ec3ade
|
/analysis/reverse-engineering/decompile-fitts-20191031-2200/sources/io/reactivex/internal/operators/maybe/MaybeSwitchIfEmpty.java
|
26002f9f08dd1b6dc64258f213f1671f5685b3b1
|
[
"Apache-2.0"
] |
permissive
|
skkuse-adv/2019Fall_team2
|
2d4f75bc793368faac4ca8a2916b081ad49b7283
|
3ea84c6be39855f54634a7f9b1093e80893886eb
|
refs/heads/master
| 2020-08-07T03:41:11.447376
| 2019-12-21T04:06:34
| 2019-12-21T04:06:34
| 213,271,174
| 5
| 5
|
Apache-2.0
| 2019-12-12T09:15:32
| 2019-10-07T01:18:59
|
Java
|
UTF-8
|
Java
| false
| false
| 3,158
|
java
|
package io.reactivex.internal.operators.maybe;
import io.reactivex.MaybeObserver;
import io.reactivex.MaybeSource;
import io.reactivex.disposables.Disposable;
import io.reactivex.internal.disposables.DisposableHelper;
import java.util.concurrent.atomic.AtomicReference;
public final class MaybeSwitchIfEmpty<T> extends AbstractMaybeWithUpstream<T, T> {
final MaybeSource<? extends T> other;
static final class SwitchIfEmptyMaybeObserver<T> extends AtomicReference<Disposable> implements MaybeObserver<T>, Disposable {
private static final long serialVersionUID = -2223459372976438024L;
final MaybeObserver<? super T> downstream;
final MaybeSource<? extends T> other;
static final class OtherMaybeObserver<T> implements MaybeObserver<T> {
final MaybeObserver<? super T> downstream;
final AtomicReference<Disposable> parent;
OtherMaybeObserver(MaybeObserver<? super T> maybeObserver, AtomicReference<Disposable> atomicReference) {
this.downstream = maybeObserver;
this.parent = atomicReference;
}
public void onSubscribe(Disposable disposable) {
DisposableHelper.setOnce(this.parent, disposable);
}
public void onSuccess(T t) {
this.downstream.onSuccess(t);
}
public void onError(Throwable th) {
this.downstream.onError(th);
}
public void onComplete() {
this.downstream.onComplete();
}
}
SwitchIfEmptyMaybeObserver(MaybeObserver<? super T> maybeObserver, MaybeSource<? extends T> maybeSource) {
this.downstream = maybeObserver;
this.other = maybeSource;
}
public void dispose() {
DisposableHelper.dispose(this);
}
public boolean isDisposed() {
return DisposableHelper.isDisposed((Disposable) get());
}
public void onSubscribe(Disposable disposable) {
if (DisposableHelper.setOnce(this, disposable)) {
this.downstream.onSubscribe(this);
}
}
public void onSuccess(T t) {
this.downstream.onSuccess(t);
}
public void onError(Throwable th) {
this.downstream.onError(th);
}
public void onComplete() {
Disposable disposable = (Disposable) get();
if (disposable != DisposableHelper.DISPOSED && compareAndSet(disposable, null)) {
this.other.subscribe(new OtherMaybeObserver(this.downstream, this));
}
}
}
public MaybeSwitchIfEmpty(MaybeSource<T> maybeSource, MaybeSource<? extends T> maybeSource2) {
super(maybeSource);
this.other = maybeSource2;
}
/* access modifiers changed from: protected */
public void subscribeActual(MaybeObserver<? super T> maybeObserver) {
this.source.subscribe(new SwitchIfEmptyMaybeObserver(maybeObserver, this.other));
}
}
|
[
"33246398+ajid951125@users.noreply.github.com"
] |
33246398+ajid951125@users.noreply.github.com
|
60adb5fbb9aaa0b83ba06acb51fcce9ffbc6c6fe
|
5fe9088b1ca23dd8c646fef01b78d5fb3825fbb4
|
/core/src/test/java/com/google/errorprone/bugpatterns/ProtoFieldPreconditionsCheckNotNullTest.java
|
d6a4e824526be22c4cea31e402adf4497095cad0
|
[
"Apache-2.0"
] |
permissive
|
TamerPlatform/error-prone
|
51ca6141a2eef2bddba3f14aad2a67ff28a69134
|
c3c8cb986fec4ef21d79f1a38b4fff9e9ae3f5eb
|
refs/heads/master
| 2023-03-06T20:25:22.829137
| 2015-02-24T16:45:59
| 2015-02-25T17:57:56
| 31,601,536
| 0
| 0
|
Apache-2.0
| 2023-02-28T19:51:28
| 2015-03-03T14:10:14
|
Java
|
UTF-8
|
Java
| false
| false
| 2,084
|
java
|
/*
* Copyright 2013 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 or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.errorprone.bugpatterns;
import com.google.common.collect.ImmutableList;
import com.google.errorprone.CompilationTestHelper;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import java.net.URISyntaxException;
import java.util.List;
import javax.tools.JavaFileObject;
/**
* @author awturner@google.com (Andy Turner)
*/
@RunWith(JUnit4.class)
public class ProtoFieldPreconditionsCheckNotNullTest {
private CompilationTestHelper compilationHelper;
private JavaFileObject protoFile;
@Before
public void setUp() throws Exception {
compilationHelper =
CompilationTestHelper.newInstance(new ProtoFieldPreconditionsCheckNotNull());
protoFile = compilationHelper.fileManager().source(getClass(), "proto/ProtoTest.java");
}
private List<JavaFileObject> getSourceFiles(String mainFileName) throws URISyntaxException {
JavaFileObject mainFile = compilationHelper.fileManager().source(getClass(), mainFileName);
return ImmutableList.of(mainFile, protoFile);
}
@Test
public void testPositiveCase() throws Exception {
compilationHelper.assertCompileSucceedsWithMessages(
getSourceFiles("ProtoFieldPreconditionsCheckNotNullPositiveCases.java"));
}
@Test
public void testNegativeCase() throws Exception {
compilationHelper.assertCompileSucceeds(
getSourceFiles("ProtoFieldPreconditionsCheckNotNullNegativeCases.java"));
}
}
|
[
"cushon@google.com"
] |
cushon@google.com
|
ac88b3d91357195d0cecd67486ccac92eae10b42
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_475a7c54be5897f4121804486051238ccda6b558/EditorActivity/2_475a7c54be5897f4121804486051238ccda6b558_EditorActivity_s.java
|
bf6f41b8d0bacdb2835d2d35299499d58fd1b7e6
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 5,907
|
java
|
package com.droidplanner.activitys;
import java.util.List;
import android.app.ActionBar;
import android.app.FragmentManager;
import android.graphics.Point;
import android.os.Bundle;
import android.support.v4.app.NavUtils;
import android.view.MenuItem;
import com.droidplanner.R;
import com.droidplanner.activitys.helpers.SuperUI;
import com.droidplanner.drone.DroneInterfaces.OnWaypointChangedListner;
import com.droidplanner.drone.variables.mission.Mission;
import com.droidplanner.drone.variables.mission.MissionItem;
import com.droidplanner.drone.variables.mission.waypoints.SpatialCoordItem;
import com.droidplanner.fragments.EditorToolsFragment;
import com.droidplanner.fragments.EditorToolsFragment.EditorTools;
import com.droidplanner.fragments.EditorToolsFragment.OnEditorToolSelected;
import com.droidplanner.fragments.PlanningMapFragment;
import com.droidplanner.fragments.helpers.GestureMapFragment;
import com.droidplanner.fragments.helpers.GestureMapFragment.OnPathFinishedListner;
import com.droidplanner.fragments.helpers.MapProjection;
import com.droidplanner.fragments.helpers.OnMapInteractionListener;
import com.droidplanner.fragments.mission.MissionDetailFragment;
import com.droidplanner.fragments.mission.MissionDetailFragment.OnWayPointTypeChangeListener;
import com.droidplanner.polygon.PolygonPoint;
import com.google.android.gms.maps.model.LatLng;
public class EditorActivity extends SuperUI implements
OnMapInteractionListener, OnPathFinishedListner, OnEditorToolSelected,
OnWayPointTypeChangeListener, OnWaypointChangedListner {
private PlanningMapFragment planningMapFragment;
private GestureMapFragment gestureMapFragment;
private Mission mission;
private EditorToolsFragment editorToolsFragment;
private MissionDetailFragment itemDetailFragment;
private FragmentManager fragmentManager;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_editor);
ActionBar actionBar = getActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
fragmentManager = getFragmentManager();
planningMapFragment = ((PlanningMapFragment) fragmentManager
.findFragmentById(R.id.mapFragment));
gestureMapFragment = ((GestureMapFragment) fragmentManager
.findFragmentById(R.id.gestureMapFragment));
editorToolsFragment = (EditorToolsFragment) fragmentManager
.findFragmentById(R.id.editorToolsFragment);
mission = drone.mission;
gestureMapFragment.setOnPathFinishedListner(this);
mission.onMissionUpdate();
mission.addOnMissionUpdateListner(this);
}
@Override
protected void onDestroy() {
super.onDestroy();
mission.removeOnMissionUpdateListner(this);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
NavUtils.navigateUpFromSameTask(this);
return true;
}
return super.onOptionsItemSelected(item);
}
@Override
public boolean onMarkerClick(MissionItem wp) {
showItemDetail(wp);
return true;
}
@Override
public void onAddPoint(LatLng point) {
// TODO Auto-generated method stub
}
@Override
public void onMoveHome(LatLng coord) {
// TODO Auto-generated method stub
}
@Override
public void onMoveWaypoint(SpatialCoordItem waypoint, LatLng latLng) {
// TODO Auto-generated method stub
}
@Override
public void onMovingWaypoint(SpatialCoordItem source, LatLng latLng) {
// TODO Auto-generated method stub
}
@Override
public void onMovePolygonPoint(PolygonPoint source, LatLng newCoord) {
// TODO Auto-generated method stub
}
@Override
public void onMapClick(LatLng point) {
switch (editorToolsFragment.getTool()) {
case MARKER:
mission.addWaypoint(point, mission.getDefaultAlt());
break;
case DRAW:
break;
case POLY:
break;
case TRASH:
break;
}
}
@Override
public void editorToolChanged(EditorTools tools) {
removeItemDetail();
switch (tools) {
case DRAW:
case POLY:
gestureMapFragment.enableGestureDetection();
break;
case MARKER:
case TRASH:
gestureMapFragment.disableGestureDetection();
break;
}
}
private void showItemDetail(MissionItem item) {
if (itemDetailFragment == null) {
addItemDetail(item);
} else {
switchItemDetail(item);
}
}
private void addItemDetail(MissionItem item) {
itemDetailFragment = item.getDetailFragment();
fragmentManager.beginTransaction()
.add(R.id.containerItemDetail, itemDetailFragment).commit();
}
private void switchItemDetail(MissionItem item) {
itemDetailFragment = item.getDetailFragment();
fragmentManager.beginTransaction()
.replace(R.id.containerItemDetail, itemDetailFragment).commit();
}
private void removeItemDetail() {
if (itemDetailFragment != null) {
fragmentManager.beginTransaction().remove(itemDetailFragment)
.commit();
itemDetailFragment = null;
}
}
@Override
public void onPathFinished(List<Point> path) {
List<LatLng> points = MapProjection.projectPathIntoMap(path,
planningMapFragment.mMap);
switch (editorToolsFragment.getTool()) {
case DRAW:
drone.mission.addWaypointsWithDefaultAltitude(points);
break;
case POLY:
drone.mission.addSurveyPolygon(points);
break;
default:
break;
}
editorToolsFragment.setTool(EditorTools.MARKER);
}
@Override
public void onWaypointTypeChanged(MissionItem newItem, MissionItem oldItem) {
mission.replace(oldItem, newItem);
showItemDetail(newItem);
}
@Override
public void onMissionUpdate() {
//Remove detail window if item is removed
if (itemDetailFragment!=null) {
if (!mission.hasItem(itemDetailFragment.getItem())) {
removeItemDetail();
}
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
32a94aaaf02b8c39598560267c9c0f7a8f09bf57
|
129f58086770fc74c171e9c1edfd63b4257210f3
|
/src/testcases/CWE81_XSS_Error_Message/CWE81_XSS_Error_Message__Servlet_File_74a.java
|
3458d3fa3d5d6f221a9a0f4d8b2a0b0374bac49d
|
[] |
no_license
|
glopezGitHub/Android23
|
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
|
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
|
refs/heads/master
| 2023-03-07T15:14:59.447795
| 2023-02-06T13:59:49
| 2023-02-06T13:59:49
| 6,856,387
| 0
| 3
| null | 2023-02-06T18:38:17
| 2012-11-25T22:04:23
|
Java
|
UTF-8
|
Java
| false
| false
| 4,543
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE81_XSS_Error_Message__Servlet_File_74a.java
Label Definition File: CWE81_XSS_Error_Message__Servlet.label.xml
Template File: sources-sink-74a.tmpl.java
*/
/*
* @description
* CWE: 81 Cross Site Scripting (XSS) in Error Message
* BadSource: File Read data from file (named c:\data.txt)
* GoodSource: A hardcoded string
* Sinks: sendErrorServlet
* BadSink : XSS in sendError
* Flow Variant: 74 Data flow: data passed in a HashMap from one method to another in different source files in the same package
*
* */
package testcases.CWE81_XSS_Error_Message;
import testcasesupport.*;
import java.util.HashMap;
import javax.servlet.http.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.FileInputStream;
import java.io.File;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
public class CWE81_XSS_Error_Message__Servlet_File_74a extends AbstractTestCaseServlet
{
public void bad(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data;
data = ""; /* Initialize data */
{
File f = new File("C:\\data.txt");
FileInputStream fis = null;
InputStreamReader isread = null;
BufferedReader buffread = null;
try {
/* read string from file into data */
fis = new FileInputStream(f);
isread = new InputStreamReader(fis, "UTF-8");
buffread = new BufferedReader(isread);
/* POTENTIAL FLAW: Read data from a file */
data = buffread.readLine(); // This will be reading the first "line" of the file, which
// could be very long if there are little or no newlines in the file
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error with stream reading", ioe);
}
finally {
/* Close stream reading objects */
try {
if( buffread != null )
{
buffread.close();
}
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error closing BufferedReader", ioe);
}
try {
if( isread != null )
{
isread.close();
}
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error closing InputStreamReader", ioe);
}
try {
if( fis != null )
{
fis.close();
}
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error closing FileInputStream", ioe);
}
}
}
HashMap<Integer,String> data_hashmap = new HashMap<Integer,String>();
data_hashmap.put(0, data);
data_hashmap.put(1, data);
data_hashmap.put(2, data);
(new CWE81_XSS_Error_Message__Servlet_File_74b()).bad_sink(data_hashmap , request, response );
}
public void good(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
goodG2B(request, response);
}
/* goodG2B() - use goodsource and badsink */
private void goodG2B(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data;
/* FIX: Use a hardcoded string */
data = "foo";
HashMap<Integer,String> data_hashmap = new HashMap<Integer,String>();
data_hashmap.put(0, data);
data_hashmap.put(1, data);
data_hashmap.put(2, data);
(new CWE81_XSS_Error_Message__Servlet_File_74b()).goodG2B_sink(data_hashmap , request, response );
}
/* Below is the main(). It is only used when building this testcase on
its own for testing or for building a binary to use in testing binary
analysis tools. It is not used when compiling all the testcases as one
application, which is how source code analysis tools are tested. */
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"guillermo.pando@gmail.com"
] |
guillermo.pando@gmail.com
|
db5d9d4e1cb2f5d3375589d0324140bfb72d74c7
|
8ed9f95fd028b7d89e7276847573878e32f12674
|
/docx4j-openxml-objects/src/main/java/org/docx4j/wml/STTblStyleOverrideType.java
|
500c394d5ed156cab683df13e9e2c1c8b6f50f2b
|
[
"Apache-2.0"
] |
permissive
|
plutext/docx4j
|
a75b7502841a06f314cb31bbaa219b416f35d8a8
|
1f496eca1f70e07d8c112168857bee4c8e6b0514
|
refs/heads/VERSION_11_4_8
| 2023-06-23T10:02:08.676214
| 2023-03-11T23:02:44
| 2023-03-11T23:02:44
| 4,302,287
| 1,826
| 1,024
| null | 2023-03-11T23:02:45
| 2012-05-11T22:13:30
|
Java
|
UTF-8
|
Java
| false
| false
| 4,167
|
java
|
/*
* Copyright 2007-2013, Plutext Pty Ltd.
*
* This file is part of docx4j.
docx4j is licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package org.docx4j.wml;
import jakarta.xml.bind.annotation.XmlEnum;
import jakarta.xml.bind.annotation.XmlEnumValue;
import jakarta.xml.bind.annotation.XmlType;
/**
* <p>Java class for ST_TblStyleOverrideType.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="ST_TblStyleOverrideType">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="wholeTable"/>
* <enumeration value="firstRow"/>
* <enumeration value="lastRow"/>
* <enumeration value="firstCol"/>
* <enumeration value="lastCol"/>
* <enumeration value="band1Vert"/>
* <enumeration value="band2Vert"/>
* <enumeration value="band1Horz"/>
* <enumeration value="band2Horz"/>
* <enumeration value="neCell"/>
* <enumeration value="nwCell"/>
* <enumeration value="seCell"/>
* <enumeration value="swCell"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "ST_TblStyleOverrideType")
@XmlEnum
public enum STTblStyleOverrideType {
/**
* Whole table formatting
*
*/
@XmlEnumValue("wholeTable")
WHOLE_TABLE("wholeTable"),
/**
* First Row Conditional
* Formatting
*
*/
@XmlEnumValue("firstRow")
FIRST_ROW("firstRow"),
/**
* Last table row
* formatting
*
*/
@XmlEnumValue("lastRow")
LAST_ROW("lastRow"),
/**
* First Column Conditional
* Formatting
*
*/
@XmlEnumValue("firstCol")
FIRST_COL("firstCol"),
/**
* Last table column
* formatting
*
*/
@XmlEnumValue("lastCol")
LAST_COL("lastCol"),
/**
* Banded Column Conditional
* Formatting
*
*/
@XmlEnumValue("band1Vert")
BAND_1_VERT("band1Vert"),
/**
* Even Column Stripe Conditional
* Formatting
*
*/
@XmlEnumValue("band2Vert")
BAND_2_VERT("band2Vert"),
/**
* Banded Row Conditional
* Formatting
*
*/
@XmlEnumValue("band1Horz")
BAND_1_HORZ("band1Horz"),
/**
* Even Row Stripe Conditional
* Formatting
*
*/
@XmlEnumValue("band2Horz")
BAND_2_HORZ("band2Horz"),
/**
* Top right table cell
* formatting
*
*/
@XmlEnumValue("neCell")
NE_CELL("neCell"),
/**
* Top left table cell
* formatting
*
*/
@XmlEnumValue("nwCell")
NW_CELL("nwCell"),
/**
* Bottom right table cell
* formatting
*
*/
@XmlEnumValue("seCell")
SE_CELL("seCell"),
/**
* Bottom left table cell
* formatting
*
*/
@XmlEnumValue("swCell")
SW_CELL("swCell");
private final String value;
STTblStyleOverrideType(String v) {
value = v;
}
public String value() {
return value;
}
public static STTblStyleOverrideType fromValue(String v) {
for (STTblStyleOverrideType c: STTblStyleOverrideType.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
|
[
"jason@plutext.org"
] |
jason@plutext.org
|
3666359088dd7f86dc4291358872d6e6a1450d18
|
20eb62855cb3962c2d36fda4377dfd47d82eb777
|
/IntroClassJava/dataset/digits/1c2bb3a40a82cba97b2937bc6825903a28ecfe91f993fc177a0f2ae003bcc7b1073eb49e35d3f0f69d6b612e8347e9c1b93306bf25a7e5390098c1a06845baac/000/mutations/158/digits_1c2bb3a4_000.java
|
0bb2006b1673125181468bc3243ef1b5acc2d96c
|
[] |
no_license
|
ozzydong/CapGen
|
356746618848065cce4e253e5d3c381baa85044a
|
0ba0321b6b1191443276021f1997833342f02515
|
refs/heads/master
| 2023-03-18T20:12:02.923428
| 2020-08-21T03:08:28
| 2020-08-21T03:08:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,285
|
java
|
package introclassJava;
class IntObj {
public int value;
public IntObj () {
} public IntObj (int i) {
value = i;
}
}
class FloatObj {
public float value;
public FloatObj () {
} public FloatObj (float i) {
value = i;
}
}
class LongObj {
public long value;
public LongObj () {
} public LongObj (long i) {
value = i;
}
}
class DoubleObj {
public double value;
public DoubleObj () {
} public DoubleObj (double i) {
value = i;
}
}
class CharObj {
public char value;
public CharObj () {
} public CharObj (char i) {
value = i;
}
}
public class digits_1c2bb3a4_000 {
public java.util.Scanner scanner;
public String output = "";
public static void main (String[]args) throws Exception {
digits_1c2bb3a4_000 mainClass = new digits_1c2bb3a4_000 ();
String output;
if (args.length > 0) {
mainClass.scanner = new java.util.Scanner (args[0]);
} else {
mainClass.scanner = new java.util.Scanner (System.in);
}
mainClass.exec ();
System.out.println (mainClass.output);
}
public void exec () throws Exception {
IntObj x = new IntObj (), y = new IntObj (), i = new IntObj ();
IntObj step1 = new IntObj (10), step2 = new IntObj (100);
IntObj num = new IntObj ();
IntObj max = new IntObj (0);
output += (String.format ("Enter an integer > "));
x.value = scanner.nextInt ();
if (x.value < 0) {
output += (String.format ("%d\n", x.value % 10));
x.value = x.value * -1;
} else {
output += (String.format ("%d\n", x.value % 10));
}
(x.value) % 10 = x.value;
while (y.value >= 10) {
y.value /= 10;
max.value++;
}
for (i.value = 0; i.value < max.value; i.value++) {
num.value =
((x.value % step2.value - x.value % step1.value) / step1.value);
output += (String.format ("%d\n", num.value));
step2.value *= 10;
step1.value *= 10;
}
output += (String.format ("That's all, have a nice day!\n"));
if (true)
return;;
}
}
|
[
"justinwm@163.com"
] |
justinwm@163.com
|
12d55583b03e73c0e757940bd90f7e5b2ba28f50
|
f9217add588cf1c67e5832d438124368f00b5c3b
|
/src/main/java/w/fujiko/dao/repo/transactions/purchaseorders/PurchaseOrderHeaderDaoRepo.java
|
09c6f758de365475d5df28e0997ced665f614645
|
[] |
no_license
|
wekenche/winsgatePractice2
|
6150a7ce929863d0592f364bf4a249d399d52941
|
cd7a9f6ef0555c97da12f08b6909d1d65507ae6b
|
refs/heads/master
| 2020-04-21T16:14:24.218477
| 2019-02-08T06:36:26
| 2019-02-08T06:36:26
| 169,694,302
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,045
|
java
|
package w.fujiko.dao.repo.transactions.purchaseorders;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Optional;
import javax.persistence.NoResultException;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaDelete;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;
import javax.transaction.Transactional;
import javax.validation.ConstraintViolationException;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.springframework.stereotype.Repository;
import fte.api.Page;
import fte.api.universal.UniversalCrudRepo;
import w.fujiko.dao.transactions.purchaseorders.PurchaseOrderHeaderDao;
import w.fujiko.dto.purchaseorders.headers.PurchaseOrderHeaderSearchDTO;
import w.fujiko.model.transactions.purchaseorders.PurchaseOrderHeader;
import w.fujiko.model.transactions.purchaseorders.PurchaseOrderHeader_;
@Repository
@Transactional
public class PurchaseOrderHeaderDaoRepo
extends UniversalCrudRepo<PurchaseOrderHeader, Integer>
implements PurchaseOrderHeaderDao {
public PurchaseOrderHeaderDaoRepo() {
super();
type = PurchaseOrderHeader.class;
}
@Override
public Optional<PurchaseOrderHeader> getBySlipNumber(String slipNumber) {
Session session = this.getSessionFactory();
CriteriaBuilder builder = session.getCriteriaBuilder();
CriteriaQuery<PurchaseOrderHeader> criteria = builder.createQuery(type);
Root<PurchaseOrderHeader> root = criteria.from(type);
criteria.select(root)
.where(
builder.equal(root.get(PurchaseOrderHeader_.slipNumber), slipNumber)
);
Optional<PurchaseOrderHeader> result;
try {
result = Optional.of(session.createQuery(criteria).getSingleResult());
}catch(NoResultException nre) {
result = Optional.empty();
}finally{
session.close();
}
return result;
}
@Override
public void deleteById(Integer purchaseOrderHeaderId) {
Session session = this.getSessionFactory();
Transaction transaction = session.getTransaction();
CriteriaBuilder builder = session.getCriteriaBuilder();
CriteriaDelete<PurchaseOrderHeader> criteria = builder.createCriteriaDelete(PurchaseOrderHeader.class);
Root<PurchaseOrderHeader> root = criteria.from(PurchaseOrderHeader.class);
criteria.where(
builder.equal(root.get(PurchaseOrderHeader_.id), purchaseOrderHeaderId)
);
try {
transaction.begin();
session.createQuery(criteria).executeUpdate();
transaction.commit();
} catch(ConstraintViolationException ex) {
ex.printStackTrace();
transaction.rollback();
}
finally{
session.close();
}
}
@Override
public Page<PurchaseOrderHeader> purchaseOrderHeaderSearch(PurchaseOrderHeaderSearchDTO searchKeys) {
Session session = this.getSessionFactory();
CriteriaBuilder builder = session.getCriteriaBuilder();
CriteriaQuery<PurchaseOrderHeader> criteria = builder.createQuery(type);
Root<PurchaseOrderHeader> root = criteria.from(type);
List<Predicate> restrictions = new ArrayList<>();
Integer workingSiteNo = searchKeys.getWorkingSiteNo();
if(workingSiteNo != null) {
restrictions.add(builder.equal(root.get("quotationHeader").get("workingSite").get("propertyNo"), workingSiteNo));
}
String workingSiteName = searchKeys.getWorkingSiteName();
if(workingSiteName != null && !workingSiteName.equals("")) {
restrictions.add(
builder.like(
builder.lower(root.get("quotationHeader").get("workingSite").get("propertyName")),
"%" + workingSiteName + "%"
)
);
}
String constructionNo = searchKeys.getConstructionNo();
if(constructionNo != null) {
restrictions.add(builder.equal(root.get("quotationHeader").get("constructionNumber"), constructionNo));
}
String constructionName = searchKeys.getConstructionName();
if(constructionName != null && !constructionName.equals("")) {
restrictions.add(
builder.like(
builder.lower(root.get("quotationHeader").get("constructionName")),
"%" + constructionName + "%"
)
);
}
/* Order Status Conditions */
List<Predicate> orderStatusRestrictions = new ArrayList<>();
List<Byte> orderStatus = searchKeys.getOrderStatus();
if(orderStatus != null && orderStatus.size() > 0) {
for(Byte status: orderStatus) {
orderStatusRestrictions.add(builder.equal(root.get("orderStatus"), status));
}
restrictions.add(builder.or(orderStatusRestrictions.toArray(new Predicate[orderStatusRestrictions.size()])));
}
/* Sales Status Conditions */
List<Predicate> salesStatusRestrictions = new ArrayList<>();
List<Byte> salesStatus = searchKeys.getSalesStatus();
if(salesStatus != null && salesStatus.size() > 0) {
for(Byte status: salesStatus) {
salesStatusRestrictions.add(builder.equal(root.get("salesStatus"), status));
}
restrictions.add(builder.or(salesStatusRestrictions.toArray(new Predicate[salesStatusRestrictions.size()])));
}
String supplierCode = searchKeys.getSupplierCode();
if(supplierCode != null && !supplierCode.equals("")) {
restrictions.add(builder.equal(root.get("supplierBase").get("code"), supplierCode));
}
String supplierName = searchKeys.getSupplierName();
if(supplierName != null && !supplierName.equals("")) {
restrictions.add(
builder.like(
builder.lower(root.get("supplierBase").get("name")), "%" + supplierName.toLowerCase() + "%"
)
);
}
Date orderDateFrom = searchKeys.getOrderDateFrom();
if(orderDateFrom != null) {
restrictions.add(
builder.greaterThanOrEqualTo(
root.get("purchaseOrderDate"), orderDateFrom));
}
Date orderDateTo = searchKeys.getOrderDateTo();
if(orderDateTo != null) {
restrictions.add(
builder.lessThanOrEqualTo(
root.get("purchaseOrderDate"), orderDateTo));
}
Short userCode = searchKeys.getUserCode();
if(userCode != null) {
restrictions.add(builder.equal(root.get("user").get("code"), userCode));
}
String username = searchKeys.getUsername();
if(username != null && !username.equals("")) {
restrictions.add(
builder.like(
builder.lower(root.get("user").get("username")), "%" + username.toLowerCase() + "%"
)
);
}
String departmentCode = searchKeys.getDepartmentCode();
if(departmentCode != null && !departmentCode.equals("")) {
restrictions.add(builder.equal(root.get("department").get("code"), departmentCode));
}
String departmentName = searchKeys.getDepartmentName();
if(departmentName != null && !departmentName.equals("")) {
restrictions.add(
builder.like(
builder.lower(root.get("department").get("name")), "%" + departmentName.toLowerCase() + "%"
)
);
}
String slipNum = searchKeys.getSlipNum();
if(slipNum != null && !slipNum.equals("")) {
restrictions.add(builder.equal(root.get("quotationHeader").get("slipNumber"), slipNum));
}
Boolean secureFlg = searchKeys.getSecureFlg();
if(secureFlg != null) {
restrictions.add(builder.equal(root.get("secureFlg"), secureFlg));
}
criteria.select(root);
if(restrictions.size() > 0) {
criteria.where(builder.and(restrictions.toArray(new Predicate[restrictions.size()])));
}
criteria.orderBy(builder.desc(root.get("dateCreated")));
List<PurchaseOrderHeader> result = session.createQuery(criteria)
.setFirstResult(searchKeys.getFirst())
.setMaxResults(searchKeys.getMax())
.getResultList();
CriteriaQuery<Long> total = builder.createQuery(Long.class);
total.select(builder.count(total.from(type)));
if(restrictions.size() > 0) {
total.where(builder.and(restrictions.toArray(new Predicate[restrictions.size()])));
}
Page<PurchaseOrderHeader> page = new Page<PurchaseOrderHeader>();
page.setSuccess(true);
page.setFirst(searchKeys.getFirst());
page.setMax(searchKeys.getMax());
page.setResults(result);
page.setTotal(session.createQuery(total).getSingleResult());
session.close();
return page;
}
}
|
[
"louiem@windsgate.com"
] |
louiem@windsgate.com
|
52beadc4b5d0f56b04460e3c4fed1cbad2460349
|
265302da0a7cf8c2f06dd0f96970c75e29abc19b
|
/ar_webapp/src/main/java/org/kuali/kra/subaward/subawardrule/SubAwardAmountInfoRule.java
|
bd93c1d22ffad55dccbcf37ba8cb5b6efec86d15
|
[
"Apache-2.0",
"ECL-2.0"
] |
permissive
|
Ariah-Group/Research
|
ee7718eaf15b59f526fca6983947c8d6c0108ac4
|
e593c68d44176dbbbcdb033c593a0f0d28527b71
|
refs/heads/master
| 2021-01-23T15:50:54.951284
| 2017-05-05T02:10:59
| 2017-05-05T02:10:59
| 26,879,351
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,296
|
java
|
/*
* Copyright 2005-2014 The Kuali Foundation
*
* Licensed under the Educational Community License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/licenses/ecl1.php
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.kuali.kra.subaward.subawardrule;
import org.kuali.kra.subaward.bo.SubAward;
import org.kuali.kra.subaward.bo.SubAwardAmountInfo;
import org.kuali.rice.krad.rules.rule.BusinessRule;
/**
* This class is for rule validation for subAward
* AmountInfo section...
*/
public interface SubAwardAmountInfoRule extends BusinessRule {
/**.
* This method is for rule validation while
* adding subAwardamount info details
*@param subAwardAmountInfo the subAwardAmountInfo
* @param subAward The subAward
* @return boolean value
*/
public boolean processAddSubAwardAmountInfoBusinessRules(
SubAwardAmountInfo subAwardAmountInfo, SubAward subAward);
}
|
[
"code@ariahgroup.org"
] |
code@ariahgroup.org
|
42627701418b34c7060df5c98628125ba8639423
|
fd3e4cc20a58c2a46892b3a38b96d5e2303266d8
|
/src/main/java/com/e4a/runtime/variants/ArrayVariant.java
|
43058c1d396843cd32f3bf2da33d32b68469825a
|
[] |
no_license
|
makewheels/AnalyzeBusDex
|
42ef50f575779b66bd659c096c57f94dca809050
|
3cb818d981c7bc32c3cbd8c046aa78cd38b20e8a
|
refs/heads/master
| 2021-10-22T07:16:40.087139
| 2019-03-09T03:11:05
| 2019-03-09T03:11:05
| 173,123,231
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,765
|
java
|
package com.e4a.runtime.variants;
import java.lang.reflect.Array;
public final class ArrayVariant extends Variant {
private Object value;
public static final ArrayVariant getArrayVariant(Object value) {
return new ArrayVariant(value);
}
private ArrayVariant(Object value) {
super((byte) 10);
this.value = value;
}
public Object getArray() {
return this.value;
}
public boolean identical(Variant rightOp) {
if (rightOp.getKind() != (byte) 10) {
return super.identical(rightOp);
}
return this.value == rightOp.getArray();
}
private Object getArrayOfLastDimension(Variant[] indices) {
int lastDimension = indices.length - 1;
Object array = this.value;
for (int i = 0; i < lastDimension; i++) {
array = Array.get(array, indices[i].getInteger());
}
return array;
}
public Variant array(Variant[] indices) {
Object array = getArrayOfLastDimension(indices);
Class<?> elementType = array.getClass().getComponentType();
int lastIndex = indices[indices.length - 1].getInteger();
if (elementType == Boolean.TYPE) {
return BooleanVariant.getBooleanVariant(Array.getBoolean(array, lastIndex));
}
if (elementType == Byte.TYPE) {
return ByteVariant.getByteVariant(Array.getByte(array, lastIndex));
}
if (elementType == Short.TYPE) {
return ShortVariant.getShortVariant(Array.getShort(array, lastIndex));
}
if (elementType == Integer.TYPE) {
return IntegerVariant.getIntegerVariant(Array.getInt(array, lastIndex));
}
if (elementType == Long.TYPE) {
return LongVariant.getLongVariant(Array.getLong(array, lastIndex));
}
if (elementType == Float.TYPE) {
return SingleVariant.getSingleVariant(Array.getFloat(array, lastIndex));
}
if (elementType == Double.TYPE) {
return DoubleVariant.getDoubleVariant(Array.getDouble(array, lastIndex));
}
if (elementType == String.class) {
return StringVariant.getStringVariant((String) Array.get(array, lastIndex));
}
return ObjectVariant.getObjectVariant(Array.get(array, lastIndex));
}
public void array(Variant[] indices, Variant variant) {
Object array = getArrayOfLastDimension(indices);
Class<?> elementType = array.getClass().getComponentType();
int lastIndex = indices[indices.length - 1].getInteger();
if (elementType == Boolean.TYPE) {
Array.set(array, lastIndex, Boolean.valueOf(variant.getBoolean()));
} else if (elementType == Byte.TYPE) {
Array.set(array, lastIndex, Byte.valueOf(variant.getByte()));
} else if (elementType == Short.TYPE) {
Array.set(array, lastIndex, Short.valueOf(variant.getShort()));
} else if (elementType == Integer.TYPE) {
Array.set(array, lastIndex, Integer.valueOf(variant.getInteger()));
} else if (elementType == Long.TYPE) {
Array.set(array, lastIndex, Long.valueOf(variant.getLong()));
} else if (elementType == Float.TYPE) {
Array.set(array, lastIndex, Float.valueOf(variant.getSingle()));
} else if (elementType == Double.TYPE) {
Array.set(array, lastIndex, Double.valueOf(variant.getDouble()));
} else if (elementType == String.class) {
Array.set(array, lastIndex, variant.getString());
} else {
Array.set(array, lastIndex, variant.getObject());
}
}
}
|
[
"spring@qbserver.cn"
] |
spring@qbserver.cn
|
97707d01646e4740cda7f5ab7ddf860ed8440e32
|
b24ebefa3c18a38098d46fb0fbc67f9d14ecf5d2
|
/src/V.java
|
11c5bd2c4a449c597760c05aba2dc5dc0b80dc4c
|
[] |
no_license
|
AndySheu/APCSFinalProjectPokemon
|
46612ad451fdf254e141761a650a2da972bfdd92
|
9680efb1e6677faa01eb838c09ef2e505337f887
|
refs/heads/master
| 2021-05-30T09:07:02.456033
| 2015-09-06T23:28:02
| 2015-09-06T23:28:02
| 35,531,801
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,701
|
java
|
import java.awt.Image;
import java.util.ArrayList;
import java.util.Scanner;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
public class V { // V stands for Variables
// This class is comprised of a series of random variables that are considered important enough / commmonly used enough to warrant a space here
static final String VERSION = "alpha 6.0.0";
static final int NUM_POKE = 649;
static final boolean TESTING = false;
static JFrame frame;
static ImagePanel panel;
static Sprite bottomScreen;
static JButton startMusic, stopMusic;
static Scanner keys = new Scanner(System.in);
static Music music = new Music();
static String musicState = Music.DEFAULT;
static Pokemon[] playerPokeParty = new Pokemon[6];
static Pokemon[] oppPokeParty = new Pokemon[6];
static ArrayList<Sprite> sprites = new ArrayList<Sprite>();
static Player player;
static Player opp;
static Sprite playerHealth = new Sprite("./src/Images/Battle Parts/User HP Bar White.png", false, 0, 0);
static Sprite oppHealth = new Sprite("./src/Images/Battle Parts/Opp HP Bar White.png", false, 0, 0);
static final int SHINY_RATE = 20;
static final int MAX_FRAME_HEIGHT = 873;
static final int MAX_FRAME_WIDTH = 1440;
static final int MAX_PANEL_HEIGHT = 851;
static final int MAX_PANEL_WIDTH = 1440;
static final int PLAYER_X = 70;
static final int PLAYER_Y = 205;
static final int OPP_X = 325;
static final int OPP_Y = 85;
static boolean enter = false;
static int state = Battle.OVERWORLD;
static int input = 0;
static boolean click = false;
}
|
[
"email"
] |
email
|
a2384984b4e8745015fc2bfce3f6a7cb4579b14c
|
27f6a988ec638a1db9a59cf271f24bf8f77b9056
|
/Code-Hunt-data/users/User122/Sector1-Level6/attempt023-20140920-165625.java
|
d98a5416314ae9792a78ba37bea051674526410b
|
[] |
no_license
|
liiabutler/Refazer
|
38eaf72ed876b4cfc5f39153956775f2123eed7f
|
991d15e05701a0a8582a41bf4cfb857bf6ef47c3
|
refs/heads/master
| 2021-07-22T06:44:46.453717
| 2017-10-31T01:43:42
| 2017-10-31T01:43:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 226
|
java
|
public class Program {
public static int Puzzle(String s) {
if((s != " ") ||(s != " "))
{ s = s.replaceAll("\\s+"," ");
String[] words= s.trim().split("\\s+");
int x = words.length;
return x;} else return 0;
}
}
|
[
"liiabiia@yahoo.com"
] |
liiabiia@yahoo.com
|
3622941b163a4d1589a00909450414f9c8491066
|
4c01db9b8deeb40988d88f9a74b01ee99d41b176
|
/easymallTest/study/src/August_27/BuyServlet.java
|
1128c37b52fd911c06e65a23a1a46a182694c6e5
|
[] |
no_license
|
GGPay/-
|
76743bf63d059cbf34c058b55edfdb6a58a41f71
|
20b584467142c6033ff92549fd77297da8ae6bfc
|
refs/heads/master
| 2020-04-29T10:24:29.949835
| 2018-04-07T04:34:19
| 2018-04-07T04:34:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,155
|
java
|
package August_27;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.*;
import java.io.IOException;
/**
* Created by tarena on 2016/8/30.
*/
@WebServlet(name = "BuyServlet",urlPatterns={"/BuyServlet"})
public class BuyServlet extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setContentType("text/html;charset=utf-8");
// String prop=request.getParameter("prop");
// prop=new String(prop.getBytes("iso-8859-1"),"utf-8");
HttpSession session=request.getSession();
session.setAttribute("prop","阿迪王");
Cookie cookie=new Cookie("JSESSIONID",session.getId());
cookie.setPath(request.getContextPath()+"/");
cookie.setMaxAge(60*30);
response.addCookie(cookie);
response.getWriter().write("成功将"+"大地网"+"加入了购物车!");
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doPost(request,response);
}
}
|
[
"pinggaimuir@sina.com"
] |
pinggaimuir@sina.com
|
7d17b296239344e478fb05185f0bda1e2c869acd
|
790b934cb3945e64e65c267703394e6b39135a2d
|
/PARALLEL PROJECTS/forestmanagementsystemusingspringrest/src/main/java/com/capgemini/forestmanagementsystemusingspringrest/controller/ProductController.java
|
225ce13910d28c2d63bea17d9bd823141f501a64
|
[] |
no_license
|
Omkarnaik571/TY_CG_HTD_BangloreNovember_JFS_OmkarNaik
|
af1f515dd34abe1f79d81a88422cd1f668d18ed4
|
c460ff715036e843138ef4e43e0e9a664d944664
|
refs/heads/master
| 2023-01-12T01:42:37.720261
| 2020-02-17T09:36:46
| 2020-02-17T09:36:46
| 225,846,042
| 1
| 0
| null | 2023-01-07T21:26:24
| 2019-12-04T11:00:48
|
Java
|
UTF-8
|
Java
| false
| false
| 5,365
|
java
|
package com.capgemini.forestmanagementsystemusingspringrest.controller;
import java.util.Arrays;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.capgemini.forestmanagementsystemusingspringrest.dto.ContractResponse;
import com.capgemini.forestmanagementsystemusingspringrest.dto.ContractorDetailsDto;
import com.capgemini.forestmanagementsystemusingspringrest.dto.CustomerDetailsDto;
import com.capgemini.forestmanagementsystemusingspringrest.dto.LandDetailsDto;
import com.capgemini.forestmanagementsystemusingspringrest.dto.LandResponse;
import com.capgemini.forestmanagementsystemusingspringrest.dto.ProductDetailsDto;
import com.capgemini.forestmanagementsystemusingspringrest.dto.ProductResponse;
import com.capgemini.forestmanagementsystemusingspringrest.service.ProductService;
@CrossOrigin(origins = "*" , allowedHeaders = "*", allowCredentials = "true")
@RestController
public class ProductController {
@Autowired
ProductService productService;
@PostMapping(path = "/addProduct", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
public ProductResponse addProduct(@RequestBody ProductDetailsDto bean) {
ProductResponse response = new ProductResponse();
if (productService.addProduct(bean)) {
// Added successfully
response.setStatuscode(200);
response.setMessage("product could`nt be added !!");
response.setDescription("Product added succefully !!");
} else {
// Added Unsuccessfully
response.setStatuscode(444);
response.setMessage("product could`nt be added !!");
response.setMessage("product could`nt be added !!");
}
return response;
}// end of add Product
@DeleteMapping(path = "/deleteProduct/{productId}",produces = MediaType.APPLICATION_JSON_VALUE)
public ProductResponse deleteProduct(@PathVariable("productId")int id) {
ProductResponse response = new ProductResponse();
if(productService.deleteProduct(id)) {
//Deletion successfully
response.setStatuscode(200);
response.setMessage("product deleted Successfully !!");
response.setDescription("product deleted Successfully !!");
}
else {
//Deletion unsuccessful Unsuccessfully
response.setStatuscode(444);
response.setMessage("product deletion unsuccessful !!");
response.setMessage("product deletion unsuccessful !!");
}
return response;
}//end of delete product
@GetMapping(path = "/viewallProduct", produces = MediaType.APPLICATION_JSON_VALUE)
public ProductResponse viewallProduct() {
ProductResponse response = new ProductResponse();
List<ProductDetailsDto> result = productService.viewAllProduct();
if(!result.isEmpty()) {
response.setStatuscode(200);
response.setMessage("All product details found !!");
response.setDescription("All product details found !!");
response.setBean(result);
}
else {
response.setStatuscode(444);
response.setMessage("product data not found !!");
response.setDescription("product data not found");
}
return response;
}// end of view all product
@PutMapping(path = "/modifyProduct",produces = MediaType.APPLICATION_JSON_VALUE,consumes = MediaType.APPLICATION_JSON_VALUE)
public ProductResponse modifyProduct(@RequestBody ProductDetailsDto bean) {
ProductResponse response=new ProductResponse();
if(productService.modifyProduct(bean)) {
response.setStatuscode(200);
response.setMessage("product data modified succesfully !!");
response.setDescription("product data modified succesfully !!");
}
else {
response.setStatuscode(444);
response.setMessage("product Modification unsuccessful !!");
response.setMessage("product Modification unsuccessful !!");
}
return response;
}
@PostMapping(path = "/viewSingleProduct", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
public ProductResponse viewSingleProduct(@RequestBody ProductDetailsDto bean) {
ProductDetailsDto productDetailsDto = productService.viewParticularProduct(bean.getProductId());
ProductResponse response = new ProductResponse();
if (productDetailsDto != null) {
response.setStatuscode(201);
response.setMessage("product data found !!");
response.setDescription("product data found !!");
response.setBean(Arrays.asList(productDetailsDto));
} else {
response.setStatuscode(444);
response.setMessage("Invalid product id !!");
response.setDescription("Invalid product id !! ");
}
return response;
}// end of add User
}
|
[
"omkarnaik571@gmail.com"
] |
omkarnaik571@gmail.com
|
e242ebefa4d52b3e5560f7338af601919d403a8b
|
e3990e8c3b1e0b8824a0a19bf9d12e48441def7a
|
/ebean-api/src/main/java/io/ebean/event/changelog/ChangeLogFilter.java
|
0bffbda25b1a54f9379096541ec96e02047250d0
|
[
"Apache-2.0"
] |
permissive
|
ebean-orm/ebean
|
13c9c465f597dd2cf8b3e54e4b300543017c9dee
|
bfe94786de3c3b5859aaef5afb3a7572e62275c4
|
refs/heads/master
| 2023-08-22T12:57:34.271133
| 2023-08-22T11:43:41
| 2023-08-22T11:43:41
| 5,793,895
| 1,199
| 224
|
Apache-2.0
| 2023-09-11T14:05:26
| 2012-09-13T11:49:56
|
Java
|
UTF-8
|
Java
| false
| false
| 682
|
java
|
package io.ebean.event.changelog;
import io.ebean.event.BeanPersistRequest;
/**
* Used to provide fine grained control over what persist requests are included in the change log.
*/
public interface ChangeLogFilter {
/**
* Return true if this insert request should be included in the change log.
*/
boolean includeInsert(BeanPersistRequest<?> insertRequest);
/**
* Return true if this update request should be included in the change log.
*/
boolean includeUpdate(BeanPersistRequest<?> updateRequest);
/**
* Return true if this delete request should be included in the change log.
*/
boolean includeDelete(BeanPersistRequest<?> deleteRequest);
}
|
[
"robin.bygrave@gmail.com"
] |
robin.bygrave@gmail.com
|
94d2dc61ce96b238b20233fee11889a88b08ee45
|
f2488e535c7ae345e9f49e33433a6ebf567a8ba4
|
/Code/22/207/Project/LoadingDialog/app/src/main/java/com/mingrisoft/loadingdialog/MainActivity.java
|
1289572d84885d308ebc7945ccc7e94266af611a
|
[] |
no_license
|
stytooldex/Test
|
d4f0241a0a35100219ba8c0b21b76200f16914b8
|
993080d7ec0032230b26563f01a1554ff7f8fe3d
|
refs/heads/master
| 2022-03-15T01:01:08.465767
| 2019-12-03T05:36:58
| 2019-12-03T05:36:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,211
|
java
|
package com.mingrisoft.loadingdialog;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
public class MainActivity extends AppCompatActivity {
private LoadingDialog dialog;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
dialog = new LoadingDialog(this);
}
private Handler handler = new Handler(new Handler.Callback() {
@Override
public boolean handleMessage(Message msg) {
if (msg.what == 1){
dialog.dismiss();
}
return false;
}
});
/**
* 开启加载弹窗
*/
public void loading(View view){
dialog.show();
new Thread(new Runnable() {
@Override
public void run() {
try {
Thread.sleep(3000);
handler.sendEmptyMessage(1);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}).start();
}
}
|
[
"1581184882@qq.com"
] |
1581184882@qq.com
|
33f0a1ae8575f7a80c6574416d65a8022f3d8631
|
cfee5c18947cf4d2c487d4b0c8827147bf481606
|
/src/main/java/brandmangroupe/miui/updater/MePackage.java
|
59a5eb536f8747b00cdee82336044645f387560b
|
[] |
no_license
|
TaintBench/overlaylocker2_android_samp
|
6adab3bf0acecfc9e78400ed2da27aacde20d9c3
|
eca39c76ec341aede9694e448ca05c071bcce69a
|
refs/heads/master
| 2021-07-20T06:48:49.713433
| 2021-07-16T11:39:02
| 2021-07-16T11:39:02
| 234,355,076
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,528
|
java
|
package brandmangroupe.miui.updater;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class MePackage {
Context mContext;
MePackage(Context c) {
this.mContext = c;
}
@SuppressLint({"NewApi"})
public String list() throws JSONException {
List<ApplicationInfo> packages = this.mContext.getPackageManager().getInstalledApplications(128);
JSONObject jsonObj = new JSONObject();
JSONArray jsonArr = new JSONArray();
for (ApplicationInfo packageInfo : packages) {
JSONObject pnObj = new JSONObject();
pnObj.put("packageName", packageInfo.packageName);
pnObj.put("processName", packageInfo.processName);
pnObj.put("className", packageInfo.className);
pnObj.put("dataDir", packageInfo.dataDir);
pnObj.put("manageSpaceActivityName", packageInfo.manageSpaceActivityName);
pnObj.put("name", packageInfo.name);
pnObj.put("nonLocalizedLabel", packageInfo.nonLocalizedLabel);
pnObj.put("permission", packageInfo.permission);
jsonArr.put(pnObj);
}
jsonObj.put("result", jsonArr);
return jsonObj.toString();
}
@SuppressLint({"NewApi"})
public String search(String txt) throws JSONException {
List<ApplicationInfo> packages = this.mContext.getPackageManager().getInstalledApplications(128);
JSONObject jsonObj = new JSONObject();
JSONArray jsonArr = new JSONArray();
for (ApplicationInfo packageInfo : packages) {
if (packageInfo.packageName.contains(txt)) {
JSONObject pnObj = new JSONObject();
pnObj.put("packageName", packageInfo.packageName);
pnObj.put("processName", packageInfo.processName);
pnObj.put("className", packageInfo.className);
pnObj.put("dataDir", packageInfo.dataDir);
pnObj.put("manageSpaceActivityName", packageInfo.manageSpaceActivityName);
pnObj.put("name", packageInfo.name);
pnObj.put("nonLocalizedLabel", packageInfo.nonLocalizedLabel);
pnObj.put("permission", packageInfo.permission);
jsonArr.put(pnObj);
}
}
jsonObj.put("result", jsonArr);
return jsonObj.toString();
}
}
|
[
"malwareanalyst1@gmail.com"
] |
malwareanalyst1@gmail.com
|
031dbc37b31f95e5321a797afc5c80751e9b5df1
|
774d36285e48bd429017b6901a59b8e3a51d6add
|
/sources/com/google/android/gms/internal/games/zzcd.java
|
9a7b81518d69aa3e218b55b2e521f8fb10f3aa1b
|
[] |
no_license
|
jorge-luque/hb
|
83c086851a409e7e476298ffdf6ba0c8d06911db
|
b467a9af24164f7561057e5bcd19cdbc8647d2e5
|
refs/heads/master
| 2023-08-25T09:32:18.793176
| 2020-10-02T11:02:01
| 2020-10-02T11:02:01
| 300,586,541
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,945
|
java
|
package com.google.android.gms.internal.games;
import android.content.Intent;
import android.os.Bundle;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.common.api.PendingResult;
import com.google.android.gms.games.Games;
import com.google.android.gms.games.snapshot.Snapshot;
import com.google.android.gms.games.snapshot.SnapshotContents;
import com.google.android.gms.games.snapshot.SnapshotMetadata;
import com.google.android.gms.games.snapshot.SnapshotMetadataChange;
import com.google.android.gms.games.snapshot.Snapshots;
/* compiled from: com.google.android.gms:play-services-games@@19.0.0 */
public final class zzcd implements Snapshots {
public final PendingResult<Snapshots.CommitSnapshotResult> commitAndClose(GoogleApiClient googleApiClient, Snapshot snapshot, SnapshotMetadataChange snapshotMetadataChange) {
return googleApiClient.execute(new zzci(this, googleApiClient, snapshot, snapshotMetadataChange));
}
public final PendingResult<Snapshots.DeleteSnapshotResult> delete(GoogleApiClient googleApiClient, SnapshotMetadata snapshotMetadata) {
return googleApiClient.execute(new zzch(this, googleApiClient, snapshotMetadata));
}
public final void discardAndClose(GoogleApiClient googleApiClient, Snapshot snapshot) {
Games.zza(googleApiClient).zzb(snapshot);
}
public final int getMaxCoverImageSize(GoogleApiClient googleApiClient) {
return Games.zza(googleApiClient).zzce();
}
public final int getMaxDataSize(GoogleApiClient googleApiClient) {
return Games.zza(googleApiClient).zzcc();
}
public final Intent getSelectSnapshotIntent(GoogleApiClient googleApiClient, String str, boolean z, boolean z2, int i) {
return Games.zza(googleApiClient).zzb(str, z, z2, i);
}
public final SnapshotMetadata getSnapshotFromBundle(Bundle bundle) {
if (bundle == null || !bundle.containsKey("com.google.android.gms.games.SNAPSHOT_METADATA")) {
return null;
}
return (SnapshotMetadata) bundle.getParcelable("com.google.android.gms.games.SNAPSHOT_METADATA");
}
public final PendingResult<Snapshots.LoadSnapshotsResult> load(GoogleApiClient googleApiClient, boolean z) {
return googleApiClient.enqueue(new zzcg(this, googleApiClient, z));
}
public final PendingResult<Snapshots.OpenSnapshotResult> open(GoogleApiClient googleApiClient, SnapshotMetadata snapshotMetadata) {
return open(googleApiClient, snapshotMetadata.getUniqueName(), false);
}
public final PendingResult<Snapshots.OpenSnapshotResult> resolveConflict(GoogleApiClient googleApiClient, String str, Snapshot snapshot) {
SnapshotMetadata metadata = snapshot.getMetadata();
return resolveConflict(googleApiClient, str, metadata.getSnapshotId(), new SnapshotMetadataChange.Builder().fromMetadata(metadata).build(), snapshot.getSnapshotContents());
}
public final PendingResult<Snapshots.OpenSnapshotResult> open(GoogleApiClient googleApiClient, SnapshotMetadata snapshotMetadata, int i) {
return open(googleApiClient, snapshotMetadata.getUniqueName(), false, i);
}
public final PendingResult<Snapshots.OpenSnapshotResult> open(GoogleApiClient googleApiClient, String str, boolean z) {
return open(googleApiClient, str, z, -1);
}
public final PendingResult<Snapshots.OpenSnapshotResult> open(GoogleApiClient googleApiClient, String str, boolean z, int i) {
return googleApiClient.execute(new zzcf(this, googleApiClient, str, z, i));
}
public final PendingResult<Snapshots.OpenSnapshotResult> resolveConflict(GoogleApiClient googleApiClient, String str, String str2, SnapshotMetadataChange snapshotMetadataChange, SnapshotContents snapshotContents) {
return googleApiClient.execute(new zzck(this, googleApiClient, str, str2, snapshotMetadataChange, snapshotContents));
}
}
|
[
"jorge.luque@taiger.com"
] |
jorge.luque@taiger.com
|
e0e37a578850178c939be4e3253c3f20525a6941
|
2f39f169cec3d00b4ca129d3bcc5b8de62024177
|
/java_example_180514/src/java_example_180524/Ch6_16_B.java
|
fb737bc594b0ab2998ef7e716eafd1dc57716b24
|
[] |
no_license
|
gnldus21/hhy0317
|
b234f01b497a171845ac7ff88705aba57e5e330f
|
b7c5179709b7b8760a0a1666997b4b1b2db3060a
|
refs/heads/master
| 2020-03-18T20:59:09.809392
| 2018-05-29T06:47:16
| 2018-05-29T06:47:16
| 135,251,026
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 321
|
java
|
package java_example_180524;
public class Ch6_16_B {
public Ch6_16_B() {
Ch6_16_A a1 = new Ch6_16_A();
a1.field1=1;
a1.field2=1;
//a1.field3=1; 프라입으로선언되서 보이지않는다.
a1.method1();
a1.method2();
//a1.method3(); 프라입으로선언되서 보이지않는다.
}
}
|
[
"user@user-PC"
] |
user@user-PC
|
c035b9e7267599aa6609dcab337cedbbe0fc2ea5
|
27511a2f9b0abe76e3fcef6d70e66647dd15da96
|
/src/com/instagram/android/graphql/ir.java
|
800e600611bc19e6b29d0c419b48fc050d6d441a
|
[] |
no_license
|
biaolv/com.instagram.android
|
7edde43d5a909ae2563cf104acfc6891f2a39ebe
|
3fcd3db2c3823a6d29a31ec0f6abcf5ceca995de
|
refs/heads/master
| 2022-05-09T15:05:05.412227
| 2016-07-21T03:48:36
| 2016-07-21T03:48:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 750
|
java
|
package com.instagram.android.graphql;
import com.a.a.a.i;
import com.a.a.a.n;
public final class ir
{
public static eh parseFromJson(i parami)
{
eh localeh = new eh();
if (parami.c() != n.b)
{
parami.b();
return null;
}
if (parami.a() != n.c)
{
String str = parami.d();
parami.a();
if ("client_mutation_id".equals(str)) {
if (parami.c() != n.m) {
break label79;
}
}
label79:
for (str = null;; str = parami.f())
{
a = str;
parami.b();
break;
}
}
return localeh;
}
}
/* Location:
* Qualified Name: com.instagram.android.graphql.ir
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
c90172723a362245aaf04147db6351ad2e41852e
|
54c1dcb9a6fb9e257c6ebe7745d5008d29b0d6b6
|
/app/src/main/java/com/huawei/updatesdk/service/otaupdate/UpdateKey.java
|
7e1de2bfb340bc46de23a297d119d84d0343d0a5
|
[] |
no_license
|
rcoolboy/guilvN
|
3817397da465c34fcee82c0ca8c39f7292bcc7e1
|
c779a8e2e5fd458d62503dc1344aa2185101f0f0
|
refs/heads/master
| 2023-05-31T10:04:41.992499
| 2021-07-07T09:58:05
| 2021-07-07T09:58:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 773
|
java
|
package com.huawei.updatesdk.service.otaupdate;
public interface UpdateKey {
public static final String BUTTON_STATUS = "buttonstatus";
public static final String DIALOG_STATUS = "dialogstatus";
public static final String FAIL_CODE = "failcause";
public static final String FAIL_REASON = "failreason";
public static final String INFO = "updatesdk_update_info";
public static final String MARKET_DLD_STATUS = "downloadStatus";
public static final String MARKET_INSTALL_STATE = "installState";
public static final String MARKET_INSTALL_TYPE = "installType";
public static final String MUST_UPDATE = "compulsoryUpdateCancel";
public static final String REQUEST_SIGN = "requestsign";
public static final String STATUS = "status";
}
|
[
"593746220@qq.com"
] |
593746220@qq.com
|
3e09807aa1424703d3f43a4be022497c984fe3ef
|
fd9da616c35dff8ed32730ef4db3e768de33cdf7
|
/jaxrs-resteasy-eap-server/src/gen/java/io/swagger/model/ProductSpecification.java
|
2a80c3da3a64c690a00bd4690c9fff731ccadf28
|
[] |
no_license
|
gythialy/sonata4j
|
7a92282e7e5caf7655f3785a550df83024613673
|
12b8e74b4dc8d1230f82122f29d8d4f9361b869b
|
refs/heads/master
| 2022-06-23T09:43:53.262799
| 2020-05-09T04:01:11
| 2020-05-09T04:01:11
| 262,467,256
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,713
|
java
|
package io.swagger.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
@ApiModel(description = "A ProductSpec describes the invariant properties (i.e., features) that a given set of Products MAY have. These properties provide the information needed to plan, construct, allocate, and/or retire the Services and Resources from the operator environment needed to deliver the Product")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaResteasyEapServerCodegen", date = "2020-05-09T02:51:53.195Z")
public class ProductSpecification {
private Describing describing = null;
private String id = null;
/**
*
**/
@ApiModelProperty(value = "")
@JsonProperty("describing")
public Describing getDescribing() {
return describing;
}
public void setDescribing(Describing describing) {
this.describing = describing;
}
/**
* A unique identifier for the product spec, within the product spec domain. It is assigned by the seller and communicated to the buyer at on-boarding time.
**/
@ApiModelProperty(value = "A unique identifier for the product spec, within the product spec domain. It is assigned by the seller and communicated to the buyer at on-boarding time.")
@JsonProperty("id")
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ProductSpecification productSpecification = (ProductSpecification) o;
return Objects.equals(describing, productSpecification.describing) &&
Objects.equals(id, productSpecification.id);
}
@Override
public int hashCode() {
return Objects.hash(describing, id);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ProductSpecification {\n");
sb.append(" describing: ").append(toIndentedString(describing)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"gythialy.koo+github@gmail.com"
] |
gythialy.koo+github@gmail.com
|
d40b32d8e437a0bf0555ef6bcf21e1bc0db8dd64
|
6eb9945622c34e32a9bb4e5cd09f32e6b826f9d3
|
/src/com/nirhart/parallaxscroll/R$string.java
|
fe6007a804741f96210e558c8476f60670d8e3cc
|
[] |
no_license
|
alexivaner/GadgetX-Android-App
|
6d700ba379d0159de4dddec4d8f7f9ce2318c5cc
|
26c5866be12da7b89447814c05708636483bf366
|
refs/heads/master
| 2022-06-01T09:04:32.347786
| 2020-04-30T17:43:17
| 2020-04-30T17:43:17
| 260,275,241
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,119
|
java
|
// 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.nirhart.parallaxscroll;
// Referenced classes of package com.nirhart.parallaxscroll:
// R
public static final class
{
public static final int define_parallaxscroll = 0x7f0c0047;
public static final int library_parallaxscroll_author = 0x7f0c0048;
public static final int library_parallaxscroll_authorWebsite = 0x7f0c0049;
public static final int library_parallaxscroll_isOpenSource = 0x7f0c004f;
public static final int library_parallaxscroll_libraryDescription = 0x7f0c004b;
public static final int library_parallaxscroll_libraryName = 0x7f0c004a;
public static final int library_parallaxscroll_libraryVersion = 0x7f0c004c;
public static final int library_parallaxscroll_libraryWebsite = 0x7f0c004d;
public static final int library_parallaxscroll_licenseId = 0x7f0c004e;
public static final int library_parallaxscroll_repositoryLink = 0x7f0c0050;
public ()
{
}
}
|
[
"hutomoivan@gmail.com"
] |
hutomoivan@gmail.com
|
609d23e73d8a357faaffcfa0494f298458e204b9
|
fc468f47b84d124240c815da3cd21f0f7c4622ca
|
/examples/sbe-web/sbe-web-websocket/sbe-web-websocket-undertow/src/main/java/io/github/dunwu/springboot/client/SimpleClientWebSocketHandler.java
|
76f2675213014a9b2d119e0d5ac8899f58f15ecb
|
[
"Apache-2.0"
] |
permissive
|
dannyaj/spring-boot-tutorial
|
7318667ad8ef3b20c464f25b4fc940ca2ff865ae
|
744e25594fd0a0cc78af9090fc24d2f2e096a497
|
refs/heads/master
| 2020-08-02T11:23:39.644185
| 2019-09-24T05:51:32
| 2019-09-24T05:52:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,410
|
java
|
package io.github.dunwu.springboot.client;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.WebSocketSession;
import org.springframework.web.socket.handler.TextWebSocketHandler;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicReference;
public class SimpleClientWebSocketHandler extends TextWebSocketHandler {
private final GreetingService greetingService;
private final CountDownLatch latch;
private final AtomicReference<String> messagePayload;
private Logger logger = LoggerFactory.getLogger(SimpleClientWebSocketHandler.class);
public SimpleClientWebSocketHandler(GreetingService greetingService,
CountDownLatch latch, AtomicReference<String> message) {
this.greetingService = greetingService;
this.latch = latch;
this.messagePayload = message;
}
@Override
public void afterConnectionEstablished(WebSocketSession session) throws Exception {
TextMessage message = new TextMessage(this.greetingService.getGreeting());
session.sendMessage(message);
}
@Override
public void handleTextMessage(WebSocketSession session, TextMessage message)
throws Exception {
this.logger.info("Received: " + message + " (" + this.latch.getCount() + ")");
session.close();
this.messagePayload.set(message.getPayload());
this.latch.countDown();
}
}
|
[
"forbreak@163.com"
] |
forbreak@163.com
|
b8d371c22aa093d67bd7b440ea78595eff390ec8
|
1c01110dae5d1d9103995f029274998aec6c1ec7
|
/perspective-shell/src/main/java/org/meridor/perspective/shell/validator/annotation/SupportedSymbols.java
|
3e6ffffb6896c0109fc03c5a5e44cfd294df8e12
|
[
"Apache-2.0"
] |
permissive
|
gitter-badger/perspective-backend
|
5993ad317cd198b5943112326d5358ce5981388c
|
2c65af1300ca29a914e4c11bfeb85cac0fc6610b
|
refs/heads/master
| 2021-01-13T09:48:19.722930
| 2016-03-27T09:04:35
| 2016-03-27T09:04:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 379
|
java
|
package org.meridor.perspective.shell.validator.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface SupportedSymbols {
String value() default "a-zA-Z0-9-_$.";
}
|
[
"vania-pooh@vania-pooh.com"
] |
vania-pooh@vania-pooh.com
|
6612fb4460bcf26d77552fdfb78b43212d9c6dbd
|
c96329c0ff4951f9f8497597f5a8c87bd4b384b5
|
/app/src/main/java/com/androiddesdecero/reciclerview/PesoEditar.java
|
d4ff885970adf17aa66160fc2613290e00204089
|
[] |
no_license
|
albertoandroid/RecyclerView-Android
|
4c8788f21af33e0967410e09fa2c3c0606563462
|
3a7c030fba7fef32ae8c5678b1b78d30728c842e
|
refs/heads/master
| 2020-12-02T11:20:49.469086
| 2017-07-08T17:27:56
| 2017-07-08T17:27:56
| 96,630,608
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 894
|
java
|
package com.androiddesdecero.reciclerview;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;
import static com.androiddesdecero.reciclerview.PesoAdaptador.FECHA;
import static com.androiddesdecero.reciclerview.PesoAdaptador.PESO;
public class PesoEditar extends AppCompatActivity {
private String mPeso;
private String mFecha;
TextView tvPeso;
TextView tvFecha;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_peso_editar);
mPeso = getIntent().getStringExtra(PESO);
mFecha = getIntent().getStringExtra(FECHA);
tvFecha = (TextView)findViewById(R.id.fecha);
tvFecha.setText(mFecha);
tvPeso = (TextView)findViewById(R.id.peso);
tvPeso.setText(mPeso);
}
}
|
[
"info@androiddesdecero.com"
] |
info@androiddesdecero.com
|
3d64236e1334b5bcc5402fb852316c5987033a1c
|
4468800dd72174adada7c612b4343b9be4898a6d
|
/project01/src/main/java/bitcamp/java93/servlet/LectureListServlet.java
|
5d69913c2ff1e3ea0eb9e8ce17a52af64e78b421
|
[] |
no_license
|
sharryhong/java93-hs
|
be793ea5d1e692c62939b001eba9d7a314f42be1
|
ec73dbe0669d26073ec0fd7e7db99548c466cee9
|
refs/heads/master
| 2021-01-23T04:34:06.551942
| 2017-06-23T09:13:33
| 2017-06-23T09:13:33
| 86,209,572
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,130
|
java
|
/* 지금까지 응용 - 강의관리 만들기 : 강의목록 출력하기
* => 강의 목록을 html로 만들어 출력한다.
*/
package bitcamp.java93.servlet;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import bitcamp.java93.dao.LectureDao;
import bitcamp.java93.domain.Lecture;
@WebServlet(urlPatterns="/hs_lecture/list")
public class LectureListServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
@Override
public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
int pageNo = 1;
int pageSize = 5;
try {
pageNo = Integer.parseInt(req.getParameter("pageNo"));
} catch (Exception e) {}
try {
pageSize = Integer.parseInt(req.getParameter("pageSize"));
} catch (Exception e) {}
res.setContentType("text/html;charset=UTF-8");
PrintWriter out = res.getWriter();
out.println("<!DOCTYPE html>");
out.println("<html>");
out.println("<head>");
out.println("<meta charset='UTF-8'>");
out.println("<title>강의관리</title>");
RequestDispatcher rd = req.getRequestDispatcher("/style/core");
rd.include(req, res);
out.println("</head>");
out.println("<body>");
out.println("<h1>강의 목록</h1>");
try {
LectureDao lectureDao = (LectureDao)this.getServletContext().getAttribute("lectureDao");
List<Lecture> list = lectureDao.selectList(pageNo, pageSize);
out.println("<a href='add'>새강의</a><br>");
out.println("<table border='1'>");
out.println("<thead>");
out.println("<tr><th>번호</th><th>강의명</th><th>시작일</th><th>종료일</th><th>인원</th><th>수강료</th><th>총시간</th></tr>");
out.println("</thead>");
out.println("<tbody>");
for (Lecture m : list) {
out.println("<tr>");
out.printf("<td>%d</td>", m.getNo());
out.printf("<td><a href='detail?no=%d'>%s</a></td>\n", m.getNo(), m.getTitle());
out.printf("<td>%s</td>\n", m.getStartDate());
out.printf("<td>%s</td>\n", m.getEndDate());
out.printf("<td>%s</td>\n", m.getQuantity());
out.printf("<td>%s</td>\n", m.getPrice());
out.printf("<td>%s</td>\n", m.getThrs());
out.println("</tr>");
}
out.println("</tbody>");
out.println("</table>");
} catch (Exception e) {
req.setAttribute("error", e); // ServletRequest 보관소에 오류 정보를 보관한다.
rd = req.getRequestDispatcher("/error");
rd.forward(req, res);
return;
}
// including 기법을 사용하여 각 페이지마다 꼬리말을 붙인다.
rd = req.getRequestDispatcher("/footer");
rd.include(req, res);
out.println("</body>");
out.println("</html>");
}
}
|
[
"kshopzoa15@gmail.com"
] |
kshopzoa15@gmail.com
|
196a8bd31a3fc99896673e5249bd19f79fe76fd9
|
8043e3dd2dbe84a048cd4011873896eb887706b4
|
/src/test/java/acceptancetests/versionone/BestHandIsPairInFiveCardHandTest.java
|
1ffff0f7c589eec92593d744d6f1132aaf143bc2
|
[] |
no_license
|
hanfak/poker-game
|
60a89a741aef17f2ac5db5a7b6c6c5598f3a7dac
|
ce2b79ded67e904095a43fe9658bb36035d05a9d
|
refs/heads/master
| 2021-04-28T21:13:12.843391
| 2018-09-15T07:00:27
| 2018-09-15T07:00:27
| 121,946,482
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,293
|
java
|
package acceptancetests.versionone;
import com.googlecode.yatspec.junit.SpecRunner;
import com.googlecode.yatspec.state.givenwhenthen.TestState;
import com.hanfak.domain.cards.Card;
import com.hanfak.domain.deck.CardDealer;
import com.hanfak.domain.deck.DealtCards;
import com.hanfak.domain.game.Player;
import com.hanfak.domain.game.PlayerResult;
import com.hanfak.wiring.PokerGame;
import org.assertj.core.api.WithAssertions;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mockito;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
import static com.hanfak.domain.game.Player.player;
import static testinfrastructure.HandsExamples.*;
@RunWith(SpecRunner.class)
public class BestHandIsPairInFiveCardHandTest extends TestState implements WithAssertions {
@Test
public void playerWinsWithABetterHand() throws Exception {
givenADeckDealsOutASetOfRandomCardsWithAHighCardToPlayerOne();
andADeckDealsOutASetOfRandomCardsWithAPairToPlayerTwo();
whenAGameOfOneHandWithFiveCardsIsPlayedBetweenTwoPlayers();
andPlayerOneHasLost();
andPlayerTwoHasWon();
}
@Test
public void highestPairWins() throws Exception {
givenADeckDealsOutASetOfRandomCardsWithALowestPairToPlayerOne();
andADeckDealsOutASetOfRandomCardsWithAHighestPairToPlayerTwo();
whenAGameOfOneHandWithFiveCardsIsPlayedBetweenTwoPlayers();
andPlayerOneHasLost();
andPlayerTwoHasWon();
}
@Test
public void playerWinsWithHigherKicker() throws Exception {
givenADeckDealsOutASetOfRandomCardsWithAPairToPlayerOne();
andADeckDealsOutASetOfRandomCardsWithAPairToPlayerTwo();
whenAGameOfOneHandWithFiveCardsIsPlayedBetweenTwoPlayers();
andPlayerOneHasLost();
andPlayerTwoHasWon();
}
@Test
public void playersDrawIfBothHaveTheSameHandWithAPair() throws Exception {
givenBothPlayersAreDealtAHandWithMatchingPair();
whenAGameOfOneHandWithFiveCardsIsPlayedBetweenTwoPlayers();
thenPlayerOneHasDrawn();
andPlayerTwoHasDrawn();
}
private void givenADeckDealsOutASetOfRandomCardsWithAPairToPlayerOne() {
org.mockito.Mockito.when(cardDealer.dealHand(5)).thenReturn(new DealtCards(PLAYER_WITH_PAIR_CARDS_FIVE)).thenReturn(new DealtCards(PLAYER_WITH_PAIR_CARDS_ONE));
}
private void givenADeckDealsOutASetOfRandomCardsWithAHighCardToPlayerOne() {
org.mockito.Mockito.when(cardDealer.dealHand(5)).thenReturn(new DealtCards(PLAYER_WITH_HIGH_CARD_CARDS_FIVE)).thenReturn(new DealtCards(PLAYER_WITH_PAIR_CARDS_ONE));
}
private void givenADeckDealsOutASetOfRandomCardsWithALowestPairToPlayerOne() {
org.mockito.Mockito.when(cardDealer.dealHand(5)).thenReturn(new DealtCards(PLAYER_WITH_PAIR_CARDS_TWO)).thenReturn(new DealtCards(PLAYER_WITH_PAIR_CARDS_THREE));
}
private void andADeckDealsOutASetOfRandomCardsWithAHighestPairToPlayerTwo() {
}
private void givenBothPlayersAreDealtAHandWithMatchingPair() {
org.mockito.Mockito.when(cardDealer.dealHand(5)).thenReturn(new DealtCards(PLAYER_WITH_PAIR_CARDS_THREE)).thenReturn(new DealtCards(PLAYER_WITH_PAIR_CARDS_FOUR));
testState().interestingGivens.add("Player One Hand", PLAYER_WITH_HIGH_CARD_CARDS_SEVEN.stream().map(Card::toString).collect(Collectors.joining(", ")));
testState().interestingGivens.add("Player Two Hand", PLAYER_WITH_HIGH_CARD_CARDS_SIX.stream().map(Card::toString).collect(Collectors.joining(", ")));
}
private void andADeckDealsOutASetOfRandomCardsWithAPairToPlayerTwo() {
// TODO add interesting givens
}
private void whenAGameOfOneHandWithFiveCardsIsPlayedBetweenTwoPlayers() {
play = pokerGame.play(cardDealer, playerOne, playerTwo);
}
@SuppressWarnings("ConstantConditions")
private void andPlayerOneHasLost() {
Optional<PlayerResult> first = play.stream().filter(playerResult -> "Player One".equals(playerResult.playerName)).findFirst();
assertThat(first.get().result).isEqualTo(2);
assertThat(first.get().playerName).isEqualTo("Player One");
}
@SuppressWarnings("ConstantConditions")
private void andPlayerTwoHasWon() {
Optional<PlayerResult> first = play.stream().filter(playerResult -> "Player Two".equals(playerResult.playerName)).findFirst();
assertThat(first.get().result).isEqualTo(1);
assertThat(first.get().playerName).isEqualTo("Player Two");
}
private void andPlayerTwoHasDrawn() {
Integer result = play.get(1).result;
assertThat(result).isEqualTo(1);
}
private void thenPlayerOneHasDrawn() {
Integer result = play.get(0).result;
assertThat(result).isEqualTo(1);
}
private static final String VERSION = "1.0";
private static final Player playerTwo = player("Player Two");
private static final Player playerOne = player("Player One");
private final CardDealer cardDealer = Mockito.mock(CardDealer.class); // TODO use a stub
private List<PlayerResult> play;
private PokerGame pokerGame;
@Before
public void setUp() throws Exception {
pokerGame = new PokerGame(VERSION);
}
}
|
[
"fakira.work@gmail.com"
] |
fakira.work@gmail.com
|
30444e42e5ea6fd617d2d003ec24f07e58bd519c
|
82f360d463e2383e6efa4def1881b8b28e09d396
|
/myCodes/tzsc/src/main/java/com/shlanbao/tzsc/wct/ctm/machine/controller/WctCostManagerController.java
|
dc41ca1a764beb6152f746b084815651f00b0267
|
[] |
no_license
|
eseawind/ProjectResource
|
09a0c429acc791ea6dd917c2c04ea163dfe7013e
|
90cd01635241e27ac918afcf3a86a2117c652651
|
refs/heads/master
| 2020-06-13T04:39:23.685213
| 2017-07-18T01:39:05
| 2017-07-18T01:39:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,563
|
java
|
package com.shlanbao.tzsc.wct.ctm.machine.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.shlanbao.tzsc.base.controller.BaseController;
import com.shlanbao.tzsc.pms.cos.maintain.service.MaintainServiceI;
import com.shlanbao.tzsc.utils.tools.StringUtil;
import com.shlanbao.tzsc.wct.ctm.machine.beans.CostManager;
import com.shlanbao.tzsc.wct.ctm.machine.service.WctCostManagerServiceI;
import com.shlanbao.tzsc.wct.sch.stat.beans.EqpRuntime;
/**
* @ClassName: WctCostManager
* @Description: 成本管理 实时成本
* @author luo
* @date 2015年1月27日 上午9:26:33
*
*/
@Controller
@RequestMapping("/wct/costs")
public class WctCostManagerController extends BaseController{
@Autowired
public WctCostManagerServiceI wctCostManagerService;
@Autowired
public MaintainServiceI maintainService;
/**
* 初始化机台实时消耗页面
* @author luo
* @create 2015年1月27日11:05:07
* @return
*/
@RequestMapping("/getRollerInputData")
@ResponseBody
public CostManager getRollerInputData(String ecode,String orderNumber){
if(!StringUtil.notNull(ecode)){
log.error(this.getClass().getName()+"获取设备code失败");
}
return wctCostManagerService.getDataSource(Integer.parseInt(ecode), orderNumber);
//return new CostManager(ecode, MathUtil.getRandomDouble(1, 2, 2), MathUtil.getRandomDouble(3000,3100, 2), MathUtil.getRandomDouble(2, 4, 2), MathUtil.getRandomDouble(1, 2, 2));
}
/**
* 初始化初始化机台实时产量页面
* @author luo
* @create 2015年1月28日13:39:42
* @param type 工单类型编号
* @return
*/
@RequestMapping("/initOutDataPage")
@ResponseBody
public EqpRuntime initOutDataPage(String ecode){
try {
List<EqpRuntime> list=wctCostManagerService.initOutDataPage(ecode);
return list.get(0);
} catch (Exception e) {
super.setMessage("实例化机组信息异常");
log.error(super.message, e);
}
return null;
}
/**
* 初始化机台实时消耗页面
* @author Leejean
* @create 2014年12月19日下午4:24:44
* @return
*/
@RequestMapping("/initEquipmentRollerInput")
@ResponseBody
public CostManager initEquipmentRollerInput(String ecode) throws Exception {
return wctCostManagerService.initEqpInputInfos(ecode);
}
}
|
[
"htohoot@163.com"
] |
htohoot@163.com
|
e46208ecb3c91e70999096809f829a0826695952
|
80eabbe616cfddde19a1969638163fdea1cfac4f
|
/PBO/src/titik/Segitiga.java
|
67f2542cb08770e3f28ad5a2339a36dbe0c39cfc
|
[] |
no_license
|
145314042/myProject
|
fc2630fb5623044f01f3aa13e687efdec775778b
|
a3143200d49e810fc275fe72a8948b196a52364e
|
refs/heads/master
| 2021-01-13T03:33:31.705379
| 2017-07-03T15:31:46
| 2017-07-03T15:31:46
| 77,520,763
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,607
|
java
|
/*
* 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 titik;
/**
*
* @author Kirizu
*/
public class Segitiga {
Titik titik1;
Titik titik2;
Titik titik3;
public Segitiga(Titik titik1, Titik titik2, Titik titik3) {
this.titik1 = titik1;
this.titik2 = titik2;
this.titik3 = titik3;
}
// Hitung panjang sisi
public double hitungSisi(Titik titika, Titik titikb){
return Math.sqrt( Math.pow(titika.getX()-titikb.getX(),2) +
Math.pow(titika.getY()-titikb.getY(),2));
}
// Hitung keliling segitiga
public double hitungKeliling(){
return hitungSisi(getTitik1(), getTitik2())+
hitungSisi(getTitik2(), getTitik3())+
hitungSisi(getTitik3(), getTitik1());
}
// Hitung luas segitiga
public double hitungLuas(){
double s = hitungKeliling()/2;
return Math.sqrt(s * (s-hitungSisi(getTitik1(), getTitik2())) *
(s-hitungSisi(getTitik2(), getTitik3())) *
(s-hitungSisi(getTitik3(), getTitik1())));
}
/**
* @return the titik1
*/
public Titik getTitik1() {
return titik1;
}
/**
* @return the titik2
*/
public Titik getTitik2() {
return titik2;
}
/**
* @return the titik3
*/
public Titik getTitik3() {
return titik3;
}
}
|
[
"Lycorice@Lycorice-PC"
] |
Lycorice@Lycorice-PC
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.