blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 4
410
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
51
| license_type
stringclasses 2
values | repo_name
stringlengths 5
132
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringlengths 4
80
| visit_date
timestamp[us] | revision_date
timestamp[us] | committer_date
timestamp[us] | github_id
int64 5.85k
689M
⌀ | star_events_count
int64 0
209k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 22
values | gha_event_created_at
timestamp[us] | gha_created_at
timestamp[us] | gha_language
stringclasses 131
values | src_encoding
stringclasses 34
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 3
9.45M
| extension
stringclasses 32
values | content
stringlengths 3
9.45M
| authors
listlengths 1
1
| author_id
stringlengths 0
313
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e40802d51904671819a2af6fb921cb1656640c7a
|
d3594d8ca77b836972cad76bf9a241b045fe77ea
|
/Java-old/5427 - 불.java
|
63c8667907ca42f3a72c94c9238ca5d3e86614b8
|
[] |
no_license
|
jooy311/baekjoon
|
c2b81855e3a572f40dff7c6e1bd8e65c77c467e0
|
86c3cc0f0c761e2a1291d7238b3bd0a8d1a734f1
|
refs/heads/master
| 2022-02-24T03:23:28.878614
| 2022-02-03T06:30:32
| 2022-02-03T06:30:32
| 242,516,313
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,241
|
java
|
import java.util.*;
import java.io.*;
class Pair {
int x;
int y;
public Pair(int x, int y) {
this.x = x;
this.y = y;
}
}
public class solution2 {
static int[] dx = { -1, 1, 0, 0 };
static int[] dy = { 0, 0, -1, 1 };
static int w, h;
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st;
st = new StringTokenizer(br.readLine());
int t = Integer.parseInt(st.nextToken());
while (t-- > 0) {
st = new StringTokenizer(br.readLine());
w = Integer.parseInt(st.nextToken());
h = Integer.parseInt(st.nextToken());
String[][] str = new String[h][w];
int[][] dist = new int[h][w];
int[][] time = new int[h][w];
Queue<Pair> q = new LinkedList<Pair>(); // 상근이의 위치
Queue<Pair> fire = new LinkedList<Pair>();
boolean[][] check = new boolean[h][w];
boolean[][] visited = new boolean[h][w];
// 판을 입력 받는다
for (int i = 0; i < h; i++) {
st = new StringTokenizer(br.readLine());
str[i] = st.nextToken().split("");
}
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
dist[i][j] = 0;
time[i][j] = 0;
}
}
// 초기 셋팅
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
if (str[i][j].equals("@")) {
q.add(new Pair(i, j));// 상근이의 시작위치를 받는다
}
if (str[i][j].equals("#")) {
check[i][j] = true;
visited[i][j] = true;
}
if (str[i][j].equals("*")) {
fire.add(new Pair(i, j));
visited[i][j] = true;
}
}
}
moving_fire(fire, str, check, dist);
int ans = moving(q,str, dist, time, visited);
if(ans >=0 )// 탈출구를 찾았을 때
System.out.println(ans+1);
else if(ans == -1)
System.out.println("IMPOSSIBLE");
}
}
public static void moving_fire(Queue<Pair> fire, String[][] str, boolean[][] check, int[][] dist) {
while (!fire.isEmpty()) {
Pair p = fire.poll();
int x = p.x;
int y = p.y;
check[x][y] = true;
for (int k = 0; k < 4; k++) {//System.out.println(x + " " + y);
int nx = x + dx[k];
int ny = y + dy[k];
if (nx >= 0 && ny >= 0 && nx < h && ny < w) {
if (check[nx][ny] == false && dist[nx][ny] == 0 && !str[nx][ny].equals("*")) {
check[nx][ny] = true;
dist[nx][ny] = dist[x][y] + 1;
fire.add(new Pair(nx, ny));
}
}
}
}
}
public static int moving(Queue<Pair> q, String[][] str, int[][] dist, int[][] time, boolean[][] visited) {
while (!q.isEmpty()) {
Pair p = q.poll();
int x = p.x;
int y = p.y;
if(x == 0 || x == h-1 || y == 0 || y == w-1) {
return time[x][y];
}
visited[x][y] = true;
for (int k = 0; k < 4; k++) {
int nx = x + dx[k];
int ny = y + dy[k];
if (nx >= 0 && ny >= 0 && nx < h && ny < w) {
if (visited[nx][ny] == false && dist[nx][ny] > time[x][y]+1) {
visited[nx][ny] = true;
time[nx][ny] = time[x][y] +1;
q.add(new Pair(nx, ny));
}else if( visited[nx][ny] == false && dist[nx][ny] == 0) {
visited[nx][ny] = true;
time[nx][ny] = time[x][y] +1;
q.add(new Pair(nx, ny));
}
}
}
}
return -1;
}
}
|
[
"noreply@github.com"
] |
jooy311.noreply@github.com
|
6633f277807db9e3b22d5b0605cd9dd4d16cd443
|
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
|
/java/j2objc/2015/8/LambdaExpressionTest.java
|
577b86ead34aac03023c5d06efe839f8a761d301
|
[] |
no_license
|
rosoareslv/SED99
|
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
|
a062c118f12b93172e31e8ca115ce3f871b64461
|
refs/heads/main
| 2023-02-22T21:59:02.703005
| 2021-01-28T19:40:51
| 2021-01-28T19:40:51
| 306,497,459
| 1
| 1
| null | 2020-11-24T20:56:18
| 2020-10-23T01:18:07
| null |
UTF-8
|
Java
| false
| false
| 8,529
|
java
|
/*
* 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.devtools.j2objc.ast;
import com.google.devtools.j2objc.GenerationTest;
import com.google.devtools.j2objc.Options;
import com.google.devtools.j2objc.util.FileUtil;
import java.io.IOException;
/**
* Unit tests for {@link LambdaExpression}.
*
* @author Seth Kirby
*/
public class LambdaExpressionTest extends GenerationTest {
@Override
protected void setUp() throws IOException {
tempDir = FileUtil.createTempDir("testout");
Options.load(new String[] { "-d", tempDir.getAbsolutePath(), "-sourcepath",
tempDir.getAbsolutePath(), "-q", // Suppress console output.
"-encoding", "UTF-8", // Translate strings correctly when encodings are nonstandard.
"-source", "8", // Treat as Java 8 source.
"-Xforce-incomplete-java8" // Internal flag to force Java 8 support.
});
parser = GenerationTest.initializeParser(tempDir);
}
private String functionHeader = "interface Function<T, R> { R apply(T t); }";
private String callableHeader = "interface Callable<R> { R call(); }";
private String fourToOneHeader = "interface FourToOne<F, G, H, I, R> {"
+ " R apply(F f, G g, H h, I i); }";
// Test the creation of explicit blocks for lambdas with expression bodies.
public void testBlockBodyCreation() throws IOException {
String translation = translateSourceFile(functionHeader + "class Test { Function f = x -> x;}",
"Test", "Test.m");
assertTranslatedLines(translation, "id x){", "return x;");
}
public void testCaptureDetection() throws IOException {
String nonCaptureTranslation = translateSourceFile(
functionHeader + "class Test { Function f = x -> x;}", "Test", "Test.m");
String nonCaptureTranslationOuter = translateSourceFile(
functionHeader + "class Test { int y; Function f = x -> y;}", "Test", "Test.m");
String captureTranslation = translateSourceFile(
functionHeader + "class Test { Function<Function, Function> f = y -> x -> y;}", "Test",
"Test.m");
assertTranslation(nonCaptureTranslation, "GetNonCapturingLambda");
assertTranslation(nonCaptureTranslationOuter, "GetNonCapturingLambda");
assertTranslatedSegments(captureTranslation, "GetNonCapturingLambda", "GetCapturingLambda");
}
public void testObjectSelfAddition() throws IOException {
String translation = translateSourceFile(callableHeader + "class Test { Callable f = () -> 1;}",
"Test", "Test.m");
assertTranslation(translation, "^id(id _self)");
}
public void testTypeInference() throws IOException {
String quadObjectTranslation = translateSourceFile(
fourToOneHeader + "class Test { FourToOne f = (a, b, c, d) -> 1;}", "Test", "Test.m");
assertTranslatedSegments(quadObjectTranslation, "@selector(applyWithId:withId:withId:withId:)",
"^id(id _self, id a, id b, id c, id d)");
String mixedObjectTranslation = translateSourceFile(fourToOneHeader
+ "class Test { FourToOne<String, Double, Integer, Boolean, String> f = "
+ "(a, b, c, d) -> \"1\";}", "Test", "Test.m");
assertTranslation(mixedObjectTranslation,
"^NSString *(id _self, NSString * a, JavaLangDouble * b, JavaLangInteger * c, JavaLangBoolean * d)");
}
public void testOuterFunctions() throws IOException {
String translation = translateSourceFile(
functionHeader + "class Test { Function outerF = (x) -> x;}", "Test", "Test.m");
assertTranslation(translation, "JreStrongAssign(&self->outerF_, GetNonCapturingLambda");
}
public void testStaticFunctions() throws IOException {
String translation = translateSourceFile(
functionHeader + "class Test { static Function staticF = (x) -> x;}", "Test", "Test.m");
assertTranslatedSegments(translation, "id<Function> Test_staticF_;",
"if (self == [Test class]) {", "JreStrongAssign(&Test_staticF_, GetNonCapturingLambda");
}
public void testNestedLambdas() throws IOException {
String outerCapture = translateSourceFile(functionHeader
+ "class Test { Function<String, Function<String, String>> f = x -> y -> x;}", "Test",
"Test.m");
assertTranslatedSegments(outerCapture, "GetNonCapturingLambda", "@selector(applyWithId:)",
"^id<Function>(id _self, NSString * x)", "return GetCapturingLambda",
"@selector(applyWithId:)", "^NSString *(id _self, NSString * y)", "return x;");
String noCapture = translateSourceFile(functionHeader
+ "class Test { Function<String, Function<String, String>> f = x -> y -> y;}", "Test",
"Test.m");
assertTranslatedSegments(noCapture, "GetNonCapturingLambda",
"@selector(applyWithId:)", "^id<Function>(id _self, NSString * x)",
"return GetNonCapturingLambda", "@selector(applyWithId:)",
"^NSString *(id _self, NSString * y)", "return y;");
}
// Test that we are properly adding protocols for casting.
public void testProtocolCast() throws IOException {
String translation = translateSourceFile(
functionHeader + "class Test { Function f = (Function) (x) -> x;}", "Test", "Test.m");
assertTranslatedSegments(translation,
"(id<Function>) check_protocol_cast(GetNonCapturingLambda(@protocol(Function), ",
"Function_class_()");
}
// Test that we aren't trying to import lambda types.
public void testImportExclusion() throws IOException {
String translation = translateSourceFile(
functionHeader + "class Test { Function f = (Function) (x) -> x;}", "Test", "Test.m");
assertNotInTranslation(translation, "lambda$0.h");
}
// Check that lambdas are uniquely named.
public void testLambdaUniquify() throws IOException {
String translation = translateSourceFile(functionHeader
+ "class Test { class Foo{ class Bar { Function f = x -> x; }}\n"
+ "Function f = x -> x;}",
"Test", "Test.m");
assertTranslatedSegments(translation, "@\"Test_lambda$", "@\"Test_Foo_Bar_lambda");
}
public void testLargeArgumentCount() throws IOException {
String interfaceHeader = "interface TooManyArgs<T> { T f(T a, T b, T c, T d, T e, T f, T g,"
+ " T h, T i, T j, T k, T l, T m, T n, T o, T p, T q, T r, T s, T t, T u, T v, T w, T x,"
+ " T y, T z, T aa, T ab, T ac, T ad, T ae, T af, T ag, T ah, T ai, T aj, T ak, T al,"
+ " T am, T an, T ao, T ap, T aq, T ar, T as, T at, T au, T av, T aw, T ax, T ay, T az,"
+ " T ba, T bb, T bc, T bd, T be, T bf, T bg, T bh, T bi, T bj, T bk, T bl, T bm, T bn,"
+ " T bo, T bp, T bq, T br, T bs, T bt, T bu, T bv, T bw, T bx, T by, T bz, T foo);}";
String translation = translateSourceFile(interfaceHeader + "class Test { void a() {"
+ "Object foo = \"Foo\";"
+ "TooManyArgs fun = (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w,"
+ " x, y, z, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am, an, ao, ap, aq, ar, as,"
+ " at, au, av, aw, ax, ay, az, ba, bb, bc, bd, be, bf, bg, bh, bi, bj, bk, bl, bm, bn,"
+ " bo, bp, bq, br, bs, bt, bu, bv, bw, bx, by, bz, bar) -> foo;}}",
"Test", "Test.m");
assertTranslatedSegments(translation, "^id(id _self, id a, id b, id c, id d, id e, id f, id g,",
" id bs, id bt, id bu, id bv, id bw, id bx, id by, id bz, id ca)",
"return block(_self, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, ",
"bn, bo, bp, bq, br, bs, bt, bu, bv, bw, bx, by, bz, ca);",
"^id(id _self, id a, id b, id c, id d, id e, id f, id g, id h, id i, id j, id k, id l, ",
"id bw, id bx, id by, id bz, id bar){");
}
public void testCapturingBasicTypeReturn() throws IOException {
String header = "interface I { int foo(); }";
String translation = translateSourceFile(
header + "class Test { int f = 1234; " + " void foo() { I i = () -> f; } }", "Test",
"Test.m");
assertTranslatedLines(translation, "^jint(id _self){", "return f_;");
}
}
|
[
"rodrigosoaresilva@gmail.com"
] |
rodrigosoaresilva@gmail.com
|
97634c1490f4ed02518cb4dc19d43660100f2466
|
0dbd987d03145e5864e2031d3523dab013102031
|
/JessevanAssen/src/org/uva/sea/ql/ast/expression/value/Bool.java
|
313ff6aac7a3c49fe9bb52bef3bce90c35b8fa38
|
[] |
no_license
|
slvrookie/sea-of-ql
|
52041a99159327925e586389a9c60c4d708c95f2
|
1c41ce46ab1e2c5de124f425d2e0e3987d1b6a32
|
refs/heads/master
| 2021-01-16T20:47:40.370047
| 2013-07-15T11:26:56
| 2013-07-15T11:26:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,305
|
java
|
package org.uva.sea.ql.ast.expression.value;
import org.uva.sea.ql.ast.expression.ExpressionVisitor;
public class Bool implements Value {
private final boolean value;
public Bool(boolean value) {
this.value = value;
}
public boolean getValue() {
return value;
}
public Bool isEqualTo(Bool other) {
return new Bool(getValue() == other.getValue());
}
public Bool isNotEqualTo(Bool other) {
return isEqualTo(other).not();
}
public Bool and(Bool other) {
return new Bool(getValue() && other.getValue());
}
public Bool or(Bool other) {
return new Bool(getValue() || other.getValue());
}
public Bool not() {
return new Bool(!getValue());
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
return getValue() == ((Bool)o).getValue();
}
@Override
public int hashCode() {
return value ? 1 : 0;
}
@Override
public String toString() {
return Boolean.toString(value);
}
@Override
public <ReturnType, ParameterType> ReturnType accept(ExpressionVisitor<ReturnType, ParameterType> visitor, ParameterType param) {
return visitor.visit(this, param);
}
}
|
[
"jesse.v.assen@gmail.com"
] |
jesse.v.assen@gmail.com
|
497b4b0fbaf6dcecf416bd7c6f4bd5dce89eac7a
|
efcc6f5ba701c0771b3e0714210e0f3a0bcfc5c6
|
/src/test/java/org/reaktivity/nukleus/http/internal/util/BufferUtilTest.java
|
a69853dd0d8e6ef501a5531d1a88a31fed6a7d06
|
[
"Apache-2.0"
] |
permissive
|
cmebarrow/nukleus-http.java
|
ba40e38be6b841418ff97e7ec6e35640c154bead
|
56f3b80b52f4b9bed9b7ebf3549f506e5e1f8e9c
|
refs/heads/develop
| 2021-01-17T04:31:33.624737
| 2018-08-23T18:19:13
| 2018-08-23T18:19:13
| 82,972,579
| 0
| 0
| null | 2017-02-23T21:21:14
| 2017-02-23T21:21:14
| null |
UTF-8
|
Java
| false
| false
| 4,368
|
java
|
/**
* Copyright 2016-2017 The Reaktivity Project
*
* The Reaktivity Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a 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.reaktivity.nukleus.http.internal.util;
import static java.nio.charset.StandardCharsets.US_ASCII;
import static org.junit.Assert.assertEquals;
import org.agrona.DirectBuffer;
import org.agrona.concurrent.UnsafeBuffer;
import org.junit.Test;
public class BufferUtilTest
{
private static final byte[] CRLFCRLF = "\r\n\r\n".getBytes(US_ASCII);
@Test
public void shouldLocateLimitWhenValueAtEndBuffer()
{
DirectBuffer buffer2 = new UnsafeBuffer("a nice warm cookie cutter".getBytes(US_ASCII));
assertEquals(buffer2.capacity(), BufferUtil.limitOfBytes(buffer2, 0, buffer2.capacity(), "cutter".getBytes()));
}
@Test
public void shouldLocateLimitWhenValueInsideBuffer()
{
DirectBuffer buffer2 = new UnsafeBuffer("a nice warm cookie cutter".getBytes(US_ASCII));
assertEquals("a nice".length(), BufferUtil.limitOfBytes(buffer2, 0, buffer2.capacity(), "nice".getBytes()));
}
@Test
public void shouldReportLimitMinusOneWhenValueNotFound()
{
DirectBuffer buffer2 = new UnsafeBuffer("a nice warm cookie cutter".getBytes(US_ASCII));
assertEquals(-1, BufferUtil.limitOfBytes(buffer2, 0, buffer2.capacity(), "cutlass".getBytes()));
}
@Test
public void shouldReportLimitMinusOneWhenValueLongerThanBuffer()
{
DirectBuffer buffer2 = new UnsafeBuffer("a nice warm cookie cutter".getBytes(US_ASCII));
assertEquals(-1, BufferUtil.limitOfBytes(buffer2, 0, buffer2.capacity(),
"a nice warm cookie cutter indeed".getBytes()));
}
@Test
public void shouldLocateLimitWhenValueInSecondBuffer()
{
DirectBuffer buffer1 = new UnsafeBuffer("".getBytes(US_ASCII));
DirectBuffer buffer2 = new UnsafeBuffer("get / HTTP/1.1\r\n\r\n".getBytes(US_ASCII));
assertEquals(buffer2.capacity(), BufferUtil.limitOfBytes(buffer1, 0, 0, buffer2, 0, buffer2.capacity(), CRLFCRLF));
}
@Test
public void shouldLocateFragmentedValueAtPosition1()
{
DirectBuffer buffer1 = new UnsafeBuffer("...\r\n\r".getBytes(US_ASCII));
DirectBuffer buffer2 = new UnsafeBuffer("\n....".getBytes(US_ASCII));
assertEquals(1, BufferUtil.limitOfBytes(buffer1, 3, 6, buffer2, 0, buffer2.capacity(), CRLFCRLF));
}
@Test
public void shouldLocateFragmentedValueAtPosition2()
{
DirectBuffer buffer1 = new UnsafeBuffer(".\r\n".getBytes(US_ASCII));
DirectBuffer buffer2 = new UnsafeBuffer("\r\n....".getBytes(US_ASCII));
assertEquals(2, BufferUtil.limitOfBytes(buffer1, 0, 3, buffer2, 0, buffer2.capacity(), CRLFCRLF));
}
@Test
public void shouldLocateFragmentedValueAtPosition3()
{
DirectBuffer buffer1 = new UnsafeBuffer("..\r".getBytes(US_ASCII));
DirectBuffer buffer2 = new UnsafeBuffer("\n\r\n....".getBytes(US_ASCII));
assertEquals(3, BufferUtil.limitOfBytes(buffer1, 0, 3, buffer2, 0, buffer2.capacity(), CRLFCRLF));
}
@Test
public void shouldLocateFragmentedValueAtPosition4()
{
DirectBuffer buffer1 = new UnsafeBuffer("...".getBytes(US_ASCII));
DirectBuffer buffer2 = new UnsafeBuffer("\r\n\r\n....".getBytes(US_ASCII));
assertEquals(4, BufferUtil.limitOfBytes(buffer1, 0, 3, buffer2, 0, buffer2.capacity(), CRLFCRLF));
}
@Test(expected=IllegalArgumentException.class)
public void shouldRejectValueWhollyInFragment()
{
DirectBuffer buffer1 = new UnsafeBuffer("\r\n\r\n".getBytes(US_ASCII));
DirectBuffer buffer2 = new UnsafeBuffer("...\r\n\r\n....".getBytes(US_ASCII));
assertEquals(4, BufferUtil.limitOfBytes(buffer1, 0, 4, buffer2, 0, buffer2.capacity(), CRLFCRLF));
}
}
|
[
"chris.barrow@kaazing.com"
] |
chris.barrow@kaazing.com
|
c06dcab0244660eb7e0dccdb4a7aae5903895f4e
|
596d59292b2355e93f57c1d55f107664adda4e10
|
/app/src/main/java/com/rackluxury/lamborghini/activities/FavItemCategories.java
|
b1870df97c9c683c60192524d821578b7cd44932
|
[] |
no_license
|
HarshAProgrammer/Lamborghini
|
25dd82af51f29c4d2c4fa4a90c651c3a59b57434
|
6e2a4eda873a376f2d05b74048d7f2e8ea227811
|
refs/heads/master
| 2023-08-01T03:33:05.151537
| 2021-09-13T16:26:58
| 2021-09-13T16:26:58
| 405,989,932
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 872
|
java
|
package com.rackluxury.lamborghini.activities;
public class FavItemCategories {
private String item_title;
private String key_id;
private int item_image;
public FavItemCategories() {
}
public FavItemCategories(String item_title, String key_id, int item_image) {
this.item_title = item_title;
this.key_id = key_id;
this.item_image = item_image;
}
public String getItem_title() {
return item_title;
}
public void setItem_title(String item_title) {
this.item_title = item_title;
}
public String getKey_id() {
return key_id;
}
public void setKey_id(String key_id) {
this.key_id = key_id;
}
public int getItem_image() {
return item_image;
}
public void setItem_image(int item_image) {
this.item_image = item_image;
}
}
|
[
"App.Lavishly@Gmail.com"
] |
App.Lavishly@Gmail.com
|
ceb05cb3878a71b4566efb10b7725a46c282e922
|
1ad16febb04ae5541b01a377c0a37682d2966d30
|
/src/main/java/lt/vu/entities/Footballer.java
|
b82ddeeed9ba248431ccac8fe0595369ec3a3da4
|
[] |
no_license
|
faskalis11/JavaEEfootball
|
564e75ecc9a853abce348e10d19dfa1182762210
|
46281fa55faaac216ad3fe48819e5361fd2a7cac
|
refs/heads/master
| 2022-03-25T11:02:57.334574
| 2017-06-05T17:00:49
| 2017-06-05T17:00:49
| 93,427,191
| 0
| 0
| null | 2022-02-22T09:35:36
| 2017-06-05T16:59:29
|
Java
|
UTF-8
|
Java
| false
| false
| 1,246
|
java
|
package lt.vu.entities;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
@Getter
@Setter
@Entity
@NamedQueries({
@NamedQuery(name = "Footballer.findAll", query = "SELECT u FROM Footballer u"),
@NamedQuery(name = "Footballer.findTeam", query = "SELECT u FROM Footballer u WHERE u.team = :team"),
@NamedQuery(name = "Footballer.findById", query = "SELECT f FROM Footballer f WHERE f.idf = :id"),
})
@Table(name = "footballer")
public class Footballer {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "idf")
private int idf;
@Size(max = 20)
@NotNull
@Column(name = "name")
private String name;
@Column(name = "number")
private int number;
@Column(name = "salary")
private int salary;
@Column(name = "bonus")
private int bonus = 0;
@Column(name = "goals")
private int goals;
@Column(name = "assist")
private int assists;
@JoinColumn(name = "team", referencedColumnName = "id")
@ManyToOne
private Team team;
@Version
@Column(name = "OPT_LOCK_VERSION")
private Integer optLockVersion;
}
|
[
"ignasjankauskas9@gmail.com"
] |
ignasjankauskas9@gmail.com
|
c85a876279ab2f06547fda0e5663e8aac1530b1d
|
62bbd2ceeb59fc713e610133f37e5fee7271e91b
|
/src/main/java/ua/goit/timonov/enterprise/module_9/web/OrderServiceController.java
|
489c4d93f8a0b93e6b2cd45933c469ee941b3342
|
[] |
no_license
|
alextimonov/GoJavaEnterprise
|
7f4408cc5ad65f1c699cf8193b2098ef4d8d3502
|
56dc584ad5e3ae00933b9e96d46fa79d57756e0a
|
refs/heads/master
| 2021-01-23T14:05:07.584488
| 2016-09-23T21:17:35
| 2016-09-23T21:17:35
| 59,581,892
| 0
| 1
| null | 2016-09-23T22:10:50
| 2016-05-24T14:47:25
|
Java
|
UTF-8
|
Java
| false
| false
| 3,255
|
java
|
package ua.goit.timonov.enterprise.module_9.web;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.propertyeditors.CustomDateEditor;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import ua.goit.timonov.enterprise.module_6_2.model.Employee;
import ua.goit.timonov.enterprise.module_9.service.EmployeeService;
import ua.goit.timonov.enterprise.module_9.service.OrderService;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.Map;
/**
* Created by Alex on 17.09.2016.
*/
@Controller
@RequestMapping("/service/order")
public class OrderServiceController {
public static final String ITEMS = "orders";
public static final String PATH_ORDERS = "service/order/orders";
private OrderService orderService;
private EmployeeService employeeService;
@Autowired
public void setOrderService(OrderService orderService) {
this.orderService = orderService;
}
@Autowired
public void setEmployeeService(EmployeeService employeeService) {
this.employeeService = employeeService;
}
@RequestMapping(value = "/orders", method = RequestMethod.GET)
public String getAllIngredients(Map<String, Object> model) {
model.put(ITEMS, orderService.getAllOrders());
return PATH_ORDERS;
}
// @RequestMapping(value = "/dishes", method = RequestMethod.GET)
// public String getOrderDishes(Map<String, Object> model, @RequestParam(value="order", required=true) Integer id) {
// Order order = orderService.getOrder(id);
// model.put("dishes", order.getDishes());
// return PATH_ORDERS;
// }
@RequestMapping(value = "/filterByDate", method = RequestMethod.GET)
public String filterByDate(Map<String, Object> model, @RequestParam(value="date", required=true) Date date) {
model.put(ITEMS, orderService.filterByDate(date));
return PATH_ORDERS;
}
@RequestMapping(value = "/filterByWaiter", method = RequestMethod.GET)
public String filterByName(Map<String, Object> model, @RequestParam(value="waiterName", required=true) String waiterName) {
Employee waiter = employeeService.getEmployeeByName(waiterName);
model.put(ITEMS, orderService.filterByWaiter(waiter));
return PATH_ORDERS;
}
@RequestMapping(value = "/filterByTableNumber", method = RequestMethod.GET)
public String filterByName(Map<String, Object> model, @RequestParam(value="tableNumber", required=true) Integer tableNumber) {
model.put(ITEMS, orderService.filterByTableNumber(tableNumber));
return PATH_ORDERS;
}
@InitBinder
public final void initBinderUsuariosFormValidator(final WebDataBinder binder, final Locale locale) {
final SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy", locale);
binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));
}
}
|
[
"timalex1206@gmail.com"
] |
timalex1206@gmail.com
|
7758c47df672e0d4eef177607187dcf2122feb79
|
a965262d4f33f01263f5050574bc6b1b397639b2
|
/plugin/applianceVm/src/main/java/org/zstack/appliancevm/ApplianceVmGlobalProperty.java
|
6e5864c856cf1dc21d97c44d5de41164999bad68
|
[
"Apache-2.0"
] |
permissive
|
mattyen/zstack
|
e2b4cff83e196c52636b958dd2dc3880e8a29225
|
515c5aa7cdba158d4f60daacd094bdf290422e5c
|
refs/heads/master
| 2021-01-21T18:34:53.347813
| 2015-12-08T06:53:41
| 2015-12-08T06:53:41
| 44,942,834
| 0
| 1
| null | 2015-10-26T03:09:55
| 2015-10-26T03:09:55
| null |
UTF-8
|
Java
| false
| false
| 983
|
java
|
package org.zstack.appliancevm;
import org.zstack.core.GlobalProperty;
import org.zstack.core.GlobalPropertyDefinition;
/**
*/
@GlobalPropertyDefinition
public class ApplianceVmGlobalProperty {
@GlobalProperty(name = "ApplianceVm.noRollbackOnPostFailure", defaultValue = "false")
public static boolean NO_ROLLBACK_ON_POST_FAILURE;
@GlobalProperty(name = "ApplianceVm.connectVerbose", defaultValue = "false")
public static boolean CONNECT_VERBOSE;
@GlobalProperty(name="ApplianceVm.agentPackageName", defaultValue = "appliancevm-0.9.tar.gz")
public static String AGENT_PACKAGE_NAME;
@GlobalProperty(name="ApplianceVm.agentPort", defaultValue = "7759")
public static int AGENT_PORT;
@GlobalProperty(name="ApplianceVm.agentUrlScheme", defaultValue = "http")
public static String AGENT_URL_SCHEME;
@GlobalProperty(name="ApplianceVm.agentUrlRootPath", defaultValue = "")
public static String AGENT_URL_ROOT_PATH;
}
|
[
"xing5820@gmail.com"
] |
xing5820@gmail.com
|
2baa304ecb1768307b17119282df4dc396b63ea6
|
0a68993d4dbb04c4555ad7ec4b922281718b1ff8
|
/app/src/main/java/com/ising99/intelligentremotecontrol/modules/MediaShare/MediaShareSectionDelegate.java
|
7c0e6503394b273840e8c2dd1ac949ef659ce3e3
|
[] |
no_license
|
qi-shun-wang/irc-android
|
85103b07c31a5c4eb6a49bddfd92ec7239dba77b
|
be7335ae4fb83c6cc37566479e7603cbbcb3c3b8
|
refs/heads/master
| 2021-01-14T17:40:57.540887
| 2018-08-19T04:30:00
| 2018-08-19T04:30:00
| 242,699,226
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 197
|
java
|
package com.ising99.intelligentremotecontrol.modules.MediaShare;
/**
* Created by shun on 2018/5/2.
* .
*/
public interface MediaShareSectionDelegate {
void didSelectedAt(int position);
}
|
[
"shun@bysocity.com"
] |
shun@bysocity.com
|
ba08be1453c7c13d39c6ee854685af5af55e1fec
|
4fbff1616bf8d0a8eec761de08c8009d48d89758
|
/src/main/java/com/apap/tu05/controller/PilotController.java
|
4c5613cfa0b781b1cfe432d33489bab18879af5f
|
[] |
no_license
|
ichsandyrizki/tutorial-05
|
72af823134b8fb4cbe9531d3d95786c424437b9c
|
27bd433131365b5ae9f17221bc0b694ea173d748
|
refs/heads/master
| 2021-02-06T11:55:31.413212
| 2020-03-03T13:19:33
| 2020-03-03T13:19:33
| 243,912,143
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,586
|
java
|
package com.apap.tu05.controller;
import com.apap.tu05.model.FlightModel;
import com.apap.tu05.model.PilotModel;
import com.apap.tu05.service.FlightService;
import com.apap.tu05.service.PilotService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@Controller
public class PilotController {
@Autowired
private PilotService pilotService;
@Autowired
private FlightService flightService;
@RequestMapping("/")
private String home(Model model){
List<PilotModel> pilotList = pilotService.findAllPilot();
model.addAttribute("pilotList", pilotList);
List<FlightModel> flightList = flightService.flightList();
model.addAttribute("flightList", flightList);
model.addAttribute("navTitle", "APAP");
return "home";
}
@RequestMapping(value = "/pilot/add", method = RequestMethod.GET)
private String add(Model model){
model.addAttribute("pilot", new PilotModel());
model.addAttribute("navTitle","Add Pilot");
return "addPilot";
}
@RequestMapping(value = "/pilot/add", method = RequestMethod.POST)
private String addPilotSubmit(@ModelAttribute PilotModel pilot, Model model){
pilotService.addPilot(pilot);
model.addAttribute("message", "Pilot Berhasil Ditambahkan!");
return "successPage";
}
/* @RequestMapping("/pilot/view")
private String view(@RequestParam(value = "licenseNumber") String licenseNumber, Model model){
PilotModel pilot = pilotService.getPilotDetailByLicenseNumber(licenseNumber);
if(pilot != null){
List<FlightModel> flightList = flightService.findAllFlightByPilotLicenseNumber(licenseNumber);
model.addAttribute("flightList", flightList);
model.addAttribute("pilot", pilot);
return "viewPilot";
}else{
model.addAttribute("message", "License number tidak ditemukan");
return "errorPage";
}
}*/
@RequestMapping(value = "/pilot/view", method = RequestMethod.GET)
public String viewPilot(@RequestParam("licenseNumber")String licenseNumber, Model model){
PilotModel pilot = pilotService.getPilotDetailByLicenseNumber(licenseNumber);
model.addAttribute("pilot",pilot);
model.addAttribute("navTitle","Pilot Detail");
return "viewPilot";
}
@RequestMapping(value = "/pilot/delete/{id}", method= RequestMethod.GET)
private String delete(@PathVariable(value = "id") Long id, Model model){
pilotService.removePilot(id);
model.addAttribute("message", "Pilot berhasil Dihapus!");
model.addAttribute("navTitle", "Confirmation");
return "successPage";
}
@RequestMapping(value = "/pilot/update/{licenseNumber}", method = RequestMethod.GET)
private String update(@PathVariable(value = "licenseNumber") String licenseNumber, Model model){
PilotModel pilot = pilotService.getPilotDetailByLicenseNumber(licenseNumber);
model.addAttribute("pilot",pilot);
model.addAttribute("navTitle", "Update Pilot");
return "updatePilot";
}
@RequestMapping(value = "/pilot/update", method = RequestMethod.POST)
private String updateSubmit(@ModelAttribute PilotModel pilotModel, Model model){
pilotService.updatePilot(pilotModel);
return "redirect:/pilot/view?licenseNumber="+pilotModel.getLicenseNumber();
}
}
|
[
"ichsandy.rizki@ui.ac.id"
] |
ichsandy.rizki@ui.ac.id
|
f767d52a2729b114acd2a874294a4263ce6225ae
|
f2fe7f580ba240476a1279a5c18c052e734f8c22
|
/src/io/RegexDelimitedParser.java
|
bd4c59bcb951c5e892a5c2e1093a3baec4e8ee0c
|
[
"Apache-2.0"
] |
permissive
|
martingraham/JSwingPlus
|
57a7a3e5a1630193c89e2e581587985595ad403b
|
ae6d4a985a38eb75da6671812dbd9fefb20f1148
|
refs/heads/master
| 2016-08-05T09:51:02.020985
| 2015-09-22T16:05:05
| 2015-09-22T16:05:05
| 42,943,398
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,847
|
java
|
package io;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.List;
import org.apache.log4j.Logger;
import util.Messages;
public class RegexDelimitedParser {
private final static Logger LOGGER = Logger.getLogger (RegexDelimitedParser.class);
protected final RegexReader regexReader;
CSVColumnObj columns;
public static void main (final String[] args) {
InputStream inStream = null;
try {
inStream = DataPrep.getInstance().getInputStream (args[0]);
} catch (FileNotFoundException e) {
LOGGER.error (e.toString(), e);
}
final RegexReader regexReader = new RegexReader (inStream, Messages.getString ("regex", "CSV_REGEX"));
if (regexReader != null) {
//RegexDelimitedParser rReader = new RegexDelimitedParser (fr, true);
String[] dataRow;
try {
while (!((dataRow = regexReader.readAndSplitLine()) == null)) {
for (Object obj : dataRow) {
LOGGER.debug ("["+obj+"] ");
}
}
} catch (IOException e) {
LOGGER.error (e);
}
}
}
public RegexDelimitedParser (final RegexReader in, final boolean readHeaders) {
regexReader = in;
columns = new CSVColumnObj ();
if (readHeaders) {
try {
final String[] al = regexReader.readAndSplitLine();
if (al != null) {
for (int n = 0; n < al.length; n++) {
columns.getColumnHeaderIndices().put (al [n], Integer.valueOf (n));
}
columns.getColumnList().addAll (Arrays.asList (al));
}
} catch (IOException e) {
LOGGER.error (e);
}
}
}
void dealWithCommentLine (List<String> strings) {}
public CSVColumnObj getColumnsObj () { return columns; }
}
|
[
"embers01"
] |
embers01
|
4c1e61e024c51386c8eeaee7710739bf97c284ca
|
686f61ceae34c75e8ff1f0b75cea1f9d61a24d3e
|
/src/com/javcoder/game/statistics/History.java
|
2bcdbca7a9e5a2696ad980e3c87172bbdce8ee16
|
[] |
no_license
|
javcoder/GameTK
|
13618a84149620d00c4369829c4bf7874f6cd30d
|
5069996ea25ef0e3a3477a85ca60f002e646c41d
|
refs/heads/master
| 2016-09-05T11:00:58.570526
| 2011-10-20T00:18:25
| 2011-10-20T00:18:25
| 2,610,063
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 65
|
java
|
package com.javcoder.game.statistics;
public class History {
}
|
[
"javcoder@gmail.com"
] |
javcoder@gmail.com
|
d57f4f7aa9bdd2bc363a7edf52988b1fc9936054
|
4892393e28b0280adfc0b0353ef8774e6d77897c
|
/imooc-coupon-service/coupon-settlement/src/main/java/com/imooc/coupon/SettlementApplication.java
|
10b7d6f5489deba8968d0285ec2560ca9f474b74
|
[] |
no_license
|
Boneshade/imooc-coupon
|
eeae5b8d26e2125bb1958493bd4640fdf93bc7d7
|
c3d20e8f2ad18bf3bca95035423512fff64bc76e
|
refs/heads/master
| 2023-03-18T00:47:58.820003
| 2021-03-12T05:47:04
| 2021-03-12T05:47:04
| 321,247,967
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 503
|
java
|
package com.imooc.coupon;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
/**
* <h1>优惠券结算微服务的启动入口<h1/>
* @author xubr 2021/2/8
*/
@EnableEurekaClient
@SpringBootApplication
public class SettlementApplication {
public static void main(String[] args) {
SpringApplication.run(SettlementApplication.class, args);
}
}
|
[
"2658696789@qq.com"
] |
2658696789@qq.com
|
5c7cf285d6c0d683806c35b3427d3b863bec4fb2
|
56456387c8a2ff1062f34780b471712cc2a49b71
|
/b/a/a/a/i/b/s.java
|
87a5fc5e2051307213b57f07f21998063e58cfe2
|
[] |
no_license
|
nendraharyo/presensimahasiswa-sourcecode
|
55d4b8e9f6968eaf71a2ea002e0e7f08d16c5a50
|
890fc86782e9b2b4748bdb9f3db946bfb830b252
|
refs/heads/master
| 2020-05-21T11:21:55.143420
| 2019-05-10T19:03:56
| 2019-05-10T19:03:56
| 186,022,425
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 563
|
java
|
package b.a.a.a.i.b;
import b.a.a.a.a.h;
import b.a.a.a.b.c;
import b.a.a.a.h.b;
import b.a.a.a.i.a.f;
import b.a.a.a.n;
import b.a.a.a.n.e;
public class s
extends f
{
public s() {}
public s(b paramb)
{
super(paramb);
}
public boolean c(n paramn, b.a.a.a.s params, c paramc, h paramh, e parame)
{
return b(paramn, params, paramc, paramh, parame);
}
}
/* Location: C:\Users\haryo\Desktop\enjarify-master\presensi-enjarify.jar!\b\a\a\a\i\b\s.class
* Java compiler version: 5 (49.0)
* JD-Core Version: 0.7.1
*/
|
[
"haryo.nendra@gmail.com"
] |
haryo.nendra@gmail.com
|
1478ccb86919d23c1f90d129720e0e53497b840d
|
62cc47fc30032e40ba0bc5e0eb177460e384a1ed
|
/core/src/main/java/lando/systems/ld48/Game.java
|
26ad6d892e9fc868022ca46074207194d49f3916
|
[] |
no_license
|
bploeckelman/LudumDare48
|
5fcb627a6f6380d1508562f37f17464ff15347f8
|
3be28842acac1cb3caf9b33e14a6bc79904449d0
|
refs/heads/master
| 2023-04-10T10:24:22.474289
| 2021-04-27T21:32:45
| 2021-04-27T21:32:45
| 359,710,454
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,461
|
java
|
package lando.systems.ld48;
import aurelienribon.tweenengine.Timeline;
import aurelienribon.tweenengine.Tween;
import aurelienribon.tweenengine.TweenManager;
import aurelienribon.tweenengine.primitives.MutableFloat;
import com.badlogic.gdx.Application;
import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input;
import com.badlogic.gdx.graphics.*;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.glutils.FrameBuffer;
import com.badlogic.gdx.graphics.glutils.ShaderProgram;
import com.badlogic.gdx.math.Rectangle;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.math.Vector3;
import com.badlogic.gdx.utils.Disposable;
import lando.systems.ld48.screens.BaseScreen;
import lando.systems.ld48.screens.LaunchScreen;
import lando.systems.ld48.screens.TitleScreen;
import lando.systems.ld48.utils.Time;
import lando.systems.ld48.utils.accessors.*;
public class Game extends ApplicationAdapter {
public Assets assets;
public Audio audio;
public TweenManager tween;
private BaseScreen screen;
private ScreenTransition screenTransition;
@Override
public void create() {
Time.init();
tween = new TweenManager();
Tween.setWaypointsLimit(4);
Tween.setCombinedAttributesLimit(4);
Tween.registerAccessor(Color.class, new ColorAccessor());
Tween.registerAccessor(Rectangle.class, new RectangleAccessor());
Tween.registerAccessor(Vector2.class, new Vector2Accessor());
Tween.registerAccessor(Vector3.class, new Vector3Accessor());
Tween.registerAccessor(OrthographicCamera.class, new CameraAccessor());
assets = new Assets();
audio = new Audio(this);
screenTransition = new ScreenTransition(Config.windowWidth, Config.windowHeight);
if (Config.showLaunchScreen || Gdx.app.getType() == Application.ApplicationType.WebGL) {
setScreen(new LaunchScreen(this));
} else {
setScreen(new TitleScreen(this));
}
}
public void update() {
if (Gdx.input.isKeyJustPressed(Input.Keys.ESCAPE)) {
Gdx.app.exit();
}
// update global timer
Time.delta = Gdx.graphics.getDeltaTime();
// update code that always runs (regardless of pause)
screen.alwaysUpdate(Time.delta);
// handle a pause
if (Time.pause_timer > 0) {
Time.pause_timer -= Time.delta;
if (Time.pause_timer <= -0.0001f) {
Time.delta = -Time.pause_timer;
} else {
// skip updates if we're paused
return;
}
}
Time.millis += Time.delta;
Time.previous_elapsed = Time.elapsed_millis();
// update systems
tween.update(Time.delta);
audio.update(Time.delta);
screen.update(Time.delta);
}
@Override
public void render() {
update();
// render the active screen
Gdx.gl.glClearColor(0, 0, 0, 1);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
if (!screenTransition.active) {
screen.render(assets.batch);
} else {
screenTransition.updateAndRender(Time.delta, assets.batch, screen);
}
}
@Override
public void dispose() {
screenTransition.dispose();
audio.dispose();
assets.dispose();
}
public BaseScreen getScreen() {
return screen;
}
public void setScreen(BaseScreen newScreen) {
setScreen(newScreen, null);
}
public void setScreen(BaseScreen newScreen, ShaderProgram transitionShader) {
// only one active transition at a time
if (screenTransition.active || screenTransition.next != null) {
return;
}
if (screen == null) {
screen = newScreen;
} else {
if (transitionShader == null) {
screenTransition.shader = Assets.Transitions.shaders.random();
} else {
screenTransition.shader = transitionShader;
}
Timeline.createSequence()
.pushPause(0.1f)
.push(Tween.call((i, baseTween) -> {
screenTransition.active = true;
screenTransition.percent.setValue(0f);
screenTransition.next = newScreen;
}))
.push(Tween.to(screenTransition.percent, -1, screenTransition.duration).target(1))
.push(Tween.call((i, baseTween) -> {
screen = screenTransition.next;
screenTransition.next = null;
screenTransition.active = false;
}))
.start(tween);
}
}
// ------------------------------------------------------------------------
static class ScreenTransition implements Disposable {
boolean active = false;
float duration = 0.5f;
BaseScreen next;
ShaderProgram shader;
MutableFloat percent;
Texture sourceTexture;
Texture destTexture;
FrameBuffer sourceFramebuffer;
FrameBuffer destFramebuffer;
public ScreenTransition(int windowWidth, int windowHeight) {
next = null;
shader = null;
percent = new MutableFloat(0f);
sourceFramebuffer = new FrameBuffer(Pixmap.Format.RGBA8888, windowWidth, windowHeight, false);
destFramebuffer = new FrameBuffer(Pixmap.Format.RGBA8888, windowWidth, windowHeight, false);
sourceTexture = sourceFramebuffer.getColorBufferTexture();
destTexture = destFramebuffer.getColorBufferTexture();
}
@Override
public void dispose() {
sourceTexture.dispose();
destTexture.dispose();
sourceFramebuffer.dispose();
destFramebuffer.dispose();
}
public void updateAndRender(float delta, SpriteBatch batch, BaseScreen screen) {
// update the next screen
next.update(delta);
// render the next screen to a buffer
destFramebuffer.begin();
{
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
next.render(batch);
}
destFramebuffer.end();
// render the current screen to a buffer
sourceFramebuffer.begin();
{
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
screen.render(batch);
}
sourceFramebuffer.end();
batch.setShader(shader);
batch.begin();
{
shader.setUniformf("u_percent", percent.floatValue());
sourceTexture.bind(1);
shader.setUniformi("u_texture1", 1);
destTexture.bind(0);
shader.setUniformi("u_texture", 0);
// TODO - this only works cleanly if source and dest equal window size,
// if one screen has a different size it ends up either too big or too small during the transition
batch.setColor(Color.WHITE);
batch.draw(destTexture, 0, 0, Config.windowWidth, Config.windowHeight);
}
batch.end();
batch.setShader(null);
}
}
}
|
[
"brian.ploeckelman@gmail.com"
] |
brian.ploeckelman@gmail.com
|
04e7dc527b9e1b0c983741322d6d511530e4783e
|
2dc09408af111b6a0b185dbf7fb125bedd3ad55e
|
/MiotVoiceRobot/src/androidTest/java/com/miot/android/voice/ApplicationTest.java
|
67e39ce16da17942b24842544ccd0769d794484c
|
[] |
no_license
|
qiaozhuang/MiotSmart
|
fc9c64f41cae1eaa62552e9bb9d88d08dd4f3c74
|
74ea0e8dd5aee5efbc84c4f07809ea03686940b1
|
refs/heads/master
| 2021-05-16T07:40:54.244331
| 2017-09-18T09:28:12
| 2017-09-18T09:28:12
| 103,918,640
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 341
|
java
|
package com.miot.android.voice;
import android.app.Application;
import android.test.ApplicationTestCase;
/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
}
|
[
"qiaozhuang"
] |
qiaozhuang
|
3943218cd56f1a1278f1fc8970b38d839bebbef6
|
a1237efcfc0271d8037acfc35c21f7429a243d4b
|
/enity/Tag.java
|
92f591ab096f1f56db5cde663cafb7750ccb613b
|
[] |
no_license
|
Alex44def/epam-module3-PatternTask2
|
742d922eba5f3d610df1e26348818bedc88aa5c0
|
88060c356529755e923e6aa710cb034e629ddf38
|
refs/heads/master
| 2022-12-17T21:05:33.305989
| 2020-09-12T06:30:21
| 2020-09-12T06:30:21
| 294,885,020
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,170
|
java
|
package ru.epam.jonline.module3.work_with_patterns.pattern_task2.enity;
import java.util.Map;
public class Tag {
private String nameTag = "";
private String typeTag = "";
private Map<String, String> attributes;
private String contentTag = "";
public Tag() {
this.nameTag = "";
this.typeTag = "";
this.attributes = null;
this.contentTag = "";
}
public String getContentTag() {
return contentTag;
}
public void setContentTag(String contentTag) {
this.contentTag = contentTag;
}
public String getNameTag() {
return nameTag;
}
public void setNameTag(String nameTag) {
this.nameTag = nameTag;
}
public String getTypeTag() {
return typeTag;
}
public void setTypeTag(String typeTag) {
this.typeTag = typeTag;
}
public Map<String, String> getAttributes() {
return attributes;
}
public void setAttributes(Map<String, String> attributes) {
this.attributes = attributes;
}
@Override
public String toString() {
return "{" + "name='" + nameTag + '\'' + ", type='" + typeTag + '\'' + ", attributes=" + attributes
+ ", content='" + contentTag + '\'' + '}';
}
}
|
[
"kuzmin@nextmail.ru"
] |
kuzmin@nextmail.ru
|
63c273bd6f6e559a0506f1f5a16c18d5b6aa3d64
|
e980453b5fc18b3730cda88dd43b58987f54bb63
|
/src/day08_casting_scanner/ScannerIntro.java
|
9b4fb25e8721b972d03141568aea82800be3991a
|
[] |
no_license
|
mmiakhel/java-programming
|
993cbdc6675f28e38cad7d2e4df7393481b9f144
|
4cc99c7761e383642a29e5251d00b3ca3a9fc26f
|
refs/heads/master
| 2023-06-15T02:43:24.260212
| 2021-07-15T03:10:57
| 2021-07-15T03:10:57
| 365,539,389
| 0
| 0
| null | 2021-06-05T21:05:55
| 2021-05-08T14:47:54
|
Java
|
UTF-8
|
Java
| false
| false
| 347
|
java
|
package day08_casting_scanner;
import java.util.Scanner;
public class ScannerIntro {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("Please enter your name:");
String firstName = scan.next();
System.out.println("nice to meet you, " + firstName);
}
}
|
[
"mmiakhel@gmail.com"
] |
mmiakhel@gmail.com
|
6c9e62cd890dffaf625525a57dc369cf13baace3
|
312cae83cc27c108d17919618d4df97674ffd805
|
/sts02/src/main/java/com/bit/day02/controller/IndexController.java
|
626c01b4a83ce420ed24a586766269eeb24fb5a7
|
[] |
no_license
|
lim-doyoung/Spring2019
|
22b31f48ec99672a0d8822364e1dd37e508ab62c
|
26b02511781b0bb4c0a26bb022870ac3c59d3179
|
refs/heads/master
| 2022-12-21T10:51:30.355836
| 2019-07-31T02:38:49
| 2019-07-31T02:38:49
| 198,587,835
| 0
| 0
| null | 2022-12-16T09:59:29
| 2019-07-24T08:03:24
|
JavaScript
|
GB18030
|
Java
| false
| false
| 835
|
java
|
package com.bit.day02.controller;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;
public class IndexController implements Controller{
// Logger log=Logger.getLogger(IndexCotroller.class);
Logger log=Logger.getLogger(this.getClass()); //按眉甫 嘛绢陈阑嫐 荤侩
public IndexController() {
System.out.println("index create....");
}
@Override
public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
// TODO Auto-generated method stub
log.debug("index...");
ModelAndView mav=new ModelAndView();
mav.setViewName("index"); //立加且 林家 捞抚
return mav;
}
}
|
[
"isdsadas1234@gmail.com"
] |
isdsadas1234@gmail.com
|
9714984cc114b4a38755146857bc0945d4474025
|
1c544bcce02aff62b778f83d443ac469284aa3c6
|
/clientCore/src/main/java/com/mark/zumo/client/core/payment/kakao/KakaoPayAdapter.java
|
bc3e11da98e18e784e2eaca043d6869c229d8b9b
|
[] |
no_license
|
Mark-Yun/zumun_client
|
63afdfb0f558d426f016a1d7f0e14f604438393c
|
0bac03015ab5b085b57d4429bc9da833b62cdb14
|
refs/heads/master
| 2020-07-09T08:16:12.467227
| 2019-09-25T12:01:33
| 2019-09-25T12:01:33
| 203,921,452
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,247
|
java
|
/*
* Copyright (c) 2018. Mark Soft - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
*/
/*
* Copyright (c) 2018. Mark Soft - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
*/
package com.mark.zumo.client.core.payment.kakao;
import com.mark.zumo.client.core.database.entity.MenuOrder;
import com.mark.zumo.client.core.payment.kakao.entity.PaymentApprovalRequest;
import com.mark.zumo.client.core.payment.kakao.entity.PaymentApprovalResponse;
import com.mark.zumo.client.core.payment.kakao.entity.PaymentReadyRequest;
import com.mark.zumo.client.core.payment.kakao.entity.PaymentReadyResponse;
import com.mark.zumo.client.core.payment.kakao.server.KakaoPayService;
import com.mark.zumo.client.core.payment.kakao.server.KakaoPayServiceProvider;
import io.reactivex.Maybe;
import io.reactivex.schedulers.Schedulers;
/**
* Created by mark on 18. 6. 6.
*/
public enum KakaoPayAdapter {
INSTANCE;
private static final String TAG = "KakaoPayAdapter";
private KakaoPayService kakaoPayService;
KakaoPayAdapter() {
}
public KakaoPayService buildService(String accessToken) {
return kakaoPayService = KakaoPayServiceProvider.INSTANCE.buildService(accessToken);
}
public Maybe<PaymentReadyResponse> preparePayment(final PaymentReadyRequest paymentReadyRequest) {
return kakaoPayService.readyPayment(
paymentReadyRequest.cId,
paymentReadyRequest.partnerOrderId,
paymentReadyRequest.partnerUserId,
paymentReadyRequest.itemName,
paymentReadyRequest.itemCode,
paymentReadyRequest.quantity,
paymentReadyRequest.totalAmount,
paymentReadyRequest.taxFreeAmount,
paymentReadyRequest.vatAmount,
paymentReadyRequest.approvalUrl,
paymentReadyRequest.cancelUrl,
paymentReadyRequest.failUrl,
paymentReadyRequest.availableCards,
paymentReadyRequest.paymentMethodType,
paymentReadyRequest.installMonth,
paymentReadyRequest.customJson)
.subscribeOn(Schedulers.io());
}
public Maybe<PaymentApprovalResponse> approvalPayment(final MenuOrder menuOrder, final String pgToken, final String tId) {
PaymentApprovalRequest paymentApprovalRequest = new PaymentApprovalRequest.Builder()
.setcId(KakaoPayService.CID)
.setPartnerOrderId(menuOrder.uuid)
.setPartnerUserId(menuOrder.customerUuid)
.setPgToken(pgToken)
.settId(tId)
.setTotalAmount(menuOrder.totalPrice)
.build();
return kakaoPayService.approvalPayment(paymentApprovalRequest.cId,
paymentApprovalRequest.tId,
paymentApprovalRequest.partnerOrderId,
paymentApprovalRequest.partnerUserId,
paymentApprovalRequest.pgToken,
paymentApprovalRequest.payload,
paymentApprovalRequest.totalAmount);
}
}
|
[
"mark.yun89@gmail.com"
] |
mark.yun89@gmail.com
|
c4607c012a686ce14588d254f217fcf2f3ea7172
|
a8fa9b4707cb3f1f36ecaecec16ef04e57d0cbcd
|
/topStar/src/main/java/big/proj/aws/App.java
|
c4a6ecdb6eecf9e564c4e81c7a8f7950a2d51321
|
[] |
no_license
|
AshutoshMahala/AmazonCustomerReviewAnalysis
|
694e721addf5168a09c32452363b1602bfcfa98b
|
ceca2f1971ae4cf32ef18d476d4d00869bd354b1
|
refs/heads/master
| 2020-12-26T23:11:55.027681
| 2020-02-01T21:56:33
| 2020-02-01T21:56:33
| 237,681,258
| 0
| 0
| null | 2020-10-13T19:12:58
| 2020-02-01T21:36:22
|
Java
|
UTF-8
|
Java
| false
| false
| 3,494
|
java
|
package big.proj.aws;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.DoubleWritable;
import org.apache.hadoop.io.IntWritable;
// import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.input.TextInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.apache.hadoop.mapreduce.lib.output.TextOutputFormat;
// import java.io.IOException;
import java.time.Duration;
import java.time.Instant;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args )
{
System.out.println("Starting!");
Instant start = Instant.now();
Configuration conf1 = new Configuration();
String inPath = args[0];
String midPath = args[1];
String outPath = args[2];
try{
Job job1 = Job.getInstance(conf1, "Avg Star");
job1.setJarByClass(App.class);
job1.setMapperClass(AverageStarMapper.class);
// job1.setCombinerClass(AverageStarReducer.class);
job1.setReducerClass(AverageStarReducer.class);
job1.setInputFormatClass(TextInputFormat.class);
job1.setOutputFormatClass(TextOutputFormat.class);
job1.setMapOutputKeyClass(Text.class);
job1.setMapOutputValueClass(CompositeValue.class);
job1.setOutputKeyClass(Text.class);
job1.setOutputValueClass(CompositeValue.class);
FileInputFormat.addInputPath(job1, new Path(inPath));
FileOutputFormat.setOutputPath(job1, new Path(midPath));
// Delete the result folder if present
FileSystem fs = FileSystem.get(conf1);
fs.delete(new Path(midPath),true);
int n = job1.waitForCompletion(true) ? 0 : 1;
Instant end = Instant.now();
Duration timeElapsed = Duration.between(start, end);
System.out.println("Time taken: "+ timeElapsed.toMillis() +" milliseconds");
}catch(Exception e){
e.printStackTrace();
}
try{
Job job2 = Job.getInstance(conf1,"star top");
job2.setJarByClass(App.class);
job2.setMapperClass(TopStarMap.class);
job2.setReducerClass(TopStarReduce.class);
job2.setInputFormatClass(TextInputFormat.class);
job2.setOutputFormatClass(TextOutputFormat.class);
job2.setMapOutputKeyClass(Text.class);
job2.setMapOutputValueClass(DoubleWritable.class);
job2.setOutputKeyClass(Text.class);
job2.setOutputValueClass(DoubleWritable.class);
FileInputFormat.addInputPath(job2,new Path(midPath));
FileOutputFormat.setOutputPath(job2,new Path(outPath));
// Delete result folder if exists
FileSystem fs = FileSystem.get(conf1);
fs.delete(new Path(outPath), true);
int n = job2.waitForCompletion(true)? 0: 1;
Instant end = Instant.now();
Duration timeElapsed = Duration.between(start, end);
System.out.println("Time taken: "+ timeElapsed.toMillis() +" milliseconds");
System.exit(n);
}catch(Exception e){
e.printStackTrace();
}
}
}
|
[
"ashutoshmahala@live.com"
] |
ashutoshmahala@live.com
|
ac48e31057ce8fd4603b3f955e5036c6d5b501a7
|
0d98e84c2cc3b702ed30030b98f71a46f638bf56
|
/src/main/java/structuralpattern/facadepattern/Stock.java
|
7dd352710109504463423cffae4a087e17afc221
|
[] |
no_license
|
rsun07/Design_Pattern
|
1cf55c063588b94871714387276481b4168ee17b
|
48a301b9e8f176a0ee836d8f43f47d40c398fb2b
|
refs/heads/master
| 2023-04-01T22:45:45.787420
| 2019-07-23T20:06:22
| 2019-07-23T20:06:22
| 124,569,614
| 0
| 0
| null | 2021-03-31T19:06:25
| 2018-03-09T17:03:30
|
Java
|
UTF-8
|
Java
| false
| false
| 177
|
java
|
package structuralpattern.facadepattern;
public class Stock implements Investment {
@Override
public void trade() {
System.out.println("Invest Stock");
}
}
|
[
"rsun2014@gmail.com"
] |
rsun2014@gmail.com
|
179fe5ba9373b4da779e35bac801f030849a073c
|
d78f10d875476f977d236cad91647e5ea2e90c9d
|
/src/main/java/org/bmn/parts/auto/directory/model/Part.java
|
4f8101f95b139a9d75373745dd0f99695a0b3a2f
|
[] |
no_license
|
BMNcode/parts.auto.directory
|
72674858066373af5bf421959bbd9d14c1bcadab
|
ccf74112235490893ed2b7b017aa7043e168a248
|
refs/heads/master
| 2023-06-03T01:01:23.495760
| 2021-05-26T08:33:20
| 2021-05-26T08:33:20
| 377,434,977
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 908
|
java
|
package org.bmn.parts.auto.directory.model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.*;
import java.util.List;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "part")
public class Part {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id", nullable = false)
private Long id;
@Column(name = "article", nullable = false)
private String article;
@Column(name = "part_name", nullable = false)
private String partName;
@ManyToMany(cascade = CascadeType.ALL)
@JoinTable(name = "part_models",
joinColumns = @JoinColumn(name = "parts_id", referencedColumnName = "id"),
inverseJoinColumns = @JoinColumn(name = "models_id", referencedColumnName = "id"))
private List<Model> models;
@ManyToOne
@JoinColumn(name = "category_id", nullable = false)
private Category category;
}
|
[
"happymax@list.ru"
] |
happymax@list.ru
|
8733534972706ce05a790e3629afe5f6d6a91e93
|
f9fd138d5e6f1f23d9aced533b5a3f5ff2b7d6f4
|
/Common/src/main/java/com/blamejared/crafttweaker/impl/preprocessor/PriorityPreprocessor.java
|
fb212aabfc68f40b74246a02bdbffed5b7411fa3
|
[
"MIT"
] |
permissive
|
kindlich/CraftTweaker
|
fd61116413b274dc6eac2d6f7468095eb04a9a06
|
c15ecad34374f09a4917506dc9eb17cf743b792e
|
refs/heads/1.18
| 2023-08-17T16:30:47.448860
| 2022-05-29T14:45:02
| 2022-05-29T14:45:02
| 109,025,585
| 0
| 0
|
MIT
| 2023-04-04T09:46:26
| 2017-10-31T16:49:14
|
Java
|
UTF-8
|
Java
| false
| false
| 2,249
|
java
|
package com.blamejared.crafttweaker.impl.preprocessor;
import com.blamejared.crafttweaker.api.CraftTweakerAPI;
import com.blamejared.crafttweaker.api.annotation.Preprocessor;
import com.blamejared.crafttweaker.api.annotation.ZenRegister;
import com.blamejared.crafttweaker.api.zencode.IPreprocessor;
import com.blamejared.crafttweaker.api.zencode.scriptrun.IMutableScriptRunInfo;
import com.blamejared.crafttweaker.api.zencode.scriptrun.IScriptFile;
import java.util.List;
@ZenRegister
@Preprocessor
public final class PriorityPreprocessor implements IPreprocessor {
public static final PriorityPreprocessor INSTANCE = new PriorityPreprocessor();
private static final int DEFAULT_PRIORITY = 0;
private PriorityPreprocessor() {}
@Override
public String name() {
return "priority";
}
@Override
public String defaultValue() {
return Integer.toString(DEFAULT_PRIORITY);
}
@Override
public boolean apply(final IScriptFile file, final List<String> preprocessedContents, final IMutableScriptRunInfo runInfo, final List<Match> matches) {
if(matches.size() > 1) {
CraftTweakerAPI.LOGGER.warn("Conflicting priorities in file {}: only the first will be used", file.name());
}
final String priority = matches.get(0).content().trim();
try {
Integer.parseInt(priority);
} catch(final NumberFormatException e) {
CraftTweakerAPI.LOGGER.warn("Invalid priority value '{}' for file {}", priority, file.name());
}
return true;
}
@Override
public int compare(final IScriptFile a, final IScriptFile b) {
return Integer.compare(
this.getIntSafely(a.matchesFor(this).get(0)),
this.getIntSafely(b.matchesFor(this).get(0))
);
}
@Override
public int priority() {
return 100;
}
private int getIntSafely(final Match match) {
try {
return Integer.parseInt(match.content().trim());
} catch(final NumberFormatException e) {
return DEFAULT_PRIORITY;
}
}
}
|
[
"jaredlll08@gmail.com"
] |
jaredlll08@gmail.com
|
cf4f907aebd39df39ac507af434b7368ceca5e63
|
ec649c006c51aec1e039eb627ac21f1e3d399618
|
/src/main/java/com/dxc/git/controller/SimpleController.java
|
be73dae332329d649afb9130defe2e596254bac7
|
[] |
no_license
|
sahi3/Assignment
|
eea2f16418f76e577a01a47006176124fbc95f00
|
6fd2d7f2f5f281ff816f80f925791a1ccd70fc89
|
refs/heads/master
| 2020-05-24T20:37:15.057045
| 2019-05-19T10:24:42
| 2019-05-19T10:24:42
| 187,458,500
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 963
|
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 com.dxc.git.controller;
import com.dxc.git.persistence.repo.BookRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
/**
*
* @author gino
*/
@Controller
@RestController
@RequestMapping("/welcome")
public class SimpleController {
@Value("${spring.application.name}")
String appName;
@Autowired
BookRepository repo;
@GetMapping("/")
public String homePage(Model model) {
model.addAttribute("appName", appName);
return "home";
}
}
|
[
"katukuri-sahithi@dxc.com"
] |
katukuri-sahithi@dxc.com
|
5429729e91b4191ea8378156c7b1c1137fdf8473
|
4dfb8e6b738e2e9f93a3e27f07b3cf7309780636
|
/src/main/java/com/zefun/common/consts/View.java
|
b368326bb007f558ac2d35e28e4b5ab7415e55ee
|
[] |
no_license
|
xiajngsi/zefun
|
8981cd6e5769c58533e130111ffb7bac9201235e
|
017ef34f5e6dc4d9a025dc3cd0cd4762a50ab824
|
refs/heads/master
| 2021-01-10T01:17:32.738892
| 2015-12-22T11:49:48
| 2015-12-22T11:49:48
| 48,429,308
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 17,752
|
java
|
package com.zefun.common.consts;
/**
* 视图地址常量类,定义时使用根目录/WEB-INF/view/下对绝对地址
* @author 张进军
* @date Aug 4, 2015 9:21:29 AM
*/
public interface View {
/**
* 首页处理
* @author 高国藩
* @date 2015年10月26日 下午4:54:58
*/
class Index{
/** 登陆页面 */
public static final String LOGIN = "login";
}
/**
* 角色权限控制
* @author 高国藩
* @date 2015年11月25日 上午11:53:07
*/
class Authority{
/**角色权限配置页面*/
public static final String VIEW = "authority/view";
}
/**
* 门店管理制度模块
* @author 张进军
* @date Dec 5, 2015 7:17:45 PM
*/
class StoreManageRule {
/**管理规则页面*/
public static final String RULE = "employee/manage/rule";
}
/**
* 设置类模块
* @author 张进军
* @date Nov 9, 2015 11:36:48 AM
*/
class Setting {
/** 店铺设置 */
public static final String STORE_SETTING = "setting/storeSetting";
/** 门店基础设置 */
public static final String BASE_SETTING = "setting/baseSetting";
/** 个人账户 */
public static final String PERSON_SETTING = "setting/personSetting";
/** 分店列表 */
public static final String BRANCH_LIST = "setting/branchList";
}
/**
* 人脸模块相关页面
* @author 张进军
* @date Jul 2, 2015 2:57:02 PM
*/
class Face{
/** 添加face页面 */
public static final String ADD = "face/add";
/** 搜索face页面 */
public static final String SEARCH = "face/search";
}
/**
* 会员等级相关页面
* @author 张进军
* @date Aug 5, 2015 7:49:53 PM
*/
class MemberLevel{
/** 会员等级列表页面 */
public static final String LIST = "member/memberLevel/list";
}
/**
* 会员信息页面
* @author 高国藩
* @date 2015年9月8日 下午6:04:08
*/
class MemberInfo{
/** 会员展示*/
public static final String MEMBER_LIST_VIEW = "member/memberLevel/member-list";
/**会员展示*/
public static final String GROUP_LIST_VIEW = "member/memberLevel/group-list";
/**会员导入错误数据展示页面*/
public static final String VEIW_ERROR_MEMBER = "member/memberLevel/errorMember";
/**总店会员页面*/
public static final String BASE_MEMBER_VIEW = "member/memberLevel/baseMember";
}
/**
* 微信会员中心相关页面
* @author 张进军
* @date Aug 19, 2015 5:46:43 PM
*/
class MemberCenter{
/** 会员主页面 */
public static final String HOME = "mobile/member/home";
/**个人资料*/
public static final String INFO = "mobile/member/info";
/**密码设置页面*/
public static final String SET_PWD = "mobile/member/setPwd";
/** 会员注册页面 */
public static final String REGISTER = "mobile/member/register";
/** 会员充值页面 */
public static final String ACCOUNT = "mobile/member/account";
/** 完善会员信息页面 */
public static final String REGISTER_INFO = "mobile/member/registerInfo";
/** 分享发型页面 */
public static final String SHARE_SHOW = "mobile/member/shareShow";
/** 预约页面 */
public static final String ORDER_APPOINTMENT = "mobile/member/orderAppointment";
/**项目详情*/
public static final String PROJECT_DETAIL = "mobile/member/projectDetail";
/**时间预约*/
public static final String DATE_APPOINTMENT = "mobile/member/dateAppointment";
/**积分流水*/
public static final String INTEGRAL_FLOW = "mobile/member/integralFlow";
/**卡金流水记录页面*/
public static final String CARD_MONEY_FLOW = "mobile/member/cardmoneyFlow";
/**礼金流水记录页面*/
public static final String GIFT_MONEY_FLOW = "mobile/member/giftmoneyFlow";
/**积分商城*/
public static final String SHOP_CENTER = "mobile/member/shopCenter";
/**会员优惠券*/
public static final String MEMBER_COUPON = "mobile/member/memberCoupon";
/**店铺信息*/
public static final String STORE_INFO = "mobile/member/storeInfo";
/**店铺展示*/
public static final String STORE_SHOW = "mobile/member/storeShow";
/**会员预约列表*/
public static final String APPOINTMENT_LIST = "mobile/member/appointmentList";
/**会员订单列表*/
public static final String ORDER_LIST = "mobile/member/orderList";
/**会员订单确认*/
public static final String ORDER_PAY = "mobile/member/orderPay";
/**会员订单支付明细*/
public static final String PAYMENT_DETAIL = "mobile/member/paymentDetail";
/**会员订单评价*/
public static final String ORDER_EVALUATE = "mobile/member/orderEvaluate";
/**会员套餐列表*/
public static final String COMBO_LIST = "mobile/member/comboList";
/**门店列表*/
public static final String STORE_LIST = "mobile/member/storeList";
}
/**
* 员工手机端
* @author 王大爷
* @date 2015年8月21日 上午10:15:25
*/
class StaffPage{
/** 员工登录页面*/
public static final String STAFF_LOGIN = "mobile/staff/login";
/** 员工操作中心*/
public static final String STAFF_CENTER = "mobile/staff/staffCenter";
/** 员工个人信息*/
public static final String STAFF_INFO = "mobile/staff/staffInfo";
/** 员工密码页面*/
public static final String UPDATE_PWD = "mobile/staff/updatePwd";
/** 更多操作界面*/
public static final String STAFF_MORE = "mobile/staff/more";
/** 员工预约列表*/
public static final String STAFF_APPOINT = "mobile/staff/staffAppoint";
/** 员工业绩排行*/
public static final String ALL_ERANING = "mobile/staff/allEarning";
/** 员工个人业绩*/
public static final String STAFF_ERANING = "mobile/staff/staffEarning";
/** 员工接待页面*/
public static final String RECEPTION = "mobile/staff/reception";
/** 选择类别页面*/
public static final String PROJECT_CATEGORY = "mobile/staff/projectCategory";
/** 轮牌指定*/
public static final String MEMBER_SHIFTMAHJONG_SERVE = "mobile/staff/memberShiftMahjongServe";
/** 项目列表*/
public static final String PROJECT_LIST = "mobile/staff/projectList";
/** 会员结账界面*/
public static final String MEMBER_PAY = "mobile/staff/memberPay";
/** 员工工资*/
public static final String STAFF_SALARY = "mobile/staff/staffSalary";
/** 员工业绩详情*//*
public static final String STAFF_DETAILS = "mobile/staff/staffDetails";*/
/** 员工服务界面*/
public static final String STAFF_SERVE = "mobile/staff/staffServe";
/** 等待中订单列表*/
public static final String WAITING_ORDER = "mobile/staff/waitingOrder";
/** 已完成订单*/
public static final String ORDER_LIST = "mobile/staff/orderList";
/** 订单详情*/
public static final String ORDER_DETAILS = "mobile/staff/orderDetails";
/** 服务移交轮牌显示*/
public static final String TURN_SHIFTMAHJONG_SERVE = "mobile/staff/turnShiftMahjongServe";
/** 修改项目*/
public static final String CHANGE_PROJECT = "mobile/staff/changeProject";
/** 修改项目轮牌*/
public static final String UPDATE_SHIFTMAHJONG_SERVE = "mobile/staff/updateShiftMahjongServe";
/** 等待中心轮牌*/
public static final String WAITING_SHIFTMAHJONG_SERVE = "mobile/staff/waitingShiftMahjongServe";
/** 订单明细*/
public static final String ORDER_DETAIL = "mobile/staff/orderdetail";
/** 所有轮牌界面*/
public static final String ALL_SHIFTMAHJONG = "mobile/staff/allShiftMahjong";
/** 我的轮牌界面*/
public static final String MY_SHIFTMAHJONG = "mobile/staff/myShiftMahjong";
}
/** 发型设置 */
class HairstyleDesign{
/** 发型设置页面 */
public static final String HAIRSTYLEDESIGN = "commodity/hairstyleDesign";
}
/**
* 项目
* @author 洪秋霞
* @date 2015年8月11日 下午2:04:20
*/
class Project{
/** 项目价格设置页面 */
public static final String PROJECTSETTING = "commodity/projectSetting";
}
/**
* 套餐
* @author 洪秋霞
* @date 2015年8月11日 下午2:04:32
*/
class ComboInfo{
/**套餐设置页面*/
public static final String COMBOINFO = "commodity/comboInfo";
}
/**
* 商品
* @author 洪秋霞
* @date 2015年8月11日 下午2:04:50
*/
class GoodsInfo{
/** 商品设置页面*/
public static final String GOODSINFO = "commodity/goodsInfo";
/** 商品库存页面 */
public static final String GOODSSTOCK = "commodity/goodsStock";
/** 商品出货记录*/
public static final String SHIP_MENT_RECORD = "commodity/shipMentRecord";
/** 品牌管理页面*/
public static final String BRAND = "commodity/goodsBrand";
/** 商品进货页面*/
public static final String GOODS_PURCHASE_RECORDS = "commodity/purchaseRecords";
}
/**
* 供应商
* @author 洪秋霞
* @date 2015年8月12日 下午2:40:56
*/
class SupplierInfo{
/**供应商设置页面*/
public static final String SUPPLIERINFO = "commodity/supplierInfo";
/**进货记录页面*/
public static final String PURCHASE_RECORDS = "commodity/purchaseRecords";
}
/**
* 岗位信息
* @author 陈端斌
* @date 2015年8月4日 下午4:32:30
*/
class Position{
/** 岗位信息页面 */
public static final String POSITION = "employee/positioninfo/positioninfo";
}
/**
* 职位信息页面
* @author chendb
* @date 2015年8月11日 上午10:10:38
*/
class Employeelevel{
/** 职位信息页面*/
public static final String EMPLOYEELEVEL = "employee/employeelevel/employeelevel";
}
/**
* 自助收银
* @author 王大爷
* @date 2015年8月11日 上午11:21:37
*/
class KeepAccounts{
/** 开支记账*/
public static final String STOREFLOW = "keepAccounts/storeFlow";
/** 轮职排班*/
public static final String SHIFT_MAHJONG ="keepAccounts/shiftMahjong";
/** 开卡充值*/
public static final String OPEN_CARD ="keepAccounts/openCard";
/** 手工收银*/
public static final String MANUALLY_OPEN_ORDER = "keepAccounts/manuallyOpenOrder";
}
/**
* 微信模块
* @author 高国藩
* @date 2015年8月7日 上午10:03:21
*
*/
class Wechat{
/**菜单页面*/
public static final String MENU = "wechat/menu";
/**新增图文消息页面*/
public static final String ARTIC_MANAGER = "wechat/article-manage";
/**展示图文消息*/
public static final String SHOW_ITEMS = "wechat/items-manage";
/**修改摸一个图文消息,展示其中一个*/
public static final String CHATE_ITME = "wechat/update-article-manage";
/**图文消息发送*/
public static final String SEND_ITEMS = "wechat/send-items";
/**图文消息统计*/
public static final String ITEMS_STATUS = "wechat/items-msg-status";
/**图文消息设置页面*/
public static final String VIEW_AUTO_REPLY = "wechat/auto-reply";
/**门店菜单设置页面*/
public static final String STORE_MENU = "wechat/store-menu";
/**我的公众号*/
public static final String VIEW_OFFICAL = "wechat/offical";
}
/**
* 人员目标
* @author chendb
* @date 2015年8月17日 下午3:21:41
*/
class Objective{
/** 职位信息页面*/
public static final String OBJECTIVE = "employee/objective/objective";
}
/**
* 优惠券
* @author 高国藩
* @date 2015年8月18日 上午11:40:55
*/
class Coupon{
/**优惠券展示页面*/
public static final String VIEW_COUPON = "coupon/coupon-list";
}
/**
* 自助收银
* @author luhw
* @date 2015年10月21日 下午15:27:49
*/
class SelfCashier {
/**优惠券展示页面*/
public static final String VIEW_SELF_CASHIER = "cashier/payment";
/** 预约列表 */
public static final String APPOINT_LIST = "cashier/appointList";
}
/** 订单流水 */
class DayBook {
/** 订单流水查询页面 */
public static final String VIEW_DAYBOOK_INDEX = "daybook/view/index";
/** 订单流水查询 */
public static final String ACTION_DAYBOOK_LIST = "daybook/action/list";
}
/**
* 登陆
* @author 高国藩
* @date 2015年9月20日 上午11:21:38
*/
class Login{
}
/**
* 门店
* @author <a href="mailto:bing_ge@kingdee.com">bing_ge@kingdee.com</a> 2015年11月24日
*/
class Store {
/**
*
*/
public static final String STORE_APPLY = "mobile/store/apply";
}
/**
*
* @author <a href="mailto:bing_ge@kingdee.com">bing_ge@kingdee.com</a> 2015年11月26日
*/
class Agent {
/**
*
*/
public static final String AGENT_APPLY = "mobile/agent/apply";
}
/**
*
* @author <a href="mailto:bing_ge@kingdee.com">bing_ge@kingdee.com</a> 2015年11月26日
*/
class StoreDetail {
/**
*
*/
public static final String SINGLE_STORE = "mobile/store/single";
/**
*
*/
public static final String CHAIN_HQ_STORE = "mobile/store/chain_hq";
/**
*
*/
public static final String CHAIN_STORE = "mobile/store/chain";
/**
*
*/
public static final String SINGLE_STORE_INFO = "mobile/store/single_info";
/**
*
*/
public static final String CHAIN_HQ_STORE_INFO = "mobile/store/chain_hq_info";
/**
*
*/
public static final String CHAIN_STORE_INFO = "mobile/store/chain_info";
/**
*
*/
public static final String CHAIN_STORE_CHAINS = "mobile/store/chain_hq_chains";
/**
*
*/
public static final String STORE_RENEW_SYS = "mobile/store/renew_sys";
/**
*
*/
public static final String STORE_RENEW_SMS = "mobile/store/renew_sms";
}
/**
*
* @author <a href="mailto:bing_ge@kingdee.com">bing_ge@kingdee.com</a> 2015年11月26日
*/
class AgentDetail {
/** 渠道个人账户页面(已审核) */
public static final String INDEX = "mobile/agent/index";
/** 渠道个人账户页面(审核中) */
public static final String APPLY_INFO = "mobile/agent/applyInfo";
/**
*
*/
public static final String INFO = "mobile/agent/info";
/**
*
*/
public static final String NEW_STORE_SELF = "mobile/agent/new_store_self";
/**
*
*/
public static final String NEW_STORE_OTHER = "mobile/agent/new_store_other";
/**
*
*/
public static final String STORE_NORMAL = "mobile/agent/store_normal";
/**
*
*/
public static final String STORE_RENEW = "mobile/agent/store_renew";
/**
*
*/
public static final String STORE_OVER = "mobile/agent/store_over";
/**
*
*/
public static final String STORE_MY_RECOMMEND = "mobile/agent/store_my_recommend";
/**
*
*/
public static final String AGENT_MY_RECOMMEND = "mobile/agent/agent_my_recommend";
/**
*
*/
public static final String STORE_RECOMMEMND_TO_ME = "mobile/agent/store_recommend_me";
/**
*
*/
public static final String INCOME = "mobile/agent/income";
}
/**
* 员工出勤记录
* @author lzc
*
*/
class AttendanceRecord {
/** 员工考勤首页 */
public static final String HOME = "employee/attendance/attendance";
}
/**
* 员工奖惩
* @author lzc
*
*/
class EmployeeReward {
/** 员工奖惩首页 */
public static final String HOME = "employee/rewards/rewards";
}
}
|
[
"xiajingsi00@163.com"
] |
xiajingsi00@163.com
|
f2a432a83cf5cfaf2b3b9bc4e7fffe5990766a7f
|
1d43a4deff6abc4926acfc933f065692dbac78da
|
/src/test/java/test/TestClass3.java
|
105a19f5c51ff931f4d2f576deb338bf593ceb89
|
[] |
no_license
|
Sonender/Comparision
|
1c75e8849baaa350bbf296b29814d5e0baa802a4
|
44bb12ee2264f00bc753d89d2981f82d4fdb833f
|
refs/heads/master
| 2020-12-30T14:19:37.213711
| 2017-05-15T07:17:36
| 2017-05-15T07:17:36
| 91,305,973
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 862
|
java
|
package test;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import pages.MakeMyTripPage;
import pages.OneMore;
import pages.ForBangalore;
import pages.ForKerala;
import pages.ForJaipur1;
import pages.IbiboTest;
public class TestClass3 {
RemoteWebDriver driver;
ForBangalore page = new ForBangalore();
@BeforeClass
public RemoteWebDriver initilizeBrowser()
{
driver=page.initializeBrowser("chrome");
return driver;
}
@AfterClass
public void closeBrowser()
{
page.closeBrowser();
}
@Test
public void runTest1()
{
try{
page.InitializeBookingBangalore(driver);
page.runTest();
}
catch(Exception e)
{System.out.println("Error"+e);}
}
}
|
[
"sonender.singh@Administrators-MacBook-Air-62.local"
] |
sonender.singh@Administrators-MacBook-Air-62.local
|
082ef10e0058ed5bebbc0006e436fed277b3e4e0
|
793a8adfe7e25e45b7a1fc0a2827aa6b5ffe36f2
|
/src/main/java/assignment1/response/ResponseBody.java
|
3350b68a0743b43a6abd4663032cc92704de0b52
|
[] |
no_license
|
laihaotao/COMP6461
|
ddd9a1f065a41a2c8b6ea0a9a637425cf6b9ce85
|
7a1d374c77b84c25fff3e2ffd3c960f6e5402100
|
refs/heads/master
| 2021-01-23T17:03:43.883830
| 2017-11-30T05:46:59
| 2017-11-30T05:46:59
| 102,753,964
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 366
|
java
|
package assignment1.response;
/**
* Author: Eric(Haotao) Lai
* Date: 2017-09-23
* E-mail: haotao.lai@gmail.com
* Website: http://laihaotao.me
*/
public class ResponseBody {
private String content;
public ResponseBody(String str) {
this.content = str;
}
@Override
public String toString() {
return content;
}
}
|
[
"haotao.lai@gmail.com"
] |
haotao.lai@gmail.com
|
cd8b2bae1d798bf6b83ae05fb202165635caea5a
|
f5f12b5bb94654dd0b18fdbed4e32f9368063695
|
/src/main/java/geo/yoyo/Report.java
|
e03062bb20c0345f5aa3b37fcb05bf2ffdeadb84
|
[] |
no_license
|
uponmylife/geo
|
118e71665280ea2be3aad3402ec8326420b8ae61
|
6bb6119f1a83485abfed442704caf5319033004c
|
refs/heads/master
| 2020-04-30T23:06:24.979522
| 2015-02-09T22:20:56
| 2015-02-09T22:20:56
| 30,489,804
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 546
|
java
|
package geo.yoyo;
import lombok.AllArgsConstructor;
import lombok.Data;
@Data
@AllArgsConstructor
public class Report {
private String range;
private int[] typeScore;
private int score;
public String getLevel() {
if (score < 50) return "FAT";
if (score < 75) return "ACTIVE";
if (score < 100) return "GOOD";
if (score < 125) return "HUMAN";
if (score < 150) return "MAN";
if (score < 175) return "CHARMER";
if (score < 200) return "ACTOR";
return "HERO";
}
}
|
[
"geo.c@daumkakao.com"
] |
geo.c@daumkakao.com
|
2906eca21435d1dd5e222ec5baf5b84016f992cc
|
a55b17cade9223c606daba730fb1b03ed6baa41f
|
/mockexercise5 mock/src/test/java/exercise5/TradeServiceTest.java
|
a2b3e1033bc70d2b22322f79c1407fe089e97c0e
|
[] |
no_license
|
enricoesposito/eelab-mockito
|
0d0360cddc8bb01fec86dc5fe506a70475bd151d
|
d868fd510742fad1bf206ff7d16b75b01510bccd
|
refs/heads/master
| 2020-03-13T09:03:53.501058
| 2018-04-25T20:08:23
| 2018-04-25T20:08:23
| 131,056,549
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,536
|
java
|
package exercise5;
import com.sun.org.glassfish.gmbal.ManagedObject;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.BDDMockito;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.runners.MockitoJUnitRunner;
@RunWith(MockitoJUnitRunner.class)
public class TradeServiceTest {
@Mock
private TradeRepository mockTradeRepository;
@Mock
private ReportValue dummyReportValue;
@Mock
private ReportService mockReportService;
private String isin;
private TradeService tradeService;
@Before
public void setUp(){
tradeService = new TradeService(mockTradeRepository, mockReportService);
isin = "EUR/USD";
}
// Stub variante responder
@Test
public void shouldReturnGiustoString() {
// Lo stub ci permette di impostare l'indirect input
BDDMockito.given(mockTradeRepository.read(Mockito.anyString())).willReturn(0.1);
// Mockito.when(stubTradeRepository.read(Mockito.anyString())).thenReturn(mockTradeResult);
String result = tradeService.save(isin, dummyReportValue);
Assert.assertEquals("Prezzo giusto", result);
// Utilizzo il verify sul mock per l'indirect output
BDDMockito.then(mockTradeRepository).should().read(Mockito.eq(isin));
BDDMockito.then(mockReportService).should().save(Mockito.eq(dummyReportValue));
Mockito.verify(mockReportService).save(Mockito.eq(dummyReportValue));
}
}
|
[
"enrico.esposito.14@gmail.com"
] |
enrico.esposito.14@gmail.com
|
7ccd9d86b5cbbe324665bc90a6c8c3b668fdb3d4
|
61e18036031535c069a12f031cf91578d598ef0f
|
/fyg-kq-kaoqin/src/main/java/cn/fyg/kq/interfaces/web/module/kqbusi/kaoqin/flow/DistributeSet.java
|
3fad1eeae4a4d9319fcb767f8dccec5a89bc125f
|
[] |
no_license
|
jarod-chan/fyg-kq-process
|
2eaa9e09ca372513a31eedf3dd3549d33f73f0e8
|
1006133bad57eef72c20bc9394c5420c52a7130a
|
refs/heads/master
| 2016-09-06T10:04:18.134900
| 2015-07-13T02:17:34
| 2015-07-13T02:17:34
| 38,910,978
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 360
|
java
|
package cn.fyg.kq.interfaces.web.module.kqbusi.kaoqin.flow;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.JavaDelegate;
public class DistributeSet implements JavaDelegate{
@Override
public void execute(DelegateExecution execution) throws Exception {
// TODO Auto-generated method stub
}
}
|
[
"jhon.chen@gmail.com"
] |
jhon.chen@gmail.com
|
b32f5d304cfacfc079c0cdfc27367c7a0a899e12
|
d745e9a72c6fdf9a2631f5436dcdf98dab1a8a46
|
/gimnasio-backend/src/main/java/co/edu/uniandes/baco/gimnasio/persistence/EjercicioInstanciaPersistence.java
|
8293aab1e34100ea12ab6d9cccbc29cb3b9fcbba
|
[
"MIT"
] |
permissive
|
Uniandes-ISIS2603-backup/201720-s3_gimnasio
|
99d9a191a6157adc8098012c050d9d217abbf4d2
|
f24ccec40799805f0e95b84537742bfbd1a62f7c
|
refs/heads/master
| 2021-03-27T11:10:39.260973
| 2017-11-30T17:29:23
| 2017-11-30T17:29:23
| 101,682,505
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 598
|
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 co.edu.uniandes.baco.gimnasio.persistence;
import co.edu.uniandes.baco.gimnasio.entities.EjercicioInstanciaEntity;
import javax.ejb.Stateless;
/**
*
* @author jc.bojaca
*/
@Stateless
public class EjercicioInstanciaPersistence extends BasePersistence<EjercicioInstanciaEntity> {
public EjercicioInstanciaPersistence() {
super(EjercicioInstanciaEntity.class);
}
}
|
[
"jc.bojaca@ISIS2603S3-0023.sis.virtual.uniandes.edu.co"
] |
jc.bojaca@ISIS2603S3-0023.sis.virtual.uniandes.edu.co
|
092ea9dfc09cc8c2ba1ce87a6c2b7e52adefa516
|
d6484b4364a2204d9d09bb7077d7ea07c17fcfb3
|
/src/ta/example/interfaces/FileHandlerImpl.java
|
e9b0c3f48412d8fe0bb26891e351bab68a519c40
|
[] |
no_license
|
RMSnow/iss-exp-1
|
ed36782c3cfd05a6687550fe7dce3cbcb3e34c31
|
808fbd6bff8acfb454b6903405effe93a3ceca3b
|
refs/heads/master
| 2021-07-23T14:09:02.977997
| 2017-11-02T06:36:59
| 2017-11-02T06:36:59
| 108,118,568
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,107
|
java
|
package ta.example.interfaces;
import ta.example.vo.StockInfo;
import java.io.*;
import java.util.ArrayList;
public class FileHandlerImpl implements FileHandler {
public StockInfo[] getStockInfoFromFile(String filePath) {
try {
FileInputStream inputStream = new FileInputStream(filePath);
InputStreamReader inputStreamReader = new InputStreamReader(inputStream, "UTF-8");
BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
String templine = "";
String[] arrs = null;
int line = 0;
ArrayList<StockInfo> stockInfos = new ArrayList<>();
while ((templine = bufferedReader.readLine()) != null) {
line++;
if (line == 1) continue;
StockInfo tempInfo = new StockInfo();
arrs = templine.split("\t");
tempInfo.id = Integer.parseInt(arrs[0]);
tempInfo.title = arrs[1];
tempInfo.author = arrs[2];
tempInfo.date = arrs[3];
tempInfo.lastupdate = arrs[4];
tempInfo.content = arrs[5];
tempInfo.answerauthor = arrs[6];
tempInfo.answer = arrs[7];
stockInfos.add(tempInfo);
}
bufferedReader.close();
inputStreamReader.close();
inputStream.close();
return stockInfos.toArray(new StockInfo[stockInfos.size()]);
} catch (FileNotFoundException e) {
System.out.println("The file " + filePath + " doesn't exist.");
e.printStackTrace();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
public int setStockInfo2File(String filePath, StockInfo[] stocks) {
try {
FileOutputStream fileOutputStream = new FileOutputStream(new File(filePath));
OutputStreamWriter outputStreamWriter = new OutputStreamWriter(fileOutputStream);
BufferedWriter bufferedWriter = new BufferedWriter(outputStreamWriter);
bufferedWriter.write("ID\tTITLE\tAUTHOR\tDATE\tLASTUPDATE" +
"\tCONTENT\tANSWERAUTHOR\tANSWER\n");
int line = 1;
for (StockInfo stock : stocks) {
bufferedWriter.write(stock.id + "\t" + stock.title + "\t" + stock.author
+ "\t" + stock.date + "\t" + stock.lastupdate + "\t" + stock.content
+ "\t" + stock.answerauthor + "\t" + stock.answer + "\n");
line++;
}
bufferedWriter.close();
outputStreamWriter.close();
fileOutputStream.close();
return line;
} catch (FileNotFoundException e) {
System.out.println("The file " + filePath + " doesn't exist.");
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return -1;
}
}
|
[
"xueyao_98@foxmail.com"
] |
xueyao_98@foxmail.com
|
89e0d405ed1db858c4fc1bef4e7dabd8c33c2f6a
|
08b8d598fbae8332c1766ab021020928aeb08872
|
/src/gcom/relatorio/cobranca/parcelamento/RelatorioRelacaoParcelamento.java
|
4d7fcce3f9972f1125165124f8b18d795549a921
|
[] |
no_license
|
Procenge/GSAN-CAGEPA
|
53bf9bab01ae8116d08cfee7f0044d3be6f2de07
|
dfe64f3088a1357d2381e9f4280011d1da299433
|
refs/heads/master
| 2020-05-18T17:24:51.407985
| 2015-05-18T23:08:21
| 2015-05-18T23:08:21
| 25,368,185
| 3
| 1
| null | null | null | null |
WINDOWS-1252
|
Java
| false
| false
| 9,404
|
java
|
/*
* Copyright (C) 2007-2007 the GSAN – Sistema Integrado de Gestão de Serviços de Saneamento
*
* This file is part of GSAN, an integrated service management system for Sanitation
*
* GSAN 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 2 of the License.
*
* GSAN 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, write to the Free Software
* Foundation, Inc., 59 Temple Place – Suite 330, Boston, MA 02111-1307, USA
*/
/*
* GSAN – Sistema Integrado de Gestão de Serviços de Saneamento
* Copyright (C) <2007>
* Adriano Britto Siqueira
* Alexandre Santos Cabral
* Ana Carolina Alves Breda
* Ana Maria Andrade Cavalcante
* Aryed Lins de Araújo
* Bruno Leonardo Rodrigues Barros
* Carlos Elmano Rodrigues Ferreira
* Cláudio de Andrade Lira
* Denys Guimarães Guenes Tavares
* Eduardo Breckenfeld da Rosa Borges
* Fabíola Gomes de Araújo
* Flávio Leonardo Cavalcanti Cordeiro
* Francisco do Nascimento Júnior
* Homero Sampaio Cavalcanti
* Ivan Sérgio da Silva Júnior
* José Edmar de Siqueira
* José Thiago Tenório Lopes
* Kássia Regina Silvestre de Albuquerque
* Leonardo Luiz Vieira da Silva
* Márcio Roberto Batista da Silva
* Maria de Fátima Sampaio Leite
* Micaela Maria Coelho de Araújo
* Nelson Mendonça de Carvalho
* Newton Morais e Silva
* Pedro Alexandre Santos da Silva Filho
* Rafael Corrêa Lima e Silva
* Rafael Francisco Pinto
* Rafael Koury Monteiro
* Rafael Palermo de Araújo
* Raphael Veras Rossiter
* Roberto Sobreira Barbalho
* Rodrigo Avellar Silveira
* Rosana Carvalho Barbosa
* Sávio Luiz de Andrade Cavalcante
* Tai Mu Shih
* Thiago Augusto Souza do Nascimento
* Tiago Moreno Rodrigues
* Vivianne Barbosa Sousa
*
* Este programa é software livre; você pode redistribuí-lo e/ou
* modificá-lo sob os termos de Licença Pública Geral GNU, conforme
* publicada pela Free Software Foundation; versão 2 da
* Licença.
* Este programa é distribuído na expectativa de ser útil, mas SEM
* QUALQUER GARANTIA; sem mesmo a garantia implícita de
* COMERCIALIZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM
* PARTICULAR. Consulte a Licença Pública Geral GNU para obter mais
* detalhes.
* Você deve ter recebido uma cópia da Licença Pública Geral GNU
* junto com este programa; se não, escreva para Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307, USA.
*/
package gcom.relatorio.cobranca.parcelamento;
import gcom.batch.Relatorio;
import gcom.cadastro.sistemaparametro.SistemaParametro;
import gcom.fachada.Fachada;
import gcom.relatorio.ConstantesRelatorios;
import gcom.relatorio.RelatorioDataSource;
import gcom.relatorio.RelatorioVazioException;
import gcom.seguranca.acesso.usuario.Usuario;
import gcom.tarefa.TarefaException;
import gcom.tarefa.TarefaRelatorio;
import gcom.util.ControladorException;
import gcom.util.Util;
import gcom.util.agendadortarefas.AgendadorTarefas;
import java.math.BigDecimal;
import java.util.*;
/**
* classe responsável por criar o relatório de
* [UC0580]Emitir Protocolo de Documento de Cobrança do Cronogrma
*
* @author Ana Maria
* @date 05/10/06
*/
public class RelatorioRelacaoParcelamento
extends TarefaRelatorio {
/**
*
*/
private static final long serialVersionUID = 1L;
public RelatorioRelacaoParcelamento(Usuario usuario) {
super(usuario, ConstantesRelatorios.RELATORIO_EMITIR_PROTOCOLO_DOCUMENTO_COBRANCA);
}
@Deprecated
public RelatorioRelacaoParcelamento() {
super(null, "");
}
private Collection<RelatorioRelacaoParcelamentoBean> inicializarBeanRelatorio(
Collection<RelacaoParcelamentoRelatorioHelper> dadosRelatorio){
Collection<RelatorioRelacaoParcelamentoBean> retorno = new ArrayList();
Iterator iterator = dadosRelatorio.iterator();
while(iterator.hasNext()){
RelacaoParcelamentoRelatorioHelper helper = (RelacaoParcelamentoRelatorioHelper) iterator.next();
String situacao = "";
if(helper.getSituacao() != null){
situacao = helper.getSituacao();
}
String localidade = "";
if(helper.getLocalidade() != null){
localidade = helper.getIdGerencia() + "-" + helper.getGerencia() + "/" + helper.getLocalidade();
}
String cliente = "";
String telefone = "";
if(helper.getCliente() != null){
cliente = helper.getCliente();
if(helper.getTelefone() != null){
telefone = helper.getDdd() + " " + helper.getTelefone();
}
}
String matricula = "";
if(helper.getMatricula() != null){
matricula = helper.getMatricula().toString();
}
// String idParcelamento = "";
// if(helper.getParcelamento() != null){
// idParcelamento = helper.getParcelamento().toString();
// }
BigDecimal valorDebito = new BigDecimal("0.00");
if(helper.getDebitoTotal() != null){
valorDebito = helper.getDebitoTotal();
}
BigDecimal valorEntrada = new BigDecimal("0.00");
if(helper.getValorEntrada() != null){
valorEntrada = helper.getValorEntrada();
}
BigDecimal valorParcelas = new BigDecimal("0.00");
if(helper.getValorParcelamento() != null){
valorParcelas = helper.getValorParcelamento();
}
String dataParcelamento = "";
if(helper.getDataParcelamento() != null){
dataParcelamento = Util.formatarData(helper.getDataParcelamento());
}
// String vencimento = "";
// if(helper.getVencimento() != null){
// vencimento = helper.getVencimento().toString();
// // vencimento = vencimento.substring(0, 2);
// }
String numeroParcelas = "";
if(helper.getNumeroParcelamento() != null){
numeroParcelas = helper.getNumeroParcelamento().toString();
}
String idLocalidade = "";
if(helper.getIdLocalidade() != null){
idLocalidade = helper.getIdLocalidade().toString();
}
String idGerencia = "";
if(helper.getIdGerencia() != null){
idGerencia = helper.getIdGerencia().toString();
}
String gerencia = "";
if(helper.getGerencia() != null){
gerencia = helper.getIdGerencia() + "-" + helper.getGerencia();
}
String unidade = "";
if(helper.getUnidade() != null){
unidade = helper.getUnidade();
}
String ultimaAlteracao = "";
if(helper.getUltimaAlteracao() != null){
ultimaAlteracao = Util.formatarData(helper.getUltimaAlteracao());
}
RelatorioRelacaoParcelamentoBean bean = new RelatorioRelacaoParcelamentoBean(situacao, localidade, cliente, telefone,
matricula, valorDebito, valorEntrada, valorParcelas, dataParcelamento,
numeroParcelas, idLocalidade, idGerencia, gerencia, unidade, ultimaAlteracao);
retorno.add(bean);
}
return retorno;
}
/**
* Método que executa a tarefa
*
* @return Object
*/
public Object executar() throws TarefaException{
// ------------------------------------
Integer idFuncionalidadeIniciada = this.getIdFuncionalidadeIniciada();
// ------------------------------------
Collection dadosRelatorio = (Collection) getParametro("colecaoRelacaoParcelamento");
int tipoFormatoRelatorio = (Integer) getParametro("tipoFormatoRelatorio");
String cabecalho = (String) getParametro("cabecalho");
String faixaValores = (String) getParametro("faixaValores");
String periodo = (String) getParametro("periodo");
// valor de retorno
byte[] retorno = null;
Fachada fachada = Fachada.getInstancia();
// Parâmetros do relatório
Map parametros = new HashMap();
SistemaParametro sistemaParametro = fachada.pesquisarParametrosDoSistema();
parametros.put("imagem", sistemaParametro.getImagemRelatorio());
parametros.put("cabecalho", cabecalho);
parametros.put("faixaValores", faixaValores);
parametros.put("periodo", periodo);
parametros.put("numeroRelatorio", "O0594");
parametros.put("P_NM_ESTADO", sistemaParametro.getNomeEstado());
Collection<RelatorioRelacaoParcelamentoBean> colecaoBean = this.inicializarBeanRelatorio(dadosRelatorio);
if(colecaoBean == null || colecaoBean.isEmpty()){
// Não existem dados para a exibição do relatório.
throw new RelatorioVazioException("atencao.relatorio.vazio");
}
RelatorioDataSource ds = new RelatorioDataSource((List) colecaoBean);
retorno = this.gerarRelatorio(ConstantesRelatorios.RELATORIO_RELACAO_PARCELAMENTO, parametros, ds, tipoFormatoRelatorio);
// ------------------------------------
// Grava o relatório no sistema
try{
persistirRelatorioConcluido(retorno, Relatorio.RELACAO_PARCELAMENTO, idFuncionalidadeIniciada, null);
}catch(ControladorException e){
e.printStackTrace();
throw new TarefaException("Erro ao gravar relatório no sistema", e);
}
// ------------------------------------
// retorna o relatório gerado
return retorno;
}
@Override
public int calcularTotalRegistrosRelatorio(){
int retorno = 0;
// retorno = ((Collection) getParametro("idsGuiaDevolucao")).size();
return retorno;
}
@Override
public void agendarTarefaBatch(){
AgendadorTarefas.agendarTarefa("RelatorioRelacaoParcelamento", this);
}
}
|
[
"Yara.Souza@procenge.com.br"
] |
Yara.Souza@procenge.com.br
|
6bead0c5a4b280361ae793f94c0f20dc4cd878b0
|
e81d2ab2b8ea9a4a8b50a89f9843f719c1a592d4
|
/abagail/src/main/java/dist/Distribution.java
|
0f8fef3ed00a71f4253d654fafb7aab5babd31e3
|
[] |
no_license
|
adhiravishankar/ml-random-algorithms
|
bb52501e7c3ad4e08d8230b927ccc47e23bf8d0c
|
0ee69b513ca8c49032e2967a09b55407637edf79
|
refs/heads/master
| 2021-04-09T13:19:42.725958
| 2018-03-12T02:40:22
| 2018-03-12T02:40:22
| 124,731,274
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,332
|
java
|
package dist;
import java.io.Serializable;
import java.util.Random;
import shared.DataSet;
import shared.Instance;
/**
* A interface for distributions
* @author Andrew Guillory gtg008g@mail.gatech.edu
* @version 1.0
*/
public interface Distribution extends Serializable {
/**
* A random number generator
*/
Random random = new Random();
/**
* Get the probability of i
* @param i the discrete value to get the probability of
* @return the probability of i
*/
double p(Instance i);
/**
* Calculate the log likelihood
* @param i the instance
* @return the log likelihood
*/
double logp(Instance i);
/**
* Generate a random value
* @param i the conditional values or null
* @return the value
*/
Instance sample(Instance i);
/**
* Generate a random value
* @return the value
*/
Instance sample();
/**
* Get the mode of the distribution
* @param i the instance
* @return the mode
*/
Instance mode(Instance i);
/**
* Get the mode of the distribution
* @return the mode
*/
Instance mode();
/**
* Estimate the distribution from data
* @param set the data set to estimate from
*/
void estimate(DataSet set);
}
|
[
"adhiravishankar@gmail.com"
] |
adhiravishankar@gmail.com
|
6688ad579d3f91f1ce6a24cf37c9ed609be41c17
|
678a3d58c110afd1e9ce195d2f20b2531d45a2e0
|
/sources/com/airbnb/android/react/maps/LatLngBoundsUtils.java
|
595ba8a7a6067de8bf407b43d3cbd16939a1db92
|
[] |
no_license
|
jasonnth/AirCode
|
d1c37fb9ba3d8087efcdd9fa2103fb85d13735d5
|
d37db1baa493fca56f390c4205faf5c9bbe36604
|
refs/heads/master
| 2020-07-03T08:35:24.902940
| 2019-08-12T03:34:56
| 2019-08-12T03:34:56
| 201,842,970
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,644
|
java
|
package com.airbnb.android.react.maps;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.LatLngBounds;
public class LatLngBoundsUtils {
public static boolean BoundsAreDifferent(LatLngBounds a, LatLngBounds b) {
LatLng centerA = a.getCenter();
double latA = centerA.latitude;
double lngA = centerA.longitude;
double latDeltaA = a.northeast.latitude - a.southwest.latitude;
double lngDeltaA = a.northeast.longitude - a.southwest.longitude;
LatLng centerB = b.getCenter();
double latB = centerB.latitude;
double lngB = centerB.longitude;
double latDeltaB = b.northeast.latitude - b.southwest.latitude;
double lngDeltaB = b.northeast.longitude - b.southwest.longitude;
double latEps = LatitudeEpsilon(a, b);
double lngEps = LongitudeEpsilon(a, b);
return different(latA, latB, latEps) || different(lngA, lngB, lngEps) || different(latDeltaA, latDeltaB, latEps) || different(lngDeltaA, lngDeltaB, lngEps);
}
private static boolean different(double a, double b, double epsilon) {
return Math.abs(a - b) > epsilon;
}
private static double LatitudeEpsilon(LatLngBounds a, LatLngBounds b) {
return Math.min(Math.abs(a.northeast.latitude - a.southwest.latitude), Math.abs(b.northeast.latitude - b.southwest.latitude)) / 2560.0d;
}
private static double LongitudeEpsilon(LatLngBounds a, LatLngBounds b) {
return Math.min(Math.abs(a.northeast.longitude - a.southwest.longitude), Math.abs(b.northeast.longitude - b.southwest.longitude)) / 2560.0d;
}
}
|
[
"thanhhuu2apc@gmail.com"
] |
thanhhuu2apc@gmail.com
|
732622fb5001a24bb383833743f0a25e96cad41f
|
42dd07f872f70cbc1f8378122666b41f6c9d08c1
|
/src/test/com/test/JunitTest.java
|
573331c35ede39cf6aab884b31d4249b7ce59229
|
[] |
no_license
|
probie6/springbootDemo
|
b3345141ed69a544f39c26199f6f4f9a68d85388
|
6665447a8d269508ddbf9f46e3a9043d40e56bd3
|
refs/heads/master
| 2020-04-24T00:59:07.327873
| 2019-02-20T02:00:35
| 2019-02-20T02:00:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 496
|
java
|
/*
package com.test;
import org.joda.time.DateTime;
import org.junit.Test;
import java.io.File;
import java.io.FileWriter;
public class JunitTest {
@Test
public void test() throws Exception{
*/
/*File file = new File("d://log.txt");
String s = DateTime.now().toString("YYYY-MM-dd");
System.out.println(s);
FileWriter fileWriter=new FileWriter(file,true);
fileWriter.write("asdfasdfasdfsadf\r\n");
fileWriter.flush();*//*
}
}
*/
|
[
"731746237@qq.com"
] |
731746237@qq.com
|
8dd15b9fbad2cb3349c77eae80f96deb4e46f437
|
32e28106e02043778e2c3b06522f85289dbcb6f3
|
/src/Uebungsblatt4/Demo.java
|
e5a4a9dbe2de41518f9efecaa730c56f60441218
|
[] |
no_license
|
keni21/UebungsKlausurSS16
|
7d6fd3fcd62857b0b5814224204874a3aba19b48
|
6fbb0af0295e5728bc613f255f6d528a6cfd8a4f
|
refs/heads/master
| 2021-01-01T05:15:28.989291
| 2016-05-08T15:47:55
| 2016-05-08T15:47:55
| 58,069,732
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,582
|
java
|
package Uebungsblatt4;
import java.util.ArrayList;
public class Demo {
public static void main(String[] args) {
Kredit kredit1=new Kredit("Max Muster", "2014-12-24", 4000, 20, 200);
Kredit kredit2=new Kredit("Mix Muster", "2014-12-26", 5000, 5, 1000);
Kredit kredit3=new Kredit("Mux Muster", "2014-12-24", 7000, 14, 500);
ArrayList<Kredit> listkredit=new ArrayList<>();
listkredit.add(kredit1);
listkredit.add(kredit2);
listkredit.add(kredit3);
Bank list =new Bank(listkredit);
//list.getKredit();
// for (Kredit kredit : listkredit) {
// System.out.println(kredit);
// }
//
// System.out.println("______________________________________________________________________________________________________________________________________________________________________");
// list.getNaechsteKreditFaellig();
// for (Kredit kredit : listkredit) {
// System.out.println(kredit);
// }
// System.out.println("______________________________________________________________________________________________________________________________________________________________________");
list.deductAll();
list.deductAll();
list.deductAll();
list.deductAll();
list.deductAll();
list.deductAll();
list.deductAll();
list.deductAll();
list.deductAll();
list.deductAll();
list.deductAll();
list.deductAll();
list.deductAll();
list.deductAll();
list.deductAll();
//list.deductAll();
for (Kredit kredit : listkredit) {
System.out.println(kredit);
}
}
}
|
[
"david@WINDELL-2VK3UMC.home"
] |
david@WINDELL-2VK3UMC.home
|
b8c47fffa495342daca5f8f5d409d7a11fbce846
|
131d39303b54a0cfc2001a1b3181656297b9f183
|
/src/test/java/page1/App_page.java
|
75aa3ea14be1d8166a21535153ba2bb147c8a721
|
[] |
no_license
|
bamboo1991/Appium-Mod-testing-
|
32fad9560c06ac3160ebebd1cc6048ce4cc21c0b
|
a509bb056b849878a1d04c140e45dcd4381c83ae
|
refs/heads/master
| 2022-12-29T13:49:03.366439
| 2020-04-25T20:41:00
| 2020-04-25T20:41:00
| 257,174,277
| 0
| 0
| null | 2020-10-13T21:20:17
| 2020-04-20T04:49:29
|
Java
|
UTF-8
|
Java
| false
| false
| 1,330
|
java
|
package page1;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import io.appium.java_client.pagefactory.AndroidFindBy;
import io.appium.java_client.pagefactory.AppiumFieldDecorator;
import org.openqa.selenium.support.PageFactory;
public class App_page {
private AndroidDriver<AndroidElement> driver;
public App_page(AndroidDriver<AndroidElement> driver) {
this.driver = driver;
PageFactory.initElements(new AppiumFieldDecorator(driver), this);
}
@AndroidFindBy(uiAutomator = "text(\"General Store\")")
public AndroidElement generalStore;
@AndroidFindBy(uiAutomator = "text(\"Select the country where you want to shop\")")
public AndroidElement countryTitle;
@AndroidFindBy(uiAutomator = "text(\"Your Name\")")
public AndroidElement nameText;
@AndroidFindBy(uiAutomator = "text(\"Gender\")")
public AndroidElement genderText;
@AndroidFindBy(uiAutomator = "text(\"Afghanistan\")")
public AndroidElement defaultCountry;
@AndroidFindBy(uiAutomator = "text(\"Enter name here\")")
public AndroidElement nameFieldText;
@AndroidFindBy(uiAutomator = "text(\"Male\")")
public AndroidElement maleText;
@AndroidFindBy(uiAutomator = "text(\"Female\")")
public AndroidElement FemaleText;
}
|
[
"stamovuber@gmail.com"
] |
stamovuber@gmail.com
|
789c66335e968fc1082cae52eb4531509129a180
|
253f1283c27435fa990d8fc247d4265007d12525
|
/src/main/java/io/github/crystic/oreganic/container/ContainerBasicMineralExtractor.java
|
d314117fbb354b33ab29f730929b6dd9d10a4754
|
[
"MIT"
] |
permissive
|
Crystastic/Minecraft1.8Mod-Oreganic
|
984d04be790788198557a6d9fff128df8e4d75c9
|
dbbe5d51cb56bc3db52c2f3758fa3de388148739
|
refs/heads/master
| 2020-12-02T11:29:11.271973
| 2017-07-08T20:32:27
| 2017-07-08T20:32:27
| 96,642,777
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,617
|
java
|
package io.github.crystic.oreganic.container;
import io.github.crystic.oreganic.slot.SlotMEFuel;
import io.github.crystic.oreganic.slot.SlotMEMineral;
import io.github.crystic.oreganic.tileentity.TileEntityBasicMineralExtractor;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.Slot;
import net.minecraft.inventory.SlotFurnace;
import net.minecraft.item.ItemStack;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ContainerBasicMineralExtractor extends Container {
private TileEntityBasicMineralExtractor basicMineralExtractor;
public int lastBurnTime;
public int lastCurrentItemBurnTime;
public int lastCookTime;
public ContainerBasicMineralExtractor(InventoryPlayer inventory, TileEntityBasicMineralExtractor tileentity) {
this.basicMineralExtractor = tileentity;
this.addSlotToContainer(new SlotMEMineral(inventory.player, tileentity, 0, 48, 34));
this.addSlotToContainer(new SlotMEFuel(inventory.player, tileentity, 1, 17, 54));
this.addSlotToContainer(new SlotFurnace(inventory.player, tileentity,
2, 104, 34));
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 9; j++) {
this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9,
8 + j * 18, 84 + i * 18));
}
}
for (int i = 0; i < 9; i++) {
this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 142));
}
}
public void addCraftingToCrafters(ICrafting icrafting) {
super.addCraftingToCrafters(icrafting);
icrafting
.sendProgressBarUpdate(this, 0, this.basicMineralExtractor.cookTime);
icrafting
.sendProgressBarUpdate(this, 1, this.basicMineralExtractor.burnTime);
icrafting.sendProgressBarUpdate(this, 2,
this.basicMineralExtractor.currentItemBurnTime);
}
public void detectAndSendChanges() {
super.detectAndSendChanges();
for (int i = 0; i < this.crafters.size(); i++) {
ICrafting icrafting = (ICrafting) this.crafters.get(i);
if (this.lastCookTime != this.basicMineralExtractor.cookTime) {
icrafting.sendProgressBarUpdate(this, 0,
this.basicMineralExtractor.cookTime);
}
if (this.lastBurnTime != this.basicMineralExtractor.burnTime) {
icrafting.sendProgressBarUpdate(this, 1,
this.basicMineralExtractor.burnTime);
}
if (this.lastCurrentItemBurnTime != this.basicMineralExtractor.currentItemBurnTime) {
icrafting.sendProgressBarUpdate(this, 2,
this.basicMineralExtractor.currentItemBurnTime);
}
}
this.lastCookTime = this.basicMineralExtractor.cookTime;
this.lastBurnTime = this.basicMineralExtractor.burnTime;
this.lastCurrentItemBurnTime = this.basicMineralExtractor.currentItemBurnTime;
}
@SideOnly(Side.CLIENT)
public void updateProgressBar(int par1, int par2) {
if (par1 == 0) {
this.basicMineralExtractor.cookTime = par2;
}
if (par1 == 1) {
this.basicMineralExtractor.burnTime = par2;
}
if (par1 == 2) {
this.basicMineralExtractor.currentItemBurnTime = par2;
}
}
@Override
public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int slotNum) {
ItemStack itemstack = null;
Slot slot = (Slot) this.inventorySlots.get(slotNum);
if (slot != null && slot.getHasStack()) {
ItemStack itemstack1 = slot.getStack();
itemstack = itemstack1.copy();
if (slotNum == 2) {
if (!this.mergeItemStack(itemstack1, 3, 39, true)) {
return null;
}
slot.onSlotChange(itemstack1, itemstack);
} else if (slotNum != 1 && slotNum != 0) {
if (TileEntityBasicMineralExtractor.isItemInput(itemstack1)) {
if (!this.mergeItemStack(itemstack1, 0, 1, false)) {
return null;
}
} else if (TileEntityBasicMineralExtractor.isItemFuel(itemstack1)) {
if (!this.mergeItemStack(itemstack1, 1, 2, false)) {
return null;
}
} else if (slotNum >= 3 && slotNum < 30) {
if (!this.mergeItemStack(itemstack1, 30, 39, false)) {
return null;
}
} else if (slotNum >= 30 && slotNum < 39 && !this.mergeItemStack(itemstack1, 3, 30, false)) {
return null;
}
} else if (!this.mergeItemStack(itemstack1, 3, 39, false)) {
return null;
}
if (itemstack1.stackSize == 0) {
slot.putStack((ItemStack) null);
} else {
slot.onSlotChanged();
}
if (itemstack1.stackSize == itemstack.stackSize) {
return null;
}
slot.onPickupFromSlot(par1EntityPlayer, itemstack1);
}
return itemstack;
}
public boolean canInteractWith(EntityPlayer var1) {
return true;
}
}
|
[
"chrisedwicker@gmail.com"
] |
chrisedwicker@gmail.com
|
6f8f5094eeb80736ffb719364ec0645c1da65d68
|
2effcda1337c41033eb2234ac4d4e11268706877
|
/src/test/java/com/trading/gateway/binance/market/BinanceDiffDepth.java
|
52af09d5f5f4b33a22cb54bb2ff178c101807c4c
|
[] |
no_license
|
jfengan/Gateway
|
851fe7c66a342357824795cffd9d2e392c54c507
|
6a8a0579a8ca6bb2907dfc2dbeae7fa3023ca2ff
|
refs/heads/master
| 2023-08-26T16:41:42.671241
| 2021-10-04T11:32:14
| 2021-10-04T11:32:14
| 396,220,767
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 389
|
java
|
package com.trading.gateway.binance.market;
import com.trading.gateway.utils.websocket.Printer;
import com.trading.gateway.utils.websocket.SubscriptionClient;
public class BinanceDiffDepth {
public static void main(String[] args) {
SubscriptionClient client = SubscriptionClient.create();
client.subscribeDiffDepthEvent("btcusdt", Printer::logInfo, null);
}
}
|
[
"jfengan@connet.ust.hk"
] |
jfengan@connet.ust.hk
|
d76bfed6c75babdc8c1af140e98735c412eab7b7
|
3426da6090f2b3171340ba75adb04f965185699c
|
/cicMorGan/src/main/java/com/ztmg/cicmorgan/receive/MyReceiver.java
|
e5d59c64c79bb43554537b57838c6636893d18e8
|
[] |
no_license
|
menglongfengyuqing/cic-android
|
58a48504ff6b6d02ae6635d12c5a53d33feb46b6
|
e5e9bc9da36d102191b5fe0503ade6e818e91363
|
refs/heads/master
| 2022-07-17T10:14:58.090623
| 2020-05-12T08:13:24
| 2020-05-12T08:13:24
| 263,254,969
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,300
|
java
|
package com.ztmg.cicmorgan.receive;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import com.ztmg.cicmorgan.activity.MainActivity;
import com.ztmg.cicmorgan.activity.RollViewActivity;
import com.ztmg.cicmorgan.util.ExampleUtil;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.Iterator;
import cn.jpush.android.api.JPushInterface;
/**
* 自定义接收器
* <p>
* 如果不定义这个 Receiver,则:
* 1) 默认用户会打开主界面
* 2) 接收不到自定义消息
*/
public class MyReceiver extends BroadcastReceiver {
private static final String TAG = "JPush";
@Override
public void onReceive(Context context, Intent intent) {
Bundle bundle = intent.getExtras();
Log.d(TAG, "[MyReceiver] onReceive - " + intent.getAction() + ", extras: " + printBundle(bundle));
if (JPushInterface.ACTION_REGISTRATION_ID.equals(intent.getAction())) {
String regId = bundle.getString(JPushInterface.EXTRA_REGISTRATION_ID);
Log.d(TAG, "[MyReceiver] 接收Registration Id : " + regId);
//send the Registration Id to your server...
} else if (JPushInterface.ACTION_MESSAGE_RECEIVED.equals(intent.getAction())) {
Log.d(TAG, "[MyReceiver] 接收到推送下来的自定义消息: " + bundle.getString(JPushInterface.EXTRA_MESSAGE));
processCustomMessage(context, bundle);
} else if (JPushInterface.ACTION_NOTIFICATION_RECEIVED.equals(intent.getAction())) {
Log.d(TAG, "[MyReceiver] 接收到推送下来的通知");
int notifactionId = bundle.getInt(JPushInterface.EXTRA_NOTIFICATION_ID);
Log.d(TAG, "[MyReceiver] 接收到推送下来的通知的ID: " + notifactionId);
} else if (JPushInterface.ACTION_NOTIFICATION_OPENED.equals(intent.getAction())) {
Log.d(TAG, "[MyReceiver] 用户点击打开了通知");
String string = bundle.getString(JPushInterface.EXTRA_EXTRA);
// //打开自定义的Activity
// Intent i = new Intent(context, MainActivity.class);
// i.putExtras(bundle);
// //i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
// context.startActivity(i);
try {
JSONObject jsonObject = new JSONObject(string);
String Url = jsonObject.getString("Url");
//JPushEntity jPushEntity = GsonManager.fromJson(json, JPushEntity.class);
Intent noticeIntent = new Intent(context, RollViewActivity.class);
noticeIntent.putExtra("Url", Url);
noticeIntent.putExtras(bundle);
noticeIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
context.startActivity(noticeIntent);
} catch (JSONException e) {
e.printStackTrace();
}
} else if (JPushInterface.ACTION_RICHPUSH_CALLBACK.equals(intent.getAction())) {
Log.d(TAG, "[MyReceiver] 用户收到到RICH PUSH CALLBACK: " + bundle.getString(JPushInterface.EXTRA_EXTRA));
//在这里根据 JPushInterface.EXTRA_EXTRA 的内容处理代码,比如打开新的Activity, 打开一个网页等..
} else if (JPushInterface.ACTION_CONNECTION_CHANGE.equals(intent.getAction())) {
boolean connected = intent.getBooleanExtra(JPushInterface.EXTRA_CONNECTION_CHANGE, false);
Log.w(TAG, "[MyReceiver]" + intent.getAction() + " connected state change to " + connected);
} else {
Log.d(TAG, "[MyReceiver] Unhandled intent - " + intent.getAction());
}
}
// 打印所有的 intent extra 数据
private static String printBundle(Bundle bundle) {
StringBuilder sb = new StringBuilder();
for (String key : bundle.keySet()) {
if (key.equals(JPushInterface.EXTRA_NOTIFICATION_ID)) {
sb.append("\nkey:" + key + ", value:" + bundle.getInt(key));
} else if (key.equals(JPushInterface.EXTRA_CONNECTION_CHANGE)) {
sb.append("\nkey:" + key + ", value:" + bundle.getBoolean(key));
} else if (key.equals(JPushInterface.EXTRA_EXTRA)) {
if (bundle.getString(JPushInterface.EXTRA_EXTRA).isEmpty()) {
Log.i(TAG, "This message has no Extra data");
continue;
}
try {
JSONObject json = new JSONObject(bundle.getString(JPushInterface.EXTRA_EXTRA));
Iterator<String> it = json.keys();
while (it.hasNext()) {
String myKey = it.next().toString();
sb.append("\nkey:" + key + ", value: [" +
myKey + " - " + json.optString(myKey) + "]");
}
} catch (JSONException e) {
Log.e(TAG, "Get message extra JSON error!");
}
} else {
sb.append("\nkey:" + key + ", value:" + bundle.getString(key));
}
}
return sb.toString();
}
//send msg to MainActivity
private void processCustomMessage(Context context, Bundle bundle) {
if (MainActivity.isForeground) {
String message = bundle.getString(JPushInterface.EXTRA_MESSAGE);
String extras = bundle.getString(JPushInterface.EXTRA_EXTRA);
Intent msgIntent = new Intent(MainActivity.MESSAGE_RECEIVED_ACTION);
msgIntent.putExtra(MainActivity.KEY_MESSAGE, message);
if (!ExampleUtil.isEmpty(extras)) {
try {
JSONObject extraJson = new JSONObject(extras);
if (null != extraJson && extraJson.length() > 0) {
msgIntent.putExtra(MainActivity.KEY_EXTRAS, extras);
}
} catch (JSONException e) {
}
}
context.sendBroadcast(msgIntent);
}
}
}
|
[
"liyun@cicmorgan.com"
] |
liyun@cicmorgan.com
|
0ff46c2c8b1ad18a90dd5b8512d6d731ab72abbc
|
6f437fac5de2ec8b3f19be57f92ffe2ed6757301
|
/common-orm/src/main/java/jef/database/datasource/TomcatCpWrapper.java
|
44cf44601c558efd220160496e327e346548a091
|
[
"Apache-2.0"
] |
permissive
|
azureidea/ef-orm
|
9f37015565ea603085179a252594286618f2a6a8
|
8940b4d9727ac33d5e884461185423f2528d71b1
|
refs/heads/master
| 2021-01-18T07:55:58.301453
| 2016-06-26T16:45:14
| 2016-06-26T16:45:14
| 63,916,124
| 1
| 0
| null | 2016-07-22T02:11:29
| 2016-07-22T02:11:29
| null |
UTF-8
|
Java
| false
| false
| 1,880
|
java
|
package jef.database.datasource;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.Properties;
import javax.sql.DataSource;
import org.apache.tomcat.jdbc.pool.PoolConfiguration;
public class TomcatCpWrapper extends AbstractDataSource implements DataSourceWrapper{
org.apache.tomcat.jdbc.pool.DataSource datasource;
public TomcatCpWrapper() {
datasource = new org.apache.tomcat.jdbc.pool.DataSource();
}
public String getUrl() {
return datasource.getUrl();
}
public String getUser() {
return datasource.getUsername();
}
public String getPassword() {
return datasource.getPassword();
}
public String getDriverClass() {
return datasource.getDriverClassName();
}
public void setUrl(String url) {
datasource.setUrl(url);
}
public void setUser(String user) {
datasource.setUsername(user);
}
public void setPassword(String password) {
datasource.setPassword(password);
}
public void setDriverClass(String driverClassName) {
datasource.setDriverClassName(driverClassName);
}
public Properties getProperties() {
return new ReflectionProperties(PoolConfiguration.class, datasource.getPoolProperties());
}
public void putProperty(String key, Object value) {
new ReflectionProperties(PoolConfiguration.class, datasource.getPoolProperties()).put(key, value);
}
public Connection getConnection() throws SQLException {
return datasource.getConnection();
}
public Connection getConnection(String username, String password) throws SQLException {
return datasource.getConnection(username, password);
}
public boolean isConnectionPool() {
return true;
}
public void setWrappedDataSource(DataSource ds) {
datasource=(org.apache.tomcat.jdbc.pool.DataSource)ds;
}
@Override
protected Class<? extends DataSource> getWrappedClass() {
return org.apache.tomcat.jdbc.pool.DataSource.class;
}
}
|
[
"hzjiyi@gmail.com"
] |
hzjiyi@gmail.com
|
265c1dd563f4fc4ce9b3e2f24af20d79ea2c5678
|
ad5cd983fa810454ccbb8d834882856d7bf6faca
|
/platform/ext/platformservices/src/de/hybris/platform/order/strategies/impl/DefaultCreateQuoteSnapshotStrategy.java
|
63e4fbc04a1ec1cd0f31f4d9e4c3648a66d4feba
|
[] |
no_license
|
amaljanan/my-hybris
|
2ea57d1a4391c9a81c8f4fef7c8ab977b48992b8
|
ef9f254682970282cf8ad6d26d75c661f95500dd
|
refs/heads/master
| 2023-06-12T17:20:35.026159
| 2021-07-09T04:33:13
| 2021-07-09T04:33:13
| 384,177,175
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,364
|
java
|
/*
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
package de.hybris.platform.order.strategies.impl;
import static de.hybris.platform.servicelayer.util.ServicesUtil.validateParameterNotNullStandardMessage;
import de.hybris.platform.core.enums.QuoteState;
import de.hybris.platform.core.model.order.QuoteEntryModel;
import de.hybris.platform.core.model.order.QuoteModel;
import de.hybris.platform.order.strategies.CreateQuoteSnapshotStrategy;
import java.util.Optional;
/**
* The Class DefaultCreateQuoteSnapshotStrategy.
*/
public class DefaultCreateQuoteSnapshotStrategy
extends GenericAbstractOrderCloningStrategy<QuoteModel, QuoteEntryModel, QuoteModel>
implements CreateQuoteSnapshotStrategy
{
public DefaultCreateQuoteSnapshotStrategy()
{
super(QuoteModel.class, QuoteEntryModel.class, QuoteModel.class);
}
@Override
public QuoteModel createQuoteSnapshot(final QuoteModel quote, final QuoteState quoteState)
{
validateParameterNotNullStandardMessage("quote", quote);
validateParameterNotNullStandardMessage("quoteState", quoteState);
final QuoteModel quoteSnapshot = clone(quote, Optional.of(quote.getCode()));
quoteSnapshot.setState(quoteState);
quoteSnapshot.setVersion(Integer.valueOf(quote.getVersion().intValue() + 1));
postProcess(quote, quoteSnapshot);
return quoteSnapshot;
}
}
|
[
"amaljanan333@gmail.com"
] |
amaljanan333@gmail.com
|
a9c5fef5b46380067a1a1d599820eec46af4c440
|
a74f4e0d615f70d4748a21b77edd59e953f5b610
|
/app/src/main/java/com/admin/samplefblogin/ProfileActivity.java
|
cc787a26607e7d31f831f9b48b17bb2e738e83ca
|
[] |
no_license
|
Vin5Sas/SampleFirebaseLogin
|
a274a288155c73c00e094af8b0d55e93ee954d04
|
5298dd88801daff23ffd5e6b236b0b3421a688dd
|
refs/heads/master
| 2020-04-16T20:37:44.521607
| 2019-01-15T18:32:52
| 2019-01-15T18:32:52
| 165,902,804
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,432
|
java
|
package com.admin.samplefblogin;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
public class ProfileActivity extends AppCompatActivity {
private FirebaseAuth firebaseAuth;
Button logoutButton;
TextView userIDLabel;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_profile);
firebaseAuth = FirebaseAuth.getInstance();
FirebaseUser user = firebaseAuth.getCurrentUser();
logoutButton = (Button) findViewById(R.id.LogoutButton);
userIDLabel = (TextView) findViewById(R.id.UserIDLabel);
userIDLabel.setText(user.getEmail());
logoutButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
firebaseAuth.signOut();
finish();
Intent mainIntent = new Intent(getApplicationContext(),MainActivity.class);
Toast.makeText(getApplicationContext(),"Logged Out Successfully!",Toast.LENGTH_SHORT);
startActivity(mainIntent);
}
});
}
}
|
[
"visas98@gmail.com"
] |
visas98@gmail.com
|
e96332ed9ac69ff1c5871366a51c210750af0ab4
|
2c638d38b354fbc1cf8f756dac76b689822ba591
|
/Technical_Skill_Improvement_Tasks/src/Design Pattern/src/main/java/mt2/command/ex2/LocationImpl.java
|
486a6faf51751b8dddad578dd36893313c28eb9a
|
[] |
no_license
|
volkantolu/euler_projects
|
675b55474d167d0457487aa6a1e605b86ca881dc
|
34767d6a1bfc0139773301c193a61408a46be657
|
refs/heads/master
| 2021-01-22T22:03:10.705974
| 2017-07-16T10:56:34
| 2017-07-16T10:56:34
| 85,500,467
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 389
|
java
|
package mt2.command.ex2;
class LocationImpl implements Location{
private String location;
public LocationImpl(){ }
public LocationImpl(String newLocation){
location = newLocation;
}
public String getLocation(){ return location; }
public void setLocation(String newLocation){ location = newLocation; }
public String toString(){ return location; }
}
|
[
"volkantolu@gmail.com"
] |
volkantolu@gmail.com
|
e5db1c129b9eebb9bf2da23ae5ed200bdd74c392
|
be28a7b64a4030f74233a79ebeba310e23fe2c3a
|
/generated-tests/rmosa/tests/s1011/24_saxpath/evosuite-tests/com/werken/saxpath/XPathLexer_ESTest_scaffolding.java
|
233584641aa089703c730d05747c18cc553115bc
|
[
"MIT"
] |
permissive
|
blindsubmissions/icse19replication
|
664e670f9cfcf9273d4b5eb332562a083e179a5f
|
42a7c172efa86d7d01f7e74b58612cc255c6eb0f
|
refs/heads/master
| 2020-03-27T06:12:34.631952
| 2018-08-25T11:19:56
| 2018-08-25T11:19:56
| 146,074,648
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,258
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Thu Aug 23 09:51:11 GMT 2018
*/
package com.werken.saxpath;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.junit.AfterClass;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class XPathLexer_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "com.werken.saxpath.XPathLexer";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@AfterClass
public static void clearEvoSuiteFramework(){
Sandbox.resetDefaultSecurityManager();
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
setSystemProperties();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
java.lang.System.setProperty("file.encoding", "UTF-8");
java.lang.System.setProperty("java.awt.headless", "true");
java.lang.System.setProperty("java.io.tmpdir", "/tmp");
java.lang.System.setProperty("user.country", "US");
java.lang.System.setProperty("user.dir", "/home/ubuntu/evosuite_readability_gen/projects/24_saxpath");
java.lang.System.setProperty("user.home", "/home/ubuntu");
java.lang.System.setProperty("user.language", "en");
java.lang.System.setProperty("user.name", "ubuntu");
java.lang.System.setProperty("user.timezone", "Etc/UTC");
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(XPathLexer_ESTest_scaffolding.class.getClassLoader() ,
"com.werken.saxpath.Token",
"com.werken.saxpath.XPathLexer"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(XPathLexer_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"com.werken.saxpath.XPathLexer",
"com.werken.saxpath.Token"
);
}
}
|
[
"my.submission.blind@gmail.com"
] |
my.submission.blind@gmail.com
|
9bc3852309234f882ba3772aaa6585c17ca85807
|
11d154087964cb8756a2b3fc3833895fdb5e104b
|
/flixelgame/src/com/yourname/flixelgame/examples/particles/ParticleDemo.java
|
bed644ff5ac80af6c865ed4a847caf22961a5139
|
[
"Apache-2.0"
] |
permissive
|
jjhaggar/libGDX-flixel-test-autogenerated
|
c65feb6865a1fd28d469152454f08819c192edfb
|
5c7b0cbb245d7c693bd84baa744ea66030fd0b1e
|
refs/heads/master
| 2020-05-19T03:41:19.950326
| 2014-09-22T08:10:17
| 2014-09-22T08:10:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,084
|
java
|
package com.yourname.flixelgame.examples.particles;
import org.flixel.FlxGame;
/**
* In games, "particles" and "particle emitters" refer to a whole
* class of behaviors that are usually used for special effects and
* flavor. The "emitter" is the source and manager of the actual
* "particle" objects that are spewed out and/or floating around.
* FlxParticle is just an extension of FlxSprite, and FlxEmitter
* is just an extension of FlxGroup, so a particle system in Flixel
* isn't really that different from any normal group of sprites. It just
* adds some special behavior for creating and launching
* particles, and the particles themselves have some optional,
* special behavior to bounce more believably in platformer
* situations. FlxEmitter also has built-in variables that let you
* specify velocity ranges, rotation speeds, gravity, collision
* behaviors, and more.
*
* @author Zachary Travit
* @author Ka Wing Chin
*/
public class ParticleDemo extends FlxGame
{
public ParticleDemo()
{
super(400, 300, PlayState.class, 1, 30, 30);
}
}
|
[
"jjhaggar@gmail.com"
] |
jjhaggar@gmail.com
|
7f23732f8ead3225aa3af176aa912ca6a76faa7d
|
383907ab9b8a6491c687b493b8fe63ed211d8579
|
/src/main/java/cn/kcyf/pms/modular/business/controller/ContentController.java
|
76d9af8dde247b3832974d95ed6f991be3e2a4aa
|
[] |
no_license
|
bjzk2012/pms-master
|
c222d728d8fa3c75ef86199b88bb4e4dc6fcdbeb
|
b9d7c4aa96ece6bbe1c6b5ef27dcb8158b3f68ec
|
refs/heads/master
| 2022-05-17T16:30:14.335574
| 2019-11-01T02:05:31
| 2019-11-01T02:05:31
| 203,763,899
| 0
| 0
| null | 2022-03-31T18:53:20
| 2019-08-22T09:44:40
|
TSQL
|
UTF-8
|
Java
| false
| false
| 3,360
|
java
|
package cn.kcyf.pms.modular.business.controller;
import cn.kcyf.orm.jpa.criteria.Criteria;
import cn.kcyf.orm.jpa.criteria.Restrictions;
import cn.kcyf.pms.core.controller.BasicController;
import cn.kcyf.pms.core.enumerate.Status;
import cn.kcyf.pms.core.model.ResponseData;
import cn.kcyf.pms.modular.business.entity.Catalogue;
import cn.kcyf.pms.modular.business.entity.Content;
import cn.kcyf.pms.modular.business.entity.Mode;
import cn.kcyf.pms.modular.business.entity.ModeField;
import cn.kcyf.pms.modular.business.service.ContentService;
import cn.kcyf.pms.modular.business.service.ModeFieldService;
import cn.kcyf.pms.modular.business.service.ModeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@RequestMapping("/content")
@Api(tags = "内容管理", description = "内容管理")
public class ContentController extends BasicController {
@Autowired
private ModeService modeService;
@Autowired
private ModeFieldService modeFieldService;
@Autowired
private ContentService contentService;
private String PREFIX = "/modular/business/content/content/";
private void setModes(Model model){
Criteria<Mode> criteria = new Criteria<Mode>();
criteria.add(Restrictions.eq("status", Status.ENABLE));
model.addAttribute("modes", modeService.findList(criteria));
}
@GetMapping("")
@RequiresPermissions(value = "content")
public String index(Model model) {
setModes(model);
return PREFIX + "content.html";
}
@GetMapping("/content_add")
// @RequiresPermissions(value = "content_add")
public String contentAdd(Long modeId, Model model) {
Criteria<ModeField> criteria = new Criteria<ModeField>();
criteria.add(Restrictions.eq("mode.id", modeId));
criteria.add(Restrictions.eq("status", Status.ENABLE));
model.addAttribute("fields", modeFieldService.findList(criteria, new Sort(Sort.Direction.ASC, "sort")));
model.addAttribute("mode", modeService.getOne(modeId));
return PREFIX + "content_add.html";
}
@GetMapping("/content_edit")
// @RequiresPermissions(value = "content_edit")
public String contentUpdate(Long contentId, Model model) {
return PREFIX + "content_edit.html";
}
@GetMapping(value = "/list")
@ResponseBody
@ApiOperation("查询内容目录树形结构")
// @RequiresPermissions(value = "content_list")
public ResponseData list(String condition) {
Criteria<Content> criteria = new Criteria<Content>();
if (!StringUtils.isEmpty(condition)) {
criteria.add(Restrictions.or(Restrictions.like("subject", condition), Restrictions.like("text", condition)));
}
return ResponseData.list(contentService.findList(criteria));
}
}
|
[
"bjzk_2012_zk@163.com"
] |
bjzk_2012_zk@163.com
|
547a47b9bccbf2814c99fa80ec712a110ff4fbdb
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/actorapp--actor-platform/00d8bf64c793173cfb8f8912bf2f42cba199b6da/before/ConnectingStateChanged.java
|
c678faca995f3872ae9758ad71ded4649fb7da5b
|
[] |
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
| 590
|
java
|
package im.actor.core.modules.events;
import im.actor.runtime.eventbus.Event;
public class ConnectingStateChanged extends Event {
public static final String EVENT = "connecting_state_changed";
private boolean isConnecting;
public ConnectingStateChanged(boolean isConnecting) {
this.isConnecting = isConnecting;
}
public boolean isConnecting() {
return isConnecting;
}
@Override
public String getType() {
return EVENT;
}
@Override
public String toString() {
return EVENT + " {" + isConnecting + "}";
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
46962248c7c126b9e40e1c7f6b739a12d088f49d
|
2a51b18bdd39c550ff43e806050131c8d5fe218f
|
/com.demobank/src/main/java/com/demobank/domain/Customer.java
|
128ed23acf756d7a6015feeb1566821167aae9db
|
[] |
no_license
|
mvnguyen3/OnlineBankApp
|
9c81ab132bfe2a7193e6d7643681bfeb56654f3c
|
6392418988a5324de2c6bfb77ff4716f43cb9d66
|
refs/heads/master
| 2022-12-07T03:17:06.186696
| 2020-05-04T17:37:44
| 2020-05-04T17:37:44
| 218,149,068
| 1
| 0
| null | 2022-11-15T23:31:18
| 2019-10-28T21:30:56
|
Java
|
UTF-8
|
Java
| false
| false
| 3,196
|
java
|
package com.demobank.domain;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import org.springframework.format.annotation.DateTimeFormat;
@Entity(name = "customer") // Create table named customer
public class Customer {
@Id // Primary key
@GeneratedValue(strategy = GenerationType.IDENTITY) // Auto increment by SQL
private long customerId;
private String customerName;
private String customerEmail;
private String customerPhone;
private String customerGender;
private String customerSsn;
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
private String customerDob;
@Embedded // Depend on customer, does not require primary key
private Address address;
// 1 customer can have many accounts
@OneToMany
private Set<Account> customerAccounts = new HashSet<>();
@OneToOne
private User user;
public Customer() {
// TODO Auto-generated constructor stub
}
public long getCustomerId() {
return customerId;
}
public void setCustomerId(long customerId) {
this.customerId = customerId;
}
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
public String getCustomerEmail() {
return customerEmail;
}
public void setCustomerEmail(String customerEmail) {
this.customerEmail = customerEmail;
}
public String getCustomerPhone() {
return customerPhone;
}
public void setCustomerPhone(String customerPhone) {
this.customerPhone = customerPhone;
}
public String getCustomerGender() {
return customerGender;
}
public void setCustomerGender(String customerGender) {
this.customerGender = customerGender;
}
public String getCustomerSsn() {
return customerSsn;
}
public void setCustomerSsn(String customerSsn) {
this.customerSsn = customerSsn;
}
public String getCustomerDob() {
return customerDob;
}
public void setCustomerDob(String customerDob) {
this.customerDob = customerDob;
}
public Address getAddress() {
return address;
}
public void setAddress(Address address) {
this.address = address;
}
public Set<Account> getCustomerAccounts() {
return customerAccounts;
}
public void setCustomerAccounts(Set<Account> customerAccounts) {
this.customerAccounts = customerAccounts;
}
public User getUsers() {
return user;
}
public void setUsers(User user) {
this.user = user;
}
@Override
public String toString() {
return "Customer [customerId=" + customerId + ", customerName=" + customerName + ", customerEmail="
+ customerEmail + ", customerPhone=" + customerPhone + ", customerGender=" + customerGender
+ ", customerSsn=" + customerSsn + ", customerDob=" + customerDob + ", address=" + address
+ ", customerAccounts=" + customerAccounts + ", users=" + user + "]";
}
}
|
[
"mvnguy16@neiu.edu"
] |
mvnguy16@neiu.edu
|
0cb59f441885bdae069ddfc9246db5590ec87be9
|
73c84c1e8994bafa496306552542a31495c22ce6
|
/reposi/Rishikesh_Khire_assign3/src/taskmanager/filters/UserFilter.java
|
0d5f74b2e2a6abd72acfe2d967f3d706ca527685
|
[] |
no_license
|
rishik1/reposi
|
107dd6999b37e942426dfc0a7bce78fbc46b0cdb
|
a24be4e2edf6b674957b393431c74487f2caaedf
|
refs/heads/master
| 2021-01-02T23:07:10.050838
| 2017-05-11T06:33:14
| 2017-05-11T06:33:14
| 34,776,744
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 461
|
java
|
package taskmanager.filters;
import taskmanager.util.Logger;
/**
* UseFilter implements the Filter Interface
* it implements the filter method
* @author aashay-Rishikesh
*
*/
public class UserFilter implements Fileter {
public UserFilter()
{
Logger.dump(2, "IN the UserFilter constructor ");
}
/**
* This method sets the value tab3 for the UserFilter
*/
@Override
public String filter() {
return "tab3";
}
}
|
[
"rushikesh.khire@gmail.com"
] |
rushikesh.khire@gmail.com
|
01b33a17cc92b56490b0bd3916719e00283c15eb
|
47c5177fc6667ce608d39e0c061d872d174288b2
|
/src/at/easydiet/teamc/model/GenderBo.java
|
814467c4683903cdffb159de6c888320bd50bcf3
|
[] |
no_license
|
manuelTscholl/easydiet-team-c
|
3819ea56a703c90e23f928865a234e75643a60fb
|
4a65467e4022511cd9c0df040651faae65d6426c
|
refs/heads/master
| 2021-01-10T00:52:58.080446
| 2011-06-11T12:58:20
| 2011-06-11T12:58:20
| 32,137,119
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 999
|
java
|
package at.easydiet.teamc.model;
// Generated 02.04.2011 00:41:04 by Hibernate Tools 3.4.0.CR1
import at.easydiet.model.Gender;
/**
* GenderBo generated by hbm2java
*/
public class GenderBo implements java.io.Serializable, Saveable {
private Gender _Gender;
private GenderBo() {
}
public GenderBo(Gender gender) {
this._Gender = gender;
}
public GenderBo(String name) {
this(new Gender(name));
}
public String getName() {
return this.getGender().getName();
}
public void setName(String name) {
this.getGender().setName(name);
}
/**
* @return the _Gender
*/
protected Gender getGender() {
return _Gender;
}
/**
* @param Gender the _Gender to set
*/
public void setGender(Gender Gender) {
this._Gender = Gender;
}
@Override
public boolean save() {
throw new UnsupportedOperationException("Not supported yet.");
}
}
|
[
"manuel.tscholl@gmail.com@4feab3de-de25-87cd-0e07-2f1f9e466e77"
] |
manuel.tscholl@gmail.com@4feab3de-de25-87cd-0e07-2f1f9e466e77
|
99d1fdb73dc8a428022b101fe6fe98716d99d80f
|
1db33c1ff594468fb58f4ad892a102b04421eb67
|
/app/src/main/java/com/kpsoftwaresolutions/khealth/utils/QBEntityCallbackImpl.java
|
947a82ce3e85b16399ab4d359894494b3b22a9ed
|
[] |
no_license
|
nobeldhar/k-Health
|
a238e264cce0406ad851c0e1a590472489b44a40
|
e5dd49195b225a42da287350e3ea3942e9d94c5a
|
refs/heads/master
| 2022-12-21T05:45:29.008237
| 2020-08-26T08:54:51
| 2020-08-26T08:54:51
| 290,445,743
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 411
|
java
|
package com.kpsoftwaresolutions.khealth.utils;
import android.os.Bundle;
import com.quickblox.core.QBEntityCallback;
import com.quickblox.core.exception.QBResponseException;
public class QBEntityCallbackImpl<T> implements QBEntityCallback<T> {
@Override
public void onSuccess(T result, Bundle params) {
}
@Override
public void onError(QBResponseException responseException) {
}
}
|
[
"nobeldhar807@gmail.com"
] |
nobeldhar807@gmail.com
|
1eef923f3eb066f22e07cdc86defb67499018041
|
fb2cdbfcbb4d99f6cea88d58c6e6d91682009ad2
|
/weixin-web/src/main/java/com/cheng/weixin/web/security/SystemAuthorizingRealm.java
|
b57051f1b23cc99056bd55fd73ae214d78cdae82
|
[] |
no_license
|
chengzhx76/Weixin0.1
|
f4e3c93542965e8e13396eddd0ee64e1d822932a
|
7b68d1f45fb234cc4472485061985f032e85f031
|
refs/heads/master
| 2021-01-10T13:36:45.450526
| 2016-03-28T10:19:39
| 2016-03-28T10:19:39
| 49,940,558
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,253
|
java
|
package com.cheng.weixin.web.security;
import com.cheng.weixin.core.entity.Admin;
import com.cheng.weixin.core.entity.enums.Status;
import com.cheng.weixin.core.service.IAdminService;
import com.cheng.weixin.core.utils.Encodes;
import com.cheng.weixin.web.utils.Captcha;
import com.cheng.weixin.web.utils.UserUtils;
import org.apache.shiro.authc.*;
import org.apache.shiro.authz.AuthorizationInfo;
import org.apache.shiro.realm.AuthorizingRealm;
import org.apache.shiro.subject.PrincipalCollection;
import org.apache.shiro.util.ByteSource;
import org.springframework.beans.factory.annotation.Autowired;
import java.io.Serializable;
/**
* Desc: 登录认证与授权
* Author: Cheng
* Date: 2016/1/26 0026
*/
public class SystemAuthorizingRealm extends AuthorizingRealm {
@Autowired
private IAdminService adminService;
// 返回一个唯一的Realm名字
@Override
public String getName() {
return super.getName();
}
// 判断此Realm是否支持此Token
@Override
public boolean supports(AuthenticationToken token) {
return token instanceof WxUsernamePasswordToken ;
}
// 认证
@Override
protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken authenticationToken)
throws AuthenticationException {
WxUsernamePasswordToken token = (WxUsernamePasswordToken) authenticationToken;
// 判断验证码是否正确
if (Captcha.isValidateCodeLogin(token.getUsername(), false, false)) {
String captcha = (String) UserUtils.getSession().getAttribute(Captcha.CAPTCHA);
if (null == token.getCaptcha() || !token.getCaptcha().equalsIgnoreCase(captcha)) {
throw new AuthenticationException("msg:验证码错误,请重试.");
}
}
// 校验用户名
Admin admin = adminService.getUserByUsername(token.getUsername());
if(admin != null) {
if(admin.getStatus().equals(Status.LOCKED)) {
throw new LockedAccountException("msg:该帐号已禁止登录.");
}
byte[] salt = Encodes.decodeHex(admin.getPassword().substring(0, 16));
return new SimpleAuthenticationInfo(new Principal(admin, token.isMobilelogin()),
admin.getPassword().substring(16), ByteSource.Util.bytes(salt), getName());
}
return null;
}
// 授权
@Override
protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principalCollection) {
System.out.println("=======AuthorizationInfo=======");
return null;
}
/**
* 授权信息
*/
public static class Principal implements Serializable {
private static final long serialVersionUID = 2866069566032650619L;
/** 编号 **/
private String id;
/** 登录名 **/
private String username;
/** 是否是手机登录 **/
private boolean mobileLogin;
public Principal(Admin admin, boolean mobileLogin) {
this.id = admin.getId();
this.username = admin.getUsername();
this.mobileLogin = mobileLogin;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public boolean isMobileLogin() {
return mobileLogin;
}
public void setMobileLogin(boolean mobileLogin) {
this.mobileLogin = mobileLogin;
}
}
/**
* 设定密码校验的Hash算法与迭代次数
* !这里已在xml配置了 id=hashMatcher
*/
/*@PostConstruct
public void initCredentialsMatcher() {
HashedCredentialsMatcher matcher = new HashedCredentialsMatcher();
// 设置加密方式
matcher.setHashAlgorithmName(SystemUtils.HASH_ALGORITHM);
// 设置迭代次数
matcher.setHashIterations(SystemUtils.HASH_INTERATIONS);
// 注入到Shrio里自定义的加密方式
setCredentialsMatcher(matcher);
}*/
}
|
[
"chengzhx76@qq.com"
] |
chengzhx76@qq.com
|
a03e33806e645328879f11c4d2727c05c796ef2e
|
79ba0742e55f330e3b522a47f8ff7b88a6b5d1cc
|
/app/src/main/java/tasty/frenchdonuts/pavlov/data/Goal.java
|
865b224950f504a52a92fce7211f36ff6fd537e0
|
[] |
no_license
|
immranderson/pavlov
|
2a3bbc098e303fe6a877a3fd29c02073d1d2c9c5
|
327b40aed3d4ce7a9934e16263ccc44bb0d879c7
|
refs/heads/master
| 2020-12-25T11:57:38.162096
| 2015-08-01T08:40:30
| 2015-08-01T08:40:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,422
|
java
|
package tasty.frenchdonuts.pavlov.data;
import android.util.Log;
import io.realm.Realm;
import io.realm.RealmObject;
import io.realm.annotations.PrimaryKey;
/**
* Created by frenchdonuts on 1/6/15.
*/
public class Goal extends RealmObject {
private int priority;
private long startDate;
private long endDate;
private long millisInOneLv;
private String title;
public static int calcNewPriority(Goal goal) {
long millisToEnd = goal.getEndDate() - System.currentTimeMillis();
if (millisToEnd < 0) return 8;
int decs = (int) (millisToEnd / goal.getMillisInOneLv());
return 8 - decs - 1;
}
public int getPriority() {
return priority;
}
public void setPriority(int priority) {
this.priority = priority;
}
public long getStartDate() {
return startDate;
}
public void setStartDate(long startDate) {
this.startDate = startDate;
}
public long getEndDate() {
return endDate;
}
public void setEndDate(long endDate) {
this.endDate = endDate;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public long getMillisInOneLv() {
return millisInOneLv;
}
public void setMillisInOneLv(long millisInOneLv) {
this.millisInOneLv = millisInOneLv;
}
}
|
[
"jonathantan1991@gmail.com"
] |
jonathantan1991@gmail.com
|
74bb7fb079cf5db711da95a07035fcd5678aa047
|
966a6c4d2cffb33ffc5c8efd8b54140df54f956b
|
/EjercicioBancoXXX/src/org/deiv/CuentaAhorro.java
|
eb3183812193a976e0ac193d6012b87d2eca701c
|
[] |
no_license
|
David-divad/Damm
|
f6bf80df409bfcf2900d286c43d2125ab7a8e1f9
|
073aeffae617d4cf9352019d493c4464cc59fa61
|
refs/heads/master
| 2016-09-11T12:02:26.679134
| 2012-04-17T16:13:30
| 2012-04-17T16:13:30
| 3,171,894
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,998
|
java
|
package org.deiv;
/*
* ****************************************************************************
Desarrollar una clase llamada CuentaAhorro que es igual que la
CuentaCorriente pero que produce intereses:
?? Dispondrá además de los atributos de CuentaCorriente otros de tipo
privado llamado interes de tipo double
?? Constructor
Crear un constructor donde se pasarán los siguientes parámetros: Titular
de la cuenta, el número de la cuenta, el saldo y el interés
Crear un constructor con los siguientes titular de la cuenta, numero de
cuenta. El saldo se asignará con 0 y el interés a 2,5%
?? Otros métodos
Un método llamado setInteres que pasado un parámetro permita asignarlo
como interés
Un método llamado getInteres que devuelva el interes aplicado
Un método llamado calcular los Intereses e ingresarlos en la cuenta.(
Saldo+ saldo*interes/100). Tener en cuenta el modificador asignado al
atributo saldo
Sobrescribir el método toString para visualizar todos los datos
Analizar el tipo de dato que podríamos asignarle a los atributos de la clase
padre para evitar tener que acceder mediante los métodos getter y setter
*/
public class CuentaAhorro extends CuentaCorriente {
private double interes;
public double getInteres()
{
return interes;
}
public void setInteres(double interes)
{
this.interes = interes;
}
public CuentaAhorro(Titular titular, String numeroCuenta)
throws CloneNotSupportedException {
this(titular, numeroCuenta, 0, 2.5d);
}
public CuentaAhorro(Titular titular, String numeroCuenta, double saldo, double interes)
throws CloneNotSupportedException {
super(titular, numeroCuenta, saldo);
this.interes = interes;
}
public void calcularIngresarIntereses()
{
// setSaldo( getSaldo() * interes / 100 );
saldo += (saldo * interes) / 100;
}
public String toString()
{
return super.toString() + ", interes: " + interes;
}
}
|
[
"david.modulo.dam@gmail.com"
] |
david.modulo.dam@gmail.com
|
f3de71ae271da225f4e0cc7171b1778543f9e17a
|
61c6164c22142c4369d525a0997b695875865e29
|
/middleware/src/main/java/com/spirit/compras/entity/CompraDetalleGastoData.java
|
31664bdd727f9a22e887e1784ee86aa9cb9a7c26
|
[] |
no_license
|
xruiz81/spirit-creacional
|
e5a6398df65ac8afa42be65886b283007d190eae
|
382ee7b1a6f63924b8eb895d4781576627dbb3e5
|
refs/heads/master
| 2016-09-05T14:19:24.440871
| 2014-11-10T17:12:34
| 2014-11-10T17:12:34
| 26,328,756
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,859
|
java
|
package com.spirit.compras.entity;
import java.io.Serializable;
import com.spirit.comun.util.ToStringer;
/**
*
* @author www.versality.com.ec
*
*/
public class CompraDetalleGastoData implements CompraDetalleGastoIf, Serializable {
private java.lang.Long id;
public java.lang.Long getId() {
return id;
}
public void setId(java.lang.Long id) {
this.id = id;
}
private java.lang.Long compraGastoId;
public java.lang.Long getCompraGastoId() {
return compraGastoId;
}
public void setCompraGastoId(java.lang.Long compraGastoId) {
this.compraGastoId = compraGastoId;
}
private java.lang.Long compraDetalleId;
public java.lang.Long getCompraDetalleId() {
return compraDetalleId;
}
public void setCompraDetalleId(java.lang.Long compraDetalleId) {
this.compraDetalleId = compraDetalleId;
}
private java.math.BigDecimal valor;
public java.math.BigDecimal getValor() {
return valor;
}
public void setValor(java.math.BigDecimal valor) {
this.valor = valor;
}
public CompraDetalleGastoData() {
}
public CompraDetalleGastoData(com.spirit.compras.entity.CompraDetalleGastoIf value) {
setId(value.getId());
setCompraGastoId(value.getCompraGastoId());
setCompraDetalleId(value.getCompraDetalleId());
setValor(value.getValor());
}
public java.lang.Long getPrimaryKey() {
return getId();
}
public void setPrimaryKey(java.lang.Long pk) {
setId(pk);
}
public String getPrimaryKeyParameters() {
String parameters = "";
parameters += "&id=" + getId();
return parameters;
}
public String toString() {
return ToStringer.toString((CompraDetalleGastoIf)this);
}
}
|
[
"xruiz@creacional.com"
] |
xruiz@creacional.com
|
3dd867fe28960364d2cf3fef2741533ed50ee7be
|
0c115e2c58d8bd9b0072c643d975f8280d4b6440
|
/t-pc/PCTMCITProject/src/tmcit/hokekyo1210/SolverUI/Util/HttpUtil.java
|
e6400a1dd98c97ab6272356296537aa1eb085344
|
[] |
no_license
|
jubeatLHQ/PCProjectT
|
ced2b76daeef021175072b8d10857d6a0f47da4a
|
49e002442607b19a04b39ea82de05f95919d4a29
|
refs/heads/master
| 2020-06-26T05:01:06.671700
| 2014-12-09T02:04:07
| 2014-12-09T02:04:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,620
|
java
|
package tmcit.hokekyo1210.SolverUI.Util;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import org.apache.http.client.fluent.Content;
import org.apache.http.client.fluent.Form;
import org.apache.http.client.fluent.Request;
import tmcit.hokekyo1210.SolverUI.Main;
public class HttpUtil {
private String teamToken;
private String problemID;
private String answer;
public HttpUtil(String teamToken,String problemID,String answer){
this.teamToken = teamToken;
this.problemID = problemID;
this.answer = answer;
}
public void sendAnswer() throws Exception{
Content content = Request.Post(Main.TARGET_HOST_POST).addHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8")
.bodyForm(Form.form().add("playerid", teamToken).add("problemid", problemID).add("answer",answer).build())
.execute().returnContent();
System.out.println(content.asString());
}
public static Path getProblemFile(String problemName) throws Exception{
File dir = new File(Main.tmpDir);
if(!dir.exists()){
dir.mkdirs();
}
Content content = Request.Get(Main.TARGET_HOST_GET+"/"+problemName)
.execute().returnContent();
Path tmpPath = Paths.get(Main.tmpDir, problemName);
Files.copy(content.asStream(), tmpPath, StandardCopyOption.REPLACE_EXISTING);
return tmpPath;
}
/*public static void sendAnswer(String teamToken,String problemID,String answer) throws Exception {
DefaultHttpClient httpclient = null;
HttpPost post = null;
HttpEntity entity = null;
try {
httpclient = new DefaultHttpClient();
HttpParams httpParams = httpclient.getParams();
//接続確立のタイムアウトを設定(単位:ms)
HttpConnectionParams.setConnectionTimeout(httpParams, 500*1000);
//接続後のタイムアウトを設定(単位:ms)
HttpConnectionParams.setSoTimeout(httpParams, 500*1000);
post = new HttpPost(TARGET_HOST);
post.setHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
ArrayList<NameValuePair> params = new ArrayList<NameValuePair>();
params.add(new BasicNameValuePair("playerid", teamToken));
params.add(new BasicNameValuePair("problemid", problemID));
params.add(new BasicNameValuePair("answer", answer));
post.setEntity(new UrlEncodedFormEntity(params, HTTP.UTF_8));
final HttpResponse response = httpclient.execute(post);
// レスポンスヘッダーの取得(ファイルが無かった場合などは404)
System.out.println("StatusCode=" + response.getStatusLine().getStatusCode());
if(response.getStatusLine().getStatusCode() != 200 ){
System.out.println("StatusCode:" + response.getStatusLine().getStatusCode());
return;
}
entity = response.getEntity();
// entityが取れなかった場合は、Connectionのことは心配しないでもOK
if (entity != null) {
System.out.println(EntityUtils.toString(entity));
System.out.println("length: " + entity.getContentLength());
EntityUtils.consume(entity);
//depriciated
entity.consumeContent();
post.abort();
}
System.out.println("結果を取得しました。");
}catch (Exception e) {
e.printStackTrace();
}finally {
httpclient.getConnectionManager().shutdown();
}
}*/
}
|
[
"jubeatlhp@gmail.com"
] |
jubeatlhp@gmail.com
|
4bc81fe204c0e02593914665776accebe384421f
|
31508edbaeb4ab2219ea9f4cd4f40c8419b380a9
|
/src/test/java/org/springframework/social/geeklist/api/impl/UserTemplateTest.java
|
31bbbc2cbc8992e1f59233498e2af52c0da6acc0
|
[] |
no_license
|
VRDate/spring-social-geeklist
|
a2cca342840231c4e1499978f963b9b2deb4ddcb
|
2c1c3fc1f9d28b9681ba32c3af3708d08f31d964
|
refs/heads/master
| 2020-12-11T07:18:12.738482
| 2012-06-17T20:47:18
| 2012-06-17T20:47:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,870
|
java
|
package org.springframework.social.geeklist.api.impl;
import static org.junit.Assert.assertEquals;
import static org.springframework.http.HttpMethod.GET;
import static org.springframework.test.web.client.RequestMatchers.method;
import static org.springframework.test.web.client.RequestMatchers.requestTo;
import static org.springframework.test.web.client.ResponseCreators.withResponse;
import org.junit.Before;
import org.junit.Test;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.social.geeklist.api.GeekListUser;
import org.springframework.test.web.client.MockRestServiceServer;
public class UserTemplateTest {
private final String userString = "{\"status\": \"ok\",\"data\": {\"id\": \"a271659310088dc1a09fe0af9ddf6dd2d1987ddb99d2ca23af50a7fae55256d9\",\"name\": \"Jacob Chapel\",\"screen_name\": \"chapel\",\"avatar\": {\"small\": \"http://a1.twimg.com/profile_images/1340947562/me_badass_ava_normal.png\",\"large\": \"http://a1.twimg.com/profile_images/1340947562/me_badass_ava.png\"},\"blog_link\": \"http://lepahc.com\",\"company\": {\"title\": \"\",\"name\": \"Freelancer\"},\"location\": \"Spokane, WA\",\"bio\": \"Javascript and Node.js Evangelist\",\"social_links\": [\"http://twitter.com/jacobchapel\",\"http://lepahc.com\"],\"social\": {\"twitter_screen_name\": \"jacobchapel\",\"twitter_friends_count\": 82,\"twitter_followers_count\": 164},\"criteria\": {\"looking_for\": [\"interesting ideas\",\"fun times\"],\"available_for\": [\"node.js development\",\"front-end javascript\",\"unique ideas\",\"constructive critique\"]},\"stats\": {\"number_of_contributions\": 6,\"number_of_highfives\": 29,\"number_of_mentions\": 0,\"number_of_cards\": 3},\"is_beta\": true,\"created_at\": \"2011-09-14T02:08:42.978Z\",\"updated_at\": \"2011-12-17T00:45:37.833Z\",\"active_at\": \"2011-10-27T05:48:36.409Z\",\"trending_at\": \"2011-12-17T00:51:14.468Z\",\"trending_hist\": []}}";
private final String cardString = "{\"status\": \"ok\",\"data\": {\"total_cards\": 1,\"cards\": [{author_id: \"a271659310088dc1a09fe0af9ddf6dd2d1987ddb99d2ca23af50a7fae55256d9\",created_at: \"2011-09-14T04:46:30.384Z\",happened_at: \"2011-09-06T00:00:00.000Z\",happened_at_type: \"custom\",headline: \"I placed 23rd out of >180 at Nodeknockout 2011\",is_active: true,permalink: \"/chapel/i-placed-23rd-out-of-180-at-nodeknockout-2011\",slug: \"i-placed-23rd-out-of-180-at-nodeknockout-2011\",tasks: [ ],updated_at: \"2011-11-28T23:05:42.180Z\",stats: {number_of_views: 55,views: 64,highfives: 3},short_code: {gklst_url: \"http://gkl.st/XuQdJ\",id: \"32002d0dea77d1e55dcdb17b93456b789f0726b659e2d605bd6047db6c046865\"},id: \"32002d0dea77d1e55dcdb17b93456b7807b3c1b0695e177228f4fa12f227119b\"}]}}";
private GeekListTemplate geekList;
private MockRestServiceServer mockServer;
private HttpHeaders responseHeaders;
@Before
public void setup() {
geekList = new GeekListTemplate("consumerKey", "consumerSecret", "accessToken", "accessTokenSecret");
mockServer = MockRestServiceServer.createServer(geekList.getRestTemplate());
responseHeaders = new HttpHeaders();
responseHeaders.setContentType(MediaType.APPLICATION_JSON);
}
@Test
public void testGetUser() throws Exception {
mockServer.expect(requestTo("http://sandbox-api.geekli.st/v1/users/chapel")).andExpect(method(GET)).andRespond(withResponse(userString, responseHeaders));
GeekListUser geek = geekList.userOperations().getUser("chapel");
assertEquals("chapel", geek.getUserName());
assertEquals("Javascript and Node.js Evangelist", geek.getBio());
assertEquals("Jacob Chapel", geek.getDisplayName());
assertEquals("Spokane, WA", geek.getLocation());
assertEquals("a271659310088dc1a09fe0af9ddf6dd2d1987ddb99d2ca23af50a7fae55256d9", geek.getUserId());
assertEquals("http://geekli.st/chapel", geek.getUserProfileUrl());
}
}
|
[
"robhinds@gmail.com"
] |
robhinds@gmail.com
|
a8196d08a868e0f3b69bdfdd3784889509701d51
|
1eee7ad73ef0fe57929c41384bd9b23139a9c45c
|
/java-base/src/main/java/com/enhao/learning/in/java/string/StringTokenizerTest.java
|
2f0dd42465d219e60f8f97c86a5aa0931c3bc805
|
[] |
no_license
|
liangenhao/learning-in-java
|
03b409cd2baa2ffe97d0daa4092020134564b16b
|
59bc17cd902abcb18151ffdd529322f134e6fda3
|
refs/heads/master
| 2021-06-30T02:15:36.136248
| 2020-05-04T12:49:47
| 2020-05-04T12:49:47
| 176,668,109
| 4
| 0
| null | 2020-10-13T12:35:36
| 2019-03-20T06:20:51
|
Java
|
UTF-8
|
Java
| false
| false
| 600
|
java
|
package com.enhao.learning.in.java.string;
import java.util.StringTokenizer;
/**
* StringTokenizer 是一个用来分割字符串的工具类
* 构造参数:
* - str:需要分割的字符串
* - delim:分割符,默认\t\n\r\f,
* - returnDelims: 是否返回分割符,默认false
*
* @author enhao
* @see StringTokenizer
*/
public class StringTokenizerTest {
public static void main(String[] args) {
StringTokenizer st = new StringTokenizer("Hello World");
while (st.hasMoreTokens()) {
System.out.println(st.nextToken());
}
}
}
|
[
"liangenhao@hotmail.com"
] |
liangenhao@hotmail.com
|
cbc62580aab939019b92754f2962aa73f19e3bcc
|
10c40b847b9a2f827acef75c62e3623bb04ecc6d
|
/WEB-INF/classes/ProductRecommenderUtility.java
|
a59eff09b4301066af1642e579870bcfced7129c
|
[] |
no_license
|
AK1694/SmartPortables
|
af8baea27bf56ee22d7237e2203044b3b062ac5b
|
6801280efda3e32386426386ef8a743c8fcebe84
|
refs/heads/master
| 2020-07-09T08:38:31.402848
| 2019-08-23T05:29:12
| 2019-08-23T05:29:12
| 203,929,871
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,455
|
java
|
import java.io.*;
import java.sql.*;
import java.io.IOException;
import java.util.*;
public class ProductRecommenderUtility{
static Connection conn = null;
static String message;
public static String getConnection()
{
try
{
Class.forName("com.mysql.jdbc.Driver").newInstance();
conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/exampledatabase","root","ashu8901");
message="Successfull";
return message;
}
catch(SQLException e)
{
message="unsuccessful";
return message;
}
catch(Exception e)
{
message="unsuccessful";
return message;
}
}
public HashMap<String,String> readOutputFile(){
String TOMCAT_HOME = System.getProperty("catalina.home");
BufferedReader br = null;
String line = "";
String cvsSplitBy = ",";
HashMap<String,String> prodRecmMap = new HashMap<String,String>();
try {
br = new BufferedReader(new FileReader(new File(TOMCAT_HOME+"\\webapps\\SmartPortablesHW44\\output.csv")));
while ((line = br.readLine()) != null) {
// use comma as separator
String[] prod_recm = line.split(cvsSplitBy,2);
prodRecmMap.put(prod_recm[0],prod_recm[1]);
}
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
if (br != null) {
try {
br.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return prodRecmMap;
}
public static Product getProduct(String product){
Product prodObj = new Product();
try
{
String msg = getConnection();
String selectProd="select * from Productdetails where Id=?";
PreparedStatement pst = conn.prepareStatement(selectProd);
pst.setString(1,product);
ResultSet rs = pst.executeQuery();
while(rs.next())
{
prodObj = new Product(rs.getString("Id"),rs.getString("productName"),rs.getDouble("productPrice"),rs.getString("productImage"),rs.getString("productManufacturer"),rs.getString("productCondition"),rs.getString("ProductType"),rs.getDouble("productDiscount"));
}
rs.close();
pst.close();
conn.close();
}
catch(Exception e)
{
}
return prodObj;
}
}
|
[
"fashish@hawk.iit.edu"
] |
fashish@hawk.iit.edu
|
4212d831405c8296bd8c68ecabf56db7fc36ae95
|
6acaa06e543bc03c24f4f99eae28fc902cc8fc15
|
/src/dto/types_of_npc/ViewTypeGeneralInfoDto.java
|
b4959e6e8ffcb8e41c5a24f4fe1d7bc04a2eba40
|
[] |
no_license
|
yellowBanano/Game-v.1.0
|
a249fa67b782fca8bff6540c989f46d5f1549b5f
|
3c5eceb6ec421897954654faaefbeec7b335f9c8
|
refs/heads/master
| 2021-08-30T17:33:40.558387
| 2017-12-18T20:45:06
| 2017-12-18T20:45:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 259
|
java
|
package dto.types_of_npc;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ViewTypeGeneralInfoDto {
private long id;
private String name;
}
|
[
"noreply@github.com"
] |
yellowBanano.noreply@github.com
|
125b61b2d7376763eb154d886201e146b3b18b80
|
81da442fc7d9e406f5a2ea37749976e982995a70
|
/src/main/java/edu/cumt/semantic/security/SecurityUtils.java
|
6a48a8cdff8617c99e61fcd84178148d1e08b86c
|
[] |
no_license
|
feiyucq/cumt-semantic-demo
|
48124486e1e2510414ba1703579b8a79c37d8835
|
468e2416cf6e6483336d849762b40f254c505523
|
refs/heads/master
| 2022-12-11T06:55:50.634015
| 2019-12-17T07:38:16
| 2019-12-17T07:38:49
| 180,744,105
| 0
| 0
| null | 2022-12-08T17:29:22
| 2019-04-11T08:03:10
|
Java
|
UTF-8
|
Java
| false
| false
| 2,977
|
java
|
package edu.cumt.semantic.security;
import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import java.util.Optional;
/**
* Utility class for Spring Security.
*/
public final class SecurityUtils {
private SecurityUtils() {
}
/**
* Get the login of the current user.
*
* @return the login of the current user
*/
public static Optional<String> getCurrentUserLogin() {
SecurityContext securityContext = SecurityContextHolder.getContext();
return Optional.ofNullable(securityContext.getAuthentication())
.map(authentication -> {
if (authentication.getPrincipal() instanceof UserDetails) {
UserDetails springSecurityUser = (UserDetails) authentication.getPrincipal();
return springSecurityUser.getUsername();
} else if (authentication.getPrincipal() instanceof String) {
return (String) authentication.getPrincipal();
}
return null;
});
}
/**
* Get the JWT of the current user.
*
* @return the JWT of the current user
*/
public static Optional<String> getCurrentUserJWT() {
SecurityContext securityContext = SecurityContextHolder.getContext();
return Optional.ofNullable(securityContext.getAuthentication())
.filter(authentication -> authentication.getCredentials() instanceof String)
.map(authentication -> (String) authentication.getCredentials());
}
/**
* Check if a user is authenticated.
*
* @return true if the user is authenticated, false otherwise
*/
public static boolean isAuthenticated() {
SecurityContext securityContext = SecurityContextHolder.getContext();
return Optional.ofNullable(securityContext.getAuthentication())
.map(authentication -> authentication.getAuthorities().stream()
.noneMatch(grantedAuthority -> grantedAuthority.getAuthority().equals(AuthoritiesConstants.ANONYMOUS)))
.orElse(false);
}
/**
* If the current user has a specific authority (security role).
* <p>
* The name of this method comes from the isUserInRole() method in the Servlet API
*
* @param authority the authority to check
* @return true if the current user has the authority, false otherwise
*/
public static boolean isCurrentUserInRole(String authority) {
SecurityContext securityContext = SecurityContextHolder.getContext();
return Optional.ofNullable(securityContext.getAuthentication())
.map(authentication -> authentication.getAuthorities().stream()
.anyMatch(grantedAuthority -> grantedAuthority.getAuthority().equals(authority)))
.orElse(false);
}
}
|
[
"qing.chen@chemcyber.com"
] |
qing.chen@chemcyber.com
|
f47a8b40e62740e20b97d79ed208d981ca7a3ecb
|
02db1343f5d5cbf365c4b00534dc4b40d6993571
|
/04.Semestr/00.Semestrovka(FakeInstagram)/src/main/java/ru/itis/javalab/FakeInstagram/repository/Implementations/SubscriptionsRepositoryImpl.java
|
d7032c63f9f31fe69332389840fc7f60becdeda4
|
[] |
no_license
|
ttr843/JavaLab
|
2d3e80099a8cb7df436184f5f12d2b704a6ae42d
|
b54eadd2db0869cdffc43ed3e64703f9a55bdd82
|
refs/heads/master
| 2021-05-17T04:03:15.527146
| 2021-01-16T18:15:30
| 2021-01-16T18:15:30
| 250,612,163
| 0
| 0
| null | 2020-10-25T22:18:19
| 2020-03-27T18:21:13
|
Java
|
UTF-8
|
Java
| false
| false
| 2,272
|
java
|
package ru.itis.javalab.FakeInstagram.repository.Implementations;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.stereotype.Repository;
import ru.itis.javalab.FakeInstagram.model.Sub;
import ru.itis.javalab.FakeInstagram.repository.interfaces.SubscriptionsRepository;
import java.sql.PreparedStatement;
import java.util.List;
@Repository
public class SubscriptionsRepositoryImpl implements SubscriptionsRepository {
private static final String SQL_ADD_SUBSCRIBE = "INSERT INTO subs(idtowho,idwho) VALUES (?,?)";
private static final String SQL_FIND_BY_USER_ID = "SELECT * from subs where idwho = ?";
private static final String SQL_DELETE_SUB = "DELETE FROM subs where idwho = ? and idtowho = ?";
@Autowired
private JdbcTemplate jdbcTemplate;
private RowMapper<Sub> subRowMapper = (row, rowNumber) ->
Sub.builder()
.idWho(row.getLong("idwho"))
.idToWho(row.getLong("idtowho"))
.build();
@Override
public void save(Sub entity) {
}
@Override
public void subscribe(long idToWho, long idWho) {
jdbcTemplate.update(connection -> {
PreparedStatement preparedStatement = connection.prepareStatement(SQL_ADD_SUBSCRIBE);
preparedStatement.setLong(1, idToWho);
preparedStatement.setLong(2, idWho);
return preparedStatement;
});
}
@Override
public void deleteSub(long idToWho, long idWho) {
jdbcTemplate.update(connection -> {
PreparedStatement preparedStatement = connection.prepareStatement(SQL_DELETE_SUB);
preparedStatement.setLong(1,idWho );
preparedStatement.setLong(2, idToWho);
return preparedStatement;
});
}
@Override
public List<Sub> findAllSubs(long id) {
try {
return jdbcTemplate.query(SQL_FIND_BY_USER_ID,new Object[]{id},subRowMapper);
} catch (EmptyResultDataAccessException e) {
throw new EmptyResultDataAccessException(0);
}
}
}
|
[
"empty-15@mail.ru"
] |
empty-15@mail.ru
|
7544125512ed7b4cfa28087281cec1632644531d
|
d9609c24a77e3075032fb5aad07d0ff42f2c79d9
|
/app/src/main/java/com/example/c1/ui/slideshow/SlideshowViewModel.java
|
a693f3a564852f487f1ddde40e34664308eb6bb7
|
[] |
no_license
|
aadeshpandiri/HospitalAppointmentApp
|
5001231c494682c8d2d158140b31c4eee3b3fea5
|
c1d764355b24f6f74a6bc957ff177f3e2c0bd576
|
refs/heads/master
| 2022-12-16T02:40:52.669371
| 2020-09-14T03:26:45
| 2020-09-14T03:26:45
| 295,293,464
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 457
|
java
|
package com.example.c1.ui.slideshow;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
public class SlideshowViewModel extends ViewModel {
private MutableLiveData<String> mText;
public SlideshowViewModel() {
mText = new MutableLiveData<>();
mText.setValue("This is slideshow fragment");
}
public LiveData<String> getText() {
return mText;
}
}
|
[
"aadeshpandiri@gmail.com"
] |
aadeshpandiri@gmail.com
|
944e67121ca32791b5d8e04f0801e6ccc4e2e573
|
a3a39ae872d7db70e6a941fb1c8d4a85ea7e2516
|
/src/main/java/cn/java/personal/service/AwardService.java
|
d5b59be3ec25022ad779c4e734e45be92c186e74
|
[] |
no_license
|
fcser/person
|
f12d5d5e115bc1ca3c4fc61b0336cbb95a687a1c
|
077d901bcccda25aadd88f1c83701de7aefc6367
|
refs/heads/master
| 2020-04-12T04:37:10.424438
| 2018-12-18T14:47:26
| 2018-12-18T14:47:26
| 162,300,879
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 425
|
java
|
package cn.java.personal.service;
import java.util.ArrayList;
import cn.java.personal.pojo.Award;
/**
*@author:zym
*@version:
*@time:2018年6月7日下午11:58:31
*/
public interface AwardService {
public int insertAward(Award award);
public int updateAward(Award award);
public ArrayList<Award> queryAward(int userId);
public int deleteAwards(int userId);
public int deleteAward(int Id);
}
|
[
"zym@DESKTOP-R1N00C5"
] |
zym@DESKTOP-R1N00C5
|
3b8218fd7b0264928ceebebf727ece0ea0223a34
|
453ad6a89d9acac966d7febb0f595ba171f4b036
|
/src/com/print/demo/util/PrintUtil.java
|
bf89e26cfa250f7a6387522f98ec7a60fac7d962
|
[] |
no_license
|
yuexingxing/ScanDemo
|
349d236abdb1c1c525f3c22668bcb900dd56783c
|
05d71bd04fb556b10d685a8531081afa24b16aae
|
refs/heads/master
| 2020-03-09T04:37:47.888766
| 2018-06-08T15:12:47
| 2018-06-08T15:12:47
| 128,591,947
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 5,062
|
java
|
package com.print.demo.util;
import com.print.demo.ApplicationContext;
import com.print.demo.data.PrintInfo;
import utils.preDefiniation.AlignType;
import utils.preDefiniation.BarcodeType;
/**
* 打印类
*
* @author yxx
*
* @date 2018-3-12 下午5:52:03
*
*/
public class PrintUtil {
public static ApplicationContext context = ApplicationContext.getInstance();
public static void printLabelTest(PrintInfo info){
//
context.getObject().CON_PageStart(context.getState(),false, 0, 0);//0,0
context.getObject().ASCII_CtrlAlignType(context.getState(),
AlignType.AT_CENTER.getValue());
context.getObject().ASCII_CtrlFeedLines(context.getState(), 0);
context.getObject().ASCII_PrintString(context.getState(), 0, 0, 1, 0, 0, "1\r\n", "gb2312");
context.getObject().ASCII_PrintString(context.getState(), 0, 0, 0, 0, 0, "2\r\n", "gb2312");
context.getObject().ASCII_PrintString(context.getState(), 0, 0, 0, 0, 0, "3\r\n", "gb2312");
context.getObject().ASCII_PrintString(context.getState(), 0, 0, 0, 0, 0, "4\r\n", "gb2312");
context.getObject().ASCII_PrintString(context.getState(), 0, 0, 0, 0, 0, "5\r\n", "gb2312");
context.getObject().ASCII_PrintString(context.getState(), 0, 0, 0, 0, 0, "6\r\n", "gb2312");
context.getObject().ASCII_PrintString(context.getState(), 0, 0, 0, 0, 0, "7\r\n", "gb2312");
context.getObject().ASCII_PrintString(context.getState(), 0, 0, 0, 0, 0, "8\r\n", "gb2312");
context.getObject().ASCII_PrintString(context.getState(), 0, 0, 0, 0, 0, "9\r\n", "gb2312");
context.getObject().ASCII_PrintString(context.getState(), 0, 0, 0, 0, 0, "10\r\n", "gb2312");
context.getObject().ASCII_PrintString(context.getState(), 0, 0, 0, 0, 0, "11\r\n", "gb2312");
context.getObject().ASCII_PrintString(context.getState(), 0, 0, 0, 0, 0, "12\r\n", "gb2312");
context.getObject().ASCII_CtrlFeedLines(context.getState(), 1);
// context.getObject().ASCII_CtrlReset(context.getState());
// context.getObject().ASCII_Print1DBarcode(context.getState(),BarcodeType.BT_CODE39.getValue(), 2, 32,
// utils.preDefiniation.Barcode1DHRI.BH_BLEW.getValue(), info.getBillcode());
context.getObject().CON_PageEnd(context.getState(), context.getPrintway());
}
/**
* 行数一定要对应
* @param info
*/
public static void printLabel2(PrintInfo info){
String spaceStr = " ";//首行缩进距离
context.getObject().CON_PageStart(context.getState(),false, 0, 0);//0,0
context.getObject().ASCII_CtrlAlignType(context.getState(),
AlignType.AT_LEFT.getValue());
context.getObject().ASCII_PrintString(context.getState(),
1, 1,
1, 0,
0, "12345678", "gb2312");
context.getObject().ASCII_PrintString(context.getState(), 0, 0, 0, 0, 0, "\n", "gb2312");
context.getObject().ASCII_PrintString(context.getState(), 0, 0, 0, 0, 0, "\n", "gb2312");
context.getObject().ASCII_CtrlFeedLines(context.getState(), 1);
context.getObject().CON_PageEnd(context.getState(), context.getPrintway());
}
/**
* 行数一定要对应
* @param info
*/
public static void printLabel(PrintInfo info){
String spaceStr = " ";//首行缩进距离
context.getObject().CON_PageStart(context.getState(),false, 0, 0);//0,0
context.getObject().ASCII_CtrlAlignType(context.getState(),
AlignType.AT_LEFT.getValue());
context.getObject().ASCII_CtrlSetFont(context.getState(), 15, 10, 10);
context.getObject().ASCII_CtrlFeedLines(context.getState(), 0);
context.getObject().ASCII_PrintString(context.getState(), 0, 0, 0, 0, 0, "\n", "gb2312");
context.getObject().ASCII_PrintString(context.getState(), 0, 0, 0, 0, 0, "\n", "gb2312");
context.getObject().ASCII_CtrlAlignType(context.getState(), 0);
context.getObject().ASCII_PrintString(context.getState(),
0, 0,
1, 0,
0, spaceStr + "打印日期: " + info.getTime() + "\n", "gb2312");
context.getObject().ASCII_PrintString(context.getState(), 0, 0, 0, 0, 0, "\n", "gb2312");
context.getObject().ASCII_CtrlReset(context.getState());
context.getObject().ASCII_CtrlAlignType(context.getState(), AlignType.AT_CENTER.getValue());//条码居中显示
context.getObject().ASCII_Print1DBarcode(
context.getState(),
BarcodeType.BT_CODE39.getValue(),
3,
140,
0, info.getBillcode());
context.getObject().ASCII_CtrlReset(context.getState());
context.getObject().ASCII_CtrlAlignType(context.getState(), AlignType.AT_CENTER.getValue());//条码居中显示
context.getObject().ASCII_PrintString(context.getState(),
1, 1,
1, 0,
0, info.getBillcode(), "gb2312");
context.getObject().ASCII_PrintString(context.getState(), 0, 0, 0, 0, 0, "\n", "gb2312");
context.getObject().ASCII_PrintString(context.getState(), 0, 0, 0, 0, 0, "\n", "gb2312");
// context.getObject().ASCII_PrintString(context.getState(), 0, 0, 0, 0, 0, "\n", "gb2312");
context.getObject().ASCII_CtrlFeedLines(context.getState(), 1);
context.getObject().ASCII_CtrlFeedLines(context.getState(), 1);
context.getObject().CON_PageEnd(context.getState(), context.getPrintway());
}
}
|
[
"670176656@qq.com"
] |
670176656@qq.com
|
5fb52884c7f564884876456f994f8aa01dac20de
|
e53397a3c2c85be9e8d6e7d8f374fe2c35417f8a
|
/libraryMongoDB_hw08/src/test/java/ru/avalieva/otus/libraryMongoDB_hw08/repository/CommentRepositoryTest.java
|
5b307ae4c60b00c872df3a3e8955a23120dc20b9
|
[] |
no_license
|
alfiyashka/otus_spring
|
79f096cc832e75702e2f67a9186f6a05b3eef209
|
31a43c785ad94604a8a4b9b816f99f1f5b81a019
|
refs/heads/master
| 2022-07-17T21:02:44.004314
| 2020-05-29T19:57:07
| 2020-05-29T19:57:07
| 224,483,926
| 0
| 0
| null | 2022-06-21T03:11:49
| 2019-11-27T17:31:30
|
Java
|
UTF-8
|
Java
| false
| false
| 2,575
|
java
|
package ru.avalieva.otus.libraryMongoDB_hw08.repository;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.test.autoconfigure.data.mongo.DataMongoTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;
import ru.avalieva.otus.libraryMongoDB_hw08.configuration.MongoSettings;
import ru.avalieva.otus.libraryMongoDB_hw08.configuration.MongockConfiguration;
import ru.avalieva.otus.libraryMongoDB_hw08.domain.Book;
import ru.avalieva.otus.libraryMongoDB_hw08.domain.Comment;
import ru.avalieva.otus.libraryMongoDB_hw08.events.MongoEventsException;
import ru.avalieva.otus.libraryMongoDB_hw08.service.MessageService;
import java.util.List;
import static org.assertj.core.api.Assertions.assertThat;
@DataMongoTest
@EnableConfigurationProperties
@ComponentScan({"ru.avalieva.otus.libraryMongoDB_hw08.repository", "ru.avalieva.otus.libraryMongoDB_hw08.events"})
@Import({MongoSettings.class, MongockConfiguration.class})
public class CommentRepositoryTest {
@MockBean
MessageService messageService;
@Autowired
private CommentRepository commentRepository;
@Autowired
private BookRepository bookRepository;
@DisplayName("try add comment with null book test")
@Test
public void addCommentTestFailedNullBook() {
Comment comment = new Comment("", "Commment", null);
Assertions.assertThrows(MongoEventsException.class, () -> { commentRepository.save(comment); });
}
@DisplayName("try add book with null author test")
@Test
public void addBookAuthorTestFailedUnknownAuthor() {
Book book = new Book("ffffffffffffffffffffffff", "NEW BOOK", 1990, null, null);
Comment comment = new Comment("", "Commment", book);
Assertions.assertThrows(MongoEventsException.class, () -> { commentRepository.save(comment); });
}
@DisplayName("try get comments of book test")
@Test
public void getCommentsOfBookTest() {
List<Book> books = bookRepository.findAll();
Book book = books.get(0);
List<Comment> comments = commentRepository.getCommentsOfBook(book.getIsbn());
final int EXPECTED_COMMENT_COUNT = 2;
assertThat(comments).isNotNull().hasSize(EXPECTED_COMMENT_COUNT);
}
}
|
[
"v-alfiya@mail.ru"
] |
v-alfiya@mail.ru
|
fcc38696aa1177f56c67cd610e460fbcfa2c530e
|
9c00c20ce5e09509018e0daedbc4af2abc3f18e5
|
/app/src/main/java/com/adi/learning/android/data/DataItemAdapterListView.java
|
b0d376c49539682f0db48d968ef527f66b17def3
|
[] |
no_license
|
thinkadi/learn-android-data
|
81f2a5acbc4a7f7b4c186435ea9f9fe443d9daf5
|
cfa800b504ba6eacdd8d08755b44bc4ed3de6952
|
refs/heads/master
| 2021-07-24T19:52:13.866909
| 2017-11-02T23:57:16
| 2017-11-02T23:57:16
| 109,298,313
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,085
|
java
|
package com.adi.learning.android.data;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.adi.learning.android.data.model.DataItem;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
public class DataItemAdapterListView extends ArrayAdapter<DataItem> {
private List<DataItem> mDataItems;
private LayoutInflater mInflater;
DataItemAdapterListView(@NonNull Context context, @NonNull List<DataItem> objects) {
super(context, R.layout.list_item, objects);
mDataItems = objects;
mInflater = LayoutInflater.from(context);
}
@NonNull
@Override
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
if (convertView == null) {
convertView = mInflater.inflate(R.layout.list_item, parent, false);
}
TextView tvName = convertView.findViewById(R.id.itemNameText);
ImageView imageView = convertView.findViewById(R.id.imageView);
DataItem item = mDataItems.get(position);
tvName.setText(item.getItemName());
// imageView.setImageResource(R.drawable.apple_pie);
InputStream inputStream = null;
try {
String imageFile = item.getImage();
inputStream = getContext().getAssets().open(imageFile);
Drawable d = Drawable.createFromStream(inputStream, null);
imageView.setImageDrawable(d);
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
if (inputStream != null) {
inputStream.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
return convertView;
}
}
|
[
"thinkadi@outlook.com"
] |
thinkadi@outlook.com
|
593b744bcfd85716e134f95ff266d4e61de34fea
|
6ae4bad5c5a8ebd57701d1ac3f666267c17d4d63
|
/src/main/java/api/objects/Product.java
|
649358c3332fa59f16fabbda2bb7db8ea837c1fa
|
[] |
no_license
|
0868307/ReceptApi
|
846c505d491bda6ed58900d9ac42aa3bf9eab01f
|
ada1f350248ac34fffd957f9ba3bd7c6647f9a86
|
refs/heads/master
| 2021-01-13T13:00:38.217346
| 2015-12-13T00:30:53
| 2015-12-13T00:30:53
| 47,900,131
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 384
|
java
|
package api.objects;
/**
* Created by Wouter on 12/12/2015.
*/
public class Product extends Neo4jObject {
private String unit; // unit( kg,L) neccesary for grocery list
public Product(Long id, String name) {
super(id, name);
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit;
}
}
|
[
"0868307@hr.nl"
] |
0868307@hr.nl
|
0fe5c2717604bf28ccf43428459e2c2587d18826
|
7206a1617b4f9f313158ed3c7120111f72b65c61
|
/app/src/main/java/com/b/dentes3/emergencias.java
|
c657eec3a7d7879741af5197897b62b7e57e94af
|
[] |
no_license
|
BJSoto14/dentes3
|
d0a928d3063c3b019bfa51591c034c01e64c7bd5
|
087b2db0d46b3ca00e40b949bd030e34cedd4723
|
refs/heads/master
| 2020-05-01T13:26:05.640217
| 2019-03-25T01:41:30
| 2019-03-25T01:41:30
| 177,491,593
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 345
|
java
|
package com.b.dentes3;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class emergencias extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_emergencias);
}
}
|
[
"brandonsotoxd@gmail.com"
] |
brandonsotoxd@gmail.com
|
9735db2c5cbd483617ec1c94c77111de0a846ab2
|
e31ce8381655a40e1a1c0e217f85be546f6ddc63
|
/diadiaCommerceWeb/src/java/web/action/inserisciProdotto/SActionInserisciProdotto.java
|
1d9519363fbb47d82b2fa19aa9751ccc6ddfce99
|
[] |
no_license
|
pamput/university-diadiacommerceweb
|
b43a382d3b5251c8c9e71f064e20592d3c662d6a
|
b0282527e565a01d9803cd80aa8824fe48590547
|
refs/heads/master
| 2020-04-09T17:32:16.167353
| 2009-06-23T15:29:34
| 2009-06-23T15:29:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,950
|
java
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package web.action.inserisciProdotto;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForward;
import modello.*;
import persistenza.*;
import persistenza.postgresql.*;
import web.form.InserisciProdottoForm;
/**
*
* @author Kimo
*/
public class SActionInserisciProdotto extends org.apache.struts.action.Action {
/* forward name="success" path="" */
private final static String SUCCESS = "inserisciProdotto";
private final static String FAIL = "erroreInserisciProdotto";
/**
* This is the action called from the Struts framework.
* @param mapping The ActionMapping used to select this instance.
* @param form The optional ActionForm bean for this request.
* @param request The HTTP Request we are processing.
* @param response The HTTP Response we are processing.
* @throws java.lang.Exception
* @return
*/
@Override
public ActionForward execute(ActionMapping mapping, ActionForm form,HttpServletRequest request, HttpServletResponse response) throws Exception {
InserisciProdottoForm formProdotto = (InserisciProdottoForm) form;
Prodotto prodotto = new Prodotto();
prodotto.setNome(formProdotto.getNome());
prodotto.setDescrizione(formProdotto.getDescrizione());
prodotto.setPrezzo(formProdotto.getPrezzo());
prodotto.setQuantita(formProdotto.getQuantita());
prodotto.setCodice(formProdotto.getCodice());
Facade facade = new Facadepostgresql();
try {
facade.salvaProdotto(prodotto);
}catch (Exception ex){
return mapping.findForward(FAIL);
}
return mapping.findForward(SUCCESS);
}
}
|
[
"pamput@3494e902-56a1-11de-8d7d-01d876f1962d"
] |
pamput@3494e902-56a1-11de-8d7d-01d876f1962d
|
517afa184edb2a29bd79815fdeccfaa30e9d78d5
|
42120c89935b207ac8cad147843d4be4ec87e886
|
/flowField/src/JORTS/uiComponents/textFields/ResourceLabel.java
|
0a0ea7fed5934ea833b3ea30a9816f86eac742c1
|
[] |
no_license
|
theoutsider24/JORTS
|
394ab0e3d31917463549ab821cf8e949ad45a17e
|
f8169a892ef83ff2eb3cf40f7c1eac8bb9288905
|
refs/heads/master
| 2021-01-10T02:35:17.463643
| 2016-04-04T12:01:29
| 2016-04-04T12:01:29
| 47,194,442
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 544
|
java
|
package JORTS.uiComponents.textFields;
import JORTS.core.GameWindow;
public class ResourceLabel extends UpdatableTextField{
GameWindow window;
String resource="";
public ResourceLabel(GameWindow window,String resource)
{
super();
this.window=window;
this.resource=resource;
text.setCharacterSize(15);
}
@Override
public void update()
{
String s = resource+": "+window.activePlayer.resources.get(resource);
if(!text.getString().equals(s))
{
setText(s);
setCentered(true);
}
}
}
|
[
"Matthew@MATTHEW-PC"
] |
Matthew@MATTHEW-PC
|
ac1b63676c8fdb02a26aae99930134199534c20b
|
c576f2b0663b7bad90d148e422cdb307d1f8d43a
|
/src/main/java/javax/measure/quantity/ElectricCharge.java
|
66e189ab4a81896796c63f61789989ee91f64b1f
|
[
"BSD-2-Clause"
] |
permissive
|
chrisdennis/unit-api
|
03dc61a960f046e77c4c57bbbd2a9bbf06253050
|
21c64b06eaa09cc0e141d91429c19c0d0d65f7a7
|
refs/heads/master
| 2021-01-17T08:21:35.438165
| 2015-11-10T21:00:21
| 2015-11-10T21:00:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,967
|
java
|
/*
* Units of Measurement API
* Copyright (c) 2014-2015, Jean-Marie Dautelle, Werner Keil, V2COM.
*
* 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. Neither the name of JSR-363 nor the names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS 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 THE COPYRIGHT HOLDER OR 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.
*/
package javax.measure.quantity;
import javax.measure.Quantity;
/**
* Electric charge.
* The metric system unit for this quantity is "C" (Coulomb).
*
* @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
* @version 1.0
*
* @see ElectricCurrent
*/
public interface ElectricCharge extends Quantity<ElectricCharge> {
}
|
[
"werner.keil@gmx.net"
] |
werner.keil@gmx.net
|
73e4d28d98aeb60d12549d96cf2c53109af89c94
|
bb1fbde6f8c28e4b4bdf3b2f9bfd4564833f1747
|
/src/test/java/MotorcycleTest.java
|
b9e703ff7b4f920c1bb054b15b4c7e0bcb4de230
|
[] |
no_license
|
tdwny/WeekTwo
|
d61b82263163ca9579c69215f87a29432f958b3d
|
4a2a7c4fa7bc6c5c58197564782b40690836fb83
|
refs/heads/AddingFilesToMaster
| 2022-12-22T01:30:30.962197
| 2020-09-22T01:55:54
| 2020-09-22T01:55:54
| 297,220,589
| 0
| 0
| null | 2020-09-22T02:02:30
| 2020-09-21T03:40:12
|
Java
|
UTF-8
|
Java
| false
| false
| 1,793
|
java
|
import hondaProducts.impl.Car;
import hondaProducts.impl.Motorcycle;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertTrue;
public class MotorcycleTest {
//LocalVariables
Motorcycle motorcycle;
@Before
public void initialize(){
//Object
motorcycle = new Motorcycle(3, 1, "red");
}
@Test
public void testMotorcycle(){
//Expected Variables
boolean hasEngine = true;
int numberOfWheels = 3;
int numberOfSeats = 1;
String color = "red";
//Asset
assertTrue("Expected Value was " + hasEngine + " but was " + motorcycle.isHasEngine(), motorcycle.isHasEngine() == true);
assertTrue("Expected Value was " + numberOfWheels + " but was " + motorcycle.getNumberOfWheels(), motorcycle.getNumberOfWheels() == 3);
assertTrue("Expected Value was " + numberOfSeats + " but was " + motorcycle.getNumberOfSeats(), motorcycle.getNumberOfSeats() == 1);
assertTrue("Expected Value was " + color + " but was " + motorcycle.getColor(), motorcycle.getColor() == "red");
}
@Test
public void testRide(){
//Expected Variables
String expectedOutput = "This motorcycle is being ridden";
//Expected Variables
assertTrue("Expected Value was " + "This motorcycle is being ridden" + " but was " + motorcycle.ride(), motorcycle.ride() == "This motorcycle is being ridden");
}
@Test
public void testWeelie(){
//Expected Variables
String expectedOutput = "Rider is popping a wheelie";
//Expected Variables
assertTrue("Expected Value was " + "Rider is popping a wheelie" + " but was " + motorcycle.wheelie(), motorcycle.wheelie() == "Rider is popping a wheelie");
}
}
|
[
"timothy.downey@c02cg3z3md6p.camelot.local"
] |
timothy.downey@c02cg3z3md6p.camelot.local
|
fbef21f819fd0035c1058f393cd606f47482fcfb
|
4893d0fb8af5aae3263b554db7cb0168bf5848c8
|
/src/main/java/basic/dataStructure/set/BSTSet.java
|
fb8ca4484b4a7c3b53d95a70e4bc7138b9d48585
|
[] |
no_license
|
NaishengZhang/java_notes
|
ad85e1733081db2bc0d516eaaa43780e95360a08
|
e7949b353a54fae80ade7767f84d15317929d591
|
refs/heads/master
| 2022-11-08T21:12:09.358596
| 2020-07-02T03:56:06
| 2020-07-02T03:56:06
| 267,479,100
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,592
|
java
|
package basic.dataStructure.set;
import java.util.ArrayList;
public class BSTSet<E extends Comparable<E>> implements Set<E> {
private BST<E> bst;
public BSTSet() {
bst = new BST<>();
}
@Override
public void add(E e) {
bst.add(e);
}
@Override
public void remove(E e) {
bst.remove(e);
}
@Override
public boolean contains(E e) {
return bst.contains(e);
}
@Override
public int getSize() {
return bst.size();
}
@Override
public boolean isEmpty() {
return bst.isEmpty();
}
public static void main(String[] args) {
System.out.println("Pride and Prejudice");
ArrayList<String> words1 = new ArrayList<>();
if(FileOperation.readFile("src/pride-and-prejudice.txt", words1)) {
System.out.println("Total words: " + words1.size());
BSTSet<String> set1 = new BSTSet<>();
for (String word : words1)
set1.add(word);
System.out.println("Total different words: " + set1.getSize());
}
System.out.println();
System.out.println("A Tale of Two Cities");
ArrayList<String> words2 = new ArrayList<>();
if(FileOperation.readFile("src/a-tale-of-two-cities.txt", words2)){
System.out.println("Total words: " + words2.size());
BSTSet<String> set2 = new BSTSet<>();
for(String word: words2)
set2.add(word);
System.out.println("Total different words: " + set2.getSize());
}
}
}
|
[
"jonathan.n.zhang@gmail.com"
] |
jonathan.n.zhang@gmail.com
|
3548a31432111943ffd42480045e33d1f09d5439
|
554fda3637134f18cb9b750cc4fe3a8d76cd3752
|
/app/src/main/java/com/sample/sydneyzamoranos/ItemListActivity.java
|
f27a7f71ec195b1476a94c5c53adf07fd2dcaf1e
|
[] |
no_license
|
sydney691/AppetiserApps
|
57c562db98bffbed326cd6f605be6bbd9e46742d
|
3cf0ac385c0572c7eb061238e88e7cbd01858d8d
|
refs/heads/master
| 2021-01-02T17:08:40.610430
| 2020-02-11T09:09:29
| 2020-02-11T09:09:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,963
|
java
|
package com.sample.sydneyzamoranos;
import android.app.ActivityManager;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.RecyclerView;
import androidx.appcompat.widget.Toolbar;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.snackbar.Snackbar;
import android.util.Log;
import android.util.LruCache;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.google.gson.Gson;
import com.google.gson.internal.LinkedTreeMap;
import com.google.gson.reflect.TypeToken;
import com.sample.sydneyzamoranos.dummy.DummyContent;
import com.sample.sydneyzamoranos.pojo.Results;
import com.sample.sydneyzamoranos.pojo.SongInfo;
import com.sample.sydneyzamoranos.presenter.CallBackResponse;
import com.sample.sydneyzamoranos.presenter.GetSongInfoImpl;
import com.sample.sydneyzamoranos.view.ItunesSongsView;
import com.squareup.picasso.Picasso;
import java.lang.reflect.Array;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.stream.Collectors;
import butterknife.BindView;
import butterknife.ButterKnife;
/**
* An activity representing a list of Items. This activity
* has different presentations for handset and tablet-size devices. On
* handsets, the activity presents a list of items, which when touched,
* lead to a {@link ItemDetailActivity} representing
* item details. On tablets, the activity presents the list of items and
* item details side-by-side using two vertical panes.
*/
public class ItemListActivity extends AppCompatActivity implements ItunesSongsView {
/**
* Whether or not the activity is in two-pane mode, i.e. running on a tablet
* device.
*/
private boolean mTwoPane;
@BindView(R.id.toolbar)
Toolbar toolbar;
@BindView(R.id.fab)
FloatingActionButton fab;
@BindView(R.id.item_list)
View recyclerView;
private static LruCache cache = new LruCache(5000);
SharedPreferences pref;
SharedPreferences.Editor editor;
private SimpleItemRecyclerViewAdapter adapter;
private List<Results> results;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_item_list);
ActivityManager am = (ActivityManager) this.getSystemService(
Context.ACTIVITY_SERVICE);
pref = getApplicationContext().getSharedPreferences("preference", 0); // 0 - for private mode
editor = pref.edit();
if (pref.getString("data", "") == null || pref.getString("data", "").equals("")) {
results = new ArrayList<>();
} else {
String json = pref.getString("data", "");
Gson gson = new Gson();
Type type = new TypeToken<List<Results>>() {
}.getType();
List<Results> obj = gson.fromJson(json, type);
results = obj;
}
ButterKnife.bind(this);
setSupportActionBar(toolbar);
GetSongInfoImpl getSongInfoImpl = new GetSongInfoImpl(this);
adapter = new SimpleItemRecyclerViewAdapter(this, results, mTwoPane);
toolbar.setTitle(getTitle());
if (results.size() <= 1) {
Results results1 = new Results();
results1.setArtistId("1");
results1.setArtistName("sydney");
results.add(results1);
getSongInfoImpl.getAllSongs(results, new CallBackResponse() {
public void completed(boolean done) {
if (done) {
ItemListActivity.this.runOnUiThread(new Runnable() {
@Override
public void run() {
Gson gson = new Gson();
String json = gson.toJson(results);
editor.putString("data", json);
editor.commit();
adapter.notifyDataSetChanged();
}
});
}
}
});
} else {
setupRecyclerView((RecyclerView) recyclerView);
}
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
}
});
if (findViewById(R.id.item_detail_container) != null) {
// The detail container view will be present only in the
// large-screen layouts (res/values-w900dp).
// If this view is present, then the
// activity should be in two-pane mode.
mTwoPane = true;
}
getSongInfoImpl.processUi();
}
public static class SimpleItemRecyclerViewAdapter
extends RecyclerView.Adapter<SimpleItemRecyclerViewAdapter.ViewHolder> {
private final ItemListActivity mParentActivity;
private final List<Results> mValues;
private final boolean mTwoPane;
private final View.OnClickListener mOnClickListener = new View.OnClickListener() {
@Override
public void onClick(View view) {
Results item = (Results) view.getTag();
if (mTwoPane) {
Bundle arguments = new Bundle();
arguments.putString(ItemDetailFragment.ARG_ITEM_ID, item.getArtistId());
ItemDetailFragment fragment = new ItemDetailFragment();
fragment.setArguments(arguments);
mParentActivity.getSupportFragmentManager().beginTransaction()
.replace(R.id.item_detail_container, fragment)
.commit();
} else {
Context context = view.getContext();
Intent intent = new Intent(context, ItemDetailActivity.class);
intent.putExtra("trackName", item.getTrackName());
intent.putExtra("artWork", item.getArtworkUrl100());
intent.putExtra("price", item.getTrackPrice());
intent.putExtra("description", item.getLongDescription());
intent.putExtra("genre", item.getPrimaryGenreName());
context.startActivity(intent);
}
}
};
SimpleItemRecyclerViewAdapter(ItemListActivity parent,
List<Results> results,
boolean twoPane) {
mValues = results;
mParentActivity = parent;
mTwoPane = twoPane;
}
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext())
.inflate(R.layout.item_list_content, parent, false);
return new ViewHolder(view);
}
@Override
public void onBindViewHolder(final ViewHolder holder, int position) {
holder.mIdView.setText(mValues.get(position).getArtistName());
holder.mContentView.setText("₱" + mValues.get(position).getTrackPrice());
Picasso.get().load(mValues.get(position).getArtworkUrl100()).resize(500,500).placeholder(R.drawable.images).into(holder.imageView);
holder.itemView.setTag(mValues.get(position));
holder.itemView.setOnClickListener(mOnClickListener);
}
@Override
public int getItemCount() {
return mValues.size();
}
class ViewHolder extends RecyclerView.ViewHolder {
final TextView mIdView;
final TextView mContentView;
final ImageView imageView;
ViewHolder(View view) {
super(view);
mIdView = (TextView) view.findViewById(R.id.id_text);
mContentView = (TextView) view.findViewById(R.id.content);
imageView = (ImageView) view.findViewById(R.id.imageView);
}
}
}
@Override
public void processSong(boolean done, CallBackResponse callBackResponse) {
setupRecyclerView((RecyclerView) recyclerView);
}
@Override
public void setSongsToUI(SongInfo songInfo) {
}
private void setupRecyclerView(@NonNull RecyclerView recyclerView) {
recyclerView.setAdapter(adapter);
}
}
|
[
"zamoranossydney@gmail.com"
] |
zamoranossydney@gmail.com
|
cdc9a741a30700db86f88dc10c90bd3fd3de32cd
|
5374163c451cf19b023c4cdf84397a1b29285dc0
|
/AndroidStudy/app/src/main/java/com/example/liuyang05_sx/androidstudy/bean/knowledge/Datum.java
|
c97bee139713ace25b51fda84c4699d2ab548210
|
[] |
no_license
|
1048785685/WanAndroid_study
|
c71e21daef98b98c0c45fd4c151a43cf0fb9c847
|
ff870c06479d69c17197e4455298436c7fc07c20
|
refs/heads/master
| 2020-04-24T09:34:40.650994
| 2019-04-26T09:38:57
| 2019-04-26T09:38:57
| 171,866,749
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,838
|
java
|
package com.example.liuyang05_sx.androidstudy.bean.knowledge;
import android.os.Parcelable;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class Datum implements Serializable {
@SerializedName("children")
@Expose
private List<Child> children = null;
@SerializedName("courseId")
@Expose
private Integer courseId;
@SerializedName("id")
@Expose
private Integer id;
@SerializedName("name")
@Expose
private String name;
@SerializedName("order")
@Expose
private Integer order;
@SerializedName("parentChapterId")
@Expose
private Integer parentChapterId;
@SerializedName("userControlSetTop")
@Expose
private Boolean userControlSetTop;
@SerializedName("visible")
@Expose
private Integer visible;
public List<Child> getChildren() {
return children;
}
public void setChildren(List<Child> children) {
this.children = children;
}
public Integer getCourseId() {
return courseId;
}
public void setCourseId(Integer courseId) {
this.courseId = courseId;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getOrder() {
return order;
}
public void setOrder(Integer order) {
this.order = order;
}
public Integer getParentChapterId() {
return parentChapterId;
}
public void setParentChapterId(Integer parentChapterId) {
this.parentChapterId = parentChapterId;
}
public Boolean getUserControlSetTop() {
return userControlSetTop;
}
public void setUserControlSetTop(Boolean userControlSetTop) {
this.userControlSetTop = userControlSetTop;
}
public Integer getVisible() {
return visible;
}
public void setVisible(Integer visible) {
this.visible = visible;
}
}
|
[
"1048785685@qq.com"
] |
1048785685@qq.com
|
731874f708e817dacc8ef75ccf680807e8a4c0ec
|
c093a8763b37881e6200f2d40f1cf085d2c16b53
|
/src/test/java/com/tinklabs/handy/logs/listener/KafkaTest.java
|
423f881b6c53774022cbf5c07e0eae4e9de1c307
|
[] |
no_license
|
hanjingyang/handy-logging-api
|
28b17dd5736a9210a8a72862ee44b6812e3b6819
|
725ba78f662825fd69ed2ba2630a4d1e103f1f0a
|
refs/heads/master
| 2020-06-22T00:47:30.968774
| 2019-06-11T08:21:27
| 2019-06-11T08:21:27
| 197,591,844
| 0
| 0
| null | 2019-07-18T13:24:53
| 2019-07-18T13:24:53
| null |
UTF-8
|
Java
| false
| false
| 531
|
java
|
package com.tinklabs.handy.logs.listener;
import org.junit.Test;
import cn.hutool.http.HttpResponse;
import cn.hutool.http.HttpUtil;
public class KafkaTest {
@Test
public void testRest(){
HttpResponse result = HttpUtil.createPost("http://ec2-13-250-5-192.ap-southeast-1.compute.amazonaws.com:8082/topics/backend2-hangpan-test").
header("Content-Type", "application/vnd.kafka.v2+json").body("{\"records\":[{\"value\":\"{\\\"name\\\": \\\"hangpan-offset-4\\\"}\"}]}").execute();
System.out.println(result.body());
}
}
|
[
"tony_pengtao@163.com"
] |
tony_pengtao@163.com
|
17de4c665f63267ac396205148d1e67665d26242
|
da2b3591126a0df7ed04dacfe57c71e2584cd265
|
/jar-service/src/main/java/com/sixsq/slipstream/module/ModuleFormProcessor.java
|
ce3d7e02c05a309282026b8ec5271cb208b43c2e
|
[
"Apache-2.0"
] |
permissive
|
loverdos/SlipStreamServer
|
f017dae60c17a73e560a697912c70cf8b0ac5626
|
62d56e0697d2af1f44ec46a52174c30d5745d652
|
refs/heads/master
| 2021-01-24T00:08:38.664267
| 2014-05-19T07:55:28
| 2014-05-19T07:55:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,556
|
java
|
package com.sixsq.slipstream.module;
/*
* +=================================================================+
* SlipStream Server (WAR)
* =====
* Copyright (C) 2013 SixSq Sarl (sixsq.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.
* -=================================================================-
*/
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.restlet.data.Form;
import com.sixsq.slipstream.exceptions.NotFoundException;
import com.sixsq.slipstream.exceptions.SlipStreamClientException;
import com.sixsq.slipstream.exceptions.ValidationException;
import com.sixsq.slipstream.persistence.Authz;
import com.sixsq.slipstream.persistence.Commit;
import com.sixsq.slipstream.persistence.Module;
import com.sixsq.slipstream.persistence.ModuleCategory;
import com.sixsq.slipstream.persistence.ModuleParameter;
import com.sixsq.slipstream.persistence.User;
import com.sixsq.slipstream.user.FormProcessor;
public abstract class ModuleFormProcessor extends
FormProcessor<Module, ModuleParameter> {
private List<String> illegalNames = new ArrayList<String>(
(Arrays.asList(("new"))));
public ModuleFormProcessor(User user) {
super(user);
}
static public ModuleFormProcessor createFormProcessorInstance(
ModuleCategory category, User user) {
ModuleFormProcessor processor = null;
switch (category) {
case Project:
processor = new ProjectFormProcessor(user);
break;
case Image:
processor = new ImageFormProcessor(user);
break;
case BlockStore:
break;
case Deployment:
processor = new DeploymentFormProcessor(user);
break;
default:
String msg = "Unknown category: " + category.toString();
throw new IllegalArgumentException(msg);
}
return processor;
}
@Override
protected void parseForm() throws ValidationException, NotFoundException {
super.parseForm();
String name = parseName();
setParametrized(getOrCreateParameterized(name));
getParametrized().setDescription(parseDescription());
getParametrized().setCommit(parseCommit());
getParametrized().setLogoLink(parseLogoLink());
}
private String parseName() throws ValidationException {
String parent = getForm().getFirstValue("parentmodulename", "");
String name = getForm().getFirstValue("name");
validateName(name);
return ("".equals(parent)) ? name : parent + "/" + name;
}
private String parseDescription() throws ValidationException {
return getForm().getFirstValue("description");
}
private Commit parseCommit() throws ValidationException {
return new Commit(getUser().getName(), getForm().getFirstValue(
"comment"), getParametrized());
}
private String parseLogoLink() throws ValidationException {
return getForm().getFirstValue("logoLink");
}
private void validateName(String name) throws ValidationException {
for (String illegal : illegalNames) {
if (illegal.equals(name)) {
throw (new ValidationException("Illegal name: " + name));
}
}
return;
}
protected void parseAuthz() {
// Save authz section
Module module = getParametrized();
Authz authz = new Authz(getUser().getName(), module);
authz.clear();
Form form = getForm();
// ownerGet: can't be changed because owner would lose access
authz.setOwnerPost(getBooleanValue(form, "ownerPost"));
authz.setOwnerDelete(getBooleanValue(form, "ownerDelete"));
authz.setGroupGet(getBooleanValue(form, "groupGet"));
authz.setGroupPut(getBooleanValue(form, "groupPut"));
authz.setGroupPost(getBooleanValue(form, "groupPost"));
authz.setGroupDelete(getBooleanValue(form, "groupDelete"));
authz.setPublicGet(getBooleanValue(form, "publicGet"));
authz.setPublicPut(getBooleanValue(form, "publicPut"));
authz.setPublicPost(getBooleanValue(form, "publicPost"));
authz.setPublicDelete(getBooleanValue(form, "publicDelete"));
authz.setGroupMembers(form.getFirstValue("groupmembers", ""));
authz.setInheritedGroupMembers(getBooleanValue(form,
"inheritedGroupMembers"));
if (module.getCategory() == ModuleCategory.Project) {
authz.setOwnerCreateChildren(getBooleanValue(form,
"ownerCreateChildren"));
authz.setGroupCreateChildren(getBooleanValue(form,
"groupCreateChildren"));
authz.setPublicCreateChildren(getBooleanValue(form,
"publicCreateChildren"));
}
getParametrized().setAuthz(authz);
}
protected boolean getBooleanValue(Form form, String parameter) {
Object value = form.getFirstValue(parameter);
if (value != null && "on".equals(value.toString())) {
return true;
} else {
return false;
}
}
@Override
protected ModuleParameter createParameter(String name, String value,
String description) throws SlipStreamClientException {
return new ModuleParameter(name, value, description);
}
public void adjustModule(Module older) throws ValidationException {
getParametrized().setCreation(older.getCreation());
getParametrized().getAuthz().setUser(older.getOwner());
}
protected Module load(String name) {
return Module.loadByName(name);
}
}
|
[
"meb@sixsq.com"
] |
meb@sixsq.com
|
d132e68c3b11dbb15a2f5950fcc545cbc5b664a8
|
571fe02c6ead58dc8b7c3e57b9aab74c2d8ff5cd
|
/src/RiverCrossing/Story3.java
|
3739edb719f7e1f38761fe1600ef15275b9f68bb
|
[] |
no_license
|
zixa5824/RiverCrossing-Project
|
9c867920dff8ef831408c3a1af597fa8f0e188fa
|
1216eefcc7e7ea3c1704bcb94ea8f834876b88a6
|
refs/heads/master
| 2022-01-10T23:15:00.998880
| 2019-05-04T19:59:55
| 2019-05-04T19:59:55
| 181,748,268
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 597
|
java
|
package RiverCrossing;
import java.util.List;
public class Story3 implements ICrossingStrategy{
@Override
public boolean isValid(List<ICrosser> rightBankCrossers, List<ICrosser> leftBankCrossers,
List<ICrosser> boatRiders) {
// TODO Auto-generated method stub
return false;
}
@Override
public List<ICrosser> getInitialCrossers() {
// TODO Auto-generated method stub
return null;
}
@Override
public String[] getInstructions() {
// TODO Auto-generated method stub
return null;
}
}
|
[
"toti5824@gmail.com"
] |
toti5824@gmail.com
|
6a8759cae8109aa8379afb372d3c89161960db6d
|
5137db576fe470e4dfb88181b4d7294b71373600
|
/src/test/java/IT/NewsControllerTest.java
|
bd7fed6d437514a0a1a0262c099e662656a81977
|
[] |
no_license
|
Alexei-Fill/ProjectOne
|
0c5b97f4950dcfc23041c25f5e392d6bece1a652
|
48089a8fb001a37a2286b01e31cce9e369cdf675
|
refs/heads/master
| 2022-12-21T23:07:22.314236
| 2019-04-08T08:10:37
| 2019-04-08T08:10:37
| 166,208,744
| 0
| 0
| null | 2022-12-15T23:30:31
| 2019-01-17T10:40:50
|
Java
|
UTF-8
|
Java
| false
| false
| 5,907
|
java
|
package IT;
import com.SpEx7.config.AppConfig;
import com.SpEx7.config.WebMvcConfig;
import com.SpEx7.config.WebSecurityConfig;
import com.SpEx7.controller.NewsController;
import com.SpEx7.entity.News;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mock.web.MockServletContext;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.util.NestedServletException;
import javax.servlet.ServletContext;
import java.time.LocalDate;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
@RunWith(SpringJUnit4ClassRunner.class)
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)
@ContextConfiguration(classes = {AppConfig.class, WebSecurityConfig.class, WebMvcConfig.class})
@WebAppConfiguration
public class NewsControllerTest {
@Autowired
private WebApplicationContext wac;
private MockMvc mockMvc;
@Autowired
NewsController newsController;
News testNews = new News(190, "Test title", "Test brief", "Test content", LocalDate.now());
@Before
public void setUp() throws Exception {
this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build();
}
@After
public void tearDown() throws Exception {
}
@Test
public void givenWac_whenServletContext_thenItProvidesNewsController() {
ServletContext servletContext = wac.getServletContext();
Assert.assertNotNull(servletContext);
Assert.assertTrue(servletContext instanceof MockServletContext);
Assert.assertNotNull(wac.getBean("newsController"));
}
@Test
public void NewsList_newsListExist_returnNewsList() throws Exception {
mockMvc.perform(get("/newsList"))
.andDo(print())
.andExpect(status().isOk())
.andExpect(view().name("newsList"));
}
@Test
public void ShowAddNews_returnViewAndNewNews() throws Exception {
mockMvc.perform(get("/showAddNews"))
.andExpect(status().isOk())
.andExpect(view().name("editNews"))
.andExpect(model().attributeExists("news"));
}
@Test
public void ShowEditNews_returnViewAndNews() throws Exception {
mockMvc.perform(get("/showEditNews/{id}", 179))
.andDo(print())
.andExpect(status().isOk())
.andExpect(view().name("editNews"));
}
@Test
public void AddNews_allParametersFilled_addNewsAndRedirectToMain() throws Exception {
mockMvc.perform(post("/editAddNews")
.param("id", String.valueOf(testNews.getId()))
.param("title","testtesttesttesttesttesttesttesttst")
.param("content", "testtesttesttesttesttesttesttesttesttesttesttesttesttest")
.param("brief", "testtesttesttesttesttesttesttest")
.param("date", String.valueOf(LocalDate.now())))
.andDo(print())
.andExpect(status().isFound())
.andExpect(redirectedUrl(" /newsList"));
}
@Test
public void EditNews_allParametersFilled_addNewsAndRedirectToMain() throws Exception {
mockMvc.perform(post("/editAddNews")
.param("id", String.valueOf(testNews.getId()))
.param("title",testNews.getTitle())
.param("content", testNews.getContent())
.param("brief", testNews.getBrief())
.param("date", String.valueOf(testNews.getDate())))
.andDo(print())
.andExpect(status().isFound())
.andExpect(redirectedUrl(" /newsList"));
}
@Test
public void DeleteNews_removedNewsIdsExist_deleteNewsAndRedirectToMain() throws Exception {
mockMvc.perform(post("/deleteNews")
.param("removedNews", "179"))
.andDo(print())
.andExpect(status().isFound())
.andExpect(redirectedUrl(" /newsList"));
}
@Test
public void DeleteNews_removedNewsDoesNotExist_RedirectToMain() throws Exception {
mockMvc.perform(post("/deleteNews"))
.andDo(print())
.andExpect(status().isFound())
.andExpect(redirectedUrl(" /newsList"));
}
@Test
public void ShowNews_NewsByIdExist_returnViewNewsAndNews() throws Exception {
mockMvc.perform(get("/news/{id}", 190))
.andDo(print())
.andExpect(status().isOk())
.andExpect(view().name("news"))
.andExpect(model().attribute("news", testNews));
}
@Test(expected = NestedServletException.class)
public void ShowNews_NewsDoesNotExist_returnViewNewsAndNews() throws Exception {
News testNews = new News(1, "Test title", "Test brief", "Test content", LocalDate.now());
mockMvc.perform(get("/news/{id}", 2))
.andDo(print())
.andExpect(status().isOk())
.andExpect(view().name("news"))
.andExpect(model().attributeDoesNotExist("news"));
}
}
|
[
"alex.fill.27@gmail.com"
] |
alex.fill.27@gmail.com
|
35e79051d377bcf315401850578375be406e3131
|
bf67e54c2d5d9654ffc19b41fe7b4393060da272
|
/src/test/java/com/trycloud/tests/Mini/InitialTest.java
|
07383bee5ad438a0d0323c1c77ea94acdf64c82a
|
[] |
no_license
|
SabryneRjeb/TryCloud_G5
|
ab4b9370a2902605e8031b4b092cc1e813808922
|
b3e56ad62bf66f116c8f87373c04f60ac69418b6
|
refs/heads/master
| 2023-03-08T20:46:58.531264
| 2021-02-04T19:52:13
| 2021-02-04T19:52:13
| 334,788,123
| 0
| 0
| null | 2021-02-08T06:43:12
| 2021-02-01T00:29:43
|
Java
|
UTF-8
|
Java
| false
| false
| 183
|
java
|
package com.trycloud.tests.Mini;
public class InitialTest {
public static void main(String[] args) {
System.out.println("first commit");
//another commit
}
}
|
[
"74155239+minicandoit@users.noreply.github.com"
] |
74155239+minicandoit@users.noreply.github.com
|
a9852bebd1e45d3bc167e70f81afbb68c57a1556
|
b7a3e340d8ff0e7702c43a9e8c21518e5c30942b
|
/Design/src/main/java/com/webdesign/model/Category.java
|
1de127efc0daf5f15f0059b285ed49e80fa6ee65
|
[] |
no_license
|
dubeydhananjay/MyProject
|
f0d3f3691055f2a99f0358bb8b9e29fcb601f8be
|
5129b6092be2f04fbe7902d09b89306aa1b83d3a
|
refs/heads/master
| 2020-05-23T08:19:00.070974
| 2017-01-16T18:38:17
| 2017-01-16T18:38:39
| 70,221,967
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,588
|
java
|
package com.webdesign.model;
import java.io.Serializable;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import org.hibernate.validator.constraints.NotEmpty;
import com.google.gson.annotations.Expose;
@SuppressWarnings("serial")
@Entity
public class Category implements Serializable{
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
@Expose
private int categoryId;
@NotEmpty(message="Category Name is Required")
@Expose
private String categoryName;
@NotEmpty(message="Category Description is Required")
@Expose
private String categoryDescription;
@OneToMany(fetch = FetchType.EAGER,mappedBy="category", cascade=CascadeType.ALL)
private Set<SubCategoryModel> subCategory;
public Set<SubCategoryModel> getSubCategory() {
return subCategory;
}
public void setSubCategory(Set<SubCategoryModel> subCategory) {
this.subCategory = subCategory;
}
public int getCategoryId() {
return categoryId;
}
public void setCategoryId(int categoryId) {
this.categoryId = categoryId;
}
public String getCategoryName() {
return categoryName;
}
public void setCategoryName(String categoryName) {
this.categoryName = categoryName;
}
public String getCategoryDescription() {
return categoryDescription;
}
public void setCategoryDescription(String categoryDescription) {
this.categoryDescription = categoryDescription;
}
}
|
[
"dubeydhananjay9@gmail.com"
] |
dubeydhananjay9@gmail.com
|
397922a4b33fc0cc2e1650d58928d39d2d1a2178
|
f6b0109a2c1e5ddd5196452a181bca0fa9274219
|
/marketplace_controle-master/src/com/marketplace/model/Mensagem.java
|
0ef9c04804a30a3d1271875cd8c56a260c92839a
|
[] |
no_license
|
viniciusms29/Sistemas-Distribuidos
|
a75fe999700a24ae13e78d590aa40729f8f9aaec
|
87d23380fc3746c94c0a50820733c30e05cb4dd0
|
refs/heads/master
| 2022-12-22T17:26:28.028687
| 2019-11-23T19:38:24
| 2019-11-23T19:38:24
| 223,642,022
| 0
| 0
| null | 2022-11-24T07:43:20
| 2019-11-23T19:29:44
|
Java
|
UTF-8
|
Java
| false
| false
| 510
|
java
|
package com.marketplace.model;
import java.io.Serializable;
import com.marketplace.controle.RequestEnum;
public class Mensagem implements Serializable{
/**
*
*/
private static final long serialVersionUID = 1L;
private Object objeto;
private RequestEnum tipo;
public Mensagem(Object objeto, RequestEnum tipo) {
this.objeto = objeto;
this.tipo = tipo;
}
public Object getObjeto() {
return objeto;
}
public RequestEnum getTipo() {
return tipo;
}
}
|
[
"noreply@github.com"
] |
viniciusms29.noreply@github.com
|
10f525383e1b46f6e2d4f0802a4f039a779ce8b1
|
bb993db072724f50ed9c7ba596a14bd50b726771
|
/core/src/com/pocketbeach/game/Genotype.java
|
6cb9be60e9ae4dbd5c3f222bf2286291dd505976
|
[] |
no_license
|
PhilipGarnero/PocketBeach
|
1230e3881ec1870fbdbb356d59d064bda3c56407
|
ac08697c287d9d2865e6b2cf40db4f8dbc09e3e2
|
refs/heads/master
| 2021-05-31T04:08:20.825314
| 2016-05-06T10:20:29
| 2016-05-06T10:22:09
| 57,350,336
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,511
|
java
|
package com.pocketbeach.game;
import com.pocketbeach.game.phenotypes.Brain;
import com.pocketbeach.game.phenotypes.Features;
import com.pocketbeach.game.phenotypes.PhysicalBody;
import com.pocketbeach.game.phenotypes.Vitals;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
public class Genotype {
public final static float GENE_MUTATION_PROB = 0.40f;
private final static float GENE_CROSSOVER_PROB = 0.70f;
private final static float GENE_IF_CROSSOVER_DOUBLE_PROB = 0.50f;
private final static float GENE_IF_CROSSOVER_AND_DOUBLE_UNBALANCED_PROB = 0.30f;
public final static String GENE_CHAR_POOL = "0123456789ABCDEF";
public final static int GENE_BASE = GENE_CHAR_POOL.length();
private final static String GENE_SEP = "Z";
private final HashMap<String, String> GENE_PHENOTYPES_IDS = new HashMap<String, String>();
public String dna;
private HashMap<String, ArrayList<String>> genes = new HashMap<String, ArrayList<String>>();
public Actor individual = null;
public Genotype(String dna) {
this.GENE_PHENOTYPES_IDS.put("body", "1");
this.GENE_PHENOTYPES_IDS.put("brain", "2");
this.GENE_PHENOTYPES_IDS.put("vitals", "3");
this.GENE_PHENOTYPES_IDS.put("features", "4");
this.dna = dna;
if (this.dna == null)
this.dna = this.generateDna();
this.genes = this.extractGenes(this.dna);
}
private String generateDna() {
String dna = "";
// dna += GENE_SEP + this.GENE_PHENOTYPES_IDS.get("body") + PhysicalBody.GeneCoder.generateRandomDNA() + GENE_SEP;
dna += GENE_SEP + this.GENE_PHENOTYPES_IDS.get("brain") + Brain.GeneCoder.generateRandomDNA() + GENE_SEP;
dna += GENE_SEP + this.GENE_PHENOTYPES_IDS.get("vitals") + Vitals.GeneCoder.generateRandomDNA() + GENE_SEP;
dna += GENE_SEP + this.GENE_PHENOTYPES_IDS.get("features") + Features.GeneCoder.generateRandomDNA() + GENE_SEP;
return dna;
}
private HashMap<String, ArrayList<String>> extractGenes(String dna) {
HashMap<String, ArrayList<String>> genes = new HashMap<String, ArrayList<String>>();
ArrayList<String> dnaSeq = new ArrayList<String>(Arrays.asList(dna.split("")));
dnaSeq.remove(0);
String gene = "";
String geneId = "";
boolean inGeneSequence = false;
while (!dnaSeq.isEmpty()) {
String code = dnaSeq.get(0);
dnaSeq.remove(0);
if (code.equals(GENE_SEP) && !inGeneSequence) {
inGeneSequence = true;
geneId = "";
gene = "";
} else if (code.equals(GENE_SEP) && inGeneSequence) {
if (!geneId.isEmpty() && !gene.isEmpty())
genes.get(geneId).add(gene);
inGeneSequence = false;
} else if (inGeneSequence && geneId.isEmpty()) {
geneId = code;
if (!genes.containsKey(geneId))
genes.put(geneId, new ArrayList<String>());
} else if (inGeneSequence) {
gene = gene + code;
}
}
return genes;
}
private ArrayList<String> getGenesForPhenotype(String name) {
ArrayList<String> pGenes = this.genes.get(this.GENE_PHENOTYPES_IDS.get(name));
if (pGenes == null)
pGenes = new ArrayList<String>();
return pGenes;
}
public Object getPhenotype(String name, Actor actor) {
if (name.equals("brain")) {
return new Brain(this.getGenesForPhenotype("brain"), actor);
} else if (name.equals("body")) {
return new PhysicalBody(this.getGenesForPhenotype("body"), actor);
} else if (name.equals("vitals")) {
return new Vitals(this.getGenesForPhenotype("vitals"), actor);
} else if (name.equals("features")) {
return new Features(this.getGenesForPhenotype("features"), actor);
}
return null;
}
private void mutate() {
if (this.individual != null) {
this.dna = "";
// this.dna += GENE_SEP + this.GENE_PHENOTYPES_IDS.get("body") + this.individual.body.mutateDNAFromPhenotype() + GENE_SEP;
this.dna += GENE_SEP + this.GENE_PHENOTYPES_IDS.get("brain") + this.individual.brain.mutateDNAFromPhenotype() + GENE_SEP;
this.dna += GENE_SEP + this.GENE_PHENOTYPES_IDS.get("vitals") + this.individual.vitals.mutateDNAFromPhenotype() + GENE_SEP;
this.dna += GENE_SEP + this.GENE_PHENOTYPES_IDS.get("features") + this.individual.features.mutateDNAFromPhenotype() + GENE_SEP;
this.genes = this.extractGenes(this.dna);
}
}
private static String crossover(String fatherDna, String motherDna) {
String childDna;
int max_cut = Math.min(fatherDna.length(), motherDna.length()) - 1;
int cut1, cut2, cut3;
if (com.pocketbeach.game.Rand.rNorm() > GENE_CROSSOVER_PROB) {
cut1 = com.pocketbeach.game.Rand.rInt(0, max_cut);
if (com.pocketbeach.game.Rand.rNorm() > GENE_IF_CROSSOVER_DOUBLE_PROB) {
cut2 = com.pocketbeach.game.Rand.rInt(0, max_cut);
if (cut2 < cut1) {
cut1 = cut1 + cut2;
cut2 = cut1 - cut2;
cut1 = cut1 - cut2;
}
if (com.pocketbeach.game.Rand.rNorm() > GENE_IF_CROSSOVER_AND_DOUBLE_UNBALANCED_PROB) {
cut3 = com.pocketbeach.game.Rand.rInt(0, max_cut);
if (cut3 < cut1) {
cut1 = cut1 + cut3;
cut3 = cut1 - cut3;
cut1 = cut1 - cut3;
}
childDna = fatherDna.substring(0, cut1) + motherDna.substring(cut1, cut2) + fatherDna.substring(cut3);
} else
childDna = fatherDna.substring(0, cut1) + motherDna.substring(cut1, cut2) + fatherDna.substring(cut2);
} else
childDna = fatherDna.substring(0, cut1) + motherDna.substring(cut1);
}
else {
String[] ch = {fatherDna, motherDna};
childDna = com.pocketbeach.game.Rand.rChoice(Arrays.asList(ch));
}
return childDna;
}
public static Genotype reproduce(Genotype father, Genotype mother) {
father.mutate();
mother.mutate();
return new Genotype(crossover(father.dna, mother.dna));
}
}
|
[
"philip.garnero@gmail.com"
] |
philip.garnero@gmail.com
|
b4be311794c30cd9b5833e6c518837bdeca5db1c
|
53de8abfd7e9b6118cdd0594efac42506442c114
|
/semantic-annotation-pipeline/src/clus/jeans/resource/SoundList.java
|
2ab5e2130c27da2f1263e238568ed896f7d60c52
|
[] |
no_license
|
KostovskaAna/MLC-data-catalog
|
b1bd6975880c99064852d5658a96946816c38ece
|
e272a679a5cf37df2bdb4d74a5dbe97df5a3089d
|
refs/heads/master
| 2023-08-28T00:25:14.488153
| 2021-10-28T13:13:20
| 2021-10-28T13:13:20
| 418,416,615
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,890
|
java
|
/*************************************************************************
* Clus - Software for Predictive Clustering *
* Copyright (C) 2007 *
* Katholieke Universiteit Leuven, Leuven, Belgium *
* Jozef Stefan Institute, Ljubljana, Slovenia *
* *
* 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/>. *
* *
* Contact information: <http://www.cs.kuleuven.be/~dtai/clus/>. *
*************************************************************************/
package clus.jeans.resource;
import java.applet.Applet;
import java.applet.AudioClip;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Hashtable;
/**
* Loads and holds a bunch of audio files whose locations are specified
* relative to a fixed base URL.
*/
public class SoundList {
Applet applet;
URL baseURL;
Hashtable table = new Hashtable();
private static SoundList instance = null;
public static SoundList getInstance() {
if (instance == null)
instance = new SoundList();
return instance;
}
private SoundList() {
}
public void setApplet(Applet applet) {
this.applet = applet;
}
public void setDirectory(URL codeBase, String dir) {
try {
baseURL = new URL(codeBase, dir);
}
catch (MalformedURLException e) {}
}
public void getDirectory(String dir) {
try {
URL crDir = new File(".").toURL();
baseURL = new URL(crDir, dir);
}
catch (MalformedURLException e) {}
}
public void startLoading(String relativeURL) throws MalformedURLException {
AudioClip audioClip = null;
if (applet == null) {
audioClip = Applet.newAudioClip(new URL(baseURL, relativeURL));
}
else {
audioClip = applet.getAudioClip(baseURL, relativeURL);
}
if (audioClip == null) {
System.out.println("Error loading audio clip: " + relativeURL);
}
putClip(audioClip, relativeURL);
}
public AudioClip getClip(String relativeURL) {
return (AudioClip) table.get(relativeURL);
}
private void putClip(AudioClip clip, String relativeURL) {
table.put(relativeURL, clip);
}
}
|
[
"anakostovska2@gmail.com"
] |
anakostovska2@gmail.com
|
0c7dd0f82eed6b47eec254079dcf40dcb95ac1c5
|
b9d8c9dfd6c17ea40c1eac9bb3c085a922721035
|
/SmartFramework/src/main/java/com/rwt/smartframework/util/PropsUtil.java
|
80a4ef29536c292709226fbba724690396b985f2
|
[] |
no_license
|
rwtgithub/smart_framework
|
d97d98ddda7b8efdc0a9061bbf3f659f34b68e50
|
f89f111049e51606abadd8500e05851599d55cb0
|
refs/heads/master
| 2020-03-31T13:24:27.184111
| 2018-10-10T13:10:37
| 2018-10-10T13:10:37
| 152,254,322
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,818
|
java
|
package com.rwt.smartframework.util;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
/*
属性文件工具类
*/
public class PropsUtil {
private static final Logger logger = LoggerFactory.getLogger(PropsUtil.class);
/*
加载属性文件
*/
public static Properties loadProps(String filename) {
Properties properties = null;
InputStream is = null;
try {
is = Thread.currentThread().getContextClassLoader().getResourceAsStream(filename);
if (is == null) {
throw new FileNotFoundException(filename + "file is not found");
}
properties = new Properties();
properties.load(is);
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
logger.error("load properties file failure", e);
} finally {
if (is != null) {
try {
is.close();
} catch (IOException e) {
logger.error("close inputstream failure ", e);
}
}
}
return properties;
}
/*
*获取字符型属性(默认值为空)
* */
public static String getString(Properties properties, String key) {
return getString(properties, key, "");
}
/*
* 获取字符属性(可指定默认值)
* */
public static String getString(Properties properties, String key, String defaultValue) {
String value = defaultValue;
if (properties.containsKey(key)) {
value = properties.getProperty(key);
}
return value;
}
}
|
[
"1019908255@qq.com"
] |
1019908255@qq.com
|
ec60737beab08cc5881b3daee544973c642ac38b
|
481701961e44fc128ab7a46c5fb6d2b9642608b8
|
/src/cn/itcast/core/bean/Dingdan.java
|
a00146e01df230693bfc443c0c2a6cd6739ef0bc
|
[] |
no_license
|
Liangkaiyuan/renshi
|
041afda861629de0ee025a2b3edf48e29bcfe323
|
4ed4afc204b22a99b81c95eef678c8cca1f8fd66
|
refs/heads/master
| 2022-09-26T08:59:25.786923
| 2020-06-06T16:18:31
| 2020-06-06T16:18:31
| 270,034,852
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,707
|
java
|
package cn.itcast.core.bean;
public class Dingdan {
private Integer d_id ;//主键
private String d_name ;
private String d_cfname;
private String d_phone ;
private String province10 ;//省份
private String city10 ; //城市
private String district10 ; //区
private String d_jdxxdz ;
private String d_yy ;
private String d_fw ;
private String d_djh ;
private String d_create_time;
private String d_status ;
private String d_a ;
private String d_b ;
private String d_c ;
private String d_e ;
private String d_f ;
public Integer getD_id() {
return d_id;
}
public void setD_id(Integer d_id) {
this.d_id = d_id;
}
public String getD_name() {
return d_name;
}
public void setD_name(String d_name) {
this.d_name = d_name;
}
public String getD_cfname() {
return d_cfname;
}
public void setD_cfname(String d_cfname) {
this.d_cfname = d_cfname;
}
public String getD_phone() {
return d_phone;
}
public void setD_phone(String d_phone) {
this.d_phone = d_phone;
}
public String getProvince10() {
return province10;
}
public void setProvince10(String province10) {
this.province10 = province10;
}
public String getCity10() {
return city10;
}
public void setCity10(String city10) {
this.city10 = city10;
}
public String getDistrict10() {
return district10;
}
public void setDistrict10(String district10) {
this.district10 = district10;
}
public String getD_jdxxdz() {
return d_jdxxdz;
}
public void setD_jdxxdz(String d_jdxxdz) {
this.d_jdxxdz = d_jdxxdz;
}
public String getD_yy() {
return d_yy;
}
public void setD_yy(String d_yy) {
this.d_yy = d_yy;
}
public String getD_fw() {
return d_fw;
}
public void setD_fw(String d_fw) {
this.d_fw = d_fw;
}
public String getD_djh() {
return d_djh;
}
public void setD_djh(String d_djh) {
this.d_djh = d_djh;
}
public String getD_create_time() {
return d_create_time;
}
public void setD_create_time(String d_create_time) {
this.d_create_time = d_create_time;
}
public String getD_status() {
return d_status;
}
public void setD_status(String d_status) {
this.d_status = d_status;
}
public String getD_a() {
return d_a;
}
public void setD_a(String d_a) {
this.d_a = d_a;
}
public String getD_b() {
return d_b;
}
public void setD_b(String d_b) {
this.d_b = d_b;
}
public String getD_c() {
return d_c;
}
public void setD_c(String d_c) {
this.d_c = d_c;
}
public String getD_e() {
return d_e;
}
public void setD_e(String d_e) {
this.d_e = d_e;
}
public String getD_f() {
return d_f;
}
public void setD_f(String d_f) {
this.d_f = d_f;
}
}
|
[
"1093595726@qq.com"
] |
1093595726@qq.com
|
de762c7bb781b36caf0ce74c6936ddcd92fbc5f5
|
ed3240a7cbf90ec71bb2c3e4c0d0c7dfe50b308d
|
/Swing14-WorkingWithListData/src/main/java/com/jin/MainFrame.java
|
c38144da1e71df5c661eb1fbb6b69318aa3196cb
|
[] |
no_license
|
cicadasworld/java-swing-demo
|
85ae5ab1586cf75ba55d0520ae7d93458ef79ec2
|
f2f374942a237ab20a9ce733e820eacccdb4afd4
|
refs/heads/master
| 2022-11-11T22:03:54.867406
| 2020-06-26T10:20:54
| 2020-06-26T10:20:54
| 275,127,960
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,087
|
java
|
package com.jin;
import java.awt.*;
import javax.swing.*;
public class MainFrame extends JFrame {
private final TextPanel textPanel;
private final Toolbar toolbar;
private final FormPanel formPanel;
public MainFrame() {
super("Hello World");
this.setLayout(new BorderLayout());
toolbar = new Toolbar();
textPanel = new TextPanel();
formPanel = new FormPanel();
toolbar.setTextListener(textPanel::appendText);
formPanel.setFormListener(e -> {
String name = e.getName();
String occupation = e.getOccupation();
int ageCat = e.getAgeCategory();
textPanel.appendText(name + ": " + occupation + ": " + ageCat + "\n");
});
this.add(formPanel, BorderLayout.WEST);
this.add(toolbar, BorderLayout.NORTH);
this.add(textPanel, BorderLayout.CENTER);
this.setSize(600, 500);
this.setLocationRelativeTo(null); // To center
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setVisible(true);
}
}
|
[
"flyterren@163.com"
] |
flyterren@163.com
|
b267c8b3ceb6febb651a337335fd7e3a4af17bbf
|
74b241d469947512452cf1210588ce9c0c1a8b96
|
/src/main/java/id/ac/unpar/siamodels/matakuliah/AIF380.java
|
6573cdefe1a391f56da97acdf25d4b34c4183bdb
|
[
"MIT"
] |
permissive
|
johanes97/SIAModels
|
3c20ce1670f99383e4e41f2fd180d3ee4461899f
|
1a179305c4d135d3eecb13b9a797a3c11003beef
|
refs/heads/master
| 2020-04-21T11:22:14.579132
| 2019-05-02T06:11:05
| 2019-05-02T06:11:05
| 167,295,079
| 1
| 0
|
MIT
| 2019-01-31T07:40:05
| 2019-01-24T03:17:33
|
Java
|
UTF-8
|
Java
| false
| false
| 232
|
java
|
package id.ac.unpar.siamodels.matakuliah;
import id.ac.unpar.siamodels.InfoMataKuliah;
import id.ac.unpar.siamodels.MataKuliah;
@InfoMataKuliah(nama = "Teori Bahasa & Otomata", sks = 3)
public class AIF380 extends MataKuliah {
}
|
[
"pascalalfadian@live.com"
] |
pascalalfadian@live.com
|
ed0a1b3ba5706bff44d196bb7776028abd576b22
|
7c2bce462d9599d9be53e843019f3bf54e16d36e
|
/Rest Camping Web/campling/src/main/java/com/smu/camping/controller/reservation/ReservationManageController.java
|
7d2c622cf80928f4b6d7fed11a161ce206027218
|
[] |
no_license
|
hyou55/software-engineering-team-project
|
54b039dd62e654bf3e7ff03b471d4fd4d92d2b5c
|
e8049375d61d068d11fd306626b73b9c0021e5ae
|
refs/heads/main
| 2023-07-29T14:55:49.304474
| 2021-06-21T15:13:29
| 2021-06-21T15:13:29
| 354,011,196
| 0
| 0
| null | 2021-04-02T12:21:52
| 2021-04-02T12:21:51
| null |
UTF-8
|
Java
| false
| false
| 1,283
|
java
|
package com.smu.camping.controller.reservation;
import com.smu.camping.dto.ApiResponse;
import com.smu.camping.service.campsite.RoomService;
import com.smu.camping.service.reservation.ReservationManageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class ReservationManageController {
@Autowired
private ReservationManageService reservationManageService;
@Autowired
private RoomService roomService;
@PutMapping("/reservation/approve")
public ApiResponse approveReservation(@RequestParam("reservationId") int reservationId){
int result = reservationManageService.approveReservation(reservationId);
return (result > 0)? new ApiResponse(false, "") : new ApiResponse(true, "예약 승인에 실패하였습니다.");
}
@PutMapping("/reservation/reject")
public ApiResponse rejectReservation(@RequestParam("reservationId") int reservationId){
int result = reservationManageService.rejectReservation(reservationId);
return (result > 0)? new ApiResponse(false, "") : new ApiResponse(true, "예약 거부에 실패하였습니다.");
}
}
|
[
"rlfalsgh95@naver.com"
] |
rlfalsgh95@naver.com
|
4712e07046ab260aed93441a09a54a46a16d95b4
|
ebe42289f7fad9b77b2c38edb658987cdd821bc4
|
/src/main/java/af/hu/cs/se/hospitalmanagementsystem2/service/ReceptionistService.java
|
47af4ce5bc9f7dd1f6e970ff81d9a87cb5ce4343
|
[] |
no_license
|
ShaqayeqNegin/hms
|
1cb0118ca9b12d698ea1f65b254187c13fd3ffac
|
f3b215640aad56674eafd9405ded404adb02870e
|
refs/heads/master
| 2020-08-05T12:32:09.430903
| 2019-10-04T06:32:58
| 2019-10-04T06:32:58
| 212,506,763
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 331
|
java
|
package af.hu.cs.se.hospitalmanagementsystem2.service;
import af.hu.cs.se.hospitalmanagementsystem2.model.Receptionist;
public interface ReceptionistService {
void saveReceptionist(Receptionist receptionist);
Object findAll();
Receptionist findReceptionistById(Long id);
void deleteReceptionistById(Long id);
}
|
[
"negin.sh1376@gmail.com"
] |
negin.sh1376@gmail.com
|
af6e015d771efad30280be562608f814597c5a58
|
dd4b50b6407479d4745317c04940f28380445165
|
/pac4j-oauth/src/test/java/org/pac4j/oauth/run/RunPaypalClient.java
|
5a0564c4fd1433f853cb35f4dfe9b0a9f487d3be
|
[
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
qmwu2000/pac4j
|
f3344b8204ac44a7ded0b53d03c45e1dab370dbb
|
7ec522cc7179c63014edfe1c0af3b2db1f006a3a
|
refs/heads/master
| 2021-01-17T06:36:52.321221
| 2016-03-05T08:41:13
| 2016-03-05T08:41:13
| 53,256,748
| 0
| 1
| null | 2016-03-06T13:41:42
| 2016-03-06T13:41:41
| null |
UTF-8
|
Java
| false
| false
| 2,696
|
java
|
package org.pac4j.oauth.run;
import com.esotericsoftware.kryo.Kryo;
import org.pac4j.core.client.IndirectClient;
import org.pac4j.core.run.RunClient;
import org.pac4j.core.profile.Gender;
import org.pac4j.core.profile.ProfileHelper;
import org.pac4j.core.profile.UserProfile;
import org.pac4j.core.util.CommonHelper;
import org.pac4j.oauth.client.PayPalClient;
import org.pac4j.oauth.profile.paypal.PayPalAddress;
import org.pac4j.oauth.profile.paypal.PayPalProfile;
import java.util.Locale;
import static org.junit.Assert.*;
/**
* Run manually a test for the {@link PayPalClient}.
*
* @author Jerome Leleu
* @since 1.9.0
*/
public final class RunPaypalClient extends RunClient {
public static void main(String[] args) throws Exception {
new RunPaypalClient().run();
}
@Override
protected String getLogin() {
return "testscribeup@gmail.com";
}
@Override
protected String getPassword() {
return "a1z2e3r4!$";
}
@Override
protected IndirectClient getClient() {
final PayPalClient payPalClient = new PayPalClient(
"ARQFlBAOdRsb1NhZlutHT_PORP2F-TQpU-Laz-osaBwAHUIBIdg-C8DEsTWY",
"EAMZPBBfYJGeCBHYkm30xqC-VZ1kePnWZzPLdXyzY43rh-q0OQUH5eucXI6R");
payPalClient.setCallbackUrl(PAC4J_BASE_URL);
return payPalClient;
}
@Override
protected void registerForKryo(final Kryo kryo) {
kryo.register(PayPalProfile.class);
kryo.register(PayPalAddress.class);
}
@Override
protected void verifyProfile(UserProfile userProfile) {
final PayPalProfile profile = (PayPalProfile) userProfile;
assertEquals("YAxf5WKSFn4BG_l3wqcBJUSObQTG1Aww5FY0EDf_ccw", profile.getId());
assertEquals(PayPalProfile.class.getName() + UserProfile.SEPARATOR
+ "YAxf5WKSFn4BG_l3wqcBJUSObQTG1Aww5FY0EDf_ccw", profile.getTypedId());
assertTrue(ProfileHelper.isTypedIdOf(profile.getTypedId(), PayPalProfile.class));
assertTrue(CommonHelper.isNotBlank(profile.getAccessToken()));
assertCommonProfile(userProfile, "testscribeup@gmail.com", "Test", "ScribeUP", "Test ScribeUP", null,
Gender.UNSPECIFIED, Locale.FRANCE, null, null, "Europe/Berlin");
final PayPalAddress address = profile.getAddress();
assertEquals("FR", address.getCountry());
assertEquals("Paris", address.getLocality());
assertEquals("75001", address.getPostalCode());
assertEquals("Adr1", address.getStreetAddress());
final Locale language = profile.getLanguage();
assertEquals(Locale.FRANCE, language);
assertEquals(9, profile.getAttributes().size());
}
}
|
[
"leleuj@gmail.com"
] |
leleuj@gmail.com
|
7541560729a6733601bb12aa18ee7dbc797fee56
|
8021b3edcf849428f4c5f036a37edf5dd8754b30
|
/src/main/java/com/utils/ReflectHelper.java
|
b86bc72ad93084f44c80bbb20cc7fe7ecd617d85
|
[] |
no_license
|
pdmall/MallWXMS
|
e6f5a82737506ac8e420780768335d5926a33505
|
9bbc4e81b86e0915baef74bedca623bce19f2c97
|
refs/heads/master
| 2020-03-21T01:59:23.085867
| 2018-06-19T07:36:54
| 2018-06-19T07:36:54
| 137,973,326
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,955
|
java
|
package com.utils;
import java.lang.reflect.Field;
/**
* 说明:反射工具
* 创建人:FH Q728971035
* 修改时间:2014年9月20日
* @version
*/
public class ReflectHelper {
/**
* 获取obj对象fieldName的Field
* @param obj
* @param fieldName
* @return
*/
public static Field getFieldByFieldName(Object obj, String fieldName) {
for (Class<?> superClass = obj.getClass(); superClass != Object.class; superClass = superClass
.getSuperclass()) {
try {
return superClass.getDeclaredField(fieldName);
} catch (NoSuchFieldException e) {
}
}
return null;
}
/**
* 获取obj对象fieldName的属性值
* @param obj
* @param fieldName
* @return
* @throws SecurityException
* @throws NoSuchFieldException
* @throws IllegalArgumentException
* @throws IllegalAccessException
*/
public static Object getValueByFieldName(Object obj, String fieldName)
throws SecurityException, NoSuchFieldException,
IllegalArgumentException, IllegalAccessException {
Field field = getFieldByFieldName(obj, fieldName);
Object value = null;
if(field!=null){
if (field.isAccessible()) {
value = field.get(obj);
} else {
field.setAccessible(true);
value = field.get(obj);
field.setAccessible(false);
}
}
return value;
}
/**
* 设置obj对象fieldName的属性值
* @param obj
* @param fieldName
* @param value
* @throws SecurityException
* @throws NoSuchFieldException
* @throws IllegalArgumentException
* @throws IllegalAccessException
*/
public static void setValueByFieldName(Object obj, String fieldName,
Object value) throws SecurityException, NoSuchFieldException,
IllegalArgumentException, IllegalAccessException {
Field field = obj.getClass().getDeclaredField(fieldName);
if (field.isAccessible()) {
field.set(obj, value);
} else {
field.setAccessible(true);
field.set(obj, value);
field.setAccessible(false);
}
}
}
|
[
"40382179+pdmall@users.noreply.github.com"
] |
40382179+pdmall@users.noreply.github.com
|
bfd6d7ea1731e7c903f1715568da7ddc4fd513ee
|
4d6c00789d5eb8118e6df6fc5bcd0f671bbcdd2d
|
/src/main/java/com/alipay/api/domain/AlipayMarketingCardTemplateCreateModel.java
|
c1bdc6d687ecd74cdef3fc81506243ebc1cd7b06
|
[
"Apache-2.0"
] |
permissive
|
weizai118/payment-alipay
|
042898e172ce7f1162a69c1dc445e69e53a1899c
|
e3c1ad17d96524e5f1c4ba6d0af5b9e8fce97ac1
|
refs/heads/master
| 2020-04-05T06:29:57.113650
| 2018-11-06T11:03:05
| 2018-11-06T11:03:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 11,146
|
java
|
package com.alipay.api.domain;
import java.util.List;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
/**
* 会员卡模板创建
*
* @author auto create
* @since 1.0, 2018-03-14 10:42:35
*/
public class AlipayMarketingCardTemplateCreateModel extends AlipayObject {
private static final long serialVersionUID = 2495433996399317387L;
/**
* 业务卡号前缀,由商户指定
支付宝业务卡号生成规则:biz_no_prefix(商户指定)卡号前缀 + biz_no_suffix(实时生成)卡号后缀
*/
@ApiField("biz_no_prefix")
private String bizNoPrefix;
/**
* 业务卡号后缀的长度,取值范围为[8,32]
支付宝业务卡号生成规则:biz_no_prefix(商户指定)卡号前缀 + biz_no_suffix(实时生成)卡号后缀
由于业务卡号最长不超过32位,所以biz_no_suffix_len <= 32 - biz_no_prefix的位数
*/
@ApiField("biz_no_suffix_len")
private String bizNoSuffixLen;
/**
* 卡行动点配置;
行动点,即用户可点击跳转的区块,类似按钮控件的交互;
单张卡最多定制4个行动点。
*/
@ApiListField("card_action_list")
@ApiField("template_action_info_d_t_o")
private List<TemplateActionInfoDTO> cardActionList;
/**
* 卡级别配置
*/
@ApiListField("card_level_conf")
@ApiField("template_card_level_conf_d_t_o")
private List<TemplateCardLevelConfDTO> cardLevelConf;
/**
* 卡特定标签,只供特定业务使用,通常接入无需关注
*/
@ApiField("card_spec_tag")
private String cardSpecTag;
/**
* 卡类型为固定枚举类型,可选类型如下:
OUT_MEMBER_CARD:外部权益卡
*/
@ApiField("card_type")
private String cardType;
/**
* 栏位信息
*/
@ApiListField("column_info_list")
@ApiField("template_column_info_d_t_o")
private List<TemplateColumnInfoDTO> columnInfoList;
/**
* 字段规则列表,会员卡开卡过程中,会员卡信息的生成规则,
例如:卡有效期为开卡后两年内有效,则设置为:DATE_IN_FUTURE
*/
@ApiListField("field_rule_list")
@ApiField("template_field_rule_d_t_o")
private List<TemplateFieldRuleDTO> fieldRuleList;
/**
* 商户动态码通知参数配置:
当write_off_type指定为商户动态码mdbarcode或mdqrcode时必填;
在此字段配置用户打开会员卡时支付宝通知商户生成动态码(发码)的通知参数,如接收通知地址等。
*/
@ApiField("mdcode_notify_conf")
private TemplateMdcodeNotifyConfDTO mdcodeNotifyConf;
/**
* 会员卡用户领卡配置,在门店等渠道露出领卡入口时,需要部署的商户领卡H5页面地址
*/
@ApiField("open_card_conf")
private TemplateOpenCardConfDTO openCardConf;
/**
* 卡模板投放渠道
*/
@ApiListField("pub_channels")
@ApiField("pub_channel_d_t_o")
private List<PubChannelDTO> pubChannels;
/**
* 请求ID,由开发者生成并保证唯一性
*/
@ApiField("request_id")
private String requestId;
/**
* 服务Code
HUABEI_FUWU:花呗服务(只有需要花呗服务时,才需要加入该标识)
*/
@ApiListField("service_label_list")
@ApiField("string")
private List<String> serviceLabelList;
/**
* 会员卡上架门店id(支付宝门店id),既发放会员卡的商家门店id
*/
@ApiListField("shop_ids")
@ApiField("string")
private List<String> shopIds;
/**
* 权益信息,
1、在卡包的卡详情页面会自动添加权益栏位,展现会员卡特权,
2、如果添加门店渠道,则可在门店页展现会员卡的权益
*/
@ApiListField("template_benefit_info")
@ApiField("template_benefit_info_d_t_o")
private List<TemplateBenefitInfoDTO> templateBenefitInfo;
/**
* 模板样式信息
*/
@ApiField("template_style_info")
private TemplateStyleInfoDTO templateStyleInfo;
/**
* 卡包详情页面中展现出的卡码(可用于扫码核销)
(1) 静态码
qrcode: 二维码,扫码得商户开卡传入的external_card_no
barcode: 条形码,扫码得商户开卡传入的external_card_no
text: 当前不再推荐使用,text的展示效果目前等价于barcode+qrcode,同时出现条形码和二维码
(2) 动态码-支付宝生成码值(动态码会在2分钟左右后过期)
dqrcode: 动态二维码,扫码得到的码值可配合会员卡查询接口使用
dbarcode: 动态条形码,扫码得到的码值可配合会员卡查询接口使用
(3) 动态码-商家自主生成码值(码值、时效性都由商户控制)
mdqrcode: 商户动态二维码,扫码得商户自主传入的码值
mdbarcode: 商户动态条码,扫码得商户自主传入的码值
*/
@ApiField("write_off_type")
private String writeOffType;
/**
* Gets biz no prefix.
*
* @return the biz no prefix
*/
public String getBizNoPrefix() {
return this.bizNoPrefix;
}
/**
* Sets biz no prefix.
*
* @param bizNoPrefix the biz no prefix
*/
public void setBizNoPrefix(String bizNoPrefix) {
this.bizNoPrefix = bizNoPrefix;
}
/**
* Gets biz no suffix len.
*
* @return the biz no suffix len
*/
public String getBizNoSuffixLen() {
return this.bizNoSuffixLen;
}
/**
* Sets biz no suffix len.
*
* @param bizNoSuffixLen the biz no suffix len
*/
public void setBizNoSuffixLen(String bizNoSuffixLen) {
this.bizNoSuffixLen = bizNoSuffixLen;
}
/**
* Gets card action list.
*
* @return the card action list
*/
public List<TemplateActionInfoDTO> getCardActionList() {
return this.cardActionList;
}
/**
* Sets card action list.
*
* @param cardActionList the card action list
*/
public void setCardActionList(List<TemplateActionInfoDTO> cardActionList) {
this.cardActionList = cardActionList;
}
/**
* Gets card level conf.
*
* @return the card level conf
*/
public List<TemplateCardLevelConfDTO> getCardLevelConf() {
return this.cardLevelConf;
}
/**
* Sets card level conf.
*
* @param cardLevelConf the card level conf
*/
public void setCardLevelConf(List<TemplateCardLevelConfDTO> cardLevelConf) {
this.cardLevelConf = cardLevelConf;
}
/**
* Gets card spec tag.
*
* @return the card spec tag
*/
public String getCardSpecTag() {
return this.cardSpecTag;
}
/**
* Sets card spec tag.
*
* @param cardSpecTag the card spec tag
*/
public void setCardSpecTag(String cardSpecTag) {
this.cardSpecTag = cardSpecTag;
}
/**
* Gets card type.
*
* @return the card type
*/
public String getCardType() {
return this.cardType;
}
/**
* Sets card type.
*
* @param cardType the card type
*/
public void setCardType(String cardType) {
this.cardType = cardType;
}
/**
* Gets column info list.
*
* @return the column info list
*/
public List<TemplateColumnInfoDTO> getColumnInfoList() {
return this.columnInfoList;
}
/**
* Sets column info list.
*
* @param columnInfoList the column info list
*/
public void setColumnInfoList(List<TemplateColumnInfoDTO> columnInfoList) {
this.columnInfoList = columnInfoList;
}
/**
* Gets field rule list.
*
* @return the field rule list
*/
public List<TemplateFieldRuleDTO> getFieldRuleList() {
return this.fieldRuleList;
}
/**
* Sets field rule list.
*
* @param fieldRuleList the field rule list
*/
public void setFieldRuleList(List<TemplateFieldRuleDTO> fieldRuleList) {
this.fieldRuleList = fieldRuleList;
}
/**
* Gets mdcode notify conf.
*
* @return the mdcode notify conf
*/
public TemplateMdcodeNotifyConfDTO getMdcodeNotifyConf() {
return this.mdcodeNotifyConf;
}
/**
* Sets mdcode notify conf.
*
* @param mdcodeNotifyConf the mdcode notify conf
*/
public void setMdcodeNotifyConf(TemplateMdcodeNotifyConfDTO mdcodeNotifyConf) {
this.mdcodeNotifyConf = mdcodeNotifyConf;
}
/**
* Gets open card conf.
*
* @return the open card conf
*/
public TemplateOpenCardConfDTO getOpenCardConf() {
return this.openCardConf;
}
/**
* Sets open card conf.
*
* @param openCardConf the open card conf
*/
public void setOpenCardConf(TemplateOpenCardConfDTO openCardConf) {
this.openCardConf = openCardConf;
}
/**
* Gets pub channels.
*
* @return the pub channels
*/
public List<PubChannelDTO> getPubChannels() {
return this.pubChannels;
}
/**
* Sets pub channels.
*
* @param pubChannels the pub channels
*/
public void setPubChannels(List<PubChannelDTO> pubChannels) {
this.pubChannels = pubChannels;
}
/**
* Gets request id.
*
* @return the request id
*/
public String getRequestId() {
return this.requestId;
}
/**
* Sets request id.
*
* @param requestId the request id
*/
public void setRequestId(String requestId) {
this.requestId = requestId;
}
/**
* Gets service label list.
*
* @return the service label list
*/
public List<String> getServiceLabelList() {
return this.serviceLabelList;
}
/**
* Sets service label list.
*
* @param serviceLabelList the service label list
*/
public void setServiceLabelList(List<String> serviceLabelList) {
this.serviceLabelList = serviceLabelList;
}
/**
* Gets shop ids.
*
* @return the shop ids
*/
public List<String> getShopIds() {
return this.shopIds;
}
/**
* Sets shop ids.
*
* @param shopIds the shop ids
*/
public void setShopIds(List<String> shopIds) {
this.shopIds = shopIds;
}
/**
* Gets template benefit info.
*
* @return the template benefit info
*/
public List<TemplateBenefitInfoDTO> getTemplateBenefitInfo() {
return this.templateBenefitInfo;
}
/**
* Sets template benefit info.
*
* @param templateBenefitInfo the template benefit info
*/
public void setTemplateBenefitInfo(List<TemplateBenefitInfoDTO> templateBenefitInfo) {
this.templateBenefitInfo = templateBenefitInfo;
}
/**
* Gets template style info.
*
* @return the template style info
*/
public TemplateStyleInfoDTO getTemplateStyleInfo() {
return this.templateStyleInfo;
}
/**
* Sets template style info.
*
* @param templateStyleInfo the template style info
*/
public void setTemplateStyleInfo(TemplateStyleInfoDTO templateStyleInfo) {
this.templateStyleInfo = templateStyleInfo;
}
/**
* Gets write off type.
*
* @return the write off type
*/
public String getWriteOffType() {
return this.writeOffType;
}
/**
* Sets write off type.
*
* @param writeOffType the write off type
*/
public void setWriteOffType(String writeOffType) {
this.writeOffType = writeOffType;
}
}
|
[
"hanley@thlws.com"
] |
hanley@thlws.com
|
37b7d4795d774ea3c6759269dc48a33e51adadc8
|
ad0ceb1b8f41d8ae2728e0554af80e00e6aeb738
|
/src/com/portal/service/ModuleService.java
|
a647756dd02739ad8ef2301e21f722ecf8af7f27
|
[] |
no_license
|
HydraStudio/PortalSite
|
397da0bc016d1dc90e36f754a944af05dc8278a2
|
bf1bde2bb0fd3dd2fb62c69623c9175bc4247701
|
refs/heads/master
| 2020-06-01T07:42:52.243711
| 2014-06-18T14:36:13
| 2014-06-18T14:36:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 459
|
java
|
package com.portal.service;
import java.util.List;
import com.portal.model.Module;
import com.portal.model.PageBean;
import com.portal.util.QueryHelper;
public interface ModuleService {
List<Module> findAllModules();
void deleteModule(Long id);
void saveModule(Module module);
Module getById(Long id);
void modifyModule(Module module);
PageBean searchPagination(int pageNum, int pageSize, QueryHelper queryHelper);
}
|
[
"liujun3471@163.com"
] |
liujun3471@163.com
|
b3901add44c9510a10d92fdaece69c87e02728b3
|
6d4a93a534eb5340e8cefb5c03c2aca07dcf2cbc
|
/Web-Services/JAX-RS_4/ejb/src/main/java/ru/javacourse/model/Region.java
|
8b198f5147f436a66eebdb8def6e7b9888227a1f
|
[] |
no_license
|
MaxGradus/JavaCourse
|
d46f025e21318e8382e893be7fd48edaffc7ed3c
|
d190bc57f8dadac82d3e173a8b5ab92a18e661c9
|
refs/heads/master
| 2020-04-05T22:45:51.235854
| 2016-01-19T08:13:09
| 2016-01-19T08:13:09
| 32,000,480
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,075
|
java
|
package ru.javacourse.model;
import javax.persistence.*;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;
@XmlRootElement
@Entity
@Table(name = "jc_region")
@NamedQueries({
@NamedQuery(name = "Region.GetAll", query = "select r from Region r")
})
public class Region implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "region_id")
private Integer regionId;
@Column(name = "region_name", nullable = true)
private String regionName;
public Region() {
}
public Region(String regionName) {
this.regionName = regionName;
}
public Integer getRegionId() {
return regionId;
}
public void setRegionId(Integer regionId) {
this.regionId = regionId;
}
public String getRegionName() {
return regionName;
}
public void setRegionName(String regionName) {
this.regionName = regionName;
}
@Override
public String toString() {
return regionId + ":" + regionName;
}
}
|
[
"gradus182@gmail.com"
] |
gradus182@gmail.com
|
d879696f2da6d0524d9022153e21b4921f36a427
|
56eacc988a3d43282651c7ea6000d02f58d4fff8
|
/app/src/main/java/com/hxjf/dubei/adapter/BookListItemListAdapter.java
|
5639782ff4497249851629f7fa9e7364aba361ae
|
[] |
no_license
|
RollCretin/2iebud
|
502182477c9fdc09df7bc4f1f88e8a7e1b6c5804
|
a9977ed367d057002a4b8638b4a73bf5c2bdc15f
|
refs/heads/master
| 2020-03-22T09:17:31.832630
| 2018-07-10T08:24:47
| 2018-07-10T08:24:47
| 139,827,423
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,995
|
java
|
package com.hxjf.dubei.adapter;
import android.content.Context;
import android.text.Html;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.hxjf.dubei.R;
import com.hxjf.dubei.bean.BookListbean;
import com.hxjf.dubei.network.ReaderRetroift;
import java.util.List;
import de.hdodenhof.circleimageview.CircleImageView;
/**
* Created by Chen_Zhang on 2017/7/15.
*/
public class BookListItemListAdapter extends BaseAdapter {
Context mContext;
List<BookListbean.ResponseDataBean.ContentBean> mList;
public BookListItemListAdapter(Context context, List<BookListbean.ResponseDataBean.ContentBean> list) {
mContext = context;
mList = list;
}
@Override
public int getCount() {
return mList.size();
}
@Override
public Object getItem(int position) {
return mList.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder = null;
if (convertView == null){
holder = new ViewHolder();
convertView = View.inflate(mContext,R.layout.item_preferred_booklist,null);
holder.ivImage = (ImageView) convertView.findViewById(R.id.item_prefferred_booklist_iamge);
holder.tvTitle = (TextView) convertView.findViewById(R.id.item_prefferred_booklist_title);
holder.tvDes = (TextView) convertView.findViewById(R.id.item_prefferred_booklist_des);
holder.tvNum = (TextView) convertView.findViewById(R.id.item_prefferred_booklist_num);
holder.ivPratroit = (CircleImageView) convertView.findViewById(R.id.item_prefferred_booklist_pratroit);
holder.tvName = (TextView) convertView.findViewById(R.id.item_prefferred_booklist_name);
convertView.setTag(holder);
}else{
holder = (ViewHolder) convertView.getTag();
}
BookListbean.ResponseDataBean.ContentBean contentBean = mList.get(position);
Glide.with(mContext).load(ReaderRetroift.IMAGE_URL +contentBean.getCover()).into(holder.ivImage);
Glide.with(mContext).load(ReaderRetroift.IMAGE_URL +contentBean.getOwnerHeadPath()).into(holder.ivPratroit);
holder.tvName.setText(contentBean.getOwnerName());
holder.tvTitle.setText(contentBean.getTitle());
String des = Html.fromHtml(contentBean.getSummary()).toString();
holder.tvDes.setText(des);
holder.tvNum.setText(contentBean.getBookCount()+"本书籍");
return convertView;
}
public class ViewHolder{
public ImageView ivImage;
public TextView tvTitle;
public TextView tvDes;
public TextView tvNum;
public CircleImageView ivPratroit;
public TextView tvName;
}
}
|
[
"chen15302689824@163.com"
] |
chen15302689824@163.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.