blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
390
content_id
stringlengths
40
40
detected_licenses
listlengths
0
35
license_type
stringclasses
2 values
repo_name
stringlengths
6
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
539 values
visit_date
timestamp[us]date
2016-08-02 21:09:20
2023-09-06 10:10:07
revision_date
timestamp[us]date
1990-01-30 01:55:47
2023-09-05 21:45:37
committer_date
timestamp[us]date
2003-07-12 18:48:29
2023-09-05 21:45:37
github_id
int64
7.28k
684M
star_events_count
int64
0
77.7k
fork_events_count
int64
0
48k
gha_license_id
stringclasses
13 values
gha_event_created_at
timestamp[us]date
2012-06-11 04:05:37
2023-09-14 21:59:18
gha_created_at
timestamp[us]date
2008-05-22 07:58:19
2023-08-28 02:39:21
gha_language
stringclasses
62 values
src_encoding
stringclasses
26 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
128
12.8k
extension
stringclasses
11 values
content
stringlengths
128
8.19k
authors
listlengths
1
1
author_id
stringlengths
1
79
c6264ef0265f87a283ce5b597c81ff6166e8ce64
01791d9f334616a629b30db8772c028aa7ba27b6
/src/exceptions/ex8/Ex8.java
55dc6623e2f37591ffa1e84e8cd963f8f8cc38ac
[]
no_license
VimIcewind/ThinkInJava
7941b3ccadeb0702a26ad9cb712f6131eeda3d77
f98e4185fe1380613bf586e4a77d8205d623ce01
refs/heads/master
2020-12-25T17:34:12.353986
2019-04-07T13:16:20
2019-04-07T13:16:20
50,911,163
1
0
null
null
null
null
UTF-8
Java
false
false
842
java
// exceptions/ex8/Ex8.java // TIJ4 Chapter Exceptions, Exercise 8 package exceptions.ex8; /** * Created by HWD on 2019/3/23 20:21 */ class Exception4 extends Exception { private String msg; public Exception4(String msg) { super(msg); System.out.println("Exception4()"); this.msg = msg; } protected void showS() { System.out.println("Message from Exception4: " + msg); } } class Test8 { public static void f() throws Exception4 { System.out.println("f()"); throw new Exception4("Ouch from f()"); } } public class Ex8 { public static void main(String[] args) { try { Test8.f(); } catch(Exception4 e) { System.out.println("Caught Exception4"); e.printStackTrace(); e.showS(); } } }
[ "VimIcewind@gmail.com" ]
VimIcewind@gmail.com
331a2b699531a74c2000f948c8109107246a4d44
5cfdcd2ae2b6c7930568203af926205b134d99d1
/CentralActivityEngine_viewfunction_cloud/src/com/viewfunction/activityEngine/exception/ActivityEngineDataException.java
824ad285e8ba9bf4d01566827418953a811bcdef
[]
no_license
wangyingchu/CentralActivityEngine_viewfunction
1cf818e28132ff8529fae4079c0e21118281f854
bba413e129b559624a2100cc55bad6433dc4a3b7
refs/heads/master
2021-01-19T14:59:29.304348
2017-06-24T15:00:51
2017-06-24T15:00:51
100,935,211
0
0
null
null
null
null
UTF-8
Java
false
false
202
java
package com.viewfunction.activityEngine.exception; public class ActivityEngineDataException extends ActivityEngineException{ private static final long serialVersionUID = -1889914990346915427L; }
[ "yingchuwang@gmail.com" ]
yingchuwang@gmail.com
e151cd6560f8281ee66afc1a209c4837abf09681
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_100/Testnull_9990.java
389709a12214fbecbe0e029b54f705ddcc2a01f4
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
305
java
package org.gradle.test.performancenull_100; import static org.junit.Assert.*; public class Testnull_9990 { private final Productionnull_9990 production = new Productionnull_9990("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
25f20697b4df6791ad26dd29011a3fc332b68741
b80fd7a03e2ec371be906536a71d21e1a74865f7
/src/com/main/bean/admin/Permission.java
4a2c108d06051e2f92e01c94065b97b4f5db19cd
[]
no_license
lms248/MallServer2.0
67624aaff56f602593451c6c63201ae0816a7bad
3ea0d44db3048ae999618a64a532f5256aa28fc6
refs/heads/master
2021-01-13T09:58:39.982413
2016-11-15T08:00:21
2016-11-15T08:00:21
72,179,980
2
0
null
null
null
null
UTF-8
Java
false
false
309
java
package main.bean.admin; /** * 用户角色 */ public class Permission { private int id; private String name; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
[ "lms248@163.com" ]
lms248@163.com
24c45b9b1672ad089e77a8d945f0b4511774db06
cd6195ddb6e9c9a311b4a6263d48f3a14e0a1a0e
/grader/src/main/java/edu/pdx/cs410J/grader/DumpScores.java
dcac13388672d7037ceff74ca766f06686c2ea79
[]
no_license
sean97140/PortlandStateJava
a161ad10e8c1404ae3adb4383657e909d9eae246
5659d3649fc64be09a59f66ecc5a25db2f63debd
refs/heads/master
2021-01-17T05:40:54.323140
2014-07-19T23:06:38
2014-07-19T23:06:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,071
java
package edu.pdx.cs410J.grader; import java.io.*; import java.util.*; /** * This program sorts the scores for a given assignment and dumps them * to standard out. */ public class DumpScores { /** * Inner class that represents a score/Student tuple */ private static class Tuple implements Comparable { private double score; private Student student; Tuple(Student student, double score) { this.student = student; this.score = score; } public int compareTo(Object o) { Tuple other = (Tuple) o; if (this.score == other.score) { return this.student.getId().compareTo(other.student.getId()); } else if (this.score > other.score) { return -1; } else if (this.score < other.score) { return 1; } else { // assert this.score == other.score; return 0; } } public String toString() { return this.student + ": " + this.score; } } ////////////////////// Main Program /////////////////////// private static PrintStream out = System.out; private static PrintStream err = System.err; /** * Prints usage information about this program */ private static void usage(String s) { err.println("\n** " + s + "\n"); err.println("usage: java DumpScores xmlFile assignment"); err.println(""); err.println("Dumps the grades for a given assignment to " + "standard out"); err.println(""); System.exit(1); } public static void main(String[] args) throws Throwable { String xmlFileName = null; String assignmentName = null; for (int i = 0; i < args.length; i++) { if (xmlFileName == null) { xmlFileName = args[i]; } else if (assignmentName == null) { assignmentName = args[i]; } else { usage("Extraneous command line: " + args[i]); } } if (xmlFileName == null) { usage("Missing XML file"); } else if (assignmentName == null) { usage("Missing assignment"); } File xmlFile = new File(xmlFileName); if (!xmlFile.exists()) { usage("File \"" + xmlFileName + "\" does not exist"); } GradeBook book = (new XmlGradeBookParser(xmlFile)).parse(); Assignment assign = book.getAssignment(assignmentName); if (assign == null) { usage("No such assignment \"" + assignmentName + "\""); } // Maps score to the student SortedSet<Tuple> scores = new TreeSet<Tuple>(); Iterator ids = book.getStudentIds().iterator(); while (ids.hasNext()) { String id = (String) ids.next(); Student student = book.getStudent(id); Grade grade = student.getGrade(assign.getName()); if (grade != null) { double score = grade.getScore(); scores.add(new Tuple(student, score)); } } out.println("\nGrades for " + assign + ": " + assign.getDescription()); Iterator iter = scores.iterator(); while (iter.hasNext()) { out.println(" " + iter.next()); } out.println(""); } }
[ "david.m.whitlock@gmail.com" ]
david.m.whitlock@gmail.com
9debb33863262a79fa3384ddaa18c6586b6b552b
9df1684efcd7618f1dd46780274caacc1908433a
/infer/tests/codetoanalyze/java/racerd/RaceWithMainThread.java
bb518ae557e6439d5ab7b6c0277ed75a8a3634ab
[ "MIT", "GPL-1.0-or-later" ]
permissive
Abd-Elrazek/infer
a9f02c971c0c80e1d419bf51665e9570f6716174
be4c5aaa0fc7cb2e259f1ad683c04c8cfa11875c
refs/heads/master
2020-04-15T05:08:20.331302
2019-01-07T08:01:29
2019-01-07T08:04:32
164,410,091
1
0
MIT
2019-05-25T17:09:51
2019-01-07T09:38:22
OCaml
UTF-8
Java
false
false
4,991
java
/* * Copyright (c) 2016-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ package codetoanalyze.java.checkers; import javax.annotation.concurrent.ThreadSafe; class OurThreadUtils { static native boolean isMainThread(); static void assertMainThread() {} static void assertHoldsLock(Object lock) {} } class OurThreadUtil { /*This is like AndroidThreadUtil*/ static native boolean isUiThread(); static void assertOnUiThread() {} static void assertOnBackgroundThread() {} } @ThreadSafe class RaceWithMainThread { Integer f; void main_thread_OK() { OurThreadUtils.assertMainThread(); f = 88; } Integer f1; void main_thread1_OK() { OurThreadUtil.assertOnUiThread(); f1 = 88; } void main_thread_indirect_OK() { main_thread_OK(); f = 77; } void read_from_main_thread_OK() { Integer x; OurThreadUtils.assertMainThread(); x = f; } void read_unprotected_unthreaded_Bad() { Integer x; x = f; } void read_unprotected_unthreaded1_Bad() { Integer x; x = f1; } /*There is a particularly subtle idiom which avoids races, where a variable can be read without protection on the main thread, if it is written with protection on the main thread and read with protection off. The next three methods do this safely, and the fourth unsafely. */ Integer i; void protected_write_on_main_thread_OK() { OurThreadUtils.assertMainThread(); synchronized (this) { i = 99; } } void unprotected_read_on_main_thread_OK() { Integer x; OurThreadUtils.assertMainThread(); x = i; } void protected_read_off_main_thread_OK() { Integer x; synchronized (this) { x = i; } } void readProtectedUnthreadedBad() { Integer x; synchronized (this) { x = f; } } Integer g; void holds_lock_OK() { OurThreadUtils.assertHoldsLock(this); g = 88; } void holds_lock_indirect_OK() { holds_lock_OK(); g = 77; } Integer ff; void conditional1_Ok(boolean b) { if (b) { /*People not literally putting this assert inside if's, but implicitly by method calls */ OurThreadUtils.assertMainThread(); ff = 88; } } void conditional2_bad(boolean b) { if (b) { OurThreadUtils.assertMainThread(); ff = 88; } else { ff = 99; // this might or might now run on the main thread; warn } } void conditional_isMainThread_Ok() { if (OurThreadUtils.isMainThread()) { ff = 88; } } void conditional_isUiThread_Ok() { if (OurThreadUtil.isUiThread()) { ff = 88; } } void conditional_isMainThread_ElseBranch_Bad() { if (OurThreadUtils.isMainThread()) { synchronized (this) { ff = 88; } } else { ff = 99; } } void conditional_isUiThread_ElseBranch_Bad() { if (OurThreadUtil.isUiThread()) { synchronized (this) { ff = 88; } } else { ff = 99; } } void conditional_isMainThread_Negation_Bad() { if (!OurThreadUtils.isMainThread()) { ff = 88; } } void conditional_isMainThread_ElseBranch_Ok() { if (!OurThreadUtils.isMainThread()) { synchronized (this) { ff = 88; } } else { ff = 99; } } Object mFld; public void confusedAssertBad(boolean b) { if (b) { OurThreadUtil.assertOnBackgroundThread(); } else { OurThreadUtil.assertOnUiThread(); } // not sure if we're on UI or background, should report mFld = null; } int mOnlyWrittenOnMain; private void conditionalMainThreadWrite1(boolean b) { if (b) { OurThreadUtil.assertOnUiThread(); mOnlyWrittenOnMain = 7; } } // make sure we don't forget what thread the callee write occurred on public void conditionalMainThreadWriteOk() { conditionalMainThreadWrite1(true); } int mWrittenOffMain; private void conditionalMainThreadWrite2(boolean b) { if (b) { OurThreadUtil.assertOnUiThread(); } else { mOnlyWrittenOnMain = 7; } } public void conditionalMainThreadWriteBad() { conditionalMainThreadWrite2(false); } int mSharedField; public void writeAfterConditionalMainThreadInCalleeBad() { conditionalMainThreadWrite1(true); // one branch of the callee runs on the main thread, but that doesn't mean we can assume that // the caller does too mSharedField = 7; } } // not marked thread-safe class Unmarked { int mField; void writeOnUiThreadOk() { OurThreadUtil.assertOnUiThread(); mField = 7; } int readOnUiThreadOk() { OurThreadUtil.assertOnUiThread(); return mField; } int readOffUiThreadOk() { // even though this read isn't known to be on the UI thread, we shouldn't assume that it occurs // on a background thread return mField; } }
[ "facebook-github-bot@users.noreply.github.com" ]
facebook-github-bot@users.noreply.github.com
08284ced3322c25a87ea61825d5a8b1262c6c1db
6500848c3661afda83a024f9792bc6e2e8e8a14e
/gp_JADX/com/google/android/gms/common/api/internal/ca.java
c48781d149bda14aa057901cb57cc753a663377f
[]
no_license
enaawy/gproject
fd71d3adb3784d12c52daf4eecd4b2cb5c81a032
91cb88559c60ac741d4418658d0416f26722e789
refs/heads/master
2021-09-03T03:49:37.813805
2018-01-05T09:35:06
2018-01-05T09:35:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
515
java
package com.google.android.gms.common.api.internal; import com.google.android.gms.common.api.C5091z; final class ca implements cc { public /* synthetic */ bz f25787a; ca(bz bzVar) { this.f25787a = bzVar; } public final void mo4591a(ct ctVar) { this.f25787a.f25782c.remove(ctVar); if (ctVar.mo4493d() != null && this.f25787a.f25784e != null) { C5091z a = this.f25787a.f25784e; ctVar.mo4493d().intValue(); a.m23653a(); } } }
[ "genius.ron@gmail.com" ]
genius.ron@gmail.com
48168dc75f88baf316379013b7aec56c0eb5d838
b86c197b2eb4943eaa7dd19167bcc697660b2454
/src/com/company/task2/Car.java
bd9e936571d9f81bd2ffbf148baf05fc2cc12628
[]
no_license
pkotynia/Homework-19.07
2787c4b4a0f8fc88c73be4850d4e140268ae17ef
d677521d0bec21e21e31a4419bc630cd3f8372eb
refs/heads/master
2022-11-23T22:46:29.544061
2020-07-19T19:40:06
2020-07-19T19:40:06
281,439,952
0
0
null
2020-07-21T15:48:05
2020-07-21T15:48:04
null
UTF-8
Java
false
false
1,464
java
package com.company.task2; import java.math.BigDecimal; import java.time.Year; import java.util.List; public class Car { private String name; private String model; private BigDecimal price; private Year productionYear; private List<Manualfacturer> manualfacturerList; EngineType engineType; public Car() { } public Car(String name, String model, BigDecimal price, Year productionYear/*, List<Manualfacturer> manualfacturerList*/, EngineType engineType) { this.name = name; this.model = model; this.price = price; this.productionYear = productionYear; // this.manualfacturerList = manualfacturerList; this.engineType = engineType; } public String getName() { return name; } public String getModel() { return model; } public BigDecimal getPrice() { return price; } public Year getProductionYear() { return productionYear; } public List<Manualfacturer> getManualfacturerList() { return manualfacturerList; } public EngineType getEngineType() { return engineType; } @Override public String toString() { return "name='" + name + '\'' + ", model='" + model + '\'' + ", price=" + price + ", productionYear=" + productionYear + ", engineType=" + engineType; } }
[ "uzytkownik@kursGIT.pl" ]
uzytkownik@kursGIT.pl
5cb452e14c3ba6b6497bd122743fc93e43ad3612
d606fe877ddc843a93137c6a6d3cb84a4f7472f1
/src/main/java/sc/fiji/bdvpg/scijava/command/source/SampleSourceCreatorCommand.java
f79b953d5ee1f1606417611f527f848659b5e9e9
[ "BSD-2-Clause" ]
permissive
bigdataviewer/bigdataviewer-playground
7b21dc121960165852f63cc08bdcf230c77615ff
a0043759ca53bdd91b648f317b15bca2f4948630
refs/heads/master
2023-08-24T11:57:21.461071
2023-07-12T14:08:02
2023-07-12T14:08:02
227,117,918
17
4
BSD-2-Clause
2022-06-22T13:11:11
2019-12-10T12:41:29
Java
UTF-8
Java
false
false
3,163
java
/*- * #%L * BigDataViewer-Playground * %% * Copyright (C) 2019 - 2023 Nicolas Chiaruttini, EPFL - Robert Haase, MPI CBG - Christian Tischer, EMBL * %% * 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. * * 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 HOLDERS 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. * #L% */ package sc.fiji.bdvpg.scijava.command.source; import bdv.viewer.SourceAndConverter; import org.scijava.ItemIO; import org.scijava.plugin.Parameter; import org.scijava.plugin.Plugin; import sc.fiji.bdvpg.log.SystemLogger; import sc.fiji.bdvpg.scijava.ScijavaBdvDefaults; import sc.fiji.bdvpg.scijava.command.BdvPlaygroundActionCommand; import sc.fiji.bdvpg.sourceandconverter.importer.MandelbrotSourceGetter; import sc.fiji.bdvpg.sourceandconverter.importer.VoronoiSourceGetter; import sc.fiji.bdvpg.sourceandconverter.importer.Wave3DSourceGetter; /** * @author Nicolas Chiaruttini, EPFL 2020 */ @SuppressWarnings({ "CanBeFinal", "unused" }) // Because SciJava command fields // are set by SciJava // pre-processors @Plugin(type = BdvPlaygroundActionCommand.class, menuPath = ScijavaBdvDefaults.RootMenu + "Sources>Create Sample Source") public class SampleSourceCreatorCommand implements BdvPlaygroundActionCommand { @Parameter(label = "Sample name", choices = { "Mandelbrot", "Wave3D", "Voronoi", "Big Voronoi" }) String samplename; @Parameter(type = ItemIO.OUTPUT) SourceAndConverter<?> sac; @Override public void run() { switch (samplename) { case "Mandelbrot": sac = (new MandelbrotSourceGetter()).get(); break; case "Wave3D": sac = (new Wave3DSourceGetter()).get(); break; case "Voronoi": sac = (new VoronoiSourceGetter(new long[] { 512, 512, 1 }, 256, true) .get()); break; case "Big Voronoi": sac = (new VoronoiSourceGetter(new long[] { 2048, 2048, 2048 }, 65536, false).get()); break; default: new SystemLogger().err("Invalid sample name"); } } }
[ "nicolas.chiaruttini@epfl.ch" ]
nicolas.chiaruttini@epfl.ch
685b34631cf6f7fc98efb625e0a8d17b2ed9ff03
7ad843a5b11df711f58fdb8d44ed50ae134deca3
/JDK/JDK1.8/src/org/omg/CORBA/portable/ResponseHandler.java
b1c62dbc5c4c63f8e769cafff7f96275e9c170f7
[ "MIT" ]
permissive
JavaScalaDeveloper/java-source
f014526ad7750ad76b46ff475869db6a12baeb4e
0e6be345eaf46cfb5c64870207b4afb1073c6cd0
refs/heads/main
2023-07-01T22:32:58.116092
2021-07-26T06:42:32
2021-07-26T06:42:32
362,427,367
0
0
null
null
null
null
UTF-8
Java
false
false
1,165
java
/* * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package org.omg.CORBA.portable; /** This interface is supplied by an ORB to a servant at invocation time and allows the servant to later retrieve an OutputStream for returning the invocation results. */ public interface ResponseHandler { /** * Called by the servant during a method invocation. The servant * should call this method to create a reply marshal buffer if no * exception occurred. * * @return an OutputStream suitable for marshalling the reply. * * @see <a href="package-summary.html#unimpl"><code>portable</code> * package comments for unimplemented features</a> */ OutputStream createReply(); /** * Called by the servant during a method invocation. The servant * should call this method to create a reply marshal buffer if a * user exception occurred. * * @return an OutputStream suitable for marshalling the exception * ID and the user exception body. */ OutputStream createExceptionReply(); }
[ "panzha@dian.so" ]
panzha@dian.so
9ca066daad51337ad67376a8b718872cb95ba9da
e8cd24201cbfadef0f267151ea5b8a90cc505766
/group13/568334413/0226/src/Main.java
dd410cc340ef7947ae071f64f524e6069b23aa83
[]
no_license
XMT-CN/coding2017-s1
30dd4ee886dd0a021498108353c20360148a6065
382f6bfeeeda2e76ffe27b440df4f328f9eafbe2
refs/heads/master
2021-01-21T21:38:42.199253
2017-06-25T07:44:21
2017-06-25T07:44:21
94,863,023
0
0
null
null
null
null
UTF-8
Java
false
false
3,655
java
import com.coding.basic.Iterator; import com.coding.basic.LinkedList; import com.coding.basic.Queue; import java.util.ArrayList; import java.util.Stack; public class Main { public static void main(String[] args) { System.out.println("Hello World!"); com.coding.basic.TreeSet treeSet = new com.coding.basic.TreeSet(); treeSet.add(1); treeSet.add(2); treeSet.add(3); treeSet.add(4); System.out.println("treeSet = " + treeSet.size); } public static void testQueueIterator() { Queue queue = new Queue(); queue.enQueue("0"); queue.enQueue("1"); queue.enQueue("2"); queue.enQueue("3"); queue.enQueue("4"); while (queue.iterator.hasNext()) { System.out.println("next === " + queue.iterator.next()); } } public static void testLinkedListIterator() { com.coding.basic.LinkedList arrayList = new com.coding.basic.LinkedList(); arrayList.add("0"); arrayList.add("1"); arrayList.add("2"); arrayList.add("3"); arrayList.add("4"); arrayList.add("5"); Iterator iterator = arrayList.iterator(); while (iterator.hasNext()) { System.out.println("next === " + iterator.next()); } } public static void testArrayListIterator() { com.coding.basic.ArrayList arrayList = new com.coding.basic.ArrayList(); arrayList.add("0"); arrayList.add("1"); arrayList.add("2"); arrayList.add("3"); arrayList.add("4"); arrayList.add("5"); Iterator iterator = arrayList.iterator(); while (iterator.hasNext()) { System.out.println("next === " + iterator.next()); System.out.println("next =2== " + iterator.next()); } } public static void linkedList() { Stack<String> stack = new Stack(); stack.push("1"); stack.push("2"); stack.push("3"); stack.push("4"); String a = stack.peek(); System.out.println("a = " + a); // LinkedList linkedList = new LinkedList(); // linkedList.add("0"); // linkedList.add("1"); // linkedList.add("2"); // linkedList.add("3"); // linkedList.get(1); // linkedList.size(); LinkedList linkedList = new LinkedList(); linkedList.add("0"); linkedList.add("1"); linkedList.add(1, "2"); linkedList.toString(); } public static void arrayList() { ArrayList arrayList = new ArrayList(); arrayList.add("1"); arrayList.add(null); arrayList.add(null); arrayList.add(null); arrayList.add(null); arrayList.add("2"); arrayList.remove(1); // arrayList.add(7, "100"); System.out.println("arrayList = " + arrayList.size()); java.util.List list = new ArrayList(); com.coding.basic.ArrayList myList = new com.coding.basic.ArrayList(); myList.add("0"); myList.add("1"); myList.add("2"); myList.add("3"); myList.add("4"); myList.add("5"); myList.add("6"); myList.add("7"); myList.add(8, "8"); System.out.println("myList = " + myList.get(9)); System.out.println("myList = " + myList.toString()); myList.remove(1); // System.out.println("myList = " + myList.size()); System.out.println("myList = " + myList.toString()); } }
[ "542194147@qq.com" ]
542194147@qq.com
58bf3cd34b4229323931411528ab13db2cc2ceaf
e1b1ce58fb1277b724022933176f0809169682d9
/sources/fr/pcsoft/wdjava/ui/p073d/p075b/p076a/C1328g.java
e43143f7f09eba6496cdee5a2c262f1d428a80fb
[]
no_license
MR-116/com.masociete.projet_mobile-1_source_from_JADX
a5949c814f0f77437f74b7111ea9dca17140f2ea
6cd80095cd68cb9392e6e067f26993ab2bf08bb2
refs/heads/master
2020-04-11T15:00:54.967026
2018-12-15T06:33:57
2018-12-15T06:33:57
161,873,466
0
0
null
null
null
null
UTF-8
Java
false
false
782
java
package fr.pcsoft.wdjava.ui.p073d.p075b.p076a; import fr.pcsoft.wdjava.p032m.C0938m; /* renamed from: fr.pcsoft.wdjava.ui.d.b.a.g */ class C1328g implements Runnable { /* renamed from: a */ protected boolean f3965a = false; final C1327f this$0; C1328g(C1327f c1327f) { this.this$0 = c1327f; } /* renamed from: a */ public final boolean m9493a() { return this.f3965a; } /* renamed from: b */ public void m9494b() { this.f3965a = true; run(); } /* renamed from: c */ public void m9495c() { this.f3965a = false; } public void run() { this.this$0.m9467R(); if (this.f3965a) { C0938m.m6816c().postDelayed(this, (long) this.this$0.p); } } }
[ "Entrepreneursmalaysia1@gmail.com" ]
Entrepreneursmalaysia1@gmail.com
b8571ac1b6395c5ffdfa6d34eaf9df562edaa843
d6b6abe73a0c82656b04875135b4888c644d2557
/sources/com/google/android/gms/internal/ads/cn.java
495ced40c8056b1aa384cf8740a8f4f8c21c733e
[]
no_license
chanyaz/and_unimed
4344d1a8ce8cb13b6880ca86199de674d770304b
fb74c460f8c536c16cca4900da561c78c7035972
refs/heads/master
2020-03-29T09:07:09.224595
2018-08-30T06:29:32
2018-08-30T06:29:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,375
java
package com.google.android.gms.internal.ads; import android.content.Context; import android.os.Binder; import android.os.Bundle; import android.os.DeadObjectException; import android.support.annotation.NonNull; import com.appnext.base.b.c; import com.google.android.gms.ads.internal.au; import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.internal.BaseGmsClient.BaseConnectionCallbacks; import com.google.android.gms.common.internal.BaseGmsClient.BaseOnConnectionFailedListener; import com.google.android.gms.common.util.VisibleForTesting; @zzadh public final class cn extends cj implements BaseConnectionCallbacks, BaseOnConnectionFailedListener { private Context a; private zzang b; private zzaol<zzaef> c; private final zzadx d; private final Object e = new Object(); @VisibleForTesting private co f; public cn(Context context, zzang zzang, zzaol<zzaef> zzaol, zzadx zzadx) { super(zzaol, zzadx); this.a = context; this.b = zzang; this.c = zzaol; this.d = zzadx; this.f = new co(context, ((Boolean) akc.f().a(amn.G)).booleanValue() ? au.t().a() : context.getMainLooper(), this, this); this.f.g(); } public final void a() { synchronized (this.e) { if (this.f.isConnected() || this.f.isConnecting()) { this.f.disconnect(); } Binder.flushPendingCommands(); } } public final zzaen b() { zzaen r; synchronized (this.e) { try { r = this.f.r(); } catch (IllegalStateException e) { } catch (DeadObjectException e2) { } } return r; r = null; return r; } public final void onConnected(Bundle bundle) { zznt(); } public final void onConnectionFailed(@NonNull ConnectionResult connectionResult) { kk.b("Cannot connect to remote service, fallback to local instance."); new cm(this.a, this.c, this.d).zznt(); Bundle bundle = new Bundle(); bundle.putString(c.jD, "gms_connection_failed_fallback_to_local"); au.e().b(this.a, this.b.a, "gmob-apps", bundle, true); } public final void onConnectionSuspended(int i) { kk.b("Disconnected from remote ad request service."); } }
[ "khairilirfanlbs@gmail.com" ]
khairilirfanlbs@gmail.com
7a7e2e89b0c457b3405298758a6e6406ba1cef83
d4f811ed6c50cbd0af3b9e4c7c474cbe84e0a0ef
/src/com/lzy/abstractfactorypattern/AbstractFactoryPatternDemo.java
41016f3eb41c35d3c6b211e32323e6b0fe46a6b1
[]
no_license
luozuyi/design-pattern
d42f92c463eb0ff8206eebc4e5ae5aab8f83e2fb
9c42a643cab76b4b0dc92fb0c6fd8833369cde5e
refs/heads/master
2020-08-03T04:13:07.085700
2019-09-29T08:31:54
2019-09-29T08:31:54
211,622,123
0
0
null
null
null
null
UTF-8
Java
false
false
1,343
java
package com.lzy.abstractfactorypattern; /** * @author luozuyi */ public class AbstractFactoryPatternDemo { public static void main(String[] args) { //获取形状工厂 AbstractFactory shapeFactory = FactoryProducer.getFactory("SHAPE"); //获取形状为 Circle 的对象 Shape shape1 = shapeFactory.getShape("CIRCLE"); //调用 Circle 的 draw 方法 shape1.draw(); //获取形状为 Rectangle 的对象 Shape shape2 = shapeFactory.getShape("RECTANGLE"); //调用 Rectangle 的 draw 方法 shape2.draw(); //获取形状为 Square 的对象 Shape shape3 = shapeFactory.getShape("SQUARE"); //调用 Square 的 draw 方法 shape3.draw(); //获取颜色工厂 AbstractFactory colorFactory = FactoryProducer.getFactory("COLOR"); //获取颜色为 Red 的对象 Color color1 = colorFactory.getColor("RED"); //调用 Red 的 fill 方法 color1.fill(); //获取颜色为 Green 的对象 Color color2 = colorFactory.getColor("Green"); //调用 Green 的 fill 方法 color2.fill(); //获取颜色为 Blue 的对象 Color color3 = colorFactory.getColor("BLUE"); //调用 Blue 的 fill 方法 color3.fill(); } }
[ "m13164138097@163.com" ]
m13164138097@163.com
ba08d1ccf9e821de2ab069f379fad717170655d3
bc541f0e686034bcd8693a37cbb0e9cb40474047
/springboot-poi/src/main/java/com/example/poi/pojo/MultiLineHeadExcelModel.java
a478c6b6395370769d770b8e865f8f96fa58fac2
[]
no_license
zhupeng0521/springboot-collections
847d95cc36f8424b64eb88368ee972248c87fbf8
d0def11b6f7d3924a2b26d925bd3198d7a49590c
refs/heads/master
2021-05-16T18:28:56.797977
2020-02-10T06:41:03
2020-02-10T06:41:03
250,419,692
0
1
null
2020-03-27T02:15:24
2020-03-27T02:15:24
null
UTF-8
Java
false
false
1,126
java
package com.example.poi.pojo; import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.metadata.BaseRowModel; import lombok.Data; @Data public class MultiLineHeadExcelModel extends BaseRowModel { @ExcelProperty(value = { "表头1", "表头1", "表头31" }, index = 0) private String p1; @ExcelProperty(value = { "表头1", "表头1", "表头32" }, index = 1) private String p2; @ExcelProperty(value = { "表头3", "表头3", "表头3" }, index = 2) private String p3; @ExcelProperty(value = { "表头4", "表头4", "表头4" }, index = 3) private String p4; @ExcelProperty(value = { "表头5", "表头51", "表头52" }, index = 4) private String p5; @ExcelProperty(value = { "表头6", "表头61", "表头611" }, index = 5) private String p6; @ExcelProperty(value = { "表头6", "表头61", "表头612" }, index = 6) private String p7; @ExcelProperty(value = { "表头6", "表头62", "表头621" }, index = 7) private String p8; @ExcelProperty(value = { "表头6", "表头62", "表头622" }, index = 8) private String p9; }
[ "1763124707@qq.com" ]
1763124707@qq.com
afbc09bca262f64d644255eb98930947213f9c0f
c8dfa548a2cb88221002f6ed6bee71a395fde716
/normals/src/main/java/com/wong/zxing/Barcode.java
3b51cff2b09af213792635c868582471ddefc506
[ "Apache-2.0" ]
permissive
wongminbin/exercise-demos
6d530525dee4ed4d95075c3463d7b230990e64a7
25f63f669896a78c22c25992c3e46af975d877ad
refs/heads/master
2022-07-04T15:43:39.417106
2019-05-23T01:27:16
2019-05-23T01:27:16
156,669,651
2
1
Apache-2.0
2022-06-29T17:02:58
2018-11-08T07:49:35
Java
UTF-8
Java
false
false
2,932
java
package com.wong.zxing; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.io.OutputStream; import java.util.HashMap; import javax.imageio.ImageIO; import com.google.zxing.BarcodeFormat; import com.google.zxing.EncodeHintType; import com.google.zxing.MultiFormatWriter; import com.google.zxing.WriterException; import com.google.zxing.common.BitMatrix; /** * @author HuangZhibin * * 2018年2月28日 下午5:32:29 */ public class Barcode { public static void main(String[] args) throws WriterException { int width = 75; int height = 50; // int width = 105; // int height = 50; // 条形码的输入是13位的数字 // String text = "6923450657713"; // 二维码的输入是字符串 String text = "F8MWQD831208130001"; String format = "png"; HashMap<EncodeHintType, String> hints = new HashMap<>(); hints.put(EncodeHintType.CHARACTER_SET, "utf-8"); // 条形码的格式是 BarcodeFormat.EAN_13 // 二维码的格式是BarcodeFormat.QR_CODE BitMatrix bm = new MultiFormatWriter().encode(text, BarcodeFormat.CODE_128, width, height, hints); File out = new File("D:\\new.png"); // 生成条形码图片 // File out = new File("ean3.png"); WriteBitMatricToFile.writeBitMatricToFile(bm, format, out); } } class WriteBitMatricToFile { private static final int BLACK = 0xFF000000; private static final int WHITE = 0xFFFFFFFF; private static BufferedImage toBufferedImage(BitMatrix bm) { int width = bm.getWidth(); int height = bm.getHeight(); BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_3BYTE_BGR); for (int i = 0; i < width; i++) { for (int j = 0; j < height; j++) { image.setRGB(i, j, bm.get(i, j) ? BLACK : WHITE); } } return image; } public static void writeBitMatricToFile(BitMatrix bm, String format, File file) { BufferedImage image = toBufferedImage(bm); try { if (!ImageIO.write(image, format, file)) { throw new RuntimeException("Can not write an image to file" + file); } } catch (IOException e) { e.printStackTrace(); } } public static void writeToStream(BitMatrix matrix, String format, OutputStream stream) throws IOException { BufferedImage image = toBufferedImage(matrix); if (!ImageIO.write(image, format, stream)) { throw new IOException("Could not write an image of format " + format); } } }
[ "Administrator@windows10.microdone.cn" ]
Administrator@windows10.microdone.cn
26b8cb7c8eb5086dc0802bb24a68be63321dad4c
84b74720c5a72ea4dd4fb419531bcef8e27e3c69
/app/src/main/java/com/xyoye/dandanplay/ui/weight/item/DownloadManagerItem.java
903cdca50b1222821a9f183ce2c217e114a82e36
[ "MIT" ]
permissive
Jackie-ZJW/DanDanPlayForAndroid
a053313ccdc6121490412027f1e85132e41b5f70
33f22bb10aab718ab8ca5614a15e5835cf17c831
refs/heads/master
2022-01-12T13:17:39.222034
2019-05-24T08:37:13
2019-05-24T08:37:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,728
java
package com.xyoye.dandanplay.ui.weight.item; import android.content.Context; import android.view.View; import android.widget.ImageView; import android.widget.ProgressBar; import android.widget.RelativeLayout; import android.widget.TextView; import com.xyoye.dandanplay.R; import com.xyoye.dandanplay.ui.weight.dialog.TorrentDownloadDetailDialog; import com.xyoye.dandanplay.utils.CommonUtils; import com.xyoye.dandanplay.utils.interf.AdapterItem; import com.xyoye.dandanplay.utils.torrent.Torrent; import com.xyoye.dandanplay.utils.torrent.TorrentEvent; import com.xyoye.dandanplay.utils.torrent.TorrentUtil; import org.greenrobot.eventbus.EventBus; import butterknife.BindView; import libtorrent.Libtorrent; /** * Created by YE on 2018/10/27. */ public class DownloadManagerItem implements AdapterItem<Torrent> { @BindView(R.id.download_title_tv) TextView downloadTitleTv; @BindView(R.id.download_duration_pb) ProgressBar downloadDurationPb; @BindView(R.id.download_speed_tv) TextView downloadSpeedTv; @BindView(R.id.download_duration_tv) TextView downloadDurationTv; @BindView(R.id.download_info_rl) RelativeLayout downloadInfoRl; @BindView(R.id.download_status_iv) ImageView downloadStatusIv; @BindView(R.id.download_status_tv) TextView downloadStatusTv; @BindView(R.id.download_ctrl_rl) RelativeLayout downloadCtrlRl; private Context context; private String statusStr; @Override public int getLayoutResId() { return R.layout.item_download_torrent; } @Override public void initItemViews(View itemView) { context = itemView.getContext(); } @Override public void onSetViews() { } @Override public void onUpdateViews(Torrent torrent, int position) { if (torrent.getStatus() == -1) { String speed = "∞ ↓ 0b/s · ↑ 0b/s"; String duration = "未知/未知(" + 0 + "%)"; downloadTitleTv.setText(torrent.getTitle()); downloadSpeedTv.setText(speed); downloadDurationPb.setProgress(0); downloadDurationTv.setText(duration); downloadStatusIv.setImageResource(R.mipmap.ic_download_wait); downloadStatusTv.setTextColor(context.getResources().getColor(R.color.text_gray)); downloadStatusTv.setText("等待中"); } else { int progress = getProgress(torrent); String duration = getDuration(torrent) + "(" + progress + "%)"; downloadTitleTv.setText(torrent.getTitle()); downloadDurationPb.setProgress(progress); downloadSpeedTv.setText(TorrentUtil.getSpeed(context, torrent)); downloadDurationTv.setText(duration); setStatus(torrent); } downloadInfoRl.setOnLongClickListener(v -> { new TorrentDownloadDetailDialog(context, position, statusStr).show(); return true; }); downloadInfoRl.setOnClickListener(v -> new TorrentDownloadDetailDialog(context, position, statusStr).show()); downloadCtrlRl.setOnClickListener(v -> changeStatus(torrent, position)); } private int getProgress(Torrent torrent) { if (torrent.isDone()) return 100; if (torrent.isError()) return 0; if (Libtorrent.metaTorrent(torrent.getId())) { long p = Libtorrent.torrentPendingBytesLength(torrent.getId()); if (p == 0) return 0; return (int) (Libtorrent.torrentPendingBytesCompleted(torrent.getId()) * 100 / p); } return 0; } private String getDuration(Torrent torrent) { if (torrent.isError()) return "未知/未知"; if (torrent.isDone()) return CommonUtils.convertFileSize(torrent.getSize()) + "/" + CommonUtils.convertFileSize(torrent.getSize()); if (Libtorrent.metaTorrent(torrent.getId())) { long size = Libtorrent.torrentPendingBytesLength(torrent.getId()); long completed = Libtorrent.torrentPendingBytesCompleted(torrent.getId()); return CommonUtils.convertFileSize(completed) + "/" + CommonUtils.convertFileSize(size); } return "未知/未知"; } private void setStatus(Torrent torrent) { if (torrent.getStatus() == -1) { downloadStatusIv.setImageResource(R.mipmap.ic_download_wait); downloadStatusTv.setTextColor(context.getResources().getColor(R.color.text_gray)); downloadStatusTv.setText("连接中"); statusStr = "connecting"; return; } if (torrent.isDone()) { downloadStatusIv.setImageResource(R.mipmap.ic_download_over); downloadStatusTv.setTextColor(context.getResources().getColor(R.color.bilibili_pink)); downloadStatusTv.setText("已完成"); statusStr = "done"; return; } if (torrent.isError()) { downloadStatusIv.setImageResource(R.mipmap.ic_download_error); downloadStatusTv.setTextColor(context.getResources().getColor(R.color.ared)); downloadStatusTv.setText("错误"); statusStr = "error"; return; } switch (Libtorrent.torrentStatus(torrent.getId())) { case Libtorrent.StatusQueued: downloadStatusIv.setImageResource(R.mipmap.ic_download_wait); downloadStatusTv.setTextColor(context.getResources().getColor(R.color.text_gray)); downloadStatusTv.setText("等待中"); statusStr = "queued"; break; case Libtorrent.StatusChecking: downloadStatusIv.setImageResource(R.mipmap.ic_download_wait); downloadStatusTv.setTextColor(context.getResources().getColor(R.color.text_gray)); downloadStatusTv.setText("连接中"); statusStr = "checking"; break; case Libtorrent.StatusPaused: downloadStatusIv.setImageResource(R.mipmap.ic_download_pause); downloadStatusTv.setTextColor(context.getResources().getColor(R.color.theme_color)); downloadStatusTv.setText("已暂停"); statusStr = "paused"; break; case Libtorrent.StatusSeeding: downloadStatusIv.setImageResource(R.mipmap.ic_download_start); downloadStatusTv.setTextColor(context.getResources().getColor(R.color.theme_color)); downloadStatusTv.setText("下载中"); statusStr = "seeding"; break; case Libtorrent.StatusDownloading: downloadStatusIv.setImageResource(R.mipmap.ic_download_start); downloadStatusTv.setTextColor(context.getResources().getColor(R.color.theme_color)); downloadStatusTv.setText("下载中"); statusStr = "downloading"; break; } } private void changeStatus(Torrent torrent, int position) { if (torrent.isDone()) return; if (torrent.isError()) return; switch (Libtorrent.torrentStatus(torrent.getId())) { case Libtorrent.StatusChecking: case Libtorrent.StatusSeeding: case Libtorrent.StatusDownloading: EventBus.getDefault().post(new TorrentEvent(TorrentEvent.EVENT_PAUSE, position)); break; case Libtorrent.StatusPaused: case Libtorrent.StatusQueued: EventBus.getDefault().post(new TorrentEvent(TorrentEvent.EVENT_RESUME, position)); break; } } }
[ "Aser1127CBM" ]
Aser1127CBM
1a8999f1bff682b8cbcc64cadddf8b77146b399d
17578d0cc25e6c5c9c2ac4711a49ae2bff73fc70
/src/main/java/com/covens/common/content/tarot/ModTarots.java
0a1d02e19c88c691c803474828682f2ab6780c2f
[ "MIT" ]
permissive
Sunconure11/Covens-reborn
ab5d0925283fafd04a2291cf55ebbe3736eafb8e
45faba858bd9b9491c9e222dfecaefb3fed90e1b
refs/heads/master
2020-04-17T20:47:25.102337
2019-01-18T16:01:08
2019-01-18T16:58:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,433
java
package com.covens.common.content.tarot; import java.util.function.Predicate; import com.covens.api.infusion.DefaultInfusions; import com.covens.api.mp.IMagicPowerContainer; import com.covens.api.transformation.DefaultTransformations; import com.covens.common.content.crystalBall.capability.CapabilityFortune; import com.covens.common.content.infusion.capability.InfusionCapability; import com.covens.common.content.transformation.CapabilityTransformation; import net.minecraft.entity.player.EntityPlayer; public class ModTarots { private ModTarots() { } public static void init() { Predicate<EntityPlayer> random = p -> p.getRNG().nextBoolean(); TarotHandler.registerTarot(new QuickTarot("enderman", p -> p.getCapability(InfusionCapability.CAPABILITY, null).getType() == DefaultInfusions.END, null, null)); TarotHandler.registerTarot(new QuickTarot("diamonds", p -> p.getCapability(CapabilityFortune.CAPABILITY, null).getFortune() != null, p -> p.getCapability(CapabilityFortune.CAPABILITY, null).getFortune().isNegative(), null)); TarotHandler.registerTarot(new QuickTarot("iron_golem", p -> p.getCapability(InfusionCapability.CAPABILITY, null).getType() == DefaultInfusions.OVERWORLD, null, null)); TarotHandler.registerTarot(new QuickTarot("wither_skeleton", p -> p.getCapability(InfusionCapability.CAPABILITY, null).getType() == DefaultInfusions.NETHER, null, null)); TarotHandler.registerTarot(new QuickTarot("star", p -> p.getCapability(InfusionCapability.CAPABILITY, null).getType() == DefaultInfusions.DREAM, null, null)); TarotHandler.registerTarot(new QuickTarot("nitwit", p -> (p.getCapability(IMagicPowerContainer.CAPABILITY, null).getMaxAmount() / 800) > 0, null, p -> p.getCapability(IMagicPowerContainer.CAPABILITY, null).getMaxAmount() / 800)); TarotHandler.registerTarot(new QuickTarot("moon", p -> (p.getCapability(CapabilityTransformation.CAPABILITY, null).getType() == DefaultTransformations.VAMPIRE) || (p.getCapability(CapabilityTransformation.CAPABILITY, null).getType() == DefaultTransformations.WEREWOLF), p -> p.getCapability(CapabilityTransformation.CAPABILITY, null).getType() == DefaultTransformations.WEREWOLF, p -> p.getCapability(CapabilityTransformation.CAPABILITY, null).getLevel())); TarotHandler.registerTarot(new QuickTarot("silver_sword", p -> p.getCapability(CapabilityTransformation.CAPABILITY, null).getType() == DefaultTransformations.HUNTER, p -> false, p -> p.getCapability(CapabilityTransformation.CAPABILITY, null).getLevel())); TarotHandler.registerTarot(new QuickTarot("hermit", random, null, null)); TarotHandler.registerTarot(new QuickTarot("ender_dragon", random, null, null)); TarotHandler.registerTarot(new QuickTarot("evoker", random, null, null)); TarotHandler.registerTarot(new QuickTarot("guardian", random, null, null)); TarotHandler.registerTarot(new QuickTarot("illusioner", random, null, null)); TarotHandler.registerTarot(new QuickTarot("stronghold", random, null, null)); TarotHandler.registerTarot(new QuickTarot("sun", random, null, null)); TarotHandler.registerTarot(new QuickTarot("mounts", random, null, null)); TarotHandler.registerTarot(new QuickTarot("world", random, null, null)); TarotHandler.registerTarot(new QuickTarot("witch", random, null, null)); TarotHandler.registerTarot(new QuickTarot("wither", random, null, null)); TarotHandler.registerTarot(new QuickTarot("zombie", random, null, null)); } }
[ "zabi94@gmail.com" ]
zabi94@gmail.com
a54ee73122337e1546fc5af68aad9e220e8b4632
0c9824c57816414b74c6897e78f22a5115b61bce
/Exercise 29/src/SalariedEmployee.java
29bbb94be52058bff38103b1d4a487b429e7d11e
[]
no_license
NaxxoBG/Eclipse_workspace
2da537324ed5d72cce930dc3760dfc959d93a3da
80b0eed9610744179d964d6208f4e824f61f3e52
refs/heads/master
2021-01-02T21:00:24.223841
2020-02-11T15:18:35
2020-02-11T15:18:35
239,794,383
0
0
null
null
null
null
UTF-8
Java
false
false
845
java
public class SalariedEmployee extends Employee { private double weeklySalary; public SalariedEmployee(String name, Date birthday, double weeklySalary) { super(name, birthday); this.weeklySalary = weeklySalary; } public double getWeeklySalary() { return weeklySalary; } public void setWeeklySalary(double weeklySalary) { this.weeklySalary = weeklySalary; } public double earningsPerWeek() { return weeklySalary; } public String toString() { return "SalariedEmployee [weeklySalary=" + weeklySalary + "]"; } public boolean equals(Object o) { if(!(o instanceof SalariedEmployee)) { return false; } else { SalariedEmployee other = (SalariedEmployee) o; return super.equals(other) && weeklySalary == other.weeklySalary; } } }
[ "atanas.latinov@yahoo.com" ]
atanas.latinov@yahoo.com
fd92ecdc6db8ee7b1ac40156b0ad3f1e59c23595
cdd6d7eabbba1adfcb3d09459482bdafabea5ea9
/Java_Syntax/src/main/java/Level_10/lvl_10_task_10.java
a0846cf08831ef9eba6b631391875f4ab9fd7e3d
[]
no_license
AvengerDima/JavaRush
dde5f2cffeff1449a38dc29c6c6c75b49cb698bd
7805a3adf61fff3ae2762b86807c67befb31c814
refs/heads/master
2021-12-02T02:52:49.800659
2021-11-19T17:40:38
2021-11-19T17:40:38
256,775,964
1
0
null
null
null
null
UTF-8
Java
false
false
273
java
package Level_10; /* Правильный ответ: d = 1.0 */ public class lvl_10_task_10 { public static void main(String[] args) { int a = (byte) 257; int b = 4; int c = 3; int e = 2; double d = a + b / c / e; System.out.println(d); } }
[ "Dima_c.2011@mail.ru" ]
Dima_c.2011@mail.ru
9fd03fe5ab1e65e994b2c75d675798971af58dee
1ea0afd17a9914d0a21d539ac2a0b082ee9236fa
/netty-mqtt-coap/mqtt/src/main/java/com/sanshengshui/mqtt/protocol/PubAck.java
b2b8bcea131ac9e1867364d1c0f2bc71a31470df
[ "Apache-2.0" ]
permissive
aizya/netty-learning-example
99da2214e74f3fdc60b25abacbd78de22e04e6c0
524da1edc1309389645d8a2e1f9ba3a770ee9687
refs/heads/master
2020-04-01T19:28:54.251494
2018-10-17T12:09:56
2018-10-17T12:09:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
447
java
package com.sanshengshui.mqtt.protocol; import io.netty.channel.Channel; import io.netty.handler.codec.mqtt.MqttMessageIdVariableHeader; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * PUBACK连接处理 * @author james */ public class PubAck { private static final Logger LOGGER = LoggerFactory.getLogger(PubAck.class); public void processPubAck(Channel channel, MqttMessageIdVariableHeader variableHeader){ } }
[ "lovewsic@gmail.com" ]
lovewsic@gmail.com
87510e0a2729c44d36f4f27a5238a58cc1abc20c
f3c5d1afe093de402ac2ba8555eb76b97106a41e
/src/org/omg/PortableServer/ServantLocator.java
ee73c6f3b768a42acebd24529f3e26377331561f
[]
no_license
wangshiwen226/jdk-source-code
25145d9e1085fbed81ee0b86d0f9eac45989afab
2ce4f0b45d74d252d46cdf4ef62430029a2dfed6
refs/heads/master
2023-02-27T03:31:49.149747
2021-02-02T02:35:52
2021-02-02T02:35:52
334,850,648
0
0
null
null
null
null
UTF-8
Java
false
false
1,366
java
package org.omg.PortableServer; /** * org/omg/PortableServer/ServantLocator.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from c:/re/workspace/8-2-build-windows-i586-cygwin/jdk8u71/5731/corba/src/share/classes/org/omg/PortableServer/poa.idl * Tuesday, December 22, 2015 5:23:56 PM PST */ /** * When the POA has the NON_RETAIN policy it uses servant * managers that are ServantLocators. Because the POA * knows that the servant returned by this servant * manager will be used only for a single request, * it can supply extra information to the servant * manager's operations and the servant manager's pair * of operations may be able to cooperate to do * something different than a ServantActivator. * When the POA uses the ServantLocator interface, * immediately after performing the operation invocation * on the servant returned by preinvoke, the POA will * invoke postinvoke on the servant manager, passing the * ObjectId value and the Servant value as parameters * (among others). This feature may be used to force * every request for objects associated with a POA to * be mediated by the servant manager. */ public interface ServantLocator extends ServantLocatorOperations, org.omg.PortableServer.ServantManager, org.omg.CORBA.portable.IDLEntity { } // interface ServantLocator
[ "wswmail@yeah.net" ]
wswmail@yeah.net
6867865a5aecb8d1c11cca0257af65802ec7d2d9
6a7e623b589e2b2b4903cecac796e0641d452a81
/asn4j-compiler/src/main/java/ch/eskaton/asn4j/compiler/types/NamedTypeCompiler.java
c810df4a56d8905a712451d6ea80decaadb369aa
[]
no_license
eskaton/asn4j
516d43f571d2863a49462d39548a2b63ea6d2278
024d3f6fdf7b220388b58a31519d931fbd269e99
refs/heads/master
2021-09-25T09:40:20.936540
2021-09-16T22:33:21
2021-09-16T22:33:21
49,749,392
0
0
null
2021-04-27T21:23:10
2016-01-15T22:53:00
Java
UTF-8
Java
false
false
5,710
java
/* * Copyright (c) 2015, Adrian Moser * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 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. * * Neither the name of the author 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 AUTHOR 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 ch.eskaton.asn4j.compiler.types; import ch.eskaton.asn4j.compiler.Compiler; import ch.eskaton.asn4j.compiler.CompilerContext; import ch.eskaton.asn4j.compiler.parameters.Parameters; import ch.eskaton.asn4j.compiler.results.CompiledType; import ch.eskaton.asn4j.parser.ast.types.BitString; import ch.eskaton.asn4j.parser.ast.types.Choice; import ch.eskaton.asn4j.parser.ast.types.EnumeratedType; import ch.eskaton.asn4j.parser.ast.types.IRI; import ch.eskaton.asn4j.parser.ast.types.IntegerType; import ch.eskaton.asn4j.parser.ast.types.NamedType; import ch.eskaton.asn4j.parser.ast.types.ObjectClassFieldType; import ch.eskaton.asn4j.parser.ast.types.ObjectIdentifier; import ch.eskaton.asn4j.parser.ast.types.RelativeIRI; import ch.eskaton.asn4j.parser.ast.types.RelativeOID; import ch.eskaton.asn4j.parser.ast.types.SequenceOfType; import ch.eskaton.asn4j.parser.ast.types.SequenceType; import ch.eskaton.asn4j.parser.ast.types.SetOfType; import ch.eskaton.asn4j.parser.ast.types.SetType; import ch.eskaton.asn4j.parser.ast.types.Type; import ch.eskaton.asn4j.parser.ast.types.TypeFromObject; import ch.eskaton.asn4j.parser.ast.types.TypeReference; import java.util.Optional; public class NamedTypeCompiler implements Compiler<NamedType> { public CompiledType compile(CompilerContext ctx, NamedType namedType, Optional<Parameters> maybeParameters) { var name = namedType.getName(); var type = namedType.getType(); if (type instanceof TypeReference typeReference && maybeParameters.isPresent()) { type = ctx.getTypeParameter(maybeParameters.get(), typeReference).orElse(type); } return compile(ctx, type, name, maybeParameters); } public CompiledType compile(CompilerContext ctx, Type type, String name, Optional<Parameters> maybeParameters) { if (type instanceof EnumeratedType) { return compile(ctx, type, name, maybeParameters, ctx.isSubtypeNeeded(type)); } else if (type instanceof IntegerType) { return compile(ctx, type, name, maybeParameters, ctx.isSubtypeNeeded(type)); } else if (type instanceof BitString) { return compile(ctx, type, name, maybeParameters, ctx.isSubtypeNeeded(type)); } else if (type instanceof SequenceType || type instanceof SequenceOfType || type instanceof SetType || type instanceof SetOfType || type instanceof Choice) { return compile(ctx, type, name, maybeParameters, true); } else if (type instanceof ObjectIdentifier || type instanceof RelativeOID || type instanceof IRI || type instanceof RelativeIRI) { return compile(ctx, type, name, maybeParameters, false); } else if (type instanceof ObjectClassFieldType objectClassFieldType) { var compiler = ctx.<ObjectClassFieldType, ObjectClassFieldTypeCompiler>getCompiler(ObjectClassFieldType.class); return compiler.compile(ctx, name, objectClassFieldType, maybeParameters); } else if (type instanceof TypeFromObject typeFromObject) { var compiler = ctx.<TypeFromObject, TypeFromObjectCompiler>getCompiler(TypeFromObject.class); return compiler.compile(ctx, name, typeFromObject, maybeParameters); } return ctx.createCompiledType(type, ctx.getTypeName(type, name), true); } private CompiledType compile(CompilerContext ctx, Type type, String name, Optional<Parameters> maybeParameters, boolean newType) { if (newType && name != null) { var compiledType = compileType(ctx, type, ctx.getTypeName(type, name), maybeParameters); compiledType.setSubtype(true); return compiledType; } return ctx.createCompiledType(type, ctx.getTypeName(type, name), ctx.isBuiltin(type)); } private CompiledType compileType(CompilerContext ctx, Type type, String typeName, Optional<Parameters> maybeParameters) { return ctx.<Type, TypeCompiler>getCompiler(Type.class).compile(ctx, typeName, type, maybeParameters); } }
[ "me@eskaton.ch" ]
me@eskaton.ch
e8e3b017e593a15c7ec92b3e58eb8e3b66490147
00864e9d2745f22cb748f982926cdf2dabcc4a60
/src/br/com/cmabreu/FederateAmbassador.java
31f93fd4db9f9df292e3f711b7b8e2530ad55ac7
[]
no_license
icemagno/geocalc
f1cb8de3adaee4d1dfdc972fb2ca04d825d1eca0
acb9dbfde8c7af3f2cd8b192c98a45dc1dc4a2b0
refs/heads/master
2021-01-10T10:16:36.212403
2016-04-02T23:23:31
2016-04-02T23:23:31
52,028,554
0
0
null
null
null
null
UTF-8
Java
false
false
2,880
java
package br.com.cmabreu; import hla.rti1516e.AttributeHandleSet; import hla.rti1516e.AttributeHandleValueMap; import hla.rti1516e.NullFederateAmbassador; import hla.rti1516e.ObjectClassHandle; import hla.rti1516e.ObjectInstanceHandle; import hla.rti1516e.OrderType; import hla.rti1516e.TransportationTypeHandle; import hla.rti1516e.exceptions.FederateInternalError; public class FederateAmbassador extends NullFederateAmbassador { private GeoControllerFederate federate; // The constructor. Must store the Federate to allow // interactivity public FederateAmbassador( GeoControllerFederate federate ) { this.federate = federate; } private void log( String message ) { System.out.println( "> " + message ); } @Override public void attributeOwnershipAcquisitionNotification( ObjectInstanceHandle theObject, AttributeHandleSet securedAttributes, byte[] userSuppliedTag) throws FederateInternalError { log("Ownsership acquired : " + theObject ); } @Override public void requestAttributeOwnershipRelease( ObjectInstanceHandle theObject, AttributeHandleSet candidateAttributes, byte[] userSuppliedTag) throws FederateInternalError { // } @Override public void removeObjectInstance(ObjectInstanceHandle theObject, byte[] userSuppliedTag, OrderType sentOrdering, SupplementalRemoveInfo removeInfo) { if ( federate.getUnitClass().isAUnit( theObject ) ) { federate.getUnitClass().removeByRTIRequest( theObject ); } } // All new object - rtiamb.registerObjectInstance( classHandle ) - // that arrives into RTI will trigger this event @Override public void discoverObjectInstance( ObjectInstanceHandle theObject, ObjectClassHandle theObjectClass, String objectName ) throws FederateInternalError { // Is the object we found a kind of Unit? if ( federate.getUnitClass().isClassOf( theObjectClass ) ) { try { // If so, create a new Unit object in our list. federate.newUnit( theObjectClass, theObject ); } catch ( Exception e ) { log( e.getMessage() ); } } } @Override public void reflectAttributeValues( ObjectInstanceHandle theObject, AttributeHandleValueMap theAttributes, byte[] tag, OrderType sentOrder, TransportationTypeHandle transport, SupplementalReflectInfo reflectInfo ) throws FederateInternalError { // Is this attribute from a Unit? if ( federate.getUnitClass().isAUnit( theObject ) ) { // If so, update my Unit object attributes try { federate.getUnitClass().update( theAttributes, theObject ); } catch ( Exception e ) { log( e.getMessage() ); } } } }
[ "magno.mabreu@gmail.com" ]
magno.mabreu@gmail.com
e2f81565a6cf209003792ce24e4cf43ef4f7193f
c6de2274fc8e80fcb4fb273be91f609d8bd536b8
/src/main/java/org/fao/fenix/web/modules/edi/client/view/fewsnet/FEWSNETTabPanel.java
d5f3b62ff83bc04f5e4a6685acee568c32ba0893
[]
no_license
FENIX-Platform-Projects/amis-statistics-legacy
d583f7db5e07ce4d8b0afcf5795291422d31754d
b51ff91efab51113e03b2e1cf21eb70f0ca24ce1
refs/heads/master
2021-06-10T05:12:20.671404
2017-01-31T12:56:19
2017-01-31T12:57:16
63,598,791
0
0
null
null
null
null
UTF-8
Java
false
false
1,337
java
package org.fao.fenix.web.modules.edi.client.view.fewsnet; import org.fao.fenix.web.modules.edi.client.view.EDITabPanel; public class FEWSNETTabPanel extends EDITabPanel { private FEWSNETInfoPanel infoPanel; private FEWSNETSettingsPanel settingsPanel; private FEWSNETDataPanel dataPanel; private FEWSNETCodesPanel codesPanel; private FEWSNETFENIXPanel fenixPanel; public FEWSNETTabPanel() { super(); infoPanel = new FEWSNETInfoPanel("Info", "info"); this.setInfoPanel(infoPanel); settingsPanel = new FEWSNETSettingsPanel("Settings", "gear"); this.setSettingsPanel(settingsPanel); dataPanel = new FEWSNETDataPanel("Data", "datasource"); this.setDataPanel(dataPanel); codesPanel = new FEWSNETCodesPanel("Codes", "codingSystemIcon"); codesPanel.getTabItem().setEnabled(false); this.setCodesPanel(codesPanel); fenixPanel = new FEWSNETFENIXPanel("Workstation", "wand"); fenixPanel.getTabItem().setEnabled(false); this.setFenixPanel(fenixPanel); } public FEWSNETInfoPanel getInfoPanel() { return infoPanel; } public FEWSNETSettingsPanel getSettingsPanel() { return settingsPanel; } public FEWSNETDataPanel getDataPanel() { return dataPanel; } public FEWSNETCodesPanel getCodesPanel() { return codesPanel; } public FEWSNETFENIXPanel getFenixPanel() { return fenixPanel; } }
[ "fabrizio.castelli@fao.org" ]
fabrizio.castelli@fao.org
8fd8bf6019af138384505e9d629cdc48887a880e
82eba08b9a7ee1bd1a5f83c3176bf3c0826a3a32
/ZmailSelenium/src/java/org/zmail/qa/selenium/projects/admin/ui/PageEditSearchTask.java
3d5e5faee2f91efc43e284f5f0e5b10fdc2e35b5
[ "MIT" ]
permissive
keramist/zmailserver
d01187fb6086bf3784fe180bea2e1c0854c83f3f
762642b77c8f559a57e93c9f89b1473d6858c159
refs/heads/master
2021-01-21T05:56:25.642425
2013-10-21T11:27:05
2013-10-22T12:48:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,543
java
/* * ***** BEGIN LICENSE BLOCK ***** * * Zimbra Collaboration Suite Server * Copyright (C) 2011, 2012 VMware, Inc. * * The contents of this file are subject to the Zimbra Public License * Version 1.3 ("License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://www.zimbra.com/license. * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. * * ***** END LICENSE BLOCK ***** */ /** * */ package org.zmail.qa.selenium.projects.admin.ui; import org.zmail.qa.selenium.framework.ui.AbsApplication; import org.zmail.qa.selenium.framework.ui.AbsPage; import org.zmail.qa.selenium.framework.ui.AbsTab; import org.zmail.qa.selenium.framework.ui.Action; import org.zmail.qa.selenium.framework.ui.Button; import org.zmail.qa.selenium.framework.util.HarnessException; /** * The PageEditSearchTask represents the "Search Mail" -> "New" page * @author Matt Rhoades * */ public class PageEditSearchTask extends AbsTab { public PageEditSearchTask(AbsApplication application) { super(application); // TODO Auto-generated constructor stub } /* (non-Javadoc) * @see projects.admin.ui.AbsTab#isActive() */ @Override public boolean zIsActive() throws HarnessException { throw new HarnessException("implement me"); } /* (non-Javadoc) * @see projects.admin.ui.AbsTab#myPageName() */ @Override public String myPageName() { return (this.getClass().getName()); } /* (non-Javadoc) * @see projects.admin.ui.AbsTab#navigateTo() */ @Override public void zNavigateTo() throws HarnessException { throw new HarnessException("implement me"); } @Override public AbsPage zListItem(Action action, String item) throws HarnessException { // TODO Auto-generated method stub return null; } @Override public AbsPage zListItem(Action action, Button option, String item) throws HarnessException { // TODO Auto-generated method stub return null; } @Override public AbsPage zListItem(Action action, Button option, Button subOption ,String item) throws HarnessException { // TODO Auto-generated method stub return null; } @Override public AbsPage zToolbarPressButton(Button button) throws HarnessException { // TODO Auto-generated method stub return null; } @Override public AbsPage zToolbarPressPulldown(Button pulldown, Button option) throws HarnessException { // TODO Auto-generated method stub return null; } }
[ "bourgerie.quentin@gmail.com" ]
bourgerie.quentin@gmail.com
890bb5de98a90fb829f6c5193d5ee008a86931b6
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/facebook/share/internal/ShareInternalUtility$8.java
98fd5d07624e24ba7404e20a421375ef181e80bd
[]
no_license
0jinxing/wechat-apk-source
544c2d79bfc10261eb36389c1edfdf553d8f312a
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
refs/heads/master
2020-06-07T20:06:03.580028
2019-06-21T09:17:26
2019-06-21T09:17:26
193,069,132
9
4
null
null
null
null
UTF-8
Java
false
false
1,433
java
package com.facebook.share.internal; import android.net.Uri; import com.facebook.FacebookException; import com.facebook.internal.Utility; import com.facebook.share.model.SharePhoto; import com.tencent.matrix.trace.core.AppMethodBeat; import org.json.JSONException; import org.json.JSONObject; final class ShareInternalUtility$8 implements OpenGraphJSONUtility.PhotoJSONProcessor { public final JSONObject toJSONObject(SharePhoto paramSharePhoto) { AppMethodBeat.i(97271); paramSharePhoto = paramSharePhoto.getImageUrl(); if (!Utility.isWebUri(paramSharePhoto)) { paramSharePhoto = new FacebookException("Only web images may be used in OG objects shared via the web dialog"); AppMethodBeat.o(97271); throw paramSharePhoto; } JSONObject localJSONObject = new JSONObject(); try { localJSONObject.put("url", paramSharePhoto.toString()); AppMethodBeat.o(97271); return localJSONObject; } catch (JSONException paramSharePhoto) { paramSharePhoto = new FacebookException("Unable to attach images", paramSharePhoto); AppMethodBeat.o(97271); } throw paramSharePhoto; } } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes4-dex2jar.jar * Qualified Name: com.facebook.share.internal.ShareInternalUtility.8 * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
80b90078097cb81491245e7f8b671e66cf143d17
aaa9751e4ed70a7b3b41fa2025900dd01205518a
/org.eclipse.rcpl.libs/src2/org/apache/poi/util/NullLogger.java
418cc23358cedb0253b79379b5a6db35833f84d2
[]
no_license
rassisi/rcpl
596f0c0aeb4b4ae838f001ad801f9a9c42e31759
93b4620bb94a45d0f42666b0bf6ffecae2c0d063
refs/heads/master
2022-09-20T19:57:54.802738
2020-05-10T20:54:01
2020-05-10T20:54:01
141,136,917
0
0
null
2022-09-01T23:00:59
2018-07-16T12:40:18
Java
UTF-8
Java
false
false
2,373
java
/* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ package org.apache.poi.util; /** * A logger class that strives to make it as easy as possible for * developers to write log calls, while simultaneously making those * calls as cheap as possible by performing lazy evaluation of the log * message.<p> * * @author Marc Johnson (mjohnson at apache dot org) * @author Glen Stampoultzis (glens at apache.org) * @author Nicola Ken Barozzi (nicolaken at apache.org) */ public class NullLogger extends POILogger { @Override public void initialize(final String cat){ // do nothing } /** * Log a message * * @param level One of DEBUG, INFO, WARN, ERROR, FATAL * @param obj1 The object to log. */ @Override public void log(final int level, final Object obj1) { // do nothing } /** * Log a message * * @param level One of DEBUG, INFO, WARN, ERROR, FATAL * @param obj1 The object to log. This is converted to a string. * @param exception An exception to be logged */ public void log(int level, Object obj1, final Throwable exception) { // do nothing } /** * Check if a logger is enabled to log at the specified level * * @param level One of DEBUG, INFO, WARN, ERROR, FATAL */ @Override public boolean check(final int level) { return false; } }
[ "Ramin@DESKTOP-69V2J7P.fritz.box" ]
Ramin@DESKTOP-69V2J7P.fritz.box
a586efe059e2a1a44552fbc310834e3f33cad7d5
afd91358ff5d2cd868153731ec5f8b6c03df630a
/commons/domain/src/main/java/com/redhat/gpe/domain/integration/salesforce/SLAEnum.java
5c1919f904326d36311f8477d4831538cedc251c
[]
no_license
jbride/OPEN_Reporting
729797547e4f13037a989ae8a5368f48665256dc
a9a39de8a7a6d9fab61dd1f06c46a9b81c7fe58c
refs/heads/master
2022-10-02T15:03:29.125113
2020-03-23T14:20:24
2020-03-23T14:20:24
249,445,329
0
0
null
2022-09-22T19:08:03
2020-03-23T13:56:24
TSQL
UTF-8
Java
false
false
933
java
/* * Salesforce DTO generated by camel-salesforce-maven-plugin * Generated on: Fri Feb 19 14:36:19 BRST 2016 */ package com.redhat.gpe.domain.integration.salesforce; import org.codehaus.jackson.annotate.JsonCreator; import org.codehaus.jackson.annotate.JsonValue; /** * Salesforce Enumeration DTO for picklist SLA__c */ public enum SLAEnum { // Bronze BRONZE("Bronze"), // Gold GOLD("Gold"), // Platinum PLATINUM("Platinum"), // Silver SILVER("Silver"); final String value; private SLAEnum(String value) { this.value = value; } @JsonValue public String value() { return this.value; } @JsonCreator public static SLAEnum fromValue(String value) { for (SLAEnum e : SLAEnum.values()) { if (e.value.equals(value)) { return e; } } throw new IllegalArgumentException(value); } }
[ "jbride2001@yahoo.com" ]
jbride2001@yahoo.com
310c4d951e0332fe7157ed633c011f184094acce
ed5159d056e98d6715357d0d14a9b3f20b764f89
/src/irvine/oeis/a175/A175774.java
d8ed5fb54ad92a7e12d9e8c69d61b95c6d005bf4
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
384
java
package irvine.oeis.a175; // Generated by gen_pattern.pl - DO NOT EDIT here! import irvine.oeis.GeneratingFunctionSequence; /** * A175774 <code>7*(10^n-5)</code>. * @author Georg Fischer */ public class A175774 extends GeneratingFunctionSequence { /** Construct the sequence. */ public A175774() { super(1, new long[] {0, 35, 280}, new long[] {1, -11, 10}); } }
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
a5cf3fb0d84b34e5311634201617fef589e6f0f6
ff3fea7bfe9f0b6d6ebb5ae4d8c85c2e878c6cf8
/fundamentals/src/AssociativeArrays/SoftUniExamResults.java
2a2e5e225f7cdd6205dca0d4206be26188a687db
[]
no_license
KrisBiserovKrumov/ProgramicBasic
704cf3dcbe366872edbe549b1be59dd5e96c605a
7ff4a714206c91e978054d286dc15b0367d4a5c9
refs/heads/master
2023-08-01T05:14:39.480605
2021-09-16T10:49:45
2021-09-16T10:49:45
407,126,411
0
0
null
null
null
null
UTF-8
Java
false
false
2,079
java
package AssociativeArrays; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.HashMap; import java.util.Map; public class SoftUniExamResults { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String imput = reader.readLine(); HashMap<String,Integer> users = new HashMap<>(); HashMap<String,Integer> submissions = new HashMap<>(); while (!imput.equals("exam finished")){ String[] tonken = imput.split("-"); if (tonken.length == 3){ String nema = tonken[0]; String lenguage = tonken[1]; int points = Integer.parseInt(tonken[2]); if (!users.containsKey(nema)){ users.put(nema,points); }else if (users.get(nema) < points){ users.put(nema,points); } if (!submissions.containsKey(lenguage)){ submissions.put(lenguage,1); }else { submissions.put(lenguage,submissions.get(lenguage) + 1); } }else { users.remove(tonken[0]); } imput = reader.readLine(); } System.out.println("Results:"); users.entrySet().stream() .sorted(Map.Entry.<String,Integer>comparingByValue().reversed() .thenComparing(Map.Entry.comparingByKey())) .forEach(entry ->{ System.out.println(String.format("%s | %d",entry.getKey(),entry.getValue())); }); System.out.println("Submissions:"); submissions.entrySet().stream().sorted(Map.Entry.<String,Integer>comparingByValue() .reversed().thenComparing(Map.Entry.comparingByKey())) .forEach(entry ->{ System.out.println(String.format("%s - %d",entry.getKey(),entry.getValue())); }); } }
[ "79319583+KrisBiserovKrumov@users.noreply.github.com" ]
79319583+KrisBiserovKrumov@users.noreply.github.com
68de5331cfe01bc11a4f62fbc2491ff3395d4c68
a80ad2e82a0409f4513ab599cf353a8885cf8949
/src/test/java/com/oj/judge/JudgeApplicationTests.java
21c59129709536708844bdd313db856f1aa4eff6
[]
no_license
ChinaWim/Judge
2115e8578cdc1cab74c89a3e53d67d8c98009a5b
c23169071dbb7ec96ff6ab6e55440cc84dd88687
refs/heads/master
2022-11-18T20:03:48.180457
2019-10-20T14:31:15
2019-10-20T14:31:15
159,943,714
10
2
null
2022-11-16T11:37:47
2018-12-01T12:46:10
Java
UTF-8
Java
false
false
337
java
package com.oj.judge; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class JudgeApplicationTests { @Test public void contextLoads() { } }
[ "969130721@qq.com" ]
969130721@qq.com
6d5c80a08eda117d0f3ae3c13446036534b473b5
858ce18d11f88ec6af940b2bc62617932d3ea7f7
/authz/authz-cmd/src/main/java/com/att/cmd/role/ListByPerm.java
10ba4877f91c402c2ff400c7780a45b7300c5814
[ "BSD-3-Clause" ]
permissive
an481n/AAF
71c8f83e3d548ef21b053404d769740b90e2df88
19799dfe5c12b88e4e528d13765905023cd5c244
refs/heads/master
2020-06-15T10:44:03.248340
2016-12-01T05:18:46
2016-12-01T05:18:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,643
java
/******************************************************************************* * Copyright (c) 2016 AT&T Intellectual Property. All rights reserved. *******************************************************************************/ package com.att.cmd.role; import com.att.aft.dme2.internal.jetty.http.HttpMethods; import com.att.cadi.CadiException; import com.att.cadi.LocatorException; import com.att.cadi.client.Future; import com.att.cadi.client.Rcli; import com.att.cmd.Cmd; import com.att.cmd.Param; import com.att.inno.env.APIException; import aaf.v2_0.Roles; /** * Return Roles by NS * * */ public class ListByPerm extends Cmd { private static final String HEADER = "List Roles by Perm "; public ListByPerm(List parent) { super(parent,"perm", new Param("type",true), new Param("instance", true), new Param("action", true)); } @Override public int _exec(int _idx, final String ... args) throws CadiException, APIException, LocatorException { int idx = _idx; final String type=args[idx]; final String instance=args[++idx]; final String action=args[++idx]; return same(((List)parent).new ListRoles() { @Override public Integer code(Rcli<?> client) throws CadiException, APIException { Future<Roles> fp = client.read( "/authz/roles/perm/"+type+'/'+instance+'/'+action, getDF(Roles.class) ); return list(fp,client, HEADER+type+'|'+instance+'|'+action); } }); } @Override public void detailedHelp(int indent, StringBuilder sb) { detailLine(sb,indent,HEADER); api(sb,indent,HttpMethods.GET,"authz/roles/user/<user>",Roles.class,true); } }
[ "sv8675@att.com" ]
sv8675@att.com
fe6e14305711ff68661cdef9be5254862c061558
21dbe7788bc83033642949dff9246066840b157e
/src/tech/aistar/design/factory/generic/ObjectFactory.java
71a94d5658c0116c5658b91a29ac85055f3e13ce
[ "Apache-2.0" ]
permissive
bestzmr/core_java
183d7591842b7af0ab6462add1345a3224e86c6e
f65c2cb0879e783cf191943b84f0ecd1fe2f232a
refs/heads/master
2023-01-06T13:31:07.594509
2020-10-14T11:53:01
2020-10-14T11:53:01
303,999,230
0
0
null
null
null
null
UTF-8
Java
false
false
2,151
java
package tech.aistar.design.factory.generic; import tech.aistar.day08.relation.extend.Cat; import tech.aistar.day08.relation.extend.Dog; /** * 本类用来演示:通用的工厂 - 可以用来创建任意对象 * * @author: success * @date: 2020/8/6 10:25 上午 */ public class ObjectFactory { public static Object getInstance(String className){ Object obj = null; //1. 获取class实例 try { Class<?> c = Class.forName(className); //反射创建类的对象... obj = c.newInstance(); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (InstantiationException e) { e.printStackTrace(); } return obj; } /** * 泛型应用在工厂 * @param className * @param <T> * @return */ public static <T> T createInstance(String className){ T t = null; try { Class<?> c = Class.forName(className); t = (T) c.newInstance(); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (InstantiationException e) { e.printStackTrace(); } return t; } public static <T> T createInstance2(T ts){ T t = null; Class<?> c = ts.getClass(); try { t = (T) c.newInstance(); } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } return t; } } class TestObjectFactory{ public static void main(String[] args) { // Cat cat = (Cat) ObjectFactory.getInstance("tech.aistar.day08.relation.extend.Cat"); //Dog dog = (Dog) ObjectFactory.getInstance("tech.aistar.day08.relation.extend.Cat"); //Dog cat = ObjectFactory.createInstance("tech.aistar.day08.relation.extend.Cat"); Cat cat = ObjectFactory.createInstance2(new Cat()); } }
[ "849962874@qq.com" ]
849962874@qq.com
c3a6677d9da9485de31ad51638e57f223c6fc0df
c1d427fef17eb89527630f2cd245eb7fe1a426cb
/com.wudsn.ide.gfx/src/com/wudsn/ide/gfx/converter/atari8bit/LinearBitMapMicroPainterConverter.java
25d6a3a4cbc30a8f9759d3b35c36e3badd9115f2
[]
no_license
napobear/wudsn-ide
bd4ccb7fd17935ee12272dd2ea6791cee5761f05
7bc6a0b750c94e1833f8da2098f5e6f3461551d7
refs/heads/master
2023-01-19T03:57:23.912463
2020-11-22T00:16:18
2020-11-22T00:16:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,421
java
/** * Copyright (C) 2009 - 2020 <a href="https://www.wudsn.com" target="_top">Peter Dell</a> * * This file is part of WUDSN IDE. * * WUDSN IDE 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, or * (at your option) any later version. * * WUDSN IDE 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 WUDSN IDE. If not, see <http://www.gnu.org/licenses/>. */ package com.wudsn.ide.gfx.converter.atari8bit; import org.eclipse.swt.graphics.RGB; import com.wudsn.ide.gfx.converter.FilesConverterData; import com.wudsn.ide.gfx.converter.PaletteMapper; import com.wudsn.ide.gfx.converter.generic.LinearBitMapConverter; import com.wudsn.ide.gfx.model.Palette; import com.wudsn.ide.gfx.model.PaletteType; import com.wudsn.ide.gfx.model.PaletteUtility; public class LinearBitMapMicroPainterConverter extends LinearBitMapConverter { public LinearBitMapMicroPainterConverter() { } @Override public boolean canConvertToImage(byte[] bytes) { if (bytes == null) { throw new IllegalArgumentException("Parameter 'bytes' must not be null."); } return bytes.length == 7680 || bytes.length == 7684; } @Override public void convertToImageSizeAndPalette(FilesConverterData data, byte[] bytes) { if (data == null) { throw new IllegalArgumentException("Parameter 'data' must not be null."); } if (bytes == null) { throw new IllegalArgumentException("Parameter 'bytes' must not be null."); } PaletteMapper paletteMapper = new Atari8BitPaletteMapper(); RGB[] paletteColors; if (bytes.length == 7684) { paletteColors = new RGB[4]; paletteColors[0] = paletteMapper.getRGB(bytes[7680] & 0xfe); paletteColors[1] = paletteMapper.getRGB(bytes[7681] & 0xfe); paletteColors[2] = paletteMapper.getRGB(bytes[7682] & 0xfe); paletteColors[3] = paletteMapper.getRGB(bytes[7683] & 0xfe); } else { paletteColors = PaletteUtility.getPaletteColors(PaletteType.ATARI_DEFAULT, Palette.MULTI_1, null); } setImageSizeAndPalette(data, 40, 192, Palette.MULTI_MANUAL, paletteColors); } @Override public void convertToImageDataSize(FilesConverterData data) { data.setImageDataWidth(data.getParameters().getColumns() * 4); data.setImageDataHeight(data.getParameters().getRows()); } @Override public boolean convertToImageData(FilesConverterData data) { if (data == null) { throw new IllegalArgumentException("Parameter 'data' must not be null."); } int offset = 0; int xpixels = 4; for (int y1 = 0; y1 < data.getParameters().getRows(); y1++) { for (int x1 = 0; x1 < data.getParameters().getColumns(); x1++) { int b = data.getSourceFileByte(BIT_MAP_FILE, offset++); if (b < 0) { return true; } for (int x2 = 0; x2 < 4; x2++) { int x = x1 * xpixels + x2; int color = (b & mask_2bit[x2]) >>> shift_2bit[x2]; data.setPalettePixel(x, y1, color); } } } return true; } }
[ "jac@wudsn.com" ]
jac@wudsn.com
1c0ded4868a9d2c8b05addd018c56be6ef463048
129f58086770fc74c171e9c1edfd63b4257210f3
/src/testcases/CWE83_XSS_Attribute/CWE83_XSS_Attribute__Servlet_getCookies_Servlet_81_goodG2B.java
fd958e37216a1a6169c50df5c0b92f1b43160694
[]
no_license
glopezGitHub/Android23
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
refs/heads/master
2023-03-07T15:14:59.447795
2023-02-06T13:59:49
2023-02-06T13:59:49
6,856,387
0
3
null
2023-02-06T18:38:17
2012-11-25T22:04:23
Java
UTF-8
Java
false
false
1,411
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE83_XSS_Attribute__Servlet_getCookies_Servlet_81_goodG2B.java Label Definition File: CWE83_XSS_Attribute__Servlet.label.xml Template File: sources-sink-81_goodG2B.tmpl.java */ /* * @description * CWE: 83 Cross Site Scripting (XSS) in attributes; Examples(replace QUOTE with an actual double quote): ?img_loc=http://www.google.comQUOTE%20onerror=QUOTEalert(1) and ?img_loc=http://www.google.comQUOTE%20onerror=QUOTEjavascript:alert(1) * BadSource: getCookies_Servlet Read data from the first cookie using getCookies() * GoodSource: A hardcoded string * Sinks: printlnServlet * BadSink : XSS in img src attribute * Flow Variant: 81 Data flow: data passed in a parameter to an abstract method * * */ package testcases.CWE83_XSS_Attribute; import testcasesupport.*; import java.util.logging.Level; import java.util.logging.Logger; import javax.servlet.http.*; public class CWE83_XSS_Attribute__Servlet_getCookies_Servlet_81_goodG2B extends CWE83_XSS_Attribute__Servlet_getCookies_Servlet_81_base { public void action(String data , HttpServletRequest request, HttpServletResponse response) throws Throwable { if (data != null) { /* POTENTIAL FLAW: Input is not verified/sanitized before use in an image tag */ response.getWriter().println("<br>bad() - <img src=\"" + data + "\">"); } } }
[ "guillermo.pando@gmail.com" ]
guillermo.pando@gmail.com
c509baff814e01dee96fa35c90458ab6a46d1740
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/dbeaver/2017/12/SQLServerMessages.java
1c759b80fec64959bf3cc25dc6a53070280bbf8e
[]
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
2,190
java
/* * DBeaver - Universal Database Manager * Copyright (C) 2010-2017 Serge Rider (serge@jkiss.org) * Copyright (C) 2010-2017 Eugene Fradkin (eugene.fradkin@gmail.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jkiss.dbeaver.ext.mssql; import org.eclipse.osgi.util.NLS; public class SQLServerMessages extends NLS { static final String BUNDLE_NAME = "org.jkiss.dbeaver.ext.mssql.SQLServerResources"; //$NON-NLS-1$ /* PostgreConnectionPage */ public static String dialog_setting_connection_host; public static String dialog_setting_connection_port; public static String dialog_setting_connection_database; public static String dialog_setting_connection_user; public static String dialog_setting_connection_password; public static String dialog_setting_connection_settings; public static String dialog_connection_advanced_tab; public static String dialog_connection_advanced_tab_tooltip; public static String dialog_connection_windows_authentication_button; public static String dialog_connection_database_schema_label; public static String dialog_connection_general_tab; public static String dialog_connection_general_tab_tooltip; public static String dialog_connection_host_label; public static String dialog_connection_password_label; public static String dialog_connection_port_label; public static String dialog_connection_test_connection_button; public static String dialog_connection_user_name_label; static { // initialize resource bundle NLS.initializeMessages(BUNDLE_NAME, SQLServerMessages.class); } private SQLServerMessages() { } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
156fc69f9c57f8fa7fbdd38cf566485198015070
b31eced7916e6cfbb4941fea849e3cc0f7aae0c1
/chapter_2/src/main/java/com/wzc/chapter_2/model/User.java
bd735fd8d3daa77fce57ddcacfa0d5e784b2e32b
[ "Apache-2.0" ]
permissive
jhwsx/android-art-research
85520c2901a0e36e91dec6c3169799929bb6ff3e
5a0410a465dff281859da42c2273e7eb8ee0937a
refs/heads/master
2022-08-17T18:29:48.794951
2022-07-20T22:04:16
2022-07-20T22:04:16
125,172,958
3
1
null
null
null
null
UTF-8
Java
false
false
672
java
package com.wzc.chapter_2.model; import java.io.Serializable; /** * @author wzc * @date 2018/3/14 */ public class User implements Serializable { private static final long serialVersionUID = 2L; public int userId; public String userName; public boolean isMale; public User(int userId, String userName, boolean isMale) { this.userId = userId; this.userName = userName; this.isMale = isMale; } @Override public String toString() { return "User{" + "userId=" + userId + ", userName='" + userName + '\'' + ", isMale=" + isMale + '}'; } }
[ "wangzhichao@adups.com" ]
wangzhichao@adups.com
ab3772ec15f1ffb7595e543afb546927e508a1cd
5d00b27e4022698c2dc56ebbc63263f3c44eea83
/gen/com/ah/xml/be/config/ReportStatisticAlarmThreshold.java
af9164d366ba8de95d0a317050e79a713fe60e91
[]
no_license
Aliing/WindManager
ac5b8927124f992e5736e34b1b5ebb4df566770a
f66959dcaecd74696ae8bc764371c9a2aa421f42
refs/heads/master
2020-12-27T23:57:43.988113
2014-07-28T17:58:46
2014-07-28T17:58:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,835
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.6 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2014.07.01 at 11:29:17 AM CST // package com.ah.xml.be.config; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for report-statistic-alarm-threshold complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="report-statistic-alarm-threshold"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="interface" type="{http://www.aerohive.com/configuration/others}report-alarm-threshold-interface" minOccurs="0"/> * &lt;element name="client" type="{http://www.aerohive.com/configuration/others}report-alarm-threshold-client" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "report-statistic-alarm-threshold", propOrder = { "_interface", "client" }) public class ReportStatisticAlarmThreshold { @XmlElement(name = "interface") protected ReportAlarmThresholdInterface _interface; protected ReportAlarmThresholdClient client; /** * Gets the value of the interface property. * * @return * possible object is * {@link ReportAlarmThresholdInterface } * */ public ReportAlarmThresholdInterface getInterface() { return _interface; } /** * Sets the value of the interface property. * * @param value * allowed object is * {@link ReportAlarmThresholdInterface } * */ public void setInterface(ReportAlarmThresholdInterface value) { this._interface = value; } /** * Gets the value of the client property. * * @return * possible object is * {@link ReportAlarmThresholdClient } * */ public ReportAlarmThresholdClient getClient() { return client; } /** * Sets the value of the client property. * * @param value * allowed object is * {@link ReportAlarmThresholdClient } * */ public void setClient(ReportAlarmThresholdClient value) { this.client = value; } }
[ "zjie@aerohive.com" ]
zjie@aerohive.com
b277a649a5d315f46d3e31a5bd378eaf8cab70ca
d7c5121237c705b5847e374974b39f47fae13e10
/airspan.netspan/src/main/java/Netspan/NBI_15_1/Backhaul/RelayProfileDeleteResponse.java
62fef86d7b58c374e183ebe44bffdf2b9e960c20
[]
no_license
AirspanNetworks/SWITModules
8ae768e0b864fa57dcb17168d015f6585d4455aa
7089a4b6456621a3abd601cc4592d4b52a948b57
refs/heads/master
2022-11-24T11:20:29.041478
2020-08-09T07:20:03
2020-08-09T07:20:03
184,545,627
1
0
null
2022-11-16T12:35:12
2019-05-02T08:21:55
Java
UTF-8
Java
false
false
1,796
java
package Netspan.NBI_15_1.Backhaul; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="RelayProfileDeleteResult" type="{http://Airspan.Netspan.WebServices}ProfileResponse" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "relayProfileDeleteResult" }) @XmlRootElement(name = "RelayProfileDeleteResponse") public class RelayProfileDeleteResponse { @XmlElement(name = "RelayProfileDeleteResult") protected ProfileResponse relayProfileDeleteResult; /** * Gets the value of the relayProfileDeleteResult property. * * @return * possible object is * {@link ProfileResponse } * */ public ProfileResponse getRelayProfileDeleteResult() { return relayProfileDeleteResult; } /** * Sets the value of the relayProfileDeleteResult property. * * @param value * allowed object is * {@link ProfileResponse } * */ public void setRelayProfileDeleteResult(ProfileResponse value) { this.relayProfileDeleteResult = value; } }
[ "build.Airspan.com" ]
build.Airspan.com
d047e937e141983f28e21b39eb3a37861c1f8fff
6249a2b3928e2509b8a5d909ef9d8e18221d9637
/revolsys-core/src/main/java/com/revolsys/geometry/planargraph/Subgraph.java
ad2fd24ac2f12236cb6514bd359a537651f7152a
[ "Apache-2.0" ]
permissive
revolsys/com.revolsys.open
dbcdc3bdcee3276dc3680311948e91ec64e1264e
7f4385c632094eb5ed67c0646ee3e2e258fba4e4
refs/heads/main
2023-08-22T17:18:48.499931
2023-05-31T01:59:22
2023-05-31T01:59:22
2,709,026
5
11
NOASSERTION
2023-05-31T01:59:23
2011-11-04T12:33:49
Java
UTF-8
Java
false
false
3,826
java
/* * The JTS Topology Suite is a collection of Java classes that * implement the fundamental operations required to validate a given * geo-spatial data set to a known topological specification. * * Copyright (C) 2001 Vivid Solutions * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * For more information, contact: * * Vivid Solutions * Suite #1A * 2328 Government Street * Victoria BC V8T 5G5 * Canada * * (250)385-6040 * www.vividsolutions.com */ package com.revolsys.geometry.planargraph; import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; /** * A subgraph of a {@link PlanarGraph}. * A subgraph may contain any subset of {@link Edge}s * from the parent graph. * It will also automatically contain all {@link DirectedEdge}s * and {@link Node}s associated with those edges. * No new objects are created when edges are added - * all associated components must already exist in the parent graph. */ public class Subgraph { protected List dirEdges = new ArrayList(); protected Set edges = new HashSet(); protected NodeMap nodeMap = new NodeMap(); protected PlanarGraph parentGraph; /** * Creates a new subgraph of the given {@link PlanarGraph} * * @param parentGraph the parent graph */ public Subgraph(final PlanarGraph parentGraph) { this.parentGraph = parentGraph; } /** * Adds an {@link Edge} to the subgraph. * The associated {@link DirectedEdge}s and {@link Node}s * are also added. * * @param e the edge to add */ public void add(final Edge e) { if (this.edges.contains(e)) { return; } this.edges.add(e); this.dirEdges.add(e.getDirEdge(0)); this.dirEdges.add(e.getDirEdge(1)); this.nodeMap.add(e.getDirEdge(0).getFromNode()); this.nodeMap.add(e.getDirEdge(1).getFromNode()); } /** * Tests whether an {@link Edge} is contained in this subgraph * @param e the edge to test * @return <code>true</code> if the edge is contained in this subgraph */ public boolean contains(final Edge e) { return this.edges.contains(e); } /** * Returns an {@link Iterator} over the {@link DirectedEdge}s in this graph, * in the order in which they were added. * * @return an iterator over the directed edges * * @see #add(Edge) */ public Iterator dirEdgeIterator() { return this.dirEdges.iterator(); } /** * Returns an {@link Iterator} over the {@link Edge}s in this graph, * in the order in which they were added. * * @return an iterator over the edges * * @see #add(Edge) */ public Iterator edgeIterator() { return this.edges.iterator(); } /** * Gets the {@link PlanarGraph} which this subgraph * is part of. * * @return the parent PlanarGraph */ public PlanarGraph getParent() { return this.parentGraph; } /** * Returns an {@link Iterator} over the {@link Node}s in this graph. * @return an iterator over the nodes */ public Iterator nodeIterator() { return this.nodeMap.iterator(); } }
[ "paul.austin@revolsys.com" ]
paul.austin@revolsys.com
d9956eabb18b93a03d952eb6146a6807d3b36521
0bdb000cda881dbeb1000b4d6a216ba81ae412b9
/src/usu/perpustakaan/buku/data/template/Book.java
df565768c97f4bee66e77d2ac641b9575256fc3c
[]
no_license
albimdkr/eBookLibrary
0d7d2717f6e5c14d71fbe93769ba3b06c5ae2def
1896a5821e4cc563dda4addb75703775e30052e1
refs/heads/master
2022-02-05T17:06:34.180231
2015-03-13T03:35:37
2015-03-13T03:35:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,351
java
/* * DILARANG MENGHAPUS ATAU MENGEDIT COPYRIGHT INI. * * Copyright 2008 echo.khannedy@gmail.com. * All rights reserved. * * Semua isi dalam file ini adalah hak milik dari echo.khannedy@gmail.com * Anda tak diperkenankan untuk menggunakan file atau mengubah file * ini kecuali anda tidak menghapus atau merubah lisence ini. * * File ini dibuat menggunakan : * IDE : NetBeans * NoteBook : Acer Aspire 5920G * OS : Windows Vista * Java : Java 1.6 * */ package usu.perpustakaan.buku.data.template; import java.io.Serializable; /** * * @author usu */ public interface Book extends Serializable { /** * * @return */ String getAuthor(); /** * * @return */ String getId(); /** * * @return */ String getKind(); /** * * @return */ String getPublisher(); /** * * @return */ String getTitle(); /** * * @param author */ void setAuthor(String author); /** * * @param id */ void setId(String id); /** * * @param kind */ void setKind(String kind); /** * * @param publisher */ void setPublisher(String publisher); /** * * @param title */ void setTitle(String title); }
[ "echo.khannedy@gmail.com" ]
echo.khannedy@gmail.com
35c3d454c01225b17a6e0e521515b7237e02ca10
ff7aa88dfc87442420d252d07902fe6ac19d4b04
/app/src/main/java/com/pcjr/pcjr_oa/bean/Customer.java
5ba580d3814106ec27f5644011ccc68a6beb5965
[]
no_license
MairoJack/Pcjr_oa
b842e8d9d4e78400122ab50292ea949461fee11c
2ec6fd8f41daa5bf789f96102ef3a3616c1cdc20
refs/heads/master
2021-09-01T23:58:06.029245
2017-12-29T08:51:09
2017-12-29T08:51:09
106,526,876
0
1
null
null
null
null
UTF-8
Java
false
false
2,080
java
package com.pcjr.pcjr_oa.bean; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; import java.io.Serializable; import java.util.List; import lombok.Data; /** * 客户 * Created by Mario on 2017/9/20下午1:37 */ @Data public class Customer implements Serializable { protected String id; //ID protected String name; //客户名称 protected String mobile; //手机 protected String fax; //传真 protected String address; //地址 protected String email; //邮箱 protected String website; //网站 protected String remarks; //备注 protected String manager; //客户经理ID @SerializedName("postal_code") protected String postalCode; //邮编 @SerializedName("card_no") protected String cardNo; //贷款卡号 @SerializedName("manager_name") protected String managerName; //客户经理 @SerializedName("customer_type") protected Integer customerType; //客户类型 0:个人 1:公司 @SerializedName("credit_rating") protected String creditRating; //信用等级 @SerializedName("counter_guarantee") protected String counterGuarantee; //反担保情 @SerializedName("borrower_introduction") protected String borrowerIntroduction; //借款人情况 @SerializedName("credit_history") protected String creditHistory; //信用记录 @SerializedName("join_date") protected Long joinDate; //创建时间 @SerializedName("is_selected") protected Boolean isSelected = false; //是否被选中 @Expose(serialize = false) protected transient boolean isUpdate = false; //是否是更新 默认不是 @SerializedName("relationship") protected List<CustomerContactRelation> relationship; //联系人、客户关系 }
[ "541496358@qq.com" ]
541496358@qq.com
cdd8fc25db4a441275b97e12c6c28ed21335c0c8
86505462601eae6007bef6c9f0f4eeb9fcdd1e7b
/bin/modules/order-management/warehousing/testsrc/de/hybris/platform/warehousing/atp/strategy/impl/DefaultPickupWarehouseSelectionStrategyTest.java
0eede42899cde8536565ce23ecbac81d63a532a3
[]
no_license
jp-developer0/hybrisTrail
82165c5b91352332a3d471b3414faee47bdb6cee
a0208ffee7fee5b7f83dd982e372276492ae83d4
refs/heads/master
2020-12-03T19:53:58.652431
2020-01-02T18:02:34
2020-01-02T18:02:34
231,430,332
0
4
null
2020-08-05T22:46:23
2020-01-02T17:39:15
null
UTF-8
Java
false
false
3,935
java
/* * [y] hybris Platform * * Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. * * This software is the confidential and proprietary information of SAP * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with SAP. */ package de.hybris.platform.warehousing.atp.strategy.impl; import de.hybris.bootstrap.annotations.UnitTest; import de.hybris.platform.commerceservices.model.PickUpDeliveryModeModel; import de.hybris.platform.core.model.order.delivery.DeliveryModeModel; import de.hybris.platform.ordersplitting.model.WarehouseModel; import de.hybris.platform.storelocator.model.PointOfServiceModel; import de.hybris.platform.warehousing.warehouse.filter.WarehousesFilterProcessor; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import com.google.common.collect.Sets; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; import static junit.framework.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.when; @UnitTest @RunWith(MockitoJUnitRunner.class) public class DefaultPickupWarehouseSelectionStrategyTest { @InjectMocks private DefaultPickupWarehouseSelectionStrategy pickupWarehouseSelectionStrategy; @Mock private PointOfServiceModel pos; @Mock private WarehouseModel warehouseNoPickup; @Mock private WarehouseModel warehouseForPickup; @Mock private DeliveryModeModel internationalShipping; @Mock private DeliveryModeModel localShipping; @Mock private PickUpDeliveryModeModel pickup; @Mock private WarehousesFilterProcessor warehousesFilterProcessor; @Before public void setUp() { when(pos.getWarehouses()).thenReturn(Arrays.asList(warehouseNoPickup)); when(warehouseForPickup.getDeliveryModes()).thenReturn(Sets.newHashSet(localShipping, pickup)); when(warehouseNoPickup.getDeliveryModes()).thenReturn(Sets.newHashSet(internationalShipping, localShipping)); when(warehousesFilterProcessor.filterLocations(Sets.newHashSet(warehouseNoPickup))).thenReturn(Collections.emptySet()); when(warehousesFilterProcessor.filterLocations(Sets.newHashSet(warehouseNoPickup, warehouseForPickup))) .thenReturn(Collections.singleton(warehouseForPickup)); when(warehousesFilterProcessor.filterLocations(Sets.newHashSet(warehouseForPickup))) .thenReturn(Collections.singleton(warehouseForPickup)); } @Test(expected = IllegalArgumentException.class) public void shouldFail_nullPos() { //When pickupWarehouseSelectionStrategy.getWarehouses(null); } @Test public void shouldGetWarehouses_nullWarehouses() { //Given when(pos.getWarehouses()).thenReturn(null); //When final Collection<WarehouseModel> warehouses = pickupWarehouseSelectionStrategy.getWarehouses(pos); //Then assertTrue(warehouses.isEmpty()); } @Test public void shouldGetWarehouses_nullDeliveryModes() { //Given when(warehouseNoPickup.getDeliveryModes()).thenReturn(null); //When final Collection<WarehouseModel> warehouses = pickupWarehouseSelectionStrategy.getWarehouses(pos); //Then assertTrue(warehouses.isEmpty()); } @Test public void shouldGetWarehouses_noPickup() { //When final Collection<WarehouseModel> warehouses = pickupWarehouseSelectionStrategy.getWarehouses(pos); //Then assertTrue(warehouses.isEmpty()); } @Test public void shouldGetWarehousesValid() { //Given when(pos.getWarehouses()).thenReturn(Arrays.asList(warehouseForPickup, warehouseNoPickup)); //When final Collection<WarehouseModel> warehouses = pickupWarehouseSelectionStrategy.getWarehouses(pos); //Then assertEquals(1, warehouses.size()); assertTrue(warehouses.contains(warehouseForPickup)); } }
[ "juan.gonzalez.working@gmail.com" ]
juan.gonzalez.working@gmail.com
d5940f290bd9849936dc86ab772bd8e3e9f9090e
514554f3e4196b4fbe994e429bed8d184dcd57c3
/src/test/java/io/github/jhipster/application/web/rest/AuditResourceIntTest.java
635352ab44030a3d1ae561b7278170213e9e4044
[]
no_license
andermev/reference-example-jhipster-monolithic-1
222eae6e3a7a0983c3a86034e33d201ea03e0c08
6ffcff7f68c902c7e9ec8db34f0ceb50d5517845
refs/heads/master
2020-04-08T06:39:18.874412
2018-11-26T03:26:18
2018-11-26T03:26:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,749
java
package io.github.jhipster.application.web.rest; import io.github.jhipster.application.ReferenceExampleJHipsterMonolithic1App; import io.github.jhipster.application.config.audit.AuditEventConverter; import io.github.jhipster.application.domain.PersistentAuditEvent; import io.github.jhipster.application.repository.PersistenceAuditEventRepository; import io.github.jhipster.application.service.AuditEventService; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.MockitoAnnotations; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.data.web.PageableHandlerMethodArgumentResolver; import org.springframework.format.support.FormattingConversionService; import org.springframework.http.MediaType; import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.transaction.annotation.Transactional; import java.time.Instant; import static org.assertj.core.api.AssertionsForClassTypes.assertThat; import static org.hamcrest.Matchers.hasItem; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; /** * Test class for the AuditResource REST controller. * * @see AuditResource */ @RunWith(SpringRunner.class) @SpringBootTest(classes = ReferenceExampleJHipsterMonolithic1App.class) @Transactional public class AuditResourceIntTest { private static final String SAMPLE_PRINCIPAL = "SAMPLE_PRINCIPAL"; private static final String SAMPLE_TYPE = "SAMPLE_TYPE"; private static final Instant SAMPLE_TIMESTAMP = Instant.parse("2015-08-04T10:11:30Z"); private static final long SECONDS_PER_DAY = 60 * 60 * 24; @Autowired private PersistenceAuditEventRepository auditEventRepository; @Autowired private AuditEventConverter auditEventConverter; @Autowired private MappingJackson2HttpMessageConverter jacksonMessageConverter; @Autowired private FormattingConversionService formattingConversionService; @Autowired private PageableHandlerMethodArgumentResolver pageableArgumentResolver; private PersistentAuditEvent auditEvent; private MockMvc restAuditMockMvc; @Before public void setup() { MockitoAnnotations.initMocks(this); AuditEventService auditEventService = new AuditEventService(auditEventRepository, auditEventConverter); AuditResource auditResource = new AuditResource(auditEventService); this.restAuditMockMvc = MockMvcBuilders.standaloneSetup(auditResource) .setCustomArgumentResolvers(pageableArgumentResolver) .setConversionService(formattingConversionService) .setMessageConverters(jacksonMessageConverter).build(); } @Before public void initTest() { auditEventRepository.deleteAll(); auditEvent = new PersistentAuditEvent(); auditEvent.setAuditEventType(SAMPLE_TYPE); auditEvent.setPrincipal(SAMPLE_PRINCIPAL); auditEvent.setAuditEventDate(SAMPLE_TIMESTAMP); } @Test public void getAllAudits() throws Exception { // Initialize the database auditEventRepository.save(auditEvent); // Get all the audits restAuditMockMvc.perform(get("/management/audits")) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) .andExpect(jsonPath("$.[*].principal").value(hasItem(SAMPLE_PRINCIPAL))); } @Test public void getAudit() throws Exception { // Initialize the database auditEventRepository.save(auditEvent); // Get the audit restAuditMockMvc.perform(get("/management/audits/{id}", auditEvent.getId())) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) .andExpect(jsonPath("$.principal").value(SAMPLE_PRINCIPAL)); } @Test public void getAuditsByDate() throws Exception { // Initialize the database auditEventRepository.save(auditEvent); // Generate dates for selecting audits by date, making sure the period will contain the audit String fromDate = SAMPLE_TIMESTAMP.minusSeconds(SECONDS_PER_DAY).toString().substring(0, 10); String toDate = SAMPLE_TIMESTAMP.plusSeconds(SECONDS_PER_DAY).toString().substring(0, 10); // Get the audit restAuditMockMvc.perform(get("/management/audits?fromDate="+fromDate+"&toDate="+toDate)) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) .andExpect(jsonPath("$.[*].principal").value(hasItem(SAMPLE_PRINCIPAL))); } @Test public void getNonExistingAuditsByDate() throws Exception { // Initialize the database auditEventRepository.save(auditEvent); // Generate dates for selecting audits by date, making sure the period will not contain the sample audit String fromDate = SAMPLE_TIMESTAMP.minusSeconds(2*SECONDS_PER_DAY).toString().substring(0, 10); String toDate = SAMPLE_TIMESTAMP.minusSeconds(SECONDS_PER_DAY).toString().substring(0, 10); // Query audits but expect no results restAuditMockMvc.perform(get("/management/audits?fromDate=" + fromDate + "&toDate=" + toDate)) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) .andExpect(header().string("X-Total-Count", "0")); } @Test public void getNonExistingAudit() throws Exception { // Get the audit restAuditMockMvc.perform(get("/management/audits/{id}", Long.MAX_VALUE)) .andExpect(status().isNotFound()); } @Test @Transactional public void testPersistentAuditEventEquals() throws Exception { TestUtil.equalsVerifier(PersistentAuditEvent.class); PersistentAuditEvent auditEvent1 = new PersistentAuditEvent(); auditEvent1.setId(1L); PersistentAuditEvent auditEvent2 = new PersistentAuditEvent(); auditEvent2.setId(auditEvent1.getId()); assertThat(auditEvent1).isEqualTo(auditEvent2); auditEvent2.setId(2L); assertThat(auditEvent1).isNotEqualTo(auditEvent2); auditEvent1.setId(null); assertThat(auditEvent1).isNotEqualTo(auditEvent2); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
4dc748f5cf36878cc0cad20e3fd4d098ab60a398
268e315a2305349e9dc97140eb7274c04512f8d5
/ParseStarterProject/src/main/java/com/parse/starter/main/StarterApplication.java
3a457b58ffacb582447d6ac22b5117a4da093154
[]
no_license
douglasjava/instagram
36f90a1e35c995c646f187d539555854b7107c22
7da30cb8941f66aea177935aaa0a098b0214bd32
refs/heads/master
2021-01-24T04:54:36.367641
2018-02-26T10:24:02
2018-02-26T10:24:02
122,952,995
0
0
null
null
null
null
UTF-8
Java
false
false
1,244
java
/* * Copyright (c) 2015-present, Parse, LLC. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ package com.parse.starter.main; import android.app.Application; import com.parse.Parse; import com.parse.ParseACL; public class StarterApplication extends Application { @Override public void onCreate() { super.onCreate(); // Habilite armazenamento local. Parse.enableLocalDatastore(this); // Codigo de configuração do App Parse.initialize(new Parse.Configuration.Builder(getApplicationContext()) .applicationId("FhF9KRTlcUy72w8uNEFhNVMLOwJB3E3ynxo2tPgd") .clientKey("zguTDkttyoebkAEncBsCgdmgEwr5Wy9jtEr5qA97") .server("https://parseapi.back4app.com/") .build() ); //ParseUser.enableAutomaticUser(); ParseACL defaultACL = new ParseACL(); // Optionally enable public read access. defaultACL.setPublicReadAccess(true); //ParseACL.setDefaultACL(defaultACL, true); } }
[ "douglasmarquesdias@hotmail.com" ]
douglasmarquesdias@hotmail.com
8c4999ca4d9c64de4ca269ec254cf7185952850e
2fa5bec661b47800575b505b2cd7d7d5c8dabc79
/spring-core/src/main/java/org/springframework/util/unit/DataUnit.java
24cc3ab7f2730d3c831506597feff2ff78160c40
[]
no_license
zhang-yan-talendbj/spring-code-study
6ff383f53aad4e382055cf5f308da000d9a838b0
b66c036aeebc7de9c5029c62f833c754025597ea
refs/heads/master
2022-02-23T15:05:36.831421
2019-09-22T03:02:05
2019-09-22T03:02:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,917
java
/* * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by 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.springframework.util.unit; import java.util.Objects; /** * A standard set of data size units. * * @author Stephane Nicoll * @since 5.1 */ public enum DataUnit { /** * Bytes. */ BYTES("B", DataSize.ofBytes(1)), /** * Kilobytes. */ KILOBYTES("KB", DataSize.ofKilobytes(1)), /** * Megabytes. */ MEGABYTES("MB", DataSize.ofMegabytes(1)), /** * Gigabytes. */ GIGABYTES("GB", DataSize.ofGigabytes(1)), /** * Terabytes. */ TERABYTES("TB", DataSize.ofTerabytes(1)); private final String suffix; private final DataSize size; DataUnit(String suffix, DataSize size) { this.suffix = suffix; this.size = size; } DataSize size() { return this.size; } /** * Return the {@link DataUnit} matching the specified {@code suffix}. * * @param suffix one of the standard suffix * @return the {@link DataUnit} matching the specified {@code suffix} * @throws IllegalArgumentException if the suffix does not match any * of this enum's constants */ public static DataUnit fromSuffix(String suffix) { for (DataUnit candidate : values()) { if (Objects.equals(candidate.suffix, suffix)) { return candidate; } } throw new IllegalArgumentException("Unknown unit '" + suffix + "'"); } }
[ "sjn@dxy.cn" ]
sjn@dxy.cn
64dcea7a8476d9dc07fdccdeb18f97aa43758c11
26f8dab16244f0c9f858b63712bb1c2649fe64fd
/src/main/java/com/bdi/sp/controller/JspConrtoller.java
1383b48ee4f16f1648af9e1af0a0274ea8cac411
[]
no_license
choimyeongkwun/bdi-sp
96281a38fb1332d190b8eadd80ae0a32a1919696
ef5519bbf1a964e8cc233c057f76201e47baffa2
refs/heads/master
2020-03-31T16:53:22.205870
2018-10-10T09:20:44
2018-10-10T09:20:44
152,396,535
0
0
null
null
null
null
UTF-8
Java
false
false
496
java
package com.bdi.sp.controller; import javax.servlet.http.HttpServletRequest; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @Controller public class JspConrtoller { @RequestMapping(value="/uri/**",method=RequestMethod.GET) public String goPage(HttpServletRequest req) { String uri = req.getRequestURI(); return uri.replace("/uri/",""); } }
[ "KOITT@KOITT-PC" ]
KOITT@KOITT-PC
23f68840a28bd76e4f92eb5aeb2a5aeede6dcc8f
f00102f5116a3d83bf85fdf1c877051197cef52d
/2StudentBySchool/src/main/java/com/howtodoinjava/xml/school/StudentBySchoolRequest.java
ea9dfa10c394d1787928ba2bf32e15f0f7515fe1
[]
no_license
cffyy/soapMicroserviceCommunication
05817f0d8fd9be264515f2571bf3379626c14499
21cdb6cc0898e7e1d06fb6ea1e97aefd0bccfd7d
refs/heads/master
2023-03-20T06:51:33.907962
2021-03-15T08:19:27
2021-03-15T08:19:27
346,831,738
0
0
null
null
null
null
UTF-8
Java
false
false
1,847
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2021.03.13 at 01:15:19 AM IST // package com.howtodoinjava.xml.school; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="schoolName" type="{http://www.w3.org/2001/XMLSchema}string"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "schoolName" }) @XmlRootElement(name = "StudentBySchoolRequest") public class StudentBySchoolRequest { @XmlElement(required = true) protected String schoolName; /** * Gets the value of the schoolName property. * * @return * possible object is * {@link String } * */ public String getSchoolName() { return schoolName; } /** * Sets the value of the schoolName property. * * @param value * allowed object is * {@link String } * */ public void setSchoolName(String value) { this.schoolName = value; } }
[ "=" ]
=
69f5675019e4cd4960f6def3392a155eb9129d40
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/actorapp--actor-platform/f8360cdc681b0d236618a4791dc78e494dd31674/before/Utils.java
aa38163e5a56167fff6721c6a618f808c724e802
[]
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
2,976
java
package im.actor.model.droidkit.bser; import im.actor.model.crypto.CryptoUtils; import java.io.IOException; import java.io.UnsupportedEncodingException; /** * Created by ex3ndr on 01.03.15. */ public final class Utils { public static int convertInt(long val) throws IOException { if (val < Integer.MIN_VALUE) { throw new IOException("Too small value"); } else if (val > Integer.MAX_VALUE) { throw new IOException("Too big value"); } return (int) val; } public static String convertString(byte[] data) throws IOException { if (data == null) { return null; } else { return new String(data, "utf-8"); } } public static String byteArrayToString(byte[] data) { if (data == null) { return "null"; } else { return CryptoUtils.hex(data); } } public static String byteArrayToStringCompact(byte[] data) { if (data == null) { return "null"; } else { return CryptoUtils.hex(CryptoUtils.MD5(data)); } } public static byte[] intToBytes(int v) { byte[] data = new byte[4]; int offset = 0; data[offset++] = (byte) ((v >> 24) & 0xFF); data[offset++] = (byte) ((v >> 16) & 0xFF); data[offset++] = (byte) ((v >> 8) & 0xFF); data[offset++] = (byte) (v & 0xFF); return data; } public static long bytesToInt(byte[] data) { int offset = 0; int a1 = data[offset + 3] & 0xFF; int a2 = data[offset + 2] & 0xFF; int a3 = data[offset + 1] & 0xFF; int a4 = data[offset + 0] & 0xFF; return (a1) + (a2 << 8) + (a3 << 16) + (a4 << 24); } public static byte[] longToBytes(long v) { byte[] data = new byte[8]; int offset = 0; data[offset++] = (byte) ((v >> 56) & 0xFF); data[offset++] = (byte) ((v >> 48) & 0xFF); data[offset++] = (byte) ((v >> 40) & 0xFF); data[offset++] = (byte) ((v >> 32) & 0xFF); data[offset++] = (byte) ((v >> 24) & 0xFF); data[offset++] = (byte) ((v >> 16) & 0xFF); data[offset++] = (byte) ((v >> 8) & 0xFF); data[offset++] = (byte) (v & 0xFF); return data; } public static long bytesToLong(byte[] data) { int offset = 0; long a1 = data[offset + 3] & 0xFF; long a2 = data[offset + 2] & 0xFF; long a3 = data[offset + 1] & 0xFF; long a4 = data[offset + 0] & 0xFF; long res1 = (a1) + (a2 << 8) + (a3 << 16) + (a4 << 24); offset += 4; long b1 = data[offset + 3] & 0xFF; long b2 = data[offset + 2] & 0xFF; long b3 = data[offset + 1] & 0xFF; long b4 = data[offset + 0] & 0xFF; long res2 = (b1) + (b2 << 8) + (b3 << 16) + (b4 << 24); offset += 4; return res2 + (res1 << 32); } private Utils() { } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
11cdf596d8e3e8383b60e2d7e1812c3daa1e91eb
a4360286c54186934b619dad3863a7775e6e61dc
/openbravo/modules/org.openbravo.retail.posterminal/src/org/openbravo/retail/posterminal/security/InstanceActivationExtensions.java
b2fe7be59f94dec85b1449f886cd456832206649
[]
no_license
Abdielja/Openbravo
1f31a284e2d8cff5b50769237732d7236f5d9ab2
51dd54967f88b7f647f69b8dd5981991b5843df2
refs/heads/master
2020-04-06T04:28:50.112404
2016-10-25T14:24:34
2016-10-25T14:24:34
71,905,018
0
3
null
null
null
null
UTF-8
Java
false
false
3,818
java
/* ************************************************************************************ * Copyright (C) 2015 Openbravo S.L.U. * Licensed under the Openbravo Commercial License version 1.0 * You may obtain a copy of the License at http://www.openbravo.com/legal/obcl.html * or in the legal folder of this module distribution. ************************************************************************************ */ package org.openbravo.retail.posterminal.security; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.openbravo.base.secureApp.VariablesSecureApp; import org.openbravo.base.weld.WeldUtils; import org.openbravo.dal.service.OBDal; import org.openbravo.erpCommon.ad_forms.InstanceManagement; import org.openbravo.erpCommon.obps.ActivationKey; import org.openbravo.erpCommon.utility.OBError; import org.openbravo.erpCommon.utility.OBMessageUtils; import org.openbravo.erpCommon.utility.Utility; import org.openbravo.xmlEngine.XmlDocument; /** * Extends Activation Window by adding a "Deactivate all POS Terminals" process that is shown in * case of license violation due to exceeded number of Terminals * * @author alostale * */ @SuppressWarnings("serial") public class InstanceActivationExtensions extends InstanceManagement { @Override public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { VariablesSecureApp vars = new VariablesSecureApp(request); if (vars.commandIn("SHOW_DEACTIVATE_TERMINALS")) { printPageDeactivateTerminals(response, vars); } else if (vars.commandIn("DEACTIVATE_TERMINALS")) { deactivateProcess(vars); printPageClosePopUp(response, vars, "../ad_forms/InstanceManagement.html"); } else { super.doPost(request, response); } } private void deactivateProcess(VariablesSecureApp vars) { OBError msg = new OBError(); try { ActivationKey ak = ActivationKey.getInstance(); int deactivatedTerminals = OBDal.getInstance().getSession() .createQuery("update OBPOS_Applications set active = false where active = true") .executeUpdate(); POSLicenseRestrictions r = WeldUtils .getInstanceFromStaticBeanManager(POSLicenseRestrictions.class); r.resetNumberOfTerminals(); log4j.info("Deactivated " + deactivatedTerminals + " POS Terminals"); msg.setType("Success"); msg.setTitle(Utility.messageBD(this, "OBPOS_AllTermianlsDeactivatedTitle", vars.getLanguage())); msg.setMessage(OBMessageUtils.getI18NMessage("OBPOS_AllTermianlsDeactivatedMsg", new String[] { Integer.toString(deactivatedTerminals), ak.getAllowedPosTerminals().toString() })); } catch (Exception e) { log4j.error("Error deactivating POS Terminals", e); msg.setType("Error"); msg.setMessage(Utility.parseTranslation(this, vars, vars.getLanguage(), e.getMessage())); } vars.setMessage("InstanceManagement", msg); } private void printPageDeactivateTerminals(HttpServletResponse response, VariablesSecureApp vars) throws IOException { XmlDocument xmlDocument = xmlEngine.readXmlTemplate( "org/openbravo/retail/posterminal/security/DeactivateTerminals").createXmlDocument(); response.setContentType("text/html; charset=UTF-8"); xmlDocument.setParameter("directory", "var baseDirectory = \"" + strReplaceWith + "/\";\n"); xmlDocument.setParameter("language", "defaultLang=\"" + vars.getLanguage() + "\";"); xmlDocument.setParameter("theme", vars.getTheme()); final PrintWriter out = response.getWriter(); out.println(xmlDocument.print()); out.close(); } }
[ "abdielja@hotmail.com" ]
abdielja@hotmail.com
0b54ca975564f5a5931ae895d44a74d10c8032c7
f41a3a275f437ba163164f54648ed9f94665a274
/src/main/java/lucia/net/NetworkBuilder.java
6412982216e3e2bec56dff37589e4c81db0326d7
[]
no_license
Speuce/SL2020
ba7ded99ed45093f3858c055b8cc842474f5600d
721021f2cc7b5bc2721feb7dea51cb7ea7f312c8
refs/heads/master
2023-04-15T18:26:37.634940
2020-05-24T22:33:37
2020-05-24T22:33:37
259,719,109
0
0
null
null
null
null
UTF-8
Java
false
false
6,325
java
package main.java.lucia.net; import io.netty.bootstrap.Bootstrap; import io.netty.channel.Channel; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelFutureListener; import io.netty.channel.EventLoopGroup; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.nio.NioSocketChannel; import io.netty.util.HashedWheelTimer; import io.netty.util.Timer; import io.netty.util.TimerTask; import main.java.lucia.Client; import main.java.lucia.client.Engine; import main.java.lucia.consts.ClientConstants; import main.java.lucia.net.channel.ClientPipelineInitializer; import main.java.lucia.net.packet.OutgoingPacket; import main.java.lucia.net.packet.impl.outgoing.PacketSender; import main.java.lucia.net.packet.impl.outgoing.codec.OutgoingHandshakePacket; import java.util.concurrent.TimeUnit; /** * The network builder * * @author Brett Downey */ public class NetworkBuilder implements Runnable { /** * A flag representing if this NetworkBuilder is dead, since the network may shutdown in two * different states, this is here to keep track of which state it is shutting down from. */ public static boolean isDead; /** * The reconnect delay for this Network. */ private static final int RECONNECT_DELAY = 3000; /** * The timer associated to this network */ private static Timer timer = new HashedWheelTimer(); /** * The flag which indicates if this network has been shut down. */ private boolean shutdown; /** * The EventLoopGroup associated with this NetworkBuilder. */ private static EventLoopGroup group; /** * The Bootstrap associated with this NetworkBuilder. */ private Bootstrap bootstrap; /** * The connected status of the network. */ private boolean connected; /** * The status of if the network builder is currently attempting to connect. */ private boolean connecting; /** * The message sender service associated with this network connection. */ private PacketSender senderService; /** * The channel associated with this NetworkBuilder. */ private Channel client; /** * Returns the client to server connection status * * @return True if connection, false otherwise */ public boolean isConnected() { return connected; } /** * Connects this Network builder to the server using Netty, and if a successful connection occurs, * then establish the PacketSender. */ @Override public void run() { if (shutdown || connected || connecting || !ClientConstants.ENABLE_NET) { return; } if (group != null && !group.isShutdown()) { group.shutdownGracefully(); } initializeValues(); connecting = true; try { ChannelFuture connection = bootstrap.connect(); connection.awaitUninterruptibly(); assert connection.isDone(); if (connection.isSuccess()) { connected = true; } else { Client.logger.info( "Failed to connect, re-attempting connection in " + RECONNECT_DELAY + " milliseconds."); TimerTask timerTask = timeout -> { connecting = false; run(); }; timer.newTimeout(timerTask, RECONNECT_DELAY, TimeUnit.MILLISECONDS); } } catch (Exception e) { Client.logger.error("Failed to run to the server!", e); } } public void buildPacketSender() { senderService = new PacketSender(client); PacketSender.setCurrentPacketSender(senderService); } /** * initialize the values associated with this NetworkBuilder. */ private void initializeValues() { connected = false; senderService = null; group = new NioEventLoopGroup(); bootstrap = new Bootstrap() .group(group) .channel(NioSocketChannel.class) .remoteAddress(ClientConstants.HOST, ClientConstants.PORT) .handler(new ClientPipelineInitializer(this)); } /** * Sends an outgoing packet. * * @param packet The outgoing packet */ public void sendMessage(OutgoingPacket packet) { senderService.sendMessage(packet); } public void setClient(Channel client) { this.client = client; } /** * Sends the initial message, which confirms the senderService has been activated and a {@link * NullPointerException} doesn't occur. * * @param outgoingHandshakePacket The outgoing packet */ public void sendInitialMessage(OutgoingHandshakePacket outgoingHandshakePacket) { try { Client.logger.info("Sending handshake packet"); sendMessage(outgoingHandshakePacket); } catch (Exception e) { Client.logger.error("A fatal exception occurred while sending the initial message", e); } } /** * Checks a given echo ID with the engine. * * @param codeId The codeID */ public void checkId(int codeId) { Engine.getEchoedCodes().add(codeId); } /** * Attempts to resend messages which have not been echoed back by the server. */ public void attemptResend() { if (senderService != null) { senderService.reattemptFailedMessages(); } } /** * Processes the echo code ID returned by the server. * * @param codeId The echo code ID */ public void processCodeId(int codeId) { senderService.echoedCodeProcess(codeId); } /** * Shuts down the network */ public void shutDownGracefully(int errorCode) { if (errorCode != -1) { shutdown = true; } PacketSender.setCurrentPacketSender(null); connected = false; if (client != null) { ChannelFuture channelFuture = client.closeFuture(); channelFuture.addListener((ChannelFutureListener) channelFuture1 -> { Client.logger.info("The network has successfully shutdown"); if (errorCode != -1) { Client.finalizeShutdown(errorCode); } }); client.close(); group.shutdownGracefully(); } else if (errorCode != -1) { group.shutdownGracefully(); isDead = true; } Client.logger.info("The network has successfully finished it's cleanup protocol"); if (!shutdown) { TimerTask timerTask = timeout -> { connecting = false; run(); }; timer.newTimeout(timerTask, RECONNECT_DELAY, TimeUnit.MILLISECONDS); } else { timer.stop(); } } }
[ "mrk5199@gmail.com" ]
mrk5199@gmail.com
ae72429bc99382dc8653c54a56d7531b13c7a054
178f3299d250c8618955cde711a6dc83700a053a
/subjects/sapienz-study-2/fillup/src/com/github/wdkapps/fillup/FractionalCurrencyFormatter.java
161e889cc660701b7f8e319f273d7d7c8c9bd846
[ "BSD-3-Clause", "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
FlyingPumba/evolutiz
cffe8c5da35562e7924f5d8d217e48a833c78044
521515dbd172bed10d95af3364a59340ddd24027
refs/heads/master
2022-08-18T09:21:25.014692
2021-08-28T01:21:09
2021-08-28T01:21:09
133,412,307
3
1
NOASSERTION
2022-06-21T21:23:16
2018-05-14T19:37:25
Java
UTF-8
Java
false
false
1,699
java
/* * ***************************************************************************** * Copyright 2014 William D. Kraemer * * 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.github.wdkapps.fillup; /** * DESCRIPTION: * A formatter for currency values as text Strings for a specified currency/locale * with an extract fraction digit (i.e. tenths of a cent). */ public class FractionalCurrencyFormatter extends CurrencyFormatter { private static final long serialVersionUID = 2099731379764621534L; /** * DESCRIPTION: * Constructs an instance of FractionalCurrencyFormatter. * @param numeric - true = numeric formatter, false = symbolic formatter */ public FractionalCurrencyFormatter(boolean numeric) { super(numeric); } /** * DESCRIPTION: * Determine the maximum number of fraction digits to display for locale. * @return number of digits */ @Override protected int getMaximumFractionDigits() { // add an extra fractional digit (i.e. "tenth of a cent") return super.getMaximumFractionDigits() + 1; } }
[ "iarcuschin@gmail.com" ]
iarcuschin@gmail.com
0ebcd8e594ebe219d163387379383635e23c4db1
33732138260c6aaf132bc2d0d46b2f47efce00a6
/Ex04_Layout2/app/src/main/java/com/study/android/ex04_layout2/MainActivity.java
36a8f3c6be167ef2806dba1507adce59308d7a11
[]
no_license
skyies12/Android
035382b873b9671c538c578899e967f07d1f166a
d05e0a07a17976d6696afcdf6d67a7cc06edc916
refs/heads/master
2020-05-03T18:42:38.973222
2019-04-26T09:34:25
2019-04-26T09:34:25
178,769,252
0
0
null
null
null
null
UTF-8
Java
false
false
1,637
java
package com.study.android.ex04_layout2; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.support.v7.widget.ViewUtils; import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; public class MainActivity extends AppCompatActivity { LinearLayout layout1; LinearLayout layout2; LinearLayout layout3; ImageView imageView; boolean imageSelected; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activitymain); layout1 = findViewById(R.id.layout1); layout2 = findViewById(R.id.layout2); layout3 = findViewById(R.id.layout3); imageView = findViewById(R.id.imageView); imageSelected = false; } public void btn1Clicked(View v) { layout1.setVisibility(View.VISIBLE); layout2.setVisibility(View.GONE); layout3.setVisibility(View.GONE); } public void btn2Clicked(View v) { layout1.setVisibility(View.GONE); layout2.setVisibility(View.VISIBLE); layout3.setVisibility(View.GONE); } public void btn3Clicked(View v) { layout1.setVisibility(View.GONE); layout2.setVisibility(View.GONE); layout3.setVisibility(View.VISIBLE); } public void btn6Clicked(View v) { if(imageSelected) { imageView.setImageResource(R.drawable.house); imageSelected = false; } else { imageView.setImageResource(R.drawable.car); imageSelected = true; } } }
[ "skyies12@naver.com" ]
skyies12@naver.com
9e70af5ae8f89a3111fd19aa329ee94e0a49abfb
b0cfc6a9fedf0ca386bd38a1ab4810a367e8e897
/sdk/sdk-core/aar/src/main/java/mil/emp3/core/utils/milstd2525/icons/IBitmapCache.java
fd068f14821f7a8a6788a8edea37f97f576f3f83
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
mil-oss/emp3-android
757e9337426f1f89d1fad99979349fddc8ba6065
12f4bceee8bd73e69ceae3de691791947bb1c5c5
refs/heads/development
2020-05-22T15:43:23.091595
2017-03-10T13:15:13
2017-03-10T13:15:13
84,700,454
0
0
null
2017-03-12T04:43:59
2017-03-12T04:43:59
null
UTF-8
Java
false
false
1,497
java
package mil.emp3.core.utils.milstd2525.icons; import android.util.SparseArray; import mil.emp3.api.interfaces.IMap; import mil.emp3.mapengine.interfaces.IEmpImageInfo; /** * Created by deepakkarmarkar on 7/26/2016. */ public interface IBitmapCache { /** * Clears bitmap cache. */ void clearCache(); /** * Fetched the Bitmap that represents the icon that will be drawn on the map. Searched the cache before building * a brand new Bitmap. * @param sSymbolCode * @param oModifiers * @param oAttr * @return */ IEmpImageInfo getImageInfo(String sSymbolCode, SparseArray oModifiers, SparseArray oAttr); /** * Stores the supplied midDistanceThreshold. * Returns true if new setting can be applied to MapInstance without affecting the BitmapCache adversely * @param clientMap * @param midDistanceThreshold * @return */ boolean setMidDistanceThreshold(IMap clientMap, double midDistanceThreshold); /** * Returns true if algorithm that adjusts Mid Distance Threshold is enabled else returns false * @return */ boolean getAlgorithmStatus(); /** * Turns on/off algorithm to adjust Mid Distance Threshold. * @param enable * @return */ void setAlgorithmStatus(boolean enable); /** * This is the value returned from getClassMemory or getLargeClassMemory * @param availableMB */ void setTotalAvailableMemory(int availableMB); }
[ "im.rivera@comcast.net" ]
im.rivera@comcast.net
97e4879de62c20571761d17fa3740526e599bae5
3a59bd4f3c7841a60444bb5af6c859dd2fe7b355
/sources/com/google/android/gms/internal/ads/zzauj.java
276599a9df9515c4b55083361c5c9d8ec6e4b4e1
[]
no_license
sengeiou/KnowAndGo-android-thunkable
65ac6882af9b52aac4f5a4999e095eaae4da3c7f
39e809d0bbbe9a743253bed99b8209679ad449c9
refs/heads/master
2023-01-01T02:20:01.680570
2020-10-22T04:35:27
2020-10-22T04:35:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,057
java
package com.google.android.gms.internal.ads; import android.content.Context; import android.os.IBinder; import android.os.IInterface; import android.os.RemoteException; import com.google.android.gms.dynamic.ObjectWrapper; @zzard public final class zzauj { public static zzatt zzd(Context context, String str, zzamp zzamp) { try { IBinder zzd = ((zzatz) zzbae.zza(context, "com.google.android.gms.ads.rewarded.ChimeraRewardedAdCreatorImpl", zzauk.zzbzd)).zzd(ObjectWrapper.wrap(context), str, zzamp, 15000000); if (zzd == null) { return null; } IInterface queryLocalInterface = zzd.queryLocalInterface("com.google.android.gms.ads.internal.rewarded.client.IRewardedAd"); if (queryLocalInterface instanceof zzatt) { return (zzatt) queryLocalInterface; } return new zzatv(zzd); } catch (RemoteException | zzbag e) { zzbad.zze("#007 Could not call remote method.", e); return null; } } }
[ "joshuahj.tsao@gmail.com" ]
joshuahj.tsao@gmail.com
f0a48afc3ee1c2e846007e2eea8c9b27e2a9719c
964c848596ae9b663d7519d622213adb56c8190a
/src/main/java/dev/mvc/qna/QnaProcInter.java
8f872534d525bb656d4d3b3c6ba7252fe8d17d5d
[]
no_license
Jis2nYoon/team1
65b9bbcc96340d7c0f99de181e9a875c767fbe36
e8d76d44d979549f88fb8c6d59789850c1e2031f
refs/heads/master
2022-12-29T13:51:40.539838
2019-08-05T06:06:55
2019-08-05T06:06:55
200,558,730
0
0
null
2022-12-16T09:56:01
2019-08-05T01:02:13
Java
UHC
Java
false
false
1,634
java
package dev.mvc.qna; import java.util.ArrayList; import java.util.HashMap; public interface QnaProcInter { /** * <xmp> * 공지사항 등록 * <insert id="create" parameterType="QnaVO"> * </xmp> * @param qnaVO * @return 등록된 레코드 갯수 */ public int create(QnaVO qnaVO); /** * <xmp> * 목록 * <select id="list" resultType="Mem_QnaVO"> * </xmp> * @return ArrayList<Mem_QnaVO> */ public ArrayList<Mem_QnaVO> list(); /** * 파일명의 갯수만큼 FileVO 객체를 만들어 리턴 * @param contentsVO * @return */ public ArrayList<QnaFileVO> getThumbs(Mem_QnaVO mem_QnaVO); /** * <xmp> * 조회 * <select id="read" resultType="Mem_QnaVO" parameterType="int"> * </xmp> * @param qnano * @return 한 건의 글 */ public Mem_QnaVO read(int qnano); /** * <xmp> * 수정 * <update id="update" parameterType="QnaVO"> * </xmp> * @param qnaVO * @return */ public int update(QnaVO qnaVO); /** * <xmp> * 삭제 * <delete id="delete" parameterType="int"> * </xmp> * @param qnano * @return */ public int delete(int qnano); /** * <xmp> * 답변 순서 증가 * <update id="increaseAnsnum" parameterType="HashMap"> * </xmp> * @param map * @return */ public int increaseAnsnum(HashMap<String, Object> map); /** * <xmp> * 답변 * <insert id="reply" parameterType="QnaVO"> * </xmp> * @param qnaVO * @return */ public int reply(QnaVO qnaVO); }
[ "soldesk@soldesk-PC" ]
soldesk@soldesk-PC
c8c09e97f851fb39d7b4c06eb504314c0102b62e
98f2e3f3acba52c06a02012503ab591359215623
/app/src/main/gen/com/example/lenovo/myapplication/BuildConfig.java
b26a91ebfc1b6ef44c992d06ddf2eb6b184de76e
[]
no_license
Hmz3192/AndroidApp
49b22d03efcb5bea2ce80f508c78ea38ad2d04dd
fa3fa8d99c70c28f9d1ae9e87efa50a194c6bff3
refs/heads/master
2020-12-30T11:02:00.312430
2017-09-24T04:34:35
2017-09-24T04:34:35
98,834,789
0
0
null
null
null
null
UTF-8
Java
false
false
274
java
/*___Generated_by_IDEA___*/ package com.example.lenovo.myapplication; /* This stub is only used by the IDE. It is NOT the BuildConfig class actually packed into the APK */ public final class BuildConfig { public final static boolean DEBUG = Boolean.parseBoolean(null); }
[ "1134598796@qq.com" ]
1134598796@qq.com
26cc98ee4b1835ec343c890564917c0471a54ca6
de3c2d89f623527b35cc5dd936773f32946025d2
/src/main/java/com/jiayouya/travel/databinding/ItemSearchResultBindingImpl.java
038917b5ffd6ca11bc2553c2beb34465aea456cd
[]
no_license
ren19890419/lvxing
5f89f7b118df59fd1da06aaba43bd9b41b5da1e6
239875461cb39e58183ac54e93565ec5f7f28ddb
refs/heads/master
2023-04-15T08:56:25.048806
2020-06-05T10:46:05
2020-06-05T10:46:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,278
java
package com.jiayouya.travel.databinding; import android.util.SparseIntArray; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import androidx.constraintlayout.widget.ConstraintLayout; import androidx.databinding.DataBindingComponent; import com.jiayouya.travel.R; public class ItemSearchResultBindingImpl extends ItemSearchResultBinding { /* renamed from: f */ private static final IncludedLayouts f11159f = null; /* renamed from: g */ private static final SparseIntArray f11160g = new SparseIntArray(); /* renamed from: h */ private final ConstraintLayout f11161h; /* renamed from: i */ private long f11162i; /* access modifiers changed from: protected */ public boolean onFieldChange(int i, Object obj, int i2) { return false; } public boolean setVariable(int i, Object obj) { return true; } static { f11160g.put(R.id.iv, 1); f11160g.put(R.id.tv_title, 2); f11160g.put(R.id.tv_ticket, 3); f11160g.put(R.id.tv_num, 4); f11160g.put(R.id.tv_price, 5); } public ItemSearchResultBindingImpl(DataBindingComponent dataBindingComponent, View view) { this(dataBindingComponent, view, mapBindings(dataBindingComponent, view, 6, f11159f, f11160g)); } private ItemSearchResultBindingImpl(DataBindingComponent dataBindingComponent, View view, Object[] objArr) { super(dataBindingComponent, view, 0, (ImageView) objArr[1], (TextView) objArr[4], (TextView) objArr[5], (TextView) objArr[3], (TextView) objArr[2]); this.f11162i = -1; this.f11161h = objArr[0]; this.f11161h.setTag(null); setRootTag(view); invalidateAll(); } public void invalidateAll() { synchronized (this) { this.f11162i = 1; } requestRebind(); } public boolean hasPendingBindings() { synchronized (this) { if (this.f11162i != 0) { return true; } return false; } } /* access modifiers changed from: protected */ public void executeBindings() { synchronized (this) { long j = this.f11162i; this.f11162i = 0; } } }
[ "593746220@qq.com" ]
593746220@qq.com
4232396089b2527f981a38008934b4d18b19c3f3
861af6e8ac42ff1457413fbef1295d51d477b546
/org.goko.core/src/org/goko/core/gcode/execution/IExecutionToken.java
8c3fcc77dae67a94b38f9168eefbf3c75c29b2d9
[]
no_license
hantomas/Goko
5d7b3804edb592c7fc05a45aa287bb9e0cd74a04
9205afec77507a41f410f379b5036991199024a5
refs/heads/master
2022-01-07T06:19:15.287328
2018-08-23T20:17:03
2018-08-23T20:17:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,763
java
/******************************************************************************* * This file is part of Goko. * * Goko is free software: you can redistribute it and/or modify * it under the terms of the GNU General License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Goko 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 License for more details. * * You should have received a copy of the GNU General License * along with Goko. If not, see <http://www.gnu.org/licenses/>. *******************************************************************************/ package org.goko.core.gcode.execution; import java.util.List; import org.goko.core.common.exception.GkException; import org.goko.core.common.utils.IIdBean; import org.goko.core.gcode.element.GCodeLine; import org.goko.core.gcode.element.IGCodeProvider; /** * A standard execution pattern * @author PsyKo * */ public interface IExecutionToken<T extends IExecutionTokenState> extends IIdBean { /** * Returns the GCode provider for this token * @return the {@link IGCodeProvider} */ IGCodeProvider getGCodeProvider() throws GkException; /** * Returns the execution order of this execution token * @return the execution order */ int getExecutionOrder(); /** * Sets the execution order of this execution token * @param order the execution order */ void setExecutionOrder(int order); /** * Check if this execution token has more command * @return <code>true</code> if there is more command, <code>false</code> otherwise * @throws GkException GkException */ boolean hasMoreLine() throws GkException; /** * Returns the total number of command * @return the total number of command * @throws GkException GkException */ int getLineCount() throws GkException; /** * Returns the state of the given command * @param idCommand the id of the command * @throws GkException GkException */ T getLineState(Integer idLine) throws GkException; /** * Returns the list of line in the given state * @param state the target state * @return a list of GCodeLine * @throws GkException GkException */ List<GCodeLine> getLineByState(T state) throws GkException; /** * Returns the count of line in the given state * @param state the target state * @return an integer * @throws GkException GkException */ int getLineCountByState(T state) throws GkException; /** * Sets the state of the given command * @param idCommand id of the command * @param state the state * @throws GkException GkException */ void setLineState(Integer idLine, T state) throws GkException; /** * Returns (but does not remove) the next command to execute in this execution token * @return a GCodeCommand * @throws GkException GkException */ GCodeLine getNextLine() throws GkException; /** * Returns (and remove) the next line to execute in this execution token * @return a GCodeCommand * @throws GkException GkException */ GCodeLine takeNextLine() throws GkException; /** * Reset this token as it should be before the execution * @throws GkException GkException */ void reset() throws GkException; /** * Set the state of this token * @param state the state to set */ void setState(ExecutionState state); /** * Returns the state of this token * @return the current state */ ExecutionState getState(); }
[ "contact@goko.fr" ]
contact@goko.fr
280c887d2e4ce3532a5148ece3319ad0201401e3
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_2464487_1/java/Blackwood/Bullseye.java
228110f714fd8a97f8286d07ecd331c73e73a8bf
[]
no_license
alexandraback/datacollection
0bc67a9ace00abbc843f4912562f3a064992e0e9
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
refs/heads/master
2021-01-24T18:27:24.417992
2017-05-23T09:23:38
2017-05-23T09:23:38
84,313,442
2
4
null
null
null
null
UTF-8
Java
false
false
1,420
java
import java.io.BufferedWriter; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedList; import java.util.Scanner; public class Bullseye { public static void main(String[] args) throws IOException { BufferedWriter bw; FileOutputStream fos = new FileOutputStream("C:\\Users\\Administrator\\Downloads\\codejam.out"); bw = new BufferedWriter(new OutputStreamWriter(fos)); Scanner reader = new Scanner (System.in); int nCases = reader.nextInt(); reader.nextLine(); for(int i=1; i<=nCases; i++) { long r = reader.nextLong(); long t = reader.nextLong(); long n = 1; long lastN = n; while(true) { if(compute(n, r) > t) { break; } lastN = n; n *= 2; } long result = 1; long mid = 0; while(true) { if(n - lastN <= 1) { result = lastN; break; } mid = (n + lastN) / 2; long res = compute(mid, r); if(res > t) { n = mid; } else if (res < t) { lastN = mid; } else { result = mid; break; } } String line ="Case #" + i + ": " + result; //System.out.println(line); bw.write(line); bw.newLine(); } bw.close(); } private static long compute(long n, long r) { return 2 * n * n - n + 2 * n * r; } }
[ "eewestman@gmail.com" ]
eewestman@gmail.com
7e914512f6317d7d435c55f607fa286b0b56c3c5
5dc3650814f32e89fa7b1ce3f35e852c56c7aff8
/src/com/proteus/cgen/verilogprime/ext/Enable_terminalContextExt.java
97e42778d7957e99556a8041f05f603b5be22746
[]
no_license
sureshgl/Verilog-Parser
3beda56a12f9d8e8110b225a090c73c8e7d6a850
6981223d8e5dc6b3da56acc6f17c28e12c7e6d47
refs/heads/master
2020-12-24T11:47:11.340855
2017-03-21T19:22:58
2017-03-21T19:22:58
85,744,141
1
0
null
null
null
null
UTF-8
Java
false
false
1,045
java
package com.proteus.cgen.verilogprime.ext; import org.antlr.v4.runtime.ParserRuleContext; import lombok.Getter; import com.proteus.cgen.verilogprime.PopulateExtendedContextVisitor; import com.proteus.cgen.verilogprime.gen.VerilogPrimeParser.Enable_terminalContext; public class Enable_terminalContextExt extends AbstractBaseExt{ @Getter private Enable_terminalContext ctx; public Enable_terminalContextExt(Enable_terminalContext ctx) { this.ctx = ctx; } @Override public ParserRuleContext getContext(){ return ctx; } @Override public ParserRuleContext getContext(String str){ return new PopulateExtendedContextVisitor().visit(getPrimeParser(str).enable_terminal()); } @Override public void setContext(ParserRuleContext ctx){ if(ctx != null){ if(ctx instanceof Enable_terminalContext){ this.ctx = (Enable_terminalContext) ctx; } else { throw new ClassCastException(ctx.getClass().getSimpleName() + " cannot be cased to "+Enable_terminalContext.class.getName()); } } else { this.ctx= null; } } }
[ "suresh.goduguluru@gmail.com" ]
suresh.goduguluru@gmail.com
078291bc4b6eaf341f70e268c7a1be9cab73fe92
f43504b11e935796128f07ab166e7d47a248f204
/Low_level_Design_Problems/SystemDesign/SnakeAndLadder/DiceService.java
829d8b27565efc080a573f0654d5f0fb4de7487f
[]
no_license
vish35/LLD
4e3b4b6a22e334e1ab69871e5ded526613bb73f8
1d8f209213f74395fc1121a5862ce2a467b09f94
refs/heads/main
2023-07-30T09:10:39.696754
2021-09-15T05:46:45
2021-09-15T05:46:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
287
java
package SystemDesign.SnakeAndLadder; import java.util.Random; public class DiceService { public static int roll() { return new Random().nextInt(6) + 1; // The game will have a six sided dice numbered from 1 to 6 and will always give a random number on rolling it. } }
[ "gowtkum@amazon.com" ]
gowtkum@amazon.com
da0df5fa9ed7aea9f75028a0f6e44f00ae509567
d94e0a114353705d40cad8c9b162d26e8ab824ea
/src/main/java/com/github/petdate/petdateapp/repository/PetRepository.java
5c8c6cdaa5e1e5bab83ddf0233cc1fcef9e5a846
[]
no_license
jvogit/pet-date-app
b69fb70f02532fd19b568a6956570a54a891f729
ddb6c2d3efb0fdf696f425acb1061bf5ceccf62d
refs/heads/master
2023-03-06T08:27:42.727317
2021-02-21T17:49:04
2021-02-21T17:49:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
536
java
package com.github.petdate.petdateapp.repository; import java.util.List; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import com.github.petdate.petdateapp.entity.pet.Pet; @Repository public interface PetRepository extends JpaRepository<Pet, Long> { public List<Pet> findAllByuserId(Long user_id); public Page<Pet> findAllByuserIdNot(Long user_id, Pageable page); }
[ "justinxvopro@gmail.com" ]
justinxvopro@gmail.com
b06a6817c2bbb1dc9b270b3ec5ec61ee4df9b5ba
78aa654b019f6766fa01030c8a1b4a700a3f1acf
/watano-codegen/src/main/java/com/watano/util/codegen/ModeCodeGen.java
396573535c361dd9682364b4dd7bfa9330fcf8fe
[]
no_license
watano/watano-utils
aa540a8763e3292eabc7d0a0f4a867e80f633ec4
b1ab838ea36bcf86a870c8ee60a820a8490fdab4
refs/heads/master
2016-08-04T02:26:51.669771
2012-05-23T07:28:55
2012-05-23T07:28:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,148
java
package com.watano.util.codegen; import java.io.IOException; import java.util.Arrays; import java.util.Map; import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.watano.util.lang.ArgCheck; public class ModeCodeGen extends BaseCodeGen { private static final Logger LOG = LoggerFactory.getLogger(ModeCodeGen.class); public void gen(String mode, String... args) throws IOException { buildParams(); // inifiles String[] inifiles = codegenini.getValues("inifiles", mode); if (inifiles != null && inifiles.length > 0) { addIniFiles(inifiles); } // params String[] extparams = codegenini.getValues("params", mode); if (extparams != null && extparams.length > 0 && extparams.length % 2 == 0) { for (int i = 0; i < extparams.length; i = i + 2) { params.put(extparams[i], extparams[i + 1]); } } // args: put cmd line args into params by names String[] extargs = codegenini.getValues("args", mode); if (extargs != null && extargs.length > 0) { for (int i = 0; i < extargs.length; i++) { params.put(extargs[i], args[i]); } } // preprocess String[] asserts = codegenini.getValues("preprocess", mode); if (asserts != null && asserts.length > 0) { for (String a : asserts) { if ("assertPom".equalsIgnoreCase(a.trim())) { assertPom(params); } if ("javaNames".equalsIgnoreCase(a.trim())) { javaNames(params); } } } // encoding String[] tpls = codegenini.getValues("tpls", mode); if (tpls != null && tpls.length > 0) { for (String tpl : tpls) { gen(tpl); } } } public static void main(String[] args) { try { ArgCheck.checkState(args != null && args.length > 0, "codegen need more than one arg!"); ModeCodeGen codegen = new ModeCodeGen(); codegen.init(".\\codegen.ini"); codegen.gen(args[0], Arrays.copyOfRange(args, 1, args.length)); } catch (Throwable e) { LOG.error(e.getMessage(), e); } } private void assertPom(Map<String, Object> p) { // artifacts Map<String, Object> artifacts = (Map<String, Object>) p.get("artifacts"); ArgCheck.checkNotNull(artifacts); for (String key : artifacts.keySet()) { String[] artifactInfo = ((String) artifacts.get(key)).split(",", 3); ArgCheck.checkNotNull(artifactInfo); ArgCheck.checkState(artifactInfo.length > 0); if (artifactInfo.length == 1) { artifactInfo = new String[] { artifactInfo[0], "", "" }; } else if (artifactInfo.length == 2) { artifactInfo = new String[] { artifactInfo[0], artifactInfo[1], "" }; } else if (artifactInfo.length > 3) { artifactInfo = new String[] { artifactInfo[0], artifactInfo[1], artifactInfo[2] }; } ArgCheck.checkState(ArrayUtils.contains(new String[] { "", "test", "provided", "runtime" }, artifactInfo[1]), artifactInfo[0] + ":" + artifactInfo[1]); artifacts.put(key, artifactInfo); } // dependencies Map<String, String> dependencies = (Map<String, String>) p.get("dependencies"); ArgCheck.checkNotNull(dependencies); for (String key : dependencies.keySet()) { ArgCheck.checkNotNull(artifacts.get(key), "dependencies[" + key + "] not find!"); } // plugins Map<String, String> plugins = (Map<String, String>) p.get("plugins"); ArgCheck.checkNotNull(plugins); for (String key : plugins.keySet()) { ArgCheck.checkNotNull(artifacts.get(key), "plugins[" + key + "] not find!"); } // exclusions Map<String, Object> exclusions = (Map<String, Object>) p.get("exclusions"); if (exclusions != null && exclusions.size() > 0) { for (String exclusion : exclusions.keySet()) { ArgCheck.checkNotNull(artifacts.get(exclusion), "exclusion[" + exclusion + "] not find!"); String[] exclusioninfo = StringUtils.split(exclusions.get(exclusion).toString(), ','); if (exclusioninfo != null && exclusioninfo.length > 0) { for (String item : exclusioninfo) { ArgCheck.checkNotNull(artifacts.get(item), item + " for exclusion[" + exclusion + "] not find!"); } } exclusions.put(exclusion, exclusioninfo); } } // configurations Map<String, String> configurations = (Map<String, String>) p.get("configurations"); ArgCheck.checkNotNull(configurations); for (String key : configurations.keySet()) { ArgCheck.checkNotNull(artifacts.get(key), "configuration[" + key + "] not find!"); } ArgCheck.checkNotNull("groupId"); ArgCheck.checkNotNull("artifactId"); ArgCheck.checkNotNull("packaging"); ArgCheck.checkNotNull("version"); } private void javaNames(Map<String, Object> p) { for (String t : new String[] { "base_package", "package" }) { String t_value = (String) p.get(t); if (t_value != null) { p.put("j" + t, t_value); p.put(t, t_value.replace('.', '\\')); } } for (String t : new String[] { "url" }) { String t_value = (String) p.get(t); if (t_value != null) { p.put(t, t_value); p.put("j" + t, t_value.replace('/', '.')); } } } }
[ "watano@qq.com" ]
watano@qq.com
1967ceb8f9fc24cf5e0c6c960e725ecfcf5d5c87
0a4710d75f8256da50bfb62ac538e7e7baec0651
/LeetCode/src/johnny/algorithm/leetcode/Solution110.java
8a8a6a4252fe7c79d60a87b7e77da8584e16008d
[]
no_license
tuyen03a128/algorithm-java-jojozhuang
4bacbe8ce0497e6b2851b184e0b42ee34c904f95
5ca9f4ae711211689b2eb92dfddec482a062d537
refs/heads/master
2020-04-25T09:05:32.723463
2019-02-24T17:32:30
2019-02-24T17:32:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,349
java
package johnny.algorithm.leetcode; import johnny.algorithm.leetcode.common.TreeNode; /** * Balanced Binary Tree. * * Given a binary tree, determine if it is height-balanced. * For this problem, a height-balanced binary tree is defined as a binary tree * in which the depth of the two subtrees of every node never differ by more * than 1. * * @author Johnny */ public class Solution110 { public boolean isBalanced(TreeNode root) { return (maxDepth(root) != -1); } private int maxDepth(TreeNode root) { if (root == null) { return 0; } int left = maxDepth(root.left); int right = maxDepth(root.right); if (left == -1 || right == -1 || Math.abs(left - right) > 1) { return -1; } return Math.max(left, right) + 1; } /* public boolean isBalanced(TreeNode root) { return (maxDepth(root) - minDepth(root) <= 1); } private int maxDepth(TreeNode root) { if (root == null) { return 0; } return 1 + Math.max(maxDepth(root.left), maxDepth(root.right)); } private int minDepth(TreeNode root) { if (root == null) { return 0; } return 1 + Math.min(minDepth(root.left), minDepth(root.right)); }*/ }
[ "jojozhuang@gmail.com" ]
jojozhuang@gmail.com
9e2ffd95c8b055f498f6233b6d1cf1b893e59712
e27942cce249f7d62b7dc8c9b86cd40391c1ddd4
/modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201708/cm/InternalApiError.java
ea28a9a4805fa80f1432561e2052037f9b8c9cfa
[ "Apache-2.0" ]
permissive
mo4ss/googleads-java-lib
b4b6178747d25d16ae6aa0c80d80ee18a2dfe01a
efaa9c3bd8a46a3ed4b00963dc9760c6dd8bd641
refs/heads/master
2022-12-05T00:30:56.740813
2022-11-16T10:47:15
2022-11-16T10:47:15
108,132,394
0
0
Apache-2.0
2022-11-16T10:47:16
2017-10-24T13:41:43
Java
UTF-8
Java
false
false
5,720
java
// Copyright 2017 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. /** * InternalApiError.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter. */ package com.google.api.ads.adwords.axis.v201708.cm; /** * Indicates that a server-side error has occured. {@code InternalApiError}s * are generally not the result of an invalid request or message sent * by the * client. */ public class InternalApiError extends com.google.api.ads.adwords.axis.v201708.cm.ApiError implements java.io.Serializable { /* The error reason represented by an enum. */ private com.google.api.ads.adwords.axis.v201708.cm.InternalApiErrorReason reason; public InternalApiError() { } public InternalApiError( java.lang.String fieldPath, com.google.api.ads.adwords.axis.v201708.cm.FieldPathElement[] fieldPathElements, java.lang.String trigger, java.lang.String errorString, java.lang.String apiErrorType, com.google.api.ads.adwords.axis.v201708.cm.InternalApiErrorReason reason) { super( fieldPath, fieldPathElements, trigger, errorString, apiErrorType); this.reason = reason; } @Override public String toString() { return com.google.common.base.MoreObjects.toStringHelper(this.getClass()) .omitNullValues() .add("apiErrorType", getApiErrorType()) .add("errorString", getErrorString()) .add("fieldPath", getFieldPath()) .add("fieldPathElements", getFieldPathElements()) .add("reason", getReason()) .add("trigger", getTrigger()) .toString(); } /** * Gets the reason value for this InternalApiError. * * @return reason * The error reason represented by an enum. */ public com.google.api.ads.adwords.axis.v201708.cm.InternalApiErrorReason getReason() { return reason; } /** * Sets the reason value for this InternalApiError. * * @param reason * The error reason represented by an enum. */ public void setReason(com.google.api.ads.adwords.axis.v201708.cm.InternalApiErrorReason reason) { this.reason = reason; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof InternalApiError)) return false; InternalApiError other = (InternalApiError) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = super.equals(obj) && ((this.reason==null && other.getReason()==null) || (this.reason!=null && this.reason.equals(other.getReason()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = super.hashCode(); if (getReason() != null) { _hashCode += getReason().hashCode(); } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(InternalApiError.class, true); static { typeDesc.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201708", "InternalApiError")); org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("reason"); elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201708", "reason")); elemField.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201708", "InternalApiError.Reason")); elemField.setMinOccurs(0); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } /** * Get Custom Serializer */ public static org.apache.axis.encoding.Serializer getSerializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanSerializer( _javaType, _xmlType, typeDesc); } /** * Get Custom Deserializer */ public static org.apache.axis.encoding.Deserializer getDeserializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanDeserializer( _javaType, _xmlType, typeDesc); } }
[ "jradcliff@users.noreply.github.com" ]
jradcliff@users.noreply.github.com
d9f34efafabf21d3f18415767aac9ea2fe5c9d90
139960e2d7d55e71c15e6a63acb6609e142a2ace
/mobile_app1/module116/src/main/java/module116packageJava0/Foo161.java
83c0a24befd1709867d319500b15d274015f7e25
[ "Apache-2.0" ]
permissive
uber-common/android-build-eval
448bfe141b6911ad8a99268378c75217d431766f
7723bfd0b9b1056892cef1fef02314b435b086f2
refs/heads/master
2023-02-18T22:25:15.121902
2023-02-06T19:35:34
2023-02-06T19:35:34
294,831,672
83
7
Apache-2.0
2021-09-24T08:55:30
2020-09-11T23:27:37
Java
UTF-8
Java
false
false
946
java
package module116packageJava0; import java.lang.Integer; public class Foo161 { Integer int0; Integer int1; Integer int2; public void foo0() { new module116packageJava0.Foo160().foo18(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } public void foo5() { foo4(); } public void foo6() { foo5(); } public void foo7() { foo6(); } public void foo8() { foo7(); } public void foo9() { foo8(); } public void foo10() { foo9(); } public void foo11() { foo10(); } public void foo12() { foo11(); } public void foo13() { foo12(); } public void foo14() { foo13(); } public void foo15() { foo14(); } public void foo16() { foo15(); } public void foo17() { foo16(); } public void foo18() { foo17(); } }
[ "oliviern@uber.com" ]
oliviern@uber.com
bdb09084f946422464df52fded0aded5c4ef03c5
104cda8eafe0617e2a5fa1e2b9f242d78370521b
/aliyun-java-sdk-ehpc/src/main/java/com/aliyuncs/ehpc/model/v20180412/ListInvocationResultsResponse.java
e34247b97c8a884bd75e19a7fe366aecad495b09
[ "Apache-2.0" ]
permissive
SanthosheG/aliyun-openapi-java-sdk
89f9b245c1bcdff8dac0866c36ff9a261aa40684
38a910b1a7f4bdb1b0dd29601a1450efb1220f79
refs/heads/master
2020-07-24T00:00:59.491294
2019-09-09T23:00:27
2019-09-11T04:29:56
207,744,099
2
0
NOASSERTION
2019-09-11T06:55:58
2019-09-11T06:55:58
null
UTF-8
Java
false
false
3,517
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.aliyuncs.ehpc.model.v20180412; import java.util.List; import com.aliyuncs.AcsResponse; import com.aliyuncs.ehpc.transform.v20180412.ListInvocationResultsResponseUnmarshaller; import com.aliyuncs.transform.UnmarshallerContext; /** * @author auto create * @version */ public class ListInvocationResultsResponse extends AcsResponse { private String requestId; private Integer totalCount; private Integer pageNumber; private Integer pageSize; private List<InvocationResult> invocationResults; public String getRequestId() { return this.requestId; } public void setRequestId(String requestId) { this.requestId = requestId; } public Integer getTotalCount() { return this.totalCount; } public void setTotalCount(Integer totalCount) { this.totalCount = totalCount; } public Integer getPageNumber() { return this.pageNumber; } public void setPageNumber(Integer pageNumber) { this.pageNumber = pageNumber; } public Integer getPageSize() { return this.pageSize; } public void setPageSize(Integer pageSize) { this.pageSize = pageSize; } public List<InvocationResult> getInvocationResults() { return this.invocationResults; } public void setInvocationResults(List<InvocationResult> invocationResults) { this.invocationResults = invocationResults; } public static class InvocationResult { private Boolean success; private String commandId; private String instanceId; private String invokeRecordStatus; private String finishedTime; private Integer exitCode; private String message; public Boolean getSuccess() { return this.success; } public void setSuccess(Boolean success) { this.success = success; } public String getCommandId() { return this.commandId; } public void setCommandId(String commandId) { this.commandId = commandId; } public String getInstanceId() { return this.instanceId; } public void setInstanceId(String instanceId) { this.instanceId = instanceId; } public String getInvokeRecordStatus() { return this.invokeRecordStatus; } public void setInvokeRecordStatus(String invokeRecordStatus) { this.invokeRecordStatus = invokeRecordStatus; } public String getFinishedTime() { return this.finishedTime; } public void setFinishedTime(String finishedTime) { this.finishedTime = finishedTime; } public Integer getExitCode() { return this.exitCode; } public void setExitCode(Integer exitCode) { this.exitCode = exitCode; } public String getMessage() { return this.message; } public void setMessage(String message) { this.message = message; } } @Override public ListInvocationResultsResponse getInstance(UnmarshallerContext context) { return ListInvocationResultsResponseUnmarshaller.unmarshall(this, context); } }
[ "haowei.yao@alibaba-inc.com" ]
haowei.yao@alibaba-inc.com
07d90e9b504043cba16348dba678743ceff0e64e
f77d04f1e0f64a6a5e720ce24b65b1ccb3c546d2
/zyj-hec-master/zyj-hec/src/main/java/com/hand/hec/gld/service/IGldSetOfBookService.java
4e2daf7234db41ea9135714af8ccbacc624995c0
[]
no_license
floodboad/zyj-hssp
3139a4e73ec599730a67360cd04aa34bc9eaf611
dc0ef445935fa48b7a6e86522ec64da0042dc0f3
refs/heads/master
2023-05-27T21:28:01.290266
2020-01-03T06:21:59
2020-01-03T06:29:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,107
java
package com.hand.hec.gld.service; import java.util.List; import com.hand.hap.core.IRequest; import com.hand.hap.core.ProxySelf; import com.hand.hap.system.service.IBaseService; import com.hand.hec.gld.dto.GldSetOfBook; import com.hand.hec.gld.exception.GldSetOfBookException; /** * <p> * 账套定义service * </p> * * @author wuxiuxian 2019-01-07 */ public interface IGldSetOfBookService extends IBaseService<GldSetOfBook>, ProxySelf<IGldSetOfBookService> { /** * * 根据账套id查询账套是否被核算主体使用 * * @param setBooksId * @return 返回是否使用 */ Boolean judgeUsedByAccounting(Long setBooksId); /** * * 根据账套id查询账套是否被管理组织使用 * * @param setBooksId * @return 返回是否使用 */ Boolean judgeUsedByOrganization(Long setBooksId); /** * * 根据管理组织ID查询默认账套 * * @param request * @return 返回默认账套 * @author wuxiuxian */ List<GldSetOfBook> selectDefaultSobByMagOrgId(IRequest request); /** * * 汇率类型定义主页面账套查询 * * @param request * @author jialin.xing@hand-china.com 2019-01-10 16:45 * @return 查询结果 */ List<GldSetOfBook> querySetOfBookByParam(IRequest request); /** * 根据参数查找功能页面上的账套下拉框数据 * * @param request request * @param paramValue 参数值 * @return 账套列表 * @author rui.shi@hand-china.com 2019-02-21 */ List<GldSetOfBook> querySetOfBookOptionsByParamValue(IRequest request, String paramValue); /** * 根据 账套id 查询会计期间 * * @param requestContext requestContext * @param dto 账套 * @param page page * @param pageSize pageSize * @return 会计期 * @author rui.shi@hand-china.com 2019-02-21 */ List<GldSetOfBook> queryForPeriod(IRequest requestContext, GldSetOfBook dto, int page, int pageSize); /** * 新增或更新账套,并判断账套是否被使用 * * @param dto 更新或新增账套 * @param requestContext * @return 返回结果 * @throws GldSetOfBookException * @author wuxiuxian */ List<GldSetOfBook> batchSubmitGldSetOfBook(IRequest requestContext, List<GldSetOfBook> dto) throws GldSetOfBookException; /** * 根据管理组织ID查询账套值列表 * * @Author hui.zhao01@hand-china.com * @Date 2019/3/20 16:58 * @param iRequest 请求上下文 * @param magOrgId 管理组织Id * @return * @Version 1.0 **/ List<GldSetOfBook> queryByMagId(IRequest iRequest, Long magOrgId); /** * 获取核算主体默认账套 * * @author Tagin * @date 2019-03-27 19:43 * @param iRequest 请求 * @param accEntityId 核算主体 * @return com.hand.hec.gld.dto.GldSetOfBook * @version 1.0 **/ GldSetOfBook queryDftSetOffBookByAe(IRequest iRequest, Long accEntityId); }
[ "1961187382@qq.com" ]
1961187382@qq.com
9ee51f1af649e208b95da49a45773c408695186c
c8c7ca86d2adc1598829fe50ce3814128f8f79c6
/apps/Mms/ext/src/com/mediatek/mms/ext/IMmsLongPressGuide.java
eac6280a03a68788f2c4de7de5540a7017d3b041
[ "Apache-2.0" ]
permissive
l33tnoob/p201-packages
c816103e74a8e4a63b1cf721d43285d4db065614
61d8160bfaf28eea07a59651aace1f941dc82a4c
refs/heads/master
2021-05-29T18:51:59.509697
2015-07-06T10:40:47
2015-07-06T10:40:47
39,950,383
1
1
null
null
null
null
UTF-8
Java
false
false
2,630
java
/* Copyright Statement: * * This software/firmware and related documentation ("MediaTek Software") are * protected under relevant copyright laws. The information contained herein * is confidential and proprietary to MediaTek Inc. and/or its licensors. * Without the prior written permission of MediaTek inc. and/or its licensors, * any reproduction, modification, use or disclosure of MediaTek Software, * and information contained herein, in whole or in part, shall be strictly prohibited. * * MediaTek Inc. (C) 2012. All rights reserved. * * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. * * The following software/firmware and/or related documentation ("MediaTek Software") * have been modified by MediaTek Inc. All revisions are subject to any receiver's * applicable license agreements with MediaTek Inc. */ package com.mediatek.mms.ext; import android.content.Context; import android.view.ContextMenu; public interface IMmsLongPressGuide { /** * * @param context * @return, true is will show long press guide, false is will not. */ boolean show(Context context, boolean forceShow); /** * * @return, true will show in MMS Setting */ boolean isShowInSetting(); }
[ "lihaijiang@infocomiot.com" ]
lihaijiang@infocomiot.com
2f99d9426f0cefa6decc2ff7ca6048cf18299913
92f7d9ea0432b52af68b87f61aa32b69b73ed7b7
/src/main/java/com/tiagods/delivery/model/Entregador.java
d966d54b529d259cdbcf1eb38427d032ec0d9add
[]
no_license
tiagods/delivery
d448a965e30d506857a0b966c0ae8b497161556a
e457d355a70fc2b36283f41f931c61cfa97e90d0
refs/heads/master
2021-04-15T18:50:57.842570
2018-04-29T18:42:36
2018-04-29T18:42:36
126,649,431
0
0
null
null
null
null
UTF-8
Java
false
false
1,239
java
package com.tiagods.delivery.model; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import java.io.Serializable; import java.util.Objects; @Entity public class Entregador implements AbstractEntity,Serializable{ @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String nome; private boolean ativo; public Number getId() { return id; } public void setId(Long id) { this.id = id; } public String getNome() { return nome; } public void setNome(String nome) { this.nome = nome; } public boolean isAtivo() { return ativo; } public void setAtivo(boolean ativo) { this.ativo = ativo; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Entregador that = (Entregador) o; return Objects.equals(id, that.id); } @Override public int hashCode() { return Objects.hash(id); } @Override public String toString() { return this.nome; } }
[ "tiagoice@hotmail.com" ]
tiagoice@hotmail.com
6c4f13e9933ffb2378ae70acaa2616fd3f0fba8d
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/no_seeding/101_netweaver-com.sap.netweaver.porta.core.mock.CoreModuleMock-1.0-3/com/sap/netweaver/porta/core/mock/CoreModuleMock_ESTest.java
79b52b9935207e9178d1cf163aa4e987c5fbd497
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
667
java
/* * This file was automatically generated by EvoSuite * Mon Oct 28 16:30:37 GMT 2019 */ package com.sap.netweaver.porta.core.mock; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true) public class CoreModuleMock_ESTest extends CoreModuleMock_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
10043a14f8e05a9af6dd69feb93fc86c1fca917f
cdff118a93947b54dfa32f258da2deb939af033c
/impl/campaign/procgen/ObjectiveGenDataSpec.java
6c3610340549a3ecb25b6faff7f073c05124ef27
[]
no_license
wilki24/Starsector-API
c12ea5d0c131f5cdd26d6799ac63f9a61d9b93fb
825b1bde4d2b3808c1ebd23a8afbb2414f7aed6d
refs/heads/main
2023-08-18T07:56:54.486127
2021-09-19T01:53:04
2021-09-19T01:53:04
408,007,467
0
0
null
null
null
null
UTF-8
Java
false
false
1,337
java
package com.fs.starfarer.api.impl.campaign.procgen; import java.util.HashSet; import java.util.Set; import org.json.JSONException; import org.json.JSONObject; public class ObjectiveGenDataSpec { private String id; private String category; private float frequency; private Set<String> tags = new HashSet<String>(); public ObjectiveGenDataSpec(JSONObject row) throws JSONException { id = row.getString("id"); category = row.getString("category"); frequency = (float) row.optDouble("frequency", 0); String tags = row.optString("tags", null); if (tags != null) { String [] split = tags.split(","); for (String tag : split) { tag = tag.trim(); if (tag.isEmpty()) continue; addTag(tag); } } } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getCategory() { return category; } public void setCategory(String category) { this.category = category; } public float getFrequency() { return frequency; } public void setFrequency(float frequency) { this.frequency = frequency; } public void setTags(Set<String> tags) { this.tags = tags; } public Set<String> getTags() { return tags; } public void addTag(String tag) { tags.add(tag); } public boolean hasTag(String tag) { return tags.contains(tag); } }
[ "8873894+wilki24@users.noreply.github.com" ]
8873894+wilki24@users.noreply.github.com
158b8ebbd5d19422a248461ae0f979b5eda164c9
cf284498695b609a0dc3097b0e528e200c2dcf24
/app/src/main/java/com/example/coolweather/gson/Basic.java
4a1b3a4b8c35532c0a16ba483f38652735fd619e
[ "Apache-2.0" ]
permissive
SusieHan/coolweather
f4d4e32c4dc4b9e2398e1da8105f259ed6936ad2
5f9347112da587c5d8c3cc117f50b0047e655297
refs/heads/master
2020-09-26T09:49:28.486248
2019-12-07T12:24:32
2019-12-07T12:24:32
226,230,319
0
0
null
null
null
null
UTF-8
Java
false
false
353
java
package com.example.coolweather.gson; import com.google.gson.annotations.SerializedName; public class Basic { @SerializedName("city") public String cityName; @SerializedName("id") public String weatherId; public Update update; public class Update{ @SerializedName("loc") public String updateTime; } }
[ "tony@gmail.com" ]
tony@gmail.com
d87af808ead82ad4694a074d22adcf7175d94688
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithoutLambdas/applicationModule/src/main/java/applicationModulepackageJava2/Foo986.java
a7db26dcaae02e57c27f421eaa7b3e19f3dffd1f
[]
no_license
NikitaKozlov/generated-project-for-desugaring
0bc1443ab3ddc84cd289331c726761585766aea7
81506b3711004185070ca4bb9a93482b70011d36
refs/heads/master
2020-03-20T00:35:06.996525
2018-06-12T09:30:37
2018-06-12T09:30:37
137,049,317
0
0
null
null
null
null
UTF-8
Java
false
false
346
java
package applicationModulepackageJava2; public class Foo986 { public void foo0() { new applicationModulepackageJava2.Foo985().foo5(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } public void foo5() { foo4(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
63b207d688da9808ff6faeae2303a7b749980e56
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
/src/chosun/ciis/ss/sls/extn/rec/SS_L_EXTN_HDQT_INITPARTLISTRecord.java
ac9836eb3287738149526055f6fceb2b14bd8be7
[]
no_license
nosmoon/misdevteam
4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60
1829d5bd489eb6dd307ca244f0e183a31a1de773
refs/heads/master
2020-04-15T15:57:05.480056
2019-01-10T01:12:01
2019-01-10T01:12:01
164,812,547
1
0
null
null
null
null
UHC
Java
false
false
1,223
java
/*************************************************************************************************** * 파일명 : .java * 기능 : 본사확장 초기화 * 작성일자 : 2009-07-23 * 작성자 : 권정윤 ***************************************************************************************************/ package chosun.ciis.ss.sls.extn.rec; import java.sql.*; import chosun.ciis.ss.sls.extn.dm.*; import chosun.ciis.ss.sls.extn.ds.*; /** * 본사확장 초기화 */ public class SS_L_EXTN_HDQT_INITPARTLISTRecord extends java.lang.Object implements java.io.Serializable{ public String dept_cd; public String dept_nm; public String supr_dept_cd; public SS_L_EXTN_HDQT_INITPARTLISTRecord(){} public void setDept_cd(String dept_cd){ this.dept_cd = dept_cd; } public void setDept_nm(String dept_nm){ this.dept_nm = dept_nm; } public void setSupr_dept_cd(String supr_dept_cd){ this.supr_dept_cd = supr_dept_cd; } public String getDept_cd(){ return this.dept_cd; } public String getDept_nm(){ return this.dept_nm; } public String getSupr_dept_cd(){ return this.supr_dept_cd; } } /* 작성시간 : Thu Jul 23 13:32:35 KST 2009 */
[ "DLCOM000@172.16.30.11" ]
DLCOM000@172.16.30.11
4faf26ba540ffc014f57a1007467c57b05ea9ad0
653649edacfa667275c53c4ea359f787b7132e73
/src/test/java/study/datajpa/repository/ItemRepositoryTest.java
5d10adb9fec02174f33e468b823de2829ecbfb77
[]
no_license
BangKiHyun/spring-data-jpa-onlinelecture
a948cc7f08ef63da2912356c588c0d0b3e7b4c1e
a8fb82d87f53a05538ac5f30c03b433608d3a83f
refs/heads/master
2022-12-24T01:20:01.618190
2020-09-26T07:57:13
2020-09-26T07:57:13
297,276,310
0
0
null
null
null
null
UTF-8
Java
false
false
469
java
package study.datajpa.repository; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import study.datajpa.entity.Item; @SpringBootTest class ItemRepositoryTest { @Autowired ItemRepository itemRepository; @Test public void save() throws Exception { //given Item item = new Item("A"); itemRepository.save(item); } }
[ "rlrlvh@naver.com" ]
rlrlvh@naver.com
d98d783b6da931dcb14c62165ea32cd2eeff683c
8dc84558f0058d90dfc4955e905dab1b22d12c08
/chrome/test/android/javatests/src/org/chromium/chrome/test/util/BookmarkTestUtil.java
f59d7abf4b28a24344d8eb027bc0c033df75900f
[ "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause" ]
permissive
meniossin/src
42a95cc6c4a9c71d43d62bc4311224ca1fd61e03
44f73f7e76119e5ab415d4593ac66485e65d700a
refs/heads/master
2022-12-16T20:17:03.747113
2020-09-03T10:43:12
2020-09-03T10:43:12
263,710,168
1
0
BSD-3-Clause
2020-05-13T18:20:09
2020-05-13T18:20:08
null
UTF-8
Java
false
false
964
java
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.chrome.test.util; import org.chromium.base.ThreadUtils; import org.chromium.chrome.browser.bookmarks.BookmarkModel; import org.chromium.content.browser.test.util.CriteriaHelper; /** * Utility functions for dealing with bookmarks in tests. */ public class BookmarkTestUtil { /** * Waits until the bookmark model is loaded, i.e. until * {@link BookmarkModel#isBookmarkModelLoaded()} is true. */ public static void waitForBookmarkModelLoaded() throws InterruptedException { final BookmarkModel bookmarkModel = ThreadUtils.runOnUiThreadBlockingNoException(BookmarkModel::new); CriteriaHelper.pollUiThread(bookmarkModel::isBookmarkModelLoaded); ThreadUtils.runOnUiThreadBlocking(bookmarkModel::destroy); } }
[ "arnaud@geometry.ee" ]
arnaud@geometry.ee
54f8d16b2e15803ca657aaeceff2bc4203f0f3d1
4c24b8da0d96c021c6e0c55fa97cb58c1bd7e8f4
/src.archive.1/greedy/GoldMine.java
f95195e22321118c35e71293c35afc4b99d3f8d0
[]
no_license
TankaiHub/topc
ee80fa1c5fd85372a0b2cf65a0c22096ec19a5ad
bdac19df8df6847e9fcb6e138ad9ac5d9d77ae5e
refs/heads/master
2023-03-15T22:00:06.612099
2016-03-30T06:15:05
2016-03-30T06:15:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,930
java
package topc.greedy; import java.util.*; import java.io.*; // SRM 169 Division I Level Three - 900 // greedy, math // http://community.topcoder.com/stat?c=problem_statement&pm=1957&rd=4650 public class GoldMine { double DELTA = 0.0001; int W = 7; // max workers per mine int N; // mine count double[][] perc; double[][] profit; public int[] getAllocation(String[] mines, int miners) { N = mines.length; perc = new double[N][W]; for (int i = 0; i < N; i++) { String[] mine = mines[i].split(",\\s+"); for (int j = 0; j < W; j++) { perc[i][j] = Double.parseDouble(mine[j]) / 100.0; } } calculateProfit(); int[] alloc = new int[N]; for (int i = 0; i < miners; i++) { int mine = -1; double best = Double.MAX_VALUE / -2; for (int j = 0; j < N; j++) { double curr = profitIncrease(j, alloc[j]); if (curr > best + DELTA) { mine = j; best = curr; } } if (mine > -1) { alloc[mine]++; } } return alloc; } double profitIncrease(int mine, int workers) { if (workers >= W - 1) { return Double.MAX_VALUE / -4; } else { return profit[mine][workers + 1] - profit[mine][workers]; } } void calculateProfit() { profit = new double[N][W]; for (int i = 0; i < N; i++) { for (int j = 0; j < W; j++) { profit[i][j] = calculateProfit(perc[i], j); } } } double calculateProfit(double[] perc, int workerCount) { double profit = 0; for (int i = workerCount + 1; i < W; i++) { profit += perc[i] * 60 * (double)workerCount; } for (int i = 0; i < workerCount + 1; i++) { profit += perc[i] * 50 * (double)i; profit -= perc[i] * 20 * (double)(workerCount - i); } return profit; } private void debug(Object... os) { System.out.println(Arrays.deepToString(os)); } }
[ "gabesoft@gmail.com" ]
gabesoft@gmail.com
1f34035f1fcf0483e5b5fe95c37f56ab8d798453
1e4788f838d7a703f6f15f80e230b08d889682e6
/java/ru/privetdruk/l2jspace/gameserver/network/clientpackets/RequestAnswerJoinAlly.java
2cb55becae4d321ed83847a91381fdf709fbd329
[]
no_license
pr1vetdruk/l2jspace-c6-interlude
fbc5f0bea9fcf38c92172df15bde16ebb667fcdd
e0f701d4d87642887a3173a181de2037517f606d
refs/heads/master
2023-07-14T13:32:16.250915
2021-08-30T08:31:55
2021-08-30T08:31:55
340,645,976
0
0
null
null
null
null
UTF-8
Java
false
false
2,715
java
/* * This file is part of the L2jSpace project. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package ru.privetdruk.l2jspace.gameserver.network.clientpackets; import ru.privetdruk.l2jspace.gameserver.model.actor.instance.PlayerInstance; import ru.privetdruk.l2jspace.gameserver.model.clan.Clan; import ru.privetdruk.l2jspace.gameserver.network.SystemMessageId; /** * sample 5F 01 00 00 00 format cdd */ public class RequestAnswerJoinAlly extends GameClientPacket { private int _response; @Override protected void readImpl() { _response = readD(); } @Override protected void runImpl() { final PlayerInstance player = getClient().getPlayer(); if (player == null) { return; } final PlayerInstance requestor = player.getRequest().getPartner(); if (requestor == null) { return; } if (_response == 0) { player.sendPacket(SystemMessageId.NO_RESPONSE_YOUR_ENTRANCE_TO_THE_ALLIANCE_HAS_BEEN_CANCELLED); requestor.sendPacket(SystemMessageId.NO_RESPONSE_INVITATION_TO_JOIN_AN_ALLIANCE_HAS_BEEN_CANCELLED); } else { if (!(requestor.getRequest().getRequestPacket() instanceof RequestJoinAlly)) { return; // hax } final Clan clan = requestor.getClan(); // we must double check this cause of hack if (clan.checkAllyJoinCondition(requestor, player)) { // TODO: Need correct message id requestor.sendPacket(SystemMessageId.YOU_HAVE_SUCCEEDED_IN_INVITING_A_FRIEND_TO_YOUR_FRIENDS_LIST); player.sendPacket(SystemMessageId.YOU_HAVE_ACCEPTED_THE_ALLIANCE); player.getClan().setAllyId(clan.getAllyId()); player.getClan().setAllyName(clan.getAllyName()); player.getClan().setAllyPenaltyExpiryTime(0, 0); player.getClan().setAllyCrest(clan.getAllyCrestId()); player.getClan().updateClanInDB(); } } player.getRequest().onRequestResponse(); } }
[ "somsin@bryansk.softlab.ru" ]
somsin@bryansk.softlab.ru
5e12e390c87cb690cf540a442fc6b8d06b910403
99c03face59ec13af5da080568d793e8aad8af81
/hom_classifier/2om_classifier/scratch/AOIS95AOIS27/Pawn.java
4fb36c8898bb5a5bcfdb28dcbb9622bcb8e66e1e
[]
no_license
fouticus/HOMClassifier
62e5628e4179e83e5df6ef350a907dbf69f85d4b
13b9b432e98acd32ae962cbc45d2f28be9711a68
refs/heads/master
2021-01-23T11:33:48.114621
2020-05-13T18:46:44
2020-05-13T18:46:44
93,126,040
0
0
null
null
null
null
UTF-8
Java
false
false
3,761
java
// This is a mutant program. // Author : ysma import java.util.ArrayList; public class Pawn extends ChessPiece { public Pawn( ChessBoard board, ChessPiece.Color color ) { super( board, color ); } public java.lang.String toString() { if (color == ChessPiece.Color.WHITE) { return "♙"; } else { return "♟"; } } public java.util.ArrayList<String> legalMoves() { java.util.ArrayList<String> returnList = new java.util.ArrayList<String>(); if (this.getColor().equals( ChessPiece.Color.WHITE )) { int currentCol = this.getColumn(); int nextRow = this.getRow() + 1; if (nextRow <= 7) { if (board.getPiece( onePossibleMove( nextRow, currentCol ) ) == null) { returnList.add( onePossibleMove( nextRow, currentCol ) ); } } if (this.getRow() == 1) { int nextNextRow = this.getRow() + 2; if (board.getPiece( onePossibleMove( nextRow, currentCol ) ) == null && board.getPiece( onePossibleMove( nextNextRow++, currentCol ) ) == null) { returnList.add( onePossibleMove( nextNextRow, currentCol ) ); } } int leftColumn = currentCol - 1; int rightColumn = currentCol + 1; if (leftColumn >= 0) { if (board.getPiece( onePossibleMove( nextRow, leftColumn ) ) != null) { if (!board.getPiece( onePossibleMove( nextRow, leftColumn ) ).getColor().equals( this.getColor() )) { returnList.add( onePossibleMove( nextRow, leftColumn ) ); } } } if (rightColumn <= 7) { if (board.getPiece( onePossibleMove( nextRow, rightColumn ) ) != null) { if (!board.getPiece( onePossibleMove( nextRow, rightColumn ) ).getColor().equals( this.getColor() )) { returnList.add( onePossibleMove( nextRow, rightColumn ) ); } } } } else { int currentCol = this.getColumn(); int nextRow = this.getRow() - 1; if (nextRow >= 0) { if (board.getPiece( onePossibleMove( nextRow, currentCol ) ) == null) { returnList.add( onePossibleMove( nextRow, currentCol ) ); } } if (this.getRow() == 6) { int nextNextRow = this.getRow() - 2; if (board.getPiece( onePossibleMove( nextRow++, currentCol ) ) == null && board.getPiece( onePossibleMove( nextNextRow, currentCol ) ) == null) { returnList.add( onePossibleMove( nextNextRow, currentCol ) ); } } int leftColumn = currentCol - 1; int rightColumn = currentCol + 1; if (leftColumn >= 0) { if (board.getPiece( onePossibleMove( nextRow, leftColumn ) ) != null) { if (!board.getPiece( onePossibleMove( nextRow, leftColumn ) ).getColor().equals( this.getColor() )) { returnList.add( onePossibleMove( nextRow, leftColumn ) ); } } } if (rightColumn <= 7) { if (board.getPiece( onePossibleMove( nextRow, rightColumn ) ) != null) { if (!board.getPiece( onePossibleMove( nextRow, rightColumn ) ).getColor().equals( this.getColor() )) { returnList.add( onePossibleMove( nextRow, rightColumn ) ); } } } } return returnList; } }
[ "fout.alex@gmail.com" ]
fout.alex@gmail.com
31bfba5b2c3aa01cca3e3ab0fb34ec387b18c85b
30edba3cc1757d6df5b5a830e4ddb3fb7896e605
/hu.bme.mit.trainbenchmark.benchmark.sql/src/main/java/hu/bme/mit/trainbenchmark/benchmark/sql/benchmarkcases/SQLChecker.java
10272be1e5e588c6ad181f419bcbe645c7ab0116
[]
no_license
IncQueryLabs/trainbenchmark
b21ecf17b1ed4efdc2e04031ca35599abf1f5ec7
aa610691387a04f41f5fd745b610924cae32dd48
refs/heads/master
2023-08-11T08:38:00.435601
2015-11-09T15:47:04
2015-11-09T15:47:04
45,915,684
1
0
null
2015-11-10T14:04:53
2015-11-10T14:04:53
null
UTF-8
Java
false
false
2,052
java
/******************************************************************************* * Copyright (c) 2010-2015, Benedek Izso, Gabor Szarnyas, Istvan Rath and Daniel Varro * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Benedek Izso - initial API and implementation * Gabor Szarnyas - initial API and implementation *******************************************************************************/ package hu.bme.mit.trainbenchmark.benchmark.sql.benchmarkcases; import java.io.File; import java.io.IOException; import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.Collection; import org.apache.commons.io.FileUtils; import hu.bme.mit.trainbenchmark.benchmark.checker.Checker; import hu.bme.mit.trainbenchmark.benchmark.config.BenchmarkConfig; import hu.bme.mit.trainbenchmark.benchmark.sql.driver.SQLDriver; import hu.bme.mit.trainbenchmark.benchmark.sql.match.SQLMatch; import hu.bme.mit.trainbenchmark.constants.Query; public class SQLChecker extends Checker<SQLMatch> { protected final SQLDriver<? extends BenchmarkConfig> driver; protected final Query query; protected final String queryDefinition; protected PreparedStatement statement; public SQLChecker(final SQLDriver<? extends BenchmarkConfig> driver, final BenchmarkConfig benchmarkConfig, final Query query) throws IOException, SQLException { super(); this.driver = driver; this.query = query; final String queryPath = benchmarkConfig.getWorkspacePath() + driver.getResourceDirectory() + "queries/" + query + ".sql"; queryDefinition = FileUtils.readFileToString(new File(queryPath)); } @Override public Collection<SQLMatch> check() throws SQLException { if (statement == null) { statement = driver.getConnection().prepareStatement(queryDefinition); } return driver.runStatement(query, statement); } }
[ "szarnyasg@gmail.com" ]
szarnyasg@gmail.com
7af7e89ef4f2ca0f60f9ffa68a1bdceeeb26c332
1006d2754c0fd1383efa8247dea71383b43066c4
/core/load-driver/src/test/java/io/novaordis/gld/driver/console/CommandLineConsoleTest.java
f6bae67441226cc5c342c44ff2caadaf9f483fae
[ "Apache-2.0" ]
permissive
ovidiuf/gld
b1658988cb35a604d8dbd1bf49d9a01822ee52ce
1366e9e8149704b71df4db85e29040afa0549f6f
refs/heads/master
2021-09-04T18:52:11.470159
2018-01-21T09:39:51
2018-01-21T09:39:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,818
java
/* * Copyright (c) 2015 Nova Ordis LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * 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 io.novaordis.gld.driver.console; import io.novaordis.gld.driver.MockMultiThreadRunner; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.BlockingQueue; import java.util.concurrent.atomic.AtomicInteger; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; public class CommandLineConsoleTest { // Constants ------------------------------------------------------------------------------------------------------- private static final Logger log = LoggerFactory.getLogger(CommandLineConsoleTest.class); // Static ---------------------------------------------------------------------------------------------------------- // Attributes ------------------------------------------------------------------------------------------------------ // Constructors ---------------------------------------------------------------------------------------------------- // Public ---------------------------------------------------------------------------------------------------------- @Test public void stopTheMultiThreadRunnerOnQ() throws Exception { MockMultiThreadRunner mmtr = new MockMultiThreadRunner(); CommandLineConsole commandLineConsole = new CommandLineConsole(mmtr, null); byte[] buffer = new byte[10]; buffer[0] = 'q'; buffer[1] = '\n'; ByteArrayInputStream bais = new ByteArrayInputStream(buffer); commandLineConsole.setIn(bais); commandLineConsole.start(); mmtr.waitToBeStopped(); } @Test public void stopTheConsoleButNotTheMultiRunner() throws Exception { MockMultiThreadRunner mmtr = new MockMultiThreadRunner(); assertTrue(mmtr.isRunning()); CommandLineConsole commandLineConsole = new CommandLineConsole(mmtr, null); byte[] buffer = new byte[10]; ByteArrayInputStream bais = new ByteArrayInputStream(buffer); commandLineConsole.setIn(bais); commandLineConsole.start(); commandLineConsole.stop(); // makes sure the runner is not stopped assertTrue(mmtr.isRunning()); } @Test public void stopTheConsoleBySendingBgOnTheInputStream() throws Exception { MockMultiThreadRunner mockMultiThreadRunner = new MockMultiThreadRunner(); assertTrue(mockMultiThreadRunner.isRunning()); CommandLineConsole commandLineConsole = new CommandLineConsole(mockMultiThreadRunner, null); byte[] buffer = new byte[10]; // send something innocuous, will end up as a comment in statistics buffer[0] = 'b'; buffer[1] = 'l'; buffer[2] = 'a'; buffer[3] = 'h'; buffer[4] = '\n'; buffer[5] = 'b'; buffer[6] = 'g'; buffer[7] = '\n'; // then send to background ByteArrayInputStream bais = new ByteArrayInputStream(buffer); commandLineConsole.setIn(bais); commandLineConsole.start(); // busy loop until it stops while(true) { if (!commandLineConsole.isRunning()) { break; } Thread.sleep(1L); } // makes sure the runner is not stopped assertTrue(mockMultiThreadRunner.isRunning()); } // stopping unblocks reading on stdin ------------------------------------------------------------------------------ @Test public void stoppingUnblocksReadOnStdin() throws Exception { MockMultiThreadRunner mockMultiThreadRunner = new MockMultiThreadRunner(); CommandLineConsole commandLineConsole = new CommandLineConsole(mockMultiThreadRunner, null); //noinspection MismatchedQueryAndUpdateOfCollection final BlockingQueue<Object> checkPointOne = new ArrayBlockingQueue<>(1); //noinspection MismatchedQueryAndUpdateOfCollection final BlockingQueue<Integer> checkPointTwo = new ArrayBlockingQueue<>(1024); InputStream mockInputStream = new InputStream() { final private AtomicInteger invocationCounter = new AtomicInteger(0); @Override public int read() throws IOException { try { if (invocationCounter.get() == 0) { checkPointOne.put("Console Started To Read"); } log.info("waiting to 'read' (invocation " + invocationCounter.getAndIncrement() + ") from checkPointTwo ..." ); // this will block the console thread int i = checkPointTwo.take(); log.info("did 'read' " + (char)i + " from checkPointTwo, sending it to the console"); return i; } catch(InterruptedException e) { throw new IllegalStateException(e); } } }; // install the mock input stream commandLineConsole.setIn(mockInputStream); log.info("starting console ..."); commandLineConsole.start(); log.info("console started"); // the internal console thread will be started and begin reading from the console input stream // make sure a read attempt on the stream is made assertEquals("Console Started To Read", checkPointOne.take()); // this will attempt to stop the console while the reading thread is blocked log.info("stopping console ..."); commandLineConsole.stop(); log.info("console stopped"); // unblock the reading thread by sending a '\n', which will send content into the console log.info("unlocking the reading thread multiple times by putting ints in checkPointTwo ..."); checkPointTwo.put((int)'b'); checkPointTwo.put((int)'l'); checkPointTwo.put((int)'a'); checkPointTwo.put((int)'h'); checkPointTwo.put((int) '\n'); log.info("unlocked the reading thread"); // make sure the console is stopped assertTrue(!commandLineConsole.isRunning()); log.info("console is not running"); // make sure no empty line was processed by the console, which was supposed to discard everyhting // coming from the stream String lastReadLine = commandLineConsole.getLastReadLine(); assertNull(lastReadLine); } // Package protected ----------------------------------------------------------------------------------------------- // Protected ------------------------------------------------------------------------------------------------------- // Private --------------------------------------------------------------------------------------------------------- // Inner classes --------------------------------------------------------------------------------------------------- }
[ "ovidiu@novaordis.com" ]
ovidiu@novaordis.com
9a8223e5b58996feca978879641b0ac64ef994d2
bc3e61091c0f3edd1e9d27e78e022bec217b44e3
/app/src/main/java/br/com/erudio/exception/FileStorageException.java
2ac08c85544514ea258bf548b00c0ce2e20c3105
[ "Apache-2.0" ]
permissive
elcarvalho/DockerFromZeroToMastery-SpingBootAndJava
3d80b9a9940901078100cbd009e335725b5b94cb
f4d98dd7e456b7cf118c155ff5037bc6c6d7c008
refs/heads/master
2022-11-13T07:19:46.538903
2020-07-09T13:18:11
2020-07-09T13:18:11
278,365,851
0
0
Apache-2.0
2020-07-09T13:00:47
2020-07-09T13:00:47
null
UTF-8
Java
false
false
479
java
package br.com.erudio.exception; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.ResponseStatus; @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) public class FileStorageException extends RuntimeException{ private static final long serialVersionUID = 1L; public FileStorageException(String exception) { super(exception); } public FileStorageException(String exception, Throwable cause) { super(exception, cause); } }
[ "leandrocgsi@gmail.com" ]
leandrocgsi@gmail.com
1421370ec4dd7e8cd319b34e679e1143a8ee1cff
99a8722d0d16e123b69e345df7aadad409649f6c
/jpa/deferred/src/main/java/example/repo/Customer1490Repository.java
5b9b9fe41954b5f495104baadd4bb5f309c354f3
[ "Apache-2.0" ]
permissive
spring-projects/spring-data-examples
9c69a0e9f3e2e73c4533dbbab00deae77b2aacd7
c4d1ca270fcf32a93c2a5e9d7e91a5592b7720ff
refs/heads/main
2023-09-01T14:17:56.622729
2023-08-22T16:51:10
2023-08-24T19:48:04
16,381,571
5,331
3,985
Apache-2.0
2023-08-25T09:02:19
2014-01-30T15:42:43
Java
UTF-8
Java
false
false
284
java
package example.repo; import example.model.Customer1490; import java.util.List; import org.springframework.data.repository.CrudRepository; public interface Customer1490Repository extends CrudRepository<Customer1490, Long> { List<Customer1490> findByLastName(String lastName); }
[ "ogierke@pivotal.io" ]
ogierke@pivotal.io
e20be87b526b9d310cfd9f78b7bcebc2b71dbc01
df134b422960de6fb179f36ca97ab574b0f1d69f
/org/bukkit/conversations/ManuallyAbandonedConversationCanceller.java
9ee8059ddf5f2d6f68ef015092abe944e8f015f6
[]
no_license
TheShermanTanker/NMS-1.16.3
bbbdb9417009be4987872717e761fb064468bbb2
d3e64b4493d3e45970ec5ec66e1b9714a71856cc
refs/heads/master
2022-12-29T15:32:24.411347
2020-10-08T11:56:16
2020-10-08T11:56:16
302,324,687
0
1
null
null
null
null
UTF-8
Java
false
false
1,020
java
/* */ package org.bukkit.conversations; /* */ /* */ import org.jetbrains.annotations.NotNull; /* */ /* */ /* */ /* */ /* */ /* */ public class ManuallyAbandonedConversationCanceller /* */ implements ConversationCanceller /* */ { /* */ public void setConversation(@NotNull Conversation conversation) { /* 13 */ throw new UnsupportedOperationException(); /* */ } /* */ /* */ /* */ public boolean cancelBasedOnInput(@NotNull ConversationContext context, @NotNull String input) { /* 18 */ throw new UnsupportedOperationException(); /* */ } /* */ /* */ /* */ @NotNull /* */ public ConversationCanceller clone() { /* 24 */ throw new UnsupportedOperationException(); /* */ } /* */ } /* Location: C:\Users\Josep\Downloads\Decompile Minecraft\tuinity-1.16.3.jar!\org\bukkit\conversations\ManuallyAbandonedConversationCanceller.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "tanksherman27@gmail.com" ]
tanksherman27@gmail.com
707cf6e79821efe75a5b9fbc7380ceb622cf6f31
e6fb24ab0200b1b84d8596b643dce983a9231982
/libadblockplus-android-settings/src/org/adblockplus/libadblockplus/android/settings/AdblockHelper.java
2a71bbbc63644507c30197ba76e6209eab9131d7
[]
no_license
Happyandhappy/maginsoftteam-chromecase-Android
7fc41ba7373127414f4fad0f51bca43b11d2b0f0
e4dd1bca1f4d9c959a26fe7b561fb352f77552af
refs/heads/master
2021-07-06T00:18:51.407674
2017-09-29T06:46:01
2017-09-29T06:46:01
105,238,794
1
0
null
null
null
null
UTF-8
Java
false
false
5,619
java
/* * This file is part of Adblock Plus <https://adblockplus.org/>, * Copyright (C) 2006-2016 Eyeo GmbH * * Adblock Plus is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as * published by the Free Software Foundation. * * Adblock Plus 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 Adblock Plus. If not, see <http://www.gnu.org/licenses/>. */ package org.adblockplus.libadblockplus.android.settings; import android.content.Context; import android.content.SharedPreferences; import android.util.Log; import org.adblockplus.libadblockplus.android.AdblockEngine; import org.adblockplus.libadblockplus.android.Utils; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicInteger; /** * AdblockHelper shared resources * (singleton) */ public class AdblockHelper { private static final String TAG = Utils.getTag(AdblockHelper.class); /** * Suggested preference name */ public static final String PREFERENCE_NAME = "ADBLOCK"; private static AdblockHelper _instance; private Context context; private boolean developmentBuild; private String preferenceName; private AdblockEngine engine; private AdblockSettingsStorage storage; private CountDownLatch engineCreated; /* Simple ARC management for AdblockEngine Use `retain` and `release` */ private AtomicInteger referenceCounter = new AtomicInteger(0); // singleton protected AdblockHelper() { // prevents instantiation } /** * Use to get AdblockHelper instance * @return adblock instance */ public static synchronized AdblockHelper get() { if (_instance == null) { _instance = new AdblockHelper(); } return _instance; } public AdblockEngine getEngine() { return engine; } public AdblockSettingsStorage getStorage() { return storage; } /** * Init with context * @param context application context * @param developmentBuild debug or release? * @param preferenceName Shared Preferences name */ public void init(Context context, boolean developmentBuild, String preferenceName) { this.context = context.getApplicationContext(); this.developmentBuild = developmentBuild; this.preferenceName = preferenceName; } private void createAdblock() { Log.d(TAG, "Creating adblock engine ..."); // read and apply current settings SharedPreferences prefs = context.getSharedPreferences(preferenceName, Context.MODE_PRIVATE); storage = new SharedPrefsStorage(prefs); // latch is required for async (see `waitForReady()`) engineCreated = new CountDownLatch(1); engine = AdblockEngine.create( AdblockEngine.generateAppInfo(context, developmentBuild), context.getCacheDir().getAbsolutePath(), true); // `true` as we need element hiding Log.d(TAG, "AdblockHelper engine created"); AdblockSettings settings = storage.load(); if (settings != null) { Log.d(TAG, "Applying saved adblock settings to adblock engine"); // apply last saved settings to adblock engine // all the settings except `enabled` and whitelisted domains are saved by adblock engine itself engine.setEnabled(settings.isAdblockEnabled()); engine.setWhitelistedDomains(settings.getWhitelistedDomains());; engine.setAcceptableAdsEnabled(false); } else { Log.w(TAG, "No saved adblock settings"); } // unlock waiting client thread engineCreated.countDown(); } /** * Wait until everything is ready (used for `retain(true)`) * Warning: locks current thread */ public void waitForReady() { if (engineCreated == null) { throw new RuntimeException("AdblockHelper Plus usage exception: call retain(...) first"); } try { Log.d(TAG, "Waiting for ready ..."); engineCreated.await(); Log.d(TAG, "Ready"); } catch (InterruptedException e) { Log.w(TAG, "Interrupted", e); } } private void disposeAdblock() { Log.w(TAG, "Disposing adblock engine"); engine.dispose(); engine = null; // to unlock waiting client in WaitForReady() engineCreated.countDown(); engineCreated = null; storage = null; } /** * Get registered clients count * @return registered clients count */ public int getCounter() { return referenceCounter.get(); } /** * Register AdblockHelper engine client * @param asynchronous If `true` engines will be created in background thread without locking of * current thread. Use waitForReady() before getEngine() later. * If `false` locks current thread. */ public synchronized void retain(boolean asynchronous) { if (referenceCounter.getAndIncrement() == 0) { if (!asynchronous) { createAdblock(); } else { new Thread(new Runnable() { @Override public void run() { createAdblock(); } }).start(); } } } /** * Unregister AdblockHelper engine client */ public synchronized void release() { if (referenceCounter.decrementAndGet() == 0) { waitForReady(); disposeAdblock(); } } }
[ "greyfrapps@gmail.com" ]
greyfrapps@gmail.com
0e86b5ad75d7dd34cb23409e8a3260ccd98b4b40
add50531813f601a1120cb8b02fc86698b8f786b
/project-parent/zfa-project-util/src/main/java/com/base/modal/menu/Menu.java
f38a5cc41fd66ad97d316aa766f7fae27c894ac3
[]
no_license
huangzfa/wechat
644e8b2144d79cd3a0498d22a35759f4b45e9550
f3972b5b8d12936e263cfbf5edb3586f144d4625
refs/heads/master
2021-06-06T03:23:41.024764
2019-06-13T10:00:01
2019-06-13T10:00:01
93,611,757
0
0
null
null
null
null
UTF-8
Java
false
false
404
java
package com.base.modal.menu; //-表示要创建的菜单 public class Menu { public ViewButton[] getButton() { return button; } public void setButton(ViewButton[] button) { this.button = button; } private ViewButton[] button; /* private ViewButton[] view; public ViewButton[] getView(){ return view; } public void setView(ViewButton[] view){ this.view=view; }*/ }
[ "1593582614@qq.com" ]
1593582614@qq.com
bab40f0598aa829b19661d89a5078e6ae4af1ded
f88191eab3b367f136826a1aaa764c4828a841d6
/core/message/src/main/java/org/ietf/nea/pt/value/PtTlsMessageValueSaslMechanismSelectionBuilder.java
6500ffac21ec8b91720aac978e3331838d4ea9d0
[ "BSD-3-Clause" ]
permissive
trusthsbremen/jtnc
f64990e7924fdca29218abe58b8ed11edbd49fa4
08a5cee2423dcd1be759bf4a67719dd57096c64e
refs/heads/master
2021-07-04T14:48:06.009636
2019-07-03T19:53:04
2019-07-03T19:53:04
41,857,243
3
1
NOASSERTION
2021-06-07T17:51:16
2015-09-03T11:55:32
Java
UTF-8
Java
false
false
2,935
java
/** * The BSD 3-Clause License ("BSD New" or "BSD Simplified") * * Copyright © 2015 Trust HS Bremen and its Contributors. All rights * reserved. * * See the CONTRIBUTORS file distributed with this work for additional * information regarding copyright ownership. * * 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 the copyright holder 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 org.ietf.nea.pt.value; import org.ietf.nea.pt.value.util.SaslMechanismEntry; import de.hsbremen.tc.tnc.message.exception.RuleException; import de.hsbremen.tc.tnc.message.t.value.TransportMessageValueBuilder; /** * Generic builder to build a transport SASL mechanism selection message value * compliant to RFC 6876. It can be used in a fluent way. * * */ public interface PtTlsMessageValueSaslMechanismSelectionBuilder extends TransportMessageValueBuilder { /** * Sets the selected mechanism. * * @param mech the selected mechanism * @return the builder * @throws RuleException if given value is not valid */ PtTlsMessageValueSaslMechanismSelectionBuilder setMechanism( SaslMechanismEntry mech) throws RuleException; /** * Sets the optional initial SASL message. * * @param initialSaslMsg the initial SASL message * @return the builder * @throws RuleException if given value is not valid */ PtTlsMessageValueSaslMechanismSelectionBuilder setOptionalInitialSaslMessage(byte[] initialSaslMsg) throws RuleException; }
[ "carl-heinz.genzel@hs-bremen.de" ]
carl-heinz.genzel@hs-bremen.de
a9d3cbf57385ad6558efad75b785198142777bd5
4a627a99cdf202019fa4088ca23316e9cc427e7b
/nyd-cash-product/nyd-cash-product-service/src/main/java/com/nyd/product/service/impls/ProductConfigServiceImpl.java
64bc3b914efa5eef3dc3362fe8b82059c9241290
[]
no_license
P79N6A/zlqb
4bdcc62db76f8b4fdd4176c06812c9bd8ac2148b
66a8781e74216ead7ea4969d89972c16e9d45b54
refs/heads/master
2020-07-13T14:18:36.941485
2019-08-26T12:22:20
2019-08-26T12:22:20
205,096,175
0
1
null
2019-08-29T06:30:30
2019-08-29T06:30:30
null
UTF-8
Java
false
false
2,627
java
package com.nyd.product.service.impls; import com.nyd.product.dao.ProductConfigDao; import com.nyd.product.model.ProductConfigInfo; import com.nyd.product.service.ProductConfigService; import com.nyd.product.service.consts.ProductConsts; import com.tasfe.framework.support.model.ResponseData; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; /** * Created by Dengw on 17/11/7. */ @Service public class ProductConfigServiceImpl implements ProductConfigService { private static Logger LOGGER = LoggerFactory.getLogger(ProductConfigServiceImpl.class); @Autowired private ProductConfigDao productConfigDao; @Override public ResponseData saveProductConfigInfo(ProductConfigInfo productConfigInfo) { ResponseData response = ResponseData.success(); try { productConfigDao.save(productConfigInfo); } catch (Exception e) { response = ResponseData.error(ProductConsts.DB_ERROR_MSG); LOGGER.error("save productConfigInfo error! productId= "+productConfigInfo.getProductCode(), e.getMessage()); } return response; } @Override public ResponseData updateProductConfigInfo(ProductConfigInfo productConfigInfo) { ResponseData response = ResponseData.success(); try { productConfigDao.update(productConfigInfo); } catch (Exception e) { response = ResponseData.error(ProductConsts.DB_ERROR_MSG); LOGGER.error("update productConfigInfo error! productId= "+productConfigInfo.getProductCode(), e.getMessage()); } return response; } @Override public ResponseData<ProductConfigInfo> getProductConfigInfoByProductCode(String productCode) { ResponseData response = ResponseData.success(); try { ProductConfigInfo productConfigInfo = new ProductConfigInfo(); List<ProductConfigInfo> productConfigList = productConfigDao.getObjectsByProductCode(productCode); if(productConfigList != null && productConfigList.size()>0){ productConfigInfo = productConfigList.get(0); } response.setData(productConfigInfo); } catch (Exception e) { response = ResponseData.error(ProductConsts.DB_ERROR_MSG); LOGGER.error("get productConfigInfo error! productCode= "+productCode, e.getMessage()); } return response; } }
[ "hhh@d55a9f32-8471-450d-bba4-b89e090b5caa" ]
hhh@d55a9f32-8471-450d-bba4-b89e090b5caa
e72fa86d1910c32fa0f030124dc30d0de48209f8
9b04c5a90b31776a17c254d218abb63f59889f5d
/gsb/gsb-crm/src/main/java/com/gongsibao/crm/web/report/FollowReportPart.java
60a1a5e08f89f31ce135797b8007c9bb526e5d98
[]
no_license
damogui/testtt
de80c460e878c22553dabe965a7dfe21181d83cf
ae486b93370db3b3153239a25aecd1caeea8d248
refs/heads/master
2021-09-14T19:46:43.345265
2018-05-18T08:29:08
2018-05-18T08:29:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,056
java
package com.gongsibao.crm.web.report; import java.util.HashMap; import java.util.Map; import org.netsharp.core.DataTable; import org.netsharp.core.IRow; import com.gongsibao.entity.crm.report.BaseReportEntity; import com.gongsibao.entity.crm.report.FollowReportEntity; public class FollowReportPart extends BaseReport{ protected HashMap<String, String> getDate(HashMap<String, String> filterMap) { HashMap<String, String> map = new HashMap<String, String>(); String startDate = filterMap.get("date>"); startDate = startDate.substring(0, startDate.indexOf("and")-1); map.put("startDate", startDate); return map; } @Override protected FollowReportEntity getDataTable(BaseReportEntity entity,HashMap<String, String> filterMap,String orgaId,Integer salesmanId,Boolean isSalesman) { FollowReportEntity resultEntity = new FollowReportEntity(); Integer taskCount = getTaskCount(filterMap,orgaId,salesmanId,isSalesman); Integer unfoolowCount = getUnfoolowCount(filterMap,orgaId,salesmanId,isSalesman); Integer timeOutCount = getTimeOutCount(filterMap,orgaId,salesmanId,isSalesman); Integer foolowCount = getFoolowCount(filterMap,orgaId,salesmanId,isSalesman); Map<String, String> qualityCountMap = getQualityCount(filterMap,orgaId,salesmanId,isSalesman); resultEntity.setId(entity.getId()); resultEntity.setParentId(entity.getParentId()); resultEntity.setSupplierId(entity.getSupplierId()); resultEntity.setDepartmentName(entity.getDepartmentName()); resultEntity.setIsLeaf(entity.getIsLeaf()); resultEntity.setTaskCount(taskCount); resultEntity.setUnfoolowCount(unfoolowCount); resultEntity.setTimeOutCount(timeOutCount); resultEntity.setFoolowCount(foolowCount); resultEntity.setQualityDeclinetaskCount(Integer.parseInt(qualityCountMap.get("qualityDeclinetaskCount"))); resultEntity.setQualityRisetaskCount(Integer.parseInt(qualityCountMap.get("qualityRisetaskCount"))); return resultEntity; } /** * 获取全部商机数 * @param filterMap * @param orgaId * @return */ protected Integer getTaskCount(HashMap<String, String> filterMap,String orgaId,Integer salesmanId,Boolean isSalesman) { Integer taskCount = 0; HashMap<String, String> dataMap = this.getDate(filterMap); String startDate = dataMap.get("startDate"); StringBuilder strSql=new StringBuilder(); strSql.append("SELECT COUNT(id) taskCount"); strSql.append(" from n_crm_customer_task"); if(isSalesman){ strSql.append(" where owner_id =" + salesmanId); }else { strSql.append(" where department_id in ("+orgaId+")"); } strSql.append(" AND create_time <= "+startDate); DataTable dtNewCount = departService.executeTable(strSql.toString(), null); for (IRow row : dtNewCount) { taskCount = Integer.parseInt(row.getString("taskCount")); } return taskCount; } /** * 获取待跟进商机数 * @param filterMap * @param orgaId * @return */ protected Integer getUnfoolowCount(HashMap<String, String> filterMap,String orgaId,Integer salesmanId,Boolean isSalesman) { Integer unfoolowCount = 0; HashMap<String, String> dataMap = this.getDate(filterMap); String startDate = dataMap.get("startDate"); StringBuilder strSql=new StringBuilder(); strSql.append("SELECT COUNT(id) unfoolowCount"); strSql.append(" from n_crm_customer_task"); if(isSalesman){ strSql.append(" where owner_id =" + salesmanId); }else { strSql.append(" where department_id in ("+orgaId+")"); } strSql.append(" AND next_foolow_time is not null"); strSql.append(" AND next_foolow_time = " + startDate); DataTable dtNewCount = departService.executeTable(strSql.toString(), null); for (IRow row : dtNewCount) { unfoolowCount = Integer.parseInt(row.getString("unfoolowCount")); } return unfoolowCount; } /** * 获取超时商机数 * @param filterMap * @param orgaId * @return */ protected Integer getTimeOutCount(HashMap<String, String> filterMap,String orgaId,Integer salesmanId,Boolean isSalesman) { Integer timeOutCount = 0; HashMap<String, String> dataMap = this.getDate(filterMap); String startDate = dataMap.get("startDate"); StringBuilder strSql=new StringBuilder(); strSql.append("SELECT COUNT(id) timeOutCount"); strSql.append(" from n_crm_customer_task"); if(isSalesman){ strSql.append(" where owner_id =" + salesmanId); }else { strSql.append(" where department_id in ("+orgaId+")"); } strSql.append(" AND foolow_status = 3"); strSql.append(" AND "+startDate+"> next_foolow_time"); DataTable dtNewCount = departService.executeTable(strSql.toString(), null); for (IRow row : dtNewCount) { timeOutCount = Integer.parseInt(row.getString("timeOutCount")); } return timeOutCount; } /** * 获取跟进商机数 * @param filterMap * @param orgaId * @return */ protected Integer getFoolowCount(HashMap<String, String> filterMap,String orgaId,Integer salesmanId,Boolean isSalesman) { Integer foolowCount = 0; HashMap<String, String> dataMap = this.getDate(filterMap); String startDate = dataMap.get("startDate"); StringBuilder strSql=new StringBuilder(); strSql.append("SELECT COUNT(id) foolowCount"); strSql.append(" from n_crm_customer_task"); if(isSalesman){ strSql.append(" where owner_id =" + salesmanId); }else { strSql.append(" where department_id in ("+orgaId+")"); } strSql.append(" AND next_foolow_time <= "+startDate); strSql.append(" AND foolow_status = 3"); DataTable dtNewCount = departService.executeTable(strSql.toString(), null); for (IRow row : dtNewCount) { foolowCount = Integer.parseInt(row.getString("foolowCount")); } return foolowCount; } /** * 获取质量上升、下降商机数 * @param filterMap * @param orgaId * @return */ protected Map<String, String> getQualityCount(HashMap<String, String> filterMap,String orgaId,Integer salesmanId,Boolean isSalesman) { Map<String, String> resultMap =new HashMap<>(); HashMap<String, String> dataMap = this.getDate(filterMap); String startDate = dataMap.get("startDate"); StringBuilder strSql=new StringBuilder(); strSql.append("SELECT count(quality_progress = 1 OR NULL) qualityRisetaskCount,"); strSql.append("count(intention_category = 2 OR NULL) qualityDeclinetaskCount"); strSql.append(" from n_crm_customer_task"); if(isSalesman){ strSql.append(" where owner_id =" + salesmanId); }else { strSql.append(" where department_id in ("+orgaId+")"); } strSql.append(" AND next_foolow_time <= "+startDate); DataTable dtNewCount = departService.executeTable(strSql.toString(), null); for (IRow row : dtNewCount) { resultMap.put("qualityRisetaskCount", row.getString("qualityRisetaskCount")); resultMap.put("qualityDeclinetaskCount", row.getString("qualityDeclinetaskCount")); } return resultMap; } }
[ "hwhping@163.com" ]
hwhping@163.com
23cbb5931b55cfb1039e4dd8de6979fd9cdfac7a
09a1b446848be8c3afd43af7d4b90a88950dc3c9
/EasyMock-Examples/src/test/java/com/journaldev/easymock/EasyMockVoidMethodExample.java
1001e37892d23889fd444a4f2006896a053aa6f6
[ "MIT" ]
permissive
vveturi/journaldev
13a9a1397fc6160b6a4165d352b03c59f03a5c5a
3c61e68bbc66665d7467ed1fa93e81b49a8df8ad
refs/heads/master
2020-03-23T20:19:20.006196
2018-07-23T12:10:05
2018-07-23T12:10:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
538
java
package com.journaldev.easymock; import static org.easymock.EasyMock.*; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.Test; import com.journaldev.utils.StringUtils; public class EasyMockVoidMethodExample { @Test public void test() { StringUtils mock = mock(StringUtils.class); mock.print(anyString()); expectLastCall().andAnswer(() -> { System.out.println("Mock Argument = "+getCurrentArguments()[0]); return null; }); replay(mock); mock.print("Java"); verify(mock); } }
[ "pankaj.0323@gmail.com" ]
pankaj.0323@gmail.com
88464602df1003ffa72108ff9250182a5542f9cf
daf12937ad7a1e0c33172551c9a1c367e94bf475
/spring-boot-mybatis-xml/src/main/java/com/yxm/web/dao/DemoMapper.java
3329166dd9b496486125251780ca9e000544a9af
[]
no_license
startshineye/Spring-Boot
7503bce9345e5f0063345289b97f25b3dedc414b
a502fa82ef745da0e406b272914e3eb30ede995e
refs/heads/master
2021-01-01T06:43:01.901992
2017-10-04T13:21:29
2017-10-04T13:21:29
97,492,958
0
0
null
null
null
null
UTF-8
Java
false
false
252
java
package com.yxm.web.dao; import java.util.List; import com.yxm.web.bean.Demo; public interface DemoMapper { void save(Demo demo); int deleteById(Integer id); Demo getById(Integer id); List<Demo> getAll(); int updateDemo(Demo demo); }
[ "13001955858@163.com" ]
13001955858@163.com
e2c52e1837b68fcaecc30d3304850dc3ded56c11
98d61e74003e599e70e5fe37829db567f2119c74
/jsystem-core-projects/jsystemApp/src/test/java/tests/jsystem/framework/sut/SutFactoryTest.java
470a36eb147aca8c59101b58461618c84419cc1e
[ "Apache-2.0" ]
permissive
Top-Q/jsystem
e3721e981fcdfa305c7d2679f98105124b705ff6
282064793b64dad8de685dd6d5332d5bd753f07b
refs/heads/master
2023-07-08T03:02:09.358983
2022-05-25T06:04:50
2022-05-25T06:04:50
6,123,437
35
53
Apache-2.0
2023-06-28T12:06:26
2012-10-08T11:33:14
Java
UTF-8
Java
false
false
364
java
/* * Copyright 2005-2010 Ignis Software Tools Ltd. All rights reserved. */ package tests.jsystem.framework.sut; import junit.framework.SystemTestCase; public class SutFactoryTest extends SystemTestCase{ public void testSutWorks() throws Exception{ assertEquals("Value doesn't much","10.10.10.10", sut().getValue("/sut/device1/ip/text()")); } }
[ "itai.agmon@gmail.com" ]
itai.agmon@gmail.com
aaccc90ddbaeab81a399acb6c55563b8fae4ae4b
4627d514d6664526f58fbe3cac830a54679749cd
/results/evosuite5/mockito-org.mockito.asm.tree.analysis.BasicInterpreter-9/org/mockito/asm/tree/analysis/BasicInterpreter_ESTest_scaffolding.java
99bb9e1ae5fc00e14d69e5d96c4aad3f598f219b
[]
no_license
STAMP-project/Cling-application
c624175a4aa24bb9b29b53f9b84c42a0f18631bd
0ff4d7652b434cbfd9be8d8bb38cfc8d8eaa51b5
refs/heads/master
2022-07-27T09:30:16.423362
2022-07-19T12:01:46
2022-07-19T12:01:46
254,310,667
2
2
null
2021-07-12T12:29:50
2020-04-09T08:11:35
null
UTF-8
Java
false
false
6,468
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Wed Jul 24 20:58:34 GMT 2019 */ package org.mockito.asm.tree.analysis; 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 BasicInterpreter_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 = "org.mockito.asm.tree.analysis.BasicInterpreter"; 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("user.dir", "/home/pderakhshanfar/botsing-integration-experiment"); java.lang.System.setProperty("java.io.tmpdir", "/tmp"); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(BasicInterpreter_ESTest_scaffolding.class.getClassLoader() , "org.mockito.asm.tree.LdcInsnNode", "org.mockito.asm.tree.LineNumberNode", "org.mockito.asm.tree.analysis.AnalyzerException", "org.mockito.asm.ClassReader", "org.mockito.asm.Type", "org.mockito.asm.tree.IntInsnNode", "org.mockito.asm.tree.VarInsnNode", "org.mockito.asm.tree.FrameNode", "org.mockito.asm.tree.analysis.BasicInterpreter", "org.mockito.asm.MethodWriter", "org.mockito.asm.tree.analysis.BasicValue", "org.mockito.asm.tree.InsnNode", "org.mockito.asm.tree.analysis.Interpreter", "org.mockito.asm.Opcodes", "org.mockito.asm.tree.LabelNode", "org.mockito.asm.tree.AbstractInsnNode", "org.mockito.asm.tree.FieldInsnNode", "org.mockito.asm.Label", "org.mockito.asm.tree.analysis.SourceValue", "org.mockito.asm.Attribute", "org.mockito.asm.AnnotationVisitor", "org.mockito.asm.tree.MultiANewArrayInsnNode", "org.mockito.asm.tree.IincInsnNode", "org.mockito.asm.ByteVector", "org.mockito.asm.tree.analysis.Value", "org.mockito.asm.Item", "org.mockito.asm.ClassVisitor", "org.mockito.asm.FieldVisitor", "org.mockito.asm.MethodVisitor", "org.mockito.asm.Frame", "org.mockito.asm.tree.JumpInsnNode", "org.mockito.asm.tree.LookupSwitchInsnNode", "org.mockito.asm.MethodAdapter", "org.mockito.asm.tree.TableSwitchInsnNode", "org.mockito.asm.ClassWriter", "org.mockito.asm.tree.TypeInsnNode", "org.mockito.asm.tree.MethodInsnNode", "org.mockito.asm.tree.analysis.SmallSet" ); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(BasicInterpreter_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "org.mockito.asm.tree.analysis.BasicInterpreter", "org.mockito.asm.Opcodes", "org.mockito.asm.Type", "org.mockito.asm.tree.analysis.BasicValue", "org.mockito.asm.tree.AbstractInsnNode", "org.mockito.asm.tree.MethodInsnNode", "org.mockito.asm.tree.analysis.SourceValue", "org.mockito.asm.tree.MultiANewArrayInsnNode", "org.mockito.asm.tree.TypeInsnNode", "org.mockito.asm.tree.FieldInsnNode", "org.mockito.asm.Label", "org.mockito.asm.tree.LabelNode", "org.mockito.asm.tree.LookupSwitchInsnNode", "org.mockito.asm.tree.IincInsnNode", "org.mockito.asm.tree.analysis.SmallSet", "org.mockito.asm.tree.VarInsnNode", "org.mockito.asm.MethodAdapter", "org.mockito.asm.Attribute", "org.mockito.asm.tree.IntInsnNode", "org.mockito.asm.tree.JumpInsnNode", "org.mockito.asm.tree.TableSwitchInsnNode", "org.mockito.asm.tree.LdcInsnNode", "org.mockito.asm.tree.LineNumberNode", "org.mockito.asm.tree.InsnNode", "org.mockito.asm.tree.FrameNode", "org.mockito.asm.tree.analysis.AnalyzerException" ); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
cb8dbd304f0f93a7d9c950d536ece8937670692f
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/29/29_cd291752d39eb3a9a050b6d0d0f9e13b81310a96/BurnIoChaosType/29_cd291752d39eb3a9a050b6d0d0f9e13b81310a96_BurnIoChaosType_t.java
1bb0ff960531e90191d4e72ed29e9c31fed107ed
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,730
java
/* * * Copyright 2013 Justin Santa Barbara. * * 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.netflix.simianarmy.chaos; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.netflix.simianarmy.MonkeyConfiguration; /** * Executes a disk I/O intensive program on the node, reducing I/O capacity. * * This simulates either a noisy neighbor on the box or just a general issue with the disk. */ public class BurnIoChaosType extends ScriptChaosType { /** The Constant LOGGER. */ private static final Logger LOGGER = LoggerFactory.getLogger(BurnIoChaosType.class); /** * Enhancement: It would be nice to target other devices than the root disk. * * Considerations: * 1) EBS activity costs money. * 2) The root may be on EBS anyway. * 3) If it's costing money, we might want to stop after a while to stop runaway charges. * * coryb suggested this, and proposed something like this: * * tmp=$(mktemp) * df -hl -x tmpfs | awk '/\//{print $6}' > $tmp * mount=$(sed -n $((RANDOM%$(wc -l < $tmp)+1))p $tmp) * rm $tmp * * And then of=$mount/burn * * An alternative might be to run df over SSH, parse it here, and then pass the desired * path to the script. This keeps the script simpler. I don't think there's an easy way * to tell the difference between an EBS volume and an instance volume other than from the * EC2 API. */ /** * Constructor. * * @param config * Configuration to use * @throws IOException */ public BurnIoChaosType(MonkeyConfiguration config) { super(config, "BurnIO"); } @Override public boolean canApply(ChaosInstance instance) { if (!super.canApply(instance)) { return false; } if (isRootVolumeEbs(instance)) { if (!isBurnMoneyEnabled()) { LOGGER.debug("Root volume is EBS so BurnIO would cost money; skipping"); return false; } } return true; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
a04083e58cfd00ad69532533c725973205df09e2
d504110d2237650b4a445417c80131915f303fe0
/netbeans/gas/common_ui/src/com/gas/common/ui/misc/api/IJEditorPaneService.java
2a6072d5c213f181ead8d234e7a6d69fc6d1516b
[]
no_license
duncan1201/VF
ab8741163bbff03962818cc1076cc35c1252bb03
095478313d2580925f7417dae6eb083d09636a30
refs/heads/master
2021-03-22T00:26:13.276478
2016-09-08T11:48:01
2016-09-08T11:48:01
32,251,044
0
0
null
null
null
null
UTF-8
Java
false
false
463
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.gas.common.ui.misc.api; import javax.swing.JEditorPane; /** * * @author dq */ public interface IJEditorPaneService { /** * @param contentType possible values: text/plain, text/html and text/rtf */ JEditorPane create(Boolean editable, String contentType); JEditorPane create(Boolean editable); JEditorPane create(); }
[ "dunqiang.liao@vectorfriends.com" ]
dunqiang.liao@vectorfriends.com
02633dad1806fc62ef37d87261fa51b604a45f6d
863acb02a064a0fc66811688a67ce3511f1b81af
/sources/com/google/android/gms/internal/ads/zzip.java
6e9d6fdb842bc1a6683aa2b4e0cddc1c2e2e8540
[ "MIT" ]
permissive
Game-Designing/Custom-Football-Game
98d33eb0c04ca2c48620aa4a763b91bc9c1b7915
47283462b2066ad5c53b3c901182e7ae62a34fc8
refs/heads/master
2020-08-04T00:02:04.876780
2019-10-06T06:55:08
2019-10-06T06:55:08
211,914,568
1
1
null
null
null
null
UTF-8
Java
false
false
415
java
package com.google.android.gms.internal.ads; import java.io.IOException; public interface zzip { /* renamed from: a */ int mo31844a(zzie zzie, int i) throws IOException, InterruptedException; /* renamed from: a */ void mo28863a(long j, int i, int i2, int i3, byte[] bArr); /* renamed from: a */ void mo31847a(zzhj zzhj); /* renamed from: a */ void mo31848a(zzkm zzkm, int i); }
[ "tusharchoudhary0003@gmail.com" ]
tusharchoudhary0003@gmail.com
0de1da5b2fe2c32b551dd7cbf2db86e4dcaca83d
3df2c0132487b6fff67fe2bcbf6dfa127d2cfb0b
/src/lectures/state_properties/ABMISpreadsheetTester.java
78ae2b8bac825c689579d22cd501b05fdf314447
[]
no_license
Dnam00/JavaTeaching
e899df112324c6b390d7f46f3113804a98152e9e
68647445ad774cbaabac9c154eb31b7bf8115a8b
refs/heads/master
2023-05-04T18:38:20.750596
2021-05-15T21:53:42
2021-05-15T21:53:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,543
java
package lectures.state_properties; import lectures.constructors_pointers.ABMISpreadsheet; public class ABMISpreadsheetTester { public void test (double theHeight, double theWeight, double theCorrectBMI) { ABMISpreadsheet bmiSpreadsheet = new ABMISpreadsheet(); bmiSpreadsheet.setHeight(1.77); bmiSpreadsheet.setWeight(75); double computedBMI = bmiSpreadsheet.getBMI(); System.out.println("------------"); System.out.println("Height:" + theHeight); System.out.println("Weight:" + theWeight); System.out.println("Expected BMI:" + theCorrectBMI); System.out.println("Computed BMI:" + computedBMI); System.out.println("Error:" + (theCorrectBMI - computedBMI)); System.out.println("------------"); } public void test2 (double theHeight, double theWeight, double theCorrectBMI) { ABMISpreadsheet bmiSpreadsheet = new ABMISpreadsheet(); bmiSpreadsheet.setHeight(theHeight); bmiSpreadsheet.setWeight(theWeight); double computedBMI = bmiSpreadsheet.getBMI(); System.out.println("------------"); System.out.println("Height:" + theHeight); System.out.println("Weight:" + theWeight); System.out.println("Expected BMI:" + theCorrectBMI); System.out.println("Computed BMI:" + computedBMI); System.out.println("Error:" + (theCorrectBMI - computedBMI)); System.out.println("------------"); } public void test () { test (1.65, 55, 20.0); test (1.55, 60, 25); test (1.80, 65, 20); } public static void main (String[] args) { ABMISpreadsheetTester tester = new ABMISpreadsheetTester(); } }
[ "dewan@cs.unc.edu" ]
dewan@cs.unc.edu