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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
65d1b6b2e94264822fa2802b747322ae5f4d4da4 | 9a617c22e35a5b87aea6104161b195ac91898970 | /kia-myCrm/src/com/cms/hibernate/customer/ent/Cusnote.java | 34b2d66a07491263ee5b606854d1342624029975 | [] | no_license | foxZhong/smartken-kia | e4d494d279086fc2ca8f654ae60150a3fda9637b | 40736a2debd6e1acada22ad8878fc129564c38ee | refs/heads/master | 2021-01-10T11:40:34.155108 | 2011-07-23T04:19:06 | 2011-07-23T04:19:06 | 54,441,775 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,148 | java | package com.cms.hibernate.customer.ent;
import java.sql.Timestamp;
/**
* Cusnote entity. @author MyEclipse Persistence Tools
*/
public class Cusnote implements java.io.Serializable {
// Fields
private Integer noteId;
private Integer noteCusid;
private Integer noteUserid;
private Timestamp noteTime;
private String noteAddr;
private String noteSummary;
private String noteInfo;
private String noteRemark;
// Constructors
/** default constructor */
public Cusnote() {
}
/** full constructor */
public Cusnote(Integer noteCusid, Integer noteUserid, Timestamp noteTime,
String noteAddr, String noteSummary, String noteInfo,
String noteRemark) {
this.noteCusid = noteCusid;
this.noteUserid = noteUserid;
this.noteTime = noteTime;
this.noteAddr = noteAddr;
this.noteSummary = noteSummary;
this.noteInfo = noteInfo;
this.noteRemark = noteRemark;
}
// Property accessors
public Integer getNoteId() {
return this.noteId;
}
public void setNoteId(Integer noteId) {
this.noteId = noteId;
}
public Integer getNoteCusid() {
return this.noteCusid;
}
public void setNoteCusid(Integer noteCusid) {
this.noteCusid = noteCusid;
}
public Integer getNoteUserid() {
return this.noteUserid;
}
public void setNoteUserid(Integer noteUserid) {
this.noteUserid = noteUserid;
}
public Timestamp getNoteTime() {
return this.noteTime;
}
public void setNoteTime(Timestamp noteTime) {
this.noteTime = noteTime;
}
public String getNoteAddr() {
return this.noteAddr;
}
public void setNoteAddr(String noteAddr) {
this.noteAddr = noteAddr;
}
public String getNoteSummary() {
return this.noteSummary;
}
public void setNoteSummary(String noteSummary) {
this.noteSummary = noteSummary;
}
public String getNoteInfo() {
return this.noteInfo;
}
public void setNoteInfo(String noteInfo) {
this.noteInfo = noteInfo;
}
public String getNoteRemark() {
return this.noteRemark;
}
public void setNoteRemark(String noteRemark) {
this.noteRemark = noteRemark;
}
} | [
"smartken0824@gmail.com"
] | smartken0824@gmail.com |
5edc2c5dfb95d2a9bdef1ba41f1ccab9725addc8 | 20eb62855cb3962c2d36fda4377dfd47d82eb777 | /IntroClassJava/dataset/median/c716ee619761838749589cbd08d5fd56830bff349039f8587e988a5b0cd6310e04844d8e0ee98c5ffee3275aa227bd2c92fcde0993637fcf3bfbd41a37378833/001/mutations/253/median_c716ee61_001.java | 18c51ff13e3cd39a27614dbb954f93cdff0063dd | [] | no_license | ozzydong/CapGen | 356746618848065cce4e253e5d3c381baa85044a | 0ba0321b6b1191443276021f1997833342f02515 | refs/heads/master | 2023-03-18T20:12:02.923428 | 2020-08-21T03:08:28 | 2020-08-21T03:08:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,366 | java | package introclassJava;
class IntObj {
public int value;
public IntObj () {
} public IntObj (int i) {
value = i;
}
}
class FloatObj {
public float value;
public FloatObj () {
} public FloatObj (float i) {
value = i;
}
}
class LongObj {
public long value;
public LongObj () {
} public LongObj (long i) {
value = i;
}
}
class DoubleObj {
public double value;
public DoubleObj () {
} public DoubleObj (double i) {
value = i;
}
}
class CharObj {
public char value;
public CharObj () {
} public CharObj (char i) {
value = i;
}
}
public class median_c716ee61_001 {
public java.util.Scanner scanner;
public String output = "";
public static void main (String[]args) throws Exception {
median_c716ee61_001 mainClass = new median_c716ee61_001 ();
String output;
if (args.length > 0) {
mainClass.scanner = new java.util.Scanner (args[0]);
} else {
mainClass.scanner = new java.util.Scanner (System.in);
}
mainClass.exec ();
System.out.println (mainClass.output);
}
public void exec () throws Exception {
IntObj A = new IntObj (), B = new IntObj (), C = new IntObj ();
output +=
(String.format ("Pleaes enter 3 numbers separated by spaces > "));
A.value = scanner.nextInt ();
B.value = scanner.nextInt ();
C.value = scanner.nextInt ();
if (A.value > B.value && A.value < C.value) {
output += (String.format ("%d is the median\n", A.value));
}
if (A.value > C.value && A.value < B.value) {
output += (String.format ("%d is the median\n", A.value));
}
if ((C.value) < (B.value) && B.value < A.value) {
output += (String.format ("%d is the median\n", B.value));
}
if (B.value > A.value && B.value < C.value) {
output += (String.format ("%d is the median\n", B.value));
}
if (C.value > A.value && C.value < B.value) {
output += (String.format ("%d is the median\n", C.value));
}
if (C.value > B.value && C.value < A.value) {
output += (String.format ("%d is the median\n", C.value));
}
if (true)
return;;
}
}
| [
"justinwm@163.com"
] | justinwm@163.com |
9ac6046f85e0276ffdefb2ec815e4a962b5555af | 17e8438486cb3e3073966ca2c14956d3ba9209ea | /dso/tags/2.4.6/code/base/dso-spring/tests.unit/com/tctest/spring/bean/BaseSingletonWithTransientField.java | 8a9ed94cc04e500ba3711cca61be8d61e797db32 | [] | no_license | sirinath/Terracotta | fedfc2c4f0f06c990f94b8b6c3b9c93293334345 | 00a7662b9cf530dfdb43f2dd821fa559e998c892 | refs/heads/master | 2021-01-23T05:41:52.414211 | 2015-07-02T15:21:54 | 2015-07-02T15:21:54 | 38,613,711 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 538 | java | /*
* All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
*/
package com.tctest.spring.bean;
public class BaseSingletonWithTransientField {
protected transient boolean transientValue;
public boolean isTransientValue() {
return transientValue;
}
public BaseSingletonWithTransientField() {
this.transientValue = true;
}
public void setTransientValue(boolean transientValue) {
this.transientValue = transientValue;
}
}
| [
"hhuynh@7fc7bbf3-cf45-46d4-be06-341739edd864"
] | hhuynh@7fc7bbf3-cf45-46d4-be06-341739edd864 |
b1b7d7e7f120570b00815165565d55e01c149cb7 | 995f73d30450a6dce6bc7145d89344b4ad6e0622 | /Honor5C-7.0/src/main/java/org/apache/xml/serializer/EncodingInfo.java | b22ce32ee703adf006198f01bb174ef124d4fe28 | [] | no_license | morningblu/HWFramework | 0ceb02cbe42585d0169d9b6c4964a41b436039f5 | 672bb34094b8780806a10ba9b1d21036fd808b8e | refs/heads/master | 2023-07-29T05:26:14.603817 | 2021-09-03T05:23:34 | 2021-09-03T05:23:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,315 | java | package org.apache.xml.serializer;
public final class EncodingInfo {
final String javaName;
private InEncoding m_encoding;
private final char m_highCharInContiguousGroup;
final String name;
private interface InEncoding {
boolean isInEncoding(char c);
boolean isInEncoding(char c, char c2);
}
private class EncodingImpl implements InEncoding {
private static final int RANGE = 128;
private InEncoding m_after;
private final boolean[] m_alreadyKnown;
private InEncoding m_before;
private final String m_encoding;
private final int m_explFirst;
private final int m_explLast;
private final int m_first;
private final boolean[] m_isInEncoding;
private final int m_last;
public boolean isInEncoding(char ch1) {
int codePoint = Encodings.toCodePoint(ch1);
if (codePoint < this.m_explFirst) {
if (this.m_before == null) {
this.m_before = new EncodingImpl(this.m_encoding, this.m_first, this.m_explFirst - 1, codePoint);
}
return this.m_before.isInEncoding(ch1);
} else if (this.m_explLast < codePoint) {
if (this.m_after == null) {
this.m_after = new EncodingImpl(this.m_encoding, this.m_explLast + 1, this.m_last, codePoint);
}
return this.m_after.isInEncoding(ch1);
} else {
int idx = codePoint - this.m_explFirst;
if (this.m_alreadyKnown[idx]) {
return this.m_isInEncoding[idx];
}
boolean ret = EncodingInfo.inEncoding(ch1, this.m_encoding);
this.m_alreadyKnown[idx] = true;
this.m_isInEncoding[idx] = ret;
return ret;
}
}
public boolean isInEncoding(char high, char low) {
int codePoint = Encodings.toCodePoint(high, low);
if (codePoint < this.m_explFirst) {
if (this.m_before == null) {
this.m_before = new EncodingImpl(this.m_encoding, this.m_first, this.m_explFirst - 1, codePoint);
}
return this.m_before.isInEncoding(high, low);
} else if (this.m_explLast < codePoint) {
if (this.m_after == null) {
this.m_after = new EncodingImpl(this.m_encoding, this.m_explLast + 1, this.m_last, codePoint);
}
return this.m_after.isInEncoding(high, low);
} else {
int idx = codePoint - this.m_explFirst;
if (this.m_alreadyKnown[idx]) {
return this.m_isInEncoding[idx];
}
boolean ret = EncodingInfo.inEncoding(high, low, this.m_encoding);
this.m_alreadyKnown[idx] = true;
this.m_isInEncoding[idx] = ret;
return ret;
}
}
private EncodingImpl(EncodingInfo this$0) {
this(this$0.javaName, 0, Integer.MAX_VALUE, 0);
}
private EncodingImpl(String encoding, int first, int last, int codePoint) {
this.m_alreadyKnown = new boolean[RANGE];
this.m_isInEncoding = new boolean[RANGE];
this.m_first = first;
this.m_last = last;
this.m_explFirst = codePoint;
this.m_explLast = codePoint + 127;
this.m_encoding = encoding;
if (EncodingInfo.this.javaName != null) {
int idx;
if (this.m_explFirst >= 0 && this.m_explFirst <= 127 && ("UTF8".equals(EncodingInfo.this.javaName) || "UTF-16".equals(EncodingInfo.this.javaName) || "ASCII".equals(EncodingInfo.this.javaName) || "US-ASCII".equals(EncodingInfo.this.javaName) || "Unicode".equals(EncodingInfo.this.javaName) || "UNICODE".equals(EncodingInfo.this.javaName) || EncodingInfo.this.javaName.startsWith("ISO8859"))) {
for (int unicode = 1; unicode < 127; unicode++) {
idx = unicode - this.m_explFirst;
if (idx >= 0 && idx < RANGE) {
this.m_alreadyKnown[idx] = true;
this.m_isInEncoding[idx] = true;
}
}
}
if (EncodingInfo.this.javaName == null) {
for (idx = 0; idx < this.m_alreadyKnown.length; idx++) {
this.m_alreadyKnown[idx] = true;
this.m_isInEncoding[idx] = true;
}
}
}
}
}
public boolean isInEncoding(char ch) {
if (this.m_encoding == null) {
this.m_encoding = new EncodingImpl();
}
return this.m_encoding.isInEncoding(ch);
}
public boolean isInEncoding(char high, char low) {
if (this.m_encoding == null) {
this.m_encoding = new EncodingImpl();
}
return this.m_encoding.isInEncoding(high, low);
}
public EncodingInfo(String name, String javaName, char highChar) {
this.name = name;
this.javaName = javaName;
this.m_highCharInContiguousGroup = highChar;
}
private static boolean inEncoding(char ch, String encoding) {
try {
return inEncoding(ch, new String(new char[]{ch}).getBytes(encoding));
} catch (Exception e) {
if (encoding == null) {
return true;
}
return false;
}
}
private static boolean inEncoding(char high, char low, String encoding) {
try {
return inEncoding(high, new String(new char[]{high, low}).getBytes(encoding));
} catch (Exception e) {
return false;
}
}
private static boolean inEncoding(char ch, byte[] data) {
if (data == null || data.length == 0) {
return false;
}
if (data[0] == null) {
return false;
}
if (data[0] != (byte) 63 || ch == '?') {
return true;
}
return false;
}
public final char getHighChar() {
return this.m_highCharInContiguousGroup;
}
}
| [
"dstmath@163.com"
] | dstmath@163.com |
27d701aacca261dfaa8753ee6b3cd1cb958cb289 | a8d2979e64b57f4ba22f9fa422f89968463691cf | /benchmarks/gam/gam/Eq/oldV.java | 3250b78226a9589103547d04e86e3849a4403b23 | [
"MIT"
] | permissive | kennyballou/EqBench | 3e23c092b805ac746a6e10fc26f12fb663ca9467 | 6c348374433f91d1fec9c3752ec658049a7d6b65 | refs/heads/main | 2023-04-02T19:19:50.053673 | 2021-03-26T22:24:15 | 2021-03-26T22:24:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,856 | java | package benchmarks.gam.gam.Eq;
public class oldV{
public static double betai(double a, double b, double x) {
double bt =0;
if (x == 0.0 || x == 1.0)
bt = 0.0;
else
bt = Math.exp(gammln(a + b) - gammln(a) - gammln(b) + a * Math.log(x) + b * Math.log(1.0 - x));
if (x < (a + 1.0) / (a + b + 2.0))
return bt * betacf(a, b, x) / a;
else
return 1.0 - bt * betacf(b, a, 1.0 - x) / b;
}
public static double betacf (double a,double b,double x) {
int MAXIT=100;
double EPS=1e-14;
double FPMIN=-7837383829242323.0/EPS;
int m=0;
int m2=0;
double aa=0;
double c=0;
double d=0;
double del=0;
double h=0;
double qab=0;
double qam=0;
double qap=0;
qab=a+b;
qap=a+1.0;
qam=a-1.0;
c=1.0;
d=1.0-qab*x/qap;
if (Math.abs(d) < FPMIN)
d=FPMIN;
d=1.0/d;
h=d;
for (m=1;m<=MAXIT;m++) {
m2=2*m;
aa=m*(b-m)*x/((qam+m2)*(a+m2));
d=1.0+aa*d;
if (Math.abs(d) < FPMIN)
d=FPMIN;
c=1.0+aa/c;
if (Math.abs(c) < FPMIN)
c=FPMIN;
d=1.0/d;
h *= d*c;
aa = -(a+m)*(qab+m)*x/((a+m2)*(qap+m2));
d=1.0+aa*d;
if (Math.abs(d) < FPMIN)
d=FPMIN;
c=1.0+aa/c;
if (Math.abs(c) < FPMIN)
c=FPMIN;
d=1.0/d;
del=d*c;
h *= del;
if (Math.abs(del-1.0) <= EPS)
break;
}
return h;
}
public static double gammln(double xx)
{
int j;
double x,y,tmp,ser;
final double[] cof={76.18009172947146,-86.50532032941677,
24.01409824083091,-1.231739572450155,0.1208650973866179e-2,
-0.5395239384953e-5};
y=x=xx;
tmp=x+5.5;
tmp -= (x+0.5)*Math.log(tmp);
ser=1.000000000190015;
for (j=0;j<6;j++) ser += cof[j]/++y;
return -tmp+Math.log(2.5066282746310005*ser/x);
}
} | [
"shr.badihi@gmail.com"
] | shr.badihi@gmail.com |
32bfa5d1a2a8e62b5d1f32f66ce9c81cbba6e0d5 | 4a39ab5ab4bf0914dbeb9f41e49852ff781968c6 | /org.entirej.ide.compatibility/src/org/entirej/framework/plugin/reports/containers/EJReportColumnContainer.java | 1c47ea2a548825f1e67fc83e28bac7e01870b26c | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | entirej/plugin | 2bb1ede5d7c167e2637d391c44bec4ca9feb6d26 | c65d49e4d38ef140ae54bed0b76e6e010e1e2d47 | refs/heads/develop | 2022-12-12T13:41:18.195896 | 2022-12-06T07:51:11 | 2022-12-06T07:51:11 | 14,260,908 | 1 | 1 | null | 2022-12-06T07:51:12 | 2013-11-09T16:54:57 | Java | UTF-8 | Java | false | false | 3,539 | java | /*******************************************************************************
* Copyright 2013 CRESOFT AG
*
* 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.
*
* Contributors: CRESOFT AG - initial API and implementation
******************************************************************************/
package org.entirej.framework.plugin.reports.containers;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.entirej.framework.plugin.reports.EJPluginReportBlockProperties;
import org.entirej.framework.plugin.reports.EJPluginReportColumnProperties;
public class EJReportColumnContainer
{
private List<EJPluginReportColumnProperties> _columnProperties;
private EJPluginReportBlockProperties _blockProperties;
public EJReportColumnContainer(EJPluginReportBlockProperties blockProperties)
{
_blockProperties = blockProperties;
_columnProperties = new ArrayList<EJPluginReportColumnProperties>();
}
public EJPluginReportBlockProperties getBlockProperties()
{
return _blockProperties;
}
public void addColumnProperties(EJPluginReportColumnProperties ColumnProperties)
{
if (ColumnProperties != null)
{
_columnProperties.add(ColumnProperties);
}
}
public void addColumnProperties(int index, EJPluginReportColumnProperties ColumnProperties)
{
if (ColumnProperties != null)
{
_columnProperties.add(index, ColumnProperties);
}
}
public List<EJPluginReportColumnProperties> getAllColumnProperties()
{
return _columnProperties;
}
public boolean contains(String name)
{
Iterator<EJPluginReportColumnProperties> iti = _columnProperties.iterator();
while (iti.hasNext())
{
EJPluginReportColumnProperties Column = iti.next();
if (Column.getName() != null && Column.getName().equalsIgnoreCase(name))
{
return true;
}
}
return false;
}
public EJPluginReportColumnProperties getColumnProperties(String name)
{
Iterator<EJPluginReportColumnProperties> props = _columnProperties.iterator();
while (props.hasNext())
{
EJPluginReportColumnProperties Column = props.next();
if (Column.getName().equalsIgnoreCase(name))
{
return Column;
}
}
return null;
}
public int getColumnCount()
{
return _columnProperties.size();
}
public int removeColumn(EJPluginReportColumnProperties column)
{
int indexOf = _columnProperties.indexOf(column);
_columnProperties.remove(column);
return indexOf;
}
}
| [
"theanuradha@gmail.com"
] | theanuradha@gmail.com |
895ed022905d15b53e7bd9ae75898675b8801c81 | beffc6542dc4bf85946ceca7cca4a31ac230d376 | /spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/tunnel/server/StaticPortProviderTests.java | 64087acd7eed62db2e3cc8393c8a25859de9288c | [
"Apache-2.0"
] | permissive | ZhouKaiDongGitHub/spring-boot-2.0.x | 4395970b183eff7321748d4ad0155784aa94eaa6 | 3f443764747c4ee01085bed6381292fa44744a49 | refs/heads/master | 2023-01-07T07:27:51.067468 | 2020-09-13T07:13:04 | 2020-09-13T07:13:04 | 215,676,265 | 1 | 0 | Apache-2.0 | 2022-12-27T14:52:46 | 2019-10-17T01:24:02 | Java | UTF-8 | Java | false | false | 1,346 | java | /*
* Copyright 2012-2019 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.boot.devtools.tunnel.server;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Tests for {@link StaticPortProvider}.
*
* @author Phillip Webb
*/
public class StaticPortProviderTests {
@Rule
public ExpectedException thrown = ExpectedException.none();
@Test
public void portMustBePositive() {
this.thrown.expect(IllegalArgumentException.class);
this.thrown.expectMessage("Port must be positive");
new StaticPortProvider(0);
}
@Test
public void getPort() {
StaticPortProvider provider = new StaticPortProvider(123);
assertThat(provider.getPort()).isEqualTo(123);
}
}
| [
"Kaidong.Zhou@eisgroup.com"
] | Kaidong.Zhou@eisgroup.com |
590b62dcd0bb1927476aae937e6ca60d8345973d | 3c178b1dbb44237afe8d435336a265a73f4d66ea | /com/example/android/apis/text/LogTextBox.java | c78b54b703a15204a7180f23a302f8560a8efa93 | [] | no_license | AndroidSDKSources/android-sdk-sources-for-api-level-5 | b7806884853389ff288b3adbdaf28f14893549a0 | baef9e37c1298f278f4fc212b9910810bf262a0b | refs/heads/master | 2021-01-15T15:05:15.383833 | 2015-06-13T15:27:01 | 2015-06-13T15:27:01 | 37,376,449 | 3 | 2 | null | null | null | null | UTF-8 | Java | false | false | 2,002 | java | /*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by 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.example.android.apis.text;
import android.widget.TextView;
import android.content.Context;
import android.text.method.ScrollingMovementMethod;
import android.text.method.MovementMethod;
import android.text.method.KeyListener;
import android.text.method.TransformationMethod;
import android.text.Editable;
import android.util.AttributeSet;
import java.util.Map;
/**
* This is a TextView that is Editable and by default scrollable,
* like EditText without a cursor.
*
* <p>
* <b>XML attributes</b>
* <p>
* See
* {@link android.R.styleable#TextView TextView Attributes},
* {@link android.R.styleable#View View Attributes}
*/
public class LogTextBox extends TextView {
public LogTextBox(Context context) {
this(context, null);
}
public LogTextBox(Context context, AttributeSet attrs) {
this(context, attrs, android.R.attr.textViewStyle);
}
public LogTextBox(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
@Override
protected MovementMethod getDefaultMovementMethod() {
return ScrollingMovementMethod.getInstance();
}
@Override
public Editable getText() {
return (Editable) super.getText();
}
@Override
public void setText(CharSequence text, BufferType type) {
super.setText(text, BufferType.EDITABLE);
}
}
| [
"root@ifeegoo.com"
] | root@ifeegoo.com |
69cd0fff9a3c12d5bde81f20e230c9427cf91aad | a979648f1df21971202f6afa4a9c3732cce842af | /src/test/java/com/jsoniter/suite/NonStreamingTests4Hash.java | bc4eb26999cface94284f5904f2f4f51bc5f74f8 | [
"MIT"
] | permissive | Wurrly/jsoniter | f7387aa82064a080d7769e0d154e5318d3b9ccc3 | 2beb06f239159ac2d4d19c1b24653784b473f8db | refs/heads/master | 2021-01-19T14:36:28.599382 | 2017-04-25T15:05:19 | 2017-04-25T15:05:19 | 88,172,580 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 721 | java | package com.jsoniter.suite;
import com.jsoniter.DecodingMode;
import com.jsoniter.JsonIterator;
import com.jsoniter.StreamingCategory;
import com.jsoniter.output.EncodingMode;
import com.jsoniter.output.JsonStream;
import org.junit.BeforeClass;
import org.junit.experimental.categories.Categories;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Categories.class)
@Categories.ExcludeCategory(StreamingCategory.class)
@Suite.SuiteClasses({AllTestCases.class})
public class NonStreamingTests4Hash {
@BeforeClass
public static void setup() {
JsonStream.setMode(EncodingMode.DYNAMIC_MODE);
JsonIterator.setMode(DecodingMode.DYNAMIC_MODE_AND_MATCH_FIELD_WITH_HASH);
}
}
| [
"taowen@gmail.com"
] | taowen@gmail.com |
87749efc387024889d3f4491991606fa8bf09e85 | bad6d848b0f70e4d18bc875ab94b6162a26707b6 | /778-JEETT/0902-dukes-bookstore-jsf/src/main/java/jeetutorial/dukesbookstore/jsf/listeners/Data.java | 467c156ec7c4e36c8ef98e4cdf508f137294f382 | [] | no_license | naaspati-practicing/learning-jee | a4584c98282cc286b6808037a5157ebbfbffecb3 | f5598b7d271e2c60e19d7d54924d4d39da2c282f | refs/heads/master | 2020-04-18T23:26:08.362579 | 2019-04-12T20:36:27 | 2019-04-12T20:36:27 | 167,821,461 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 519 | java | package jeetutorial.dukesbookstore.jsf.listeners;
import java.util.HashMap;
import java.util.Map;
public class Data {
private final Map<String, Long> books = new HashMap<>(6);
public Data() {
books.put("Duke", Long.valueOf(201));
books.put("Jeeves", Long.valueOf(202));
books.put("Masterson", Long.valueOf(203));
books.put("Novation", Long.valueOf(205));
books.put("Thrilled", Long.valueOf(206));
books.put("Coding", Long.valueOf(207));
}
public Long get(String key) {
return books.get(key);
}
}
| [
"naaspati@gmail.com"
] | naaspati@gmail.com |
eba33d44c227cde4c5ae806308d9e556d1b5e04d | bec686b9c0c0d95c99095097a5e604c5ef01828b | /jpa/TCK_1.0/src/com/sun/ts/tests/ejb30/persistence/callback/listeneroverride/Product.java | 448c33c19293ac9bf94c3dfe74e1d237fb8c9fa1 | [
"Apache-2.0"
] | permissive | datanucleus/tests | d6bcbcf2df68841c1a27625a5509b87fa9ccfc9e | b47ac565c5988aba5c16389fb2870aafe9142522 | refs/heads/master | 2023-09-02T11:24:56.386187 | 2023-08-16T12:30:38 | 2023-08-16T12:30:38 | 14,927,016 | 10 | 18 | Apache-2.0 | 2023-09-13T14:01:00 | 2013-12-04T15:10:03 | Java | UTF-8 | Java | false | false | 2,208 | java | /*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
/*
* @(#)Product.java 1.1 06/03/27
*/
package com.sun.ts.tests.ejb30.persistence.callback.listeneroverride;
import javax.persistence.Table;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import com.sun.ts.tests.ejb30.persistence.callback.common.CallbackStatusIF;
import com.sun.ts.tests.ejb30.persistence.callback.common.CallbackStatusImpl;
import com.sun.ts.tests.ejb30.persistence.callback.common.ListenerB;
import com.sun.ts.tests.ejb30.persistence.callback.common.ListenerC;
@Entity
@Table(name="PRODUCT_TABLE")
//@EntityListeners({ListenerB.class, ListenerC.class})
@EntityListeners({ListenerC.class, ListenerB.class})
public class Product extends CallbackStatusImpl
implements java.io.Serializable, CallbackStatusIF {
private String id;
private String name;
private double price;
private int quantity;
private long partNumber;
public Product() {
super();
}
public Product(String id, String name, double price, int quantity, long partNumber) {
this.id = id;
this.name = name;
this.price = price;
this.quantity = quantity;
this.partNumber = partNumber;
}
@Id
@Column(name="ID")
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
@Column(name="NAME")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Column(name="PRICE")
public double getPrice() {
return price;
}
public void setPrice(double price) {
this.price = price;
}
@Column(name="QUANTITY")
public int getQuantity() {
return quantity;
}
public void setQuantity(int v) {
this.quantity = v;
}
@Column(name="PNUM")
public long getPartNumber() {
return partNumber;
}
public void setPartNumber(long v) {
this.partNumber = v;
}
}
| [
"andy@datanucleus.org"
] | andy@datanucleus.org |
3ca74b5635a820160b498005a36b8921ea9d5322 | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/TIME-7b-5-15-PESA_II-WeightedSum:TestLen:CallDiversity/org/joda/time/format/DateTimeParserBucket_ESTest.java | 9d2bdff0f68796ed4c93c0eaf7f0d84d20732a76 | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,156 | java | /*
* This file was automatically generated by EvoSuite
* Mon Jan 20 00:51:05 UTC 2020
*/
package org.joda.time.format;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import java.util.Locale;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.joda.time.Chronology;
import org.joda.time.DateTimeFieldType;
import org.joda.time.format.DateTimeParserBucket;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class DateTimeParserBucket_ESTest extends DateTimeParserBucket_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
Integer integer0 = new Integer(270);
DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket(270, (Chronology) null, (Locale) null, integer0);
DateTimeFieldType dateTimeFieldType0 = DateTimeFieldType.dayOfYear();
dateTimeParserBucket0.saveField(dateTimeFieldType0, (String) null, (Locale) null);
// Undeclared exception!
dateTimeParserBucket0.computeMillis();
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
91e178e6b5e74717a2fab5fac769551cb7cb038b | 8b22bbb1e37acdb03640d3aee57cf415af609d79 | /src/com/codegym/task/task04/task0410/Solution.java | 214ba8e1e5ad4ea55f4626b4be828987290d2234 | [] | no_license | kuddleman/code-gym-java-syntax | 61841ceca63f872cb19ab2ad98e4323cc889872e | d2acea0dd40a1788729f976fb71f6a5d0a87d7f0 | refs/heads/main | 2023-02-24T17:37:11.354362 | 2021-01-29T17:55:09 | 2021-01-29T17:55:09 | 334,222,336 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 516 | java | package com.codegym.task.task04.task0410;
/*
Come on, lucky seven!
*/
public class Solution {
public static void main(String[] args) {
checkInterval(60);
checkInterval(112);
checkInterval(10);
}
public static void checkInterval(int a) {
//write your code here
if ( a >= 50 && a <= 100)
System.out.println("The number " + a + " is in the interval.");
else
System.out.println("The number " + a + " is not in the interval." );
}
} | [
"edl1155@gmail.com"
] | edl1155@gmail.com |
bd68e04ad70f187d5477f0b8aeb9fad2aa1eaecf | f9217add588cf1c67e5832d438124368f00b5c3b | /src/main/java/w/fujiko/util/common/generator/slips/WorkingSiteSlipNumGenerator.java | cf94d65e1e13a28374e0c09945b5d0007ac04ef8 | [] | no_license | wekenche/winsgatePractice2 | 6150a7ce929863d0592f364bf4a249d399d52941 | cd7a9f6ef0555c97da12f08b6909d1d65507ae6b | refs/heads/master | 2020-04-21T16:14:24.218477 | 2019-02-08T06:36:26 | 2019-02-08T06:36:26 | 169,694,302 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,364 | java | package w.fujiko.util.common.generator.slips;
import java.util.Date;
import java.util.Optional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import w.fujiko.exceptions.SlipNumberGenerationException;
import w.fujiko.model.masters.users.User;
import w.fujiko.model.transactions.numbergens.WorkingSiteNumberGenerator;
import w.fujiko.service.transactions.numgens.WorkingSiteNumberGeneratorService;
import w.fujiko.service.users.UserService;
@Service
public class WorkingSiteSlipNumGenerator implements SlipNumberGenerator{
private @Autowired WorkingSiteNumberGeneratorService workingSiteNumberGeneratorService;
private @Autowired UserService userService;
private Integer userId;
public WorkingSiteSlipNumGenerator(){}
public WorkingSiteSlipNumGenerator(Integer userId){
this.userId = userId;
}
public void setUserId(Integer userId){
this.userId = userId;
}
@Override
public String generate() throws SlipNumberGenerationException {
return generate(this.userId);
}
@Override
public String generate(Integer userId) throws SlipNumberGenerationException {
Optional<User> userGetResult = userService.get(userId);
if(!userGetResult.isPresent())
throw new SlipNumberGenerationException("User id: '"+userId+"' doesn't exist.");
this.deleteExistingUserId(userId); //delete existing record by userId
User user = userGetResult.get();
WorkingSiteNumberGenerator workingSiteNumberGenerator = new WorkingSiteNumberGenerator();
workingSiteNumberGenerator.setDateGenerated(new Date());
workingSiteNumberGenerator.setUser(user);
workingSiteNumberGeneratorService.saveOrUpdate(workingSiteNumberGenerator);
return formattedString(user.getCode(),workingSiteNumberGenerator.getSlipNo());
}
//deletes record by userId
private void deleteExistingUserId(Integer userId){
workingSiteNumberGeneratorService.deleteByUserID(userId);
}
//sample output: 40000007
private String formattedString(short userCode,int slipNumber){
return String.valueOf(String.valueOf(userCode)
.charAt(0))
.concat(String.format("%06d", slipNumber));
}
} | [
"louiem@windsgate.com"
] | louiem@windsgate.com |
a1078a3bbee43014065241a956fa47f984a00bdc | dbf5adca095d04d7d069ecaa916e883bc1e5c73d | /x_bbs_assemble_control/src/main/java/com/x/bbs/assemble/control/factory/BBSUserRoleFactory.java | 3dcbab7988360534f0660f1f66767eadf46a8358 | [
"BSD-3-Clause"
] | permissive | fancylou/o2oa | 713529a9d383de5d322d1b99073453dac79a9353 | e7ec39fc586fab3d38b62415ed06448e6a9d6e26 | refs/heads/master | 2020-03-25T00:07:41.775230 | 2018-08-02T01:40:40 | 2018-08-02T01:40:40 | 143,169,936 | 0 | 0 | BSD-3-Clause | 2018-08-01T14:49:45 | 2018-08-01T14:49:44 | null | UTF-8 | Java | false | false | 6,088 | java | package com.x.bbs.assemble.control.factory;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;
import com.x.base.core.exception.ExceptionWhen;
import com.x.base.core.utils.annotation.MethodDescribe;
import com.x.bbs.assemble.control.AbstractFactory;
import com.x.bbs.assemble.control.Business;
import com.x.bbs.entity.BBSUserRole;
import com.x.bbs.entity.BBSUserRole_;
/**
* 类 名:BBSUserRoleFactory<br/>
* 实体类:BBSUserRole<br/>
* 作 者:Liyi<br/>
* 单 位:O2 Team<br/>
* 日 期:2016-08-10 17:17:26
**/
public class BBSUserRoleFactory extends AbstractFactory {
public BBSUserRoleFactory(Business business) throws Exception {
super(business);
}
@MethodDescribe( "获取指定Id的BBSUserRole实体信息对象" )
public BBSUserRole get( String id ) throws Exception {
return this.entityManagerContainer().find( id, BBSUserRole.class, ExceptionWhen.none );
}
@MethodDescribe( "列示指定Id的BBSUserRole实体信息列表" )
public List<BBSUserRole> list(List<String> ids) throws Exception {
if( ids == null || ids.size() == 0 ){
return new ArrayList<BBSUserRole>();
}
EntityManager em = this.entityManagerContainer().get(BBSUserRole.class);
CriteriaBuilder cb = em.getCriteriaBuilder();
CriteriaQuery<BBSUserRole> cq = cb.createQuery(BBSUserRole.class);
Root<BBSUserRole> root = cq.from(BBSUserRole.class);
Predicate p = root.get(BBSUserRole_.id).in(ids);
return em.createQuery(cq.where(p)).getResultList();
}
@MethodDescribe( "列示全部的BBSUserRole实体信息列表" )
public List<BBSUserRole> listAll() throws Exception {
EntityManager em = this.entityManagerContainer().get(BBSUserRole.class);
CriteriaBuilder cb = em.getCriteriaBuilder();
CriteriaQuery<BBSUserRole> cq = cb.createQuery(BBSUserRole.class);
return em.createQuery( cq ).setMaxResults( 5000 ).getResultList();
}
@MethodDescribe( "根据绑定对象唯一标识以及绑定对象类别查询所有绑定的角色ID列表" )
public List<String> listRoleIdsByObjectUniqueId( String uniqueId, String objectType ) throws Exception {
if( uniqueId == null || uniqueId.isEmpty() ){
throw new Exception("uniqueId is null!");
}
if( objectType == null || objectType.isEmpty() ){
throw new Exception("objectType is null!");
}
EntityManager em = this.entityManagerContainer().get( BBSUserRole.class );
CriteriaBuilder cb = em.getCriteriaBuilder();
CriteriaQuery<String> cq = cb.createQuery( String.class );
Root<BBSUserRole> root = cq.from( BBSUserRole.class );
Predicate p = cb.equal( root.get( BBSUserRole_.uniqueId ), uniqueId );
p = cb.and( p, cb.equal( root.get( BBSUserRole_.objectType ), objectType ));
cq.select( root.get( BBSUserRole_.roleId ) );
return em.createQuery( cq.where(p) ).getResultList();
}
@MethodDescribe( "根据绑定对象唯一标识以及绑定对象类别查询所有绑定的角色编码列表" )
public List<String> listRoleCodeByObjectUniqueId( String uniqueId, String objectType ) throws Exception {
if( uniqueId == null || uniqueId.isEmpty() ){
throw new Exception("uniqueId is null!");
}
if( objectType == null || objectType.isEmpty() ){
throw new Exception("objectType is null!");
}
EntityManager em = this.entityManagerContainer().get( BBSUserRole.class );
CriteriaBuilder cb = em.getCriteriaBuilder();
CriteriaQuery<String> cq = cb.createQuery( String.class );
Root<BBSUserRole> root = cq.from( BBSUserRole.class );
Predicate p = cb.equal( root.get( BBSUserRole_.uniqueId ), uniqueId );
p = cb.and( p, cb.equal( root.get( BBSUserRole_.objectType ), objectType ));
cq.select( root.get( BBSUserRole_.roleCode ) );
return em.createQuery( cq.where(p) ).getResultList();
}
@MethodDescribe( "根据角色编码查询所有的人员角色绑定信息对象ID列表" )
public List<String> listIdsByRoleCode( String roleCode ) throws Exception {
if( roleCode == null || roleCode.isEmpty() ){
throw new Exception("roleCode is null!");
}
EntityManager em = this.entityManagerContainer().get( BBSUserRole.class );
CriteriaBuilder cb = em.getCriteriaBuilder();
CriteriaQuery<String> cq = cb.createQuery( String.class );
Root<BBSUserRole> root = cq.from( BBSUserRole.class );
Predicate p = cb.equal( root.get( BBSUserRole_.roleCode ), roleCode );
cq.select( root.get( BBSUserRole_.id ) );
return em.createQuery( cq.where(p) ).getResultList();
}
@MethodDescribe( "根据指定的绑定对象唯一标识列表查询在该对象上绑定的所有角色ID列表" )
public List<String> listRoleIdsByObjectUnique(List<String> objectUniqueIds) throws Exception {
if( objectUniqueIds == null || objectUniqueIds.isEmpty() ){
return null;
}
EntityManager em = this.entityManagerContainer().get( BBSUserRole.class );
CriteriaBuilder cb = em.getCriteriaBuilder();
CriteriaQuery<String> cq = cb.createQuery( String.class );
Root<BBSUserRole> root = cq.from( BBSUserRole.class );
Predicate p = root.get( BBSUserRole_.uniqueId ).in( objectUniqueIds );
cq.select( root.get( BBSUserRole_.roleId ) );
return em.createQuery( cq.where(p) ).getResultList();
}
@MethodDescribe( "根据指定的绑定对象唯一标识列表查询在该对象上绑定的所有角色编码列表" )
public List<String> listRoleCodesByObjectUnique( List<String> objectUniqueIds ) throws Exception {
if( objectUniqueIds == null || objectUniqueIds.isEmpty() ){
return null;
}
EntityManager em = this.entityManagerContainer().get( BBSUserRole.class );
CriteriaBuilder cb = em.getCriteriaBuilder();
CriteriaQuery<String> cq = cb.createQuery( String.class );
Root<BBSUserRole> root = cq.from( BBSUserRole.class );
Predicate p = root.get( BBSUserRole_.uniqueId ).in( objectUniqueIds );
cq.select( root.get( BBSUserRole_.roleCode ) );
return em.createQuery( cq.where(p) ).getResultList();
}
}
| [
"caixiangyi2004@126.com"
] | caixiangyi2004@126.com |
163fd890b88e6938c9636bc8bf22fb612d2f3b7c | 226ed897ade682e5d12b7269af94a5c98112af0c | /app/src/main/java/com/likeit/aqe365/view/CustomTagLayout.java | 0c5925710fbc2886ef590c18d239e2f2e3f03748 | [] | no_license | sengeiou/aoquannew | 7948c90f496d297604d14eb64f413db48e070c2e | f80ce0c4af1c9024eddeb6325d17074ce9145703 | refs/heads/master | 2022-02-01T10:32:24.422057 | 2019-07-05T06:30:18 | 2019-07-05T06:30:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,249 | java | package com.likeit.aqe365.view;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import java.util.ArrayList;
import java.util.List;
public class CustomTagLayout extends ViewGroup {
public CustomTagLayout(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
protected LayoutParams generateLayoutParams(LayoutParams p) {
return new MarginLayoutParams(p);
}
@Override
public LayoutParams generateLayoutParams(AttributeSet attrs) {
return new MarginLayoutParams(getContext(), attrs);
}
@Override
protected LayoutParams generateDefaultLayoutParams() {
return new MarginLayoutParams(LayoutParams.MATCH_PARENT,
LayoutParams.MATCH_PARENT);
}
/**
* 负责设置子控件的测量模式和大小 根据所有子控件设置自己的宽和高
*/
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
// 获得它的父容器为它设置的测量模式和大小
int sizeWidth = MeasureSpec.getSize(widthMeasureSpec);
int sizeHeight = MeasureSpec.getSize(heightMeasureSpec);
int modeWidth = MeasureSpec.getMode(widthMeasureSpec);
int modeHeight = MeasureSpec.getMode(heightMeasureSpec);
// Log.e(TAG, sizeWidth + "," + sizeHeight);
// 如果是warp_content情况下,记录宽和高
int width = 0;
int height = 0;
/**
* 记录每一行的宽度,width不断取最大宽度
*/
int lineWidth = 0;
/**
* 每一行的高度,累加至height
*/
int lineHeight = 0;
int cCount = getChildCount();
// 遍历每个子元素
for (int i = 0; i < cCount; i++) {
View child = getChildAt(i);
// 测量每一个child的宽和高
measureChild(child, widthMeasureSpec, heightMeasureSpec);
// 得到child的lp
MarginLayoutParams lp = (MarginLayoutParams) child
.getLayoutParams();
// 当前子空间实际占据的宽度
int childWidth = child.getMeasuredWidth() + lp.leftMargin
+ lp.rightMargin;
// 当前子空间实际占据的高度
int childHeight = child.getMeasuredHeight() + lp.topMargin
+ lp.bottomMargin;
/**
* 如果加入当前child,则超出最大宽度,则的到目前最大宽度给width,类加height 然后开启新行
*/
if (lineWidth + childWidth > sizeWidth) {
width = Math.max(lineWidth, childWidth);// 取最大的
lineWidth = childWidth; // 重新开启新行,开始记录
// 叠加当前高度,
height += lineHeight;
// 开启记录下一行的高度
lineHeight = childHeight;
} else {
// 否则累加值lineWidth,lineHeight取最大高度
lineWidth += childWidth;
lineHeight = Math.max(lineHeight, childHeight);
}
// 如果是最后一个,则将当前记录的最大宽度和当前lineWidth做比较
if (i == cCount - 1) {
width = Math.max(width, lineWidth);
height += lineHeight;
}
}
setMeasuredDimension((modeWidth == MeasureSpec.EXACTLY) ? sizeWidth : width,
(modeHeight == MeasureSpec.EXACTLY) ? sizeHeight : height);
}
/**
* 存储所有的View,按行记录
*/
private List<List<View>> mAllViews = new ArrayList<List<View>>();
public List<List<View>> getmAllViews() {
return mAllViews;
}
public void setmAllViews(List<List<View>> mAllViews) {
this.mAllViews = mAllViews;
}
/**
* 记录每一行的最大高度
*/
private List<Integer> mLineHeight = new ArrayList<Integer>();
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
mAllViews.clear();
mLineHeight.clear();
int width = getWidth();
int lineWidth = 0;
int lineHeight = 0;
// 存储每一行所有的childView
List<View> lineViews = new ArrayList<View>();
int cCount = getChildCount();
// 遍历所有的孩子
for (int i = 0; i < cCount; i++) {
View child = getChildAt(i);
MarginLayoutParams lp = (MarginLayoutParams) child
.getLayoutParams();
int childWidth = child.getMeasuredWidth();
int childHeight = child.getMeasuredHeight();
// 如果已经需要换行
if (childWidth + lp.leftMargin + lp.rightMargin + lineWidth > width) {
// 记录这一行所有的View以及最大高度
mLineHeight.add(lineHeight);
// 将当前行的childView保存,然后开启新的ArrayList保存下一行的childView
mAllViews.add(lineViews);
lineWidth = 0;// 重置行宽
lineViews = new ArrayList<View>();
}
/**
* 如果不需要换行,则累加
*/
lineWidth += childWidth + lp.leftMargin + lp.rightMargin;
lineHeight = Math.max(lineHeight, childHeight + lp.topMargin + lp.bottomMargin);
lineViews.add(child);
}
// 记录最后一行
mLineHeight.add(lineHeight);
mAllViews.add(lineViews);
int left = 0;
int top = 0;
// 得到总行数
int lineNums = mAllViews.size();
for (int i = 0; i < lineNums; i++) {
// 每一行的所有的views
lineViews = mAllViews.get(i);
// 当前行的最大高度
lineHeight = mLineHeight.get(i);
// Log.e(TAG, "第" + i + "行 :" + lineViews.size() + " , " + lineViews);
// Log.e(TAG, "第" + i + "行, :" + lineHeight);
// 遍历当前行所有的View
for (int j = 0; j < lineViews.size(); j++) {
View child = lineViews.get(j);
if (child.getVisibility() == View.GONE) {
continue;
}
MarginLayoutParams lp = (MarginLayoutParams) child
.getLayoutParams();
//计算childView的left,top,right,bottom
int lc = left + lp.leftMargin;
int tc = top + lp.topMargin;
int rc = lc + child.getMeasuredWidth();
int bc = tc + child.getMeasuredHeight();
// Log.e(TAG, child + " , l = " + lc + " , t = " + t + " , r ="
// + rc + " , b = " + bc);
child.layout(lc, tc, rc, bc);
left += child.getMeasuredWidth() + lp.rightMargin
+ lp.leftMargin;
}
left = 0;
top += lineHeight;
}
}
}
| [
"931317632@qq.com"
] | 931317632@qq.com |
8ef06aa94f30a1bf7d8f01cf13c8ac3356b91c37 | 5e3b3804a3f3e42cae3711f3b089a3684f92c4be | /plugin-niassa+pinery/src/main/java/ca/on/oicr/gsi/shesmu/niassa/CromwellCall.java | a7dce0eec324dd6f83c9b6c994a9079107eb2340 | [
"MIT"
] | permissive | gitter-badger/shesmu | 8a9a8a2ae88ffa7e82908f13589f51a4d10e04da | 0e2eb9483ed65045f30344a71919a9d523dd5bf9 | refs/heads/master | 2022-09-30T14:54:52.247073 | 2020-05-29T13:46:03 | 2020-06-02T17:38:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 971 | java | package ca.on.oicr.gsi.shesmu.niassa;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
@JsonIgnoreProperties(ignoreUnknown = true)
public class CromwellCall {
private int attempt;
private String callRoot;
private String shardIndex;
private String stderr;
private String stdout;
public int getAttempt() {
return attempt;
}
public String getCallRoot() {
return callRoot;
}
public String getShardIndex() {
return shardIndex;
}
public String getStderr() {
return stderr;
}
public String getStdout() {
return stdout;
}
public void setAttempt(int attempt) {
this.attempt = attempt;
}
public void setCallRoot(String callRoot) {
this.callRoot = callRoot;
}
public void setShardIndex(String shardIndex) {
this.shardIndex = shardIndex;
}
public void setStderr(String stderr) {
this.stderr = stderr;
}
public void setStdout(String stdout) {
this.stdout = stdout;
}
}
| [
"andre@masella.name"
] | andre@masella.name |
fc7b9ce26bc4e803be9e8a7249a0ce36b812c104 | c59f24c507d30bbb80f39e9a4f120fec26a43439 | /hbase-src-1.2.1/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/master/MetricsSnapshotSourceImpl.java | c2fc6b9fcb67d0a91f0471f73b93b818c577808f | [
"Apache-2.0",
"CC-BY-3.0",
"BSD-3-Clause",
"MIT",
"LicenseRef-scancode-protobuf"
] | permissive | fengchen8086/ditb | d1b3b9c8cf3118fb53e7f2720135ead8c8c0829b | d663ecf4a7c422edc4c5ba293191bf24db4170f0 | refs/heads/master | 2021-01-20T01:13:34.456019 | 2017-04-24T13:17:23 | 2017-04-24T13:17:23 | 89,239,936 | 13 | 3 | Apache-2.0 | 2023-03-20T11:57:01 | 2017-04-24T12:54:26 | Java | UTF-8 | Java | false | false | 2,430 | 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.hadoop.hbase.master;
import org.apache.hadoop.hbase.classification.InterfaceAudience;
import org.apache.hadoop.hbase.metrics.BaseSourceImpl;
import org.apache.hadoop.metrics2.lib.MutableHistogram;
@InterfaceAudience.Private
public class MetricsSnapshotSourceImpl extends BaseSourceImpl implements MetricsSnapshotSource {
private MutableHistogram snapshotTimeHisto;
private MutableHistogram snapshotCloneTimeHisto;
private MutableHistogram snapshotRestoreTimeHisto;
public MetricsSnapshotSourceImpl() {
this(METRICS_NAME, METRICS_DESCRIPTION, METRICS_CONTEXT, METRICS_JMX_CONTEXT);
}
public MetricsSnapshotSourceImpl(String metricsName,
String metricsDescription,
String metricsContext, String metricsJmxContext) {
super(metricsName, metricsDescription, metricsContext, metricsJmxContext);
}
@Override
public void init() {
snapshotTimeHisto = metricsRegistry.newTimeHistogram(
SNAPSHOT_TIME_NAME, SNAPSHOT_TIME_DESC);
snapshotCloneTimeHisto = metricsRegistry.newTimeHistogram(
SNAPSHOT_CLONE_TIME_NAME, SNAPSHOT_CLONE_TIME_DESC);
snapshotRestoreTimeHisto = metricsRegistry.newTimeHistogram(
SNAPSHOT_RESTORE_TIME_NAME, SNAPSHOT_RESTORE_TIME_DESC);
}
@Override
public void updateSnapshotTime(long time) {
snapshotTimeHisto.add(time);
}
@Override
public void updateSnapshotCloneTime(long time) {
snapshotCloneTimeHisto.add(time);
}
@Override
public void updateSnapshotRestoreTime(long time) {
snapshotRestoreTimeHisto.add(time);
}
}
| [
"fengchen8086@gmail.com"
] | fengchen8086@gmail.com |
402422e8dbc0e963e5c22ea6d9e326de082a3361 | 449cc92656d1f55bd7e58692657cd24792847353 | /oms-web/src/main/java/com/lj/oms/utils/excel/fieldtype/GenderType.java | 6bc1d78571c9e06f8701d2475df8583ae0be74a7 | [] | no_license | cansou/HLM | f80ae1c71d0ce8ead95c00044a318796820a8c1e | 69d859700bfc074b5948b6f2c11734ea2e030327 | refs/heads/master | 2022-08-27T16:40:17.206566 | 2019-12-18T06:48:10 | 2019-12-18T06:48:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 808 | java | package com.lj.oms.utils.excel.fieldtype;
import com.lj.business.member.emus.Gender;
/**
*
*
* 类说明:性别类型转换
*
*
* <p>
* 详细描述:
*
* @Company: 扬恩科技有限公司
* @author 段志鹏
*
* CreateDate: 2017年7月19日
*/
public class GenderType {
/**
* 获取对象值(导入)
*/
// public static Object getValue(String val) {
// for (Gender e : Gender.values()){
// if (val.equals(e.getName())){
// return e;
// }
// }
// return null;
// }
/**
* 获取对象值(导出)
*/
public static String setValue(Object val) {
if (val != null && ((Gender)val) != null){
Gender gender = (Gender)val;
for (Gender e : Gender.values()){
if (gender.equals(e)){
return e.getName();
}
}
}
return "";
}
}
| [
"37724558+wo510751575@users.noreply.github.com"
] | 37724558+wo510751575@users.noreply.github.com |
a7887ff7c47d77f1f971dd4ad69257e71406a0a9 | 89a0737282eba76aca84db9cdf1b1e434d7910a5 | /exterior/src/main/java/com/tqmall/data/epc/exterior/dubbo/search/SearchExtImpl.java | 4a776ec66351941aba06b9682f7706bcf96d85ef | [] | no_license | xie-summer/cloudepc | 6620c88184fbe952b5fc0c5f984212c6e661ff41 | 9dd5119e52624e1864aa5d223f5bc24168a83060 | refs/heads/master | 2021-06-16T04:04:41.917502 | 2017-05-11T07:51:53 | 2017-05-11T07:51:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,825 | java | package com.tqmall.data.epc.exterior.dubbo.search;
import com.tqmall.data.epc.bean.bizBean.lop.WishSnSearchResultBO;
import com.tqmall.data.epc.common.bean.ConstantBean;
import com.tqmall.data.epc.common.bean.EpcError;
import com.tqmall.data.epc.common.utils.JsonUtil;
import com.tqmall.data.epc.common.utils.ResultUtil;
import com.tqmall.search.common.data.PageableRequest;
import com.tqmall.search.dubbo.client.cloudepc.param.CloudEpcQueryRequest;
import com.tqmall.search.dubbo.client.cloudepc.param.WishListQueryRequest;
import com.tqmall.search.dubbo.client.cloudepc.result.CenterGoodsDTO;
import com.tqmall.search.dubbo.client.cloudepc.service.CloudEpcService;
import com.tqmall.core.common.entity.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
/**
* Created by huangzhangting on 16/6/28.
*/
@Slf4j
@Service
public class SearchExtImpl implements SearchExt {
private static final Integer MAX_PAGE_SIZE = 500;
@Autowired
private CloudEpcService searchEpcService;
private PageableRequest getPageReq(Integer pageIndex, Integer pageSize, int defaultSize){
if(pageIndex==null || pageIndex<1){
pageIndex=1;
}
if(pageSize==null || pageSize<1){
pageSize = defaultSize>0?defaultSize:10;
}else if(pageSize>MAX_PAGE_SIZE){
pageSize = MAX_PAGE_SIZE;
}
return new PageableRequest(pageIndex-1, pageSize);
}
@Override
public Result<CenterGoodsDTO> goodsSearch(CloudEpcQueryRequest queryRequest, Integer pageIndex, Integer pageSize) {
log.info("getCenterGoods from search, param:{}", JsonUtil.objectToJson(queryRequest));
PageableRequest pageableRequest = getPageReq(pageIndex, pageSize, 10);
com.tqmall.search.common.result.Result searchResult =
searchEpcService.getCenterGoods(queryRequest, pageableRequest);
if(searchResult.isSuccess()){
CenterGoodsDTO centerGoodsDTO = (CenterGoodsDTO)searchResult.getData();
if(!CollectionUtils.isEmpty(centerGoodsDTO.getGoodsInfo())) {
return ResultUtil.successResult(centerGoodsDTO);
}
}
log.info("getCenterGoods from search failed, result:{}", JsonUtil.objectToJson(searchResult));
return ResultUtil.errorResult(EpcError.UN_KNOW_EXCEPTION);
}
@Override
public WishSnSearchResultBO wishListSnSearch(Integer userId, String status, String keyword, Integer pageIndex, Integer pageSize) {
PageableRequest pageableRequest = getPageReq(pageIndex, pageSize, ConstantBean.WISH_PAGE_SIZE);
WishListQueryRequest queryRequest = new WishListQueryRequest();
queryRequest.setQ(keyword);
queryRequest.setUserId(userId);
queryRequest.setStatus(status);
com.tqmall.search.common.result.Result<Page<String>> searchResult =
searchEpcService.queryWishListSn(queryRequest, pageableRequest);
if(searchResult.isSuccess()){
Page<String> page = searchResult.getData();
if(!CollectionUtils.isEmpty(page.getContent())) {
WishSnSearchResultBO resultBO = new WishSnSearchResultBO();
resultBO.setSnList(page.getContent());
resultBO.setTotal((int) page.getTotalElements());
return resultBO;
}
}
return null;
}
@Override
public WishSnSearchResultBO offerListSnSearch(Integer userId, String status, String payStatus,
String keyword, Integer pageIndex, Integer pageSize) {
PageableRequest pageableRequest = getPageReq(pageIndex, pageSize, ConstantBean.OFFER_PAGE_SIZE);
WishListQueryRequest queryRequest = new WishListQueryRequest();
queryRequest.setQ(keyword);
queryRequest.setUserId(userId);
queryRequest.setStatus(status);
if(!StringUtils.isEmpty(payStatus)){
queryRequest.setPayStatus(payStatus);
}
com.tqmall.search.common.result.Result<Page<String>> searchResult =
searchEpcService.queryOfferListSn(queryRequest, pageableRequest);
if(searchResult.isSuccess()){
Page<String> page = searchResult.getData();
if(!CollectionUtils.isEmpty(page.getContent())) {
WishSnSearchResultBO resultBO = new WishSnSearchResultBO();
resultBO.setSnList(page.getContent());
resultBO.setTotal((int) page.getTotalElements());
return resultBO;
}
}
return null;
}
}
| [
"zhangting.huang@tqmall.com"
] | zhangting.huang@tqmall.com |
6cbfcc4bcd30a150f804c31d81fbadb05d1bcec2 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/11/11_a7fed35128f13f09bc95573aa795b34c2eb24916/LoginInterpreter/11_a7fed35128f13f09bc95573aa795b34c2eb24916_LoginInterpreter_s.java | 628d58f5bca9af606af3e4fe95813b15e89fd61a | [] | 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 | 4,300 | java | package mud.network.server.input.interpreter;
import java.net.InetAddress;
import java.util.HashMap;
import mud.GameMaster;
import mud.Player;
import mud.network.server.Connection;
/**
* An interpreter that handles commands and input related to logging in.
*
* @author Japhez
*/
public class LoginInterpreter implements Interpretable {
private HashMap<InetAddress, Connection> clientMap;
GameMaster master;
private LoginStage currentStage;
private String suggestedName;
public LoginInterpreter(HashMap<InetAddress, Connection> clientMap, GameMaster master) {
this.clientMap = clientMap;
this.master = master;
currentStage = LoginStage.NAME_SELECTION;
}
/**
* An enumeration to store the current state of the login stage.
*/
public enum LoginStage {
CONNECTION, NAME_SELECTION, NAME_CREATION, PASSWORD_INPUT
}
@Override
public boolean interpret(Connection sender, ParsedInput input) {
//Unused at the moment
if (currentStage.equals(LoginStage.CONNECTION)) {
return true;
}
//Name selection stage
if (currentStage.equals(LoginStage.NAME_SELECTION)) {
//Attempt to reconcile player name
//Multiple words
if (input.getWordCount() != 1) {
sender.sendMessage("Names can only be one word, please try again.");
return true;
//One word
} else {
suggestedName = input.getFirstWord();
//Verify name length
if (suggestedName.length() < 3) {
sender.sendMessage("That's an awfully short name, don't you think? Try something with at least 3 characters.");
return true;
}
if (suggestedName.length() > 8) {
sender.sendMessage("That's quite the mouthfull. Try something with less than 9 characters?");
return true;
}
Player existingPlayer = master.getPlayer(suggestedName);
//Player name isn't yet taken
if (existingPlayer == null) {
sender.sendMessage("I don't know that name, would you like to be " + suggestedName + "? (yes/no)");
this.setCurrentStage(LoginStage.NAME_CREATION);
return true;
//Player name is taken
} else {
sender.sendMessage("What's your password, " + suggestedName + "?");
this.setCurrentStage(LoginStage.PASSWORD_INPUT);
return true;
}
}
}
if (currentStage.equals(LoginStage.NAME_CREATION)) {
String firstWord = input.getFirstWord();
if (firstWord.equalsIgnoreCase("yes")) {
sender.sendMessage("Excellent. You will be known as " + suggestedName);
Player player = sender.getPlayer();
//Add the player to the visible client map
clientMap.put(sender.getClientAddress(), sender);
//Set the player's name to whatever they wanted
player.setName(suggestedName);
//Spawn the player somewhere
master.respawnPlayer(player);
//Update the player's interpreter
sender.setInterpreter(new MasterInterpreter(clientMap, master));
return true;
} else if (firstWord.equalsIgnoreCase("no")) {
sender.sendMessage("Okay, who are you, then?");
setCurrentStage(LoginStage.NAME_SELECTION);
return true;
} else {
sender.sendMessage("A simple yes or no will suffice, thank you");
return true;
}
}
return false;
}
/**
* Sets the current stage of the login process.
*
* @param stage
*/
public void setCurrentStage(LoginStage stage) {
this.currentStage = stage;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
60d0c916df9d4d04cba8f2fcb1cc07b50654aee5 | 180e78725121de49801e34de358c32cf7148b0a2 | /dataset/protocol1/yauaa/learning/1839/TestSerializationFast.java | fa7ac9cffcc162743d3915132115797427b4f547 | [] | no_license | ASSERT-KTH/synthetic-checkstyle-error-dataset | 40e8d1e0a7ebe7f7711def96a390891a6922f7bd | 40c057e1669584bfc6fecf789b5b2854660222f3 | refs/heads/master | 2023-03-18T12:50:55.410343 | 2019-01-25T09:54:39 | 2019-01-25T09:54:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,525 | java | /*
* Yet Another UserAgent Analyzer
* Copyright (C) 2013-2018 Niels Basjes
*
* 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 nl.basjes.parse.useragent;
import nl.basjes.parse.useragent.debug.UserAgentAnalyzerTester;
import org.junit.BeforeClass;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
import java.util.Arrays;
import java.util.List;
import static org.junit.Assert.assertTrue;
public class TestSerializationFast {
private static final Logger LOG = LoggerFactory.getLogger(TestSerializationFast.class);
protected static UserAgentAnalyzerTester uaa;
private static List<String> allFields;
@BeforeClass
public static void serializeAndDeserializeUAA() throws IOException, ClassNotFoundException {
LOG.info("==============================================================");
LOG.info("Create");
LOG.info("--------------------------------------------------------------");
// The number of rules for the Brands is so large that it results in an OOM in Travis-CI
allFields = UserAgentAnalyzer.newBuilder().build().getAllPossibleFieldNamesSorted();
allFields.removeAll(Arrays.asList("DeviceName", "DevideClass"));
uaa = UserAgentAnalyzerTester.newBuilder()
.withFields(allFields)
.hideMatcherLoadStats()
.delayInitialization()
.build();
LOG.info("--------------------------------------------------------------");
LOG.info("Serialize");
byte[] bytes;
try (ByteArrayOutputStream bos = new ByteArrayOutputStream()) {
ObjectOutput out = new ObjectOutputStream(bos);
out.writeObject(uaa);
out.flush();
bytes = bos.toByteArray();
}
uaa = null;
LOG.info("The UserAgentAnalyzer was serialized into {} bytes", bytes.length);
LOG.info("--------------------------------------------------------------");
LOG.info("Deserialize");
ByteArrayInputStream bis = new ByteArrayInputStream(bytes);
try (ObjectInput in = new ObjectInputStream(bis)) {
Object o = in.readObject();
assertTrue(o instanceof UserAgentAnalyzerTester);
uaa = (UserAgentAnalyzerTester) o;
}
LOG.info("Done");
LOG.info("==============================================================");
}
@Test
public void validateAllPredefinedBrowsers() {
LOG.info("==============================================================");
LOG.info("Validating when getting all fields");
LOG.info("--------------------------------------------------------------");
assertTrue(uaa.runTests(false, true, allFields, false, false));
}
}
| [
"bloriot97@gmail.com"
] | bloriot97@gmail.com |
a3ac07caf9125907071d42ef2ab88912c1cdee71 | 80acf6e68e94009f81d9c8b20cb9909372d391e0 | /common/src/main/java/org/personal/mason/common/code/gen/template/java/JavaEnumFile.java | e7dd98e2288435173560f55dfab18b4647069956 | [] | no_license | masonmei/AddressBook | f791bf2466aa5137437dca328ffbac2b74746ac7 | f92cc874ca7f9d59680f03595fabd5f3e02aa4a6 | refs/heads/master | 2020-04-26T14:12:13.171746 | 2014-12-16T23:20:34 | 2014-12-16T23:20:34 | 27,353,793 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 4,919 | java | package org.personal.mason.common.code.gen.template.java;
import org.personal.mason.common.code.gen.template.java.enums.VisitPrivilege;
import org.personal.mason.common.code.util.Assert;
/**
* Created by mason on 2014-12-01.
*/
public class JavaEnumFile extends AbstractJavaFile implements JavaFile {
private final CopyrightPart copyrightPart;
private final JavaPackagePart packagePart;
private final JavaImportsPart importsPart;
private final String comment;
private final VisitPrivilege visitPrivilege;
private final String className;
private final JavaEnumElementsPart enumElementsPart;
private final JavaFieldsPart fieldsPart;
private final JavaConstructorsPart constructorsPart;
private final JavaMethodsPart methodsPart;
public JavaEnumFile(CopyrightPart copyrightPart, JavaPackagePart packagePart, JavaImportsPart importsPart,
String comment, VisitPrivilege visitPrivilege, String className,
JavaEnumElementsPart enumElementsPart, JavaFieldsPart fieldsPart,
JavaConstructorsPart constructorsPart, JavaMethodsPart methodsPart) {
Assert.notNull(copyrightPart, "Copyright Part must not be null.");
Assert.notNull(packagePart, "Java Package Part must not be null.");
Assert.notNull(importsPart, "Java Imports Part must not be null.");
Assert.notNull(enumElementsPart, "Java Enum Elements Part must not be null.");
Assert.notNull(fieldsPart, "Java Fields Part must not be null.");
Assert.notNull(constructorsPart, "Java Constructors Part must not be null.");
Assert.notNull(methodsPart, "Java Methods Part must not be null.");
Assert.hasLength(className, "Java Class Name must have length.");
if (comment == null) {
comment = "";
}
if (visitPrivilege == null) {
visitPrivilege = VisitPrivilege.DEFAULT;
}
this.copyrightPart = copyrightPart;
this.packagePart = packagePart;
this.importsPart = importsPart;
this.comment = comment;
this.visitPrivilege = visitPrivilege;
this.className = className;
this.enumElementsPart = enumElementsPart;
this.fieldsPart = fieldsPart;
this.constructorsPart = constructorsPart;
this.methodsPart = methodsPart;
}
public CopyrightPart getCopyrightPart() {
return copyrightPart;
}
public JavaPackagePart getPackagePart() {
return packagePart;
}
public JavaImportsPart getImportsPart() {
return importsPart;
}
public String getComment() {
return comment;
}
public VisitPrivilege getVisitPrivilege() {
return visitPrivilege;
}
public String getClassName() {
return className;
}
public JavaEnumElementsPart getEnumElementsPart() {
return enumElementsPart;
}
public JavaFieldsPart getFieldsPart() {
return fieldsPart;
}
public JavaConstructorsPart getConstructorsPart() {
return constructorsPart;
}
public JavaMethodsPart getMethodsPart() {
return methodsPart;
}
@Override
protected void collectImports() {
collectJavaFilePartImports(copyrightPart.getImports());
collectJavaFilePartImports(packagePart.getImports());
collectJavaFilePartImports(importsPart.getImports());
collectJavaFilePartImports(enumElementsPart.getImports());
collectJavaFilePartImports(fieldsPart.getImports());
collectJavaFilePartImports(constructorsPart.getImports());
collectJavaFilePartImports(methodsPart.getImports());
}
@Override
public void addField(JavaFieldPart fieldPart) {
fieldsPart.addParts(fieldPart);
}
@Override
public void removeField(JavaFieldPart fieldPart) {
fieldsPart.getFieldParts().remove(fieldPart);
}
@Override
public void addAbstractMethod(JavaAbstractMethodPart abstractMethodPart) {
throw new UnsupportedOperationException("Not Support to add an abstract method to enum class.");
}
@Override
public void removeAbstractMethod(JavaAbstractMethodPart abstractMethodPart) {
throw new UnsupportedOperationException("Not Support to remove an abstract method from enum class.");
}
@Override
public void addConstructor(JavaConstructorPart constructorPart) {
constructorsPart.addParts(constructorPart);
}
@Override
public void removeConstructor(JavaConstructorPart constructorPart) {
constructorsPart.getConstructorParts().remove(constructorPart);
}
@Override
public void addMethod(JavaMethodPart methodPart) {
methodsPart.addParts(methodPart);
}
@Override
public void removeMethod(JavaMethodPart methodPart) {
methodsPart.getMethodParts().remove(methodPart);
}
}
| [
"dongxu.m@gmail.com"
] | dongxu.m@gmail.com |
48ef85cbe2879ff5702f5ba233fd3dc292fb64e6 | 1ec73a5c02e356b83a7b867580a02b0803316f0a | /java/bj/powernode/basic/day26/GUI_Examples/table/JRadioButtonTableExample.java | fe6aac8ef0c3a7128aee2f82e47ebd6ac1dcc349 | [] | no_license | jxsd0084/JavaTrick | f2ee8ae77638b5b7654c3fcf9bceea0db4626a90 | 0bb835fdac3c2f6d1a29d1e6e479b553099ece35 | refs/heads/master | 2021-01-20T18:54:37.322832 | 2016-06-09T03:22:51 | 2016-06-09T03:22:51 | 60,308,161 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,157 | java | package bj.powernode.basic.day26.GUI_Examples.table;
/* (swing1.1beta3) */
//package jp.gr.java_conf.tame.swing.examples;
/**
* @version 1.0 12/03/98
*/
import javax.swing.*;
import javax.swing.event.TableModelEvent;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableCellRenderer;
import java.awt.*;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
class RadioButtonRenderer implements TableCellRenderer {
public Component getTableCellRendererComponent( JTable table, Object value,
boolean isSelected, boolean hasFocus, int row, int column ) {
if ( value == null ) {
return null;
}
return (Component) value;
}
}
class RadioButtonEditor extends DefaultCellEditor implements ItemListener {
private JRadioButton button;
public RadioButtonEditor( JCheckBox checkBox ) {
super( checkBox );
}
public Component getTableCellEditorComponent( JTable table, Object value,
boolean isSelected, int row, int column ) {
if ( value == null ) {
return null;
}
button = (JRadioButton) value;
button.addItemListener( this );
return (Component) value;
}
public Object getCellEditorValue() {
button.removeItemListener( this );
return button;
}
public void itemStateChanged( ItemEvent e ) {
super.fireEditingStopped();
}
}
public class JRadioButtonTableExample extends JFrame {
public JRadioButtonTableExample() {
super( "JRadioButtonTable Example" );
UIDefaults ui = UIManager.getLookAndFeel().getDefaults();
UIManager.put( "RadioButton.focus", ui.getColor( "control" ) );
DefaultTableModel dm = new DefaultTableModel();
dm.setDataVector( new Object[][]{
{ "Group 1", new JRadioButton( "A" ) },
{ "Group 1", new JRadioButton( "B" ) },
{ "Group 1", new JRadioButton( "C" ) },
{ "Group 2", new JRadioButton( "a" ) },
{ "Group 2", new JRadioButton( "b" ) }
}, new Object[]{
"String", "JRadioButton"
} );
JTable table = new JTable( dm ) {
public void tableChanged( TableModelEvent e ) {
super.tableChanged( e );
repaint();
}
};
ButtonGroup group1 = new ButtonGroup();
group1.add( (JRadioButton) dm.getValueAt( 0, 1 ) );
group1.add( (JRadioButton) dm.getValueAt( 1, 1 ) );
group1.add( (JRadioButton) dm.getValueAt( 2, 1 ) );
ButtonGroup group2 = new ButtonGroup();
group2.add( (JRadioButton) dm.getValueAt( 3, 1 ) );
group2.add( (JRadioButton) dm.getValueAt( 4, 1 ) );
table.getColumn( "JRadioButton" ).setCellRenderer(
new RadioButtonRenderer() );
table.getColumn( "JRadioButton" ).setCellEditor(
new RadioButtonEditor( new JCheckBox() ) );
JScrollPane scroll = new JScrollPane( table );
getContentPane().add( scroll );
setSize( 200, 140 );
setVisible( true );
}
public static void main( String[] args ) {
JRadioButtonTableExample frame = new JRadioButtonTableExample();
frame.addWindowListener( new WindowAdapter() {
public void windowClosing( WindowEvent e ) {
System.exit( 0 );
}
} );
}
}
| [
"chenlong88882001@163.com"
] | chenlong88882001@163.com |
366c105c54a13ef6b5f7a9e2ccb2314c2bbb8421 | 01f1f247fe3fd446e806e7f88604fda7ca7bff48 | /sftp.src/com/jscape/inet/ftp/FxpListener.java | 7c864abd4bfce95df8f5a9a504443d744c7cd9a4 | [] | no_license | DiegoTc/ImageUpload | bba6761ecc8f8e925b0da77fb2dac1c413793db6 | c306b1186d3d2f3d3e64157a337a3f7a3eca9bcd | refs/heads/master | 2016-09-07T18:39:23.469651 | 2014-03-14T20:34:57 | 2014-03-14T20:34:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 546 | java | package com.jscape.inet.ftp;
import java.util.EventListener;
public abstract interface FxpListener
extends EventListener
{
public abstract void fxpStart(FxpStartEvent paramFxpStartEvent);
public abstract void fxpEnd(FxpEndEvent paramFxpEndEvent);
public abstract void fxpFailed(FxpFailedEvent paramFxpFailedEvent);
}
/* Location: C:\Users\dturcios\Documents\NetBeansProjects\ImageUploader\dist\lib\sftp.jar
* Qualified Name: com.jscape.inet.ftp.FxpListener
* JD-Core Version: 0.7.0.1
*/ | [
"dturcios@HCE-ECM-002.us.adler.corp"
] | dturcios@HCE-ECM-002.us.adler.corp |
449a4c9d44f7e62ea3117905083bd37ad4d9c393 | f942122d38f346ee7cd73b5c2ea3d99b2074595e | /book1/ch4/TestShuLie.java | 52c9b4020bbf674c01276a72b310b186663ab382 | [] | no_license | liaoshanggang/Practice | 4c5304d2e30593a771bda4b44e60b38fe9f5c1ac | ce8c7e9060d7b3588bc7b649aa45c889a8ed1091 | refs/heads/master | 2020-01-19T21:10:26.407801 | 2017-06-27T08:28:10 | 2017-06-27T08:29:23 | 94,212,204 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 829 | java | /*
需求:有一个分数序列:2/1,3/2,5/3,8/5,13/8,21/13,求出这个数列的前20项之和。
思路:(1)从序列中可以看出规律,后一个分数的分子是前一个分数分子与分母之和,后一个分数的分母是前一个分数的分子。
(2)声明一个长度为21的整形数组a,前20个整数用于存放这个序列前20项的分母,第21个整数用于存放这个序列第20项的分子,a[0]=1;a[1]=2;a[2]=a[0]+a[1].
(3)第i项的分数为a[i]/a[i-1](需要强制转换成double类型).
*/
class TestShuLie{
public static void main(String[] args){
double sum = 0;
int a[] = new int[20];
a[0] = 1;
a[1] = 2;
for(int i=2;i<20;i++){
a[i] = a[i-1] + a[i-2];
}
for(int i=1;i<20;i++){
sum = sum + (double)a[i]/a[i-1];
}
System.out.println(sum);
}
} | [
"787887060@qq.com"
] | 787887060@qq.com |
a205052693c69c21aff2a9bfe9136b3e27d8abb1 | 4ef11fd15caed0b214cae98a8ad6c2879c6d3281 | /src/com/mebigfatguy/twenty48playa/SquareType.java | ca6270a4cc7510afd63aae2e051c4a5a3bb04f7c | [] | no_license | mebigfatguy/2048playa | 26388aa315b0ddd3fba4e0b5a177ea3e672a9db2 | 9e09fb3f303cad8b69e64d915df293309c1f59e7 | refs/heads/master | 2021-01-13T16:06:53.647688 | 2019-02-13T04:51:32 | 2019-02-13T04:51:32 | 21,509,451 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,628 | java | /** 2048 playa - a 2048 autonomous player.
* Copyright 2014-2019 MeBigFatGuy.com
* Copyright 2014-2019 Dave Brosius
*
* 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.mebigfatguy.twenty48playa;
import java.awt.Color;
import java.awt.image.IndexColorModel;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.util.Properties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public enum SquareType {
OUTSIDE, EDGE, BLANK, NUMBER, WHITE, BLACK, STUB, TWO, FOUR, EIGHT, SIXTEEN, THIRTYTWO, SIXTYFOUR, ONETWENTYEIGHT, TWOFIFTYSIX, FIVETWELVE, TENTWENTYFOUR, TWENTYFOURTYEIGHT, FOURTYNINETYSIX;
private static Logger LOGGER = LoggerFactory.getLogger(SquareType.class);
private static IndexColorModel COLOR_MODEL;
static {
int numColors = SquareType.values().length;
byte[] r = new byte[numColors];
byte[] g = new byte[numColors];
byte[] b = new byte[numColors];
try (BufferedInputStream bis = new BufferedInputStream(SquareType.class.getResourceAsStream("/com/mebigfatguy/twenty48playa/colortable.properties"))) {
Properties p = new Properties();
p.load(bis);
for (SquareType ct : SquareType.values()) {
String clr = p.getProperty(ct.name());
Color color = Color.decode(clr);
int index = ct.ordinal();
r[index] = (byte) color.getRed();
g[index] = (byte) color.getGreen();
b[index] = (byte) color.getBlue();
}
COLOR_MODEL = new IndexColorModel(8, numColors, r, g, b);
} catch (IOException ioe) {
LOGGER.error("Failed to load 2048 properties file");
throw new RuntimeException("Failed to load 2048 properties file", ioe);
}
}
public static IndexColorModel getColorModel() {
return COLOR_MODEL;
}
public int getValue() {
if (ordinal() < SquareType.TWO.ordinal()) {
return 0;
}
return (int) Math.pow(2, (ordinal() - SquareType.TWO.ordinal()) + 1);
}
}
| [
"dbrosius@mebigfatguy.com"
] | dbrosius@mebigfatguy.com |
7886770187faf2a6d3901027e864b0b76c1285b7 | b511684052910867af4c32068042b5c7a9d92908 | /MDSE-master/3/submission/assignment1.edit/src/manufacturingSystem/provider/ManufacturingSystemEditPlugin.java | 4ac37fb320a40256e8a960d526ec470be236ca1b | [] | no_license | hchuphal/Chalmers_GU | 5e000e8346e669754a1ae675a65b04d5daa81645 | 68831e266a599fd429dbdf254f9ace7ce0a0c30a | refs/heads/master | 2023-01-19T14:29:20.006127 | 2019-12-01T00:00:53 | 2019-12-01T00:00:53 | 225,082,667 | 1 | 0 | null | 2023-01-09T12:05:50 | 2019-11-30T23:29:22 | Java | UTF-8 | Java | false | false | 1,836 | java | /**
*/
package manufacturingSystem.provider;
import org.eclipse.emf.common.EMFPlugin;
import org.eclipse.emf.common.util.ResourceLocator;
/**
* This is the central singleton for the ManufacturingSystem edit plugin.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public final class ManufacturingSystemEditPlugin extends EMFPlugin {
/**
* Keep track of the singleton.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final ManufacturingSystemEditPlugin INSTANCE = new ManufacturingSystemEditPlugin();
/**
* Keep track of the singleton.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static Implementation plugin;
/**
* Create the instance.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ManufacturingSystemEditPlugin() {
super
(new ResourceLocator [] {
});
}
/**
* Returns the singleton instance of the Eclipse plugin.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the singleton instance.
* @generated
*/
@Override
public ResourceLocator getPluginResourceLocator() {
return plugin;
}
/**
* Returns the singleton instance of the Eclipse plugin.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the singleton instance.
* @generated
*/
public static Implementation getPlugin() {
return plugin;
}
/**
* The actual implementation of the Eclipse <b>Plugin</b>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static class Implementation extends EclipsePlugin {
/**
* Creates an instance.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Implementation() {
super();
// Remember the static instance.
//
plugin = this;
}
}
}
| [
"himanshu.chuphal07@gmail.com"
] | himanshu.chuphal07@gmail.com |
ab126ce3a9408f6ca99d232ff893f94a6344f3fa | 464bbd588eade87f8905c0ae003301eeabb56166 | /backend/src/main/java/com/github/marceloleite2604/isstracker/backend/bo/IssPositionBo.java | d3db4c46af9936506b5458cda14b870d99682018 | [] | no_license | MarceloLeite2604/iss-tracker | a199efad61872cac14823298a50ca4d592482cb1 | 3abefe12435a211d1ad74ee70e60321a822d23cb | refs/heads/master | 2022-02-18T00:26:21.358010 | 2020-08-25T18:00:13 | 2020-08-25T18:00:13 | 232,322,437 | 0 | 0 | null | 2022-02-10T23:43:33 | 2020-01-07T12:42:51 | Java | UTF-8 | Java | false | false | 1,083 | java | package com.github.marceloleite2604.isstracker.backend.bo;
import com.github.marceloleite2604.isstracker.commons.dao.IssPositionDAO;
import com.github.marceloleite2604.isstracker.commons.model.IssPosition;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.util.List;
import javax.inject.Inject;
import org.springframework.stereotype.Component;
@Component
public class IssPositionBo {
private IssPositionDAO issPositionDAO;
@Inject
public IssPositionBo(
IssPositionDAO issPositionDAO) {
this.issPositionDAO = issPositionDAO;
}
public List<IssPosition> findAllByInstantBetweenOrderByInstantDesc(LocalDateTime start,
LocalDateTime end) {
return issPositionDAO.findAllByInstantBetweenOrderByInstantDesc(start, end);
}
public List<IssPosition> findLastHour() {
LocalDateTime end = ZonedDateTime.now()
.withZoneSameInstant(ZoneId.of("UTC"))
.toLocalDateTime();
LocalDateTime start = end.minusHours(1);
return findAllByInstantBetweenOrderByInstantDesc(start, end);
}
}
| [
"marceloleite2604@gmail.com"
] | marceloleite2604@gmail.com |
b8c1f672246b63f297a431787826f37af057d5e2 | 8144aa0c43754c67e20e03192d2426170569c454 | /TaCools/AppStudent/src/main/java/com/taku/safe/adapter/SignCountAdapter.java | 771ee9360e748d0ca57966b44738347889f7848a | [
"Apache-2.0"
] | permissive | soulcure/projects | 566f15746dcf1907ffab8fb4814d7cc9b8c6081b | c28be355f88998f75b0b0ce8d98b92fdb1c23eed | refs/heads/master | 2020-05-16T04:08:45.066950 | 2019-06-15T14:06:56 | 2019-06-15T14:06:56 | 182,753,955 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,554 | java | package com.taku.safe.adapter;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.support.v7.widget.RecyclerView;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.taku.safe.R;
import com.taku.safe.activity.SignCountActivity;
import com.taku.safe.activity.TeacherApproveOnMapActivity;
import com.taku.safe.protocol.respond.RespSignRestDataList;
import com.taku.safe.utils.AppUtils;
import java.util.ArrayList;
import java.util.List;
public class SignCountAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
private Context mContext;
private List<RespSignRestDataList.PageInfoBean.ListBean> mList;
private int signStatus; //1 正常 2 异常 3 未签到 4 未激活
private int signType;
public SignCountAdapter(Context context, int signType, int signStatus) {
mContext = context;
mList = new ArrayList<>();
this.signType = signType;
this.signStatus = signStatus;
}
public void setList(List<RespSignRestDataList.PageInfoBean.ListBean> list) {
mList.addAll(list);
notifyDataSetChanged();
}
@Override
public int getItemCount() {
return mList == null ? 0 : mList.size();
}
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
LayoutInflater inflater = LayoutInflater.from(mContext);
View view = inflater.inflate(R.layout.item_sign_count, parent, false);
return new TextViewHolder(view);
}
// 数据绑定
@Override
public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int position) {
final RespSignRestDataList.PageInfoBean.ListBean item = mList.get(position);
TextView tv_name = ((TextViewHolder) viewHolder).tv_name;
TextView tv_class = ((TextViewHolder) viewHolder).tv_class;
TextView tv_phone = ((TextViewHolder) viewHolder).tv_phone;
final String name = item.getName();
if (signStatus == SignCountActivity.NOSIGN
|| signStatus == SignCountActivity.NOREGEDIT) {
tv_phone.setCompoundDrawablesWithIntrinsicBounds(null, null, null, null);
} else {
View view = ((TextViewHolder) viewHolder).view;
view.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent();
intent.setClass(mContext, TeacherApproveOnMapActivity.class);
intent.putExtra(TeacherApproveOnMapActivity.SIGN_TYPE, signType);
intent.putExtra(TeacherApproveOnMapActivity.SIGN_ID, item.getSignId());
intent.putExtra(TeacherApproveOnMapActivity.SIGN_STATUS, signStatus);
intent.putExtra(TeacherApproveOnMapActivity.SIGN_NAME, name);
if (mContext instanceof SignCountActivity) {
SignCountActivity act = (SignCountActivity) mContext;
act.startActivityForResult(intent, SignCountActivity.PI_ZHU);
}
}
});
}
try {
final String phoneNum = item.getPhoneNo();
tv_phone.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (!TextUtils.isEmpty(phoneNum) && AppUtils.isMobileNum(phoneNum)) {
Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phoneNum));
mContext.startActivity(intent);
}
}
});
tv_name.setText(name);
tv_class.setText(item.getClassName());
tv_phone.setText(phoneNum);
} catch (NullPointerException e) {
e.printStackTrace();
}
}
private class TextViewHolder extends RecyclerView.ViewHolder {
View view;
TextView tv_name;
TextView tv_class;
TextView tv_phone;
private TextViewHolder(View itemView) {
super(itemView);
view = itemView;
tv_name = (TextView) itemView.findViewById(R.id.tv_name);
tv_class = (TextView) itemView.findViewById(R.id.tv_class);
tv_phone = (TextView) itemView.findViewById(R.id.tv_phone);
}
}
}
| [
"287268221@qq.com"
] | 287268221@qq.com |
e67bcad9d98701de9e8b9e456457529012e25f14 | e0a4029f70b412ee7ab327740a568d10a8709fb4 | /src/main/java/vazkii/quark/world/feature/ExtraArrows.java | 229f2f23722856148de060334ce49ae6f9fc1c7b | [
"Apache-2.0"
] | permissive | itachi1706/Quark | 917664dbbb9680e8753f227d25902a0b8a6191b2 | 0e7405a2e934c845232e8dcc832b688f104c53ed | refs/heads/master | 2021-01-17T22:18:40.815502 | 2016-09-05T01:29:32 | 2016-09-05T01:29:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,898 | java | /**
* This class was created by <Vazkii>. It's distributed as
* part of the Quark Mod. Get the Source Code in github:
* https://github.com/Vazkii/Quark
*
* Quark is Open Source and distributed under the
* CC-BY-NC-SA 3.0 License: https://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB
*
* File Created @ [17/07/2016, 03:45:23 (GMT)]
*/
package vazkii.quark.world.feature;
import net.minecraft.block.BlockDispenser;
import net.minecraft.dispenser.BehaviorProjectileDispense;
import net.minecraft.dispenser.IPosition;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.IProjectile;
import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.fml.client.registry.RenderingRegistry;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.registry.EntityRegistry;
import vazkii.arl.util.RecipeHandler;
import vazkii.quark.base.Quark;
import vazkii.quark.base.lib.LibEntityIDs;
import vazkii.quark.base.module.Feature;
import vazkii.quark.world.client.render.RenderExtraArrow;
import vazkii.quark.world.entity.arrow.EntityArrowEnder;
import vazkii.quark.world.entity.arrow.EntityArrowExplosive;
import vazkii.quark.world.entity.arrow.EntityArrowTorch;
import vazkii.quark.world.item.ItemModArrow;
public class ExtraArrows extends Feature {
public static Item arrow_ender;
public static Item arrow_explosive;
public static Item arrow_torch;
boolean enableEnder, enableExplosive, enableTorch;
@Override
public void setupConfig() {
enableEnder = loadPropBool("Enable Ender Arrow", "", true);
enableExplosive = loadPropBool("Enable Explosive Arrow", "", true);
enableTorch = loadPropBool("Enable Torch Arrow", "", true);
}
@Override
public void preInit(FMLPreInitializationEvent event) {
if(enableEnder) {
arrow_ender = new ItemModArrow("arrow_ender", (World worldIn, ItemStack stack, EntityLivingBase shooter) -> new EntityArrowEnder(worldIn, shooter));
EntityRegistry.registerModEntity(EntityArrowEnder.class, "quark:arrow_ender", LibEntityIDs.ARROW_ENDER, Quark.instance, 64, 10, true);
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(arrow_ender, new ArrowBehaviour((World world, IPosition pos) -> new EntityArrowEnder(world, pos)));
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(arrow_ender), new ItemStack(Items.ARROW), new ItemStack(Items.ENDER_PEARL));
}
if(enableExplosive) {
arrow_explosive = new ItemModArrow("arrow_explosive", (World worldIn, ItemStack stack, EntityLivingBase shooter) -> new EntityArrowExplosive(worldIn, shooter));
EntityRegistry.registerModEntity(EntityArrowExplosive.class, "quark:arrow_explosive", LibEntityIDs.ARROW_EXPLOSIVE, Quark.instance, 64, 10, true);
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(arrow_explosive, new ArrowBehaviour((World world, IPosition pos) -> new EntityArrowExplosive(world, pos)));
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(arrow_explosive), new ItemStack(Items.ARROW), new ItemStack(Items.GUNPOWDER), new ItemStack(Items.GUNPOWDER));
}
if(enableTorch) {
arrow_torch = new ItemModArrow("arrow_torch", (World worldIn, ItemStack stack, EntityLivingBase shooter) -> new EntityArrowTorch(worldIn, shooter));
EntityRegistry.registerModEntity(EntityArrowTorch.class, "quark:arrow_torch", LibEntityIDs.ARROW_TORCH, Quark.instance, 64, 10, true);
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(arrow_torch, new ArrowBehaviour((World world, IPosition pos) -> new EntityArrowTorch(world, pos)));
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(arrow_torch), new ItemStack(Items.ARROW), new ItemStack(Blocks.TORCH));
}
}
@Override
public void preInitClient(FMLPreInitializationEvent event) {
if(enableEnder)
RenderingRegistry.registerEntityRenderingHandler(EntityArrowEnder.class, RenderExtraArrow.FACTORY_ENDER);
if(enableExplosive)
RenderingRegistry.registerEntityRenderingHandler(EntityArrowExplosive.class, RenderExtraArrow.FACTORY_EXPLOSIVE);
if(enableTorch)
RenderingRegistry.registerEntityRenderingHandler(EntityArrowTorch.class, RenderExtraArrow.FACTORY_TORCH);
}
public static class ArrowBehaviour extends BehaviorProjectileDispense {
ArrowProvider provider;
public ArrowBehaviour(ArrowProvider provider) {
this.provider = provider;
}
@Override
protected IProjectile getProjectileEntity(World worldIn, IPosition position, ItemStack stackIn) {
EntityArrow arrow = provider.provide(worldIn, position);
arrow.pickupStatus = EntityArrow.PickupStatus.ALLOWED;
return arrow;
}
public static interface ArrowProvider {
public EntityArrow provide(World world, IPosition pos);
}
}
}
| [
"vazkii@hotmail.com"
] | vazkii@hotmail.com |
7399429c7279a9b9aa21c8862f3bbcfc4fd0d394 | 85dee0aaaab585203deba27c2b9a3ffea7592082 | /i2pcontrol/src/java/net/i2p/i2pcontrol/security/KeyStoreInitializer.java | 089e1bba00ffaf14cae5dc00a8fa837ce1dd309c | [
"Apache-2.0"
] | permissive | majestrate/i2p-minimal | 47a4ed49cf917ae3f434a3320501c204560a26e5 | e62562c38827345b1fafb7589a9327fbdd7faba4 | refs/heads/master | 2021-01-10T21:16:38.862056 | 2014-07-26T14:10:31 | 2014-07-26T14:10:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,682 | java | package net.i2p.i2pcontrol.security;
import java.security.KeyPair;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.cert.X509Certificate;
import net.i2p.I2PAppContext;
import net.i2p.i2pcontrol.I2PControlController;
import net.i2p.util.Log;
public class KeyStoreInitializer {
private static KeyStore _ks;
private static final Log _log = I2PAppContext.getGlobalContext().logManager().getLog(I2PControlController.class);
public synchronized static KeyStore getKeyStore(){
try {
if (_ks == null){
_log.info("KeyStore wasn't loaded. Loading..");
_ks = KeyStoreFactory.getDefaultKeyStore();
}
if (!_ks.containsAlias(SecurityManager.CERT_ALIAS)){
_log.info("Keystore is missing a selfsigned cert, rebuilding now..");
KeyPair cakp = KeyStoreFactory.generateKeyPair();
X509Certificate caCert = KeyStoreFactory.generateCACertificate(SecurityManager.CERT_ALIAS,
cakp,
3650);
KeyStoreFactory.writeCACertToKeyStore(_ks,
KeyStoreFactory.DEFAULT_KEYSTORE_PASSWORD,
SecurityManager.CERT_ALIAS,
cakp.getPrivate(),
caCert);
_log.info("Keystores loaded with new selfsigned cert.");
return _ks;
} else {
return _ks;
}
} catch (KeyStoreException e){
_log.error("Error reading keystore", e);
e.printStackTrace();
}
return null;
}
}
| [
"ampernand@gmail.com"
] | ampernand@gmail.com |
237a3fe10fedecddc178ef1181f6fe1f7abadb2a | 7dccb79b9804d8d9459c86ba9721e1197f59b865 | /de.fhdo.lemma.technology.technologydsl.ui/xtend-gen/de/fhdo/lemma/technology/ui/highlighting/HighlightingCalculator.java | 58a884cdf576f269be169acbfa47f616b4c07142 | [
"MIT"
] | permissive | SeelabFhdo/lemma | a668854675d50d3f3cad56eb5e3961b683d0f70a | 2e9ccc882352116b253a7700b5ecf2c9316a5829 | refs/heads/main | 2023-08-28T18:04:56.990603 | 2023-03-24T08:03:13 | 2023-03-24T08:03:13 | 204,692,764 | 32 | 9 | MIT | 2022-10-25T12:25:06 | 2019-08-27T11:54:43 | Java | UTF-8 | Java | false | false | 8,148 | java | package de.fhdo.lemma.technology.ui.highlighting;
import de.fhdo.lemma.data.PrimitiveValue;
import de.fhdo.lemma.technology.OperationAspectPointcut;
import de.fhdo.lemma.technology.ServiceAspectPointcut;
import de.fhdo.lemma.technology.TechnologyAspect;
import de.fhdo.lemma.technology.TechnologyPackage;
import de.fhdo.lemma.technology.TechnologySpecificProperty;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.ide.editor.syntaxcoloring.IHighlightedPositionAcceptor;
import org.eclipse.xtext.ide.editor.syntaxcoloring.ISemanticHighlightingCalculator;
import org.eclipse.xtext.nodemodel.INode;
import org.eclipse.xtext.nodemodel.util.NodeModelUtils;
import org.eclipse.xtext.resource.XtextResource;
import org.eclipse.xtext.ui.editor.syntaxcoloring.DefaultHighlightingConfiguration;
import org.eclipse.xtext.util.CancelIndicator;
import org.eclipse.xtext.xbase.lib.CollectionLiterals;
import org.eclipse.xtext.xbase.lib.Functions.Function1;
import org.eclipse.xtext.xbase.lib.IterableExtensions;
import org.eclipse.xtext.xbase.lib.IteratorExtensions;
import org.eclipse.xtext.xbase.lib.Pair;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
/**
* Provide custom syntax highlighting for certain elements.
*
* @author <a href="mailto:florian.rademacher@fh-dortmund.de>Florian Rademacher</a>
*/
@SuppressWarnings("all")
public class HighlightingCalculator implements ISemanticHighlightingCalculator {
/**
* Provide highlighting
*/
@Override
public void provideHighlightingFor(final XtextResource resource, final IHighlightedPositionAcceptor acceptor, final CancelIndicator cancelIndicator) {
this.provideHighlightingForPointcuts(resource, acceptor);
this.provideHighlightingForBooleanConstants(resource, acceptor);
this.provideHighlightingForFeatures(resource, acceptor);
}
/**
* Provide highlighting for aspects' pointcuts
*/
private void provideHighlightingForPointcuts(final XtextResource resource, final IHighlightedPositionAcceptor acceptor) {
Pair<Class<ServiceAspectPointcut>, List<EAttribute>> _mappedTo = Pair.<Class<ServiceAspectPointcut>, List<EAttribute>>of(ServiceAspectPointcut.class, Collections.<EAttribute>unmodifiableList(CollectionLiterals.<EAttribute>newArrayList(TechnologyPackage.Literals.SERVICE_ASPECT_POINTCUT__FOR_COMMUNICATION_TYPE, TechnologyPackage.Literals.SERVICE_ASPECT_POINTCUT__FOR_DATA_FORMAT, TechnologyPackage.Literals.SERVICE_ASPECT_POINTCUT__FOR_EXCHANGE_PATTERN, TechnologyPackage.Literals.SERVICE_ASPECT_POINTCUT__FOR_PROTOCOL, TechnologyPackage.Literals.SERVICE_ASPECT_POINTCUT__EXCHANGE_PATTERN, TechnologyPackage.Literals.SERVICE_ASPECT_POINTCUT__COMMUNICATION_TYPE)));
Pair<Class<OperationAspectPointcut>, List<EAttribute>> _mappedTo_1 = Pair.<Class<OperationAspectPointcut>, List<EAttribute>>of(OperationAspectPointcut.class, Collections.<EAttribute>unmodifiableList(CollectionLiterals.<EAttribute>newArrayList(TechnologyPackage.Literals.OPERATION_ASPECT_POINTCUT__FOR_TECHNOLOGY)));
final Map<Class<? extends EObject>, List<EAttribute>> pointcuts = Collections.<Class<? extends EObject>, List<EAttribute>>unmodifiableMap(CollectionLiterals.<Class<? extends EObject>, List<EAttribute>>newHashMap(_mappedTo, _mappedTo_1));
final Function1<EObject, Boolean> _function = (EObject eObject) -> {
final Function1<Class<? extends EObject>, Boolean> _function_1 = (Class<? extends EObject> it) -> {
return Boolean.valueOf(it.isInstance(eObject));
};
return Boolean.valueOf(IterableExtensions.<Class<? extends EObject>>exists(pointcuts.keySet(), _function_1));
};
final Function1<EObject, EObject> _function_1 = (EObject it) -> {
return it;
};
final Function1<EObject, List<EAttribute>> _function_2 = (EObject eObject) -> {
List<EAttribute> _xblockexpression = null;
{
final Function1<Class<? extends EObject>, Boolean> _function_3 = (Class<? extends EObject> it) -> {
return Boolean.valueOf(it.isInstance(eObject));
};
final Class<? extends EObject> pointcut = IterableExtensions.<Class<? extends EObject>>findFirst(pointcuts.keySet(), _function_3);
_xblockexpression = pointcuts.get(pointcut);
}
return _xblockexpression;
};
final Map<EObject, List<EAttribute>> modeledPointcutsWithHighlightingFeatures = IteratorExtensions.<EObject, EObject, List<EAttribute>>toMap(IteratorExtensions.<EObject>filter(resource.getAllContents(), _function), _function_1, _function_2);
final BiConsumer<EObject, List<EAttribute>> _function_3 = (EObject pointcut, List<EAttribute> features) -> {
final Consumer<EAttribute> _function_4 = (EAttribute feature) -> {
final List<INode> currentPointcutFeatures = NodeModelUtils.findNodesForFeature(pointcut, feature);
boolean _isEmpty = currentPointcutFeatures.isEmpty();
boolean _not = (!_isEmpty);
if (_not) {
final INode currentNode = currentPointcutFeatures.get(0);
acceptor.addPosition(currentNode.getOffset(), currentNode.getLength(),
DefaultHighlightingConfiguration.DEFAULT_ID);
}
};
features.forEach(_function_4);
};
modeledPointcutsWithHighlightingFeatures.forEach(_function_3);
}
/**
* Provide highlighting for boolean values
*/
private void provideHighlightingForBooleanConstants(final XtextResource resource, final IHighlightedPositionAcceptor acceptor) {
final Procedure1<EObject> _function = (EObject it) -> {
boolean _and = false;
if (!(it instanceof TechnologySpecificProperty)) {
_and = false;
} else {
PrimitiveValue _defaultValue = ((TechnologySpecificProperty) it).getDefaultValue();
Boolean _booleanValue = null;
if (_defaultValue!=null) {
_booleanValue=_defaultValue.getBooleanValue();
}
boolean _tripleNotEquals = (_booleanValue != null);
_and = _tripleNotEquals;
}
final boolean booleanDefaultValue = _and;
if (booleanDefaultValue) {
final Consumer<INode> _function_1 = (INode it_1) -> {
acceptor.addPosition(it_1.getOffset(), it_1.getLength(),
DefaultHighlightingConfiguration.KEYWORD_ID);
};
NodeModelUtils.findNodesForFeature(it,
TechnologyPackage.Literals.TECHNOLOGY_SPECIFIC_PROPERTY__DEFAULT_VALUE).forEach(_function_1);
}
};
IteratorExtensions.<EObject>forEach(resource.getAllContents(), _function);
}
/**
* Provide highlighting for features
*/
private void provideHighlightingForFeatures(final XtextResource resource, final IHighlightedPositionAcceptor acceptor) {
final Procedure1<EObject> _function = (EObject it) -> {
final Consumer<INode> _function_1 = (INode it_1) -> {
acceptor.addPosition(it_1.getOffset(), it_1.getLength(), HighlightingConfiguration.FEATURE_ID);
};
this.getNodesWithFeatures(it).forEach(_function_1);
};
IteratorExtensions.<EObject>forEach(resource.getAllContents(), _function);
}
/**
* Get feature nodes on EObjects that support feature specification
*/
private List<INode> getNodesWithFeatures(final EObject eObject) {
List<INode> _switchResult = null;
boolean _matched = false;
if (eObject instanceof TechnologyAspect) {
_matched=true;
_switchResult = NodeModelUtils.findNodesForFeature(eObject,
TechnologyPackage.Literals.TECHNOLOGY_ASPECT__FEATURES);
}
if (!_matched) {
_matched=true;
if (!_matched) {
if (eObject instanceof TechnologySpecificProperty) {
_matched=true;
}
}
if (_matched) {
_switchResult = NodeModelUtils.findNodesForFeature(eObject,
TechnologyPackage.Literals.TECHNOLOGY_SPECIFIC_PROPERTY__FEATURES);
}
}
if (!_matched) {
_switchResult = CollectionLiterals.<INode>emptyList();
}
return _switchResult;
}
}
| [
"florian.rademacher@fh-dortmund.de"
] | florian.rademacher@fh-dortmund.de |
0061ca085ef961c10e2f6d4ddb576a526c8ac4ad | c30964fe888295d26f9f31b3bc5a23176d98d27a | /fr.javam.threedjinns/src/main/java/fr/threedijnns/objects/plane/Scene2D.java | ed0b462f775a108644dcda2948aa8f3fc579f476 | [] | no_license | sanke69/javafr.threedjinns | f781a51f08c700936ceb22346179246f941b6645 | f48271a47ffaba607ec80b640c8b1aa062fb24b3 | refs/heads/master | 2023-06-12T19:41:58.901642 | 2021-06-11T15:29:37 | 2021-06-11T15:29:37 | 381,991,328 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,432 | java | package fr.threedijnns.objects.plane;
import java.util.ArrayList;
import java.util.List;
import fr.threedijnns.gx;
import fr.threedijnns.api.interfaces.nodes.GxCamera;
import fr.threedijnns.api.interfaces.nodes.GxRenderable;
import fr.threedijnns.api.interfaces.nodes.GxScene;
import fr.threedijnns.api.interfaces.nodes.plane.GxCamera2D;
import fr.threedijnns.api.interfaces.nodes.space.GxLight;
import fr.threedijnns.api.lang.enums.BlendEquation;
import fr.threedijnns.api.lang.enums.EngineOption;
import fr.threedijnns.api.lang.enums.MatrixType;
import fr.threedijnns.objects.base.GxGroupBase;
import fr.threedijnns.objects.plane.camera.DefaultCamera2D;
public class Scene2D extends GxGroupBase implements GxScene {
protected GxCamera2D m_Camera;
protected List<GxRenderable> m_Renderables;
protected List<GxLight> m_Lights;
protected Integer m_BackgroundColor;
public Scene2D(float _w, float _h) {
super();
m_Camera = new DefaultCamera2D(0, _w, 0, _h);
m_Renderables = new ArrayList<GxRenderable>();
m_Lights = new ArrayList<GxLight>();
m_BackgroundColor = null;
}
public void setBackgroundColor(Integer _backgroundColor) {
m_BackgroundColor = _backgroundColor;
}
public void backgroundColor(byte _r, byte _g, byte _b, byte _a) {
m_BackgroundColor = ((_r & 0xFF) << 24) + ((_g & 0xFF) << 16) + ((_b & 0xFF) << 8) + _a;
}
public Integer getBackgroundColor() {
return m_BackgroundColor;
}
public void setCamera(GxCamera<?,?> _camera) {
if(!(_camera instanceof GxCamera2D))
throw new IllegalAccessError("No permission to change Camera in 2D");
setCamera((GxCamera2D) _camera);
}
public void setCamera(GxCamera2D _camera) {
throw new IllegalAccessError("No permission to change Camera in 2D");
}
public GxCamera2D getCamera() {
return m_Camera;
}
public void addRenderable(GxRenderable _renderable) {
if(_renderable != null)
m_Renderables.add(_renderable);
}
public void rmvRenderable(GxRenderable _r) {
m_Renderables.remove( _r );
}
public void addRenderables(GxRenderable... _renderables) {
for(GxRenderable rederable : _renderables)
m_Renderables.add(rederable);
}
public void rmvRenderables(GxRenderable... _renderables) {
for(GxRenderable rederable : _renderables)
m_Renderables.remove(rederable);
}
public void addLight(GxLight _light) {
throw new IllegalAccessError("No lighting in 2D");
}
public void rmvLight(GxLight _light) {
throw new IllegalAccessError("No lighting in 2D");
}
public void addLights(GxLight... _lights) {
throw new IllegalAccessError("No lighting in 2D");
}
public void rmvLights(GxLight... _lights) {
throw new IllegalAccessError("No lighting in 2D");
}
@Override
public void process() {
for(GxRenderable renderable : m_Renderables)
renderable.process();
}
@Override
public void render() {
if(m_Camera == null)
return ;
gx.enable(EngineOption.GX_BLEND);
gx.setBlendEquation(BlendEquation.BLEND_ADD);
gx.pushMatrix(MatrixType.MAT_PROJECTION);
gx.loadMatrix(MatrixType.MAT_PROJECTION, m_Camera.projectionMatrix());
gx.pushMatrix(MatrixType.MAT_MODELVIEW);
gx.loadMatrix(MatrixType.MAT_MODELVIEW, m_Camera.modelviewMatrix());
// RENDU DE LA SCENE NON-VBO
for(GxRenderable renderable : m_Renderables)
renderable.render();
gx.popMatrix(MatrixType.MAT_PROJECTION);
gx.popMatrix(MatrixType.MAT_MODELVIEW);
gx.disable(EngineOption.GX_BLEND);
}
}
| [
"sanke@xps-13"
] | sanke@xps-13 |
c0b57d520573ad94dc03371b35669b9320689f7a | cfc60fc1148916c0a1c9b421543e02f8cdf31549 | /src/testcases/CWE81_XSS_Error_Message/CWE81_XSS_Error_Message__Servlet_URLConnection_53b.java | 7133eb93dbd1284a2610c6175665fd25e8322561 | [
"LicenseRef-scancode-public-domain"
] | permissive | zhujinhua/GitFun | c77c8c08e89e61006f7bdbc5dd175e5d8bce8bd2 | 987f72fdccf871ece67f2240eea90e8c1971d183 | refs/heads/master | 2021-01-18T05:46:03.351267 | 2012-09-11T16:43:44 | 2012-09-11T16:43:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,327 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE81_XSS_Error_Message__Servlet_URLConnection_53b.java
Label Definition File: CWE81_XSS_Error_Message__Servlet.label.xml
Template File: sources-sink-53b.tmpl.java
*/
/*
* @description
* CWE: 81 Cross Site Scripting (XSS) in Error Message
* BadSource: URLConnection Read a string from a web server with URLConnection
* GoodSource: A hardcoded string
* Sinks: sendErrorServlet
* BadSink : XSS in sendError
* Flow Variant: 53 Data flow: data passed as an argument from one method through two others to a fourth; all four functions are in different classes in the same package
*
* */
package testcases.CWE81_XSS_Error_Message;
import testcasesupport.*;
import javax.servlet.http.*;
public class CWE81_XSS_Error_Message__Servlet_URLConnection_53b
{
public void bad_sink(String data , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
(new CWE81_XSS_Error_Message__Servlet_URLConnection_53c()).bad_sink(data , request, response);
}
/* goodG2B() - use goodsource and badsink */
public void goodG2B_sink(String data , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
(new CWE81_XSS_Error_Message__Servlet_URLConnection_53c()).goodG2B_sink(data , request, response);
}
}
| [
"amitf@chackmarx.com"
] | amitf@chackmarx.com |
4bdeef90e6bbbe0bb2d5762844f4533be56b42a8 | ee71c6606887b2ae9505d0e3cc04e5f701b52bef | /nasdaq/src/main/java/com/rongyi/nasdaq/web/controller/BaseController.java | 93199f2c8c5c28faf0a1759de5daaeec3335915f | [] | no_license | mythread/rongyi_source | 24a6823f6c0f48d140262144221d2fc231f5957e | 3da4d20548bd2609e4720ed83eda53fa45b6515c | refs/heads/master | 2020-04-05T23:40:28.747465 | 2015-04-17T09:04:50 | 2015-04-17T09:04:50 | 34,106,925 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,150 | java | package com.rongyi.nasdaq.web.controller;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import com.rongyi.nasdaq.common.pagination.PageInfo;
import com.rongyi.nasdaq.common.pagination.PagesPagination;
import com.rongyi.nasdaq.common.pagination.SearchCons;
import com.rongyi.nasdaq.web.html.HtmlMeta;
/**
* 类BaseController.java的实现描述:TODO 类实现描述
*
* @author jiejie 2014年5月22日 下午9:24:11
*/
public class BaseController {
protected static final String NAVSELECTED = "navSelected";
protected static final String LEFTNAVSELECTED = "leftNavSelected";
protected static final String PRODUCTNAVSELECTED = "productNavSelected";
protected static Integer DEFAULT_LIMIT_SIZE = 12;
protected PagesPagination getPagination(Integer page, int pageSize, int totalNum) {
PagesPagination pagination = new PagesPagination();
pagination.setPageSize(pageSize);
pagination.setNowPageIndex(page);
pagination.init(totalNum);
return pagination;
}
/**
* 生成分页信息
*
* @param pagination
*/
protected void initPages(PagesPagination pagination, Object... objects) {
int index = pagination.getFirstPageIndex();
PageInfo firstpage = new PageInfo(SearchCons.FIRSTPAGE, index + 1, pagination.isFirstPage(),
getPageUrl(objects, index + 1));
pagination.setFirstPage(firstpage);
// 上一页
index = pagination.getPrevPageIndex();
PageInfo prevpage = new PageInfo(SearchCons.PREPAGE, index + 1, false, getPageUrl(objects, index + 1));
pagination.setPrevPage(prevpage);
// 下一页
index = pagination.getNextPageIndex();
PageInfo nextpage = new PageInfo(SearchCons.NEXTPAGE, index + 1, false, getPageUrl(objects, index + 1));
pagination.setNextPage(nextpage);
// 尾页
index = pagination.getLastPageIndex();
PageInfo lastpage = new PageInfo(SearchCons.LASTPAGE, index + 1, pagination.isLastPage(), getPageUrl(objects,
index + 1));
pagination.setLastPage(lastpage);
//
int nowPageIndex = pagination.getNowPageIndex();
List<PageInfo> pages = new ArrayList<PageInfo>();
List<Integer> skipPageIndexs = pagination.getSkipPageIndex();
for (Integer integer : skipPageIndexs) {
pages.add(new PageInfo(StringUtils.EMPTY + (integer + 1), integer + 1, nowPageIndex == integer,
getPageUrl(objects, integer + 1)));
}
pagination.setPages(pages);
}
/**
* 不同实例的分页页面需要重写此方法
*
* @return
*/
protected String getPageUrl(Object... objects) {
return "";
};
public static HtmlMeta getHtmlMeta(String title, String description, String keywords) {
HtmlMeta meta = new HtmlMeta(title, description, keywords);
return meta;
}
}
| [
"zhangxiongcai337@gmail.com"
] | zhangxiongcai337@gmail.com |
a7997b6939e3f158937709751973d8a4b4de0fce | b5f9bbd8f5e79d73b5a4ab9a92930034f0677eff | /src/com/excellentsystem/TokoEmasJagoCabang/Model/Pusat/PenjualanAntarCabangDetail.java | 0b8ac92bcf897d6c8883810f4c00a48606ab9473 | [] | no_license | vonn89/TokoEmasJagoCabang | 9f598afe9f22ea88e08772710f91bece867d7b07 | 6e1e3c677aa62ce76b83149bf30a12ebe2a2c750 | refs/heads/master | 2023-03-04T00:52:28.726320 | 2021-01-31T12:35:21 | 2021-01-31T12:35:21 | 334,650,960 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,893 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.excellentsystem.TokoEmasJagoCabang.Model.Pusat;
import javafx.beans.property.DoubleProperty;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.SimpleDoubleProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
/**
*
* @author excellent
*/
public class PenjualanAntarCabangDetail {
//tt_penjualan_antar_cabang_detail
private final StringProperty noPenjualan = new SimpleStringProperty();
private final IntegerProperty noUrut = new SimpleIntegerProperty();
private final StringProperty kodeBarang = new SimpleStringProperty();
private final StringProperty kodeBarcode = new SimpleStringProperty();
private final StringProperty namaBarang = new SimpleStringProperty();
private final StringProperty kodeKategori = new SimpleStringProperty();
private final StringProperty kodeJenis = new SimpleStringProperty();
private final StringProperty kodeIntern = new SimpleStringProperty();
private final StringProperty kadar = new SimpleStringProperty();
private final DoubleProperty berat = new SimpleDoubleProperty();
private final DoubleProperty beratAsli = new SimpleDoubleProperty();
private final DoubleProperty beratPersen = new SimpleDoubleProperty();
private final DoubleProperty nilaiPokok = new SimpleDoubleProperty();
private final StringProperty inputDate = new SimpleStringProperty();
private final StringProperty inputBy = new SimpleStringProperty();
private final StringProperty asalBarang = new SimpleStringProperty();
private final StringProperty status = new SimpleStringProperty();
private final DoubleProperty harga = new SimpleDoubleProperty();
private final StringProperty kodeBarcodeBaru = new SimpleStringProperty();
private PenjualanAntarCabangHead penjualanAntarCabangHead;
public PenjualanAntarCabangHead getPenjualanAntarCabangHead() {
return penjualanAntarCabangHead;
}
public void setPenjualanAntarCabangHead(PenjualanAntarCabangHead penjualanAntarCabangHead) {
this.penjualanAntarCabangHead = penjualanAntarCabangHead;
}
public String getKodeBarcodeBaru() {
return kodeBarcodeBaru.get();
}
public void setKodeBarcodeBaru(String value) {
kodeBarcodeBaru.set(value);
}
public StringProperty kodeBarcodeBaruProperty() {
return kodeBarcodeBaru;
}
public String getStatus() {
return status.get();
}
public void setStatus(String value) {
status.set(value);
}
public StringProperty statusProperty() {
return status;
}
public String getAsalBarang() {
return asalBarang.get();
}
public void setAsalBarang(String value) {
asalBarang.set(value);
}
public StringProperty asalBarangProperty() {
return asalBarang;
}
public String getInputBy() {
return inputBy.get();
}
public void setInputBy(String value) {
inputBy.set(value);
}
public StringProperty inputByProperty() {
return inputBy;
}
public String getInputDate() {
return inputDate.get();
}
public void setInputDate(String value) {
inputDate.set(value);
}
public StringProperty inputDateProperty() {
return inputDate;
}
public double getNilaiPokok() {
return nilaiPokok.get();
}
public void setNilaiPokok(double value) {
nilaiPokok.set(value);
}
public DoubleProperty nilaiPokokProperty() {
return nilaiPokok;
}
public double getBeratPersen() {
return beratPersen.get();
}
public void setBeratPersen(double value) {
beratPersen.set(value);
}
public DoubleProperty beratPersenProperty() {
return beratPersen;
}
public double getBeratAsli() {
return beratAsli.get();
}
public void setBeratAsli(double value) {
beratAsli.set(value);
}
public DoubleProperty beratAsliProperty() {
return beratAsli;
}
public String getKadar() {
return kadar.get();
}
public void setKadar(String value) {
kadar.set(value);
}
public StringProperty kadarProperty() {
return kadar;
}
public String getKodeIntern() {
return kodeIntern.get();
}
public void setKodeIntern(String value) {
kodeIntern.set(value);
}
public StringProperty kodeInternProperty() {
return kodeIntern;
}
public String getKodeJenis() {
return kodeJenis.get();
}
public void setKodeJenis(String value) {
kodeJenis.set(value);
}
public StringProperty kodeJenisProperty() {
return kodeJenis;
}
public String getKodeKategori() {
return kodeKategori.get();
}
public void setKodeKategori(String value) {
kodeKategori.set(value);
}
public StringProperty kodeKategoriProperty() {
return kodeKategori;
}
public int getNoUrut() {
return noUrut.get();
}
public void setNoUrut(int value) {
noUrut.set(value);
}
public IntegerProperty noUrutProperty() {
return noUrut;
}
public String getKodeBarang() {
return kodeBarang.get();
}
public void setKodeBarang(String value) {
kodeBarang.set(value);
}
public StringProperty kodeBarangProperty() {
return kodeBarang;
}
public double getHarga() {
return harga.get();
}
public void setHarga(double value) {
harga.set(value);
}
public DoubleProperty hargaProperty() {
return harga;
}
public double getBerat() {
return berat.get();
}
public void setBerat(double value) {
berat.set(value);
}
public DoubleProperty beratProperty() {
return berat;
}
public String getNamaBarang() {
return namaBarang.get();
}
public void setNamaBarang(String value) {
namaBarang.set(value);
}
public StringProperty namaBarangProperty() {
return namaBarang;
}
public String getKodeBarcode() {
return kodeBarcode.get();
}
public void setKodeBarcode(String value) {
kodeBarcode.set(value);
}
public StringProperty kodeBarcodeProperty() {
return kodeBarcode;
}
public String getNoPenjualan() {
return noPenjualan.get();
}
public void setNoPenjualan(String value) {
noPenjualan.set(value);
}
public StringProperty noPenjualanProperty() {
return noPenjualan;
}
}
| [
"vonn89@gmail.com"
] | vonn89@gmail.com |
64d36c6d1f50cc340ccbab328acd5faf537b4d5e | 208ba4a5eb2aadee275926e40c9dd068ad37b1ec | /vertx-gaia/vertx-up/src/main/java/io/vertx/up/uca/rs/router/FilterAxis.java | a42099a04d40813c1d02a0c16adb0bd716e95ea4 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | wangdefeng/vertx-zero | 263c737efef53abd8e1b8edfbc25fb82f3663042 | 966958f0849a21ddce5ddbe757b418d3383352a2 | refs/heads/master | 2022-03-13T16:10:07.525445 | 2021-08-12T00:49:05 | 2021-08-12T00:49:05 | 247,605,052 | 0 | 0 | Apache-2.0 | 2020-05-29T06:43:00 | 2020-03-16T03:48:11 | null | UTF-8 | Java | false | false | 2,587 | java | package io.vertx.up.uca.rs.router;
import io.vertx.core.http.HttpServerRequest;
import io.vertx.core.http.HttpServerResponse;
import io.vertx.ext.web.Route;
import io.vertx.ext.web.Router;
import io.vertx.ext.web.RoutingContext;
import io.vertx.up.atom.agent.Event;
import io.vertx.up.log.Annal;
import io.vertx.up.uca.rs.Axis;
import io.vertx.up.util.Ut;
import io.vertx.up.fn.Fn;
import io.vertx.up.runtime.ZeroAnno;
import java.lang.reflect.Method;
import java.util.Set;
import java.util.concurrent.ConcurrentMap;
@SuppressWarnings("all")
public class FilterAxis implements Axis<Router> {
private static final Annal LOGGER = Annal.get(FilterAxis.class);
private static final ConcurrentMap<String, Set<Event>> FILTERS =
ZeroAnno.getFilters();
@Override
public void mount(final Router router) {
// Extract Event foreach
FILTERS.forEach((path, events) -> events.forEach(event -> Fn.safeSemi(null == event, LOGGER,
() -> LOGGER.warn(Info.NULL_EVENT, this.getClass().getName()),
() -> {
// Path for filter
final Route route = router.route();
Hub<Route> hub = Fn.poolThread(Pool.URIHUBS,
() -> Ut.instance(UriHub.class));
hub.mount(route, event);
// Consumes/Produces
hub = Fn.poolThread(Pool.MEDIAHUBS,
() -> Ut.instance(MediaHub.class));
hub.mount(route, event);
// Filter Handler execution
route.handler(context -> {
// Execute method
final Method method = event.getAction();
final Object proxy = event.getProxy();
// Call
this.execute(context, proxy, method);
});
}))
);
}
private void execute(final RoutingContext context, final Object proxy, final Method method) {
Fn.safeNull(() -> Fn.safeJvm(() -> {
// Init context;
Ut.invoke(proxy, "init", context);
// Extract Request/Response
final HttpServerRequest request = context.request();
final HttpServerResponse response = context.response();
method.invoke(proxy, request, response);
// Check whether called next or response
if (!response.ended()) {
context.next();
}
}, LOGGER), method, proxy);
}
}
| [
"silentbalanceyh@126.com"
] | silentbalanceyh@126.com |
e97e6b56ba07bac4bb344cd328a96de658a4f957 | e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3 | /src/chosun/ciis/se/etc/ds/SE_ETC_1100_MDataSet.java | 663e60a6011a819bf17ddab371d42338b3ab9edc | [] | 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 | 5,648 | java | /***************************************************************************************************
* 파일명 : SE_ETC_1100_MDataSet.java
* 기능 : 판매-기타관리-확장수당 지급내역 조회
* 작성일자 : 2009-03-04
* 작성자 : 김대준
***************************************************************************************************/
/***************************************************************************************************
* 수정내역 :
* 수정자 :
* 수정일자 :
* 백업 :
***************************************************************************************************/
package chosun.ciis.se.etc.ds;
import java.sql.*;
import java.util.*;
import somo.framework.db.*;
import somo.framework.util.*;
import chosun.ciis.se.etc.dm.*;
import chosun.ciis.se.etc.rec.*;
/**
*
*/
public class SE_ETC_1100_MDataSet extends somo.framework.db.BaseDataSet implements java.io.Serializable{
public ArrayList teamlist = new ArrayList();
public ArrayList arealist = new ArrayList();
public ArrayList partlist = new ArrayList();
public ArrayList objlist = new ArrayList();
public String errcode ;
public String errmsg ;
public SE_ETC_1100_MDataSet(){}
public SE_ETC_1100_MDataSet(String errcode, String errmsg){
this.errcode = errcode ;
this.errmsg = errmsg ;
}
public void setErrcode(String errcode){
this.errcode = errcode;
}
public void setErrmsg(String errmsg){
this.errmsg = errmsg;
}
public String getErrcode(){
return this.errcode;
}
public String getErrmsg(){
return this.errmsg;
}
public void getValues(CallableStatement cstmt) throws SQLException{
this.errcode = Util.checkString(cstmt.getString(1));
this.errmsg = Util.checkString(cstmt.getString(2));
if(!"".equals(this.errcode)){ return; }
ResultSet rset0 = (ResultSet) cstmt.getObject(5);
while(rset0.next()){
SE_ETC_1100_MTEAMLISTRecord rec = new SE_ETC_1100_MTEAMLISTRecord();
rec.dept_cd = Util.checkString(rset0.getString("dept_cd" ));
rec.dept_nm = Util.checkString(rset0.getString("dept_nm" ));
this.teamlist.add(rec);
}
ResultSet rset1 = (ResultSet) cstmt.getObject(6);
while(rset1.next()){
SE_ETC_1100_MPARTLISTRecord rec = new SE_ETC_1100_MPARTLISTRecord();
rec.dept_cd = Util.checkString(rset1.getString("dept_cd" ));
rec.dept_nm = Util.checkString(rset1.getString("dept_nm" ));
rec.supr_dept_cd = Util.checkString(rset1.getString("supr_dept_cd" ));
this.partlist.add(rec);
}
ResultSet rset2 = (ResultSet) cstmt.getObject(7);
while(rset2.next()){
SE_ETC_1100_MAREALISTRecord rec = new SE_ETC_1100_MAREALISTRecord();
rec.area_cd = Util.checkString(rset2.getString("area_cd" ));
rec.area_nm = Util.checkString(rset2.getString("area_nm" ));
rec.dept_cd = Util.checkString(rset2.getString("dept_cd" ));
rec.supr_dept_cd = Util.checkString(rset2.getString("supr_dept_cd" ));
this.arealist.add(rec);
}
ResultSet rset3 = (ResultSet) cstmt.getObject(8);
while(rset3.next()){
SE_ETC_1100_MOBJLISTRecord rec = new SE_ETC_1100_MOBJLISTRecord();
rec.cd = Util.checkString(rset3.getString("cd" ));
rec.cdnm = Util.checkString(rset3.getString("cdnm" ));
rec.cd_abrv_nm = Util.checkString(rset3.getString("cd_abrv_nm" ));
this.objlist.add(rec);
}
}
}/*----------------------------------------------------------------------------------------------------
Web Tier에서 DataSet 객체 관련 코드 작성시 사용하십시오.
<%
SE_ETC_1100_MDataSet ds = (SE_ETC_1100_MDataSet)request.getAttribute("ds");
%>
Web Tier에서 Record 객체 관련 코드 작성시 사용하십시오.
<%
for(int i=0; i<ds.teamlist.size(); i++){
SE_ETC_1100_MTEAMLISTRecord teamlistRec = (SE_ETC_1100_MTEAMLISTRecord)ds.teamlist.get(i);%>
HTML 코드들....
<%}%>
<%
for(int i=0; i<ds.partlist.size(); i++){
SE_ETC_1100_MPARTLISTRecord partlistRec = (SE_ETC_1100_MPARTLISTRecord)ds.partlist.get(i);%>
HTML 코드들....
<%}%>
<%
for(int i=0; i<ds.arealist.size(); i++){
SE_ETC_1100_MAREALISTRecord arealistRec = (SE_ETC_1100_MAREALISTRecord)ds.arealist.get(i);%>
HTML 코드들....
<%}%>
<%
for(int i=0; i<ds.objlist.size(); i++){
SE_ETC_1100_MOBJLISTRecord objlistRec = (SE_ETC_1100_MOBJLISTRecord)ds.objlist.get(i);%>
HTML 코드들....
<%}%>
----------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------
Web Tier에서 DataSet 객체의 <%= %> 작성시 사용하십시오.
<%= ds.getErrcode()%>
<%= ds.getErrmsg()%>
<%= ds.getTeamlist()%>
<%= ds.getPartlist()%>
<%= ds.getArealist()%>
<%= ds.getObjlist()%>
----------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------
Web Tier에서 Record 객체의 <%= %> 작성시 사용하십시오.
<%= teamlistRec.dept_cd%>
<%= teamlistRec.dept_nm%>
<%= partlistRec.dept_cd%>
<%= partlistRec.dept_nm%>
<%= partlistRec.supr_dept_cd%>
<%= arealistRec.area_cd%>
<%= arealistRec.area_nm%>
<%= arealistRec.dept_cd%>
<%= arealistRec.supr_dept_cd%>
<%= objlistRec.cd%>
<%= objlistRec.cdnm%>
<%= objlistRec.cd_abrv_nm%>
----------------------------------------------------------------------------------------------------*/
/* 작성시간 : Wed Mar 04 17:23:51 KST 2009 */ | [
"DLCOM000@172.16.30.11"
] | DLCOM000@172.16.30.11 |
14bc005a9aab261a35037d332bd0655676c8ca9c | 011ee3cc2c641d078a1f915a3f7205cb67b1209b | /src/main/java/io/github/robertovillarejo/bot/dialogflow/Result.java | 1364d48b90d83f0bfa576e778658d5041702d0df | [
"MIT"
] | permissive | robertovillarejo/java-bot-broker | 5bf1e3d04daadb6cce09bbe22226e5fc8f3fac32 | 280d7eba00a2c6e58a0303df85813c4b47922246 | refs/heads/master | 2020-03-26T20:42:06.585772 | 2018-09-22T00:51:26 | 2018-09-22T00:51:26 | 145,340,583 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,391 | java |
package io.github.robertovillarejo.bot.dialogflow;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"source",
"resolvedQuery",
"speech",
"action",
"actionIncomplete",
"parameters",
"contexts",
"metadata",
"fulfillment",
"score"
})
public class Result {
@JsonProperty("source")
private String source;
@JsonProperty("resolvedQuery")
private String resolvedQuery;
@JsonProperty("speech")
private String speech;
@JsonProperty("action")
private String action;
@JsonProperty("actionIncomplete")
private Boolean actionIncomplete;
@JsonProperty("parameters")
private Parameters parameters;
@JsonProperty("contexts")
private List<Context> contexts = null;
@JsonProperty("metadata")
private Metadata metadata;
@JsonProperty("fulfillment")
private Fulfillment fulfillment;
@JsonProperty("score")
private Integer score;
@JsonProperty("source")
public String getSource() {
return source;
}
@JsonProperty("source")
public void setSource(String source) {
this.source = source;
}
@JsonProperty("resolvedQuery")
public String getResolvedQuery() {
return resolvedQuery;
}
@JsonProperty("resolvedQuery")
public void setResolvedQuery(String resolvedQuery) {
this.resolvedQuery = resolvedQuery;
}
@JsonProperty("speech")
public String getSpeech() {
return speech;
}
@JsonProperty("speech")
public void setSpeech(String speech) {
this.speech = speech;
}
@JsonProperty("action")
public String getAction() {
return action;
}
@JsonProperty("action")
public void setAction(String action) {
this.action = action;
}
@JsonProperty("actionIncomplete")
public Boolean getActionIncomplete() {
return actionIncomplete;
}
@JsonProperty("actionIncomplete")
public void setActionIncomplete(Boolean actionIncomplete) {
this.actionIncomplete = actionIncomplete;
}
@JsonProperty("parameters")
public Parameters getParameters() {
return parameters;
}
@JsonProperty("parameters")
public void setParameters(Parameters parameters) {
this.parameters = parameters;
}
@JsonProperty("contexts")
public List<Context> getContexts() {
return contexts;
}
@JsonProperty("contexts")
public void setContexts(List<Context> contexts) {
this.contexts = contexts;
}
@JsonProperty("metadata")
public Metadata getMetadata() {
return metadata;
}
@JsonProperty("metadata")
public void setMetadata(Metadata metadata) {
this.metadata = metadata;
}
@JsonProperty("fulfillment")
public Fulfillment getFulfillment() {
return fulfillment;
}
@JsonProperty("fulfillment")
public void setFulfillment(Fulfillment fulfillment) {
this.fulfillment = fulfillment;
}
@JsonProperty("score")
public Integer getScore() {
return score;
}
@JsonProperty("score")
public void setScore(Integer score) {
this.score = score;
}
}
| [
"robertovillarejo@outlook.com"
] | robertovillarejo@outlook.com |
1bd19e2a38f58bd0ea9bdfc14193f2a17b3fec12 | 65af6cdb7eab8f832369e68e8f9011a2b2aeaf4a | /appgeteway/src/main/java/com/labotech/lims_geteway/security/jwt/JWTConfigurer.java | c9055724f9fb8dbf27fc07a770c16baa822b8aae | [] | no_license | BulkSecurityGeneratorProject/laboratorio | f85332d55299cdde929515b520263e459bde8e41 | 8969d23d953dd8396f8133f76bb1c1c4a97ffb51 | refs/heads/master | 2022-12-24T18:15:27.565038 | 2017-04-14T17:35:43 | 2017-04-14T17:35:43 | 296,580,651 | 0 | 0 | null | 2020-09-18T09:48:52 | 2020-09-18T09:48:51 | null | UTF-8 | Java | false | false | 937 | java | package com.labotech.lims_geteway.security.jwt;
import org.springframework.security.config.annotation.SecurityConfigurerAdapter;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.web.DefaultSecurityFilterChain;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
public class JWTConfigurer extends SecurityConfigurerAdapter<DefaultSecurityFilterChain, HttpSecurity> {
public final static String AUTHORIZATION_HEADER = "Authorization";
private TokenProvider tokenProvider;
public JWTConfigurer(TokenProvider tokenProvider) {
this.tokenProvider = tokenProvider;
}
@Override
public void configure(HttpSecurity http) throws Exception {
JWTFilter customFilter = new JWTFilter(tokenProvider);
http.addFilterBefore(customFilter, UsernamePasswordAuthenticationFilter.class);
}
}
| [
"Leonardo Ribeiro Silva"
] | Leonardo Ribeiro Silva |
cd5c55788b83b09e5b57a2c479e47c8931545569 | f54780cce6fc5f4102965144024b0e897d8ea88b | /hades/src/test/java/org/synyx/hades/daocustom/CustomGenericDaoFactory.java | 320c054fa638a10e9115f7f8cedfea2666cc66e9 | [] | no_license | cestunefolie/hades | 0ee7d7d563af04ee42aaa4f04cdcb7877ae90748 | 5a89b473b3b6480f2b2da02c8f7a4930f4612b4e | refs/heads/master | 2021-01-15T14:18:24.353952 | 2012-06-19T16:06:48 | 2012-06-19T16:06:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,605 | java | /*
* Copyright 2008-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by 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.synyx.hades.daocustom;
import javax.persistence.EntityManager;
import org.synyx.hades.dao.orm.GenericDaoFactory;
import org.synyx.hades.dao.orm.GenericJpaDao;
/**
* Sample implementation of a custom {@link GenericDaoFactory} to use a custom
* DAO base class.
*
* @author Oliver Gierke
*/
public class CustomGenericDaoFactory extends GenericDaoFactory {
/**
* Factory method to create a custom {@link GenericDaoFactory} instance.
*
* @param em
* @return
*/
public static GenericDaoFactory create(EntityManager em) {
GenericDaoFactory factory = new CustomGenericDaoFactory();
factory.setEntityManager(em);
return factory;
}
/*
* (non-Javadoc)
*
* @see org.synyx.hades.dao.orm.GenericDaoFactory#getDaoClass()
*/
@Override
@SuppressWarnings("rawtypes")
protected Class<? extends GenericJpaDao> getDaoClass() {
return CustomGenericJpaDao.class;
}
}
| [
"info@olivergierke.de"
] | info@olivergierke.de |
6ec508028932728f645e1b1fdc57936266722efe | 92dcfa1a9f836b3bbaf9339d5cfa1c00609f0414 | /recharge-notice-gateway/src/main/java/com/future/gameplatform/recharge/notice/gateway/resource/CMCCSdkNoticeResource.java | c57f649c40d3d683b3e6f2979a509c0d49dda743 | [] | no_license | game-platform-awaresome/game-platform | d839566476c13bec5938a906ee82673579762aab | 5b489e4b35366124fe23a2b0ee240de834521a41 | refs/heads/master | 2020-04-01T15:05:31.689435 | 2015-02-14T05:37:38 | 2015-02-14T05:37:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,213 | java | package com.future.gameplatform.recharge.notice.gateway.resource;
import com.future.gameplatform.recharge.common.service.ChannelNoticeService;
import com.future.gameplatform.recharge.common.util.RechargeConstants;
import com.future.gameplatform.recharge.common.util.ServiceResult;
import com.future.gameplatform.recharge.common.util.SignUtil;
import org.apache.commons.httpclient.HttpStatus;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.util.HashMap;
import java.util.Map;
/**
* Created with IntelliJ IDEA.
* User: JohnKee
* Date: 14-8-17
* Time: 上午10:22
* To change this template use File | Settings | File Templates.
*/
@Path("/0/api/rechargenotice")
public class CMCCSdkNoticeResource {
private final static Logger logger = LoggerFactory.getLogger(CMCCSdkNoticeResource.class);
private ChannelNoticeService channelNoticeService;
public void setChannelNoticeService(ChannelNoticeService channelNoticeService) {
this.channelNoticeService = channelNoticeService;
}
@POST
@Path("/cmcc/sdk")
@Produces(MediaType.TEXT_PLAIN)
public Response receiveNotice(@QueryParam("MchNo") String MchNo,
@QueryParam("Fee")String Fee,
@QueryParam("Mobile")String Mobile,
@QueryParam("sign")String sign,
@QueryParam("merPriv")String merPriv){
logger.debug("received notice from cmcc hfb,mchno:[{}]", MchNo);
if(!SignUtil.checkChannelSign(sign, MchNo, Fee, Mobile, RechargeConstants.CMCC_SDK_APPKEY)){
return Response.status(HttpStatus.SC_BAD_REQUEST).entity("111~传入参数有误~").build();
}
ServiceResult<String> serviceResult = channelNoticeService.receiveSDKNotice(MchNo, Fee, Mobile);
if(serviceResult.isSuccess()){
return Response.ok("000~success~").build();
}else {
return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR).entity(serviceResult.getErrorCode()+"~"+serviceResult.getErrorMessage()+"~").build();
}
}
}
| [
"zhaominhe@gmail.com"
] | zhaominhe@gmail.com |
63a5609f99eddaea76c9d24970aee7ddf08a3212 | 33ed051ada99b4bbf32890f2c965f056ab443464 | /JavaAdvClass/src/main/java/Enums/PowerState.java | d0003b797054276539dff02d3f267a05f78c1dc3 | [] | no_license | SamoraJourdan/Java-Advanced | 48098b05de2a11f37cbe644cb703b4038e218f74 | c68d8b2baba7231ea57c5feb4703fad89b9be2d6 | refs/heads/main | 2023-07-29T11:22:47.524552 | 2021-09-06T16:50:44 | 2021-09-06T16:50:44 | 394,545,001 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 525 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Enums;
/**
*
* @author pc
*/
public enum PowerState {
OFF("The power is off"),
ON("The power is on"),
SUSPEND("The power usage is low");
private String description;
private PowerState(String d){
description = d;
}
public String getDiscription(){
return description;
}
}
| [
"samorajourdan@gmail.com"
] | samorajourdan@gmail.com |
d8b341d26507016fd4dd103e8ca13ad9acb12f50 | 55dca62e858f1a44c2186774339823a301b48dc7 | /code/my-app/functions/11/joinTransport_AIUnit.java | f78c181add1e50389bf4f46edc13ad293eebbee9 | [] | no_license | jwiszowata/code_reaper | 4fff256250299225879d1412eb1f70b136d7a174 | 17dde61138cec117047a6ebb412ee1972886f143 | refs/heads/master | 2022-12-15T14:46:30.640628 | 2022-02-10T14:02:45 | 2022-02-10T14:02:45 | 84,747,455 | 0 | 0 | null | 2022-12-07T23:48:18 | 2017-03-12T18:26:11 | Java | UTF-8 | Java | false | false | 375 | java | public boolean joinTransport(Unit carrier, Direction direction) {
AIUnit aiCarrier = getAIMain().getAIUnit(carrier);
if (aiCarrier == null)
return false;
boolean result = AIMessage.askEmbark(aiCarrier, unit, direction) && unit.getLocation() == carrier;
if (result) {
requestLocalRearrange();
takeTransport();
}
return result;
} | [
"wiszowata.joanna@gmail.com"
] | wiszowata.joanna@gmail.com |
043d0217792c016d86099342f246d3135ae8daf4 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/26/26_488d69b799d173fdf3a50d24b5ae42d35896bc8b/BankWithdrawCommand/26_488d69b799d173fdf3a50d24b5ae42d35896bc8b_BankWithdrawCommand_s.java | abd65fa63cc3da6ef4785a199932765e560f79e0 | [] | 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 | 4,218 | java | package com.github.omwah.SDFEconomy.commands;
import com.github.omwah.SDFEconomy.BankAccount;
import com.github.omwah.SDFEconomy.SDFEconomyAPI;
import com.github.omwah.omcommands.CommandHandler;
import java.util.ResourceBundle;
import net.milkbowl.vault.economy.EconomyResponse;
import net.milkbowl.vault.economy.EconomyResponse.ResponseType;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class BankWithdrawCommand extends PlayerAndLocationSpecificCommand {
public BankWithdrawCommand(SDFEconomyAPI api, ResourceBundle translation) {
super("bank withdraw", api, translation);
setArgumentRange(2, 4);
setIdentifiers(this.getName());
setPermission("sdfeconomy.use_bank");
}
@Override
public boolean execute(CommandHandler handler, CommandSender sender, String label, String identifier, String[] args)
{
PlayerAndLocation ploc = getPlayerAndLocation(handler, sender, args, 2, 3);
String bank_name = args[0];
// Try and parse amount, fail gracefully
double amount;
try {
amount = Double.parseDouble(args[1]);
} catch (NumberFormatException e) {
sender.sendMessage(getTranslation("AccountCommon-invalid_amount", args[1]));
return false;
}
BankAccount bank_account = api.getBankAccount(bank_name);
// If arguments are supplied then check for another players balance
if (ploc != null) {
// Check that we have a valid player account
if(!api.hasAccount(ploc.playerName, ploc.locationName)) {
sender.sendMessage(getTranslation("AccountCommon-cannot_find_accoun", ploc.playerName, ploc.locationName));
return false;
}
// Check that the bank account exists
if(bank_account == null) {
sender.sendMessage(getTranslation("BankCommon-bank_not_found", bank_name));
return false;
}
// Check that location of player and bank location match
if(!ploc.locationName.equalsIgnoreCase(bank_account.getLocation())) {
sender.sendMessage(getClassTranslation("location_mismatch",
bank_account.getName(), bank_account.getLocation(), ploc.locationName));
return false;
}
// Now make sure player has permissions and do withdraw
if(handler.hasAdminPermission(sender) ||
sender instanceof Player && bank_account.isOwner(((Player)sender).getName()) ||
bank_account.isMember(((Player)sender).getName())) {
EconomyResponse bank_w_res = api.bankWithdraw(bank_name, amount);
if(bank_w_res.type != ResponseType.SUCCESS) {
sender.sendMessage(getClassTranslation("bank_widthdraw_error", bank_name, bank_w_res.errorMessage));
return false;
}
EconomyResponse player_d_res = api.depositPlayer(ploc.playerName, amount, ploc.locationName);
if(player_d_res.type != ResponseType.SUCCESS) {
sender.sendMessage(getClassTranslation("player_deposit_error", ploc.playerName, player_d_res.errorMessage));
return false;
}
sender.sendMessage(getClassTranslation("bank_withdraw_success",
api.format(amount), bank_name, bank_account.getLocation(), ploc.playerName));
} else {
sender.sendMessage(getTranslation("BankCommon-not_owner", bank_name));
return false;
}
} else {
// Unable to succesfully get player name and or location, helper routine will send appropriate message
return false;
}
return true;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
a1b7b65b4486a54c668fc13a1baaff26945fbef8 | 3c5a29470f94612691b77984b65c434bb7d01ca7 | /代理模式 Proxy Pattern/动态代理/MyProxy6/src/zhk/Test.java | 98eff3f09e2b6c5dc110f0321df82c2dba98fccf | [] | no_license | EthanCo/PatternsPractice | 324072bfe81665839cff5cbdabb3ba4bd5b956c4 | a0cb42ea4085ad1e9d11540c52ceba58fb3999de | refs/heads/master | 2021-01-10T17:11:36.736755 | 2020-04-30T09:01:49 | 2020-04-30T09:01:49 | 49,206,824 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 489 | java | package zhk;
import domain.*;
/*
* 只要是实现了[任意]接口的都可以用,都可以实现代理
* 动态代理,不需要TankTimeProxy等类了
* 比如Time计时可以动态代理给任意接口
*
* 问题:实际测试中发现,在 设置文件目录 后 要refresh 一下项目 此程序才能执行
* */
public class Test {
public static void main(String[] args) throws Exception{
Moveable m = (Moveable)Proxy.newProxyInstance(Moveable.class);
m.move();
}
}
| [
"fenghenyu@163.com"
] | fenghenyu@163.com |
ed58cdbb7e776618db44bf06aae70725023754e5 | ce32decef039a586855c362381003d21d1ab3342 | /modules/flowable5-engine/src/main/java/org/activiti/engine/delegate/event/impl/ActivitiSignalEventImpl.java | dd0c20edfa1d6afb412e63a8407af1e976bb26a8 | [
"Apache-2.0"
] | permissive | flowable/flowable-engine | fa5fb5c29a453669887bee7874ca6d73fd2663c7 | 7bd4ee8b7374b43dcdd517a26afa14e6806f40e4 | refs/heads/main | 2023-08-31T03:55:26.415399 | 2023-08-29T11:53:55 | 2023-08-29T11:53:55 | 70,780,002 | 7,040 | 2,775 | Apache-2.0 | 2023-09-14T16:51:30 | 2016-10-13T07:21:43 | Java | UTF-8 | Java | false | false | 1,473 | 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 org.activiti.engine.delegate.event.impl;
import org.flowable.common.engine.api.delegate.event.FlowableEngineEventType;
import org.flowable.engine.delegate.event.FlowableSignalEvent;
/**
* An {@link FlowableSignalEvent} implementation.
*
* @author Frederik Heremans
*/
public class ActivitiSignalEventImpl extends ActivitiActivityEventImpl implements FlowableSignalEvent {
protected String signalName;
protected Object signalData;
public ActivitiSignalEventImpl(FlowableEngineEventType type) {
super(type);
}
@Override
public String getSignalName() {
return signalName;
}
public void setSignalName(String signalName) {
this.signalName = signalName;
}
@Override
public Object getSignalData() {
return signalData;
}
public void setSignalData(Object signalData) {
this.signalData = signalData;
}
}
| [
"tijs.rademakers@gmail.com"
] | tijs.rademakers@gmail.com |
01a5a9155abbfee2ce3636874a7d2433cf22c732 | 0aa590aa7d29c6ea5ace744d946ce9effdf557ae | /AppWidgetSample/app/src/main/java/com/example/appwidgetsample/NewAppWidget.java | c3829e9b38f8f913bb4d4c8109e38c32e5ee6016 | [] | no_license | YanaKrukovska/android-fundamentals-advanced | 3ccebdc2682bc2d90272a602c84a58821c00010b | f72ca812971f066b11a70c69c17e7423eb409034 | refs/heads/master | 2022-04-19T07:26:58.616638 | 2020-04-21T08:44:17 | 2020-04-21T08:44:17 | 257,533,333 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,351 | java | package com.example.appwidgetsample;
import android.app.PendingIntent;
import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProvider;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.widget.RemoteViews;
import java.text.DateFormat;
import java.util.Date;
public class NewAppWidget extends AppWidgetProvider {
private static final String mSharedPrefFile =
"com.example.android.appwidgetsample";
private static final String COUNT_KEY = "count";
static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,
int appWidgetId) {
SharedPreferences prefs = context.getSharedPreferences(
mSharedPrefFile, 0);
int count = prefs.getInt(COUNT_KEY + appWidgetId, 0);
count++;
String dateString =
DateFormat.getTimeInstance(DateFormat.SHORT).format(new Date());
RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.new_app_widget);
views.setTextViewText(R.id.appwidget_id, String.valueOf(appWidgetId));
views.setTextViewText(R.id.appwidget_update,
context.getResources().getString(
R.string.date_count_format, count, dateString));
Intent intentUpdate = new Intent(context, NewAppWidget.class);
intentUpdate.setAction(AppWidgetManager.ACTION_APPWIDGET_UPDATE);
int[] idArray = new int[]{appWidgetId};
intentUpdate.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, idArray);
PendingIntent pendingUpdate = PendingIntent.getBroadcast(
context, appWidgetId, intentUpdate,
PendingIntent.FLAG_UPDATE_CURRENT);
views.setOnClickPendingIntent(R.id.button_update, pendingUpdate);
appWidgetManager.updateAppWidget(appWidgetId, views);
SharedPreferences.Editor prefEditor = prefs.edit();
prefEditor.putInt(COUNT_KEY + appWidgetId, count);
prefEditor.apply();
}
@Override
public void onUpdate(Context context,
AppWidgetManager appWidgetManager, int[] appWidgetIds) {
for (int appWidgetId : appWidgetIds) {
updateAppWidget(context, appWidgetManager, appWidgetId);
}
}
}
| [
"jana.krua@gmail.com"
] | jana.krua@gmail.com |
6f39c99d157be31c75ae7def92833cb2fcf0fb89 | f7b6c574c1cc4605306423c14ce48de07c384189 | /microservices/book-service/src/main/java/gabia/library/kafka/sender/KafkaBookRentMessageSender.java | d5fc4a5f4d50a373945a6d05196a59b07a859196 | [] | no_license | didrlgus/springboot-library | 0a182fd2cbf61189e3f87b07128a01b0ff2e2ccf | 8bc7685fd23434741ab0950471cf9cead46b3ecf | refs/heads/master | 2023-04-03T17:22:25.372391 | 2021-04-12T12:20:04 | 2021-04-12T12:20:04 | 353,011,568 | 5 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,958 | java | package gabia.library.kafka.sender;
import gabia.library.kafka.BookRentMessage;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.kafka.support.KafkaHeaders;
import org.springframework.kafka.support.SendResult;
import org.springframework.messaging.Message;
import org.springframework.messaging.support.MessageBuilder;
import org.springframework.stereotype.Component;
import org.springframework.util.concurrent.ListenableFuture;
import org.springframework.util.concurrent.ListenableFutureCallback;
@Slf4j
@RequiredArgsConstructor
@Component
public class KafkaBookRentMessageSender {
@Qualifier("bookRentKafkaTemplate")
private final KafkaTemplate<String, BookRentMessage> kafkaTemplate;
@Value("${kafka.topic.rent.name}")
private String topicName;
public void send(BookRentMessage bookRentMessage) {
Message<BookRentMessage> message = MessageBuilder
.withPayload(bookRentMessage)
.setHeader(KafkaHeaders.TOPIC, topicName)
.build();
ListenableFuture<SendResult<String, BookRentMessage>> future = kafkaTemplate.send(message);
future.addCallback(new ListenableFutureCallback<SendResult<String, BookRentMessage>>() {
@Override
public void onSuccess(SendResult<String, BookRentMessage> result) {
log.info("Sent message={} to topic{} with offset={}",
result.getProducerRecord().value().toString(), result.getRecordMetadata().topic(), result.getRecordMetadata().offset());
}
@Override
public void onFailure(Throwable ex) {
log.info("Unable to send message=[] due to : " + ex.getMessage());
}
});
}
}
| [
"rlgusdid@naver.com"
] | rlgusdid@naver.com |
51b5d1536517393b290d4f0c73f63359545b8aeb | 24d8cf871b092b2d60fc85d5320e1bc761a7cbe2 | /jEdit/rev4676-4998/right-tag-4998/bsh/BlockNameSpace.java | e2be48bdeaf61c4a69619020af831b4c1c33a0c2 | [] | no_license | joliebig/featurehouse_fstmerge_examples | af1b963537839d13e834f829cf51f8ad5e6ffe76 | 1a99c1788f0eb9f1e5d8c2ced3892d00cd9449ad | refs/heads/master | 2016-09-05T10:24:50.974902 | 2013-03-28T16:28:47 | 2013-03-28T16:28:47 | 9,080,611 | 3 | 2 | null | null | null | null | UTF-8 | Java | false | false | 928 | java |
package bsh;
class BlockNameSpace extends NameSpace
{
boolean initMode;
public BlockNameSpace( NameSpace parent )
throws EvalError
{
super( parent, parent.name + "/BlockNameSpace" );
}
public void setVariable(String name, Object o) throws EvalError {
if ( weHaveVar( name ) || initMode )
super.setVariable( name, o );
else
getParent().setVariable( name, o );
}
public void setInitMode( boolean b ) {
initMode = b;
}
boolean weHaveVar( String name ) {
return super.getVariableImpl( name, false ) != null;
}
public NameSpace getSuper() {
return getParent().getSuper();
}
This getThis( Interpreter declaringInterpreter ) {
return getParent().getThis( declaringInterpreter );
}
public void importClass(String name) {
getParent().importClass( name );
}
public void importPackage(String name) {
getParent().importPackage( name );
}
}
| [
"joliebig@fim.uni-passau.de"
] | joliebig@fim.uni-passau.de |
191e0a7759b9d5116a89691c6d1f7b14c9fbe733 | 11b9a30ada6672f428c8292937dec7ce9f35c71b | /src/main/java/com/sun/org/apache/xml/internal/security/signature/reference/ReferenceSubTreeData.java | bc4e03df1664b0696b7c220d6ef5844bcfa080c2 | [] | no_license | bogle-zhao/jdk8 | 5b0a3978526723b3952a0c5d7221a3686039910b | 8a66f021a824acfb48962721a20d27553523350d | refs/heads/master | 2022-12-13T10:44:17.426522 | 2020-09-27T13:37:00 | 2020-09-27T13:37:00 | 299,039,533 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,216 | java | /***** Lobxxx Translate Finished ******/
/*
* Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
/**
* 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.
* <p>
* 根据一个或多个贡献者许可协议授予Apache软件基金会(ASF)。有关版权所有权的其他信息,请参阅随此作品分发的NOTICE文件。
* ASF根据Apache许可证2.0版("许可证")向您授予此文件;您不能使用此文件,除非符合许可证。您可以通过获取许可证的副本。
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* 除非适用法律要求或书面同意,否则根据许可证分发的软件按"原样"分发,不附带任何明示或暗示的担保或条件。请参阅管理许可证下的权限和限制的特定语言的许可证。
*
*/
/*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* <p>
* 版权所有(c)2005,2013,Oracle和/或其附属公司。版权所有。
*
*/
/*
* $Id$
* <p>
* $ Id $
*
*/
package com.sun.org.apache.xml.internal.security.signature.reference;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.NoSuchElementException;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
/**
* A representation of a <code>ReferenceNodeSetData</code> type containing a node-set.
* This is a subtype of NodeSetData that represents a dereferenced
* same-document URI as the root of a subdocument. The main reason is
* for efficiency and performance, as some transforms can operate
* directly on the subdocument and there is no need to convert it
* first to an XPath node-set.
* <p>
* 包含节点集的<code> ReferenceNodeSetData </code>类型的表示形式。这是NodeSetData的子类型,表示与子文档的根解引用的同一文档URI。
* 主要原因是效率和性能,因为一些转换可以直接对子文档操作,并且没有必要将它首先转换为XPath节点集。
*
*/
public class ReferenceSubTreeData implements ReferenceNodeSetData {
private boolean excludeComments;
private Node root;
public ReferenceSubTreeData(Node root, boolean excludeComments) {
this.root = root;
this.excludeComments = excludeComments;
}
public Iterator<Node> iterator() {
return new DelayedNodeIterator(root, excludeComments);
}
public Node getRoot() {
return root;
}
public boolean excludeComments() {
return excludeComments;
}
/**
* This is an Iterator that contains a backing node-set that is
* not populated until the caller first attempts to advance the iterator.
* <p>
* 这是一个迭代器,它包含一个后备节点集,在调用者首次尝试提前迭代器之前,它不会被填充。
*
*/
static class DelayedNodeIterator implements Iterator<Node> {
private Node root;
private List<Node> nodeSet;
private ListIterator<Node> li;
private boolean withComments;
DelayedNodeIterator(Node root, boolean excludeComments) {
this.root = root;
this.withComments = !excludeComments;
}
public boolean hasNext() {
if (nodeSet == null) {
nodeSet = dereferenceSameDocumentURI(root);
li = nodeSet.listIterator();
}
return li.hasNext();
}
public Node next() {
if (nodeSet == null) {
nodeSet = dereferenceSameDocumentURI(root);
li = nodeSet.listIterator();
}
if (li.hasNext()) {
return li.next();
} else {
throw new NoSuchElementException();
}
}
public void remove() {
throw new UnsupportedOperationException();
}
/**
* Dereferences a same-document URI fragment.
*
* <p>
* 解除同一文档URI片段。
*
*
* @param node the node (document or element) referenced by the
* URI fragment. If null, returns an empty set.
* @return a set of nodes (minus any comment nodes)
*/
private List<Node> dereferenceSameDocumentURI(Node node) {
List<Node> nodeSet = new ArrayList<Node>();
if (node != null) {
nodeSetMinusCommentNodes(node, nodeSet, null);
}
return nodeSet;
}
/**
* Recursively traverses the subtree, and returns an XPath-equivalent
* node-set of all nodes traversed, excluding any comment nodes,
* if specified.
*
* <p>
* 递归地遍历子树,并返回所有经过的节点的XPath等效节点集,排除任何注释节点(如果指定)。
*
* @param node the node to traverse
* @param nodeSet the set of nodes traversed so far
* @param the previous sibling node
*/
@SuppressWarnings("fallthrough")
private void nodeSetMinusCommentNodes(Node node, List<Node> nodeSet,
Node prevSibling)
{
switch (node.getNodeType()) {
case Node.ELEMENT_NODE :
nodeSet.add(node);
NamedNodeMap attrs = node.getAttributes();
if (attrs != null) {
for (int i = 0, len = attrs.getLength(); i < len; i++) {
nodeSet.add(attrs.item(i));
}
}
Node pSibling = null;
for (Node child = node.getFirstChild(); child != null;
child = child.getNextSibling()) {
nodeSetMinusCommentNodes(child, nodeSet, pSibling);
pSibling = child;
}
break;
case Node.DOCUMENT_NODE :
pSibling = null;
for (Node child = node.getFirstChild(); child != null;
child = child.getNextSibling()) {
nodeSetMinusCommentNodes(child, nodeSet, pSibling);
pSibling = child;
}
break;
case Node.TEXT_NODE :
case Node.CDATA_SECTION_NODE:
// emulate XPath which only returns the first node in
// contiguous text/cdata nodes
if (prevSibling != null &&
(prevSibling.getNodeType() == Node.TEXT_NODE ||
prevSibling.getNodeType() == Node.CDATA_SECTION_NODE)) {
return;
}
nodeSet.add(node);
break;
case Node.PROCESSING_INSTRUCTION_NODE :
nodeSet.add(node);
break;
case Node.COMMENT_NODE:
if (withComments) {
nodeSet.add(node);
}
}
}
}
}
| [
"zhaobo@MacBook-Pro.local"
] | zhaobo@MacBook-Pro.local |
b10e2683d84287c75edbd210a1156f057329b2ac | 80e3f89fdd26f8166190bb6d048666b687415814 | /admin/src/main/java/com/etycx/framework/wrapper/RequestWrapper.java | 8f6af9334e4ad1f8e76d48a1e184b407b3b1bceb | [] | no_license | 15001167619/update_education | 378dde193286b8a5711eb79f2562eedafb877c59 | 82665ce676feb1183e36a74c7dcad561b8024fee | refs/heads/master | 2022-09-12T19:37:46.087503 | 2019-10-10T15:35:51 | 2019-10-10T15:35:51 | 214,104,208 | 0 | 0 | null | 2022-09-01T23:13:52 | 2019-10-10T06:28:16 | JavaScript | UTF-8 | Java | false | false | 2,725 | java | package com.etycx.framework.wrapper;
import javax.servlet.ReadListener;
import javax.servlet.ServletInputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import java.io.*;
/**
* @author 武海升
* @description
* @date 2019/6/14 9:34
*/
public class RequestWrapper extends HttpServletRequestWrapper{
private final String body;
public RequestWrapper(HttpServletRequest request) {
super(request);
StringBuilder stringBuilder = new StringBuilder();
BufferedReader bufferedReader = null;
InputStream inputStream = null;
try {
inputStream = request.getInputStream();
if (inputStream != null) {
bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
char[] charBuffer = new char[128];
int bytesRead = -1;
while ((bytesRead = bufferedReader.read(charBuffer)) > 0) {
stringBuilder.append(charBuffer, 0, bytesRead);
}
} else {
stringBuilder.append("");
}
} catch (IOException ex) {
} finally {
if (inputStream != null) {
try {
inputStream.close();
}
catch (IOException e) {
e.printStackTrace();
}
}
if (bufferedReader != null) {
try {
bufferedReader.close();
}
catch (IOException e) {
e.printStackTrace();
}
}
}
body = stringBuilder.toString();
}
@Override
public ServletInputStream getInputStream() throws IOException {
final ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(body.getBytes());
ServletInputStream servletInputStream = new ServletInputStream() {
@Override
public boolean isFinished() {
return false;
}
@Override
public boolean isReady() {
return false;
}
@Override
public void setReadListener(ReadListener readListener) {
}
@Override
public int read() throws IOException {
return byteArrayInputStream.read();
}
};
return servletInputStream;
}
@Override
public BufferedReader getReader() throws IOException {
return new BufferedReader(new InputStreamReader(this.getInputStream()));
}
public String getBody() {
return this.body;
}
}
| [
"123456"
] | 123456 |
5ec35990aefa77ad161f5b83c70cc09aae9d17dc | 60589364d2b8ae8db90e17d11d169d95809d6f12 | /src/evaluationWeek11/Before20.java | e6ddea5d6a13d34f72e62abe59a23d6ecc49bd38 | [] | no_license | mustafa1mashtah/java-projects | 1288fdfd5c318e55dc2856b0405c9a52f0f76fc5 | 92bcddf8feca4ddb3d2c6ed679981fbcba39dd14 | refs/heads/master | 2020-04-06T18:04:57.372013 | 2019-02-01T09:32:36 | 2019-02-01T09:32:36 | 157,684,706 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 409 | java | package evaluationWeek11;
import java.time.LocalDate;
public class Before20 implements Dates {
@Override
public LocalDate getCountDown(LocalDate localDate) {
return LocalDate.of(localDate.getYear(),06,20);
}
@Override
public Boolean isRightDate(LocalDate localDate) {
return localDate.isLeapYear()&&localDate.isBefore(LocalDate.of(localDate.getYear(),06,20));
}
}
| [
"mashtah.moustafa@gmail.com"
] | mashtah.moustafa@gmail.com |
a8528dafccbfc12e6bc24a6158ba939eba9bf89a | 63152c4f60c3be964e9f4e315ae50cb35a75c555 | /core/target/java/org/apache/spark/util/AccumulatorV2.java | aad1efe0b7f8ae718ee96a86c6ea13021a1e14ff | [
"EPL-1.0",
"Classpath-exception-2.0",
"LicenseRef-scancode-unicode",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-free-unknown",
"GCC-exception-3.1",
"LGPL-2.0-or-later",
"CDDL-1.0",
"MIT",
"CC-BY-SA-3.0",
"NAIST-2003",
"LGPL-2.1-only",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-other-permissive",
"GPL-2.0-only",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"CPL-1.0",
"CC-PDDC",
"EPL-2.0",
"CDDL-1.1",
"BSD-2-Clause",
"CC0-1.0",
"Python-2.0",
"LicenseRef-scancode-unknown"
] | permissive | PowersYang/spark-cn | 76c407d774e35d18feb52297c68c65889a75a002 | 06a0459999131ee14864a69a15746c900e815a14 | refs/heads/master | 2022-12-11T20:18:37.376098 | 2020-03-30T09:48:22 | 2020-03-30T09:48:22 | 219,248,341 | 0 | 0 | Apache-2.0 | 2022-12-05T23:46:17 | 2019-11-03T03:55:17 | HTML | UTF-8 | Java | false | false | 3,930 | java | package org.apache.spark.util;
/**
* The base class for accumulators, that can accumulate inputs of type <code>IN</code>, and produce output of
* type <code>OUT</code>.
* <p>
* <code>OUT</code> should be a type that can be read atomically (e.g., Int, Long), or thread-safely
* (e.g., synchronized collections) because it will be read from other threads.
*/
public abstract class AccumulatorV2<IN extends java.lang.Object, OUT extends java.lang.Object> implements scala.Serializable {
// not preceding
// TypeTree().setOriginal(TypeBoundsTree(TypeTree(), TypeTree()))
// TypeTree().setOriginal(TypeBoundsTree(TypeTree(), TypeTree()))
public AccumulatorV2 () { throw new RuntimeException(); }
/**
* Takes the inputs and accumulates.
* @param v (undocumented)
*/
public abstract void add (IN v) ;
/**
* Creates a new copy of this accumulator.
* @return (undocumented)
*/
public abstract org.apache.spark.util.AccumulatorV2<IN, OUT> copy () ;
/**
* Creates a new copy of this accumulator, which is zero value. i.e. call <code>isZero</code> on the copy
* must return true.
* @return (undocumented)
*/
public org.apache.spark.util.AccumulatorV2<IN, OUT> copyAndReset () { throw new RuntimeException(); }
/**
* Whether to accumulate values from failed tasks. This is set to true for system and time
* metrics like serialization time or bytes spilled, and false for things with absolute values
* like number of input rows. This should be used for internal metrics only.
* @return (undocumented)
*/
final boolean countFailedValues () { throw new RuntimeException(); }
/**
* Returns the id of this accumulator, can only be called after registration.
* @return (undocumented)
*/
public final long id () { throw new RuntimeException(); }
final boolean isAtDriverSide () { throw new RuntimeException(); }
/**
* Returns true if this accumulator has been registered.
* <p>
* @note All accumulators must be registered before use, or it will throw exception.
* @return (undocumented)
*/
public final boolean isRegistered () { throw new RuntimeException(); }
/**
* Returns if this accumulator is zero value or not. e.g. for a counter accumulator, 0 is zero
* value; for a list accumulator, Nil is zero value.
* @return (undocumented)
*/
public abstract boolean isZero () ;
/**
* Merges another same-type accumulator into this one and update its state, i.e. this should be
* merge-in-place.
* @param other (undocumented)
*/
public abstract void merge (org.apache.spark.util.AccumulatorV2<IN, OUT> other) ;
org.apache.spark.util.AccumulatorMetadata metadata () { throw new RuntimeException(); }
/**
* Returns the name of this accumulator, can only be called after registration.
* @return (undocumented)
*/
public final scala.Option<java.lang.String> name () { throw new RuntimeException(); }
void register (org.apache.spark.SparkContext sc, scala.Option<java.lang.String> name, boolean countFailedValues) { throw new RuntimeException(); }
/**
* Resets this accumulator, which is zero value. i.e. call <code>isZero</code> must
* return true.
*/
public abstract void reset () ;
/**
* Creates an {@link AccumulableInfo} representation of this {@link AccumulatorV2} with the provided
* values.
* @param update (undocumented)
* @param value (undocumented)
* @return (undocumented)
*/
org.apache.spark.scheduler.AccumulableInfo toInfo (scala.Option<java.lang.Object> update, scala.Option<java.lang.Object> value) { throw new RuntimeException(); }
public java.lang.String toString () { throw new RuntimeException(); }
/**
* Defines the current value of this accumulator
* @return (undocumented)
*/
public abstract OUT value () ;
protected final Object writeReplace () { throw new RuntimeException(); }
}
| [
"577790911@qq.com"
] | 577790911@qq.com |
7a6d5841f9ee80f1b075358fa3244539e80965f5 | 42fcf1d879cb75f08225137de5095adfdd63fa21 | /src/main/java/org/jooq/packages/PaMapsOffr.java | ffb5ac3ecd26e7041ef73f4ca1bfe3b4a07479cc | [] | no_license | mpsgit/JOOQTest | e10e9c8716f2688c8bf0160407b1244f9e70e8eb | 6af2922bddc55f591e94a5a9a6efd1627747d6ad | refs/heads/master | 2021-01-10T06:11:40.862153 | 2016-02-28T09:09:34 | 2016-02-28T09:09:34 | 52,711,455 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,178 | java | /**
* This class is generated by jOOQ
*/
package org.jooq.packages;
import java.math.BigDecimal;
import javax.annotation.Generated;
import org.jooq.Configuration;
import org.jooq.Field;
import org.jooq.Wetrn;
import org.jooq.impl.PackageImpl;
import org.jooq.packages.pa_maps_offr.AddProfile;
import org.jooq.packages.pa_maps_offr.DeleteOffers;
import org.jooq.packages.pa_maps_offr.EditOffer;
import org.jooq.packages.pa_maps_offr.GetAverageUnitSplits;
import org.jooq.packages.pa_maps_offr.GetHistoricalUnitSplits;
import org.jooq.packages.pa_maps_offr.GetOffr1;
import org.jooq.packages.pa_maps_offr.GetOffr2;
import org.jooq.packages.pa_maps_offr.GetStaticUnitSplits;
import org.jooq.udt.records.ObjOffrRecord;
import org.jooq.udt.records.TblIdRecord;
import org.jooq.udt.records.TblOffrIdRecord;
import org.jooq.udt.records.TblUnitSplitRecord;
/**
* Convenience access to all stored procedures and functions in PA_MAPS_OFFR
*/
@Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.7.2"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class PaMapsOffr extends PackageImpl {
private static final long serialVersionUID = 1939782467;
/**
* The reference instance of <code>WETRN.PA_MAPS_OFFR</code>
*/
public static final PaMapsOffr PA_MAPS_OFFR = new PaMapsOffr();
/**
* Call <code>WETRN.PA_MAPS_OFFR.ADD_PROFILE</code>
*/
public static ObjOffrRecord addProfile(Configuration configuration, ObjOffrRecord pOffr) {
AddProfile p = new AddProfile();
p.setPOffr(pOffr);
p.execute(configuration);
return p.getPOffr();
}
/**
* Call <code>WETRN.PA_MAPS_OFFR.DELETE_OFFERS</code>
*/
public static BigDecimal deleteOffers(Configuration configuration, TblOffrIdRecord pOfferList) {
DeleteOffers f = new DeleteOffers();
f.setPOfferList(pOfferList);
f.execute(configuration);
return f.getReturnValue();
}
/**
* Get <code>WETRN.PA_MAPS_OFFR.DELETE_OFFERS</code> as a field.
*/
public static Field<BigDecimal> deleteOffers(TblOffrIdRecord pOfferList) {
DeleteOffers f = new DeleteOffers();
f.setPOfferList(pOfferList);
return f.asField();
}
/**
* Get <code>WETRN.PA_MAPS_OFFR.DELETE_OFFERS</code> as a field.
*/
public static Field<BigDecimal> deleteOffers(Field<TblOffrIdRecord> pOfferList) {
DeleteOffers f = new DeleteOffers();
f.setPOfferList(pOfferList);
return f.asField();
}
/**
* Call <code>WETRN.PA_MAPS_OFFR.EDIT_OFFER</code>
*/
public static ObjOffrRecord editOffer(Configuration configuration, ObjOffrRecord pOffr) {
EditOffer p = new EditOffer();
p.setPOffr(pOffr);
p.execute(configuration);
return p.getPOffr();
}
/**
* Call <code>WETRN.PA_MAPS_OFFR.GET_AVERAGE_UNIT_SPLITS</code>
*/
public static TblUnitSplitRecord getAverageUnitSplits(Configuration configuration, TblIdRecord pItems) {
GetAverageUnitSplits f = new GetAverageUnitSplits();
f.setPItems(pItems);
f.execute(configuration);
return f.getReturnValue();
}
/**
* Get <code>WETRN.PA_MAPS_OFFR.GET_AVERAGE_UNIT_SPLITS</code> as a field.
*/
public static Field<TblUnitSplitRecord> getAverageUnitSplits(TblIdRecord pItems) {
GetAverageUnitSplits f = new GetAverageUnitSplits();
f.setPItems(pItems);
return f.asField();
}
/**
* Get <code>WETRN.PA_MAPS_OFFR.GET_AVERAGE_UNIT_SPLITS</code> as a field.
*/
public static Field<TblUnitSplitRecord> getAverageUnitSplits(Field<TblIdRecord> pItems) {
GetAverageUnitSplits f = new GetAverageUnitSplits();
f.setPItems(pItems);
return f.asField();
}
/**
* Call <code>WETRN.PA_MAPS_OFFR.GET_HISTORICAL_UNIT_SPLITS</code>
*/
public static TblUnitSplitRecord getHistoricalUnitSplits(Configuration configuration, Number pOffrId, Number pMrktId, Number pVehId, Integer pPrflCd, TblIdRecord pItems) {
GetHistoricalUnitSplits f = new GetHistoricalUnitSplits();
f.setPOffrId(pOffrId);
f.setPMrktId(pMrktId);
f.setPVehId(pVehId);
f.setPPrflCd(pPrflCd);
f.setPItems(pItems);
f.execute(configuration);
return f.getReturnValue();
}
/**
* Get <code>WETRN.PA_MAPS_OFFR.GET_HISTORICAL_UNIT_SPLITS</code> as a field.
*/
public static Field<TblUnitSplitRecord> getHistoricalUnitSplits(Number pOffrId, Number pMrktId, Number pVehId, Integer pPrflCd, TblIdRecord pItems) {
GetHistoricalUnitSplits f = new GetHistoricalUnitSplits();
f.setPOffrId(pOffrId);
f.setPMrktId(pMrktId);
f.setPVehId(pVehId);
f.setPPrflCd(pPrflCd);
f.setPItems(pItems);
return f.asField();
}
/**
* Get <code>WETRN.PA_MAPS_OFFR.GET_HISTORICAL_UNIT_SPLITS</code> as a field.
*/
public static Field<TblUnitSplitRecord> getHistoricalUnitSplits(Field<? extends Number> pOffrId, Field<? extends Number> pMrktId, Field<? extends Number> pVehId, Field<Integer> pPrflCd, Field<TblIdRecord> pItems) {
GetHistoricalUnitSplits f = new GetHistoricalUnitSplits();
f.setPOffrId(pOffrId);
f.setPMrktId(pMrktId);
f.setPVehId(pVehId);
f.setPPrflCd(pPrflCd);
f.setPItems(pItems);
return f.asField();
}
/**
* Call <code>WETRN.PA_MAPS_OFFR.GET_OFFR</code>
*/
public static ObjOffrRecord getOffr1(Configuration configuration, Number pOffrId, Number pVerId) {
GetOffr1 f = new GetOffr1();
f.setPOffrId(pOffrId);
f.setPVerId(pVerId);
f.execute(configuration);
return f.getReturnValue();
}
/**
* Get <code>WETRN.PA_MAPS_OFFR.GET_OFFR</code> as a field.
*/
public static Field<ObjOffrRecord> getOffr1(Number pOffrId, Number pVerId) {
GetOffr1 f = new GetOffr1();
f.setPOffrId(pOffrId);
f.setPVerId(pVerId);
return f.asField();
}
/**
* Get <code>WETRN.PA_MAPS_OFFR.GET_OFFR</code> as a field.
*/
public static Field<ObjOffrRecord> getOffr1(Field<? extends Number> pOffrId, Field<? extends Number> pVerId) {
GetOffr1 f = new GetOffr1();
f.setPOffrId(pOffrId);
f.setPVerId(pVerId);
return f.asField();
}
/**
* Call <code>WETRN.PA_MAPS_OFFR.GET_OFFR</code>
*/
public static ObjOffrRecord getOffr2(Configuration configuration, Number pOffrId, Number pVerId, Number pDataLevel) {
GetOffr2 f = new GetOffr2();
f.setPOffrId(pOffrId);
f.setPVerId(pVerId);
f.setPDataLevel(pDataLevel);
f.execute(configuration);
return f.getReturnValue();
}
/**
* Get <code>WETRN.PA_MAPS_OFFR.GET_OFFR</code> as a field.
*/
public static Field<ObjOffrRecord> getOffr2(Number pOffrId, Number pVerId, Number pDataLevel) {
GetOffr2 f = new GetOffr2();
f.setPOffrId(pOffrId);
f.setPVerId(pVerId);
f.setPDataLevel(pDataLevel);
return f.asField();
}
/**
* Get <code>WETRN.PA_MAPS_OFFR.GET_OFFR</code> as a field.
*/
public static Field<ObjOffrRecord> getOffr2(Field<? extends Number> pOffrId, Field<? extends Number> pVerId, Field<? extends Number> pDataLevel) {
GetOffr2 f = new GetOffr2();
f.setPOffrId(pOffrId);
f.setPVerId(pVerId);
f.setPDataLevel(pDataLevel);
return f.asField();
}
/**
* Call <code>WETRN.PA_MAPS_OFFR.GET_STATIC_UNIT_SPLITS</code>
*/
public static TblUnitSplitRecord getStaticUnitSplits(Configuration configuration, Number pMrktId, Number pOffrPerdId, TblIdRecord pItems) {
GetStaticUnitSplits f = new GetStaticUnitSplits();
f.setPMrktId(pMrktId);
f.setPOffrPerdId(pOffrPerdId);
f.setPItems(pItems);
f.execute(configuration);
return f.getReturnValue();
}
/**
* Get <code>WETRN.PA_MAPS_OFFR.GET_STATIC_UNIT_SPLITS</code> as a field.
*/
public static Field<TblUnitSplitRecord> getStaticUnitSplits(Number pMrktId, Number pOffrPerdId, TblIdRecord pItems) {
GetStaticUnitSplits f = new GetStaticUnitSplits();
f.setPMrktId(pMrktId);
f.setPOffrPerdId(pOffrPerdId);
f.setPItems(pItems);
return f.asField();
}
/**
* Get <code>WETRN.PA_MAPS_OFFR.GET_STATIC_UNIT_SPLITS</code> as a field.
*/
public static Field<TblUnitSplitRecord> getStaticUnitSplits(Field<? extends Number> pMrktId, Field<? extends Number> pOffrPerdId, Field<TblIdRecord> pItems) {
GetStaticUnitSplits f = new GetStaticUnitSplits();
f.setPMrktId(pMrktId);
f.setPOffrPerdId(pOffrPerdId);
f.setPItems(pItems);
return f.asField();
}
/**
* No further instances allowed
*/
private PaMapsOffr() {
super("PA_MAPS_OFFR", Wetrn.WETRN);
}
}
| [
"krisztian.koller@gmail.com"
] | krisztian.koller@gmail.com |
b26d830e662e01b5e6495c24b4be7ecc871a91a4 | 31f043184e2839ad5c3acbaf46eb1a26408d4296 | /src/main/java/com/github/highcharts4gwt/model/highcharts/option/api/plotoptions/pyramid/HideEvent.java | 98c57c757e0958b0822814e7995645de7987be6b | [] | no_license | highcharts4gwt/highchart-wrapper | 52ffa84f2f441aa85de52adb3503266aec66e0ac | 0a4278ddfa829998deb750de0a5bd635050b4430 | refs/heads/master | 2021-01-17T20:25:22.231745 | 2015-06-30T15:05:01 | 2015-06-30T15:05:01 | 24,794,406 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 210 | java |
package com.github.highcharts4gwt.model.highcharts.option.api.plotoptions.pyramid;
import com.github.highcharts4gwt.model.highcharts.object.api.Series;
public interface HideEvent {
Series series();
}
| [
"ronan.quillevere@gmail.com"
] | ronan.quillevere@gmail.com |
104a5e91b22c09a9e18fe0b9af01ae40164c3768 | 7991248e6bccacd46a5673638a4e089c8ff72a79 | /backend/core/src/main/java/org/artifactory/storage/mbean/ManagedStorageMBean.java | 9969bc595816a9d587c314c20aa1871fd596416d | [] | no_license | theoriginalshaheedra/artifactory-oss | 69b7f6274cb35c79db3a3cd613302de2ae019b31 | 415df9a9467fee9663850b4b8b4ee5bd4c23adeb | refs/heads/master | 2023-04-23T15:48:36.923648 | 2021-05-05T06:15:24 | 2021-05-05T06:15:24 | 364,455,815 | 1 | 0 | null | 2021-05-05T07:11:40 | 2021-05-05T03:57:33 | Java | UTF-8 | Java | false | false | 962 | java | /*
*
* Artifactory is a binaries repository manager.
* Copyright (C) 2018 JFrog Ltd.
*
* Artifactory is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Artifactory 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Artifactory. If not, see <http://www.gnu.org/licenses/>.
*
*/
package org.artifactory.storage.mbean;
/**
* @author Yossi Shaul
*/
public interface ManagedStorageMBean {
/**
* @return The database storage size in bytes
*/
long getSize();
} | [
"david.monichi@gmail.com"
] | david.monichi@gmail.com |
63b4f7170c51ff7d4f52a4095f68a2bf93e48082 | de3eb812d5d91cbc5b81e852fc32e25e8dcca05f | /tags/4.0.0-beta1-r2632/Crux/src/core/br/com/sysmap/crux/core/client/controller/crossdoc/ClientSerializationStreamReader.java | 098ad6810813548c813552a7eaf8c93525360855 | [] | no_license | svn2github/crux-framework | 7dd52a951587d4635112987301c88db23325c427 | 58bcb4821752b405a209cfc21fb83e3bf528727b | refs/heads/master | 2016-09-06T13:33:41.975737 | 2015-01-22T08:03:25 | 2015-01-22T08:03:25 | 13,135,398 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,978 | java | /*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed 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 br.com.sysmap.crux.core.client.controller.crossdoc;
import br.com.sysmap.crux.core.client.collection.FastList;
import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.UnsafeNativeLong;
import com.google.gwt.user.client.rpc.SerializationException;
import com.google.gwt.user.client.rpc.SerializationStreamReader;
import com.google.gwt.user.client.rpc.impl.Serializer;
/**
* For internal use only. Used for cross document call serialization.
*/
public final class ClientSerializationStreamReader implements SerializationStreamReader
{
int index;
JavaScriptObject results;
String[] stringTable;
private FastList<Object> seenArray = new FastList<Object>();
private Serializer serializer;
/**
* @param serializer
*/
public ClientSerializationStreamReader(Serializer serializer)
{
this.serializer = serializer;
}
private static native JavaScriptObject eval(String encoded) /*-{
return eval(encoded);
}-*/;
@UnsafeNativeLong
private static native long readLong0(double low, double high) /*-{
return [low, high];
}-*/;
public void prepareToRead(String encoded) throws SerializationException
{
results = eval(encoded);
index = -1;
seenArray.clear();
stringTable = new String[readTableSize()];
int resultLength = getLength(results);
int initTable = resultLength - stringTable.length -1;
for (int i=0; i<stringTable.length; i++)
{
stringTable[i] = readTableString(initTable+i);
}
}
public native boolean readBoolean() /*-{
return !!this.@br.com.sysmap.crux.core.client.controller.crossdoc.ClientSerializationStreamReader::results[++this.@br.com.sysmap.crux.core.client.controller.crossdoc.ClientSerializationStreamReader::index];
}-*/;
public native byte readByte() /*-{
return this.@br.com.sysmap.crux.core.client.controller.crossdoc.ClientSerializationStreamReader::results[++this.@br.com.sysmap.crux.core.client.controller.crossdoc.ClientSerializationStreamReader::index];
}-*/;
public native char readChar() /*-{
return this.@br.com.sysmap.crux.core.client.controller.crossdoc.ClientSerializationStreamReader::results[++this.@br.com.sysmap.crux.core.client.controller.crossdoc.ClientSerializationStreamReader::index];
}-*/;
public native double readDouble() /*-{
return this.@br.com.sysmap.crux.core.client.controller.crossdoc.ClientSerializationStreamReader::results[++this.@br.com.sysmap.crux.core.client.controller.crossdoc.ClientSerializationStreamReader::index];
}-*/;
public native float readFloat() /*-{
return this.@br.com.sysmap.crux.core.client.controller.crossdoc.ClientSerializationStreamReader::results[++this.@br.com.sysmap.crux.core.client.controller.crossdoc.ClientSerializationStreamReader::index];
}-*/;
public native int readInt() /*-{
return this.@br.com.sysmap.crux.core.client.controller.crossdoc.ClientSerializationStreamReader::results[++this.@br.com.sysmap.crux.core.client.controller.crossdoc.ClientSerializationStreamReader::index];
}-*/;
private native int readTableSize() /*-{
return this.@br.com.sysmap.crux.core.client.controller.crossdoc.ClientSerializationStreamReader::results[this.@br.com.sysmap.crux.core.client.controller.crossdoc.ClientSerializationStreamReader::results.length-1];
}-*/;
private static native int getLength(JavaScriptObject array) /*-{
return array.length;
}-*/;
/**
* @see com.google.gwt.user.client.rpc.SerializationStreamReader#readLong()
*/
public long readLong()
{
if (GWT.isScript())
{
return readLong0(readDouble(), readDouble());
}
else
{
return (long) readDouble() + (long) readDouble();
}
}
/**
* @see com.google.gwt.user.client.rpc.SerializationStreamReader#readObject()
*/
public final Object readObject() throws SerializationException
{
int token = readInt();
if (token < 0)
{
// Negative means a previous object
// Transform negative 1-based to 0-based.
return seenArray.get(-(token + 1));
}
// Positive means a new object
String typeSignature = getString(token);
if (typeSignature == null)
{
// a null string means a null instance
return null;
}
return deserialize(typeSignature);
}
public native short readShort() /*-{
return this.@br.com.sysmap.crux.core.client.controller.crossdoc.ClientSerializationStreamReader::results[++this.@br.com.sysmap.crux.core.client.controller.crossdoc.ClientSerializationStreamReader::index];
}-*/;
private native String readTableString(int idx) /*-{
return this.@br.com.sysmap.crux.core.client.controller.crossdoc.ClientSerializationStreamReader::results[idx];
}-*/;
public String readString()
{
return getString(readInt());
}
protected Object deserialize(String typeSignature) throws SerializationException
{
int id = reserveDecodedObjectIndex();
Object instance = serializer.instantiate(this, typeSignature);
rememberDecodedObject(id, instance);
serializer.deserialize(this, instance, typeSignature);
return instance;
}
protected String getString(int index)
{
// index is 1-based
return index > 0 ? this.stringTable[index - 1] : null;
};
protected final void rememberDecodedObject(int index, Object o)
{
// index is 1-based
seenArray.set(index - 1, o);
}
protected final int reserveDecodedObjectIndex()
{
seenArray.add(null);
// index is 1-based
return seenArray.size();
}
}
| [
"thiago@cruxframework.org@a5d2bbaa-053c-11de-b17c-0f1ef23b492c"
] | thiago@cruxframework.org@a5d2bbaa-053c-11de-b17c-0f1ef23b492c |
b8fab2ff3e3bea0b10cc3c3d2f2f36355481759f | 24d8cf871b092b2d60fc85d5320e1bc761a7cbe2 | /SQuirrel_SQL/rev4007-4908/right-trunk-4908/plugins/oracle/src/net/sourceforge/squirrel_sql/plugins/oracle/sessioninfo/NewSessionInfoWorksheetAction.java | 29948dd211c512ca6adc8757c3a6d8b8c1c64500 | [] | no_license | joliebig/featurehouse_fstmerge_examples | af1b963537839d13e834f829cf51f8ad5e6ffe76 | 1a99c1788f0eb9f1e5d8c2ced3892d00cd9449ad | refs/heads/master | 2016-09-05T10:24:50.974902 | 2013-03-28T16:28:47 | 2013-03-28T16:28:47 | 9,080,611 | 3 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,406 | java | package net.sourceforge.squirrel_sql.plugins.oracle.sessioninfo;
import java.awt.event.ActionEvent;
import javax.swing.SwingUtilities;
import net.sourceforge.squirrel_sql.fw.util.Resources;
import net.sourceforge.squirrel_sql.client.IApplication;
import net.sourceforge.squirrel_sql.client.action.SquirrelAction;
import net.sourceforge.squirrel_sql.client.session.ISession;
public class NewSessionInfoWorksheetAction extends SquirrelAction {
private Resources _resources;
public NewSessionInfoWorksheetAction(IApplication app, Resources rsrc) {
super(app, rsrc);
_resources = rsrc;
if (app == null) {
throw new IllegalArgumentException("Null IApplication passed");
}
}
public void actionPerformed(ActionEvent evt) {
ISession activeSession = getApplication().getSessionManager().getActiveSession();
if (activeSession == null)
throw new IllegalArgumentException("This method should not be called with a null activeSession");
final SessionInfoInternalFrame sif = new SessionInfoInternalFrame(activeSession, _resources);
getApplication().getMainFrame().addWidget(sif);
SwingUtilities.invokeLater(new Runnable()
{
public void run()
{
sif.setVisible(true);
}
});
}
}
| [
"joliebig@fim.uni-passau.de"
] | joliebig@fim.uni-passau.de |
29c7746cb756cbcf2e790286388e51ccd7cbfc1d | 0e0b9c6ab7c09ad92af642a779a98c28238d6d97 | /src/com/junpenghe/java/basic/functional/composition/Curry3Args.java | 04adf946620527ea8a765cae01f4d008615eab1c | [] | no_license | Junpengalaitp/java-learning-note | 0d141ba11f04d1bc27222fb91a621e1fd3514f3b | 218271f06707f0abeba302c1f0979ec27c874ec4 | refs/heads/master | 2023-04-08T05:25:43.384366 | 2021-04-26T09:39:11 | 2021-04-26T09:39:11 | 305,915,215 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 480 | java | package com.junpenghe.java.basic.functional.composition;
import java.util.function.Function;
/**
* @author Junpeng He
*/
public class Curry3Args {
public static void main(String[] args) {
Function<String, Function<String, Function<String, String>>> sum = a -> b -> c -> a + b + c;
Function<String, Function<String, String>> hi = sum.apply("Hi ");
Function<String, String> ho = hi.apply("Ho ");
System.out.println(ho.apply("Hup "));
}
}
| [
"hejunpeng2012@hotmail.com"
] | hejunpeng2012@hotmail.com |
ebc0b686f31fae177d15a5b40319bbddcba56294 | 1d928c3f90d4a0a9a3919a804597aa0a4aab19a3 | /java/lucene-solr/2015/12/CachedIndexOutput.java | 838b6a5f3a01f53766651f0d3c27f3c0734811ea | [
"Apache-2.0"
] | permissive | 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 | 3,018 | java | package org.apache.solr.store.blockcache;
/*
* 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.
*/
import java.io.IOException;
import org.apache.lucene.store.IndexOutput;
/**
* Cache the blocks as they are written. The cache file name is the name of
* the file until the file is closed, at which point the cache is updated
* to include the last modified date (which is unknown until that point).
* @lucene.experimental
*/
public class CachedIndexOutput extends ReusedBufferedIndexOutput {
private final BlockDirectory directory;
private final IndexOutput dest;
private final int blockSize;
private final String name;
private final String location;
private final Cache cache;
public CachedIndexOutput(BlockDirectory directory, IndexOutput dest,
int blockSize, String name, Cache cache, int bufferSize) {
super("dest=" + dest + " name=" + name, name, bufferSize);
this.directory = directory;
this.dest = dest;
this.blockSize = blockSize;
this.name = name;
this.location = directory.getFileCacheLocation(name);
this.cache = cache;
}
@Override
public void closeInternal() throws IOException {
dest.close();
cache.renameCacheFile(location, directory.getFileCacheName(name));
}
private int writeBlock(long position, byte[] b, int offset, int length)
throws IOException {
// read whole block into cache and then provide needed data
long blockId = BlockDirectory.getBlock(position);
int blockOffset = (int) BlockDirectory.getPosition(position);
int lengthToWriteInBlock = Math.min(length, blockSize - blockOffset);
// write the file and copy into the cache
dest.writeBytes(b, offset, lengthToWriteInBlock);
cache.update(location, blockId, blockOffset, b, offset,
lengthToWriteInBlock);
return lengthToWriteInBlock;
}
@Override
public void writeInternal(byte[] b, int offset, int length)
throws IOException {
long position = getBufferStart();
while (length > 0) {
int len = writeBlock(position, b, offset, length);
position += len;
length -= len;
offset += len;
}
}
@Override
public long getChecksum() throws IOException {
flushBufferToCache();
return dest.getChecksum();
}
}
| [
"rodrigosoaresilva@gmail.com"
] | rodrigosoaresilva@gmail.com |
86d656e1ada5cde69d757e7101b57c3b4490fb81 | d4929eb690c796b9e24c54cd641d7b56c411efdd | /design-patterns/src/creational/utils/ClasseB.java | 623723068b29cfe2f72996f7cea13175309c9f34 | [] | no_license | oalam/cours | 4efc03b8ef8cdc5aa61536bd1fbeb02ff7f24f39 | bd2779c3d1b5cabf91cb98eefeda1134cbfb3c76 | refs/heads/master | 2020-05-21T13:17:14.388476 | 2012-12-04T11:24:39 | 2012-12-04T11:24:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 430 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package creational.utils;
import creational.utils.AbstractClasse;
/**
*
* @author bailett
*/
public class ClasseB implements AbstractClasse {
/**
* Implémentation de la méthode d'affichage
*/
@Override
public void afficherClasse() {
System.out.println("Objet de classe 'ClasseB '");
}
}
| [
"bailet.thomas@gmail.com"
] | bailet.thomas@gmail.com |
3bf60e6c9b1fc744e23772f756148763c2c72018 | b25e847523102664b7c7c9984df67130e6bec697 | /src/com/antoinecronier/pokebattle/provider/ProviderAdapter.java | bce4495963e76fd0541ac15bc8be7b1fa53c3756 | [] | no_license | antoinecronier/pokeAndroid | ebe0e9804f3b8d77b609c7006d9c99adf379ea6e | 8ffe8c777782ba7cb18fc96e789940cda778ad9f | refs/heads/master | 2021-01-17T13:10:40.246374 | 2016-05-25T06:34:07 | 2016-05-25T06:34:07 | 59,842,113 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,061 | java | /**************************************************************************
* ProviderAdapter.java, pokebattle Android
*
* Copyright 2016
* Description :
* Author(s) : Harmony
* Licence :
* Last update : May 25, 2016
*
**************************************************************************/
package com.antoinecronier.pokebattle.provider;
import com.antoinecronier.pokebattle.provider.base.ProviderAdapterBase;
import com.antoinecronier.pokebattle.provider.base.PokebattleProviderBase;
import com.antoinecronier.pokebattle.data.base.SQLiteAdapterBase;
/**
* ProviderAdapter<T>.
*
* Feel free to add your custom generic methods here.
*
* @param <T> must extends Serializable
*/
public abstract class ProviderAdapter<T> extends ProviderAdapterBase<T> {
/**
* Provider Adapter Base constructor.
*
* @param context The context.
*/
public ProviderAdapter(
final PokebattleProviderBase provider,
final SQLiteAdapterBase<T> adapter) {
super(provider, adapter);
}
}
| [
"antoine.cronier@tactfactory.com"
] | antoine.cronier@tactfactory.com |
e307259d0e32d9d3e7fa3e0dae0ca8e533b446d4 | 485cea47fd87f58a753ba581eae1e88e67f01be7 | /CoyoteDX/src/main/java/coyote/dx/task/Combine.java | 4a3f6d8387405b3a21857341d6a9a3e629ae1a4c | [] | no_license | sdcote/coyote | 18706dc345addf6cd64809f840e2bddb4309bc17 | 7de908e3f089715ad1652f357dc95d2ceb5483c4 | refs/heads/main | 2023-03-06T23:42:49.573817 | 2023-03-02T17:06:31 | 2023-03-02T17:06:31 | 89,138,130 | 8 | 4 | null | 2022-11-10T22:06:36 | 2017-04-23T11:52:21 | JavaScript | UTF-8 | Java | false | false | 6,409 | java | /*
* Copyright (c) 2015 Stephan D. Cote' - All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the MIT License which accompanies this distribution, and is
* available at http://creativecommons.org/licenses/MIT/
*/
package coyote.dx.task;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.Writer;
import java.net.URI;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import coyote.commons.FileUtil;
import coyote.commons.StringUtil;
import coyote.commons.UriUtil;
import coyote.dx.CDX;
import coyote.dx.ConfigTag;
import coyote.dx.TaskException;
import coyote.dx.TransformTask;
import coyote.dx.context.TransformContext;
import coyote.loader.log.Log;
import coyote.loader.log.LogMsg;
/**
* Combine all the text files into one.
*
* <p>The order of combination is determined by filename including the path.</p>
*
* "Combine" : { "directory": "\datadir", "pattern": "([^\\s]+(\\.(?i)(csv))$)", "target": "big.csv", "append": true, "recurse": false }
*
*/
public class Combine extends AbstractFileTask implements TransformTask {
protected static final String STDOUT = "STDOUT";
protected static final String STDERR = "STDERR";
protected PrintWriter printwriter = null;
protected boolean append = true;
File directory = null;
String pattern = null;
boolean recurse = false;
/**
* @see coyote.dx.task.AbstractTransformTask#open(coyote.dx.context.TransformContext)
*/
@Override
public void open(TransformContext context) {
super.open(context);
// Get our source directory
String sourcedir = getString(ConfigTag.DIRECTORY);
directory = new File(sourcedir);
if (!directory.exists()) {
String msg = LogMsg.createMsg(CDX.MSG, "Task.source_directory_does_not_exist", getClass().getName(), directory.getAbsolutePath()).toString();
if (haltOnError()) {
context.setError(msg);
return;
} else {
Log.error(msg);
}
}
if (!directory.isDirectory()) {
String msg = LogMsg.createMsg(CDX.MSG, "Task.source_is_not_directory", getClass().getName(), directory.getAbsolutePath()).toString();
if (haltOnError()) {
context.setError(msg);
return;
} else {
Log.error(msg);
}
}
if (!directory.canRead()) {
String msg = LogMsg.createMsg(CDX.MSG, "Task.source_directory_not_readable", getClass().getName(), directory.getAbsolutePath()).toString();
if (haltOnError()) {
context.setError(msg);
return;
} else {
Log.error(msg);
}
}
// get our pattern
pattern = getString(ConfigTag.PATTERN);
// get if we should recurse into sub directories when searching for files
recurse = getBoolean(ConfigTag.RECURSE);
if (configuration.containsIgnoreCase(ConfigTag.APPEND)) {
append = getBoolean(ConfigTag.APPEND);
}
Log.debug("Append flag is set to " + append);
// if we don't already have a printwriter, set one up based on the configuration
if (printwriter == null) {
// check for a target in our configuration
String target = getString(ConfigTag.TARGET);
Log.debug(LogMsg.createMsg(CDX.MSG, "Writer.using_target", this.getClass().getSimpleName(), target));
// Make sure we have a target
if (StringUtil.isNotBlank(target)) {
// Try to parse the target as a URI, failures result in a null
final URI uri = UriUtil.parse(target);
File targetFile = null;
// Check to see if it is STDOUT or STDERR
if (StringUtil.equalsIgnoreCase(STDOUT, target)) {
printwriter = new PrintWriter(System.out);
} else if (StringUtil.equalsIgnoreCase(STDERR, target)) {
printwriter = new PrintWriter(System.err);
} else if (uri != null) {
if (UriUtil.isFile(uri)) {
targetFile = UriUtil.getFile(uri);
if (targetFile == null) {
Log.warn(LogMsg.createMsg(CDX.MSG, "The target '{%s}' does not represent a file", target));
}
} else {
// if all we have is a filename, there is not scheme to check...
// check that there is a scheme, if not then assume a filename!
if (uri.getScheme() == null) {
targetFile = new File(target);
}
}
} else {
targetFile = new File(target);
}
// if not absolute, use the current job directory
if (targetFile != null) {
if (!targetFile.isAbsolute()) {
targetFile = new File(getJobDirectory(), targetFile.getPath());
}
Log.debug("Using a target file of " + targetFile.getAbsolutePath());
try {
final Writer fwriter = new FileWriter(targetFile, append);
printwriter = new PrintWriter(fwriter);
} catch (final Exception e) {
Log.error("Could not create writer: " + e.getMessage());
context.setError(e.getMessage());
}
}
} else {
Log.error("No target specified");
context.setError(getClass().getName() + " could not determine target");
}
}
}
/**
* @see coyote.dx.task.AbstractTransformTask#performTask()
*/
@Override
protected void performTask() throws TaskException {
// get the list of files
List<File> flist = FileUtil.getFiles(directory, pattern, recurse);
// place the filenames in a list
List<String> files = new ArrayList<String>(50);
for (File file : flist) {
files.add(file.getAbsolutePath());
}
// sort the list of files by complete file name
Collections.sort(files);
// for each of the files...
for (String fname : files) {
// read it completely
String contents = FileUtil.fileToString(fname);
// write its contents to the target
printwriter.write(contents);
// make sure there is at least a line feed at the end of the contents
if (!contents.endsWith("\n")) {
printwriter.write(StringUtil.LINE_FEED);
}
// flush the buffer
printwriter.flush();
}
}
@Override
public void close() throws IOException {
if (printwriter != null) {
printwriter.flush();
printwriter.close();
}
}
}
| [
"sdcote@aep.com"
] | sdcote@aep.com |
329e924ff3937b9dab6a797c35a4e5aca5f4de95 | 4411e723ad8a266207737cd97b10e1b9033a466d | /各种沉浸式效果/sample/src/main/java/com/gyf/immersionbar/fragment/OneFragment.java | 62ecc5a7540d600fcfedd07fed789edc542dd55d | [] | no_license | 2381447237/someCode | dd38382edc71397a7a121b62f1fc40210a88080c | 7d76566fc334e3ea68ce4a3142ace7f15ca0c839 | refs/heads/master | 2021-08-23T18:37:44.870265 | 2017-12-06T02:28:04 | 2017-12-06T02:28:04 | 113,257,901 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,781 | java | package com.gyf.immersionbar.fragment;
import android.os.Handler;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.gyf.barlibrary.ImmersionBar;
import com.gyf.immersionbar.R;
import com.gyf.immersionbar.adapter.OneAdapter;
import com.gyf.immersionbar.utils.GlideImageLoader;
import com.lcodecore.tkrefreshlayout.RefreshListenerAdapter;
import com.lcodecore.tkrefreshlayout.TwinklingRefreshLayout;
import com.youth.banner.Banner;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
/**
* Created by geyifeng on 2017/5/12.
*/
public class OneFragment extends BaseFragment {
@BindView(R.id.toolbar)
Toolbar mToolbar;
@BindView(R.id.rv)
RecyclerView mRv;
@BindView(R.id.refreshLayout)
TwinklingRefreshLayout refreshLayout;
private OneAdapter mOneAdapter;
private View headView;
private List<String> mItemList;
private List<String> mImages;
private int bannerHeight = 300;
private Banner banner;
@Override
protected int setLayoutId() {
return R.layout.fragment_one;
}
@Override
protected void initView() {
refreshLayout.setEnableLoadmore(false);
final LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity(),
LinearLayoutManager.VERTICAL, false);
mRv.setLayoutManager(linearLayoutManager);
mOneAdapter = new OneAdapter();
mOneAdapter.openLoadAnimation(BaseQuickAdapter.SCALEIN);
mRv.setAdapter(mOneAdapter);
}
@Override
protected void initData() {
mItemList = new ArrayList<>();
for (int i = 1; i <= 20; i++) {
mItemList.add("item" + i);
}
mImages = new ArrayList<>();
mImages.add("http://desk.zol.com.cn/showpic/1024x768_63850_14.html");
mImages.add("http://desk.zol.com.cn/showpic/1024x768_63850_14.html");
mImages.add("http://desk.zol.com.cn/showpic/1024x768_63850_14.html");
mImages.add("http://desk.zol.com.cn/showpic/1024x768_63850_14.html");
mOneAdapter.setNewData(mItemList);
addHeaderView();
}
private void addHeaderView() {
headView = LayoutInflater.from(mActivity).inflate(R.layout.item_banner, (ViewGroup) mRv.getParent(), false);
banner = (Banner) headView.findViewById(R.id.banner);
banner.setImages(mImages)
.setImageLoader(new GlideImageLoader())
.setDelayTime(5000)
.start();
mOneAdapter.addHeaderView(headView);
mOneAdapter.setPreLoadNumber(1);
}
@Override
protected void setListener() {
ViewGroup.LayoutParams bannerParams = banner.getLayoutParams();
ViewGroup.LayoutParams titleBarParams = mToolbar.getLayoutParams();
bannerHeight = bannerParams.height - titleBarParams.height - ImmersionBar.getStatusBarHeight(getActivity());
mRv.addOnScrollListener(new RecyclerView.OnScrollListener() {
private int totalDy = 0;
@Override
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
super.onScrolled(recyclerView, dx, dy);
totalDy += dy;
ImmersionBar immersionBar = ImmersionBar.with(OneFragment.this)
.addViewSupportTransformColor(mToolbar, R.color.colorPrimary);
if (totalDy <= bannerHeight) {
float alpha = (float) totalDy / bannerHeight;
immersionBar.statusBarAlpha(alpha)
.init();
} else {
immersionBar.statusBarAlpha(1.0f)
.init();
}
}
});
mOneAdapter.setOnLoadMoreListener(new BaseQuickAdapter.RequestLoadMoreListener() {
@Override
public void onLoadMoreRequested() {
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
mOneAdapter.addData(addData());
if (mItemList.size() == 100) {
mOneAdapter.loadMoreEnd();
} else
mOneAdapter.loadMoreComplete();
}
}, 2000);
}
}, mRv);
refreshLayout.setOnRefreshListener(new RefreshListenerAdapter() {
@Override
public void onRefresh(final TwinklingRefreshLayout refreshLayout) {
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
mItemList.clear();
mItemList.addAll(newData());
mOneAdapter.setNewData(mItemList);
refreshLayout.finishRefreshing();
mToolbar.setVisibility(View.VISIBLE);
ImmersionBar.with(OneFragment.this).statusBarDarkFont(false).init();
}
}, 2000);
}
@Override
public void onPullingDown(TwinklingRefreshLayout refreshLayout, float fraction) {
mToolbar.setVisibility(View.GONE);
ImmersionBar.with(OneFragment.this).statusBarDarkFont(true).init();
}
@Override
public void onPullDownReleasing(TwinklingRefreshLayout refreshLayout, float fraction) {
if (Math.abs(fraction - 1.0f) > 0) {
mToolbar.setVisibility(View.VISIBLE);
ImmersionBar.with(OneFragment.this).statusBarDarkFont(false).init();
} else {
mToolbar.setVisibility(View.GONE);
ImmersionBar.with(OneFragment.this).statusBarDarkFont(true).init();
}
}
});
}
private List<String> addData() {
List<String> data = new ArrayList<>();
for (int i = mItemList.size() + 1; i <= mItemList.size() + 20; i++) {
data.add("item" + i);
}
return data;
}
private List<String> newData() {
List<String> data = new ArrayList<>();
for (int i = 1; i <= 20; i++) {
data.add("item" + i);
}
return data;
}
@Override
protected void immersionInit() {
ImmersionBar.with(this)
.titleBar(mToolbar,false)
.navigationBarColor(R.color.colorPrimary)
.init();
}
}
| [
"2381447237@qq.com"
] | 2381447237@qq.com |
11da44a6f87d22806e731d53976177999b13bb29 | aa7849b05298e7a4d2407fc751647e6edec3fc43 | /src/java/com/mef/erp/modelo/entidad/Cp.java | db003605877fbdd3c2086875cccdc9ccee0037b0 | [] | no_license | erniecastle/BackEndStructureJava | 999c6942cae4a66e7b9983f3a36cfc35ffabe867 | ad23de976994b8daadf472c7ce0b286288b92dcb | refs/heads/master | 2023-01-24T13:21:58.764810 | 2020-12-04T03:24:00 | 2020-12-04T03:24:00 | 318,400,422 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,946 | java | /**
* @author: Ernesto Castillo
* Fecha de Creación: 15/03/2011
* Compañía: Exito Software.
* Descripción del programa: Entidad de Codigos postales para Hibernate
* -----------------------------------------------------------------------------
* MODIFICACIONES:
* -----------------------------------------------------------------------------
* Clave: AAP01
* Autor: Abraham Daniel Arjona Peraza
* Fecha: 30/07/2011
* Descripción: Se Cambió clave a tipo String, se agregaron tamaños de columnas
* -----------------------------------------------------------------------------
* Clave:
* Autor:
* Fecha:
* Descripción:
* -----------------------------------------------------------------------------
*/
package com.mef.erp.modelo.entidad;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.ManyToOne;
import javax.persistence.Id;
import java.io.Serializable;
import javax.persistence.Column;
@Entity
public class Cp implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@Column(length = 30, nullable = false, unique = true)
private String clave;
@Column(length = 30, nullable = false)//AAP01
private String descripcion;
@ManyToOne
private Ciudades ciudades;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getClave() {//AAP01
return clave;
}
public void setClave(String clave) {//AAP01
this.clave = clave;
}
public String getDescripcion() {
return descripcion;
}
public void setDescripcion(String descripcion) {
this.descripcion = descripcion;
}
public Ciudades getCiudades() {
return ciudades;
}
public void setCiudades(Ciudades ciudades) {
this.ciudades = ciudades;
}
}
| [
"erniecastle@hotmail.com"
] | erniecastle@hotmail.com |
f439068292ed7c2e1acac7b8c655983e33ae98fe | 70d838e359599899e303dcabf83de8721748e186 | /Imagine/vector-editor-ui/src/main/java/org/imagine/vector/editor/ui/tools/widget/actions/RotateInSceneCoordinateSpaceAction.java | 8dfc9954e610644c612fd28be12d194c3e93057e | [] | no_license | timboudreau/imagine | b30fd24351a2cb6473db00e4a4b04b844a79445b | 294317a0a4ae7cf1db2d423c2974bef237147650 | refs/heads/master | 2023-08-31T09:38:52.324126 | 2023-06-12T04:16:59 | 2023-06-12T04:16:59 | 95,410,344 | 5 | 0 | null | 2023-08-23T17:54:31 | 2017-06-26T05:07:57 | Java | UTF-8 | Java | false | false | 4,550 | java | package org.imagine.vector.editor.ui.tools.widget.actions;
import java.awt.geom.Point2D;
import static org.imagine.vector.editor.ui.tools.widget.actions.MoveInSceneCoordinateSpaceAction.scenePoint;
import org.netbeans.api.visual.action.WidgetAction;
import org.netbeans.api.visual.widget.Widget;
/**
*
* @author Tim Boudreau
*/
public class RotateInSceneCoordinateSpaceAction extends WidgetAction.LockedAdapter {
RotateState state;
private boolean isUnknownModifierKeys(WidgetMouseEvent evt) {
return !(evt.isAltDown() || evt.isShiftDown()) || evt.isControlDown();
}
@Override
public State mousePressed(Widget widget, WidgetMouseEvent event) {
if (event.isPopupTrigger() || isUnknownModifierKeys(event)) {
abort();
return State.REJECTED;
}
if (state != null) {
abort();
// state.resign();
state = null;
}
RotationHandler handler = widget.getLookup().lookup(RotationHandler.class);
if (handler == null) {
return WidgetAction.State.REJECTED;
}
Point2D scenePoint = scenePoint(widget);
boolean ok = handler.onPotentialDrag(widget, scenePoint);
if (ok) {
state = new RotateState(widget, scenePoint(widget), handler);
return State.createLocked(widget, this);
}
return State.REJECTED;
}
@Override
public State mouseReleased(Widget widget, WidgetMouseEvent event) {
if (event.isPopupTrigger() || isUnknownModifierKeys(event)) {
return State.REJECTED;
}
if (state != null && widget == state.widget) {
state.commit(scenePoint(widget));
state = null;
// return WidgetAction.State.CONSUMED;
return State.createLocked(widget, this);
} else if (state != null) {
abort();
}
return WidgetAction.State.REJECTED;
}
@Override
public State mouseDragged(Widget widget, WidgetMouseEvent event) {
if (isUnknownModifierKeys(event)) {
return State.REJECTED;
}
if (state != null && widget == state.widget) {
state.dragged(scenePoint(widget));
return State.createLocked(widget, this);
}
return WidgetAction.State.REJECTED;
}
@Override
protected boolean isLocked() {
return state != null;
}
public void abort() {
if (state != null) {
state.resign();
}
}
private class RotateState {
private final Widget widget;
private final Point2D startPoint;
private final RotationHandler handler;
private Point2D lastDragPoint;
public RotateState(Widget widget, Point2D startPoint, RotationHandler handler) {
this.widget = widget;
this.startPoint = startPoint;
this.handler = handler;
}
private void initDrag(Point2D to) {
handler.onBeginDrag(widget, startPoint, to);
}
@Override
public String toString() {
return "RS-" + Integer.toString(System.identityHashCode(this))
+ "(" + widget + ")";
}
private boolean dragged(Point2D to) {
if (lastDragPoint == null && (to.getX() != startPoint.getX() || to.getY() != startPoint.getY())) {
initDrag(to);
lastDragPoint = to;
return true;
} else if (lastDragPoint != null) {
lastDragPoint = to;
handler.onDrag(widget, startPoint, lastDragPoint);
return true;
} else {
return false;
}
}
private void resign() {
if (lastDragPoint != null) {
handler.onCancelDrag(widget, startPoint);
}
lastDragPoint = null;
if (RotateInSceneCoordinateSpaceAction.this.state == this) {
RotateInSceneCoordinateSpaceAction.this.state = null;
}
}
private void commit(Point2D scenePoint) {
if (lastDragPoint != null && (startPoint.getX() != lastDragPoint.getX()
|| startPoint.getY() != lastDragPoint.getY())) {
handler.onEndDrag(widget, startPoint, scenePoint);
lastDragPoint = null;
} else if (lastDragPoint != null) {
resign();
lastDragPoint = null;
}
}
}
}
| [
"tim@timboudreau.com"
] | tim@timboudreau.com |
5bc0c4130f5ad169f4ff1a5127afb334525d8b0a | f7ae2f00b280099be88d4fdc7d5bd0f3cdd13f41 | /workspace/B3趣味100/src/ch04/Ch4_6.java | c5b1ac14e14e838067f9d7e0a88ab344120a40ba | [] | no_license | fendou666/ZRZYJava | 5d177120f27dddad7bba1abaa6afa60225d86341 | 48e65f04a715f44aeb0aad429e6c6f37d904853c | refs/heads/master | 2020-05-22T11:36:20.127473 | 2017-09-14T23:11:25 | 2017-09-14T23:11:25 | 84,693,046 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 817 | java | package ch04;
public class Ch4_6
{
public static void main(String[] args)
{
System.out.println("1000以内的平方回文素数如下:");
for(int i = 2;i <= 1000;i++)
{
if(prime(i)==1&&pa(i*i)==1)
{
System.out.println(i+"*"+i+"="+i*i);
}
}
System.out.printf("\n");
}
static int prime(int a)
{
for(int i = 2;i <= java.lang.Math.sqrt(a) ;i++)
{
if(a%i==0)
return 0;
}
return 1;
}
static String trans(int bk)//数字转换成字符串
{
int a = bk;
String res = "";
while(a!=0)
{
int b = a%10;
res = b + res;
a = a/10;
}
return res;
}
static int pa(int a)
{
String str = trans(a);
int ls = str.length();
for(int i = 0;i < ls;i++)
{
if(str.codePointAt(i)!=str.codePointAt(ls - 1 - i))
{
return 0;
}
}
return 1;
}
}
| [
"ls_code@126.com"
] | ls_code@126.com |
b10b70f02b181bbe06536f9f59cfc7628bf09b9c | a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb | /vpc-20160428/src/main/java/com/aliyun/vpc20160428/models/CompletePhysicalConnectionLOAResponse.java | db384aa3afc756288e93720a6c4d605d384b88a4 | [
"Apache-2.0"
] | permissive | aliyun/alibabacloud-java-sdk | 83a6036a33c7278bca6f1bafccb0180940d58b0b | 008923f156adf2e4f4785a0419f60640273854ec | refs/heads/master | 2023-09-01T04:10:33.640756 | 2023-09-01T02:40:45 | 2023-09-01T02:40:45 | 288,968,318 | 40 | 45 | null | 2023-06-13T02:47:13 | 2020-08-20T09:51:08 | Java | UTF-8 | Java | false | false | 1,507 | java | // This file is auto-generated, don't edit it. Thanks.
package com.aliyun.vpc20160428.models;
import com.aliyun.tea.*;
public class CompletePhysicalConnectionLOAResponse extends TeaModel {
@NameInMap("headers")
@Validation(required = true)
public java.util.Map<String, String> headers;
@NameInMap("statusCode")
@Validation(required = true)
public Integer statusCode;
@NameInMap("body")
@Validation(required = true)
public CompletePhysicalConnectionLOAResponseBody body;
public static CompletePhysicalConnectionLOAResponse build(java.util.Map<String, ?> map) throws Exception {
CompletePhysicalConnectionLOAResponse self = new CompletePhysicalConnectionLOAResponse();
return TeaModel.build(map, self);
}
public CompletePhysicalConnectionLOAResponse setHeaders(java.util.Map<String, String> headers) {
this.headers = headers;
return this;
}
public java.util.Map<String, String> getHeaders() {
return this.headers;
}
public CompletePhysicalConnectionLOAResponse setStatusCode(Integer statusCode) {
this.statusCode = statusCode;
return this;
}
public Integer getStatusCode() {
return this.statusCode;
}
public CompletePhysicalConnectionLOAResponse setBody(CompletePhysicalConnectionLOAResponseBody body) {
this.body = body;
return this;
}
public CompletePhysicalConnectionLOAResponseBody getBody() {
return this.body;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
fe1afa5c2f3aad57d39a2c0086f0e6040adbf4f6 | 44a82c5b394786d56aba9662d4434e7690a7f601 | /aerial/src/main/java/com/github/mkolisnyk/aerial/document/Tokens.java | 6480a18780e4c7f411e48698705ef32d6641bd53 | [
"Apache-2.0"
] | permissive | mkolisnyk/aerial | b17e131ae2e9451cba2846b9d15a307e82381aa2 | 3c05bee8cf18b3f6d2f88ed130878d6f9c78e1ac | refs/heads/master | 2023-09-04T03:06:49.413471 | 2015-03-15T23:43:33 | 2015-03-15T23:43:33 | 21,078,847 | 1 | 0 | null | 2015-03-15T23:43:33 | 2014-06-21T21:07:06 | Java | UTF-8 | Java | false | false | 2,952 | java | /**
* .
*/
package com.github.mkolisnyk.aerial.document;
import com.github.mkolisnyk.aerial.core.params.AerialInputFormat;
import com.github.mkolisnyk.aerial.core.templates.AerialInputTemplateMap;
/**
* @author Myk Kolisnyk
*
*/
public final class Tokens {
private static String actionToken = "Action:";
private static String prerequisitesToken = "Pre-requisites:";
private static String inputToken = "Input:";
private static String validOutputToken = "On Success:";
private static String errorOutputToken = "On Failure:";
private static String featureToken = "Feature:";
private static String caseToken = "Case:";
private static String additionalScenariosToken
= "Additional Scenarios:";
private static String inputRefToken = "Input Ref:";
/**
* @return the actionToken
*/
public static String getActionToken() {
return actionToken;
}
/**
* @return the prerequisitesToken
*/
public static String getPrerequisitesToken() {
return prerequisitesToken;
}
/**
* @return the inputToken
*/
public static String getInputToken() {
return inputToken;
}
/**
* @return the validOutputToken
*/
public static String getValidOutputToken() {
return validOutputToken;
}
/**
* @return the errorOutputToken
*/
public static String getErrorOutputToken() {
return errorOutputToken;
}
/**
* @return the featureToken
*/
public static String getFeatureToken() {
return featureToken;
}
/**
* @return the caseToken
*/
public static String getCaseToken() {
return caseToken;
}
/**
* @return the inputRefToken
*/
public static String getInputRefToken() {
return inputRefToken;
}
/**
* @return the additionalScenariosToken
*/
public static String getAdditionalScenariosToken() {
return additionalScenariosToken;
}
public static void refresh() throws Exception {
String format = AerialInputFormat.getCurrent().toString();
actionToken = AerialInputTemplateMap.get(format, "token.action");
prerequisitesToken = AerialInputTemplateMap.get(format, "token.prerequisites");
inputToken = AerialInputTemplateMap.get(format, "token.input");
inputRefToken = AerialInputTemplateMap.get(format, "token.input_ref");
validOutputToken = AerialInputTemplateMap.get(format, "token.valid_output");
errorOutputToken = AerialInputTemplateMap.get(format, "token.error_output");
featureToken = AerialInputTemplateMap.get(format, "token.feature");
caseToken = AerialInputTemplateMap.get(format, "token.case");
additionalScenariosToken = AerialInputTemplateMap.get(format, "token.additional_scenarios");
}
/**
* .
*/
private Tokens() {
}
}
| [
"kolesnik.nickolay@gmail.com"
] | kolesnik.nickolay@gmail.com |
92ebcd95aa194def4d8443765225dbd60d9e864d | 4120e073a4b0b2c79870e3ab87b294f98f47d0be | /app-itests/src/itest/java/com/rideaustin/dispatch/womenonly/C1177077IT.java | 3e301b9bec89e0be1881de17be4c2630f1882d4c | [
"MIT"
] | permissive | jyt109/server | 8933281097303d14b5a329f0c679edea4fcd174b | 24354717624c25b5d4faf0b7ea540e2742e8039f | refs/heads/master | 2022-03-20T10:36:44.973843 | 2019-10-03T11:43:07 | 2019-10-03T11:43:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,472 | java | package com.rideaustin.dispatch.womenonly;
import com.rideaustin.model.enums.RideStatus;
import com.rideaustin.model.ride.DriverType;
import com.rideaustin.test.asserts.DispatchHistoryAssert;
import com.rideaustin.test.setup.DefaultWODispatchSetup;
import com.rideaustin.testrail.TestCases;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import java.util.LinkedList;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@Category(WomenOnly.class)
public class C1177077IT extends AbstractWomenOnlyDispatchTest<DefaultWODispatchSetup> {
@Test
@TestCases("C1177077")
public void test() throws Exception {
driverAction.locationUpdate(woDriver, AUSTIN_CENTER.lat, AUSTIN_CENTER.lng, new String[]{CAR_TYPE}, new String[]{DriverType.WOMEN_ONLY})
.andExpect(status().isOk());
driverAction.locationUpdate(regularDriver, AUSTIN_CENTER.lat, AUSTIN_CENTER.lng, new String[]{CAR_TYPE})
.andExpect(status().isOk());
Long ride = riderAction.requestRide(rider.getEmail(), AUSTIN_CENTER, CAR_TYPE, (String) DriverType.WOMEN_ONLY);
awaitDispatch(woDriver, ride);
driverAction.acceptRide(woDriver, ride)
.andExpect(status().isOk());
awaitStatus(ride, RideStatus.DRIVER_ASSIGNED);
LinkedList<Long> dispatchHistory = getDispatchHistory(ride);
DispatchHistoryAssert.assertThat(dispatchHistory)
.hasLength(1)
.isDispatchedFirstTo(woDriver.getId());
}
}
| [
"mikhail.chugunov@crossover.com"
] | mikhail.chugunov@crossover.com |
8dba5e3c2bc87600082d86caf2302b45a44f5fd8 | 199882045fa737d137a99bb04575591a9982224a | /src/main/java/net/minestom/server/tag/TagWritable.java | cd1135d59c1edec83d7dac609f64d898bd9402ea | [
"Apache-2.0"
] | permissive | Ativendus/Minestom | ea6983f4518b38d1e29d0d702b908b1875796274 | 7be96b7679c65c4639a6fd3572550b6bad3d1928 | refs/heads/master | 2023-03-14T02:18:52.546270 | 2022-06-11T15:38:37 | 2022-06-11T15:38:37 | 502,678,326 | 0 | 0 | Apache-2.0 | 2022-06-12T17:05:56 | 2022-06-12T17:05:55 | null | UTF-8 | Java | false | false | 543 | java | package net.minestom.server.tag;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Represents an element which can write {@link Tag tags}.
*/
public interface TagWritable {
/**
* Writes the specified type.
*
* @param tag the tag to write
* @param value the tag value, null to remove
* @param <T> the tag type
*/
<T> void setTag(@NotNull Tag<T> tag, @Nullable T value);
default void removeTag(@NotNull Tag<?> tag) {
setTag(tag, null);
}
}
| [
"themode@outlook.fr"
] | themode@outlook.fr |
b758c7631d7ccfc2081239d47123c159108a4a7c | b2f517a674528795273648a4b3f5211f1df60eaa | /summer-db/src/test/java/cn/cerc/db/oss/OssQueryFind.java | 9bb1c0c698609a37d177b684af7814e39ac8dcb3 | [] | permissive | 15218057878/summer-server-1 | 07c15d7fba28af97ce68a7f4d78d0f0284fce860 | fc1e8d410843821df550591ec2df9d04b5cf2fed | refs/heads/main | 2023-04-06T19:15:05.827271 | 2021-03-11T01:18:59 | 2021-03-11T01:18:59 | 355,827,435 | 0 | 0 | Apache-2.0 | 2021-04-08T08:41:33 | 2021-04-08T08:41:33 | null | UTF-8 | Java | false | false | 602 | java | package cn.cerc.db.oss;
import cn.cerc.db.core.StubHandleText;
import org.junit.BeforeClass;
import org.junit.Test;
public class OssQueryFind {
private static OssQuery ds;
private static StubHandleText handle;
@BeforeClass
public static void setUp() {
handle = new StubHandleText();
ds = new OssQuery(handle);
}
/**
* 查询文件
*
* @Description
* @author rick_zhou
*/
@Test
public void queryFile() {
ds.setOssMode(OssMode.readWrite);
ds.add("select * from %s", "id_00001.txt");
ds.open();
}
}
| [
"l1091462907@gmail.com"
] | l1091462907@gmail.com |
b328cf0e8283dacde22de231c3e31e7f03a90e39 | c15b74e50f249df767047dcb2564faf6b8166c51 | /src/main/java/com/xwy/one/wangwenjun/one/chapter2/CalculatorStrategy.java | bd504fc94e7783b40e023b853585466f236b05b6 | [] | no_license | never123450/thread | 09c469e97ea1e81d1fdec96bd0784808982540ca | d5727a1643de3a10130166b3b396bac0d294ca63 | refs/heads/master | 2022-07-22T20:06:05.124971 | 2022-07-21T02:33:41 | 2022-07-21T02:33:41 | 204,009,094 | 0 | 0 | null | 2022-07-11T21:09:34 | 2019-08-23T13:57:56 | Java | UTF-8 | Java | false | false | 240 | java | package com.xwy.one.wangwenjun.one.chapter2;
/**
*
* @description:
*
* @author: xwy
*
* @create: 5:40 PM 2020/5/10
**/
@FunctionalInterface
public interface CalculatorStrategy {
double calculate(double salary, double bonus);
}
| [
"845619585@qq.com"
] | 845619585@qq.com |
d4c100d4d13ee949ef74a08760a4362f67e76577 | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XRENDERING-418-17-23-PESA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/rendering/wikimodel/impl/WikiScannerContext_ESTest.java | 39e92892645cff201ce5a7b0d3f4853e234b6dc8 | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 577 | java | /*
* This file was automatically generated by EvoSuite
* Fri Apr 03 02:50:22 UTC 2020
*/
package org.xwiki.rendering.wikimodel.impl;
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(useVFS = true, useJEE = true)
public class WikiScannerContext_ESTest extends WikiScannerContext_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
a3463b7cbeb9fa72c0be07339aa3642202192a4f | 1fa3e08369b6e4b09b1e716eae969a8eadd99e7c | /microservice-hystrix-turbine-with-contextpath/src/test/java/com/wk/cloud/microservicesimpleconsumermovie/MicroserviceHystrixTurbineWithContextpathTests.java | 36c61e30a7750b844f7427630e8cd27a209f121a | [] | no_license | emperwang/spring-cloud | 06e182a661be0528149ee45bafe59a28b70589b7 | f0b835299d4f126cf2b1910acad7a4ce9fcec4a0 | refs/heads/master | 2023-07-22T03:38:56.529098 | 2020-09-10T02:25:04 | 2020-09-10T02:25:04 | 147,897,428 | 0 | 0 | null | 2023-07-18T00:37:14 | 2018-09-08T03:25:46 | Java | UTF-8 | Java | false | false | 385 | java | package com.wk.cloud.microservicesimpleconsumermovie;
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 MicroserviceHystrixTurbineWithContextpathTests {
@Test
public void contextLoads() {
}
}
| [
"544094478@qq.com"
] | 544094478@qq.com |
75315180be983c657792e13c9e6a482d8b69c318 | e2d8057dee95fa9bfd595e98270bce7dc7428c11 | /JThermodynamics/src/thermo/data/structure/structure/vibrational/SetOfVibrationalStructureInfo.java | 8544a5cc3e9270fb314aee23d0c46960e28d85d9 | [] | no_license | blurock/Thermodynamics | 1e1970aaa2b76c3b31d8021b91f45825829e4643 | 3285da0d2a3580bfcc6db39b46c5e62df9bf69ec | refs/heads/master | 2020-05-21T20:31:39.619319 | 2018-05-24T08:54:00 | 2018-05-24T08:54:00 | 63,304,339 | 2 | 2 | null | 2016-10-07T20:53:08 | 2016-07-14T05:13:17 | Java | UTF-8 | Java | false | false | 1,296 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package thermo.data.structure.structure.vibrational;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
/** the set of vibrational structures and information
*
* @author blurock
*/
public class SetOfVibrationalStructureInfo extends ArrayList<VibrationalStructureInfo> {
/** The empty constructor
*
*/
public SetOfVibrationalStructureInfo() {
}
/** The constructor from a vector of vibrational set.
*
* @param set
*/
public SetOfVibrationalStructureInfo(HashSet set) {
Iterator obj = set.iterator();
while(obj.hasNext()) {
VibrationalStructureInfo info = (VibrationalStructureInfo) obj.next();
this.add(info);
}
}
@Override
public String toString() {
StringBuffer buf = new StringBuffer();
buf.append("Set of Vibrational Structure Info\n");
Iterator obj = this.iterator();
while(obj.hasNext()) {
VibrationalStructureInfo info = (VibrationalStructureInfo) obj.next();
buf.append(info.toString());
buf.append("\n");
}
return buf.toString();
}
}
| [
"edward.blurock@gmail.com"
] | edward.blurock@gmail.com |
c5f83ef8d41294b2e9cb208afe73539152dce70f | 324f6c696c6d0ff8e3df7a89c431c65bc19950ae | /src/main/java/org/onvif/ver10/schema/Receiver.java | a88f0f292569fb9d58f3d679d2a50ab8a7b70d36 | [] | no_license | nightdeveloper/WebCamera | 731ebd81341bc43a20740b10b39651ab5f1c9110 | be69873691c669da8a1f7e0edd35cc6d985a7a86 | refs/heads/master | 2021-01-01T20:42:59.190684 | 2017-07-31T18:16:02 | 2017-07-31T18:16:02 | 98,915,806 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,262 | java |
package org.onvif.ver10.schema;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
import org.w3c.dom.Element;
/**
*
* Description of a receiver, including its token and configuration.
*
*
* <p>Java class for Receiver complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="Receiver">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Token" type="{http://www.onvif.org/ver10/schema}ReferenceToken"/>
* <element name="Configuration" type="{http://www.onvif.org/ver10/schema}ReceiverConfiguration"/>
* <any processContents='lax' maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* <anyAttribute processContents='lax'/>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Receiver", propOrder = {
"token",
"configuration",
"any"
})
public class Receiver {
@XmlElement(name = "Token", required = true)
protected String token;
@XmlElement(name = "Configuration", required = true)
protected ReceiverConfiguration configuration;
@XmlAnyElement(lax = true)
protected List<java.lang.Object> any;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* Gets the value of the token property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getToken() {
return token;
}
/**
* Sets the value of the token property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setToken(String value) {
this.token = value;
}
/**
* Gets the value of the configuration property.
*
* @return
* possible object is
* {@link ReceiverConfiguration }
*
*/
public ReceiverConfiguration getConfiguration() {
return configuration;
}
/**
* Sets the value of the configuration property.
*
* @param value
* allowed object is
* {@link ReceiverConfiguration }
*
*/
public void setConfiguration(ReceiverConfiguration value) {
this.configuration = value;
}
/**
* Gets the value of the any property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link java.lang.Object }
* {@link Element }
*
*
*/
public List<java.lang.Object> getAny() {
if (any == null) {
any = new ArrayList<java.lang.Object>();
}
return this.any;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* the map is keyed by the name of the attribute and
* the value is the string value of the attribute.
*
* the map returned by this method is live, and you can add new attribute
* by updating the map directly. Because of this design, there's no setter.
*
*
* @return
* always non-null
*/
public Map<QName, String> getOtherAttributes() {
return otherAttributes;
}
}
| [
"pri@vate.localhost"
] | pri@vate.localhost |
e9f1a72f8bfdf1bff3524cf98d60f70f0b674348 | 43a7a8a3a8e0bd59640ed4970990fc9bbb845730 | /martus-amplifier/source/org/martus/amplifier/datasynch/test/TestDataSynchManager.java | 513b3f21e011d5e5016c24ffc6c54212406957f8 | [] | no_license | benetech/Martus-Project | c992d1b847e1091085407f31bb61b34060f24c13 | b454387d8ecdd3245cd17ead06184a4cdd3c7234 | refs/heads/master | 2021-01-17T11:34:31.482994 | 2017-09-27T18:14:11 | 2017-09-27T18:14:11 | 49,678,622 | 17 | 13 | null | null | null | null | UTF-8 | Java | false | false | 2,246 | java | /*
The Martus(tm) free, social justice documentation and
monitoring software. Copyright (C) 2001-2007, Beneficent
Technology, Inc. (The Benetech Initiative).
Martus 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 with the additions and exceptions described in the
accompanying Martus license file entitled "license.txt".
It is distributed WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, including warranties of fitness of purpose or
merchantability. See the accompanying Martus License and
GPL license for more details on the required license terms
for this software.
You should have received a copy of the GNU General Public
License along with this program; if not, write to the Free
Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
package org.martus.amplifier.datasynch.test;
import java.util.ArrayList;
import java.util.List;
import java.util.Vector;
import org.martus.amplifier.datasynch.DataSynchManager;
public class TestDataSynchManager extends TestAbstractAmplifierDataSynch
{
public TestDataSynchManager(String name)
{
super(name);
}
public void testRemoveAccountsFromList() throws Exception
{
ArrayList allAccounts = new ArrayList();
String account1 = "account1";
String account2 = "account2";
String account3 = "account3";
String account4 = "account4";
allAccounts.add(account1);
allAccounts.add(account2);
allAccounts.add(account3);
allAccounts.add(account4);
Vector removeAccounts = new Vector();
removeAccounts.add(account4);
removeAccounts.add(account2);
List noAccountsToRemove = DataSynchManager.removeAccountsFromList(allAccounts, null);
assertEquals("should contain all 4 accounts", 4, noAccountsToRemove.size());
List remainingAccounts = DataSynchManager.removeAccountsFromList(allAccounts, removeAccounts);
assertEquals("New size should be 2", 2, remainingAccounts.size());
assertTrue("Should contain account 1", remainingAccounts.contains(account1));
assertTrue("Should contain account 3", remainingAccounts.contains(account3));
}
}
| [
"charlesl@benetech.org"
] | charlesl@benetech.org |
cae044761e3cbadb426880d7b291aa8a4e0183f1 | c3c90a81fefd62e267c6d4885f69c0f182b44c0f | /src/main/java/com/thinkgem/jeesite/modules/acctreportitem/web/TAcctreportitemController.java | 8d81131366167cdf39e07cb749bb94194914971b | [] | no_license | yangxiaodong1/yunzh | 8a2ce3763093d069fad9b6f78cd76882c091a32d | 89ae810c6da464d5aa361cd312480d4cf9f21528 | refs/heads/master | 2021-07-11T05:40:59.442265 | 2017-10-13T08:10:46 | 2017-10-13T08:10:46 | 106,795,747 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,304 | java | /**
* Copyright © 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
*/
package com.thinkgem.jeesite.modules.acctreportitem.web;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import com.thinkgem.jeesite.common.config.Global;
import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.web.BaseController;
import com.thinkgem.jeesite.common.utils.StringUtils;
import com.thinkgem.jeesite.modules.acctreportitem.entity.TAcctreportitem;
import com.thinkgem.jeesite.modules.acctreportitem.service.TAcctreportitemService;
/**
* 公式表Controller
* @author zhangtong
* @version 2015-12-05
*/
@Controller
@RequestMapping(value = "${adminPath}/acctreportitem/tAcctreportitem")
public class TAcctreportitemController extends BaseController {
@Autowired
private TAcctreportitemService tAcctreportitemService;
@ModelAttribute
public TAcctreportitem get(@RequestParam(required=false) String id) {
TAcctreportitem entity = null;
if (StringUtils.isNotBlank(id)){
entity = tAcctreportitemService.get(id);
}
if (entity == null){
entity = new TAcctreportitem();
}
return entity;
}
@RequiresPermissions("acctreportitem:tAcctreportitem:view")
@RequestMapping(value = {"list", ""})
public String list(TAcctreportitem tAcctreportitem, HttpServletRequest request, HttpServletResponse response, Model model) {
Page<TAcctreportitem> page = tAcctreportitemService.findPage(new Page<TAcctreportitem>(request, response), tAcctreportitem);
model.addAttribute("page", page);
return "modules/acctreportitem/tAcctreportitemList";
}
@RequiresPermissions("acctreportitem:tAcctreportitem:view")
@RequestMapping(value = "form")
public String form(TAcctreportitem tAcctreportitem, Model model) {
model.addAttribute("tAcctreportitem", tAcctreportitem);
return "modules/acctreportitem/tAcctreportitemForm";
}
//@RequiresPermissions("acctreportitem:tAcctreportitem:edit")
@RequestMapping(value = "save")
public String save(TAcctreportitem tAcctreportitem, Model model, RedirectAttributes redirectAttributes) {
if (!beanValidator(model, tAcctreportitem)){
return form(tAcctreportitem, model);
}
tAcctreportitemService.save(tAcctreportitem);
addMessage(redirectAttributes, "保存公式表成功");
return "redirect:"+Global.getAdminPath()+"/acctreportitem/tAcctreportitem/?repage";
}
@RequiresPermissions("acctreportitem:tAcctreportitem:edit")
@RequestMapping(value = "delete")
public String delete(TAcctreportitem tAcctreportitem, RedirectAttributes redirectAttributes) {
tAcctreportitemService.delete(tAcctreportitem);
addMessage(redirectAttributes, "删除公式表成功");
return "redirect:"+Global.getAdminPath()+"/acctreportitem/tAcctreportitem/?repage";
}
} | [
"you@example.com"
] | you@example.com |
fe54222173569f07af22c7094ce42a897c3da991 | 4162bb3ca4ce3aa09c6b880a3296b777f2e32b94 | /src/main/java/br/com/isidrocorp/projetofinal/ProjetoFinalApplication.java | c23d37e26273e60cb99136a4e70a1190744712a9 | [] | no_license | diegoriciardi/ProjetoOcorrencias | 62f6d6213854216a339f2558ea0b4a1fe14f5718 | 7d6d7c7c795403516c7aaab1dfb7dd351180d684 | refs/heads/master | 2022-11-18T20:15:31.186706 | 2020-07-24T04:39:09 | 2020-07-24T04:39:09 | 281,942,903 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 335 | java | package br.com.isidrocorp.projetofinal;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class ProjetoFinalApplication {
public static void main(String[] args) {
SpringApplication.run(ProjetoFinalApplication.class, args);
}
}
| [
"isidro@professorisidro.com.br"
] | isidro@professorisidro.com.br |
b4b060225c2a9d29ca56edaa381bec9eaf9a916d | 281fc20ae4900efb21e46e8de4e7c1e476f0d132 | /ui/core/src/test/java/org/ajax4jsf/component/LoadBundleComponentTest.java | 29feab08437282f411265db9bc6251d94b0e9a1b | [] | no_license | nuxeo/richfaces-3.3 | c23b31e69668810219cf3376281f669fa4bf256f | 485749c5f49ac6169d9187cc448110d477acab3b | refs/heads/master | 2023-08-25T13:27:08.790730 | 2015-01-05T10:42:11 | 2015-01-05T10:42:11 | 10,627,040 | 3 | 5 | null | null | null | null | UTF-8 | Java | false | false | 4,539 | java | /**
* License Agreement.
*
* JBoss RichFaces - Ajax4jsf Component Library
*
* Copyright (C) 2007 Exadel, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1 as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package org.ajax4jsf.component;
import java.util.HashMap;
import java.util.Map;
import javax.faces.component.UIForm;
import javax.faces.component.html.HtmlForm;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
public class LoadBundleComponentTest extends org.ajax4jsf.tests.AbstractAjax4JsfTestCase {
private UIForm form;
private UILoadBundle bundle = null;
private static final String BUNDLE_NAME = "testBundle";
public LoadBundleComponentTest(String name) {
super(name);
}
public void setUp() throws Exception {
super.setUp();
form = new HtmlForm();
form.setId("form");
facesContext.getViewRoot().getChildren().add(form);
bundle = (UILoadBundle) application.createComponent(UILoadBundle.COMPONENT_TYPE);
if (null != bundle) {
bundle.setId("loadBundle");
bundle.setVar(BUNDLE_NAME);
bundle.setBasename("org.ajax4jsf.component.test_skin");
form.getChildren().add(bundle);
}
}
public void tearDown() throws Exception {
super.tearDown();
form = null;
bundle = null;
}
public void testLoadBundle() throws Exception {
HtmlPage page = renderView();
assertNotNull(page);
Map loadedMap = (Map)facesContext.getExternalContext().getRequestMap().get(BUNDLE_NAME);
assertNotNull(loadedMap);
assertEquals("non-existent key", loadedMap.get("non-existent key"));
assertEquals("#000000", loadedMap.get("shadowBackgroundColor"));
}
public void testSize() throws Exception {
HtmlPage page = renderView();
assertNotNull(page);
Map loadedMap = (Map)facesContext.getExternalContext().getRequestMap().get(BUNDLE_NAME);
assertNotNull(loadedMap);
assertEquals(0, loadedMap.size());
}
public void testContainsKey() throws Exception {
HtmlPage page = renderView();
assertNotNull(page);
Map loadedMap = (Map)facesContext.getExternalContext().getRequestMap().get(BUNDLE_NAME);
assertNotNull(loadedMap);
assertTrue(loadedMap.containsKey("shadowBackgroundColor"));
assertFalse(loadedMap.containsKey("non-existent key"));
}
public void testFakeFunctions() throws Exception {
HtmlPage page = renderView();
assertNotNull(page);
Map loadedMap = (Map)facesContext.getExternalContext().getRequestMap().get(BUNDLE_NAME);
assertNotNull(loadedMap);
assertFalse(loadedMap.isEmpty());
assertFalse(loadedMap.containsValue(null));
assertFalse(loadedMap.containsValue("any-string"));
try {
loadedMap.put("key1", "value1");
assertFalse("UnsupportedOperationException was not thrown", true);
} catch (UnsupportedOperationException e) {
}
try {
loadedMap.putAll(new HashMap());
assertFalse("UnsupportedOperationException was not thrown", true);
} catch (UnsupportedOperationException e) {
}
try {
loadedMap.remove("key1");
assertFalse("UnsupportedOperationException was not thrown", true);
} catch (UnsupportedOperationException e) {
}
try {
loadedMap.clear();
assertFalse("UnsupportedOperationException was not thrown", true);
} catch (UnsupportedOperationException e) {
}
assertNull(loadedMap.keySet());
assertNull(loadedMap.values());
assertNull(loadedMap.entrySet());
}
}
| [
"grenard@nuxeo.com"
] | grenard@nuxeo.com |
d5f52e7564851ee7edf28f8de71e88ff5c3f1f8c | c6005eb6e298d8a7c0613cf43f2287ae66996e09 | /mpapp/src/main/java/com/tangdi/production/mpapp/dao/PrdDao.java | 5e8721f623d4f17c41c848ae79586a03316e74cf | [] | no_license | taotao365s/mbpay | 5c235a1969074893f991073472fadea6645fe246 | 95fff2efd817e9b37d6aa847498c15a9a5fc8c9e | refs/heads/master | 2022-02-17T06:30:37.919937 | 2019-08-28T07:49:51 | 2019-08-28T07:49:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,098 | java | package com.tangdi.production.mpapp.dao;
import java.util.Map;
/**
* 商品 订单
*
* @author limiao
*
* @version 1.0
*/
public interface PrdDao {
/**
* 创建商品订单
*
* @param param
* @return
* @throws Exception
*/
public int insertEntity(Map<String, Object> param) throws Exception;
/**
* 修改商品订单
*
* @param param
* @return
* @throws Exception
*/
public int updateEntity(Map<String, Object> param) throws Exception;
/**
* 查询商品订单
*
* @param param
* @return
* @throws Exception
*/
public Map<String, Object> selectEntity(Map<String, Object> param) throws Exception;
/**
* 根据商品订单号 查询商品订单
*
* @param param
* @return
* @throws Exception
*/
public Map<String, Object> queryPrdInfByprdNo(Map<String, Object> param) throws Exception;
/**
*
* @param map
* prdordNo 商品订单号
* @return
* @throws Exception
*/
public Map<String, Object> check(Map<String, Object> map) throws Exception;
}
| [
"w1037704496@163.com"
] | w1037704496@163.com |
ff26b1f5f53e427da742f5b8404076904c5331c7 | 8d4a69e281915a8a68b0488db0e013b311942cf4 | /spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/couchbase/CouchbaseReactiveHealthIndicatorAutoConfiguration.java | 28d953ffdef8a67ed8a4fa3c4d96e660a0567126 | [
"Apache-2.0"
] | permissive | yuanmabiji/spring-boot-2.1.0.RELEASE | 798b4c29d25fdcb22fa3a0baf24a08ddd0dfa27e | 6fe0467c9bc95d3849eb2ad5bae04fd9bdee3a82 | refs/heads/master | 2023-03-10T05:20:52.846557 | 2022-03-25T15:53:13 | 2022-03-25T15:53:13 | 252,902,347 | 320 | 107 | Apache-2.0 | 2023-02-22T07:44:16 | 2020-04-04T03:49:51 | Java | UTF-8 | Java | false | false | 3,029 | java | /*
* Copyright 2012-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
*
* 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.springframework.boot.actuate.autoconfigure.couchbase;
import java.util.Map;
import com.couchbase.client.java.Cluster;
import reactor.core.publisher.Flux;
import org.springframework.boot.actuate.autoconfigure.health.CompositeReactiveHealthIndicatorConfiguration;
import org.springframework.boot.actuate.autoconfigure.health.ConditionalOnEnabledHealthIndicator;
import org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorAutoConfiguration;
import org.springframework.boot.actuate.couchbase.CouchbaseReactiveHealthIndicator;
import org.springframework.boot.actuate.health.ReactiveHealthIndicator;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.couchbase.CouchbaseAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* {@link EnableAutoConfiguration Auto-configuration} for
* {@link CouchbaseReactiveHealthIndicator}.
*
* @author Mikalai Lushchytski
* @author Stephane Nicoll
* @since 2.1.0
*/
@Configuration
@ConditionalOnClass({ Cluster.class, Flux.class })
@ConditionalOnBean(Cluster.class)
@ConditionalOnEnabledHealthIndicator("couchbase")
@AutoConfigureBefore(HealthIndicatorAutoConfiguration.class)
@AutoConfigureAfter(CouchbaseAutoConfiguration.class)
public class CouchbaseReactiveHealthIndicatorAutoConfiguration extends
CompositeReactiveHealthIndicatorConfiguration<CouchbaseReactiveHealthIndicator, Cluster> {
private final Map<String, Cluster> clusters;
public CouchbaseReactiveHealthIndicatorAutoConfiguration(
Map<String, Cluster> clusters) {
this.clusters = clusters;
}
@Bean
@ConditionalOnMissingBean(name = "couchbaseReactiveHealthIndicator")
public ReactiveHealthIndicator couchbaseReactiveHealthIndicator() {
return createHealthIndicator(this.clusters);
}
@Override
protected CouchbaseReactiveHealthIndicator createHealthIndicator(Cluster cluster) {
return new CouchbaseReactiveHealthIndicator(cluster);
}
}
| [
"983656956@qq.com"
] | 983656956@qq.com |
1fb189775c01292e52f03facd1e1190b3cd1f3c5 | 26d5fc28121097e504ca96a8cdd7481e549670b2 | /citygml4j-xml/src/main/java/org/citygml4j/xml/adapter/relief/AbstractReliefComponentAdapter.java | 2d048f2c076ef7b56ec46405155e8070af95c318 | [
"Apache-2.0"
] | permissive | citygml4j/citygml4j | 915ab53e7a19583e50868f43ae7d1dbe14c8add2 | afb785a00dde1ea5682b0d45c5dc3b18f8282710 | refs/heads/master | 2023-08-03T01:30:10.412587 | 2023-07-30T08:45:12 | 2023-07-30T08:45:12 | 14,438,505 | 112 | 47 | Apache-2.0 | 2023-07-07T19:56:49 | 2013-11-16T00:12:55 | Java | UTF-8 | Java | false | false | 4,549 | java | /*
* citygml4j - The Open Source Java API for CityGML
* https://github.com/citygml4j
*
* Copyright 2013-2023 Claus Nagel <claus.nagel@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.citygml4j.xml.adapter.relief;
import org.citygml4j.core.model.ade.generic.GenericADEOfAbstractReliefComponent;
import org.citygml4j.core.model.relief.ADEOfAbstractReliefComponent;
import org.citygml4j.core.model.relief.AbstractReliefComponent;
import org.citygml4j.core.util.CityGMLConstants;
import org.citygml4j.xml.adapter.CityGMLBuilderHelper;
import org.citygml4j.xml.adapter.CityGMLSerializerHelper;
import org.citygml4j.xml.adapter.ade.ADEBuilderHelper;
import org.citygml4j.xml.adapter.ade.ADESerializerHelper;
import org.citygml4j.xml.adapter.core.AbstractSpaceBoundaryAdapter;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.serializer.ObjectSerializeException;
import org.xmlobjects.stream.XMLReadException;
import org.xmlobjects.stream.XMLReader;
import org.xmlobjects.stream.XMLWriteException;
import org.xmlobjects.stream.XMLWriter;
import org.xmlobjects.xml.Attributes;
import org.xmlobjects.xml.Element;
import org.xmlobjects.xml.Namespaces;
import org.xmlobjects.xml.TextContent;
import javax.xml.namespace.QName;
public abstract class AbstractReliefComponentAdapter<T extends AbstractReliefComponent> extends AbstractSpaceBoundaryAdapter<T> {
private final QName[] substitutionGroups = new QName[]{
new QName(CityGMLConstants.CITYGML_2_0_RELIEF_NAMESPACE, "_GenericApplicationPropertyOfReliefComponent"),
new QName(CityGMLConstants.CITYGML_1_0_RELIEF_NAMESPACE, "_GenericApplicationPropertyOfReliefComponent")
};
@Override
public void buildChildObject(T object, QName name, Attributes attributes, XMLReader reader) throws ObjectBuildException, XMLReadException {
if (CityGMLBuilderHelper.isReliefNamespace(name.getNamespaceURI())) {
switch (name.getLocalPart()) {
case "lod":
reader.getTextContent().ifInteger(object::setLod);
return;
case "extent":
object.setExtent(reader.getObjectUsingBuilder(ExtentPropertyAdapter.class));
return;
case "adeOfAbstractReliefComponent":
ADEBuilderHelper.addADEProperty(object, GenericADEOfAbstractReliefComponent::of, reader);
return;
}
} else if (CityGMLBuilderHelper.isADENamespace(name.getNamespaceURI())) {
buildADEProperty(object, name, reader);
return;
}
super.buildChildObject(object, name, attributes, reader);
}
@Override
public void buildADEProperty(T object, QName name, XMLReader reader) throws ObjectBuildException, XMLReadException {
if (!ADEBuilderHelper.addADEProperty(object, name, GenericADEOfAbstractReliefComponent::of, reader, substitutionGroups))
super.buildADEProperty(object, name, reader);
}
@Override
public void writeChildElements(T object, Namespaces namespaces, XMLWriter writer) throws ObjectSerializeException, XMLWriteException {
super.writeChildElements(object, namespaces, writer);
String reliefNamespace = CityGMLSerializerHelper.getReliefNamespace(namespaces);
boolean isCityGML3 = CityGMLConstants.CITYGML_3_0_RELIEF_NAMESPACE.equals(reliefNamespace);
writer.writeElement(Element.of(reliefNamespace, "lod").addTextContent(TextContent.ofInteger(object.getLod())));
if (object.getExtent() != null)
writer.writeElementUsingSerializer(Element.of(reliefNamespace, "extent"), object.getExtent(), ExtentPropertyAdapter.class, namespaces);
for (ADEOfAbstractReliefComponent property : object.getADEProperties(ADEOfAbstractReliefComponent.class))
ADESerializerHelper.writeADEProperty(isCityGML3 ? Element.of(reliefNamespace, "adeOfAbstractReliefComponent") : null, property, namespaces, writer);
}
}
| [
"cnagel@virtualcitysystems.de"
] | cnagel@virtualcitysystems.de |
0e5de05835e5b5f6402817cc64eea9070a4cc3d4 | 2bf30c31677494a379831352befde4a5e3d8ed19 | /internalLibraries/models/src/main/java/com/emc/vipr/model/catalog/UserPreferencesRestRep.java | 0aaa3dd360f6134437332f01a895faa5d04a7c49 | [] | no_license | dennywangdengyu/coprhd-controller | fed783054a4970c5f891e83d696a4e1e8364c424 | 116c905ae2728131e19631844eecf49566e46db9 | refs/heads/master | 2020-12-30T22:43:41.462865 | 2015-07-23T18:09:30 | 2015-07-23T18:09:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,554 | java | /*
* Copyright 2015 EMC Corporation
* All Rights Reserved
*/
package com.emc.vipr.model.catalog;
import java.net.URI;
import java.util.Calendar;
import java.util.Set;
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 com.emc.storageos.model.DataObjectRestRep;
import com.emc.storageos.model.RestLinkRep;
@XmlRootElement(name = "user_preferences")
@XmlAccessorType(XmlAccessType.PROPERTY)
public class UserPreferencesRestRep extends DataObjectRestRep {
private String username;
private Boolean notifyByEmail;
private String email;
public UserPreferencesRestRep() {
}
public UserPreferencesRestRep(String name, URI id, RestLinkRep link, Calendar creationTime, Boolean inactive,
Set<String> tags) {
super(name, id, link, creationTime, inactive, tags);
}
@XmlElement(name = "notify_by_email")
public Boolean getNotifyByEmail() {
return notifyByEmail;
}
public void setNotifyByEmail(Boolean notifyByEmail) {
this.notifyByEmail = notifyByEmail;
}
@XmlElement(name = "email")
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
@XmlElement(name = "username")
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
}
| [
"review-coprhd@coprhd.org"
] | review-coprhd@coprhd.org |
c5f7976f9724f4b38e5fa5373d7581168e0de9f5 | b9f1d02db280edccafb9f000ccda440e8a487dab | /deployment-common/src/main/java/io/github/cloudiator/deployment/messaging/JobConverter.java | 7b05445632d008d883a6f7e02fb1938c5ee06dab | [] | no_license | cloudiator/deployment | a20d7dcb21f6081e38effbeaec56b51ad2ff17ac | 14ec03b2b2150518fb996e14d55db9ed6d6d2479 | refs/heads/master | 2022-06-13T01:43:19.176816 | 2020-01-10T14:20:16 | 2020-01-10T14:20:16 | 85,323,295 | 0 | 2 | null | 2022-05-20T20:54:40 | 2017-03-17T14:53:57 | Java | UTF-8 | Java | false | false | 3,087 | java | /*
* Copyright 2017 University of Ulm
*
* 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.github.cloudiator.deployment.messaging;
import de.uniulm.omi.cloudiator.util.TwoWayConverter;
import io.github.cloudiator.deployment.domain.Job;
import io.github.cloudiator.deployment.domain.JobBuilder;
import java.util.stream.Collectors;
import org.cloudiator.matchmaking.converters.OptimizationConverter;
import org.cloudiator.matchmaking.converters.RequirementConverter;
import org.cloudiator.messages.entities.JobEntities;
import org.cloudiator.messages.entities.JobEntities.Job.Builder;
public class JobConverter implements TwoWayConverter<JobEntities.Job, Job> {
public static final JobConverter INSTANCE = new JobConverter();
private JobConverter() {
}
private final CommunicationConverter communicationConverter = new CommunicationConverter();
private final TaskConverter taskConverter = new TaskConverter();
private static final RequirementConverter REQUIREMENT_CONVERTER = RequirementConverter.INSTANCE;
private static final OptimizationConverter OPTIMIZATION_CONVERTER = OptimizationConverter.INSTANCE;
@Override
public JobEntities.Job applyBack(Job job) {
final Builder builder = JobEntities.Job.newBuilder().setId(job.id()).setUserId(job.userId())
.setName(job.name())
.addAllCommunications(
job.communications().stream()
.map(communicationConverter::applyBack).collect(
Collectors.toList())).addAllTasks(
job.tasks().stream().map(taskConverter::applyBack).collect(Collectors.toList()));
job.requirements().stream().map(REQUIREMENT_CONVERTER::applyBack)
.forEach(builder::addRequirements);
if (job.optimization().isPresent()) {
builder.setOptimization(OPTIMIZATION_CONVERTER.applyBack(job.optimization().get()));
}
return builder.build();
}
@Override
public Job apply(JobEntities.Job job) {
JobBuilder jobBuilder = JobBuilder.newBuilder().name(job.getName()).id(job.getId())
.userId(job.getUserId());
job.getCommunicationsList().forEach(
communication -> jobBuilder.addCommunication(communicationConverter.apply(communication)));
job.getTasksList().forEach(task -> jobBuilder.addTask(taskConverter.apply(task)));
if (job.hasOptimization()) {
jobBuilder.optimization(OPTIMIZATION_CONVERTER.apply(job.getOptimization()));
}
job.getRequirementsList().stream().map(REQUIREMENT_CONVERTER)
.forEach(jobBuilder::addRequirement);
return jobBuilder.build();
}
}
| [
"daniel.baur@uni-ulm.de"
] | daniel.baur@uni-ulm.de |
b822a2ab53cf42f96ff3e3270902a97c4a5e86d9 | b60da22bc192211b3978764e63af23e2e24081f5 | /cdc/src/share/personal/classes/awt/peer_based/sun/awt/image/ImageDecoder.java | 23b62d683cfe1e7e2c650dcc4106454d5db11f1e | [] | no_license | clamp03/JavaAOTC | 44d566927c057c013538ab51e086c42c6348554e | 0ade633837ed9698cd74a3f6928ebde3d96bd3e3 | refs/heads/master | 2021-01-01T19:33:51.612033 | 2014-12-02T14:29:58 | 2014-12-02T14:29:58 | 27,435,591 | 5 | 4 | null | null | null | null | UTF-8 | Java | false | false | 5,659 | java | /*
* @(#)ImageDecoder.java 1.23 06/10/10
*
* Copyright 1990-2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version
* 2 only, as published by the Free Software Foundation.
*
* 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 version 2 for more details (a copy is
* included at /legal/license.txt).
*
* You should have received a copy of the GNU General Public License
* version 2 along with this work; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
* Clara, CA 95054 or visit www.sun.com if you need additional
* information or have any questions.
*
*/
package sun.awt.image;
import java.util.Hashtable;
import java.io.InputStream;
import java.io.IOException;
import java.awt.image.*;
import java.security.AccessController;
import java.security.PrivilegedAction;
public abstract class ImageDecoder {
protected InputStreamImageSource source;
protected InputStream input;
Thread feeder;
protected boolean aborted;
protected boolean finished;
protected ImageConsumerQueue queue;
ImageDecoder next;
public ImageDecoder(InputStreamImageSource src, InputStream is) {
source = src;
input = is;
feeder = Thread.currentThread();
}
public boolean isConsumer(ImageConsumer ic) {
return ImageConsumerQueue.isConsumer(queue, ic);
}
public void removeConsumer(ImageConsumer ic) {
queue = ImageConsumerQueue.removeConsumer(queue, ic, false);
if (!finished && queue == null) {
abort();
}
}
protected ImageConsumerQueue nextConsumer(ImageConsumerQueue cq) {
synchronized (source) {
if (aborted) {
return null;
}
cq = ((cq == null) ? queue : cq.next);
while (cq != null) {
if (cq.interested) {
return cq;
}
cq = cq.next;
}
}
return null;
}
protected int setDimensions(int w, int h) {
ImageConsumerQueue cq = null;
int count = 0;
while ((cq = nextConsumer(cq)) != null) {
cq.consumer.setDimensions(w, h);
count++;
}
return count;
}
protected int setProperties(Hashtable props) {
ImageConsumerQueue cq = null;
int count = 0;
while ((cq = nextConsumer(cq)) != null) {
cq.consumer.setProperties(props);
count++;
}
return count;
}
protected int setColorModel(ColorModel model) {
ImageConsumerQueue cq = null;
int count = 0;
while ((cq = nextConsumer(cq)) != null) {
cq.consumer.setColorModel(model);
count++;
}
return count;
}
protected int setHints(int hints) {
ImageConsumerQueue cq = null;
int count = 0;
while ((cq = nextConsumer(cq)) != null) {
cq.consumer.setHints(hints);
count++;
}
return count;
}
protected void headerComplete() {
feeder.setPriority(ImageFetcher.LOW_PRIORITY);
}
protected int setPixels(int x, int y, int w, int h, ColorModel model,
byte pix[], int off, int scansize) {
source.latchConsumers(this);
ImageConsumerQueue cq = null;
int count = 0;
while ((cq = nextConsumer(cq)) != null) {
cq.consumer.setPixels(x, y, w, h, model, pix, off, scansize);
count++;
}
return count;
}
protected int setPixels(int x, int y, int w, int h, ColorModel model,
int pix[], int off, int scansize) {
source.latchConsumers(this);
ImageConsumerQueue cq = null;
int count = 0;
while ((cq = nextConsumer(cq)) != null) {
cq.consumer.setPixels(x, y, w, h, model, pix, off, scansize);
count++;
}
return count;
}
protected int imageComplete(int status, boolean done) {
source.latchConsumers(this);
if (done) {
finished = true;
source.doneDecoding(this);
}
ImageConsumerQueue cq = null;
int count = 0;
while ((cq = nextConsumer(cq)) != null) {
cq.consumer.imageComplete(status);
count++;
}
return count;
}
// J2SE
// Fixed 4522041: Redundant image data increases footprint
/*
public void replayConsumer(ImageConsumer ic) {}
public abstract boolean catchupConsumer(InputStreamImageSource src,
ImageConsumer ic);
*/
public abstract void produceImage() throws IOException,
ImageFormatException;
public void abort() {
aborted = true;
source.doneDecoding(this);
close();
AccessController.doPrivileged(
new PrivilegedAction() {
public Object run() {
feeder.interrupt();
return null;
}
}
);
}
public synchronized void close() {
if (input != null) {
try {
input.close();
} catch (IOException e) {}
}
}
}
| [
"clamp03@gmail.com"
] | clamp03@gmail.com |
c2405db4d46f3205c6dd36c2205c3de465dedbd2 | feb760488686737d001120aaf4accfa197fb783a | /haikudepotserver-webapp/src/test/java/org/haikuos/haikudepotserver/api1/JobApiIT.java | 4bc96c209c3e7eb4af3554a74f83f51d2e8324b5 | [
"MIT"
] | permissive | Akujiism/haikudepotserver | 30a2b07989d5297e06c5fced6c70764488901c63 | 0d99d573a132bd1ff95b98dc019e2267234fb123 | refs/heads/master | 2021-01-21T09:29:15.904081 | 2015-04-21T08:00:49 | 2015-04-21T08:00:49 | 33,937,671 | 0 | 0 | null | 2015-04-14T14:45:43 | 2015-04-14T14:45:42 | null | UTF-8 | Java | false | false | 4,390 | java | /*
* Copyright 2014, Andrew Lindesay
* Distributed under the terms of the MIT License.
*/
package org.haikuos.haikudepotserver.api1;
import org.apache.cayenne.ObjectContext;
import org.fest.assertions.Assertions;
import org.haikuos.haikudepotserver.AbstractIntegrationTest;
import org.haikuos.haikudepotserver.api1.model.job.*;
import org.haikuos.haikudepotserver.job.TestJobOrchestrationServiceImpl;
import org.junit.Test;
import org.springframework.test.context.ContextConfiguration;
import javax.annotation.Resource;
import java.util.EnumSet;
@ContextConfiguration({
"classpath:/spring/servlet-context.xml",
"classpath:/spring/test-jobapi-context.xml"
})
public class JobApiIT extends AbstractIntegrationTest {
@Resource
private JobApi jobApi;
@Test
public void testSearchJobs_all() throws Exception {
setAuthenticatedUserToRoot();
// ------------------------------------
SearchJobsResult result = jobApi.searchJobs(new SearchJobsRequest());
// ------------------------------------
Assertions.assertThat(result.items.size()).isEqualTo(3);
}
@Test
public void testSearchJobs_startedOnly() throws Exception {
setAuthenticatedUserToRoot();
SearchJobsRequest request = new SearchJobsRequest();
request.statuses = EnumSet.of(JobStatus.STARTED);
// ------------------------------------
SearchJobsResult result = jobApi.searchJobs(request);
// ------------------------------------
Assertions.assertThat(result.items.size()).isEqualTo(1);
SearchJobsResult.Job job = result.items.get(0);
Assertions.assertThat(job.guid).isEqualTo("started");
Assertions.assertThat(job.queuedTimestamp.longValue()).isEqualTo(TestJobOrchestrationServiceImpl.DT_1976_FEB.getMillis());
Assertions.assertThat(job.startTimestamp.longValue()).isEqualTo(TestJobOrchestrationServiceImpl.DT_1976_MAR.getMillis());
Assertions.assertThat(job.finishTimestamp).isNull();
Assertions.assertThat(job.ownerUserNickname).isNull();
Assertions.assertThat(job.jobStatus).isEqualTo(JobStatus.STARTED);
}
@Test
public void testSearchJobs_userOnly() throws Exception {
{
ObjectContext context = serverRuntime.getContext();
integrationTestSupportService.createBasicUser(context, "testuser", "yUe4o2Nwe009"); // language is english
setAuthenticatedUser("testuser");
}
SearchJobsRequest request = new SearchJobsRequest();
request.ownerUserNickname = "testuser";
// ------------------------------------
SearchJobsResult result = jobApi.searchJobs(request);
// ------------------------------------
Assertions.assertThat(result.items.size()).isEqualTo(1);
SearchJobsResult.Job job = result.items.get(0);
Assertions.assertThat(job.guid).isEqualTo("finished");
Assertions.assertThat(job.queuedTimestamp.longValue()).isEqualTo(TestJobOrchestrationServiceImpl.DT_1976_APR.getMillis());
Assertions.assertThat(job.startTimestamp.longValue()).isEqualTo(TestJobOrchestrationServiceImpl.DT_1976_JUN.getMillis());
Assertions.assertThat(job.finishTimestamp.longValue()).isEqualTo(TestJobOrchestrationServiceImpl.DT_1976_JUL.getMillis());
Assertions.assertThat(job.ownerUserNickname).isEqualTo("testuser");
Assertions.assertThat(job.jobStatus).isEqualTo(JobStatus.FINISHED);
}
@Test
public void testGetJob() throws Exception {
setAuthenticatedUserToRoot();
GetJobRequest request = new GetJobRequest();
request.guid = "started";
// ------------------------------------
GetJobResult result = jobApi.getJob(request);
// ------------------------------------
Assertions.assertThat(result.guid).isEqualTo("started");
Assertions.assertThat(result.queuedTimestamp.longValue()).isEqualTo(TestJobOrchestrationServiceImpl.DT_1976_FEB.getMillis());
Assertions.assertThat(result.startTimestamp.longValue()).isEqualTo(TestJobOrchestrationServiceImpl.DT_1976_MAR.getMillis());
Assertions.assertThat(result.finishTimestamp).isNull();
Assertions.assertThat(result.ownerUserNickname).isNull();
Assertions.assertThat(result.jobStatus).isEqualTo(JobStatus.STARTED);
}
}
| [
"apl@lindesay.co.nz"
] | apl@lindesay.co.nz |
ae4543f1afb02c10177525ccc4a6a79dca80181b | 7b73756ba240202ea92f8f0c5c51c8343c0efa5f | /classes5/qwc.java | fe653fa3a19a04ef89904a0089710cd101833900 | [] | no_license | meeidol-luo/qooq | 588a4ca6d8ad579b28dec66ec8084399fb0991ef | e723920ac555e99d5325b1d4024552383713c28d | refs/heads/master | 2020-03-27T03:16:06.616300 | 2016-10-08T07:33:58 | 2016-10-08T07:33:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 771 | java | import android.view.View;
import com.tencent.mobileqq.businessCard.activity.CardPicGalleryActivity;
import com.tencent.mobileqq.hotpatch.NotVerifyClass;
import com.tencent.widget.AdapterView;
import com.tencent.widget.AdapterView.OnItemSelectedListener;
public class qwc
implements AdapterView.OnItemSelectedListener
{
public qwc(CardPicGalleryActivity paramCardPicGalleryActivity)
{
boolean bool = NotVerifyClass.DO_VERIFY_CLASS;
}
public void a(AdapterView paramAdapterView) {}
public void b(AdapterView paramAdapterView, View paramView, int paramInt, long paramLong)
{
this.a.e = paramInt;
}
}
/* Location: E:\apk\QQ_91\classes5-dex2jar.jar!\qwc.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"1776098770@qq.com"
] | 1776098770@qq.com |
9717861e5c96244e26139631aa1c98b3ec474a25 | a3eacf1d95a204850e6a2913a4d2e01786bb4c35 | /src/main/java/com/github/vaerys/pogos/ChannelData.java | 73396ec735af86d66863d2e88088f5bfff6dd59d | [] | no_license | AndrielChaoti/DiscordSailv2 | 53e3a78492555958d0f6244b1dbaabbdbd352008 | 4a73090611909c86767a055675f6deb5a60d41f0 | refs/heads/master | 2021-01-19T20:44:11.139088 | 2018-03-18T04:50:13 | 2018-03-18T04:50:13 | 101,136,774 | 0 | 0 | null | 2017-08-23T04:12:49 | 2017-08-23T04:12:49 | null | UTF-8 | Java | false | false | 2,064 | java | package com.github.vaerys.pogos;
import com.github.vaerys.objects.ChannelSettingObject;
import com.github.vaerys.objects.GroupUpObject;
import com.github.vaerys.objects.JoinMessage;
import com.github.vaerys.objects.TrackLikes;
import com.github.vaerys.templates.GuildFile;
import sx.blah.discord.handle.obj.IChannel;
import sx.blah.discord.handle.obj.IGuild;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.ListIterator;
/**
* Created by Vaerys on 12/05/2017.
*/
public class ChannelData extends GuildFile {
public static final String FILE_PATH = "Channel_Data.json";
List<ChannelSettingObject> channelSettings = new ArrayList<>();
ArrayList<Long> pinnedMessages = new ArrayList<>();
ArrayList<GroupUpObject> groupUpObjects = new ArrayList<>();
List<TrackLikes> likes = new ArrayList<>();
private double fileVersion = 1.3;
private List<JoinMessage> joinMessages = new LinkedList<>();
public ArrayList<GroupUpObject> getGroupUpObjects() {
return groupUpObjects;
}
public ArrayList<Long> getPinnedMessages() {
return pinnedMessages;
}
public List<TrackLikes> getLikes() {
return likes;
}
public TrackLikes getLiked(long longID) {
for (TrackLikes l : likes) {
if (l.getMessageID() == longID) {
return l;
}
}
return null;
}
public List<ChannelSettingObject> getChannelSettings() {
return channelSettings;
}
public void updateVariables(IGuild guild) {
//update channels
for (ChannelSettingObject c : channelSettings) {
ListIterator iterator = c.getChannelIDs().listIterator();
while (iterator.hasNext()) {
IChannel channel = guild.getChannelByID((Long) iterator.next());
if (channel == null) {
iterator.remove();
}
}
}
}
public List<JoinMessage> getJoinMessages() {
return joinMessages;
}
}
| [
"thelegotechhead@yahoo.com.au"
] | thelegotechhead@yahoo.com.au |
1f069ae6400648a42a8166119f957b96976af3ed | 74c84c6fa90c4737a41f5b160ac7b66e2d24402e | /src/day07/RelationalOperator_Variable.java | 9aba1962adee68876ab88294e5f4cee32c8926fc | [] | no_license | RoksanaBo/JavaProgrammingB15Online | 15e90098ebfab46d453c891fbc9b171ff315d577 | a0addb22e1cdd981c590608ff91f09126f029afc | refs/heads/master | 2022-04-17T04:43:59.756535 | 2020-04-13T19:37:06 | 2020-04-13T19:37:06 | 255,424,129 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,180 | java | package day07;
public class RelationalOperator_Variable {
public static void main(String[] args) {
// > >= < <= == != Relational Operator
// Relation Operator is used to compare 2 numbers
// and return true or false
// anything action or expression
// // that return true or false result
// can be called boolean expression
int myNumber = 10;
System.out.println(myNumber > 5);
System.out.println(myNumber < -19);
System.out.println(myNumber >= 5);
System.out.println(myNumber >= 8);
System.out.println(myNumber <= 5);
System.out.println(myNumber >= 8);
// == is used to check for equality
// AND VERY DIFFERENT FROM SINGLE =
//difference between == and = same as
// difference between equal and equality in daily English
System.out.println(myNumber == 5);
// != is used to check for inequality , ! in programming translate to NOT
System.out.println(myNumber != 10);
System.out.println(myNumber != 6);
// == and != are questions , checking for equality or inequality
}
}
| [
"roksana85@hotmail.com"
] | roksana85@hotmail.com |
554ffc3828b2636c69ee9a2082c9345ccb67bb69 | 2abc3fe1eb78374bbeb2ec8c4f150602c42e6a07 | /src/main/java/exodia/domain/model/service/UserServiceModel.java | 0ffa6d05d2d8a12c34509a79356378f456ba7fbf | [] | no_license | StefanUrilski/EXODIA | cb72c7638af6b437b103c818c02595dbdc4b95f2 | 39ebfb8815c6e88c632112d83cbd23ea741bbbdb | refs/heads/master | 2020-07-05T08:18:16.705003 | 2019-08-16T19:50:35 | 2019-08-16T19:50:35 | 202,587,144 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 742 | java | package exodia.domain.model.service;
public class UserServiceModel {
private String id;
private String username;
private String password;
private String email;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
}
| [
"urilskistefan@gmail.com"
] | urilskistefan@gmail.com |
668e278a970b139767e520b9d676fe11a6b9844d | 3ef55e152decb43bdd90e3de821ffea1a2ec8f75 | /large/module1466_public/tests/unittests/src/java/module1466_public_tests_unittests/a/IFoo2.java | a1b96ba706d3d97bf5951645d87caf3973fb6163 | [
"BSD-3-Clause"
] | permissive | salesforce/bazel-ls-demo-project | 5cc6ef749d65d6626080f3a94239b6a509ef145a | 948ed278f87338edd7e40af68b8690ae4f73ebf0 | refs/heads/master | 2023-06-24T08:06:06.084651 | 2023-03-14T11:54:29 | 2023-03-14T11:54:29 | 241,489,944 | 0 | 5 | BSD-3-Clause | 2023-03-27T11:28:14 | 2020-02-18T23:30:47 | Java | UTF-8 | Java | false | false | 877 | java | package module1466_public_tests_unittests.a;
import java.util.logging.*;
import java.util.zip.*;
import javax.annotation.processing.*;
/**
* Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
* labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
* Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
*
* @see javax.net.ssl.ExtendedSSLSession
* @see javax.rmi.ssl.SslRMIClientSocketFactory
* @see java.awt.datatransfer.DataFlavor
*/
@SuppressWarnings("all")
public interface IFoo2<Q> extends module1466_public_tests_unittests.a.IFoo0<Q> {
java.beans.beancontext.BeanContext f0 = null;
java.io.File f1 = null;
java.rmi.Remote f2 = null;
String getName();
void setName(String s);
Q get();
void set(Q e);
}
| [
"gwagenknecht@salesforce.com"
] | gwagenknecht@salesforce.com |
c20d6523a23a5c6c4241db090ab864233af72b9c | a0391fd4df0a4034fc177b95ffd7e10165119c35 | /web/AndwyAdmin/trunk/src/main/java/net/andwy/andwyadmin/entity/client/Client.java | b8f91e71ddae9d432aa012596ed3fef605edb62a | [] | no_license | rusteer/andwy | 403041e4de3a779529c69c79af8805eea3480e93 | 3695176b3e95a26983e3d8c5d7e47aa6a856f1ce | refs/heads/master | 2021-01-20T19:33:28.191233 | 2016-08-04T03:17:29 | 2016-08-04T03:17:29 | 64,898,470 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,880 | java | package net.andwy.andwyadmin.entity.client;
import javax.persistence.Entity;
import javax.persistence.Table;
import net.andwy.andwyadmin.entity.BizEntity;
@Entity
@Table(name = "t_client")
public class Client extends BizEntity {
private String deviceId;
private String userAgent;
private String screenSize;
private String networkOperator;
private String networkSubType;
private String phoneModel;
private String version;
private String manufacturer;
private String isTablet;
private String unknownSource;
private String carrier;
private String language;
private String isConnectionFast;
private String androidId;
private String wifi;
private String phoneNumber;
private Long adsVersion;
private Long availableInternalMemorySize;
private Long totalInternalMemorySize;
private String packageName;
private String versionName;
private String versionCode;
public String getUserAgent() {
return userAgent;
}
public void setUserAgent(String userAgent) {
this.userAgent = userAgent;
}
public String getScreenSize() {
return screenSize;
}
public void setScreenSize(String screenSize) {
this.screenSize = screenSize;
}
public String getNetworkOperator() {
return networkOperator;
}
public void setNetworkOperator(String networkOperator) {
this.networkOperator = networkOperator;
}
public String getPhoneModel() {
return phoneModel;
}
public void setPhoneModel(String phoneModel) {
this.phoneModel = phoneModel;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getManufacturer() {
return manufacturer;
}
public void setManufacturer(String manufacturer) {
this.manufacturer = manufacturer;
}
public String getIsTablet() {
return isTablet;
}
public void setIsTablet(String isTablet) {
this.isTablet = isTablet;
}
public String getUnknownSource() {
return unknownSource;
}
public void setUnknownSource(String unknownSource) {
this.unknownSource = unknownSource;
}
public String getWifi() {
return wifi;
}
public void setWifi(String wifi) {
this.wifi = wifi;
}
public String getCarrier() {
return carrier;
}
public void setCarrier(String carrier) {
this.carrier = carrier;
}
public String getLanguage() {
return language;
}
public void setLanguage(String language) {
this.language = language;
}
public String getIsConnectionFast() {
return isConnectionFast;
}
public void setIsConnectionFast(String isConnectionFast) {
this.isConnectionFast = isConnectionFast;
}
public String getAndroidId() {
return androidId;
}
public void setAndroidId(String androidId) {
this.androidId = androidId;
}
public String getDeviceId() {
return deviceId;
}
public void setDeviceId(String deviceId) {
this.deviceId = deviceId;
}
public Client() {
super();
}
public Client(String deviceId) {
this();
this.deviceId = deviceId;
}
public String getPhoneNumber() {
return phoneNumber;
}
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
public Long getAdsVersion() {
return adsVersion;
}
public void setAdsVersion(Long adsVersion) {
this.adsVersion = adsVersion;
}
public Long getAvailableInternalMemorySize() {
return availableInternalMemorySize;
}
public void setAvailableInternalMemorySize(Long availableInternalMemorySize) {
this.availableInternalMemorySize = availableInternalMemorySize;
}
public Long getTotalInternalMemorySize() {
return totalInternalMemorySize;
}
public void setTotalInternalMemorySize(Long totalInternalMemorySize) {
this.totalInternalMemorySize = totalInternalMemorySize;
}
public String getNetworkSubType() {
return networkSubType;
}
public void setNetworkSubType(String networkSubType) {
this.networkSubType = networkSubType;
}
public String getPackageName() {
return packageName;
}
public void setPackageName(String packageName) {
this.packageName = packageName;
}
public String getVersionName() {
return versionName;
}
public void setVersionName(String versionName) {
this.versionName = versionName;
}
public String getVersionCode() {
return versionCode;
}
public void setVersionCode(String versionCode) {
this.versionCode = versionCode;
}
}
| [
"rusteer@outlook.com"
] | rusteer@outlook.com |
ed5cb7f8140d2e428a5ed7ff5adaa6a9e91729e1 | 9db6efa2f14baa0f4172272e361e1ed0c9940065 | /aliyun-java-sdk-cloudphoto/src/main/java/com/aliyuncs/cloudphoto/model/v20170711/RemoveAlbumPhotosRequest.java | a7ef15848e6141a5182bb184a2ee8ef12fe07965 | [
"Apache-2.0"
] | permissive | ResetFull/aliyun-openapi-java-sdk | 31fb2c2f7c2b939df4c9067f7a221c3f2c7cef2e | e299d1778d514cd555c870a3b1de117ae3b34474 | refs/heads/master | 2021-08-31T04:50:07.771585 | 2017-12-20T12:28:50 | 2017-12-20T12:28:50 | 114,978,860 | 1 | 0 | null | 2017-12-21T07:57:54 | 2017-12-21T07:57:54 | null | UTF-8 | Java | false | false | 2,451 | 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 com.aliyuncs.cloudphoto.model.v20170711;
import com.aliyuncs.RpcAcsRequest;
import java.util.List;
import com.aliyuncs.http.ProtocolType;
/**
* @author auto create
* @version
*/
public class RemoveAlbumPhotosRequest extends RpcAcsRequest<RemoveAlbumPhotosResponse> {
public RemoveAlbumPhotosRequest() {
super("CloudPhoto", "2017-07-11", "RemoveAlbumPhotos", "cloudphoto");
setProtocol(ProtocolType.HTTPS);
}
private String libraryId;
private Long albumId;
private List<Long> photoIds;
private String storeName;
public String getLibraryId() {
return this.libraryId;
}
public void setLibraryId(String libraryId) {
this.libraryId = libraryId;
if(libraryId != null){
putQueryParameter("LibraryId", libraryId);
}
}
public Long getAlbumId() {
return this.albumId;
}
public void setAlbumId(Long albumId) {
this.albumId = albumId;
if(albumId != null){
putQueryParameter("AlbumId", albumId.toString());
}
}
public List<Long> getPhotoIds() {
return this.photoIds;
}
public void setPhotoIds(List<Long> photoIds) {
this.photoIds = photoIds;
if (photoIds != null) {
for (int i = 0; i < photoIds.size(); i++) {
putQueryParameter("PhotoId." + (i + 1) , photoIds.get(i));
}
}
}
public String getStoreName() {
return this.storeName;
}
public void setStoreName(String storeName) {
this.storeName = storeName;
if(storeName != null){
putQueryParameter("StoreName", storeName);
}
}
@Override
public Class<RemoveAlbumPhotosResponse> getResponseClass() {
return RemoveAlbumPhotosResponse.class;
}
}
| [
"haowei.yao@alibaba-inc.com"
] | haowei.yao@alibaba-inc.com |
c3dc5de5c064cca13b3bf1039b378cb805392985 | 776f7a8bbd6aac23678aa99b72c14e8dd332e146 | /src/rx/internal/operators/OperatorRetryWithPredicate$SourceSubscriber$1$1.java | 5d1eea470dcd8bfeb6fe17d7ecc905475025f65f | [] | no_license | arvinthrak/com.nianticlabs.pokemongo | aea656acdc6aa419904f02b7331f431e9a8bba39 | bcf8617bafd27e64f165e107fdc820d85bedbc3a | refs/heads/master | 2020-05-17T15:14:22.431395 | 2016-07-21T03:36:14 | 2016-07-21T03:36:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,189 | java | package rx.internal.operators;
import rx.Scheduler.Worker;
import rx.Subscriber;
import rx.functions.Action0;
import rx.functions.Func2;
class OperatorRetryWithPredicate$SourceSubscriber$1$1
extends Subscriber<T>
{
boolean done;
OperatorRetryWithPredicate$SourceSubscriber$1$1(OperatorRetryWithPredicate.SourceSubscriber.1 param1, Action0 paramAction0) {}
public void onCompleted()
{
if (!done)
{
done = true;
this$1.this$0.child.onCompleted();
}
}
public void onError(Throwable paramThrowable)
{
if (!done)
{
done = true;
if ((((Boolean)this$1.this$0.predicate.call(Integer.valueOf(this$1.this$0.attempts), paramThrowable)).booleanValue()) && (!this$1.this$0.inner.isUnsubscribed())) {
this$1.this$0.inner.schedule(val$_self);
}
}
else
{
return;
}
this$1.this$0.child.onError(paramThrowable);
}
public void onNext(T paramT)
{
if (!done) {
this$1.this$0.child.onNext(paramT);
}
}
}
/* Location:
* Qualified Name: rx.internal.operators.OperatorRetryWithPredicate.SourceSubscriber.1.1
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"reverseengineeringer@hackeradmin.com"
] | reverseengineeringer@hackeradmin.com |
7bb5d1ee1fc2d87dc120f601ca87869c8dca7b93 | df79dbcfc869b9d2180a44e34aa1e5ef208d1655 | /project/MS-ZuulServer/src/main/java/com/crts/app/pbl/main/MsZuulServerApplication.java | 965e52043a3a042a0a5f43c035c6ace99e459a52 | [] | no_license | paragkhedkar07/TotalProjects | a170e3d5455a046b62709986f3f00a95b49fee70 | 7791da688c121d2422a4f4e52e91256c9b7606e5 | refs/heads/master | 2023-03-14T23:47:43.492749 | 2021-03-27T14:59:08 | 2021-03-27T14:59:08 | 352,097,373 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 493 | java | package com.crts.app.pbl.main;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
@EnableZuulProxy
@EnableEurekaClient
@SpringBootApplication
public class MsZuulServerApplication {
public static void main(String[] args) {
SpringApplication.run(MsZuulServerApplication.class, args);
}
}
| [
"paragkhedkar07@gmail.com"
] | paragkhedkar07@gmail.com |
8c69977d651743a719b5e79baee0cdfc3d483ad8 | b2ea5d653b6e7c545aa3e62615d45195bf092736 | /src/com/writeoncereadmany/minstrel/ast/statements/definitions/interfaces/InterfaceDefinitionBody.java | df0f71825549ee5afecf2ff84502cd59a33216d3 | [] | no_license | writeoncereadmany/minstrel | 1813aaa98391744f8cc6f35af8fcd58249f07c1c | df233e35a4481c48c86c2de2ad812f933b1abae0 | refs/heads/master | 2020-04-07T18:23:30.414812 | 2013-12-27T12:31:11 | 2013-12-27T12:31:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 667 | java | package com.writeoncereadmany.minstrel.ast.statements.definitions.interfaces;
import com.writeoncereadmany.minstrel.ast.ASTNode;
import com.writeoncereadmany.minstrel.ast.miscellaneous.Name;
import com.writeoncereadmany.minstrel.ast.statements.definitions.functions.Signature;
import java.util.Map;
/**
* Created by tom on 14/12/2013.
*/
public class InterfaceDefinitionBody implements ASTNode {
private Map<Name, Signature> methodSignatures;
public InterfaceDefinitionBody(Map<Name, Signature> signatures) {
methodSignatures = signatures;
}
public Map<Name, Signature> getMethodSignatures() {
return methodSignatures;
}
}
| [
"tarjohnson1979@gmail.com"
] | tarjohnson1979@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.