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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b308706936e94a1f18986fbff181ceed6f76a10f
|
84e81d68f85e2e11c67d5979457f269f882eef5f
|
/src/com/pinde/sci/form/jszy/ExtInfoForm.java
|
767335e954403e5af76e18fa824c763eb134d5f6
|
[] |
no_license
|
zhanght86/pdsci
|
54a46ab7fddbd28f9393f793d0d1a539a9e032d6
|
ae9b5a64b4b0e86387e5d67d96159002cfde2ff4
|
refs/heads/master
| 2021-01-01T20:08:39.451279
| 2016-06-30T04:55:47
| 2016-06-30T04:55:47
| null | 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 5,495
|
java
|
package com.pinde.sci.form.jszy;
import java.io.Serializable;
import java.util.List;
public class ExtInfoForm implements Serializable{
private static final long serialVersionUID = 1592918930641343959L;
/**
* 籍贯
*/
private String nativePlace;
/**
* 民族
*/
private String nation;
/**
* 健康状况
*/
private String healthStatus;
/**
* 政治面貌
*/
private String political;
/**
* 婚姻状况
*/
private String maritalStatus;
/**
* 既往病史
*/
private String beforeCase;
/**
* 社会工作
*/
private String societyWork;
/**
* 是否应届生
*/
private String yearGraduateFlag;
/**
* 生源地省id
*/
private String birthProvId;
/**
* 生源地省name
*/
private String birthProvName;
/**
* 生源地市id
*/
private String birthCityId;
/**
* 生源地市name
*/
private String birthCityName;
/**
* 生源地区id
*/
private String birthAreaId;
/**
* 生源地区name
*/
private String birthAreaName;
/**
* 家庭住址
*/
private String homeAddress;
/**
* 家庭电话
*/
private String homePhome;
/**
* 邮编
*/
private String zipCode;
/**
* 其他方式
*/
private String otherWay;
/**
* 身份证图片uri
*/
private String idNoUri;
/**
* 毕业证书url
*/
private String certificateUri;
/**
* 学位证书uri
*/
private String degreeUri;
public String getIdNoUri() {
return idNoUri;
}
public void setIdNoUri(String idNoUri) {
this.idNoUri = idNoUri;
}
/**
* 医师资格证uri
*/
private String qualifiedUri;
/**
* 医师执业证书uri
*/
private String regUri;
public String getCertificateUri() {
return certificateUri;
}
public void setCertificateUri(String certificateUri) {
this.certificateUri = certificateUri;
}
public String getDegreeUri() {
return degreeUri;
}
public void setDegreeUri(String degreeUri) {
this.degreeUri = degreeUri;
}
public String getQualifiedUri() {
return qualifiedUri;
}
public void setQualifiedUri(String qualifiedUri) {
this.qualifiedUri = qualifiedUri;
}
public String getRegUri() {
return regUri;
}
public void setRegUri(String regUri) {
this.regUri = regUri;
}
/**
* 工作经历
*/
private List<WorkResumeForm> workResumeList;
public String getNativePlace() {
return nativePlace;
}
public void setNativePlace(String nativePlace) {
this.nativePlace = nativePlace;
}
public String getNation() {
return nation;
}
public void setNation(String nation) {
this.nation = nation;
}
public String getHealthStatus() {
return healthStatus;
}
public void setHealthStatus(String healthStatus) {
this.healthStatus = healthStatus;
}
public String getPolitical() {
return political;
}
public void setPolitical(String political) {
this.political = political;
}
public String getMaritalStatus() {
return maritalStatus;
}
public void setMaritalStatus(String maritalStatus) {
this.maritalStatus = maritalStatus;
}
public String getBeforeCase() {
return beforeCase;
}
public void setBeforeCase(String beforeCase) {
this.beforeCase = beforeCase;
}
public String getSocietyWork() {
return societyWork;
}
public void setSocietyWork(String societyWork) {
this.societyWork = societyWork;
}
public String getYearGraduateFlag() {
return yearGraduateFlag;
}
public void setYearGraduateFlag(String yearGraduateFlag) {
this.yearGraduateFlag = yearGraduateFlag;
}
public String getBirthProvId() {
return birthProvId;
}
public void setBirthProvId(String birthProvId) {
this.birthProvId = birthProvId;
}
public String getBirthProvName() {
return birthProvName;
}
public void setBirthProvName(String birthProvName) {
this.birthProvName = birthProvName;
}
public String getBirthCityId() {
return birthCityId;
}
public void setBirthCityId(String birthCityId) {
this.birthCityId = birthCityId;
}
public String getBirthCityName() {
return birthCityName;
}
public void setBirthCityName(String birthCityName) {
this.birthCityName = birthCityName;
}
public String getBirthAreaId() {
return birthAreaId;
}
public void setBirthAreaId(String birthAreaId) {
this.birthAreaId = birthAreaId;
}
public String getBirthAreaName() {
return birthAreaName;
}
public void setBirthAreaName(String birthAreaName) {
this.birthAreaName = birthAreaName;
}
public String getHomeAddress() {
return homeAddress;
}
public void setHomeAddress(String homeAddress) {
this.homeAddress = homeAddress;
}
public String getHomePhome() {
return homePhome;
}
public void setHomePhome(String homePhome) {
this.homePhome = homePhome;
}
public String getZipCode() {
return zipCode;
}
public void setZipCode(String zipCode) {
this.zipCode = zipCode;
}
public String getOtherWay() {
return otherWay;
}
public void setOtherWay(String otherWay) {
this.otherWay = otherWay;
}
public List<WorkResumeForm> getWorkResumeList() {
return workResumeList;
}
public void setWorkResumeList(List<WorkResumeForm> workResumeList) {
this.workResumeList = workResumeList;
}
}
|
[
"51555945@qq.com"
] |
51555945@qq.com
|
a7f703d5e55d88e1dda597f2db8ce3d14b9c1b1c
|
20eb62855cb3962c2d36fda4377dfd47d82eb777
|
/IntroClassJava/dataset/digits/d2b889e1ac42bc85f9df5c45c10708f46784be93d69acd1415cfd4d028cb50b19f50c374a9498c8e8b909173053a100e20c279ddb06c6359a06a920ead3e8080/003/mutations/191/digits_d2b889e1_003.java
|
38cb4c0978491566a993e4791733608d05768b82
|
[] |
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,719
|
java
|
package introclassJava;
class IntObj {
public int value;
public IntObj () {
} public IntObj (int i) {
value = i;
}
}
class FloatObj {
public float value;
public FloatObj () {
} public FloatObj (float i) {
value = i;
}
}
class LongObj {
public long value;
public LongObj () {
} public LongObj (long i) {
value = i;
}
}
class DoubleObj {
public double value;
public DoubleObj () {
} public DoubleObj (double i) {
value = i;
}
}
class CharObj {
public char value;
public CharObj () {
} public CharObj (char i) {
value = i;
}
}
public class digits_d2b889e1_003 {
public java.util.Scanner scanner;
public String output = "";
public static void main (String[]args) throws Exception {
digits_d2b889e1_003 mainClass = new digits_d2b889e1_003 ();
String output;
if (args.length > 0) {
mainClass.scanner = new java.util.Scanner (args[0]);
} else {
mainClass.scanner = new java.util.Scanner (System.in);
}
mainClass.exec ();
System.out.println (mainClass.output);
}
public void exec () throws Exception {
IntObj x = new IntObj (), a = new IntObj (), b = new IntObj (), c =
new IntObj (), y = new IntObj ();
output += (String.format ("Enter an integer > "));
b.value = scanner.nextInt ();
a.value = b.value / 10;
c.value = b.value % 10;
if (c.value > 0) {
output += (String.format ("\n%d\n", c.value));
} else if (c.value < 0) {
y.value = c.value * (-1);
output += (String.format ("%d\n", y.value));
}
if (a.value > 0) {
while (a.value > 0) {
x.value = a.value % 10;
a.value = a.value / 10;
output += (String.format ("%d\n", x.value));
if (a.value < 10) {
output +=
(String.format ("%d\nThat's all, have a nice day!\n", a.value));
if (true)
return;;
}
}
} else if (a.value < 0) {
a.value = a.value * (-1);
while (a.value > 0) {
a.value = a.value % 10;
a.value = a.value / 10;
output += (String.format ("%d\n", x.value));
if (a.value < 10) {
a.value = a.value * (-1);
output +=
(String.format ("%d\nThat's all, have a nice day~\n", a.value));
}
}
}
if (true)
return;;
}
}
|
[
"justinwm@163.com"
] |
justinwm@163.com
|
995e77c210f7b98088fb325eec5eb48c2e131dbd
|
10eec5ba9e6dc59478cdc0d7522ff7fc6c94cd94
|
/maind/src/main/java/android/support/v4/app/NavUtilsJB.java
|
201a09ebe4d77d5b6d45bee7f828a2a22cd09a0a
|
[] |
no_license
|
EchoAGI/Flexispy.re
|
a2f5fec409db083ee3fe0d664dc2cca7f9a4f234
|
ba65a5b8b033b92c5867759f2727c5141b7e92fc
|
refs/heads/master
| 2023-04-26T02:52:18.732433
| 2018-07-16T07:46:56
| 2018-07-16T07:46:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 931
|
java
|
package android.support.v4.app;
import android.app.Activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;
class NavUtilsJB
{
public static Intent getParentActivityIntent(Activity paramActivity)
{
return paramActivity.getParentActivityIntent();
}
public static String getParentActivityName(ActivityInfo paramActivityInfo)
{
return paramActivityInfo.parentActivityName;
}
public static void navigateUpTo(Activity paramActivity, Intent paramIntent)
{
paramActivity.navigateUpTo(paramIntent);
}
public static boolean shouldUpRecreateTask(Activity paramActivity, Intent paramIntent)
{
return paramActivity.shouldUpRecreateTask(paramIntent);
}
}
/* Location: /Volumes/D1/codebase/android/POC/assets/product/maind/classes-enjarify.jar!/android/support/v4/app/NavUtilsJB.class
* Java compiler version: 5 (49.0)
* JD-Core Version: 0.7.1
*/
|
[
"52388483@qq.com"
] |
52388483@qq.com
|
3bada13270c985992b41eea8b2ed6b0da97c6392
|
f5049214ff99cdd7c37da74619b60ac4a26fc6ba
|
/fileshare/common/eu.agno3.fileshare.webgui.admin/src/main/java/eu/agno3/fileshare/webgui/admin/user/UserTableBinding.java
|
a7763977c7bf130ca5e329eefdc058f41f79f0ad
|
[
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
AgNO3/code
|
d17313709ee5db1eac38e5811244cecfdfc23f93
|
b40a4559a10b3e84840994c3fd15d5f53b89168f
|
refs/heads/main
| 2023-07-28T17:27:53.045940
| 2021-09-17T14:25:01
| 2021-09-17T14:31:41
| 407,567,058
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 735
|
java
|
/**
* © 2015 AgNO3 Gmbh & Co. KG
* All right reserved.
*
* Created: 20.01.2015 by mbechler
*/
package eu.agno3.fileshare.webgui.admin.user;
import javax.enterprise.context.RequestScoped;
import javax.inject.Named;
import org.primefaces.component.datatable.DataTable;
/**
* @author mbechler
*
*/
@RequestScoped
@Named ( "app_fs_adm_userTableBinding" )
public class UserTableBinding {
private DataTable component;
/**
* @return the component
*/
public DataTable getComponent () {
return this.component;
}
/**
* @param component
* the component to set
*/
public void setComponent ( DataTable component ) {
this.component = component;
}
}
|
[
"bechler@agno3.eu"
] |
bechler@agno3.eu
|
becb3eee84368cd5021adfb9616987533f6f118c
|
c3debbc571031781ec2f156783ae0d17fb663d90
|
/qa/smoke-test/21022009/esb/src/test/java/org/wso2/carbon/web/test/esb/ESBSequenceMediatorTest.java
|
215a2b517404f3e1bb6e5fab91cdeea2821d6176
|
[] |
no_license
|
manoj-kristhombu/commons
|
1e0b24ed25a21691dfa848b8debaf95a47b9a8e0
|
4928923d66a345a3dca15c6f2a6f1fe9b246b2e8
|
refs/heads/master
| 2021-05-28T15:53:21.146705
| 2014-11-17T14:53:18
| 2014-11-17T14:53:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,442
|
java
|
package org.wso2.carbon.web.test.esb;
import com.thoughtworks.selenium.*;
import junit.framework.TestCase;
/*
* 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.
*/
public class ESBSequenceMediatorTest extends TestCase{
Selenium selenium;
public ESBSequenceMediatorTest(Selenium _browser){
selenium=_browser;
}
public void testAddSequenceMediator(String refSequence) throws Exception {
selenium.click("link=Sequence");
Thread.sleep(3000);
//Selecting resources from the Registry Browser
selenium.click("//a[@onclick=\"showInLinedRegistryBrowser('seq_ref')\"]");
Thread.sleep(2000);
ESBCommon esbCommon = new ESBCommon(selenium);
esbCommon.testSelectResource("Sequence",refSequence);
//Updating the sequence mediator
esbCommon.testMediatorUpdate();
//Switching to the source view of the sequence
selenium.click("link=switch to source view");
selenium.waitForPageToLoad("30000");
assertTrue(selenium.isTextPresent("<syn:sequence xmlns:syn=\"http://ws.apache.org/ns/synapse\" name=\"sequence_mediator_sequence\"> <syn:sequence key=\"fault\" /> </syn:sequence>"));
selenium.click("link=switch to design view");
selenium.waitForPageToLoad("30000");
selenium.click("link=Sequence");
selenium.waitForPageToLoad("30000");
selenium.click("//a[@onclick='showSource()']");
selenium.waitForPageToLoad("30000");
//Verifying the source view of the Mediator
assertTrue(selenium.isTextPresent("<syn:sequence xmlns:syn=\"http://ws.apache.org/ns/synapse\" key=\"fault\" />"));
selenium.click("link=switch to design view");
}
}
|
[
"hasini@a5903396-d722-0410-b921-86c7d4935375"
] |
hasini@a5903396-d722-0410-b921-86c7d4935375
|
6e92c80eff5065f57923a9aaaebaead80a40219c
|
cc9b979c3c32a45d1031b1b9a100ed3234fbafcc
|
/app/src/main/java/com/bjjy/buildtalk/core/greendao/CircleHistoryData.java
|
58c286608aa5a23fdbe947e7715d84e1621ebab0
|
[] |
no_license
|
Power-Android/BuildTalk
|
5e66f15d5300ac73e6abb0934831a0465b9f8a14
|
4bdb54cd6009da89eb014e03e6640b815ada74d6
|
refs/heads/master
| 2022-11-12T13:35:45.050616
| 2020-07-06T01:58:39
| 2020-07-06T01:58:39
| 183,206,297
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,052
|
java
|
package com.bjjy.buildtalk.core.greendao;
import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
/**
* @author power
* @date 2019/5/15 9:54 AM
* @project BuildTalk
* @description:
*/
@Entity
public class CircleHistoryData {
@Id(autoincrement = true)
private Long id;
private long date;
private String data;
@Generated(hash = 1715562558)
public CircleHistoryData(Long id, long date, String data) {
this.id = id;
this.date = date;
this.data = data;
}
@Generated(hash = 1027926776)
public CircleHistoryData() {
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public long getDate() {
return date;
}
public void setDate(long date) {
this.date = date;
}
public String getData() {
return data;
}
public void setData(String data) {
this.data = data;
}
}
|
[
"power_android@163.com"
] |
power_android@163.com
|
d6be41091270d1419c1870a25368b96a46d73dec
|
5dd744927f90a9e0999b78077e7aaf6ba7fa7014
|
/spring-boot-system-modules/spring-boot-dao/spring-boot-dao-mybatis-enhance/src/main/java/com/yuan/spring/boot/dao/mybatis/enhance/entity/domain/MybatisEnhanceDomain.java
|
556d714725c4fdee3f16fc3e5d491b1a51f07b01
|
[] |
no_license
|
yuan50697105/spring-boot-test-template
|
3a3d6e20dd486f9f9cf93f39cd0881c27989032f
|
58d7e450a5fa743fd94b81b2474033780bf5fb4d
|
refs/heads/master
| 2021-06-17T21:05:24.910810
| 2019-08-05T16:42:40
| 2019-08-05T16:42:40
| 196,518,323
| 0
| 0
| null | 2021-03-31T21:47:44
| 2019-07-12T06:04:59
|
Java
|
UTF-8
|
Java
| false
| false
| 395
|
java
|
package com.yuan.spring.boot.dao.mybatis.enhance.entity.domain;
import com.yuan.spring.boot.dao.commons.entity.domain.BaseDomain;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
@EqualsAndHashCode(callSuper = true)
@Data
public abstract class MybatisEnhanceDomain<ID extends Serializable> extends BaseDomain<ID> {
public MybatisEnhanceDomain() {
}
}
|
[
"710575900@qq.com"
] |
710575900@qq.com
|
078ca6bd972871f6c31fff281ef41f5fb7585582
|
86dcfff6ad07e0d230e37317e2b9918027629aa7
|
/src/main/java/com/ride/hailing/prototype/web/ride/RideRequest.java
|
444017a94b1c8367e556144cbba5c82d0cac903a
|
[] |
no_license
|
IlyaZinkovich/ride-hailing
|
c203c4792faf2577d0c6cc81e812be9b392a47ee
|
9e9deaa012374abad96ce702ec5f7be6814c5dd8
|
refs/heads/master
| 2021-08-15T11:37:42.537388
| 2017-11-17T19:44:36
| 2017-11-17T19:44:36
| 110,259,326
| 0
| 0
| null | 2017-11-11T11:49:53
| 2017-11-10T15:01:29
| null |
UTF-8
|
Java
| false
| false
| 294
|
java
|
package com.ride.hailing.prototype.web.ride;
public class RideRequest {
private String passengerName;
public String getPassengerName() {
return passengerName;
}
public void setPassengerName(String passengerName) {
this.passengerName = passengerName;
}
}
|
[
"ilya.zinkovich@gmail.com"
] |
ilya.zinkovich@gmail.com
|
6e6ff4fb117a30209dd14d3d4d8b105e11f49e12
|
c8655251bb853a032ab7db6a9b41c13241565ff6
|
/jframe-utils/src/main/java/com/alipay/api/domain/AlipayEcoLogisticsExpressNonserviceQueryModel.java
|
f6c94c4f1e10f6bdcd42c2403dd7f437b17303b7
|
[] |
no_license
|
jacksonrick/JFrame
|
3b08880d0ad45c9b12e335798fc1764c9b01756b
|
d9a4a9b17701eb698b957e47fa3f30c6cb8900ac
|
refs/heads/master
| 2021-07-22T21:13:22.548188
| 2017-11-03T06:49:44
| 2017-11-03T06:49:44
| 107,761,091
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 911
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 查询物流公司非服务区接口
*
* @author auto create
* @since 1.0, 2017-04-06 18:05:12
*/
public class AlipayEcoLogisticsExpressNonserviceQueryModel extends AlipayObject {
private static final long serialVersionUID = 5749412621949873372L;
/**
* 物流机构编码,参照物流机构编码文档,<a href="https://expressprod.oss-cn-hangzhou.aliyuncs.com/docs/%E5%AF%84%E4%BB%B6%E5%B9%B3%E5%8F%B0-%E7%89%A9%E6%B5%81%E6%9C%BA%E6%9E%84%E7%BC%96%E7%A0%81%E6%96%87%E6%A1%A3.xlsx">点此下载</a>。
*/
@ApiField("logis_merch_code")
private String logisMerchCode;
public String getLogisMerchCode() {
return this.logisMerchCode;
}
public void setLogisMerchCode(String logisMerchCode) {
this.logisMerchCode = logisMerchCode;
}
}
|
[
"809573150@qq.com"
] |
809573150@qq.com
|
69fe1a9bd6a39ed5fbf7d95ee2b98b049ac3a794
|
f88f0f8f67ae38ac4c61992193a03905b7185c9a
|
/brewing/DispersalLiquid.java
|
f033aec8cf59a894517b98b95e628a396dd02c3a
|
[] |
no_license
|
EduardoMGP/Witchery-TechCraftBrasil-version
|
97868ca40bbabf897fbb24a7f66ae180a78dda61
|
cb373b1192caf90c2e02e971fb8c4dccf92961eb
|
refs/heads/master
| 2022-11-22T12:38:26.808933
| 2020-07-19T22:31:42
| 2020-07-19T22:31:42
| 280,962,124
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,590
|
java
|
package com.emoniph.witchery.brewing;
import com.emoniph.witchery.Witchery;
import com.emoniph.witchery.brewing.Dispersal;
import com.emoniph.witchery.brewing.EntityDroplet;
import com.emoniph.witchery.brewing.ModifiersImpact;
import com.emoniph.witchery.brewing.ModifiersRitual;
import com.emoniph.witchery.brewing.RitualStatus;
import com.emoniph.witchery.brewing.TileEntityBrewFluid;
import com.emoniph.witchery.util.BlockPosition;
import com.emoniph.witchery.util.BlockUtil;
import com.emoniph.witchery.util.Coord;
import com.emoniph.witchery.util.EntityUtil;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
public class DispersalLiquid extends Dispersal {
public void onImpactSplashPotion(World world, NBTTagCompound nbtBrew, MovingObjectPosition mop, ModifiersImpact modifiers) {
Coord coord = new Coord(mop, modifiers.impactPosition, true);
boolean replaceable = BlockUtil.isReplaceableBlock(world, coord.x, coord.y, coord.z, modifiers.thrower);
if(replaceable) {
coord.setBlock(world, Witchery.Blocks.BREW_LIQUID);
TileEntityBrewFluid gas = (TileEntityBrewFluid)coord.getTileEntity(world, TileEntityBrewFluid.class);
if(gas != null) {
gas.initalise(modifiers, nbtBrew);
}
}
}
public String getUnlocalizedName() {
return "witchery:brew.dispersal.liquid";
}
public RitualStatus onUpdateRitual(World world, int x, int y, int z, NBTTagCompound nbtBrew, ModifiersRitual modifiers, ModifiersImpact impactModifiers) {
BlockPosition target = modifiers.getTarget();
World targetWorld = target.getWorld(MinecraftServer.getServer());
int radius = 16 + 8 * impactModifiers.extent;
int halfQuantity = radius / 4;
boolean height = true;
double RSQ = (double)(radius * radius);
int i = 0;
for(int quantity = halfQuantity + world.rand.nextInt(halfQuantity); i < quantity; ++i) {
int ny = 100 + world.rand.nextInt(20);
int nx = x - radius + world.rand.nextInt(2 * radius);
int nz = z - radius + world.rand.nextInt(2 * radius);
if(Coord.distanceSq((double)x, (double)y, (double)z, (double)nx, (double)y, (double)nz) <= RSQ) {
EntityUtil.spawnEntityInWorld(targetWorld, new EntityDroplet(targetWorld, (double)nx, (double)ny, (double)nz, nbtBrew));
}
}
return modifiers.pulses < 10 + impactModifiers.lifetime * 5?RitualStatus.ONGOING:RitualStatus.COMPLETE;
}
}
|
[
"carlos_eduardovieiraoliveira@yahoo.com"
] |
carlos_eduardovieiraoliveira@yahoo.com
|
724afc055a9fab915c32512fdf93b214e5bb979c
|
0cf378b7320592a952d5343a81b8a67275ab5fab
|
/webprotege-server-core/src/main/java/edu/stanford/bmir/protege/web/server/crud/ProjectEntityCrudKitHandlerCache.java
|
f6a08bd5037f7a9ed7afee82d6c1f39d440cd9f3
|
[
"BSD-2-Clause"
] |
permissive
|
curtys/webprotege-attestation
|
945de9f6c96ca84b7022a60f4bec4886c81ab4f3
|
3aa909b4a8733966e81f236c47d6b2e25220d638
|
refs/heads/master
| 2023-04-11T04:41:16.601854
| 2023-03-20T12:18:44
| 2023-03-20T12:18:44
| 297,962,627
| 0
| 0
|
MIT
| 2021-08-24T08:43:21
| 2020-09-23T12:28:24
|
Java
|
UTF-8
|
Java
| false
| false
| 3,386
|
java
|
package edu.stanford.bmir.protege.web.server.crud;
import edu.stanford.bmir.protege.web.server.crud.persistence.ProjectEntityCrudKitSettings;
import edu.stanford.bmir.protege.web.server.crud.persistence.ProjectEntityCrudKitSettingsRepository;
import edu.stanford.bmir.protege.web.shared.crud.EntityCrudKitPrefixSettings;
import edu.stanford.bmir.protege.web.shared.crud.EntityCrudKitSettings;
import edu.stanford.bmir.protege.web.shared.crud.EntityCrudKitSuffixSettings;
import edu.stanford.bmir.protege.web.shared.crud.uuid.UuidSuffixSettings;
import edu.stanford.bmir.protege.web.shared.inject.ProjectSingleton;
import edu.stanford.bmir.protege.web.shared.project.ProjectId;
import javax.annotation.Nonnull;
import javax.inject.Inject;
import java.util.Optional;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Author: Matthew Horridge<br>
* Stanford University<br>
* Bio-Medical Informatics Research Group<br>
* Date: 21/08/2013
*/
@ProjectSingleton
public class ProjectEntityCrudKitHandlerCache {
private final ProjectId projectId;
private final ProjectEntityCrudKitSettingsRepository repository;
private final EntityCrudKitRegistry registry;
private EntityCrudKitHandler<?, ?> cachedHandler;
@Inject
public ProjectEntityCrudKitHandlerCache(@Nonnull ProjectEntityCrudKitSettingsRepository repository,
@Nonnull ProjectId projectId,
@Nonnull EntityCrudKitRegistry registry) {
this.repository = checkNotNull(repository);
this.projectId = checkNotNull(projectId);
this.registry = checkNotNull(registry);
}
/**
* Gets the current {@link EntityCrudKitHandler}.
* @return The current {@link EntityCrudKitHandler}. Not {@code null}.
*/
public synchronized EntityCrudKitHandler<?, ?> getHandler() {
EntityCrudKitSettings<?> settings = getCurrentSettings();
if (isCachedHandlerStale(settings)) {
cachedHandler = registry.getHandler(settings);
}
return cachedHandler;
}
private EntityCrudKitSettings<?> getCurrentSettings() {
Optional<ProjectEntityCrudKitSettings> settings = repository.findOne(projectId);
ProjectEntityCrudKitSettings projectSettings;
if (!settings.isPresent()) {
projectSettings = ProjectEntityCrudKitSettings.get(projectId, getDefaultSettings());
repository.save(projectSettings);
}
else {
projectSettings = settings.get();
}
return projectSettings.getSettings();
}
private boolean isCachedHandlerStale(EntityCrudKitSettings<?> settings) {
return cachedHandler == null || !settings.equals(cachedHandler.getSettings());
}
/**
* Creates default settings, with default prefix and suffix settings.
*
* @return The default settings. Not {@code null}.
*/
private static EntityCrudKitSettings<?> getDefaultSettings() {
return EntityCrudKitSettings.get(getDefaultPrefixSettings(), getDefaultSuffixSettings());
}
private static EntityCrudKitPrefixSettings getDefaultPrefixSettings() {
return EntityCrudKitPrefixSettings.get();
}
private static EntityCrudKitSuffixSettings getDefaultSuffixSettings() {
return UuidSuffixSettings.get();
}
}
|
[
"matthew.horridge@stanford.edu"
] |
matthew.horridge@stanford.edu
|
35a351fcbc5987df3b595d63a6eb875b7071f753
|
c437bb7b42bccf19673b1ec9fbaf26632ae73692
|
/j2me/games/HealthThreedJavaLibrary/src/allbinary/game/health/HealthBarThreedAnimation.java
|
817e0f9445f3ce0ced3038cace8c95d1bf046a8c
|
[
"LicenseRef-scancode-warranty-disclaimer"
] |
no_license
|
sanyaade/AllBinary-Platform
|
e9256f55df8ffa82c55ca401eba9ffe83956995c
|
a07ee2008a1b4f27025b229191545dec62bc34ad
|
refs/heads/master
| 2016-09-10T13:34:06.672577
| 2011-10-07T02:14:46
| 2011-10-07T02:14:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,681
|
java
|
/*
* AllBinary Open License Version 1
* Copyright (c) 2011 AllBinary
*
* By agreeing to this license you and any business entity you represent are
* legally bound to the AllBinary Open License Version 1 legal agreement.
*
* You may obtain the AllBinary Open License Version 1 legal agreement from
* AllBinary or the root directory of AllBinary's AllBinary Platform repository.
*
* Created By: Travis Berthelot
*
*/
package allbinary.game.health;
import javax.microedition.khronos.opengles.GL10;
import javax.microedition.lcdui.Graphics;
import min3d.core.ColorBufferList;
import min3d.core.Number3dBufferList;
import min3d.objectPrimitives.Rectangle;
import min3d.vos.Number3d;
import org.allbinary.graphics.threed.min3d.renderer.Object3dProcessorUtil;
import org.microemu.android.device.OpenGLESGraphics;
import allbinary.graphics.color.BasicColorFactory;
import allbinary.layer.AllBinaryLayer;
import allbinary.view.ViewPosition;
public class HealthBarThreedAnimation
extends HealthBarAnimation
{
private Rectangle rectangle;
private final BasicColorFactory basicColorFactory =
BasicColorFactory.getInstance();
public HealthBarThreedAnimation(AllBinaryLayer layerInterface, int location)
throws Exception
{
super(layerInterface, location);
this.basicColor = this.basicColorFactory.GREEN;
this.color = this.basicColor.intValue();
rectangle = new Rectangle(
0, 0,
1, 1, this.basicColor);
rectangle.setDoubleSidedEnabled(true);
rectangle.setNormalsEnabled(false);
rectangle.setTexturesEnabled(false);
}
private void updateColor()
{
ColorBufferList colorBufferList =
rectangle.getVertices().getColor4BufferList();
int size = colorBufferList.size();
for(int index = size; --index >= 0;)
{
colorBufferList.set(index, this.basicColor);
}
}
private void updateSize()
{
Number3dBufferList number3dBufferList = rectangle.getVertices().getPointsNumber3dBufferList();
int width = x2;
int height = this.thickness * 2;
int segsH = 1;
int segsW = 1;
int row;
int col;
float w = width / segsW;
float h = height / segsH;
float width5 = width/2f;
float height5 = height/2f;
int index = 0;
for (row = 0; row <= segsH; row++)
{
for (col = 0; col <= segsW; col++)
{
number3dBufferList.set(index++, (float)col * w - width5, (float)row * h - height5, 0f);
}
}
}
public void onHealthChange(int newX2)
{
super.onHealthChange(newX2);
this.updateColor();
this.updateSize();
}
private final Object3dProcessorUtil object3dUtil = Object3dProcessorUtil.getInstance();
public void paintThreed(Graphics graphics, int x, int y, int z)
{
OpenGLESGraphics openGLESGraphics = (OpenGLESGraphics) graphics;
GL10 gl = openGLESGraphics.getGl();
ViewPosition viewPosition = this.allbinaryLayer.getViewPosition();
Number3d positionNumber3d = this.rectangle.getPosition();
positionNumber3d.x = -((float) viewPosition.getX() - this.allbinaryLayer.getHalfWidth() + (x2 >> 1) );
//
positionNumber3d.z = -((float) viewPosition.getY() + (this.allbinaryLayer.getHalfHeight() + 1));
//+ this.allbinaryLayer.getHalfHeight() + 1
positionNumber3d.y = viewPosition.getZ() + 12;
object3dUtil.drawObject(gl, this.rectangle);
}
/*
private static int test = -60;
private static final TimeDelayHelper timer = new TimeDelayHelper(1000);
if(timer.isTime())
{
if(test <= 60)
{
test++;
}
else
{
test = -60;
}
PreLogUtil.put(Integer.toString(test), this, this.toString());
}
*/
//private final float[] fillRectangleFloatArray = new float[12];
//private final FloatBuffer fillRectangleVertexFloatBuffer =
// FloatBuffer.wrap(fillRectangleFloatArray);
//int ax = viewPosition.getX();
//int y = this.getY() - 1;
//graphics.fillRect(ax, this.getY() - 1, x2, this.thickness);
/*
for (int index = 0; index < this.thickness; index++)
{
graphics.drawLine(x, y - index, x + x2, y - index);
}
*/
/*
int width = x2;
int height = this.thickness;
x = -(viewPosition.getX());
z = -(viewPosition.getY());
y = viewPosition.getZ();
this.fillRectangleFloatArray[2] = z;
this.fillRectangleFloatArray[5] = z;
this.fillRectangleFloatArray[8] = z;
this.fillRectangleFloatArray[11] = z;
this.fillRectangleFloatArray[0] = x;
//this.fillRectangleFloatArray[7] = DisplayInfoSingleton.getInstance().getLastHeight() - y;
this.fillRectangleFloatArray[7] = y;
this.fillRectangleFloatArray[1] = this.fillRectangleFloatArray[7] - height;
this.fillRectangleFloatArray[3] = x + width;
this.fillRectangleFloatArray[4] = this.fillRectangleFloatArray[1];
this.fillRectangleFloatArray[6] = x;
this.fillRectangleFloatArray[9] = this.fillRectangleFloatArray[3];
this.fillRectangleFloatArray[10] = this.fillRectangleFloatArray[7];
gl.glBindTexture(GL10.GL_TEXTURE_2D, 0);
gl.glDisable(GL10.GL_TEXTURE_2D);
gl.glDisableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
gl.glVertexPointer(3, GL10.GL_FLOAT, 0, fillRectangleVertexFloatBuffer);
gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 0, 4);
gl.glDisableClientState(GL10.GL_VERTEX_ARRAY);
*/
}
|
[
"travisberthelot@hotmail.com"
] |
travisberthelot@hotmail.com
|
e48b228411bc0dc97c781a36058b77907ffc9d1a
|
4edafc8c9af7df066df4fa82c1a78143be91beca
|
/cap10/18/cap10/ProvaRedefinizioni.java
|
73bd03d9a1bfa0d82531170e2111a64b21bd1445
|
[
"MIT"
] |
permissive
|
garganti/info2_oop_unibg
|
be5e84828b757003f7dc4d887bbb503d519d3c1b
|
33a83d29c8701b5fa9ecc97b10cc359db73600cf
|
refs/heads/master
| 2021-08-23T09:45:21.672680
| 2021-06-15T15:19:56
| 2021-06-15T15:19:56
| 83,547,234
| 32
| 16
|
MIT
| 2020-03-05T17:20:18
| 2017-03-01T11:29:13
|
Java
|
UTF-8
|
Java
| false
| false
| 347
|
java
|
package cap10;
class File {
protected File getNewFile() throws Exception { return null;}
}
class TextFile extends File{
@Override
protected File getNewFile() throws Exception { return null;}
}
class DocFile extends File{
@Override
public TextFile getNewFile(){ return null;}
}
public class ProvaRedefinizioni {
}
|
[
"angelo.gargantini@unibg.it"
] |
angelo.gargantini@unibg.it
|
79cedd5d1574ee77123463e07397d1d789a9ca05
|
70f7a06017ece67137586e1567726579206d71c7
|
/alimama/src/main/java/com/xiaomi/push/iv.java
|
be613960333a97c5bb6159b23523e39ed82d8caf
|
[] |
no_license
|
liepeiming/xposed_chatbot
|
5a3842bd07250bafaffa9f468562021cfc38ca25
|
0be08fc3e1a95028f8c074f02ca9714dc3c4dc31
|
refs/heads/master
| 2022-12-20T16:48:21.747036
| 2020-10-14T02:37:49
| 2020-10-14T02:37:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 526
|
java
|
package com.xiaomi.push;
import com.xiaomi.push.iy;
public class iv {
private final jc a;
/* renamed from: a reason: collision with other field name */
private final jl f774a;
public iv() {
this(new iy.a());
}
public iv(je jeVar) {
this.f774a = new jl();
this.a = jeVar.a(this.f774a);
}
public void a(ir irVar, byte[] bArr) {
try {
this.f774a.a(bArr);
irVar.a(this.a);
} finally {
this.a.k();
}
}
}
|
[
"zhangquan@snqu.com"
] |
zhangquan@snqu.com
|
74c80aaab94e9fdd573ad68a90d0fca9c39f7a2b
|
683357e10855417d77c9ca24c889b8e20cb50510
|
/core/src/main/java/com/karltech/tpk/core/dao/ExportmaterialbillHibernateDAO.java
|
d7073845db368f634096400789356a2c8fc113f5
|
[] |
no_license
|
chuquockhanh/tpkwhm
|
49852487637ba1a51712b55d57bcd580811fec9a
|
54b2bbec37592f5be29802dad9c7e3e796b92bdb
|
refs/heads/master
| 2021-01-10T13:03:56.086654
| 2015-10-13T15:41:26
| 2015-10-13T15:41:26
| 44,185,475
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,601
|
java
|
package com.karltech.tpk.core.dao;
import com.karltech.tpk.core.domain.Exportmaterialbill;
import org.apache.commons.lang.StringUtils;
import org.hibernate.HibernateException;
import org.hibernate.Query;
import org.hibernate.SQLQuery;
import org.hibernate.Session;
import org.hibernate.criterion.Restrictions;
import org.springframework.orm.hibernate3.HibernateCallback;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.util.List;
/**
* <p>Hibernate DAO layer for Exportmaterialbills</p>
* <p>Generated at Tue Feb 18 21:28:55 ICT 2014</p>
*
* @author Salto-db Generator v1.0.16 / Pojos + Hibernate mapping + Generic DAO
*
*/
public class ExportmaterialbillHibernateDAO extends
AbstractHibernateDAO<Exportmaterialbill, Long> implements
ExportmaterialbillDAO {
/**
* Find Exportmaterialbill by receiver
*/
public List<Exportmaterialbill> findByReceiver(String receiver) {
return findByCriteria(Restrictions.eq("receiver", receiver));
}
/**
* Find Exportmaterialbill by exportTypeID
*/
@SuppressWarnings("unchecked")
public List<Exportmaterialbill> findByExportTypeID(Long exportTypeID) {
return findByCriteria(Restrictions.eq("exporttype.exportTypeID", exportTypeID));
}
/**
* Find Exportmaterialbill by exportWarehouseID
*/
@SuppressWarnings("unchecked")
public List<Exportmaterialbill> findByExportWarehouseID(Long exportWarehouseID) {
return findByCriteria(Restrictions.eq("warehouse.exportWarehouseID", exportWarehouseID));
}
/**
* Find Exportmaterialbill by receiveWarehouseID
*/
@SuppressWarnings("unchecked")
public List<Exportmaterialbill> findByReceiveWarehouseID(Long receiveWarehouseID) {
return findByCriteria(Restrictions.eq("warehouse.receiveWarehouseID", receiveWarehouseID));
}
/**
* Find Exportmaterialbill by code
*/
public List<Exportmaterialbill> findByCode(String code) {
return findByCriteria(Restrictions.eq("code", code));
}
/**
* Find Exportmaterialbill by description
*/
public List<Exportmaterialbill> findByDescription(String description) {
return findByCriteria(Restrictions.eq("description", description));
}
/**
* Find Exportmaterialbill by createdBy
*/
@SuppressWarnings("unchecked")
public List<Exportmaterialbill> findByCreatedBy(Long createdBy) {
return findByCriteria(Restrictions.eq("user.createdBy", createdBy));
}
/**
* Find Exportmaterialbill by createdDate
*/
public List<Exportmaterialbill> findByCreatedDate(Timestamp createdDate) {
return findByCriteria(Restrictions.eq("createdDate", createdDate));
}
/**
* Find Exportmaterialbill by exportDate
*/
public List<Exportmaterialbill> findByExportDate(Timestamp exportDate) {
return findByCriteria(Restrictions.eq("exportDate", exportDate));
}
/**
* Find Exportmaterialbill by status
*/
public List<Exportmaterialbill> findByStatus(Integer status) {
return findByCriteria(Restrictions.eq("status", status));
}
/**
* Find Exportmaterialbill by updatedBy
*/
@SuppressWarnings("unchecked")
public List<Exportmaterialbill> findByUpdatedBy(Long updatedBy) {
return findByCriteria(Restrictions.eq("user.updatedBy", updatedBy));
}
/**
* Find Exportmaterialbill by updatedDate
*/
public List<Exportmaterialbill> findByUpdatedDate(Timestamp updatedDate) {
return findByCriteria(Restrictions.eq("updatedDate", updatedDate));
}
/**
* Find Exportmaterialbill by note
*/
public List<Exportmaterialbill> findByNote(String note) {
return findByCriteria(Restrictions.eq("note", note));
}
@Override
public String getLatestPXKPL() {
return getHibernateTemplate().execute(
new HibernateCallback<String>() {
public String doInHibernate(Session session)
throws HibernateException, SQLException {
StringBuffer sqlQuery = new StringBuffer("SELECT MAX(CONVERT(SUBSTRING_INDEX(b.code,'-',-1),SIGNED INTEGER)) FROM Exportmaterialbill b");
SQLQuery query = session.createSQLQuery(sqlQuery.toString());
String code = query.uniqueResult() != null ? query.uniqueResult().toString() : "0";
return code;
}
});
}
@Override
public List<Exportmaterialbill> findAllByOrderAndDateLimit(final String orderBy,final Long date) {
return getHibernateTemplate().execute(
new HibernateCallback<List<Exportmaterialbill>>() {
public List<Exportmaterialbill> doInHibernate(Session session)
throws HibernateException, SQLException {
StringBuffer sqlQuery = new StringBuffer("FROM Exportmaterialbill ipb WHERE 1 = 1 ");
if (date != null){
sqlQuery.append(" AND ipb.exportDate >= :date");
}
if (StringUtils.isNotBlank(orderBy)){
sqlQuery.append(" ORDER BY :orderBy ASC");
}
Query query = session.createQuery(sqlQuery.toString());
if (date != null){
query.setParameter("date", new Timestamp(System.currentTimeMillis() - date));
}
if (StringUtils.isNotBlank(orderBy)){
query.setParameter("orderBy", orderBy);
}
return (List<Exportmaterialbill>) query.list();
}
});
}
}
|
[
"khanh.chu@hoanghoacgroup.com"
] |
khanh.chu@hoanghoacgroup.com
|
a89bc3887560300ec4d5e2cb2f6309fec3cd0fe0
|
dc00ed35654ff04187848357e7206f40efb69678
|
/src/main/java/com/sung/core/interceptor/CameHumpInterceptor.java
|
00305ea46bc0500519fae9e59c495f7956a688d2
|
[] |
no_license
|
orangefei/spring-boot-docker-example
|
9694bf82d5f4f955b049ec1442d43053079951a0
|
fac38d5472675dd1251a4a65c0c6987664f7ab90
|
refs/heads/master
| 2020-12-02T22:12:15.983277
| 2017-06-30T06:16:49
| 2017-06-30T06:16:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,568
|
java
|
package com.sung.core.interceptor;
import org.apache.ibatis.executor.resultset.ResultSetHandler;
import org.apache.ibatis.plugin.*;
import java.sql.Statement;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* MyBatis Map类型大写下划线Key转小写驼峰形式
* 改为拦截ResultSetHandler,更简单的,而且可以避免一级缓存导致重复转换出错
* Created by sungang on 2016/7/4.
*/
@Intercepts(
@Signature(type = ResultSetHandler.class, method = "handleResultSets", args = {Statement.class})
)
public class CameHumpInterceptor implements Interceptor {
@Override
public Object intercept(Invocation invocation) throws Throwable {
//先执行,后处理
List<Object> list = (List<Object>) invocation.proceed();
for (Object object : list) {
if (object instanceof Map) {
processMap((Map) object);
} else {
break;
}
}
return list;
}
/**
* 处理简单对象
* @param map
*/
private void processMap(Map map) {
Map cameHumpMap = new HashMap();
Iterator<Map.Entry> iterator = map.entrySet().iterator();
while (iterator.hasNext()) {
Map.Entry entry = iterator.next();
String key = (String) entry.getKey();
String cameHumpKey = underlineToCamelhump(key.toLowerCase());
if (!key.equals(cameHumpKey)) {
cameHumpMap.put(cameHumpKey, entry.getValue());
iterator.remove();
}
}
map.putAll(cameHumpMap);
}
/**
* 将下划线风格替换为驼峰风格
* @param str
* @return
*/
public static String underlineToCamelhump(String str) {
Matcher matcher = Pattern.compile("_[a-z]").matcher(str);
StringBuilder builder = new StringBuilder(str);
for (int i = 0; matcher.find(); i++) {
builder.replace(matcher.start() - i, matcher.end() - i, matcher.group().substring(1).toUpperCase());
}
if (Character.isUpperCase(builder.charAt(0))) {
builder.replace(0, 1, String.valueOf(Character.toLowerCase(builder.charAt(0))));
}
return builder.toString();
}
@Override
public Object plugin(Object target) {
if (target instanceof ResultSetHandler) {
return Plugin.wrap(target, this);
}
return target;
}
@Override
public void setProperties(Properties properties) {
}
}
|
[
"1120sungang@gmail.com"
] |
1120sungang@gmail.com
|
3a4ed7267542b983ffbe330cd645584f2d5faa62
|
5120b826c0b659cc609e7cecdf9718aba243dfb0
|
/platform_only_recipe/hybris/bin/platform/ext/platformservices/src/de/hybris/platform/order/impl/DefaultAbstractOrderEntryService.java
|
423a0284709950316714b7c1183d16d3135ce906
|
[] |
no_license
|
miztli/hybris
|
8447c85555676742b524aee901a5f559189a469a
|
ff84a5089a0d99899672e60c3a60436ab8bf7554
|
refs/heads/master
| 2022-10-26T07:21:44.657487
| 2019-05-28T20:30:10
| 2019-05-28T20:30:10
| 186,463,896
| 1
| 0
| null | 2022-09-16T18:38:27
| 2019-05-13T17:13:05
|
Java
|
UTF-8
|
Java
| false
| false
| 6,568
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with SAP.
*/
package de.hybris.platform.order.impl;
import static de.hybris.platform.servicelayer.util.ServicesUtil.validateParameterNotNullStandardMessage;
import de.hybris.platform.core.model.order.AbstractOrderEntryModel;
import de.hybris.platform.core.model.order.AbstractOrderModel;
import de.hybris.platform.core.model.type.ComposedTypeModel;
import de.hybris.platform.order.AbstractOrderEntryService;
import de.hybris.platform.order.AbstractOrderEntryTypeService;
import de.hybris.platform.servicelayer.internal.service.AbstractBusinessService;
import de.hybris.platform.servicelayer.util.ServicesUtil;
import de.hybris.platform.util.DiscountValue;
import de.hybris.platform.util.TaxValue;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Required;
/**
* Default implementation of {@link AbstractOrderEntryService}. Provides implementation on
* {@link AbstractOrderEntryModel} type level.
*/
public class DefaultAbstractOrderEntryService<T extends AbstractOrderEntryModel> extends AbstractBusinessService implements
AbstractOrderEntryService<T>
{
private static final Logger LOG = Logger.getLogger(DefaultAbstractOrderEntryService.class);
//Resources
protected AbstractOrderEntryTypeService abstractOrderEntryTypeService;
@Override
public T createEntry(final AbstractOrderModel order)
{
validateParameterNotNullStandardMessage("order", order);
final ComposedTypeModel entryComposedType = abstractOrderEntryTypeService.getAbstractOrderEntryType(order);
return (T) createEntry(entryComposedType, order);
}
@Override
public AbstractOrderEntryModel createEntry(final ComposedTypeModel entryType, final AbstractOrderModel order)
{
validateParameterNotNullStandardMessage("entryType", entryType);
validateParameterNotNullStandardMessage("order", order);
final Class orderEntryClass = abstractOrderEntryTypeService.getAbstractOrderEntryClassForType(entryType);
final AbstractOrderEntryModel entryModel = getModelService().create(orderEntryClass);
entryModel.setOrder(order);
return entryModel;
}
@Override
public void addDiscountValue(final T entry, final DiscountValue discountValue)
{
ServicesUtil.validateParameterNotNullStandardMessage("discountValue", discountValue);
addAllDiscountValues(entry, Collections.singletonList(discountValue));
}
@Override
public void addTaxValue(final T entry, final TaxValue taxValue)
{
ServicesUtil.validateParameterNotNullStandardMessage("taxValue", taxValue);
addAllTaxValues(entry, Collections.singletonList(taxValue));
}
@Override
public void addAllDiscountValues(final T entry, final List<DiscountValue> discountValues)
{
ServicesUtil.validateParameterNotNullStandardMessage("entry", entry);
ServicesUtil.validateParameterNotNullStandardMessage("discountValues", discountValues);
final List<DiscountValue> currentDiscountValues = entry.getDiscountValues();
final List<DiscountValue> entryDiscounts = currentDiscountValues == null ? new ArrayList<DiscountValue>()
: new ArrayList<DiscountValue>(currentDiscountValues);
entryDiscounts.addAll(discountValues);
entry.setDiscountValues(entryDiscounts);
}
@Override
public void addAllTaxValues(final T entry, final List<TaxValue> taxValues)
{
ServicesUtil.validateParameterNotNullStandardMessage("entry", entry);
ServicesUtil.validateParameterNotNullStandardMessage("taxValues", taxValues);
final Collection<TaxValue> currentTaxValues = entry.getTaxValues();
final List<TaxValue> entryTaxes = currentTaxValues == null ? new ArrayList<TaxValue>() : new ArrayList<TaxValue>(
currentTaxValues);
entryTaxes.addAll(taxValues);
entry.setTaxValues(entryTaxes);
}
@Override
public void removeDiscountValue(final T entry, final DiscountValue discountValue)
{
ServicesUtil.validateParameterNotNullStandardMessage("entry", entry);
ServicesUtil.validateParameterNotNullStandardMessage("discountValue", discountValue);
final List<DiscountValue> entryDiscounts = new ArrayList<DiscountValue>(entry.getDiscountValues());
if (!entryDiscounts.contains(discountValue))
{
LOG.warn("Entry no " + entry.getEntryNumber() + " from order [" + entry.getOrder().getCode()
+ "] doesn't contain discount value (" + discountValue.getCode() + ").. skipping!");
return;
}
entryDiscounts.remove(discountValue);
entry.setDiscountValues(entryDiscounts);
}
@Override
public void removeTaxValue(final T entry, final TaxValue taxValue)
{
ServicesUtil.validateParameterNotNullStandardMessage("entry", entry);
ServicesUtil.validateParameterNotNullStandardMessage("taxValue", taxValue);
final List<TaxValue> entryTaxes = new ArrayList<TaxValue>(entry.getTaxValues());
if (!entryTaxes.contains(taxValue))
{
LOG.warn("Entry no " + entry.getEntryNumber() + " from order [" + entry.getOrder().getCode()
+ "] doesn't contain tax value (" + taxValue.getCode() + ").. skipping!");
return;
}
entryTaxes.remove(taxValue);
entry.setTaxValues(entryTaxes);
}
@Required
public void setAbstractOrderEntryTypeService(final AbstractOrderEntryTypeService abstractOrderEntryTypeService)
{
this.abstractOrderEntryTypeService = abstractOrderEntryTypeService;
}
@Override
public DiscountValue getGlobalDiscountValue(final T entry, final DiscountValue discountValue)
{
ServicesUtil.validateParameterNotNullStandardMessage("entry", entry);
ServicesUtil.validateParameterNotNullStandardMessage("discountValue", discountValue);
final List<DiscountValue> entryDiscounts = new ArrayList<DiscountValue>(entry.getDiscountValues());
for (final DiscountValue discount : entryDiscounts)
{
if (discount.equalsIgnoreAppliedValue(discountValue))
{
return discount;
}
}
LOG.warn("Entry no " + entry.getEntryNumber() + " from order [" + entry.getOrder().getCode()
+ "] doesn't contain discount value (" + discountValue.getCode() + ").. skipping!");
return null;
}
}
|
[
"miztlimelgoza@miztlis-MacBook-Pro.local"
] |
miztlimelgoza@miztlis-MacBook-Pro.local
|
627bebf2aeb9882cc9d84aed180876d88f1cea49
|
ed1567ed5a9b2be7c7496696414c9ac01829aac3
|
/lib-rxjava/rxjava/src/main/java/com/example/rxjava/functions/Function.java
|
046500b65628bb1236276299c3e69037002fcd4e
|
[] |
no_license
|
chenliguan/CodeLibs
|
0df9a771053bfbba6cb6deb19839a3aae2d2a754
|
e5ad84360f85701a76fbb2c00f937f056952ba4c
|
refs/heads/master
| 2021-06-01T20:22:05.383373
| 2020-09-23T13:07:51
| 2020-09-23T13:07:51
| 105,960,012
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 474
|
java
|
package com.example.rxjava.functions;
import android.support.annotation.NonNull;
/**
* 一个函数接口,它接受一个值并返回另一个值,可能带有一个不同的类型,允许抛出一个选中的异常
*/
public interface Function<T, R> {
/**
* 对输入值应用一些计算并返回一些其他值。
*
* @param t 输入值
* @返回 输出值
* @抛出 异常错误
*/
R apply(@NonNull T t) throws Exception;
}
|
[
"1130314814@qq.com"
] |
1130314814@qq.com
|
69856a5cc589a11824dd509d2aae65a35416f394
|
60563395b404723b1263bf7abc59ea1612dcab35
|
/greenhouse/src/main/java/com/springsource/greenhouse/connect/providers/FacebookServiceProvider.java
|
9df9b34fd5e608ea1f20d5e5aad5638d4b846e92
|
[
"Apache-2.0"
] |
permissive
|
jayailluminated/Study
|
afc58f7715434ece86e9fab226974cba6525401a
|
6d078c8815f2f54ec5e51ca19dbe1ea128a0d989
|
refs/heads/master
| 2020-04-06T09:35:35.596588
| 2012-02-05T12:25:26
| 2012-02-05T12:25:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,937
|
java
|
/*
* Copyright 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 com.springsource.greenhouse.connect.providers;
import org.springframework.social.facebook.FacebookOperations;
import org.springframework.social.facebook.FacebookTemplate;
import com.springsource.greenhouse.connect.AbstractServiceProvider;
import com.springsource.greenhouse.connect.AccountConnectionRepository;
import com.springsource.greenhouse.connect.ServiceProviderParameters;
import com.springsource.greenhouse.connect.OAuthToken;
/**
* Facebook ServiceProvider implementation.
* @author Keith Donald
*/
public final class FacebookServiceProvider extends AbstractServiceProvider<FacebookOperations> {
public FacebookServiceProvider(ServiceProviderParameters parameters, AccountConnectionRepository connectionRepository) {
super(parameters, connectionRepository);
}
protected FacebookOperations createServiceOperations(OAuthToken accessToken) {
if (accessToken == null) {
throw new IllegalStateException("Cannot access Facebook without an access token");
}
return new FacebookTemplate(accessToken.getValue());
}
protected String fetchProviderAccountId(FacebookOperations facebook) {
return facebook.getProfileId();
}
protected String buildProviderProfileUrl(String facebookId, FacebookOperations facebook) {
return "http://www.facebook.com/profile.php?id=" + facebookId;
}
}
|
[
"moretajoo@gmail.com"
] |
moretajoo@gmail.com
|
1e56ffea53544d7b1b4e551c5ee08522d35290cc
|
c66b5179a75c8ff48e59bc7fd5e7748bb97f4c67
|
/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/codesystems/ConditionCategoryEnumFactory.java
|
f90d51320cee606a368947581e736cdbf90b619e
|
[
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
hareemmughis/hapi-fhir
|
b0aa6e31cc1766f91b6b14f2cc4f6828c09b720d
|
06f9d86bf1ff0aa4c630aaaf9049ee7a73482c27
|
refs/heads/master
| 2023-08-29T13:46:32.756125
| 2017-01-19T03:26:10
| 2017-01-19T03:26:10
| 79,456,893
| 0
| 0
|
Apache-2.0
| 2022-10-20T07:50:11
| 2017-01-19T13:40:24
|
Java
|
UTF-8
|
Java
| false
| false
| 2,651
|
java
|
package org.hl7.fhir.dstu3.model.codesystems;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Tue, Dec 6, 2016 09:42-0500 for FHIR v1.8.0
import org.hl7.fhir.dstu3.model.EnumFactory;
public class ConditionCategoryEnumFactory implements EnumFactory<ConditionCategory> {
public ConditionCategory fromCode(String codeString) throws IllegalArgumentException {
if (codeString == null || "".equals(codeString))
return null;
if ("problem-list-item".equals(codeString))
return ConditionCategory.PROBLEMLISTITEM;
if ("encounter-diagnosis".equals(codeString))
return ConditionCategory.ENCOUNTERDIAGNOSIS;
throw new IllegalArgumentException("Unknown ConditionCategory code '"+codeString+"'");
}
public String toCode(ConditionCategory code) {
if (code == ConditionCategory.PROBLEMLISTITEM)
return "problem-list-item";
if (code == ConditionCategory.ENCOUNTERDIAGNOSIS)
return "encounter-diagnosis";
return "?";
}
public String toSystem(ConditionCategory code) {
return code.getSystem();
}
}
|
[
"jamesagnew@gmail.com"
] |
jamesagnew@gmail.com
|
0bf45f717b72d4716cea563244b8192b76009ec8
|
05e6dd5f5701dc05ea18c9d4ad97a69df15cc8bb
|
/03/coffeeliu-boot-config-yml/src/main/java/com/coffee/controller/configcontroller.java
|
ddd40545510951b4b8ad2c613b2c4f7f9062892b
|
[] |
no_license
|
coffeeliuwei/boot
|
02f68d744bc6b25e0d747899de7459769cc56d42
|
41aeb06b4bc71bf3e31bb3b13eaee29709c40d43
|
refs/heads/master
| 2022-06-22T21:48:41.370973
| 2020-05-05T17:26:30
| 2020-05-05T17:26:30
| 255,567,200
| 0
| 0
| null | 2022-06-17T03:28:13
| 2020-04-14T09:33:32
|
Java
|
UTF-8
|
Java
| false
| false
| 417
|
java
|
package com.coffee.controller;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class configcontroller {
@Value("${coffee.msg}")
private String msg;
@GetMapping("msg")
public String getMsg() {
return msg;
}
}
|
[
"394776565@qq.com"
] |
394776565@qq.com
|
2687fb7577d664b89bdd47c6e3212357b9e1491d
|
8b9190a8c5855d5753eb8ba7003e1db875f5d28f
|
/sources/com/google/android/gms/internal/vision/zzhp.java
|
a7c0bdcb72d325a4fb6458bb44aa7a5b645ccff6
|
[] |
no_license
|
stevehav/iowa-caucus-app
|
6aeb7de7487bd800f69cb0b51cc901f79bd4666b
|
e3c7eb39de0be6bbfa8b6b063aaa85dcbcee9044
|
refs/heads/master
| 2020-12-29T10:25:28.354117
| 2020-02-05T23:15:52
| 2020-02-05T23:15:52
| 238,565,283
| 21
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 546
|
java
|
package com.google.android.gms.internal.vision;
final class zzhp {
private static final zzhn zzzu = zzgk();
private static final zzhn zzzv = new zzho();
static zzhn zzgi() {
return zzzu;
}
static zzhn zzgj() {
return zzzv;
}
private static zzhn zzgk() {
try {
return (zzhn) Class.forName("com.google.protobuf.NewInstanceSchemaFull").getDeclaredConstructor(new Class[0]).newInstance(new Object[0]);
} catch (Exception unused) {
return null;
}
}
}
|
[
"steve@havelka.co"
] |
steve@havelka.co
|
cee23b712942b89721a6e4207439054a539e34fd
|
92f2df2289eb55810bccb30ea0b29ca3fbc84e79
|
/BoosterCodeGenerator/src/main/java/com/hexacta/booster/codegeneration/service/spring/SpringAbstractServiceJUnit3TestGenerator.java
|
233e01e978cf6883b5f7b2c2aa20d54db5c3b558
|
[] |
no_license
|
ltenconi/hexacta-booster
|
b47fb01bee57cbd9c2041fd50b83e915293d41b4
|
c130039f2b669c092ce97864b926916bce6e146d
|
refs/heads/master
| 2021-05-09T02:14:33.793234
| 2018-02-20T15:43:13
| 2018-02-20T15:43:13
| 119,201,384
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,279
|
java
|
package com.hexacta.booster.codegeneration.service.spring;
import java.util.HashMap;
import java.util.Map;
import com.hexacta.booster.codegeneration.TemplatesNames;
import com.hexacta.booster.codegeneration.TextFile;
import com.hexacta.booster.codegeneration.configuration.CodeGeneratorConfiguration;
import com.hexacta.booster.codegeneration.template.IMetaTemplateEngine;
import com.hexacta.booster.codegeneration.template.MetaTemplateGeneration;
import com.hexacta.booster.codegeneration.template.MetaTemplateSystem;
import com.hexacta.booster.codegeneration.template.model.MetaTemplate;
import com.hexacta.booster.codegeneration.template.model.MetaVariable;
import com.hexacta.booster.utilities.PackageNameBuilder;
import com.hexacta.booster.utilities.PathBuilder;
/**
* This class generates a fix AbstractServiceTest that is the superclass of all
* JUnit3 service tests.
*
* @author vmartz
*
*/
public class SpringAbstractServiceJUnit3TestGenerator {
/**
* @param groupId
* @param codeGeneratorConfiguration
* @param generationInfo
* @return
* @throws Exception
*/
public TextFile generate(final String groupId, final CodeGeneratorConfiguration codeGeneratorConfiguration)
throws Exception {
MetaTemplate abstractServiceTemplate = (MetaTemplate) MetaTemplateSystem.get(TemplatesNames
.getName("ABSTRACT_SERVICE_TEST"));
Map<MetaVariable, Object> metaVariablesValue = new HashMap<MetaVariable, Object>();
String serviceTestPackage = PackageNameBuilder.buildForAbstractServiceTest(codeGeneratorConfiguration);
metaVariablesValue.put(new MetaVariable("serviceTestPackage"), serviceTestPackage);
MetaTemplateGeneration metaTemplateGeneration = new MetaTemplateGeneration(abstractServiceTemplate,
metaVariablesValue);
IMetaTemplateEngine metaTemplateEngine = MetaTemplateSystem.getMetaTemplateEngine();
String abstractServiceText = metaTemplateEngine.merge(metaTemplateGeneration);
String name = "AbstractServiceTest.java";
String path = PathBuilder.buildForAbstractServiceTest(groupId, codeGeneratorConfiguration.getDirectoryInfo());
return new TextFile(abstractServiceText, name, path);
}
}
|
[
"ltenconi@gmail.com"
] |
ltenconi@gmail.com
|
5239a5d5f124f138fe2e6121b4bf13de323615ba
|
f7a25da32609d722b7ac9220bf4694aa0476f7b2
|
/net/minecraft/network/protocol/login/ClientboundLoginCompressionPacket.java
|
984fb06066a7ba7e401286815fd0f32467c30a67
|
[] |
no_license
|
basaigh/temp
|
89e673227e951a7c282c50cce72236bdce4870dd
|
1c3091333f4edb2be6d986faaa026826b05008ab
|
refs/heads/master
| 2023-05-04T22:27:28.259481
| 2021-05-31T17:15:09
| 2021-05-31T17:15:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 996
|
java
|
package net.minecraft.network.protocol.login;
import net.minecraft.network.PacketListener;
import java.io.IOException;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.network.protocol.Packet;
public class ClientboundLoginCompressionPacket implements Packet<ClientLoginPacketListener> {
private int compressionThreshold;
public ClientboundLoginCompressionPacket() {
}
public ClientboundLoginCompressionPacket(final int integer) {
this.compressionThreshold = integer;
}
public void read(final FriendlyByteBuf je) throws IOException {
this.compressionThreshold = je.readVarInt();
}
public void write(final FriendlyByteBuf je) throws IOException {
je.writeVarInt(this.compressionThreshold);
}
public void handle(final ClientLoginPacketListener pq) {
pq.handleCompression(this);
}
public int getCompressionThreshold() {
return this.compressionThreshold;
}
}
|
[
"mark70326511@gmail.com"
] |
mark70326511@gmail.com
|
158ebcbb22c11d7a6116306f303b09f1ba9c7f6a
|
b88d464a6ea148a05d1193b41fa66aa3eb7e0108
|
/src/main/java/com/easylinker/iot/v2/configure/security/RequestUsernamePasswordBean.java
|
38961f88e86a7308acf138be55c7c894a67a3d7e
|
[] |
no_license
|
zhy0313/easylinker2
|
1d6a4ce8f7fb665b08d55dba6fed00b5bcaa8320
|
cc5e830182c0208fab6aa2204815c797414788d8
|
refs/heads/master
| 2021-09-01T06:54:14.244111
| 2017-12-25T14:04:44
| 2017-12-25T14:04:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,267
|
java
|
package com.easylinker.iot.v2.configure.security;
import com.alibaba.fastjson.JSONObject;
import javax.servlet.http.HttpServletRequest;
import java.io.BufferedReader;
import java.io.InputStreamReader;
/**
* 把认证时 ,提交的JSON ,封装成了一个类
* 默认包含了 用户名 密码 验证码
*/
public class RequestUsernamePasswordBean {
public static final String USERNAME_PARAM = "username";
public static final String PASSWORD_PARAM = "password";
public static final String CHECK_CODE_PARAM = "check_code";
private String username;
private String password;
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 RequestUsernamePasswordBean(HttpServletRequest httpServletRequest) {
try {
BufferedReader bufferedReader = new BufferedReader(
new BufferedReader(
new InputStreamReader(httpServletRequest.getInputStream())));
if (httpServletRequest.getMethod().equals("POST")) {
String tempLine = "";
StringBuffer jsonStringBuffer = new StringBuffer();
while ((tempLine = bufferedReader.readLine()) != null) {
jsonStringBuffer.append(tempLine);
}
JSONObject jsonObject = JSONObject.parseObject(jsonStringBuffer.toString());
String username = jsonObject.get(USERNAME_PARAM).toString();
String password = jsonObject.get(PASSWORD_PARAM).toString();
if (username == null) {
username = "";
}
if (password == null) {
password = "";
}
this.setUsername(username);
this.setPassword(password);
} else {
System.err.println("Only POST method can be support REST!");
}
} catch (Exception e) {
System.err.println("RequestBean param error!");
}
}
}
|
[
"751957846@qq.com"
] |
751957846@qq.com
|
357ca6c100ac830d713566d8936421e828147671
|
b765ff986f0cd8ae206fde13105321838e246a0a
|
/Inspect/app/src/main/java/com/growingio_rewriter/a/a/h/n.java
|
12b1312114da91d8884c537bda4b87b7fe3745c3
|
[] |
no_license
|
piece-the-world/inspect
|
fe3036409b20ba66343815c3c5c9f4b0b768c355
|
a660dd65d7f40501d95429f8d2b126bd8f59b8db
|
refs/heads/master
| 2020-11-29T15:28:39.406874
| 2016-10-09T06:24:32
| 2016-10-09T06:24:32
| 66,539,462
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 737
|
java
|
/*
* Decompiled with CFR 0_115.
*/
package com.growingio.a.a.h;
import com.growingio.a.a.h.m;
import com.growingio.a.a.h.o;
import com.growingio.a.a.h.p;
abstract class n
extends Enum<n>
implements m {
public static final /* enum */ n a = new o("MURMUR128_MITZ_32", 0);
public static final /* enum */ n b = new p("MURMUR128_MITZ_64", 1);
private static final /* synthetic */ n[] c;
public static n[] a() {
return (n[])c.clone();
}
public static n a(String string) {
return (n)Enum.valueOf(n.class, string);
}
private n() {
super(string, n2);
}
/* synthetic */ n(String string, int n2, o o2) {
this();
}
static {
c = new n[]{a, b};
}
}
|
[
"taochao@corp.netease.com"
] |
taochao@corp.netease.com
|
4780e8aed24018c76a9417632cc2bb65172bdae0
|
7b82d70ba5fef677d83879dfeab859d17f4809aa
|
/tmp/sys/Java-Design-Pattern/src/main/java/cn/kiwipeach/design/create/builder/entity/Product.java
|
db687efd40d3565105466590a0f5dcb927a619e4
|
[
"Apache-2.0"
] |
permissive
|
apollowesley/jun_test
|
fb962a28b6384c4097c7a8087a53878188db2ebc
|
c7a4600c3f0e1b045280eaf3464b64e908d2f0a2
|
refs/heads/main
| 2022-12-30T20:47:36.637165
| 2020-10-13T18:10:46
| 2020-10-13T18:10:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,343
|
java
|
/**
* Copyright 2017 KiWiPeach
* <p>
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
*/
package cn.kiwipeach.design.create.builder.entity;
/**
* Create Date: 2017/11/25
* Description: 变形金刚对象
* @author kiwipeach [1099501218@qq.com]
*/
public class Product {
private String name;
private ProductHead productHead;
private ProductBody productBody;
private ProductFoot productFoot;
public Product(String name) {
this.name = name;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public ProductHead getProductHead() {
return productHead;
}
public void setProductHead(ProductHead productHead) {
this.productHead = productHead;
}
public ProductBody getProductBody() {
return productBody;
}
public void setProductBody(ProductBody productBody) {
this.productBody = productBody;
}
public ProductFoot getProductFoot() {
return productFoot;
}
public void setProductFoot(ProductFoot productFoot) {
this.productFoot = productFoot;
}
}
|
[
"wujun728@hotmail.com"
] |
wujun728@hotmail.com
|
f9ca9ba405898a7eb267979182518801d91714e2
|
952789d549bf98b84ffc02cb895f38c95b85e12c
|
/V_2.x/Server/tags/SpagoBI-2.1.0(20090316)/SpagoBIProject/src/it/eng/spagobi/engines/dossier/bo/DossierBinaryContentsTemp.java
|
1ff35ef9800ff6a0131e441b893f1464d29b1575
|
[] |
no_license
|
emtee40/testingazuan
|
de6342378258fcd4e7cbb3133bb7eed0ebfebeee
|
f3bd91014e1b43f2538194a5eb4e92081d2ac3ae
|
refs/heads/master
| 2020-03-26T08:42:50.873491
| 2015-01-09T16:17:08
| 2015-01-09T16:17:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,991
|
java
|
/**
SpagoBI - The Business Intelligence Free Platform
Copyright (C) 2005-2008 Engineering Ingegneria Informatica S.p.A.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
**/
package it.eng.spagobi.engines.dossier.bo;
import java.util.Date;
/**
*
* @author Zerbetto (davide.zerbetto@eng.it)
*
*/
public class DossierBinaryContentsTemp {
private Integer binId;
private Integer dossierPartsTempId;
private String name;
private byte[] content;
private String type;
private Date creationDate;
/**
* Gets the bin id.
*
* @return the bin id
*/
public Integer getBinId() {
return binId;
}
/**
* Sets the bin id.
*
* @param binId the new bin id
*/
public void setBinId(Integer binId) {
this.binId = binId;
}
/**
* Gets the dossier parts temp id.
*
* @return the dossier parts temp id
*/
public Integer getDossierPartsTempId() {
return dossierPartsTempId;
}
/**
* Sets the dossier parts temp id.
*
* @param dossierPartsTempId the new dossier parts temp id
*/
public void setDossierPartsTempId(Integer dossierPartsTempId) {
this.dossierPartsTempId = dossierPartsTempId;
}
/**
* Gets the content.
*
* @return the content
*/
public byte[] getContent() {
return content;
}
/**
* Sets the content.
*
* @param content the new content
*/
public void setContent(byte[] content) {
this.content = content;
}
/**
* Gets the type.
*
* @return the type
*/
public String getType() {
return type;
}
/**
* Sets the type.
*
* @param type the new type
*/
public void setType(String type) {
this.type = type;
}
/**
* Gets the creation date.
*
* @return the creation date
*/
public Date getCreationDate() {
return creationDate;
}
/**
* Sets the creation date.
*
* @param creationDate the new creation date
*/
public void setCreationDate(Date creationDate) {
this.creationDate = creationDate;
}
/**
* Gets the name.
*
* @return the name
*/
public String getName() {
return name;
}
/**
* Sets the name.
*
* @param name the new name
*/
public void setName(String name) {
this.name = name;
}
}
|
[
"zerbetto@99afaf0d-6903-0410-885a-c66a8bbb5f81"
] |
zerbetto@99afaf0d-6903-0410-885a-c66a8bbb5f81
|
cf4507c551e728310cece5734b40306362b438f1
|
ba0711218d81b2049d121d519e0a4115b32a46ea
|
/src/main/java/com/github/bingoohuang/mallscanner/domain/ChinaId.java
|
0696cf1597721d2592991d2137c2a63a7cc012ea
|
[
"Apache-2.0"
] |
permissive
|
wuce7758/mall-scanner-service
|
5aba8e08b9dccf86bc0793aa4449595bf9594c8a
|
99c3b0168d6bc3b349eb157bc6531a707bed04e3
|
refs/heads/master
| 2020-06-29T13:30:17.979628
| 2016-05-31T01:51:53
| 2016-05-31T01:51:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,176
|
java
|
package com.github.bingoohuang.mallscanner.domain;
public class ChinaId {
private int state;
private String message;
private String name; // 姓名
private String num; // 公民身份号码
private String address; // 住址
private String startDate; // 有效期限, 例如20151103
private String endDate; // 有效期限, 例如20351103
public int getState() {
return state;
}
public void setState(int state) {
this.state = state;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getNum() {
return num;
}
public void setNum(String num) {
this.num = num;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getStartDate() {
return startDate;
}
public void setStartDate(String startDate) {
this.startDate = startDate;
}
public String getEndDate() {
return endDate;
}
public void setEndDate(String endDate) {
this.endDate = endDate;
}
public static ChinaId newChinaId(int state, String message) {
ChinaId chinaId = new ChinaId();
chinaId.setState(state);
chinaId.setMessage(message);
return chinaId;
}
public static ChinaId newChinaIdBack(String startDate, String endDate) {
ChinaId chinaId = new ChinaId();
chinaId.setState(0);
chinaId.setMessage("OK");
chinaId.setStartDate(startDate);
chinaId.setEndDate(endDate);
return chinaId;
}
public static ChinaId newChinaIdFace(String name, String num, String address) {
ChinaId chinaId = new ChinaId();
chinaId.setState(0);
chinaId.setMessage("OK");
chinaId.setName(name);
chinaId.setNum(num);
chinaId.setAddress(address);
return chinaId;
}
}
|
[
"bingoo.huang@gmail.com"
] |
bingoo.huang@gmail.com
|
f749a6a0ec0ec1f157b8878d18c9d0ae14a41429
|
fc6c869ee0228497e41bf357e2803713cdaed63e
|
/weixin6519android1140/src/sourcecode/com/tencent/mm/plugin/wallet_core/ui/view/SwitchPhoneItemGroupView.java
|
92d9c5260f2ff6805273937dccd3b14c1d92dd0f
|
[] |
no_license
|
hyb1234hi/reverse-wechat
|
cbd26658a667b0c498d2a26a403f93dbeb270b72
|
75d3fd35a2c8a0469dbb057cd16bca3b26c7e736
|
refs/heads/master
| 2020-09-26T10:12:47.484174
| 2017-11-16T06:54:20
| 2017-11-16T06:54:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,120
|
java
|
package com.tencent.mm.plugin.wallet_core.ui.view;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.LinearLayout;
import com.tencent.gmtrace.GMTrace;
import com.tencent.mm.plugin.wxpay.a.h;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class SwitchPhoneItemGroupView
extends LinearLayout
{
List<SwitchPhoneItemView> rqt;
public a rqu;
private View.OnClickListener rqv;
public SwitchPhoneItemGroupView(Context paramContext, AttributeSet paramAttributeSet)
{
super(paramContext, paramAttributeSet);
GMTrace.i(6967644913664L, 51913);
this.rqt = new ArrayList();
this.rqv = new View.OnClickListener()
{
public final void onClick(View paramAnonymousView)
{
GMTrace.i(6966302736384L, 51903);
Iterator localIterator = SwitchPhoneItemGroupView.this.rqt.iterator();
while (localIterator.hasNext()) {
((SwitchPhoneItemView)localIterator.next()).rqz.setImageResource(a.h.cOu);
}
((SwitchPhoneItemView)paramAnonymousView).rqz.setImageResource(a.h.cOv);
if (SwitchPhoneItemGroupView.a(SwitchPhoneItemGroupView.this) != null) {
SwitchPhoneItemGroupView.a(SwitchPhoneItemGroupView.this).cO(paramAnonymousView);
}
GMTrace.o(6966302736384L, 51903);
}
};
GMTrace.o(6967644913664L, 51913);
}
public SwitchPhoneItemGroupView(Context paramContext, AttributeSet paramAttributeSet, int paramInt)
{
super(paramContext, paramAttributeSet, paramInt);
GMTrace.i(6967779131392L, 51914);
this.rqt = new ArrayList();
this.rqv = new View.OnClickListener()
{
public final void onClick(View paramAnonymousView)
{
GMTrace.i(6966302736384L, 51903);
Iterator localIterator = SwitchPhoneItemGroupView.this.rqt.iterator();
while (localIterator.hasNext()) {
((SwitchPhoneItemView)localIterator.next()).rqz.setImageResource(a.h.cOu);
}
((SwitchPhoneItemView)paramAnonymousView).rqz.setImageResource(a.h.cOv);
if (SwitchPhoneItemGroupView.a(SwitchPhoneItemGroupView.this) != null) {
SwitchPhoneItemGroupView.a(SwitchPhoneItemGroupView.this).cO(paramAnonymousView);
}
GMTrace.o(6966302736384L, 51903);
}
};
GMTrace.o(6967779131392L, 51914);
}
public final void a(SwitchPhoneItemView paramSwitchPhoneItemView, int paramInt)
{
GMTrace.i(6967913349120L, 51915);
addView(paramSwitchPhoneItemView, paramInt);
this.rqt.add(paramSwitchPhoneItemView);
paramSwitchPhoneItemView.setOnClickListener(this.rqv);
GMTrace.o(6967913349120L, 51915);
}
public static abstract interface a
{
public abstract void cO(View paramView);
}
}
/* Location: D:\tools\apktool\weixin6519android1140\jar\classes2-dex2jar.jar!\com\tencent\mm\plugin\wallet_core\ui\view\SwitchPhoneItemGroupView.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"robert0825@gmail.com"
] |
robert0825@gmail.com
|
2d4de3ce2ad8fe0c92366f42d1dbd62c4fb16567
|
3d9592eaa5a8cc1da686caa98b4cbdbaf9cb5d52
|
/code/java-basic/src/kr/ac/kopo/day11/cast/CastMain02.java
|
7a1e95fc86bdd533fef36937ab229a5fce635e81
|
[] |
no_license
|
hennylee/kopo-02-java
|
a2b980c77a25527162c5d18af0cf44f074a3b591
|
0adf492c5d98af74382372236d424cbfbec60eb2
|
refs/heads/main
| 2023-06-21T05:45:40.107515
| 2021-07-28T06:31:15
| 2021-07-28T06:31:15
| 345,571,951
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 757
|
java
|
package kr.ac.kopo.day11.cast;
public class CastMain02 {
public static void print(Parent p) {
p.info();
}
public static void main(String[] args) {
// Child01 c = new Parent(); ==> 컴파일 에러
// Child01 c = (Child01) new Parent(); ==> 실행 시 예외발생
Parent p = new Child02();
p.info();
print(p);
System.out.println("--------------------------------------------------------------");
Child01 c01 = new Child01();
print(c01);
System.out.println("--------------------------------------------------------------");
// 만약 Child02만 가지고 있는 메소드를 실행시키고 싶을 때, 명시적 형변환을 한다.
Child02 c = (Child02) p;
c.sing();
c.play();
print(c);
}
}
|
[
"haenyilee@kakao.com"
] |
haenyilee@kakao.com
|
a18bf776d212e90b47272fbbc0b80b106cba0436
|
2f285a5f935a6c38c2fd3835ff0d30eb28b62cac
|
/src/test/java/com/itheima11/gyl/business/xsgl/XsysdTest.java
|
71ca80a444829fe2e5b97c20c1394029284f1fe7
|
[] |
no_license
|
ruoshuixuelabi/heimagongyinglian
|
684cf7e6edf8ad603151a920f6aa247d48be04f6
|
489ec0034b947ef1a1a584687cc032571885cc4d
|
refs/heads/master
| 2020-05-05T09:04:29.738639
| 2019-04-06T22:01:41
| 2019-04-06T22:01:41
| 179,890,037
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,443
|
java
|
package com.itheima11.gyl.business.xsgl;
import java.util.ArrayList;
import java.util.List;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.junit.Test;
import com.itheima11.gyl.business.xsgl.dao.XsddzhibDao;
import com.itheima11.gyl.business.xsgl.dao.XsddzhubDao;
import com.itheima11.gyl.business.xsgl.service.XsysdService;
import com.itheima11.gyl.domain.business.xsgl.Xsddzhub;
import com.itheima11.gyl.domain.business.xsgl.Xsysdzhib;
import com.itheima11.gyl.domain.business.xsgl.Xsysdzhub;
import com.itheima11.gyl.domain.business.xsgl.Xsddzhib;
import com.itheima11.gyl.test.utils.SpringUtils;
public class XsysdTest extends SpringUtils{
@Test
public void testSaveXsysd(){
XsysdService xsysdService = (XsysdService)context.getBean("xsysdService");
Xsysdzhub xsysdzhub = new Xsysdzhub();
List<Xsysdzhib> xsysdzhibs = new ArrayList<Xsysdzhib>();
Xsysdzhib xsysdzhib = new Xsysdzhib();
xsysdzhib.setSl(20L);//设置实发数量
xsysdzhib.setYtdjh("201410240001");//源头单据号
xsysdzhib.setYthh(1L);//源头行号
xsysdzhibs.add(xsysdzhib);
xsysdService.saveXsysd(xsysdzhub, xsysdzhibs);
System.out.println("销售应收单子表是否关闭:"+xsysdzhib.getIsysgb());
XsddzhibDao xsddzhibDao = (XsddzhibDao)context.getBean("xsddzhibDao");
Xsddzhib xsddzhib = xsddzhibDao.getXsddzhibByCondition("201410240001", 1L);
System.out.println("销售订单子表累计发货数量:"+xsddzhib.getLjyssl());
System.out.println("是否应收关闭:"+xsddzhib.getIsskjs());
/**
* 提取销售订单主表
*/
XsddzhubDao xsddzhubDao = (XsddzhubDao)context.getBean("xsddzhubDao");
Xsddzhub xsddzhub = xsddzhubDao.getXsddzhubByDDH("201410240001");
//查看销售订单主表的状态
System.out.println(xsddzhub.getState());
}
@Test
public void testQuery(){
XsddzhibDao xsddzhibDao = (XsddzhibDao)context.getBean("xsddzhibDao");
Xsddzhib xsddzhib = xsddzhibDao.getXsddzhibByCondition("201410240001", 1L);
System.out.println(xsddzhib.getIsskjs());
}
@Test
public void testSetIsysgb(){
SessionFactory sessionFactory = (SessionFactory)context.getBean("sessionFactory");
Session session = sessionFactory.openSession();
Transaction transaction = session.beginTransaction();
Xsddzhib xsddzhib = (Xsddzhib)session.get(Xsddzhib.class, 1L);
xsddzhib.setIsskjs(false);
transaction.commit();
session.close();
}
}
|
[
"524991368@qq.com"
] |
524991368@qq.com
|
c5bd77827b844846cf6d8a30b168cb56ab6bb90e
|
973238bc7fa2f929204fbd75ee54a5aa1a34781e
|
/Nhanvien/src/DAL/DepartmentDAL.java
|
0c9d676d576d70ecdf080631f5ea0179973f27ec
|
[] |
no_license
|
nguyenvanson9x/JAVA
|
00aa60e1611a37f61be7a393f2254899367fb106
|
9b41608015cc23668f57b9cc450ad86cbcffd2b9
|
refs/heads/master
| 2021-01-20T00:20:26.286203
| 2017-05-31T14:23:52
| 2017-05-31T14:23:52
| 89,112,692
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,974
|
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 DAL;
import Entity.Deparment;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
/**
*
* @author nambh
*/
public class DepartmentDAL extends DataAccessHelper{
private final String GET_BY_ID = "select * from Department where depID =?";
private final String GET_ALL = "select * from Department";
public ArrayList<Deparment> getByID(int id){
ArrayList<Deparment> objs = new ArrayList<>();
try {
getConnect();
PreparedStatement ps = con.prepareStatement(GET_BY_ID);
ps.setInt(1, id);
ResultSet rs = ps.executeQuery();
if(rs!= null && rs.next()){
Deparment item = new Deparment();
item.setDepID(rs.getInt("depID"));
item.setDepName(rs.getString("depName"));
objs.add(item);
}
getClose();
} catch (Exception e) {
e.printStackTrace();
}
return objs;
}
public ArrayList<Deparment> getAll(){
ArrayList<Deparment> objs = new ArrayList<>();
try {
getConnect();
PreparedStatement ps = con.prepareStatement(GET_ALL);
ResultSet rs = ps.executeQuery();
if(rs!=null){
while (rs.next()) {
Deparment item = new Deparment();
item.setDepID(rs.getInt("DepID"));
item.setDepName(rs.getString("DepName"));
objs.add(item);
}
}
getClose();
} catch (Exception e) {
e.printStackTrace();
}
return objs;
}
}
|
[
"asanfc9x@gmail.com"
] |
asanfc9x@gmail.com
|
0da210a6649069cfef59fca68b79350c4920f954
|
7af41d759f0575ec9b90eb61e83a023ac40a3877
|
/src/main/java/uk/org/siri/siri_2/GeneralMessageCapabilitiesResponseStructure.java
|
97a37052cba1d3a1333f20fc4ccaf0eaaa471a3b
|
[
"MIT"
] |
permissive
|
camsys/onebusaway-siri-api-v20
|
5beb99c15b99cf270ede77cae049cd8415319f31
|
0ac892b154e138279ef3ce860b584c6a443e9e7c
|
refs/heads/master
| 2021-12-14T02:38:50.950084
| 2021-11-19T20:16:59
| 2021-11-19T20:16:59
| 29,933,328
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,988
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2014.11.22 at 01:45:09 PM EST
//
package uk.org.siri.siri_2;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
/**
* Type for Delivery for General MessageService.
*
* <p>Java class for GeneralMessageCapabilitiesResponseStructure complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="GeneralMessageCapabilitiesResponseStructure">
* <complexContent>
* <extension base="{http://www.siri.org.uk/siri}AbstractServiceCapabilitiesResponseStructure">
* <sequence>
* <element ref="{http://www.siri.org.uk/siri}GeneralMessageServiceCapabilities" minOccurs="0"/>
* <element ref="{http://www.siri.org.uk/siri}GeneralMessagePermissions" minOccurs="0"/>
* <element ref="{http://www.siri.org.uk/siri}Extensions" minOccurs="0"/>
* </sequence>
* <attribute name="version" type="{http://www.siri.org.uk/siri}VersionString" default="2.0" />
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "GeneralMessageCapabilitiesResponseStructure", propOrder = {
"generalMessageServiceCapabilities",
"generalMessagePermissions",
"extensions"
})
public class GeneralMessageCapabilitiesResponseStructure
extends AbstractServiceCapabilitiesResponseStructure
{
@XmlElement(name = "GeneralMessageServiceCapabilities")
protected GeneralMessageServiceCapabilitiesStructure generalMessageServiceCapabilities;
@XmlElement(name = "GeneralMessagePermissions")
protected GeneralMessagePermissions generalMessagePermissions;
@XmlElement(name = "Extensions")
protected ExtensionsStructure extensions;
@XmlAttribute(name = "version")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
protected String version;
/**
* Gets the value of the generalMessageServiceCapabilities property.
*
* @return
* possible object is
* {@link GeneralMessageServiceCapabilitiesStructure }
*
*/
public GeneralMessageServiceCapabilitiesStructure getGeneralMessageServiceCapabilities() {
return generalMessageServiceCapabilities;
}
/**
* Sets the value of the generalMessageServiceCapabilities property.
*
* @param value
* allowed object is
* {@link GeneralMessageServiceCapabilitiesStructure }
*
*/
public void setGeneralMessageServiceCapabilities(GeneralMessageServiceCapabilitiesStructure value) {
this.generalMessageServiceCapabilities = value;
}
/**
* Gets the value of the generalMessagePermissions property.
*
* @return
* possible object is
* {@link GeneralMessagePermissions }
*
*/
public GeneralMessagePermissions getGeneralMessagePermissions() {
return generalMessagePermissions;
}
/**
* Sets the value of the generalMessagePermissions property.
*
* @param value
* allowed object is
* {@link GeneralMessagePermissions }
*
*/
public void setGeneralMessagePermissions(GeneralMessagePermissions value) {
this.generalMessagePermissions = value;
}
/**
* Gets the value of the extensions property.
*
* @return
* possible object is
* {@link ExtensionsStructure }
*
*/
public ExtensionsStructure getExtensions() {
return extensions;
}
/**
* Sets the value of the extensions property.
*
* @param value
* allowed object is
* {@link ExtensionsStructure }
*
*/
public void setExtensions(ExtensionsStructure value) {
this.extensions = value;
}
/**
* Gets the value of the version property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getVersion() {
if (version == null) {
return "2.0";
} else {
return version;
}
}
/**
* Sets the value of the version property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setVersion(String value) {
this.version = value;
}
}
|
[
"lennycaraballo@gmail.com"
] |
lennycaraballo@gmail.com
|
9eae94a69f313f9b4d7c7fe323f33ec09b602615
|
0d4f05c9909695a166e97b8958680945ea5c1266
|
/src/minecraft/io/netty/handler/traffic/ChannelTrafficShapingHandler.java
|
201e565e8123401766643200dedb17552abc6662
|
[] |
no_license
|
MertDundar1/ETB-0.6
|
31f3f42f51064ffd7facaa95cf9b50d0c2d71995
|
145d008fed353545157cd0e73daae8bc8d7f50b9
|
refs/heads/master
| 2022-01-15T08:42:12.762634
| 2019-05-15T23:37:33
| 2019-05-15T23:37:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,844
|
java
|
package io.netty.handler.traffic;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelPromise;
import io.netty.util.concurrent.EventExecutor;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.TimeUnit;
public class ChannelTrafficShapingHandler
extends AbstractTrafficShapingHandler
{
private List<ToSend> messagesQueue = new LinkedList();
public ChannelTrafficShapingHandler(long writeLimit, long readLimit, long checkInterval, long maxTime)
{
super(writeLimit, readLimit, checkInterval, maxTime);
}
public ChannelTrafficShapingHandler(long writeLimit, long readLimit, long checkInterval)
{
super(writeLimit, readLimit, checkInterval);
}
public ChannelTrafficShapingHandler(long writeLimit, long readLimit)
{
super(writeLimit, readLimit);
}
public ChannelTrafficShapingHandler(long checkInterval)
{
super(checkInterval);
}
public void handlerAdded(ChannelHandlerContext ctx) throws Exception
{
TrafficCounter trafficCounter = new TrafficCounter(this, ctx.executor(), "ChannelTC" + ctx.channel().hashCode(), checkInterval);
setTrafficCounter(trafficCounter);
trafficCounter.start();
}
public synchronized void handlerRemoved(ChannelHandlerContext ctx) throws Exception
{
if (trafficCounter != null) {
trafficCounter.stop();
}
for (ToSend toSend : messagesQueue) {
if ((toSend instanceof ByteBuf)) {
((ByteBuf)toSend).release();
}
}
messagesQueue.clear();
}
private static final class ToSend {
final long date;
final Object toSend;
final ChannelPromise promise;
private ToSend(long delay, Object toSend, ChannelPromise promise) {
date = (System.currentTimeMillis() + delay);
this.toSend = toSend;
this.promise = promise;
}
}
protected synchronized void submitWrite(final ChannelHandlerContext ctx, Object msg, long delay, ChannelPromise promise)
{
if ((delay == 0L) && (messagesQueue.isEmpty())) {
ctx.write(msg, promise);
return;
}
ToSend newToSend = new ToSend(delay, msg, promise, null);
messagesQueue.add(newToSend);
ctx.executor().schedule(new Runnable()
{
public void run() { ChannelTrafficShapingHandler.this.sendAllValid(ctx); } }, delay, TimeUnit.MILLISECONDS);
}
private synchronized void sendAllValid(ChannelHandlerContext ctx)
{
while (!messagesQueue.isEmpty()) {
ToSend newToSend = (ToSend)messagesQueue.remove(0);
if (date <= System.currentTimeMillis()) {
ctx.write(toSend, promise);
} else {
messagesQueue.add(0, newToSend);
break;
}
}
ctx.flush();
}
}
|
[
"realhcfus@gmail.com"
] |
realhcfus@gmail.com
|
0dc990f5b896763ae7942f42a7525679aafb5c9f
|
18606c6b3f164a935e571932b3356260b493e543
|
/benchmarks/JHotDraw/Source/jhotdraw7/src/main/java/org/jhotdraw/app/action/edit/DuplicateAction.java
|
4160562c24a210454eae4b51f6de401360fe7830
|
[] |
no_license
|
jackyhaoli/abc
|
d9a3bd2d4140dd92b9f9d0814eeafa16ea7163c4
|
42071b0dcb91db28d7b7fdcffd062f567a5a1e6c
|
refs/heads/master
| 2020-04-03T09:34:47.612136
| 2019-01-11T07:16:04
| 2019-01-11T07:16:04
| 155,169,244
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,176
|
java
|
/*
* @(#)DuplicateAction.java
*
* Copyright (c) 1996-2010 by the original authors of JHotDraw
* and all its contributors.
* All rights reserved.
*
* The copyright of this software is owned by the authors and
* contributors of the JHotDraw project ("the copyright holders").
* You may not use, copy or modify this software, except in
* accordance with the license agreement you entered into with
* the copyright holders. For details see accompanying license terms.
*/
package org.jhotdraw.app.action.edit;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import org.jhotdraw.util.*;
import org.jhotdraw.gui.EditableComponent;
/**
* Duplicates the selected region.
* <p>
* This action acts on the last {@link org.jhotdraw.gui.EditableComponent} /
* {@code JTextComponent} which had the focus when the {@code ActionEvent}
* was generated.
* <p>
* This action is called when the user selects the Duplicate item in the Edit
* menu. The menu item is automatically created by the application.
* <p>
* If you want this behavior in your application, you have to create an action
* with this ID and put it in your {@code ApplicationModel} in method
* {@link org.jhotdraw.app.ApplicationModel#initApplication}.
*
* <hr>
* <b>Design Patterns</b>
*
* <p><em>Framework</em><br>
* The interfaces and classes listed below work together:
* <br>
* Contract: {@link org.jhotdraw.gui.EditableComponent}, {@code JTextComponent}.<br>
* Client: {@link org.jhotdraw.app.action.edit.AbstractSelectionAction},
* {@link org.jhotdraw.app.action.edit.DeleteAction},
* {@link org.jhotdraw.app.action.edit.DuplicateAction},
* {@link org.jhotdraw.app.action.edit.SelectAllAction},
* {@link org.jhotdraw.app.action.edit.ClearSelectionAction}.
* <hr>
*
* @author Werner Randelshofer.
* @version $Id: DuplicateAction.java 633 2010-01-22 12:07:20Z rawcoder $
*/
public class DuplicateAction extends AbstractSelectionAction {
public final static String ID = "edit.duplicate";
/** Creates a new instance which acts on the currently focused component. */
public DuplicateAction() {
this(null);
}
/** Creates a new instance which acts on the specified component.
*
* @param target The target of the action. Specify null for the currently
* focused component.
*/
public DuplicateAction(JComponent target) {
super(target);
ResourceBundleUtil labels = ResourceBundleUtil.getBundle("org.jhotdraw.app.Labels");
labels.configureAction(this, ID);
}
public void actionPerformed(ActionEvent evt) {
JComponent c = target;
if (c == null && (KeyboardFocusManager.getCurrentKeyboardFocusManager().
getPermanentFocusOwner() instanceof JComponent)) {
c = (JComponent) KeyboardFocusManager.getCurrentKeyboardFocusManager().
getPermanentFocusOwner();
}
if (c != null && c.isEnabled()) {
if (c instanceof EditableComponent) {
((EditableComponent) c).duplicate();
} else {
c.getToolkit().beep();
}
}
}
}
|
[
"xiemaisi@40514614-586c-40e6-bf05-bf7e477dc3e6"
] |
xiemaisi@40514614-586c-40e6-bf05-bf7e477dc3e6
|
95f5e462ac7aba1513715913924a1d7e4fac37f3
|
f0c83d268c9a8de1afa6fd3de6a7a8a073de0092
|
/app/src/main/java/com/art/recruitment/artperformance/ui/home/contract/RecruitmentInformaContract.java
|
cfb31844011296ea864625d414a2f4e2c82c6b86
|
[] |
no_license
|
lndlazy/artPerformance
|
e496fc942d97ef294f11461392b7ade1d11821e0
|
dd65085292baab26277db00b3c27ce2a31735312
|
refs/heads/master
| 2020-05-30T13:22:56.934130
| 2019-07-23T15:30:39
| 2019-07-23T15:30:39
| 189,757,201
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 555
|
java
|
package com.art.recruitment.artperformance.ui.home.contract;
import com.art.recruitment.artperformance.bean.home.ApplyBean;
import com.art.recruitment.artperformance.bean.home.RecruitmentInforBean;
import com.art.recruitment.common.base.BaseView;
public interface RecruitmentInformaContract extends BaseView {
/**
* 返回招募列表 bean
*
* @param bean BannerBean bean
*/
void returnRecruitInforBean(RecruitmentInforBean.DataBean bean);
/**
* 报名
*/
void returnApplyBean(ApplyBean.DataBean bean);
}
|
[
"lndlazy@163.com"
] |
lndlazy@163.com
|
105f761f25f745733e561b9b2b3cb24f190cb125
|
fee36ba1d4fd00180de95287818416f1be54aa04
|
/Spring/springFinal/src/main/java/com/khcc/myweb/model/ZipcodeBean2.java
|
20237c16049050ead714c54cb92b3abd8454b00b
|
[] |
no_license
|
JungWonHong/Spring
|
721f53f48ca1795198ae87211cee6e899e32d706
|
bfdaaeb286fb9b1770db68f5c39f5d86b19eceb6
|
refs/heads/master
| 2020-04-16T13:40:14.444198
| 2019-01-14T09:56:16
| 2019-01-14T09:56:16
| 165,637,644
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 838
|
java
|
package com.khcc.myweb.model;
public class ZipcodeBean2 {
private int no;
private String zipcode;
private String sido;
private String gugun;
private String dong;
private String bunji = "";
public int getNo() {
return no;
}
public void setNo(int no) {
this.no = no;
}
public String getZipcode() {
return zipcode;
}
public void setZipcode(String zipcode) {
this.zipcode = zipcode;
}
public String getSido() {
return sido;
}
public void setSido(String sido) {
this.sido = sido;
}
public String getGugun() {
return gugun;
}
public void setGugun(String gugun) {
this.gugun = gugun;
}
public String getDong() {
return dong;
}
public void setDong(String dong) {
this.dong = dong;
}
public String getBunji() {
return bunji;
}
public void setBunji(String bunji) {
this.bunji = bunji;
}
}
|
[
"sungwoo808@naver.com"
] |
sungwoo808@naver.com
|
c979fe0e5c2a4d719ccd006b447a61569f4b5d3b
|
b9a14875c2c2983bf940a63c66d46e9580b8eabe
|
/modules/caas/backend/src/main/java/io/cattle/iaas/healthcheck/service/impl/UpgradeCleanupMonitorImpl.java
|
622948dd3715e15e2a426b4b8eddbd8fe7e3d701
|
[
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
bartoszcisek/cattle
|
a341d93dc4feb010c9b1efe07b4ddb665f952391
|
f59058d70fdb139f9259c2e3d697c0f57b615862
|
refs/heads/master
| 2020-03-21T17:37:16.010693
| 2017-10-17T19:01:18
| 2017-10-17T19:01:18
| 138,843,076
| 0
| 0
|
Apache-2.0
| 2018-06-27T07:05:59
| 2018-06-27T07:05:58
| null |
UTF-8
|
Java
| false
| false
| 2,555
|
java
|
package io.cattle.iaas.healthcheck.service.impl;
import static io.cattle.platform.core.model.tables.InstanceTable.*;
import io.cattle.platform.archaius.util.ArchaiusUtil;
import io.cattle.platform.core.constants.CommonStatesConstants;
import io.cattle.platform.core.model.Instance;
import io.cattle.platform.core.model.tables.records.InstanceRecord;
import io.cattle.platform.db.jooq.dao.impl.AbstractJooqDao;
import io.cattle.platform.engine.process.ProcessInstanceException;
import io.cattle.platform.json.JsonMapper;
import io.cattle.platform.object.process.ObjectProcessManager;
import io.cattle.platform.task.Task;
import java.util.Date;
import java.util.List;
import org.jooq.Configuration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.netflix.config.DynamicLongProperty;
public class UpgradeCleanupMonitorImpl extends AbstractJooqDao implements Task {
private static final Logger log = LoggerFactory.getLogger(UpgradeCleanupMonitorImpl.class);
private static final DynamicLongProperty REMOVE_DELAY = ArchaiusUtil.getLong("upgrade.cleanup.after");
ObjectProcessManager objectProcessManager;
JsonMapper jsonMapper;
public UpgradeCleanupMonitorImpl(Configuration configuration, ObjectProcessManager objectProcessManager, JsonMapper jsonMapper) {
super(configuration);
this.objectProcessManager = objectProcessManager;
this.jsonMapper = jsonMapper;
}
@Override
public void run() {
List<? extends Instance> instances = create()
.select(INSTANCE.fields())
.from(INSTANCE)
.where(INSTANCE.REMOVED.isNull())
.and(INSTANCE.STATE.ne(CommonStatesConstants.REMOVING))
.and(INSTANCE.DESIRED.isFalse())
.and(INSTANCE.UPGRADE_TIME.lt(new Date(System.currentTimeMillis() - REMOVE_DELAY.get() * 1000)))
.fetchInto(InstanceRecord.class);
for (Instance instance : instances) {
try {
objectProcessManager.stopThenRemove(instance, null);
log.info("Scheduled remove for upgraded instance id [{}]", instance.getId());
} catch (ProcessInstanceException e) {
// don't error out so we have a chance to schedule remove for the rest of the instances
log.info("Failed to schedule remove for upgraded instance id [{}]", instance.getId(), e);
}
}
}
@Override
public String getName() {
return "upgrade.cleanup";
}
}
|
[
"darren@rancher.com"
] |
darren@rancher.com
|
f9fe695c3f427e4f920bce666c091fd1f2a1b0cc
|
3c4425d520faeaa78a24ade0673da6cff431671e
|
/后台调试版/src/main/java/lottery/domains/content/payment/zs/ZSDaifuQueryResult.java
|
9c51b0da639648767c2e3c162312ad1fb634fdee
|
[] |
no_license
|
yuruyigit/lotteryServer
|
de5cc848b9c7967817a33629efef4e77366b74c0
|
2cc97c54a51b9d76df145a98d72d3fe097bdd6af
|
refs/heads/master
| 2020-06-17T03:39:24.838151
| 2019-05-25T11:32:00
| 2019-05-25T11:32:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,968
|
java
|
package lottery.domains.content.payment.zs;
import com.alibaba.fastjson.annotation.JSONField;
public class ZSDaifuQueryResult
{
@JSONField(name="merchantCode")
private String merchantCode;
@JSONField(name="outOrderId")
private String outOrderId;
@JSONField(name="orderId")
private String orderId;
@JSONField(name="state")
private String state;
@JSONField(name="transTime")
private String transTime;
@JSONField(name="totalAmount")
private Long totalAmount;
@JSONField(name="fee")
private Long fee;
@JSONField(name="errorMsg")
private String errorMsg;
@JSONField(name="sign")
private String sign;
public String getMerchantCode()
{
return this.merchantCode;
}
public void setMerchantCode(String merchantCode)
{
this.merchantCode = merchantCode;
}
public String getOutOrderId()
{
return this.outOrderId;
}
public void setOutOrderId(String outOrderId)
{
this.outOrderId = outOrderId;
}
public String getOrderId()
{
return this.orderId;
}
public void setOrderId(String orderId)
{
this.orderId = orderId;
}
public String getState()
{
return this.state;
}
public void setState(String state)
{
this.state = state;
}
public String getTransTime()
{
return this.transTime;
}
public void setTransTime(String transTime)
{
this.transTime = transTime;
}
public Long getTotalAmount()
{
return this.totalAmount;
}
public void setTotalAmount(Long totalAmount)
{
this.totalAmount = totalAmount;
}
public Long getFee()
{
return this.fee;
}
public void setFee(Long fee)
{
this.fee = fee;
}
public String getErrorMsg()
{
return this.errorMsg;
}
public void setErrorMsg(String errorMsg)
{
this.errorMsg = errorMsg;
}
public String getSign()
{
return this.sign;
}
public void setSign(String sign)
{
this.sign = sign;
}
}
|
[
"nengbowan@163.com"
] |
nengbowan@163.com
|
23e52c56b7e35bb4b689b8c61e7851a68043085b
|
5eae683a6df0c4b97ab1ebcd4724a4bf062c1889
|
/bin/ext-addon/customercouponsamplesaddon/src/de/hybris/platform/customercouponsamplesaddon/constants/CustomercouponsamplesaddonConstants.java
|
d7a783c137a4cef579f45563a4aa437e5a84ca16
|
[] |
no_license
|
sujanrimal/GiftCardProject
|
1c5e8fe494e5c59cca58bbc76a755b1b0c0333bb
|
e0398eec9f4ec436d20764898a0255f32aac3d0c
|
refs/heads/master
| 2020-12-11T18:05:17.413472
| 2020-01-17T18:23:44
| 2020-01-17T18:23:44
| 233,911,127
| 0
| 0
| null | 2020-06-18T15:26:11
| 2020-01-14T18:44:18
| null |
UTF-8
|
Java
| false
| false
| 790
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with SAP.
*/
package de.hybris.platform.customercouponsamplesaddon.constants;
/**
* Customercouponsamplesaddon constants
*/
public final class CustomercouponsamplesaddonConstants
{
public static final String EXTENSIONNAME = "customercouponsamplesaddon";
private CustomercouponsamplesaddonConstants()
{
//empty to avoid instantiating this constant class
}
// implement here constants used by this extension
}
|
[
"travis.d.crawford@accenture.com"
] |
travis.d.crawford@accenture.com
|
75d4a73d83c5c8f8590232d738cfdd1eb8ab85d4
|
340b193641c8c4f6534072604b50dc4fd737466e
|
/src/main/java/com/lcy/type/user/CreateUserType.java
|
3d989102cab70bbda45fb4a4c94f2abd235e2319
|
[] |
no_license
|
wang0077/hxjy
|
169aafae00dc4defd30a03968a8bd8db24330bed
|
1054fe54ec3f4cd870d4e9935eb8c62f358cd4bb
|
refs/heads/master
| 2023-02-24T13:49:26.024943
| 2021-02-03T08:31:23
| 2021-02-03T08:31:23
| 327,232,057
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,132
|
java
|
package com.lcy.type.user;
/**
* 创建用户类型
*
* @author chenxiaowei@linewell.com
* @since 2017-11-06
*/
public enum CreateUserType {
/**
* 用户
*/
USER(1, "用户"),
/**
* 运营
*/
MANAGE(2, "运营");
// 代码
private int code;
// 身份证类型中文名称
private String nameCn;
CreateUserType(int code, String nameCn) {
this.code = code;
this.nameCn = nameCn;
}
/**
* 获取身份证类型
*
* @param code
* @return HandleStatusType
*/
public static CreateUserType getType(int code) {
for (CreateUserType status : CreateUserType.values()) {
if (code == status.getCode()) {
return status;
}
}
return null;
}
/**
* 获取code
* @return the code
*/
public int getCode() {
return code;
}
/**
* 设置code
* @param code the code to set
*/
public void setCode(int code) {
this.code = code;
}
/**
* 获取nameCn
* @return the nameCn
*/
public String getNameCn() {
return nameCn;
}
/**
* 设置nameCn
* @param nameCn the nameCn to set
*/
public void setNameCn(String nameCn) {
this.nameCn = nameCn;
}
}
|
[
"44741783+wang0077@users.noreply.github.com"
] |
44741783+wang0077@users.noreply.github.com
|
337c710a19c78fedf5c17cc8cbcd4ecf22ed6ca2
|
d9477e8e6e0d823cf2dec9823d7424732a7563c4
|
/plugins/Calculator/tags/1.2.0/src/ise/calculator/FunctionEditor.java
|
a44d97af5851169665dce78672a7e971b2db7779
|
[] |
no_license
|
RobertHSchmidt/jedit
|
48fd8e1e9527e6f680de334d1903a0113f9e8380
|
2fbb392d6b569aefead29975b9be12e257fbe4eb
|
refs/heads/master
| 2023-08-30T02:52:55.676638
| 2018-07-11T13:28:01
| 2018-07-11T13:28:01
| 140,587,948
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,533
|
java
|
/*
This file, unless otherwise noted, is wholly the work of Dale Anson,
danson@grafidog.com. The complete contents of this file is hereby
released into the public domain, with no rights reserved. For questions,
concerns, or comments, please email the author.
*/
package ise.calculator;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import javax.swing.*;
import javax.swing.event.*;
public class FunctionEditor extends JDialog {
private String LS = System.getProperty( "line.separator" );
public FunctionEditor( JDialog parent, File file ) {
this( parent, "Edit Function", file );
}
public FunctionEditor( final JDialog parent, String title, final File function_file ) {
super( parent, title, true );
JPanel contents = new JPanel( new LambdaLayout() );
try {
String name = "";
String desc = "";
String function = "";
if ( function_file.exists() && function_file.length() > 0 ) {
FunctionReader fr = new FunctionReader(function_file);
name = fr.getName();
desc = fr.getDescription();
function = fr.getFunction();
}
final JTextField name_field = new JTextField( name );
final JButton name_view = new JButton( "View" );
name_view.setToolTipText( "Shows how the function name will look in the menu." );
final JTextField desc_field = new JTextField( desc );
final JButton desc_view = new JButton( "View" );
desc_view.setToolTipText( "Shows how the function description will look in the tool tip." );
final JTextArea ta = new JTextArea( function.toString(), 10, 25 );
ActionListener view_listener = new ActionListener() {
public void actionPerformed( ActionEvent ae ) {
JButton btn = ( JButton ) ae.getSource();
String text = "";
if ( btn.equals( name_view ) ) {
text = name_field.getText();
}
else if ( btn.equals( desc_view ) ) {
text = desc_field.getText();
}
JOptionPane.showMessageDialog( FunctionEditor.this, text, "View", JOptionPane.PLAIN_MESSAGE );
}
};
name_view.addActionListener( view_listener );
desc_view.addActionListener( view_listener );
KappaLayout btn_layout = new KappaLayout();
JPanel btn_panel = new JPanel( btn_layout );
JButton save_btn = new JButton( "Save" );
JButton cancel_btn = new JButton( "Cancel" );
btn_panel.add( save_btn, "0, 0, 1, 1, E, w,3" );
btn_panel.add( cancel_btn, "1, 0, 1, 1, W, w,3" );
btn_layout.makeColumnsSameWidth( 0, 1 );
contents.add( new JLabel( "Function Name:" ), "0, 0, 1, 1, 0, w, 3" );
contents.add( name_field, "1, 0, 5, 1, 0, w, 3" );
contents.add( name_view, "6, 0, 1, 1, 0, w, 3" );
contents.add( new JLabel( "Description:" ), "0, 1, 1, 1, 0, w, 3" );
contents.add( desc_field, "1, 1, 5, 1, 0, w, 3" );
contents.add( desc_view, "6, 1, 1, 1, 0, w, 3" );
contents.add( new JLabel( "Function:" ), "0, 2, 7, 1, 0, w, 3" );
contents.add( new JScrollPane( ta ), "0, 3, 7, 1, 0, wh, 3" );
contents.add( btn_panel, "2, 4, 2, 1, E, w, 3" );
save_btn.addActionListener( new ActionListener() {
public void actionPerformed( ActionEvent ae ) {
try {
String name = name_field.getText();
if (name == null || name.length() == 0)
throw new Exception("Function name must be entered.");
String desc = desc_field.getText();
if (desc == null || desc.length() == 0)
throw new Exception("Function description must be entered.");
String function = ta.getText();
if (function == null || function.length() == 0)
throw new Exception("Function steps must be entered.");
FunctionWriter fw = new FunctionWriter(function_file);
fw.write(name, desc, function);
setVisible(false);
dispose();
}
catch ( Exception e ) {
JOptionPane.showMessageDialog( parent, "Unable to save: " + e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE );
}
}
}
);
cancel_btn.addActionListener( new ActionListener() {
public void actionPerformed( ActionEvent ae ) {
setVisible(false);
dispose();
}
}
);
setContentPane( contents );
setSize( 400, 400 );
pack();
GUIUtils.center( parent, this );
setVisible( true );
}
catch ( Exception e ) {
JOptionPane.showMessageDialog( parent, "Error: " + e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE );
e.printStackTrace();
}
}
public static void main ( String[] args ) {
new FunctionEditor( new JDialog(), "test", new File( "c:/Documents and Settings/danson/.calc/calc_12058.calc" ) );
}
}
|
[
"daleanson@6b1eeb88-9816-0410-afa2-b43733a0f04e"
] |
daleanson@6b1eeb88-9816-0410-afa2-b43733a0f04e
|
9a46f511a52a145b678139677b7ca75ad31e887c
|
0c811cc615f8cffeb07a365f9491572f94eda1da
|
/src/main/java/lesson_04/HomeServlet.java
|
384424700a3f84e05bc66540d8470a16905f5ede
|
[] |
no_license
|
dimaSkalora/JavaServerPages_LessonFirst
|
cbb50cead55229153fe4b4396e1a9e8d0b3af514
|
ad69a2dec9c1b5c474e1b638c9278818ac97713f
|
refs/heads/master
| 2021-03-16T10:15:20.084824
| 2017-11-16T09:31:28
| 2017-11-16T09:31:28
| 110,113,434
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,213
|
java
|
package lesson_04;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
public class HomeServlet extends HttpServlet {
private Integer status;
public HomeServlet() {
}
@Override
public void init() throws ServletException {
System.out.println("juhac cnonws wfvewrf rfwsfvas");
status = Integer.parseInt(getServletConfig().getInitParameter("param_name3"));
System.out.println("Status: "+status);
}
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
req.getSession().getServletContext().getInitParameter("hi");
getServletContext().getInitParameter("ji");
RequestDispatcher requestDispatcher_01 = getServletContext().getRequestDispatcher("/home.jsp");
requestDispatcher_01.forward(req,resp);
}
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
super.doPost(req, resp);
}
}
|
[
"timon2@ukr.net"
] |
timon2@ukr.net
|
635ddf5963feceb185edf43479ab8adbbbb61e39
|
951d941d924df7bc07539bde49d4101ef783df17
|
/src/blog/service/impl/UserServiceImpl.java
|
23eeea7981284f823aa253f9d09ae2e3cfc77eb6
|
[] |
no_license
|
seaswalker/blog
|
c5e6d2011c30169a6fa938fa1608cdc1ef482b17
|
f7e5b88bd67d6ffe0fef782b0c5c4e6a3bef301c
|
refs/heads/master
| 2021-01-10T00:53:29.394324
| 2015-06-06T12:18:52
| 2015-06-06T12:18:52
| 34,938,205
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 863
|
java
|
package blog.service.impl;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import blog.dao.base.BaseDao;
import blog.model.User;
import blog.service.UserService;
import blog.service.base.BaseServiceImpl;
@Service("userService")
public class UserServiceImpl extends BaseServiceImpl<User> implements UserService {
@Override
@Resource(name = "userDao")
protected void setBaseDao(BaseDao<User> baseDao) {
super.setBaseDao(baseDao);
}
@Override
public User login(String username, String password) {
String hql = "from User where username = ? and password = ?";
return (User) query(hql, username, password);
}
@Override
public String getAbout() {
String sql = "select aboutus from user where username = 'skywalker'";
return (String) nativeQuery(sql, new Object[] {});
}
}
|
[
"xsdwem7@hotmail.com"
] |
xsdwem7@hotmail.com
|
54d4c5c41f738c90c5e6c8d9cfcfb6c0e89d75d0
|
4be0b51fcd121c262b139a881c2e16c186a1d5ba
|
/it.launcher/src/test/java/org/anirudh/redquark/remotesolraem/it/launcher/SlingServerSideTest.java
|
3b68d17857928b5cfeaf949f948dd7562a682abe
|
[] |
no_license
|
ani03sha/remote-solr-aem
|
f11dc8d11035d0bab8c2c119439ed09476694d63
|
bc0d2ba0ae872275c71b3427d753d445d1a4c255
|
refs/heads/master
| 2020-03-07T15:42:32.957454
| 2018-03-31T19:09:27
| 2018-03-31T19:09:27
| 127,562,344
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,814
|
java
|
/*
* Copyright 2015 Adobe Systems Incorporated
*
* 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.anirudh.redquark.remotesolraem.it.launcher;
import static org.junit.Assert.assertEquals;
import org.apache.sling.junit.remote.testrunner.SlingRemoteTestParameters;
import org.apache.sling.junit.remote.testrunner.SlingRemoteTestRunner;
import org.apache.sling.junit.remote.testrunner.SlingTestsCountChecker;
import org.junit.runner.RunWith;
/** Run some server-side tests using the Sling JUnit servlet */
@RunWith(SlingRemoteTestRunner.class)
public class SlingServerSideTest extends SlingServerSideTestsBase
implements SlingRemoteTestParameters, SlingTestsCountChecker {
public static final String TEST_SELECTOR = "org.anirudh.redquark.remotesolraem.it.tests";
public static final int TESTS_AT_THIS_PATH = 1;
public void checkNumberOfTests(int numberOfTestsExecuted) {
assertEquals(TESTS_AT_THIS_PATH, numberOfTestsExecuted);
}
public String getJunitServletUrl() {
return getServerBaseUrl() + SLING_JUNIT_SERVLET_PATH;
}
public String getTestClassesSelector() {
return TEST_SELECTOR;
}
public String getTestMethodSelector() {
return null;
}
}
|
[
"anirudh03sharma@gmail.com"
] |
anirudh03sharma@gmail.com
|
919f1ffd6aa640f49d8d1a3ffdbfc57581ba26fe
|
e48a78693bd5bd08044ecebda877c44d9062197c
|
/app/src/main/java/ir/sematec/sematecandroidbasicaban98/TestNotificationActivity.java
|
c0d15a29c9c2500854c2a15045920c6d1880495c
|
[] |
no_license
|
SirLordPouya/SematecAndroidBasicAban98
|
d30a55584e9636dfd7d2123b921f0d1da8844840
|
cc1ab70ec2fd4f186d306e1779ea58c332d84342
|
refs/heads/master
| 2020-09-11T03:12:34.059385
| 2020-01-10T13:26:00
| 2020-01-10T13:26:00
| 221,922,535
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,960
|
java
|
package ir.sematec.sematecandroidbasicaban98;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.NotificationCompat;
public class TestNotificationActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_test_notification);
showNotification("Breaking News!", "We Won!");
}
void showNotification(String title, String message) {
NotificationManager mNotificationManager =
(NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
NotificationChannel channel = new NotificationChannel("NEWS_CHANNEL",
"News Channel",
NotificationManager.IMPORTANCE_DEFAULT);
channel.setDescription("YOUR_NOTIFICATION_CHANNEL_DESCRIPTION");
mNotificationManager.createNotificationChannel(channel);
}
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(getApplicationContext(), "NEWS_CHANNEL")
.setSmallIcon(R.mipmap.ic_launcher) // notification icon
.setContentTitle(title) // title for notification
.setContentText(message)// message for notification
.setAutoCancel(true); // clear notification after click
Intent intent = new Intent(getApplicationContext(), MainActivity.class);
PendingIntent pi = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
mBuilder.setContentIntent(pi);
mNotificationManager.notify(0, mBuilder.build());
}
}
|
[
"pouyaheydary@gmail.com"
] |
pouyaheydary@gmail.com
|
0d92d921de60f27778466808035a3815dfbaf5e5
|
41763feae5c326dcfd36b75ed23a27ed5ee3e4a8
|
/src/main/java/com/online/service/SystemDepartmentService.java
|
506c0b76b8fb25a7a7378b03999e6ca9e5a57893
|
[] |
no_license
|
aner47/online
|
a7d53c8e7e6d72065c129a31d2e4ba5614c96e94
|
9ad7c285e170e6d5642c86eab95f657e9e23f4d7
|
refs/heads/master
| 2020-04-27T11:19:41.111136
| 2019-03-07T07:36:03
| 2019-03-07T07:36:03
| 174,291,169
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 369
|
java
|
package com.online.service;
import com.online.entity.SystemDepartment;
/**
* 部门
*/
public interface SystemDepartmentService extends BaseService<SystemDepartment, Integer> {
public void saveDepartmentEntity(SystemDepartment systemDepartment, String selectRole);
public void updateDepartmentEntity(SystemDepartment systemDepartment, String selectRole);
}
|
[
"zyq_glb@hqevn.com"
] |
zyq_glb@hqevn.com
|
55d287ff6e30070dac98b38a49ce87814f383fd2
|
b104d2c47dde6b97980a27cd26b74f636847d596
|
/src/main/java/edu/uiowa/AcknowledgementsTagLib/disease/DiseaseID.java
|
35922f3f6ad0e38796b6ccb87e30deb263b5113c
|
[] |
no_license
|
eichmann/AcknowledgementsTagLib
|
d8218de76fe2e7025affc3826a48ca53609ef1b5
|
b32253de46185c7dd6ee1a0e892e26d44db00c8a
|
refs/heads/master
| 2020-03-19T03:47:17.342210
| 2019-01-04T15:30:16
| 2019-01-04T15:30:16
| 135,762,583
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,554
|
java
|
package edu.uiowa.AcknowledgementsTagLib.disease;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspTagException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import edu.uiowa.AcknowledgementsTagLib.AcknowledgementsTagLibTagSupport;
@SuppressWarnings("serial")
public class DiseaseID extends AcknowledgementsTagLibTagSupport {
private static final Log log = LogFactory.getLog(DiseaseID.class);
public int doStartTag() throws JspException {
try {
Disease theDisease = (Disease)findAncestorWithClass(this, Disease.class);
if (!theDisease.commitNeeded) {
pageContext.getOut().print(theDisease.getID());
}
} catch (Exception e) {
log.error("Can't find enclosing Disease for ID tag ", e);
throw new JspTagException("Error: Can't find enclosing Disease for ID tag ");
}
return SKIP_BODY;
}
public int getID() throws JspTagException {
try {
Disease theDisease = (Disease)findAncestorWithClass(this, Disease.class);
return theDisease.getID();
} catch (Exception e) {
log.error(" Can't find enclosing Disease for ID tag ", e);
throw new JspTagException("Error: Can't find enclosing Disease for ID tag ");
}
}
public void setID(int ID) throws JspTagException {
try {
Disease theDisease = (Disease)findAncestorWithClass(this, Disease.class);
theDisease.setID(ID);
} catch (Exception e) {
log.error("Can't find enclosing Disease for ID tag ", e);
throw new JspTagException("Error: Can't find enclosing Disease for ID tag ");
}
}
}
|
[
"david-eichmann@uiowa.edu"
] |
david-eichmann@uiowa.edu
|
95258b2eb50f01c4d6f2f0a3513e9ec478000be9
|
ba3b25d6cf9be46007833ce662d0584dc1246279
|
/droidsafe_modified/modeling/api/android/support/v4/view/accessibility/AccessibilityNodeInfoCompatJellybeanMr2.java
|
f876754899af9729152e1cd6a8e5b79e417a99c6
|
[] |
no_license
|
suncongxd/muDep
|
46552d4156191b9dec669e246188080b47183a01
|
b891c09f2c96ff37dcfc00468632bda569fc8b6d
|
refs/heads/main
| 2023-03-20T20:04:41.737805
| 2021-03-01T19:52:08
| 2021-03-01T19:52:08
| 326,209,904
| 8
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,777
|
java
|
/*
* Copyright (C) 2015, Massachusetts Institute of Technology
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Please email droidsafe@lists.csail.mit.edu if you need additional
* information or have any questions.
*
*
* This file incorporates work covered by the following copyright and
* permission notice:
*
* Copyright (C) 2013 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.
*/
/***** THIS FILE HAS BEEN MODIFIED FROM THE ORIGINAL BY THE DROIDSAFE PROJECT. *****/
package android.support.v4.view.accessibility;
import droidsafe.annotations.*;
import droidsafe.runtime.*;
import droidsafe.helpers.*;
import android.view.accessibility.AccessibilityNodeInfo;
class AccessibilityNodeInfoCompatJellybeanMr2 {
@DSSafe(DSCat.SAFE_LIST)
@DSGenerator(tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2014-09-17 15:29:09.506 -0400", hash_original_method = "1A4B91EF1799AB9B656A4901B02E809F", hash_generated_method = "3491E82ECAA0A1331869E7D1202B8DDA")
public static void setViewIdResourceName(Object info, String viewId) {
((AccessibilityNodeInfo) info).setViewIdResourceName(viewId);
}
@DSSafe(DSCat.SAFE_LIST)
@DSGenerator(tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2014-09-17 15:29:09.509 -0400", hash_original_method = "8BC72748D492E60677B6F2591E0D8C46", hash_generated_method = "8B1A820B580E6365A7E508AB3D98C90D")
public static String getViewIdResourceName(Object info) {
return ((AccessibilityNodeInfo) info).getViewIdResourceName();
}
}
|
[
"suncong@xidian.edu.cn"
] |
suncong@xidian.edu.cn
|
64c366c9e02e1f5d888547c96e89e26ca255423c
|
1ebb1c57359da58dc95ec2696b7a9bbf90b8a4ed
|
/src/main/java/com/andres_k/components/gameComponents/collisions/CollisionItem.java
|
4f5d11d2d9f25c5995ddb9778b6ad0767cbdcfa8
|
[] |
no_license
|
Draym/DragonBallArena
|
cde8d2b23eb8615b00b69d2ffaac9e713e8fba1d
|
ecbe2f5de1ee71abec780e5150ab18414604d2b6
|
refs/heads/master
| 2023-05-04T04:56:00.832882
| 2023-04-19T01:02:40
| 2023-04-19T01:02:40
| 38,845,891
| 6
| 3
| null | 2017-08-08T16:59:58
| 2015-07-09T21:19:55
|
Java
|
UTF-8
|
Java
| false
| false
| 1,789
|
java
|
package com.andres_k.components.gameComponents.collisions;
import com.andres_k.components.gameComponents.gameObject.EGameObject;
import com.andres_k.components.gameComponents.gameObject.commands.movement.EDirection;
/**
* Created by andres_k on 29/10/2015.
*/
public class CollisionItem {
private boolean collision;
private EGameObject collisionType;
private EDirection collisionDirection;
private float collisionDistance;
CollisionItem(boolean collision, EGameObject type, EDirection direction, float distance) {
this.collision = collision;
this.collisionType = type;
this.collisionDirection = direction;
this.collisionDistance = distance;
}
@Override
public String toString() {
return "[" + this.collision + "] [" + this.collisionType + "] [" + this.collisionDirection + "] [" + this.collisionDistance + "]";
}
// SETTERS
public void copy(CollisionItem item) {
this.collision = item.collision;
this.collisionType = item.collisionType;
this.collisionDirection = item.collisionDirection;
this.collisionDistance = item.collisionDistance;
}
public void init(boolean collision, EGameObject type, EDirection direction, float distance) {
this.collision = collision;
this.collisionType = type;
this.collisionDirection = direction;
this.collisionDistance = distance;
}
// GETTERS
public boolean isCollision() {
return this.collision;
}
public EGameObject getCollisionType() {
return this.collisionType;
}
public EDirection getCollisionDirection() {
return this.collisionDirection;
}
public float getCollisionDistance() {
return this.collisionDistance;
}
}
|
[
"kevin.andres@epitech.eu"
] |
kevin.andres@epitech.eu
|
1cb91776d3d6e575018eb8016feeb3d6a4516d1f
|
486d70f8e449a5db7966c7ddc7ef3ffc93985d49
|
/jtsec-manager/jtsec-manager-mapper/src/main/java/com/jtsec/manager/mapper/UserMapper.java
|
73baa9cab64fda83f331e29d38486b61be1ff6db
|
[] |
no_license
|
FatLi1989/jtsec-com
|
052bb4a841b134526a1aab3af64968ad58e1668a
|
ff4f2b3c4d7f79b94b4e9aca89edc3fc3d8c3f10
|
refs/heads/master
| 2020-04-19T08:02:41.900075
| 2019-01-29T01:16:40
| 2019-01-29T01:16:40
| 168,064,873
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 889
|
java
|
package com.jtsec.manager.mapper;
import com.jtsec.manager.pojo.model.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
@Mapper
@Repository
public interface UserMapper {
int deleteByPrimaryKey (Integer userId);
Integer insert (User record);
int insertSelective (User record);
User selectByPrimaryKey (Integer userId);
int updateByPrimaryKeySelective (User record);
int updateByPrimaryKey (User record);
List<User> queryUserbyVarible (@Param ("map") Map<String, Object> map);
User selectUser (@Param ("id") Integer id);
Integer delBatch (@Param ("list") List userIdList);
List<User> selectUsers (@Param ("map") Map<String, Object> map);
User getUserByLoginName (@Param ("loginName") String loginName);
}
|
[
"514340686@qq.com"
] |
514340686@qq.com
|
45592c8932a4c95a8468bf76c43947adf41180a1
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_ade4dc858c8e45424e731b63a140c37aa4b33cda/ForgottenPasswordException/2_ade4dc858c8e45424e731b63a140c37aa4b33cda_ForgottenPasswordException_s.java
|
531c2f6f87693aa7905b22004316eeee097d5df5
|
[] |
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
| 1,892
|
java
|
/**
* Copyright (C) 2000 - 2012 Silverpeas
*
* This program 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.
*
* As a special exception to the terms and conditions of version 3.0 of
* the GPL, you may redistribute this Program in connection with Free/Libre
* Open Source Software ("FLOSS") applications as described in Silverpeas's
* FLOSS exception. You should have received a copy of the text describing
* the FLOSS exception, and it is also available here:
* "http://www.silverpeas.org/legal/licensing"
*
* 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.stratelia.silverpeas.authentication.password;
import com.stratelia.webactiv.util.exception.SilverpeasException;
public class ForgottenPasswordException extends SilverpeasException {
private static final long serialVersionUID = -2521215893839712639L;
public ForgottenPasswordException(String callingClass, String message, Exception nested) {
super(callingClass, SilverpeasException.ERROR, message, nested);
}
public ForgottenPasswordException(String callingClass, String message, String extraParams,
Exception nested) {
super(callingClass, SilverpeasException.ERROR, message, extraParams, nested);
}
@Override
public String getModule() {
return "forgottenPassword";
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
df99d44fef79c382e057b20609baa55858c506f3
|
e6dc399cc717e39488f2ca9b7c9f15bd64dd1057
|
/src/ir/viratech/pond_ms/model/customer/base/BaseCustomerFavoriteGISVectorObjectDAO.java
|
a472e34e4eb420e2377e02e70a9cfc07479f187b
|
[] |
no_license
|
amirhoseinkh91/pondms
|
1ed5cccc43bcdaefaa61f831060f92b3f9913c78
|
7950ca88dd4f6061f58c0f6d5b6dd1fc25ce28cb
|
refs/heads/master
| 2020-06-20T06:25:54.257765
| 2019-07-16T12:18:42
| 2019-07-16T12:18:42
| 197,024,235
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,137
|
java
|
package ir.viratech.pond_ms.model.customer.base;
/**
* Base DAO class for entity "ir.viratech.pond_ms.model.customer.CustomerFavoriteGISVectorObject".
* It is an automatically generated file and should not be edited.
*/
public abstract class BaseCustomerFavoriteGISVectorObjectDAO extends ir.viratech.base.AbstractEntityDAO<ir.viratech.pond_ms.model.customer.CustomerFavoriteGISVectorObject, java.lang.Long> {
// query name references
/**
* Gets the DAO instance from Spring.
*
* @return the instance of CustomerFavoriteGISVectorObjectMgr
*/
public static ir.viratech.pond_ms.model.customer.dao.CustomerFavoriteGISVectorObjectDAO getInstance() {
return ir.viratech.commons.spring.context.ApplicationContextProvider.getInitializedApplicationContext().getBean(ir.viratech.pond_ms.model.customer.dao.CustomerFavoriteGISVectorObjectDAO.class);
}
/* (non-Javadoc)
* @see ir.viratech.commons.persistence.base.BaseAbstractEntityDAO#getReferenceClass()
*/
@Override
public Class<ir.viratech.pond_ms.model.customer.CustomerFavoriteGISVectorObject> getReferenceClass() {
return ir.viratech.pond_ms.model.customer.CustomerFavoriteGISVectorObject.class;
}
/* (non-Javadoc)
* @see ir.viratech.commons.persistence.base.BaseAbstractEntityDAO#getId(java.lang.Object)
*/
@Override
public java.lang.Long getId(ir.viratech.pond_ms.model.customer.CustomerFavoriteGISVectorObject customerFavoriteGISVectorObject) {
return customerFavoriteGISVectorObject.getId();
}
/**
* Unique finder method for "extuid".
*
* @param extuid the value of extuid
* @return the unique matching object
*/
public ir.viratech.pond_ms.model.customer.CustomerFavoriteGISVectorObject getByExtuid(java.lang.String extuid) {
return this.getByUniqueProp(ir.viratech.pond_ms.model.customer.CustomerFavoriteGISVectorObject.PROP_EXTUID, extuid);
}
@Override
public void initialize(ir.viratech.pond_ms.model.customer.CustomerFavoriteGISVectorObject customerFavoriteGISVectorObject) {
super.initialize(customerFavoriteGISVectorObject);
customerFavoriteGISVectorObject.setExtuid(this.generateUid());
}
}
|
[
"khaloei@viratech.ir"
] |
khaloei@viratech.ir
|
8cd3d208240257422fbffc68a4e76b04dd6cd1fc
|
f710cc629e765d10a69892afcea54677d535950e
|
/inetsdk/src/main/java/com/company/NetSDK/NET_OUT_CLOUD_UPGRADER_DOWN.java
|
31f63e8bf80c8227cb95ca5d798ff9d24391984c
|
[] |
no_license
|
zhongershashen/zhi_hui_hui_tian
|
c67bed23f9f5a23c7e58f55a69568b4c2408c227
|
879ac9f3309beff53d17abc57fdfff4eac4d6b77
|
refs/heads/main
| 2023-07-27T17:06:55.259720
| 2021-09-09T09:50:20
| 2021-09-09T09:50:20
| 400,028,506
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 422
|
java
|
package com.company.NetSDK;
import java.io.Serializable;
/**
* \if ENGLISH_LANG
* interface {@link INetSDK#CloudUpgraderDownLoad} cloud upgrade download output parameter
* \else
* 接口 {@link INetSDK#CloudUpgraderDownLoad} 云升级下载升级包出参
* \endif
*/
public class NET_OUT_CLOUD_UPGRADER_DOWN implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
}
|
[
"1159842919@qq.com"
] |
1159842919@qq.com
|
19603dc19136ce929b3207235f82a49a84d5d4d3
|
471a1d9598d792c18392ca1485bbb3b29d1165c5
|
/jadx-MFP/src/main/java/org/apache/commons/io/filefilter/SizeFileFilter.java
|
e9bfb44e22ced089e8156a138a7bce132fd8afbc
|
[] |
no_license
|
reed07/MyPreferencePal
|
84db3a93c114868dd3691217cc175a8675e5544f
|
365b42fcc5670844187ae61b8cbc02c542aa348e
|
refs/heads/master
| 2020-03-10T23:10:43.112303
| 2019-07-08T00:39:32
| 2019-07-08T00:39:32
| 129,635,379
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 788
|
java
|
package org.apache.commons.io.filefilter;
import java.io.File;
import java.io.Serializable;
public class SizeFileFilter extends AbstractFileFilter implements Serializable {
private final boolean acceptLarger;
private final long size;
public boolean accept(File file) {
boolean z = file.length() < this.size;
if (!this.acceptLarger) {
return z;
}
if (!z) {
return true;
}
return false;
}
public String toString() {
String str = this.acceptLarger ? ">=" : "<";
StringBuilder sb = new StringBuilder();
sb.append(super.toString());
sb.append("(");
sb.append(str);
sb.append(this.size);
sb.append(")");
return sb.toString();
}
}
|
[
"anon@ymous.email"
] |
anon@ymous.email
|
e6a09e79f06f60b3096f98905c9537c9a5d908be
|
40d844c1c780cf3618979626282cf59be833907f
|
/src/testcases/CWE476_NULL_Pointer_Dereference/CWE476_NULL_Pointer_Dereference__deref_after_check_08.java
|
62e358117538ecf26252dfc955351dfc7bec22f5
|
[] |
no_license
|
rubengomez97/juliet
|
f9566de7be198921113658f904b521b6bca4d262
|
13debb7a1cc801977b9371b8cc1a313cd1de3a0e
|
refs/heads/master
| 2023-06-02T00:37:24.532638
| 2021-06-23T17:22:22
| 2021-06-23T17:22:22
| 379,676,259
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,076
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE476_NULL_Pointer_Dereference__deref_after_check_08.java
Label Definition File: CWE476_NULL_Pointer_Dereference.pointflaw.label.xml
Template File: point-flaw-08.tmpl.java
*/
/*
* @description
* CWE: 476 NULL Pointer Dereference
* Sinks: deref_after_check
* GoodSink: Do not dereference an object if it is null
* BadSink : Dereference after checking to see if an object is null
* Flow Variant: 08 Control flow: if(privateReturnsTrue()) and if(privateReturnsFalse())
*
* */
package testcases.CWE476_NULL_Pointer_Dereference;
import testcasesupport.*;
public class CWE476_NULL_Pointer_Dereference__deref_after_check_08 extends AbstractTestCase
{
/* The methods below always return the same value, so a tool
* should be able to figure out that every call to these
* methods will return true or return false.
*/
private boolean privateReturnsTrue()
{
return true;
}
private boolean privateReturnsFalse()
{
return false;
}
public void bad() throws Throwable
{
if (privateReturnsTrue())
{
{
/* FLAW: Check for null, but still dereference the object */
String myString = null;
if (myString == null)
{
IO.writeLine(myString.length());
}
}
}
}
/* good1() changes privateReturnsTrue() to privateReturnsFalse() */
private void good1() throws Throwable
{
if (privateReturnsFalse())
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
IO.writeLine("Benign, fixed string");
}
else
{
{
/* FIX: Check for null and do not dereference the object if it is null */
String myString = null;
if (myString == null)
{
IO.writeLine("The string is null");
}
}
}
}
/* good2() reverses the bodies in the if statement */
private void good2() throws Throwable
{
if (privateReturnsTrue())
{
{
/* FIX: Check for null and do not dereference the object if it is null */
String myString = null;
if (myString == null)
{
IO.writeLine("The string is null");
}
}
}
}
public void good() throws Throwable
{
good1();
good2();
}
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"you@example.com"
] |
you@example.com
|
a91e2a29adaf514a1186c1e2c4599e13aeff4711
|
88ef5b422999b3cdf844b2cc4e2bc94e85643972
|
/src/main/java/com/sdpm/smart/farming/mock/MockDevice.java
|
834b1f5be2eea951739bdd585e7501c341fde235
|
[] |
no_license
|
Mediumcore/smart-farming-service
|
b55173809e94ab2c62dca3b479e32eb533f30675
|
f9b08e77a4672ad87ad11fd6c2972152381adbc6
|
refs/heads/master
| 2023-02-05T20:28:10.209117
| 2020-12-26T02:07:04
| 2020-12-26T02:07:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,089
|
java
|
package com.sdpm.smart.farming.mock;
import com.google.protobuf.InvalidProtocolBufferException;
import com.sdpm.smart.farming.devicemgr.certificate.CertificateProto;
import org.eclipse.paho.client.mqttv3.MqttClient;
import org.eclipse.paho.client.mqttv3.MqttException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.Base64Utils;
import java.util.Arrays;
import java.util.List;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* 模拟机械设备
*
* @author rukey
*/
public class MockDevice {
private static final Logger logger = LoggerFactory.getLogger(MockDevice.class);
public static void main(String[] args) throws MqttException, InvalidProtocolBufferException, InterruptedException {
List<MqttClient> clients = Stream.of(
"CAESGHRjcDovLzQ3LjExNC4zOS4xNDI6MTg4MxgBIgllbXF4MTIzNCEqBGVtcXgyEnNmcy1kZXZpY2UtMTAwMDItMToSc2ZzLzEwMDAyL2V2ZW50cy8xQhRzZnMvMTAwMDIvY29tbWFuZHMvMUoVc2ZzLXJ0Yy12aWRlby0xMDAwMi0xUhlzZnMvMTAwMDIvcnRjL3ZpZGVvL3JlcS8xWhlzZnMvMTAwMDIvcnRjL3ZpZGVvL2Fucy8xYhRzZnMtcnRjLWRhdGEtMTAwMDItMWoYc2ZzLzEwMDAyL3J0Yy9kYXRhL3JlcS8xchhzZnMvMTAwMDIvcnRjL2RhdGEvYW5zLzF6F3R1cm46NDcuMTE0LjM5LjE0MjozNDc4ggEHa3VyZW50b4oBDGt1cmVudG8hMTIzNA==",
"CAISGHRjcDovLzQ3LjExNC4zOS4xNDI6MTg4MxgBIgllbXF4MTIzNCEqBGVtcXgyEnNmcy1kZXZpY2UtMTAwMDItMjoSc2ZzLzEwMDAyL2V2ZW50cy8yQhRzZnMvMTAwMDIvY29tbWFuZHMvMkoVc2ZzLXJ0Yy12aWRlby0xMDAwMi0yUhlzZnMvMTAwMDIvcnRjL3ZpZGVvL3JlcS8yWhlzZnMvMTAwMDIvcnRjL3ZpZGVvL2Fucy8yYhRzZnMtcnRjLWRhdGEtMTAwMDItMmoYc2ZzLzEwMDAyL3J0Yy9kYXRhL3JlcS8ychhzZnMvMTAwMDIvcnRjL2RhdGEvYW5zLzJ6F3R1cm46NDcuMTE0LjM5LjE0MjozNDc4ggEHa3VyZW50b4oBDGt1cmVudG8hMTIzNA==",
"CAMSGHRjcDovLzQ3LjExNC4zOS4xNDI6MTg4MxgBIgllbXF4MTIzNCEqBGVtcXgyEnNmcy1kZXZpY2UtMTAwMDItMzoSc2ZzLzEwMDAyL2V2ZW50cy8zQhRzZnMvMTAwMDIvY29tbWFuZHMvM0oVc2ZzLXJ0Yy12aWRlby0xMDAwMi0zUhlzZnMvMTAwMDIvcnRjL3ZpZGVvL3JlcS8zWhlzZnMvMTAwMDIvcnRjL3ZpZGVvL2Fucy8zYhRzZnMtcnRjLWRhdGEtMTAwMDItM2oYc2ZzLzEwMDAyL3J0Yy9kYXRhL3JlcS8zchhzZnMvMTAwMDIvcnRjL2RhdGEvYW5zLzN6F3R1cm46NDcuMTE0LjM5LjE0MjozNDc4ggEHa3VyZW50b4oBDGt1cmVudG8hMTIzNA=="
).map(s -> {
try {
CertificateProto.Certificate certificate = CertificateProto
.Certificate.parseFrom(Base64Utils.decodeFromString(s));
String mqttUrl = certificate.getUrl();
String username = certificate.getUsername();
String password = certificate.getPassword();
String clientId = certificate.getClientId();
Thread.sleep(10000);
return MQTTClientUtil.createClient(mqttUrl, clientId, username, password);
} catch (Exception e) {
e.printStackTrace();
}
return null;
}).collect(Collectors.toList());
Thread.sleep(20000);
// 断开连接
for (MqttClient client : clients) {
client.disconnect();
client.close();
Thread.sleep(10000);
}
}
}
|
[
"12345678"
] |
12345678
|
12852c9387d0c448a80c8e05137e0b182cd1c10c
|
3e096dc4bd4df011aadaf236831fb2f5ba2f31f9
|
/src/com/hotent/core/util/CertUtil.java
|
63ab28de1aac1448e66e7f16e26a10a65569123a
|
[] |
no_license
|
hollykunge/newnewcosim
|
2a42d99e7337263df4d53e0fadf20cb6c6381362
|
dc3f86711a003f2608c75761792ea49c3da805d1
|
refs/heads/master
| 2020-03-29T09:15:05.705190
| 2019-07-22T08:48:09
| 2019-07-22T08:48:09
| 149,748,589
| 1
| 5
| null | 2019-07-22T08:48:10
| 2018-09-21T10:29:04
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 5,524
|
java
|
package com.hotent.core.util;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.KeyManagementException;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.TrustManager;
import javax.net.ssl.TrustManagerFactory;
import javax.net.ssl.X509TrustManager;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
public class CertUtil {
public static Log logger = LogFactory.getLog(CertUtil.class);
public static void main(String[] args) {
File file=get("smtp.gmail.com", 465);
System.out.println(file.getAbsolutePath());
}
public static File get(String host, int port) {
InputStream in=null;
SSLSocket socket=null;
OutputStream out =null;
try {
char[] passphrase = "changeit".toCharArray();
File file = new File("jssecacerts");
if (file.isFile() == false) {
char SEP = File.separatorChar;
File dir = new File(System.getProperty("java.home") + SEP
+ "lib" + SEP + "security");
file = new File(dir, "jssecacerts");
if (file.isFile() == false) {
file = new File(dir, "cacerts");
}
}
in = new FileInputStream(file);
KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
ks.load(in, passphrase);
//in.close();
SSLContext context = SSLContext.getInstance("TLS");
TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
tmf.init(ks);
X509TrustManager defaultTrustManager = (X509TrustManager) tmf.getTrustManagers()[0];
SavingTrustManager tm = new SavingTrustManager(defaultTrustManager);
context.init(null, new TrustManager[] { tm }, null);
SSLSocketFactory factory = context.getSocketFactory();
socket = (SSLSocket) factory.createSocket(host, port);
socket.setSoTimeout(10000);
if (socket != null) {
socket.startHandshake();
//socket.close();
}
X509Certificate[] chain = tm.chain;
if (chain == null) {
return null;
}
MessageDigest sha1 = MessageDigest.getInstance("SHA1");
MessageDigest md5 = MessageDigest.getInstance("MD5");
for (int i = 0; i < chain.length; i++) {
X509Certificate cert = chain[i];
sha1.update(cert.getEncoded());
md5.update(cert.getEncoded());
}
// 默认选1
int k = 0;
X509Certificate cert = chain[k];
String alias = host + "-" + (k + 1);
ks.setCertificateEntry(alias, cert);
File cafile = new File("jssecacerts");
out = new FileOutputStream(cafile);
ks.store(out, passphrase);
//out.close();
logger.debug(">>>> Added certificate to keystore 'jssecacerts' using alias '"+ alias + "'");
return cafile;
} catch (javax.net.ssl.SSLException e) {
logger.debug("明文连接,javax.net.ssl.SSLException:" + e.getMessage());
return null;
} catch (KeyStoreException e) {
e.printStackTrace();
return null;
} catch (FileNotFoundException e) {
e.printStackTrace();
return null;
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
return null;
}catch (java.net.SocketTimeoutException e) {
logger.debug("邮件发送超时");
return null;
} catch (CertificateException e) {
e.printStackTrace();
return null;
} catch (IOException e) {
e.printStackTrace();
return null;
} catch (KeyManagementException e) {
e.printStackTrace();
return null;
}finally{
System.out.println("关闭连接...");
try{
if( in!=null)in.close();
if( socket!=null)socket.close();
if( out!=null)out.close();
}catch (IOException e) {
e.printStackTrace();
System.out.println("关闭连接失败!");
}
}
}
private static final char[] HEXDIGITS = "0123456789abcdef".toCharArray();
private static String toHexString(byte[] bytes) {
StringBuilder sb = new StringBuilder(bytes.length * 3);
for (int b : bytes) {
b &= 0xff;
sb.append(HEXDIGITS[b >> 4]);
sb.append(HEXDIGITS[b & 15]);
sb.append(' ');
}
return sb.toString();
}
private static class SavingTrustManager implements X509TrustManager {
private final X509TrustManager tm;
private X509Certificate[] chain;
SavingTrustManager(X509TrustManager tm) {
this.tm = tm;
}
public X509Certificate[] getAcceptedIssuers() {
throw new UnsupportedOperationException();
}
public void checkClientTrusted(X509Certificate[] chain, String authType)
throws CertificateException {
throw new UnsupportedOperationException();
}
public void checkServerTrusted(X509Certificate[] chain, String authType)
throws CertificateException {
this.chain = chain;
tm.checkServerTrusted(chain, authType);
}
}
/*
*
* //main 函数 public static void main(String[] args) { File cert=null;
* if(cert == null){ try { cert =
* CertUtil.get("smtp.qq.com",Integer.parseInt("587")); } catch (Exception
* e) { logger.debug(" michael create eror...."); } }
*
* if (cert != null) {
*
* System.setProperty("javax.net.ssl.trustStore", cert .getAbsolutePath());
* } logger.debug("the cert is = "+cert);
*
* }
*/
}
|
[
"hollykunge@163.com"
] |
hollykunge@163.com
|
73cd2745d87ee724854e9c721802d955224cd7b5
|
4351758d53603c5aae6c2c1b1d2f8c1edd01d320
|
/src/utility/ILogger.java
|
3a92ff2c89383a8c4eff9683321a7725159793b1
|
[] |
no_license
|
grouptheory/MKSolver
|
c4e06f15511abb038bbcede606f7abe162da25c7
|
b2aa52fdbe597e344954886371328a7dd8182117
|
refs/heads/master
| 2020-03-16T23:30:27.814117
| 2018-05-11T19:28:55
| 2018-05-11T19:28:55
| 133,080,361
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 601
|
java
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package utility;
/**
*
* @author grouptheory
*/
public interface ILogger {
public interface Level {}
void setDefaultVerbosity(Level level);
void setVerbosity(String module, Level level);
Level getVerbosity(String module);
public void debug(String module, String msg);
public void info(String module, String msg);
public void warn(String module, String msg);
public void error(String module, String msg);
public void fatal(String module, String msg);
}
|
[
"grouptheory@gmail.com"
] |
grouptheory@gmail.com
|
082493260123eeceaca139df9f70df708c0b7063
|
254697a961d3b54bd7fb6838cab8bca92ed62966
|
/Common/src/test/java/org/voovan/test/tools/collection/MulitMapUnit.java
|
b7a4f975764f38e2c821e7438787297ab3d1019a
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] |
permissive
|
moyu3390/Voovan
|
d6f79fb283b24858f5e31338c90b9456e1df3875
|
ae1f9539317c0b643660537263169ade400ad8a4
|
refs/heads/master
| 2023-03-11T09:28:03.847227
| 2022-05-19T14:19:31
| 2022-05-19T14:19:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 879
|
java
|
package org.voovan.test.tools.collection;
import junit.framework.TestCase;
import org.voovan.Global;
import org.voovan.tools.collection.MultiMap;
import org.voovan.tools.TEnv;
/**
* 类文字命名
*
* @author: helyho
* DBase Framework.
* WebSite: https://github.com/helyho/DBase
* Licence: Apache v2 License
*/
public class MulitMapUnit extends TestCase {
public void testMulitThreads(){
MultiMap m = new MultiMap();
String key = "key";
for(int i=0;i<1000;i++){
int mi = i;
Global.getThreadPool().execute(()->{
m.putValue(key, mi);
});
}
for(int i=5;i<1000;i++){
int mi = i;
Global.getThreadPool().execute(()->{
m.removeValue(key, 1);
});
}
while(true) {
TEnv.sleep(1);
}
}
}
|
[
"helyho@gmail.com"
] |
helyho@gmail.com
|
34e7c23d0fdd8d10b8ba94bf151144338035f4c6
|
4ccfc830dc68ca65a71e8531ed340b3b6efaa7fa
|
/action/com/ehighsun/wxtp/admin/action/AdminPictureAction.java
|
bf29971e9966f122f5adbdf951448323e802fdb6
|
[] |
no_license
|
zhuobinchan/wxtp
|
dc539535974a0a70ed9917545980a50039f98cff
|
32cb68f3d1d7243beae378335b79e711d9d7e39d
|
refs/heads/master
| 2020-12-30T15:29:30.950681
| 2017-05-13T02:55:26
| 2017-05-13T02:55:28
| 91,144,389
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,614
|
java
|
package com.ehighsun.wxtp.admin.action;
import javax.annotation.Resource;
import com.ehighsun.wxtp.base.action.BaseAction;
import com.ehighsun.wxtp.dao.BaseDao;
import com.ehighsun.wxtp.pojo.Suishoupai;
public class AdminPictureAction extends BaseAction {
private Suishoupai ssp = new Suishoupai();
@Resource(name="baseDao")
private BaseDao<Suishoupai> baseDao;
public AdminPictureAction() {
super.setObject(ssp);
super.initialize();
}
@Override
public String findPageByMap() {
super.setPageSize(20);
super.setHql("From Suishoupai order by poll desc");
super.setMainPage("AdminPicture.jsp");
super.setFindPageTarget("/admin/adminPicture_findPageByMap");
return super.findPageByMap();
}
@Override
public String findPage() {
super.setPageSize(20);
super.setHql("From Suishoupai order by poll desc");
super.setMainPage("AdminPicture.jsp");
super.setFindPageTarget("/admin/adminPicture_findPage");
return super.findPage();
}
public String passPictures(){
String[] idList = super.getIds().split(",");
for (String id : idList) {
baseDao.executeSql("update suishoupai set status = '1' where id ="+id);
}
super.getJson().put("message", "true");
return "ReturnAjax";
}
public String failPictures(){
String[] idList = super.getIds().split(",");
for (String id : idList) {
baseDao.executeSql("update suishoupai set status = '0' where id ="+id);
}
super.getJson().put("message", "true");
return "ReturnAjax";
}
public Suishoupai getSsp() {
return ssp;
}
public void setSsp(Suishoupai ssp) {
this.ssp = ssp;
}
}
|
[
"bin1095256592@qq.com"
] |
bin1095256592@qq.com
|
dfd28c0fec086f8119966543a286fff044b94f61
|
eb36ddb1e9c25d2a35d1fc94abaa6ef0f8fa6f7b
|
/src/main/java/POGOProtos/Rpc/CombatLogProtoOrBuilder.java
|
57b59ab4f4183895ba7edf1a0d0fbac64fc29590
|
[
"BSD-3-Clause"
] |
permissive
|
pokemongo-dev-contrib/pogoprotos-java
|
bbc941b238c051fd1430d364fae108604b13eebd
|
af129776faf08bfbfc69b32e19e8293bff2e8991
|
refs/heads/master
| 2021-06-10T15:45:44.441267
| 2021-02-04T21:46:16
| 2021-02-04T21:46:16
| 83,863,204
| 6
| 1
|
NOASSERTION
| 2020-10-17T20:10:32
| 2017-03-04T03:51:45
|
Java
|
UTF-8
|
Java
| false
| true
| 2,942
|
java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: POGOProtos.Rpc.proto
package POGOProtos.Rpc;
public interface CombatLogProtoOrBuilder extends
// @@protoc_insertion_point(interface_extends:POGOProtos.Rpc.CombatLogProto)
com.google.protobuf.MessageOrBuilder {
/**
* <code>.POGOProtos.Rpc.CombatSeasonResult lifetime_results = 1;</code>
* @return Whether the lifetimeResults field is set.
*/
boolean hasLifetimeResults();
/**
* <code>.POGOProtos.Rpc.CombatSeasonResult lifetime_results = 1;</code>
* @return The lifetimeResults.
*/
POGOProtos.Rpc.CombatSeasonResult getLifetimeResults();
/**
* <code>.POGOProtos.Rpc.CombatSeasonResult lifetime_results = 1;</code>
*/
POGOProtos.Rpc.CombatSeasonResultOrBuilder getLifetimeResultsOrBuilder();
/**
* <code>.POGOProtos.Rpc.CombatSeasonResult current_season_results = 2;</code>
* @return Whether the currentSeasonResults field is set.
*/
boolean hasCurrentSeasonResults();
/**
* <code>.POGOProtos.Rpc.CombatSeasonResult current_season_results = 2;</code>
* @return The currentSeasonResults.
*/
POGOProtos.Rpc.CombatSeasonResult getCurrentSeasonResults();
/**
* <code>.POGOProtos.Rpc.CombatSeasonResult current_season_results = 2;</code>
*/
POGOProtos.Rpc.CombatSeasonResultOrBuilder getCurrentSeasonResultsOrBuilder();
/**
* <code>repeated .POGOProtos.Rpc.VsSeekerBattleResult current_vs_seeker_set_results = 4;</code>
*/
java.util.List<POGOProtos.Rpc.VsSeekerBattleResult>
getCurrentVsSeekerSetResultsList();
/**
* <code>repeated .POGOProtos.Rpc.VsSeekerBattleResult current_vs_seeker_set_results = 4;</code>
*/
POGOProtos.Rpc.VsSeekerBattleResult getCurrentVsSeekerSetResults(int index);
/**
* <code>repeated .POGOProtos.Rpc.VsSeekerBattleResult current_vs_seeker_set_results = 4;</code>
*/
int getCurrentVsSeekerSetResultsCount();
/**
* <code>repeated .POGOProtos.Rpc.VsSeekerBattleResult current_vs_seeker_set_results = 4;</code>
*/
java.util.List<? extends POGOProtos.Rpc.VsSeekerBattleResultOrBuilder>
getCurrentVsSeekerSetResultsOrBuilderList();
/**
* <code>repeated .POGOProtos.Rpc.VsSeekerBattleResult current_vs_seeker_set_results = 4;</code>
*/
POGOProtos.Rpc.VsSeekerBattleResultOrBuilder getCurrentVsSeekerSetResultsOrBuilder(
int index);
/**
* <code>.POGOProtos.Rpc.CombatSeasonResult previous_season_results = 5;</code>
* @return Whether the previousSeasonResults field is set.
*/
boolean hasPreviousSeasonResults();
/**
* <code>.POGOProtos.Rpc.CombatSeasonResult previous_season_results = 5;</code>
* @return The previousSeasonResults.
*/
POGOProtos.Rpc.CombatSeasonResult getPreviousSeasonResults();
/**
* <code>.POGOProtos.Rpc.CombatSeasonResult previous_season_results = 5;</code>
*/
POGOProtos.Rpc.CombatSeasonResultOrBuilder getPreviousSeasonResultsOrBuilder();
}
|
[
"msntchat@hotmail.fr"
] |
msntchat@hotmail.fr
|
c0dc28197a7d2870dc3c214badecb3ba68de280d
|
f84b9504e2fd86637490f69a2b6550fa5b6f7dde
|
/roulette-api/src/main/java/com/splitthefeatures/rouletteapi/exception/BaseException.java
|
9bde7f1019f5eb470cf7c8b055b8d3bead13b8bb
|
[] |
no_license
|
gabrieldcarvalho/splitthefeatures
|
698235aadd52d30a9a0c428923a56db4f80efd26
|
02955c7c907d8f1df2a8c2e4a491c956fe613823
|
refs/heads/master
| 2020-03-21T10:59:31.669047
| 2018-06-27T02:41:38
| 2018-06-27T02:41:38
| 138,482,786
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 270
|
java
|
package com.splitthefeatures.rouletteapi.exception;
/**
* Created by gabrieldcarvalho on 2018/06/24
*/
public class BaseException extends RuntimeException {
public BaseException() {
}
public BaseException(String message) {
super(message);
}
}
|
[
"="
] |
=
|
624a4a4da7393df22345501a07e5bc07da051ecb
|
6811fd178ae01659b5d207b59edbe32acfed45cc
|
/jira-project/jira-components/jira-core/src/main/java/com/atlassian/jira/jql/validator/StatusCategoryValidator.java
|
79b4ec017b6bf1576df570701e220e383e918095
|
[] |
no_license
|
xiezhifeng/mysource
|
540b09a1e3c62614fca819610841ddb73b12326e
|
44f29e397a6a2da9340a79b8a3f61b3d51e331d1
|
refs/heads/master
| 2023-04-14T00:55:23.536578
| 2018-04-19T11:08:38
| 2018-04-19T11:08:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,584
|
java
|
package com.atlassian.jira.jql.validator;
import com.atlassian.crowd.embedded.api.User;
import com.atlassian.fugue.Option;
import com.atlassian.jira.issue.status.category.StatusCategory;
import com.atlassian.jira.jql.operand.JqlOperandResolver;
import com.atlassian.jira.jql.operand.QueryLiteral;
import com.atlassian.jira.jql.operator.OperatorClasses;
import com.atlassian.jira.jql.resolver.StatusCategoryResolver;
import com.atlassian.jira.util.I18nHelper;
import com.atlassian.jira.util.InjectableComponent;
import com.atlassian.jira.util.MessageSet;
import com.atlassian.jira.web.bean.I18nBean;
import com.atlassian.query.clause.TerminalClause;
import com.atlassian.query.operand.Operand;
import java.util.List;
import static com.atlassian.jira.util.dbc.Assertions.notNull;
/**
* A validator that checks to see if a status category exists.
*
* @since v6.2
*/
@InjectableComponent
public class StatusCategoryValidator implements ClauseValidator
{
private final StatusCategoryResolver statusCategoryResolver;
private final SupportedOperatorsValidator supportedOperatorsValidator;
private final JqlOperandResolver jqlOperandResolver;
public StatusCategoryValidator(final JqlOperandResolver jqlOperandResolver, StatusCategoryResolver statusCategoryResolver)
{
this.statusCategoryResolver = notNull("statusCategoryResolver", statusCategoryResolver);
this.jqlOperandResolver = notNull("jqlOperandResolver", jqlOperandResolver);
this.supportedOperatorsValidator = getSupportedOperatorsValidator();
}
public MessageSet validate(final User searcher, final TerminalClause terminalClause)
{
//note: categories are visible to everyone
final MessageSet messageSet = supportedOperatorsValidator.validate(searcher, terminalClause);
if (!messageSet.hasAnyErrors())
{
final Operand operand = terminalClause.getOperand();
final List<QueryLiteral> rawValues = jqlOperandResolver.getValues(searcher, operand, terminalClause);
if (rawValues != null)
{
// Now lets look up the status category and see if it exists
final I18nHelper i18n = getI18n(searcher);
for (QueryLiteral rawValue : rawValues)
{
// empty literals are always valid
if (rawValue.isEmpty())
{
continue;
}
// Get a status category for each individual raw value and see if it resolves
final Option<StatusCategory> statusCategory = statusCategoryResolver.getStatusCategory(rawValue);
if (!statusCategory.isDefined())
{
if (rawValue.getLongValue() != null)
{
if (jqlOperandResolver.isFunctionOperand(rawValue.getSourceOperand()))
{
messageSet.addErrorMessage(i18n.getText("jira.jql.clause.no.value.for.name.from.function", rawValue.getSourceOperand().getName(), terminalClause.getName()));
}
else
{
messageSet.addErrorMessage(i18n.getText("jira.jql.clause.no.value.for.id", terminalClause.getName(), rawValue.toString()));
}
}
else if (rawValue.getStringValue() != null)
{
if (jqlOperandResolver.isFunctionOperand(rawValue.getSourceOperand()))
{
messageSet.addErrorMessage(i18n.getText("jira.jql.clause.no.value.for.name.from.function", rawValue.getSourceOperand().getName(), terminalClause.getName()));
}
else
{
messageSet.addErrorMessage(i18n.getText("jira.jql.clause.no.value.for.name", terminalClause.getName(), rawValue.toString()));
}
}
}
}
}
}
return messageSet;
}
SupportedOperatorsValidator getSupportedOperatorsValidator()
{
return new SupportedOperatorsValidator(OperatorClasses.EQUALITY_OPERATORS_WITH_EMPTY);
}
///CLOVER:OFF
I18nHelper getI18n(User user)
{
return new I18nBean(user);
}
///CLOVER:ON
}
|
[
"moink635@gmail.com"
] |
moink635@gmail.com
|
02c7f625f61bfa27e8c051694ca15af8887d94c2
|
76be7a97182832703e841b9640ac97289ac005cf
|
/myBatisGenerator/src/main/java/com/zr/mapper/UmsIntegrationConsumeSettingMapper.java
|
91b90c8c0c3f593e8badb6ec418dae68eef4f33e
|
[] |
no_license
|
yiitree/my-cloud-template
|
1ef4fbdc3a7444a5838fe9612cf1df1c12e28e8a
|
4039793bc74679563570fe030125062dd7242e3c
|
refs/heads/master
| 2023-05-21T05:47:07.792014
| 2021-06-02T14:24:21
| 2021-06-02T14:24:21
| 373,086,836
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,155
|
java
|
package com.zr.mapper;
import com.zr.domain.UmsIntegrationConsumeSetting;
import com.zr.domain.UmsIntegrationConsumeSettingExample;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface UmsIntegrationConsumeSettingMapper {
long countByExample(UmsIntegrationConsumeSettingExample example);
int deleteByExample(UmsIntegrationConsumeSettingExample example);
int deleteByPrimaryKey(Long id);
int insert(UmsIntegrationConsumeSetting record);
int insertSelective(UmsIntegrationConsumeSetting record);
List<UmsIntegrationConsumeSetting> selectByExample(UmsIntegrationConsumeSettingExample example);
UmsIntegrationConsumeSetting selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") UmsIntegrationConsumeSetting record, @Param("example") UmsIntegrationConsumeSettingExample example);
int updateByExample(@Param("record") UmsIntegrationConsumeSetting record, @Param("example") UmsIntegrationConsumeSettingExample example);
int updateByPrimaryKeySelective(UmsIntegrationConsumeSetting record);
int updateByPrimaryKey(UmsIntegrationConsumeSetting record);
}
|
[
"772701414@qq.com"
] |
772701414@qq.com
|
a938243a30024aa82ac17a0e7dd4e8f458abaf16
|
882520ee42d1ae4400b5161e57b38160eadbc4b9
|
/src/sqlancer/sqlite3/SQLite3Options.java
|
90c964360418d3368e1669bacd723a8278eb0c6c
|
[
"MIT"
] |
permissive
|
jazzplato/sqlancer
|
08600f29c8a733759b5bbc375bc7dbdde9929ae4
|
86db783c0d0db6ef5ad484dfa0cd62cf41698544
|
refs/heads/master
| 2022-11-24T16:06:26.151331
| 2020-07-24T17:53:04
| 2020-07-24T17:53:04
| 282,301,952
| 0
| 0
|
MIT
| 2020-07-24T19:37:54
| 2020-07-24T19:37:53
| null |
UTF-8
|
Java
| false
| false
| 6,370
|
java
|
package sqlancer.sqlite3;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import com.beust.jcommander.Parameter;
import com.beust.jcommander.Parameters;
import sqlancer.CompositeTestOracle;
import sqlancer.TestOracle;
import sqlancer.sqlite3.SQLite3Provider.SQLite3GlobalState;
import sqlancer.sqlite3.oracle.SQLite3Fuzzer;
import sqlancer.sqlite3.oracle.SQLite3NoRECOracle;
import sqlancer.sqlite3.oracle.SQLite3PivotedQuerySynthesisOracle;
import sqlancer.sqlite3.oracle.tlp.SQLite3TLPAggregateOracle;
import sqlancer.sqlite3.oracle.tlp.SQLite3TLPDistinctOracle;
import sqlancer.sqlite3.oracle.tlp.SQLite3TLPGroupByOracle;
import sqlancer.sqlite3.oracle.tlp.SQLite3TLPHavingOracle;
import sqlancer.sqlite3.oracle.tlp.SQLite3TLPWhereOracle;
@Parameters(separators = "=", commandDescription = "SQLite3")
public class SQLite3Options {
@Parameter(names = { "--test-fts" }, description = "Test the FTS extensions", arity = 1)
public boolean testFts = true;
@Parameter(names = { "--test-rtree" }, description = "Test the R*Tree extensions", arity = 1)
public boolean testRtree = true;
@Parameter(names = {
"--test-dbstats" }, description = "Test the DBSTAT Virtual Table (see https://www.sqlite.org/dbstat.html)", arity = 1)
public boolean testDBStats;
@Parameter(names = { "--test-generated-columns" }, description = "Test generated columns", arity = 1)
public boolean testGeneratedColumns = true;
@Parameter(names = { "--test-foreign-keys" }, description = "Test foreign key constraints", arity = 1)
public boolean testForeignKeys = true;
@Parameter(names = { "--test-without-rowids" }, description = "Generate WITHOUT ROWID tables", arity = 1)
public boolean testWithoutRowids = true;
@Parameter(names = { "--test-temp-tables" }, description = "Generate TEMP/TEMPORARY tables", arity = 1)
public boolean testTempTables = true;
@Parameter(names = { "--test-check-constraints" }, description = "Allow CHECK constraints in tables", arity = 1)
public boolean testCheckConstraints = true;
@Parameter(names = {
"--test-nulls-first-last" }, description = "Allow NULLS FIRST/NULLS LAST in ordering terms", arity = 1)
public boolean testNullsFirstLast = true;
@Parameter(names = { "--test-joins" }, description = "Allow the generation of JOIN clauses", arity = 1)
public boolean testJoins = true;
@Parameter(names = {
"--test-functions" }, description = "Allow the generation of functions in expressions", arity = 1)
public boolean testFunctions = true;
@Parameter(names = {
"--test-soundex" }, description = "Test the soundex function, which can be enabled using a compile-time option.", arity = 1)
public boolean testSoundex;
@Parameter(names = { "--test-match" }, description = "Allow the generation of the MATCH operator", arity = 1)
public boolean testMatch = true;
@Parameter(names = {
"--test-distinct-in-view" }, description = "DISTINCT in views might cause occasional false positives in NoREC and TLP", arity = 1)
public boolean testDistinctInView;
@Parameter(names = "--oracle")
public SQLite3Oracle oracle = SQLite3Oracle.NoREC;
@Parameter(names = {
"--delete-existing-databases" }, description = "Delete a database file if it already exists", arity = 1)
public boolean deleteIfExists = true;
@Parameter(names = {
"--generate-new-database" }, description = "Specifies whether new databases should be generated", arity = 1)
public boolean generateDatabase = true;
@Parameter(names = {
"--execute-queries" }, description = "Specifies whether the query in the fuzzer should be executed", arity = 1)
public boolean executeQuery = true;
public enum SQLite3Oracle {
PQS {
@Override
public TestOracle create(SQLite3GlobalState globalState) throws SQLException {
return new SQLite3PivotedQuerySynthesisOracle(globalState);
}
},
NoREC {
@Override
public TestOracle create(SQLite3GlobalState globalState) throws SQLException {
return new SQLite3NoRECOracle(globalState);
}
},
AGGREGATE {
@Override
public TestOracle create(SQLite3GlobalState globalState) throws SQLException {
return new SQLite3TLPAggregateOracle(globalState);
}
},
WHERE {
@Override
public TestOracle create(SQLite3GlobalState globalState) throws SQLException {
return new SQLite3TLPWhereOracle(globalState);
}
},
DISTINCT {
@Override
public TestOracle create(SQLite3GlobalState globalState) throws SQLException {
return new SQLite3TLPDistinctOracle(globalState);
}
},
GROUP_BY {
@Override
public TestOracle create(SQLite3GlobalState globalState) throws SQLException {
return new SQLite3TLPGroupByOracle(globalState);
}
},
HAVING {
@Override
public TestOracle create(SQLite3GlobalState globalState) throws SQLException {
return new SQLite3TLPHavingOracle(globalState);
}
},
FUZZER {
@Override
public TestOracle create(SQLite3GlobalState globalState) throws SQLException {
return new SQLite3Fuzzer(globalState);
}
},
QUERY_PARTITIONING {
@Override
public TestOracle create(SQLite3GlobalState globalState) throws SQLException {
List<TestOracle> oracles = new ArrayList<>();
oracles.add(new SQLite3TLPWhereOracle(globalState));
oracles.add(new SQLite3TLPDistinctOracle(globalState));
oracles.add(new SQLite3TLPGroupByOracle(globalState));
oracles.add(new SQLite3TLPHavingOracle(globalState));
oracles.add(new SQLite3TLPAggregateOracle(globalState));
return new CompositeTestOracle(oracles);
}
};
public abstract TestOracle create(SQLite3GlobalState globalState) throws SQLException;
}
}
|
[
"manuel.rigger@inf.ethz.ch"
] |
manuel.rigger@inf.ethz.ch
|
e040ef6a8f16b20c3248bf3ef412a5ce4141e318
|
cbc61ffb33570a1bc55bb1e754510192b0366de2
|
/ole-app/olefs/src/main/java/org/kuali/ole/sys/service/impl/AccountingLineServiceImpl.java
|
c75f355fb46edf012ea556a25075dc43a8f30aba
|
[
"ECL-2.0"
] |
permissive
|
VU-libtech/OLE-INST
|
42b3656d145a50deeb22f496f6f430f1d55283cb
|
9f5efae4dfaf810fa671c6ac6670a6051303b43d
|
refs/heads/master
| 2021-07-08T11:01:19.692655
| 2015-05-15T14:40:50
| 2015-05-15T14:40:50
| 24,459,494
| 1
| 0
|
ECL-2.0
| 2021-04-26T17:01:11
| 2014-09-25T13:40:33
|
Java
|
UTF-8
|
Java
| false
| false
| 2,383
|
java
|
/*
* Copyright 2007 The Kuali Foundation
*
* Licensed under the Educational Community License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/licenses/ecl2.php
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.kuali.ole.sys.service.impl;
import java.util.List;
import org.kuali.ole.sys.dataaccess.AccountingLineDao;
import org.kuali.ole.sys.service.AccountingLineService;
import org.kuali.ole.sys.service.NonTransactional;
/**
* This class is the service implementation for the AccountingLine structure. This has been created with polymorphism in mind so
* that this service can be used for performing services for both the Source and Target AccountingLineBase structures. This is the
* default, Kuali provided implementation.
*/
@NonTransactional
public class AccountingLineServiceImpl implements AccountingLineService {
// set up logging
private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(AccountingLineServiceImpl.class);
private AccountingLineDao accountingLineDao;
/**
* Default constructor
*/
public AccountingLineServiceImpl() {
super();
}
/**
* Retrieves an accounting line by its document header id. Will retrieve any object that extends AccountingLineBase (i.e. Source
* and Target lines).
*
* @param Class The specific child class type to be retrieved.
* @param Long
*/
public List getByDocumentHeaderId(Class clazz, String documentHeaderId) {
// retrieve the line
return getAccountingLineDao().findByDocumentHeaderId(clazz, documentHeaderId);
}
// needed for Spring injection
/**
* Sets the data access object
*
* @param d
*/
public void setAccountingLineDao(AccountingLineDao d) {
this.accountingLineDao = d;
}
/**
* Retrieves a data access object
*/
public AccountingLineDao getAccountingLineDao() {
return accountingLineDao;
}
}
|
[
"david.lacy@villanova.edu"
] |
david.lacy@villanova.edu
|
a2a055ee2b4c4f92e7e057b07b6f1f0b6c2cdba0
|
31540ee24da4983238f22643e88b62cee73f32f9
|
/sd2021-tp1/src/tp1/impl/srv/rest/UsersResources.java
|
1697f889885d217eb052ff7cc0d3be51f4ed8209
|
[] |
no_license
|
smduarte/sd2021-tp1
|
789d766fcef73373fccf823773514b0515cc17bc
|
e7d6ed50a7d466c8fa6a3a9a8a797fa79deea55b
|
refs/heads/main
| 2023-04-24T07:58:49.932147
| 2021-05-13T13:28:55
| 2021-05-13T13:28:55
| 365,859,447
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,786
|
java
|
package tp1.impl.srv.rest;
import java.util.List;
import java.util.logging.Logger;
import jakarta.inject.Singleton;
import jakarta.ws.rs.Path;
import tp1.api.User;
import tp1.api.service.java.Users;
import tp1.api.service.rest.RestUsers;
import tp1.impl.srv.common.JavaUsers;
@Singleton
@Path(RestUsers.PATH)
public class UsersResources extends RestResource implements RestUsers {
private static Logger Log = Logger.getLogger(UsersResources.class.getName());
final Users impl ;
static UsersResources instance;
public UsersResources() {
impl = new JavaUsers();
instance = this;
}
@Override
public String createUser(User user) {
Log.info(String.format("REST createUser: user = %s\n", user));
return resultOrThrow( impl.createUser( user ));
}
@Override
public User getUser(String userId, String password) {
Log.info(String.format("REST getUser: userId = %s password=%s\n", userId, password));
return resultOrThrow( impl.getUser(userId, password));
}
@Override
public User updateUser(String userId, String password, User user) {
Log.info(String.format("REST updateUser: userId = %s, user = %s\n", userId, user));
return resultOrThrow( impl.updateUser(userId, password, user));
}
@Override
public User deleteUser(String userId, String password) {
Log.info(String.format("REST deleteUser: userId = %s\n", userId));
return resultOrThrow( impl.deleteUser(userId, password));
}
@Override
public List<User> searchUsers(String pattern) {
Log.info(String.format("REST searchUsers: pattern = %s", pattern));
return resultOrThrow( impl.searchUsers(pattern));
}
@Override
public User fetchUser(String userId) {
Log.info(String.format("REST fetchUser: userId = %s", userId));
return resultOrThrow( impl.fetchUser(userId));
}
}
|
[
"smd@fct.unl.pt"
] |
smd@fct.unl.pt
|
f29901a1ace0c75b558cd687a909a3bb6098b4ac
|
f321db1ace514d08219cc9ba5089ebcfff13c87a
|
/generated-tests/adynamosa/tests/s1033/25_okio/evosuite-tests/okio/RealBufferedSource_ESTest_scaffolding.java
|
0b052672d3c2b67a60d83ad29df3d5836cdacb72
|
[] |
no_license
|
sealuzh/dynamic-performance-replication
|
01bd512bde9d591ea9afa326968b35123aec6d78
|
f89b4dd1143de282cd590311f0315f59c9c7143a
|
refs/heads/master
| 2021-07-12T06:09:46.990436
| 2020-06-05T09:44:56
| 2020-06-05T09:44:56
| 146,285,168
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,345
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Wed Jul 24 04:53:46 GMT 2019
*/
package okio;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.junit.AfterClass;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class RealBufferedSource_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "okio.RealBufferedSource";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@AfterClass
public static void clearEvoSuiteFramework(){
Sandbox.resetDefaultSecurityManager();
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
setSystemProperties();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
java.lang.System.setProperty("user.dir", "/home/apaniche/performance/Dataset/gordon_scripts/projects/25_okio");
java.lang.System.setProperty("java.io.tmpdir", "/tmp");
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(RealBufferedSource_ESTest_scaffolding.class.getClassLoader() ,
"okio.RealBufferedSource$1",
"okio.Pipe$PipeSink",
"okio.Okio",
"okio.Base64",
"okio.RealBufferedSource",
"okio.Source",
"okio.HashingSink",
"okio.Timeout$1",
"okio.Options",
"okio.Okio$4",
"okio.Sink",
"okio.Buffer$UnsafeCursor",
"okio.Timeout",
"okio.BufferedSink",
"okio.AsyncTimeout",
"okio.ByteString",
"okio.ForwardingSource",
"okio.GzipSource",
"okio.Segment",
"okio.Util",
"okio.SegmentPool",
"okio.Buffer",
"okio.RealBufferedSink$1",
"okio.Pipe",
"okio.DeflaterSink",
"okio.RealBufferedSink",
"okio.SegmentedByteString",
"okio.BufferedSource",
"okio.GzipSink",
"okio.HashingSource",
"okio.ForwardingSink",
"okio.Pipe$PipeSource",
"okio.Buffer$2",
"okio.Buffer$1",
"okio.InflaterSource"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(RealBufferedSource_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"okio.RealBufferedSource",
"okio.RealBufferedSource$1",
"okio.Buffer",
"okio.Pipe",
"okio.Pipe$PipeSink",
"okio.Timeout$1",
"okio.Timeout",
"okio.Pipe$PipeSource",
"okio.InflaterSource",
"okio.GzipSource",
"okio.Okio",
"okio.ForwardingSink",
"okio.HashingSink",
"okio.ByteString",
"okio.ForwardingSource",
"okio.HashingSource",
"okio.Buffer$UnsafeCursor",
"okio.Util",
"okio.SegmentPool",
"okio.Segment",
"okio.Base64",
"okio.RealBufferedSink",
"okio.DeflaterSink",
"okio.Buffer$2",
"okio.Options",
"okio.SegmentedByteString",
"okio.RealBufferedSink$1",
"okio.GzipSink"
);
}
}
|
[
"granogiovanni90@gmail.com"
] |
granogiovanni90@gmail.com
|
2e9d4517d31e2d895d0d91fff27066b33311b961
|
f897a0dfa41a10e19a15568aace27171f8d6a23a
|
/reposilite-backend/src/main/java/org/panda_lang/reposilite/auth/AuthDto.java
|
09478fa350bd5afd523352bbb823c4355607c9a4
|
[
"Apache-2.0"
] |
permissive
|
KnologyBase/reposilite
|
119331221946329ab6ed7d388c1720d3e6d409ec
|
2c04b4ed157d97337755d3e5a37da2f6866f5dff
|
refs/heads/master
| 2022-12-22T00:01:46.581370
| 2020-09-23T16:14:00
| 2020-09-23T16:14:00
| 298,048,776
| 1
| 0
|
Apache-2.0
| 2020-09-23T17:43:32
| 2020-09-23T17:43:32
| null |
UTF-8
|
Java
| false
| false
| 1,232
|
java
|
/*
* Copyright (c) 2020 Dzikoysk
*
* 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.panda_lang.reposilite.auth;
import java.io.Serializable;
import java.util.List;
final class AuthDto implements Serializable {
private final boolean manager;
private final String path;
private final List<String> repositories;
AuthDto(boolean manager, String path, List<String> repositories) {
this.manager = manager;
this.path = path;
this.repositories = repositories;
}
public List<String> getRepositories() {
return repositories;
}
public String getPath() {
return path;
}
public boolean isManager() {
return manager;
}
}
|
[
"dzikoysk@dzikoysk.net"
] |
dzikoysk@dzikoysk.net
|
1e448b013934ad5d2f5edee247abcd7c02ebe93c
|
e77c0024f1e81268d79ee8d50590f1a133039230
|
/easymodbus4j-example/src/main/java/com/github/zengfr/easymodbus4j/example/ModbusSetup.java
|
ae2bec086a004a28218687da129e258f587f9c61
|
[
"Apache-2.0"
] |
permissive
|
vinsun122/easymodbus4j
|
b08580ca2dd62cfd85bbac083064632f72fea8de
|
4782a6eceac449ce31bed8977cc7813ae7865ecd
|
refs/heads/master
| 2020-06-21T01:01:46.918557
| 2019-04-13T08:27:38
| 2019-06-08T03:34:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,490
|
java
|
package com.github.zengfr.easymodbus4j.example;
import com.github.zengfr.easymodbus4j.client.ModbusClient;
import com.github.zengfr.easymodbus4j.client.ModbusClientFactory;
import com.github.zengfr.easymodbus4j.example.handler.ModbusMasterResponseHandler;
import com.github.zengfr.easymodbus4j.example.handler.ModbusSlaveRequestHandler;
import com.github.zengfr.easymodbus4j.handle.ModbusRequestHandler;
import com.github.zengfr.easymodbus4j.handle.ModbusResponseHandler;
import com.github.zengfr.easymodbus4j.server.ModbusServer;
import com.github.zengfr.easymodbus4j.server.ModbusServerFactory;
public class ModbusSetup {
private static final int sleep = 1000;
protected ModbusClient modbusClient;
protected ModbusServer modbusServer;
protected ModbusRequestHandler requestHandler;
protected ModbusResponseHandler responseHandler;
public ModbusSetup() {
}
public ModbusClient getModbusClient() {
return this.modbusClient;
}
public ModbusServer getModbusServer() {
return this.modbusServer;
}
public void init(short transactionIdentifierOffset) throws Exception {
requestHandler = new ModbusSlaveRequestHandler(transactionIdentifierOffset);
responseHandler = new ModbusMasterResponseHandler(transactionIdentifierOffset);
// System.setProperty("io.netty.noUnsafe", "false");
// System.setProperty("io.netty.tryReflectionSetAccessible", "true");
// InternalLoggerFactory.setDefaultFactory(new Log4JLoggerFactory());
// ReferenceCountUtil.release(byteBuf);
// ResourceLeakDetector.setLevel(ResourceLeakDetector.Level.ADVANCED);
}
public void setHandler(ModbusRequestHandler requestHandler, ModbusResponseHandler responseHandler) throws Exception {
this.requestHandler = requestHandler;
this.responseHandler = responseHandler;
}
public void setupServer4Master(int port) throws Exception {
modbusServer = ModbusServerFactory.getInstance().createServer4Master(port, responseHandler);
}
public void setupServer4Slave(int port) throws Exception {
modbusServer = ModbusServerFactory.getInstance().createServer4Slave(port, requestHandler);
}
public void setupClient4Slave(String host, int port) throws Exception {
Thread.sleep(sleep);
modbusClient = ModbusClientFactory.getInstance().createClient4Slave(host, port, requestHandler);
}
public void setupClient4Master(String host, int port) throws Exception {
Thread.sleep(sleep);
modbusClient = ModbusClientFactory.getInstance().createClient4Master(host, port, responseHandler);
}
}
|
[
"zengfrcomputer2@git.com"
] |
zengfrcomputer2@git.com
|
ab399fd0ff166c7555cbb40b8d53ab517daedd46
|
3346c1149913c94aaec4e5811d3407f89d28e756
|
/server/store/jraft/src/main/java/com/alipay/sofa/registry/jraft/processor/LeaderTaskClosure.java
|
12d4337d53242f83ab7e203d9840d12c3e3fc33d
|
[
"Apache-2.0"
] |
permissive
|
timxim/sofa-registry
|
fe71dd596b6e3eb74519ee37af876690d31938c9
|
f4d0bd4f1c86f23d4bcad2201efefd9751b29f16
|
refs/heads/master
| 2020-07-21T15:32:38.861269
| 2020-04-14T07:59:33
| 2020-04-14T07:59:33
| 206,909,787
| 0
| 1
|
Apache-2.0
| 2020-04-14T07:59:34
| 2019-09-07T03:24:11
| null |
UTF-8
|
Java
| false
| false
| 2,432
|
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.alipay.sofa.registry.jraft.processor;
import com.alipay.sofa.jraft.Closure;
import com.alipay.sofa.jraft.Status;
import com.alipay.sofa.registry.jraft.command.ProcessRequest;
/**
*
* @author shangyu.wh
* @version $Id: LeaderTaskClosure.java, v 0.1 2018-05-21 12:18 shangyu.wh Exp $
*/
public class LeaderTaskClosure implements Closure {
private ProcessRequest request;
private Closure done;
private Object response;
@Override
public void run(Status status) {
if (this.done != null) {
done.run(status);
}
}
/**
* Getter method for property <tt>request</tt>.
*
* @return property value of request
*/
public ProcessRequest getRequest() {
return request;
}
/**
* Setter method for property <tt>request</tt>.
*
* @param request value to be assigned to property request
*/
public void setRequest(ProcessRequest request) {
this.request = request;
}
/**
* Setter method for property <tt>done</tt>.
*
* @param done value to be assigned to property done
*/
public void setDone(Closure done) {
this.done = done;
}
/**
* Getter method for property <tt>response</tt>.
*
* @return property value of response
*/
public Object getResponse() {
return response;
}
/**
* Setter method for property <tt>response</tt>.
*
* @param response value to be assigned to property response
*/
public void setResponse(Object response) {
this.response = response;
}
}
|
[
"zhanggeng.zg@antfin.com"
] |
zhanggeng.zg@antfin.com
|
ae2a37132ef9daac2da35270c03758f901126dad
|
2756b8b5f491716ab09b672c8082b3d008ee2628
|
/android/src/com/android/tools/idea/lint/AndroidLintCheckResultInspection.java
|
3bf8747a9fea231550d557ed3c8bb841cbe6ce1e
|
[] |
no_license
|
briskemen/android
|
26e0b24cd2f407fd6f4c1976d49c35b1c03330a5
|
856ee45046de83d8cf149a7cc081225bd55279c2
|
refs/heads/master
| 2022-10-11T08:33:13.126734
| 2020-06-12T15:49:32
| 2020-06-12T15:50:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,898
|
java
|
/*
* Copyright (C) 2016 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.android.tools.idea.lint;
import static com.android.tools.lint.checks.CheckResultDetector.CHECK_RESULT;
import com.android.tools.lint.detector.api.LintFix;
import com.intellij.psi.PsiElement;
import org.jetbrains.android.inspections.lint.AndroidLintInspectionBase;
import org.jetbrains.android.inspections.lint.AndroidLintQuickFix;
import org.jetbrains.android.util.AndroidBundle;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public class AndroidLintCheckResultInspection extends AndroidLintInspectionBase {
public AndroidLintCheckResultInspection() {
super(AndroidBundle.message("android.lint.inspections.check.result"), CHECK_RESULT);
}
@Override
@NotNull
public AndroidLintQuickFix[] getQuickFixes(@NotNull PsiElement startElement,
@NotNull PsiElement endElement,
@NotNull String message,
@Nullable LintFix fixData) {
String suggested = LintFix.getData(fixData, String.class);
if (suggested != null) {
return new AndroidLintQuickFix[]{ new ReplaceCallFix(suggested) };
}
return super.getQuickFixes(startElement, endElement, message, fixData);
}
}
|
[
"tnorbye@google.com"
] |
tnorbye@google.com
|
100a5f6c525deb2aa6d1016d0a885b1d2a90f4a9
|
dfd92d16974152745e4e0deeb26b9609a1b3546a
|
/src/main/java/edu/hm/hafner/analysis/ReaderFactory.java
|
4e5b3495a4b7e2c81eab87f2d54e2f7b16cf3a13
|
[
"MIT"
] |
permissive
|
HmSebastianH/analysis-model
|
82e9b3dc76e6356ef95d8de771b481f6bb6e533e
|
9d23eea68b888641bbaa3848338ab2470000f038
|
refs/heads/master
| 2020-05-02T22:31:51.046946
| 2019-05-28T10:01:22
| 2019-05-28T10:01:22
| 178,253,981
| 0
| 0
|
MIT
| 2019-03-28T17:41:25
| 2019-03-28T17:41:25
| null |
UTF-8
|
Java
| false
| false
| 6,511
|
java
|
package edu.hm.hafner.analysis;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.Reader;
import java.io.UncheckedIOException;
import java.nio.charset.Charset;
import java.nio.file.InvalidPathException;
import java.util.function.Function;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.apache.commons.io.input.ReaderInputStream;
import org.apache.commons.lang3.StringUtils;
import org.w3c.dom.Document;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import com.google.errorprone.annotations.MustBeClosed;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import static org.apache.xerces.impl.Constants.*;
/**
* Provides several useful helper methods to read the contents of a resource that is given by a {@link Reader}.
*
* @author Ullrich Hafner
*/
public abstract class ReaderFactory {
private static final Function<String, String> IDENTITY = Function.identity();
private final Charset charset;
private final Function<String, String> lineMapper;
private static final Pattern ANSI_COLOR_CODES
= Pattern.compile("\u001B\\[[;\\d]*[ -/]*[@-~]");
private static final Function<String, String> REMOVE_COLOR_CODES
= string -> ANSI_COLOR_CODES.matcher(string).replaceAll(StringUtils.EMPTY);
/**
* Creates a new factory to read a resource with a given charset.
*
* @param charset
* the charset to use when reading the file
*/
public ReaderFactory(final Charset charset) {
this(charset, IDENTITY);
}
/**
* Creates a new factory to read a resource with a given charset.
*
* @param charset
* the charset to use when reading the file
* @param lineMapper
* provides a mapper to transform each of the resource lines
*/
public ReaderFactory(final Charset charset, final Function<String, String> lineMapper) {
this.charset = charset;
this.lineMapper = lineMapper.compose(REMOVE_COLOR_CODES);
}
/**
* Returns the name of the resource.
*
* @return the file name
*/
public abstract String getFileName();
/**
* Creates a new {@link Reader} for the file.
*
* @return a reader
*/
@MustBeClosed
public abstract Reader create();
/**
* Provides the lines of the file as a {@link Stream} of strings.
*
* @return the file content as stream
* @throws ParsingException
* if the file could not be read
*/
@MustBeClosed
@SuppressWarnings("MustBeClosedChecker")
@SuppressFBWarnings("OS_OPEN_STREAM")
public Stream<String> readStream() {
try {
BufferedReader reader = new BufferedReader(create());
Stream<String> stringStream = reader.lines().onClose(closeReader(reader));
if (hasLineMapper()) {
return stringStream.map(lineMapper);
}
else {
return stringStream;
}
}
catch (UncheckedIOException e) {
throw new ParsingException(e);
}
}
@SuppressWarnings({"illegalcatch", "PMD.DoNotUseThreads", "PMD.AvoidThrowingRawExceptionTypes"})
private Runnable closeReader(final AutoCloseable closeable) {
return () -> {
try {
closeable.close();
}
catch (Exception e) {
throw new RuntimeException(e);
}
};
}
@SuppressWarnings("PMD.CompareObjectsWithEquals")
@SuppressFBWarnings(value = "RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE", justification = "test stub")
private boolean hasLineMapper() {
return lineMapper != null && lineMapper != IDENTITY;
}
/**
* Reads the whole file into a {@link String}.
*
* @return the file content as string
* @throws ParsingException
* if the file could not be read
*/
public String readString() {
try (Stream<String> lines = readStream()) {
return lines.collect(Collectors.joining("\n"));
}
catch (UncheckedIOException e) {
throw new ParsingException(e);
}
}
/**
* Parses the whole file into a {@link Document}.
*
* @return the file content as document
* @throws ParsingException
* if the file could not be parsed
*/
public Document readDocument() {
try (Reader reader = create()) {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
setFeature(factory, SAX_FEATURE_PREFIX, DISALLOW_DOCTYPE_DECL_FEATURE, true);
setFeature(factory, SAX_FEATURE_PREFIX, EXTERNAL_GENERAL_ENTITIES_FEATURE, false);
setFeature(factory, SAX_FEATURE_PREFIX, EXTERNAL_PARAMETER_ENTITIES_FEATURE, false);
setFeature(factory, SAX_FEATURE_PREFIX, RESOLVE_DTD_URIS_FEATURE, false);
setFeature(factory, SAX_FEATURE_PREFIX, USE_ENTITY_RESOLVER2_FEATURE, false);
setFeature(factory, XERCES_FEATURE_PREFIX, CREATE_ENTITY_REF_NODES_FEATURE, false);
setFeature(factory, XERCES_FEATURE_PREFIX, LOAD_DTD_GRAMMAR_FEATURE, false);
setFeature(factory, XERCES_FEATURE_PREFIX, LOAD_EXTERNAL_DTD_FEATURE, false);
factory.setXIncludeAware(false);
factory.setExpandEntityReferences(false);
DocumentBuilder docBuilder = factory.newDocumentBuilder();
return docBuilder.parse(new InputSource(new ReaderInputStream(reader, getCharset())));
}
catch (SAXException | IOException | InvalidPathException | ParserConfigurationException e) {
throw new ParsingException(e);
}
}
@SuppressFBWarnings
@SuppressWarnings("illegalcatch")
private void setFeature(final DocumentBuilderFactory factory, final String prefix, final String feature,
final boolean value) {
try {
factory.setFeature(prefix + feature, value);
}
catch (Exception ignored) {
// ignore and continue
}
}
/**
* Returns the character set that is used to read the stream.
*
* @return the character set
*/
public Charset getCharset() {
return charset;
}
}
|
[
"ullrich.hafner@gmail.com"
] |
ullrich.hafner@gmail.com
|
36478e6bbf056fbaff9d9abafc2b85db4b362989
|
dafdbbb0234b1f423970776259c985e6b571401f
|
/j2me/games/GameSoundsJavaLibraryM/src/main/java/allbinary/media/audio/GameYouWinSound.java
|
e22e47b3b5dd0d3dbf47460b6dfa3637f9ce4105
|
[
"LicenseRef-scancode-warranty-disclaimer"
] |
no_license
|
biddyweb/AllBinary-Platform
|
3581664e8613592b64f20fc3f688dc1515d646ae
|
9b61bc529b0a5e2c647aa1b7ba59b6386f7900ad
|
refs/heads/master
| 2020-12-03T10:38:18.654527
| 2013-11-17T11:17:35
| 2013-11-17T11:17:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 773
|
java
|
/*
* AllBinary Open License Version 1
* Copyright (c) 2011 AllBinary
*
* By agreeing to this license you and any business entity you represent are
* legally bound to the AllBinary Open License Version 1 legal agreement.
*
* You may obtain the AllBinary Open License Version 1 legal agreement from
* AllBinary or the root directory of AllBinary's AllBinary Platform repository.
*
* Created By: Travis Berthelot
*
*/
package allbinary.media.audio;
//Use 8hz16bitmono for most J2ME
public class GameYouWinSound extends CompositeSound
{
private static Sound soundInterface = new GameYouWinSound();
private GameYouWinSound()
{
super("resource:/wav/youwin.wav");
}
public static Sound getInstance()
{
return soundInterface;
}
}
|
[
"travisberthelot@hotmail.com"
] |
travisberthelot@hotmail.com
|
4e4e800c1bd0c6fc471a7b2f2dc25712c4c93f1d
|
5e902a66ce3966a95cde85ad62827bbf84d305e0
|
/service/permission/src/main/java/com/andx/micro/permission/model/Resource.java
|
3c256f31e2a0ddad3ee92fd416d99b556a71d690
|
[] |
no_license
|
mysticalmountain/microservice
|
4c982fd25c33c84182817a7c706616a18565c726
|
961df40c10763f2a1c6c1995f672e2094adb2bf5
|
refs/heads/master
| 2020-07-16T21:42:34.866398
| 2017-07-19T12:06:13
| 2017-07-19T12:06:13
| 94,315,668
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,021
|
java
|
package com.andx.micro.permission.model;
import com.andx.micro.support.jpa.model.CheckEntity;
import com.andx.micro.support.jpa.model.Entity;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;
import javax.persistence.*;
import java.util.Set;
/**
* Created by andongxu on 16-11-14.
*/
@javax.persistence.Entity
public class Resource extends BaseEntity {
@Column(length = 8, name = "resource_type")
@Enumerated(EnumType.STRING)
private ResourceType resourceType;
@OneToMany(targetEntity = Permission.class, mappedBy = "resource")
private Set<Permission> permissions;
public ResourceType getResourceType() {
return resourceType;
}
public void setResourceType(ResourceType resourceType) {
this.resourceType = resourceType;
}
public Set<Permission> getPermissions() {
return permissions;
}
public void setPermissions(Set<Permission> permissions) {
this.permissions = permissions;
}
}
|
[
"dongxudotan@163.com"
] |
dongxudotan@163.com
|
ad603f4f4be3cba587f6fe6b0eec0871471783a8
|
c885ef92397be9d54b87741f01557f61d3f794f3
|
/tests-without-trycatch/Mockito-19/org.mockito.internal.configuration.injection.filter.FinalMockCandidateFilter/default/20/org/mockito/internal/configuration/injection/filter/FinalMockCandidateFilter_ESTest_scaffolding.java
|
2038fbfa15a3172e8fc2605735435d6286083ea8
|
[
"CC-BY-4.0",
"MIT"
] |
permissive
|
pderakhshanfar/EMSE-BBC-experiment
|
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
|
fea1a92c2e7ba7080b8529e2052259c9b697bbda
|
refs/heads/main
| 2022-11-25T00:39:58.983828
| 2022-04-12T16:04:26
| 2022-04-12T16:04:26
| 309,335,889
| 0
| 1
| null | 2021-11-05T11:18:43
| 2020-11-02T10:30:38
| null |
UTF-8
|
Java
| false
| false
| 4,445
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Fri Jul 30 14:26:48 GMT 2021
*/
package org.mockito.internal.configuration.injection.filter;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.junit.AfterClass;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class FinalMockCandidateFilter_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.mockito.internal.configuration.injection.filter.FinalMockCandidateFilter";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@AfterClass
public static void clearEvoSuiteFramework(){
Sandbox.resetDefaultSecurityManager();
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
setSystemProperties();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
java.lang.System.setProperty("user.dir", "/experiment");
java.lang.System.setProperty("java.io.tmpdir", "/tmp");
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(FinalMockCandidateFilter_ESTest_scaffolding.class.getClassLoader() ,
"org.mockito.internal.configuration.injection.filter.FinalMockCandidateFilter$2",
"org.mockito.internal.configuration.injection.filter.FinalMockCandidateFilter$1",
"org.mockito.internal.configuration.injection.filter.OngoingInjecter",
"org.mockito.internal.configuration.injection.filter.FinalMockCandidateFilter",
"org.mockito.internal.configuration.injection.filter.MockCandidateFilter"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(FinalMockCandidateFilter_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"org.mockito.internal.configuration.injection.filter.FinalMockCandidateFilter",
"org.mockito.internal.configuration.injection.filter.FinalMockCandidateFilter$1",
"org.mockito.internal.configuration.injection.filter.FinalMockCandidateFilter$2"
);
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
8ed5ce16eaa159867648424712e811397353ecf2
|
f66fc1aca1c2ed178ac3f8c2cf5185b385558710
|
/reladomo/src/main/java/com/gs/fw/common/mithra/util/MithraProcessInfo.java
|
daa716a3de9d4830f4e53b01943aa00f83ad8444
|
[
"Apache-2.0",
"BSD-3-Clause",
"MIT",
"LicenseRef-scancode-public-domain"
] |
permissive
|
goldmansachs/reladomo
|
9cd3e60e92dbc6b0eb59ea24d112244ffe01bc35
|
a4f4e39290d8012573f5737a4edc45d603be07a5
|
refs/heads/master
| 2023-09-04T10:30:12.542924
| 2023-07-20T09:29:44
| 2023-07-20T09:29:44
| 68,020,885
| 431
| 122
|
Apache-2.0
| 2023-07-07T21:29:52
| 2016-09-12T15:17:34
|
Java
|
UTF-8
|
Java
| false
| false
| 4,859
|
java
|
/*
Copyright 2016 Goldman Sachs.
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.gs.fw.common.mithra.util;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.lang.management.ManagementFactory;
import java.net.UnknownHostException;
import java.net.InetAddress;
public final class MithraProcessInfo
{
static private final Logger logger = LoggerFactory.getLogger(MithraProcessInfo.class.getName());
private static final int MITHRA_VERSION_ID = MithraVersion.getMithraVersion();
private static String PID = null;
private static short PID_SHORT;
private static String HOST_ADDRESS = null;
private static byte[] IP_ADDRESS = null;
private static long STARTUP_TIME = System.nanoTime();
private static long MITHRA_VM_ID;
private static boolean isVmIdGenerated;
public static String getHostAddress()
{
if(HOST_ADDRESS == null)
{
String address = null;
try
{
address = InetAddress.getLocalHost().getHostAddress();
}
catch (UnknownHostException e)
{
logger.warn("could not get host address", e);
}
HOST_ADDRESS = address;
}
return HOST_ADDRESS;
}
public static byte[] getIpAddress()
{
if(IP_ADDRESS == null)
{
byte[] rawBytes = null;
try
{
rawBytes = InetAddress.getLocalHost().getAddress();
}
catch (UnknownHostException e)
{
logger.warn("could not get IP address");
rawBytes = new byte[4];
for(int i=0;i<rawBytes.length;i++)
{
rawBytes[i] = (byte)(Math.random()*Byte.MAX_VALUE*2-Byte.MAX_VALUE);
}
}
IP_ADDRESS = rawBytes;
}
return IP_ADDRESS;
}
public static String getPid()
{
if(PID == null)
{
String pid = ManagementFactory.getRuntimeMXBean().getName();
if (pid != null)
{
int atIndex = pid.indexOf("@");
if (atIndex > 0)
{
pid = pid.substring(0, atIndex);
}
}
else pid = "0";
PID = pid;
}
return PID;
}
public static synchronized short getPidAsShort()
{
if (PID_SHORT == 0)
{
short pid = 0;
String pidString = getPid();
try
{
int parsedPid = Integer.parseInt(pidString);
if (parsedPid > 32768) parsedPid -= 32768;
pid = (short) parsedPid;
}
catch (NumberFormatException e)
{
// ignore
}
if (pid == 0)
{
pid = (short)((Math.random()*Short.MAX_VALUE*2 - Short.MAX_VALUE)+1);
}
PID_SHORT = pid;
}
return PID_SHORT;
}
public synchronized static long getVmId()
{
if(!isVmIdGenerated)
{
generateMithraVmId();
}
return MITHRA_VM_ID;
}
private static void generateMithraVmId()
{
long initializationTime = (STARTUP_TIME >> 16); // the first 16 bits of nano time are not that interesting
long clientIp = getIpAsLong();
MITHRA_VM_ID = getPidAsShort() | (clientIp << 16) | (initializationTime << 48);
isVmIdGenerated = true;
if(logger.isDebugEnabled())
{
logger.debug("Mithra VM ID generated: "+MITHRA_VM_ID);
}
}
public static long getIpAsLong()
{
byte[] tmp = MithraProcessInfo.getIpAddress();
long clientIp = (long) tmp[0] & 0xFF | ((long) tmp[1] & 0xFF) << 8 | ((long) tmp[2] & 0xFF) << 16
| ((long) tmp[3] & 0xFF) << 24;
return clientIp;
}
public static int getMithraVersionId()
{
return MITHRA_VERSION_ID;
}
public static void main(String[] args)
{
System.out.println(Long.toHexString(getVmId()));
}
}
|
[
"mohammad.rezaei@gs.com"
] |
mohammad.rezaei@gs.com
|
cf5a71cae1811dace5d68f1329d3bdaf8b262a94
|
2903eadab6dad7e8d66462b9647f4baacfeababa
|
/day180417/src/com/awtex/TextEx.java
|
97a71d4b73c5e046956c0c90b7cdfa27e70825c7
|
[] |
no_license
|
swchod1/multicampus_javaworkspace
|
53f9f811d2beac15dc3f11354b7c55fc70ed4e47
|
1c2296836a3fc50190df9c16f19ae353a382981c
|
refs/heads/master
| 2023-01-21T16:08:33.085840
| 2020-11-30T13:40:10
| 2020-11-30T13:40:10
| 316,420,968
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 731
|
java
|
package com.awtex;
import java.awt.*;
public class TextEx extends Frame {
private TextField tf = new TextField("제목 : ");
private TextArea ta = new TextArea("메모", 10, 15); // 10은 가로 15는 줄
private Button bt = new Button("확인");
private Label la = new Label("내용");
public TextEx() {
// TODO Auto-generated constructor stub
super("메모장");
setLayout(new BorderLayout());
add("North", tf);
add("South", bt);
add("West", la);
add("Center", ta);
WinEvent we = new WinEvent();
addWindowListener(we);
setSize(400, 400);
setVisible(true);
}
public static void main(String[] args) {
// TODO Auto-generated method stub
new TextEx();
}
}
|
[
"swchod1@gmail.com"
] |
swchod1@gmail.com
|
de3887f2005850da6e6e37962571e17f078c90a2
|
dafdbbb0234b1f423970776259c985e6b571401f
|
/graphics/AllBinaryGraphicsJavaApplicationM/src/main/java/allbinary/graphics/j2me/dialog/NewWorkAreaJDialog.java
|
1c46633b0826f54542330c7cefd1199c90487a3c
|
[
"LicenseRef-scancode-warranty-disclaimer"
] |
no_license
|
biddyweb/AllBinary-Platform
|
3581664e8613592b64f20fc3f688dc1515d646ae
|
9b61bc529b0a5e2c647aa1b7ba59b6386f7900ad
|
refs/heads/master
| 2020-12-03T10:38:18.654527
| 2013-11-17T11:17:35
| 2013-11-17T11:17:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,477
|
java
|
/*
* AllBinary Open License Version 1
* Copyright (c) 2011 AllBinary
*
* By agreeing to this license you and any business entity you represent are
* legally bound to the AllBinary Open License Version 1 legal agreement.
*
* You may obtain the AllBinary Open License Version 1 legal agreement from
* AllBinary or the root directory of AllBinary's AllBinary Platform repository.
*
* Created By: Travis Berthelot
*
*/
package allbinary.graphics.j2me.dialog;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JTextField;
import allbinary.graphics.j2me.GraphicsException;
import allbinary.graphics.j2me.MyFrame;
import allbinary.graphics.j2me.workarea.WorkAreaJPanel;
import allbinary.graphics.j2me.workarea.WorkAreaJPanelInterface;
public class NewWorkAreaJDialog extends javax.swing.JDialog
{
private MyFrame parent;
private Dimension dimension;
private JTextField xSizeJTextField;
private JTextField ySizeJTextField;
private JTextField nameJTextField;
public NewWorkAreaJDialog(MyFrame parent, boolean modal, Dimension dimension, String newName) throws Exception
{
super((java.awt.Frame) parent, modal);
try
{
initComponents();
this.parent = parent;
this.xSizeJTextField = new JTextField("12");
this.ySizeJTextField = new JTextField("12");
this.nameJTextField = new JTextField(newName);
this.dimension = dimension;
JButton submitButton = new JButton("Ok");
submitButton.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent evt)
{
try
{
disposeNewDialog();
}
catch(Exception e)
{
//throw new GraphicsException("Error Creating New Canvas");
}
}
});
this.setSize(150,100);
this.getContentPane().setLayout(new GridLayout(5,2));
this.getContentPane().add(new JLabel("Please enter"));
this.getContentPane().add(new JLabel(" the size."));
this.getContentPane().add(new JLabel("Name:"));
this.getContentPane().add(nameJTextField);
this.getContentPane().add(new JLabel("X: "));
this.getContentPane().add(xSizeJTextField);
this.getContentPane().add(new JLabel("Y: "));
this.getContentPane().add(ySizeJTextField);
this.getContentPane().add(submitButton);
this.show();
}
catch(Exception e)
{
throw e;
}
}
private void disposeNewDialog() throws Exception
{
try
{
Integer canvasWidth = new Integer(xSizeJTextField.getText());
Integer canvasHeight = new Integer(ySizeJTextField.getText());
String newName = this.nameJTextField.getText();
if(newName == null) throw new GraphicsException("No Name", this, "disposeNewDialog");
WorkAreaJPanel workAreaJPanel = new WorkAreaJPanel(
newName,this.dimension, canvasWidth.intValue(),canvasHeight.intValue());
workAreaJPanel.setLayout(new GridLayout(1,1));
parent.add((WorkAreaJPanelInterface) workAreaJPanel);
this.dispose();
}
catch(Exception e)
{
throw e;
}
}
private void initComponents()//GEN-BEGIN:initComponents
{
addWindowListener(new java.awt.event.WindowAdapter()
{
public void windowClosing(java.awt.event.WindowEvent evt)
{
closeDialog(evt);
}
});
pack();
}//GEN-END:initComponents
/** Closes the dialog */
private void closeDialog(java.awt.event.WindowEvent evt)
{//GEN-FIRST:event_closeDialog
setVisible(false);
dispose();
}//GEN-LAST:event_closeDialog
public static void main(String args[])
{
try
{
new NewWorkAreaJDialog(new MyFrame(), true,new Dimension(100,100), "testing").show();
}
catch(Exception e)
{
}
}
// Variables declaration - do not modify//GEN-BEGIN:variables
// End of variables declaration//GEN-END:variables
}
|
[
"travisberthelot@hotmail.com"
] |
travisberthelot@hotmail.com
|
2d704b7265bca0a02a896cda178d21a5cdcd4a02
|
fc6c869ee0228497e41bf357e2803713cdaed63e
|
/weixin6519android1140/src/sourcecode/com/tencent/mm/plugin/appbrand/dynamic/e/a.java
|
ce2ddb0bf02b4dcb90b54d69feeab726e2ab32be
|
[] |
no_license
|
hyb1234hi/reverse-wechat
|
cbd26658a667b0c498d2a26a403f93dbeb270b72
|
75d3fd35a2c8a0469dbb057cd16bca3b26c7e736
|
refs/heads/master
| 2020-09-26T10:12:47.484174
| 2017-11-16T06:54:20
| 2017-11-16T06:54:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,968
|
java
|
package com.tencent.mm.plugin.appbrand.dynamic.e;
import com.tencent.gmtrace.GMTrace;
public class a
{
private static volatile com.tencent.mm.jsapi.core.f hUq;
private static volatile com.tencent.mm.jsapi.core.f hUr;
public a()
{
GMTrace.i(19924219068416L, 148447);
GMTrace.o(19924219068416L, 148447);
}
private static com.tencent.mm.jsapi.core.f Vf()
{
GMTrace.i(19924487503872L, 148449);
if (hUq == null) {}
try
{
if (hUq == null)
{
localf = new com.tencent.mm.jsapi.core.f();
localf.a(new b(302));
localf.a(new c(303));
localf.a(new d(308));
localf.a(new f());
localf.a(new g());
hUq = localf;
}
com.tencent.mm.jsapi.core.f localf = hUq;
GMTrace.o(19924487503872L, 148449);
return localf;
}
finally {}
}
private static com.tencent.mm.jsapi.core.f Vg()
{
GMTrace.i(19924621721600L, 148450);
if (hUr == null) {}
try
{
if (hUr == null)
{
localf = new com.tencent.mm.jsapi.core.f();
localf.a(new b(262));
localf.a(new c(263));
localf.a(new d(268));
localf.a(new f());
localf.a(new g());
localf.a(new e((byte)0));
hUr = localf;
}
com.tencent.mm.jsapi.core.f localf = hUr;
GMTrace.o(19924621721600L, 148450);
return localf;
}
finally {}
}
public static com.tencent.mm.jsapi.core.f iu(int paramInt)
{
GMTrace.i(19924353286144L, 148448);
if (paramInt == 1)
{
localf = Vg();
GMTrace.o(19924353286144L, 148448);
return localf;
}
com.tencent.mm.jsapi.core.f localf = Vf();
GMTrace.o(19924353286144L, 148448);
return localf;
}
}
/* Location: D:\tools\apktool\weixin6519android1140\jar\classes2-dex2jar.jar!\com\tencent\mm\plugin\appbrand\dynamic\e\a.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"robert0825@gmail.com"
] |
robert0825@gmail.com
|
e98f58ba55baad311a8698df1d51e05c29f19b80
|
30e1ef3e25eda75c20e34818e01276331bd4aab5
|
/cleanapp/app/src/main/java/com/nuon/peter/demoapp/base/component/vlc/VLCInstance.java
|
fc88cd049ea96c7eb47af114287352c69bff1ab0
|
[] |
no_license
|
chhai-chivon-android/Basic-Advance-CKCC
|
c3b53b770e9ae932d0a2c23ec0ee01c4df41e713
|
bc90e7565aefbe51be1b3757ccd67f7e0a6e05a0
|
refs/heads/master
| 2021-06-20T14:39:58.612786
| 2017-08-14T10:14:05
| 2017-08-14T10:14:05
| 100,254,685
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,683
|
java
|
/*****************************************************************************
* VLCInstance.java
*****************************************************************************
* Copyright © 2011-2014 VLC authors and VideoLAN
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
package com.nuon.peter.demoapp.base.component.vlc;
import android.content.Context;
import com.nuon.peter.demoapp.base.component.content.preferences.Prefs;
import com.nuon.peter.demoapp.utils.Common;
import com.nuon.peter.demoapp.utils.PrefUtils;
import org.videolan.libvlc.LibVLC;
import org.videolan.libvlc.util.VLCUtil;
import timber.log.Timber;
public class VLCInstance {
private static LibVLC sLibVLC = null;
/** A set of utility functions for the VLC application */
public synchronized static LibVLC get(Context context) throws IllegalStateException {
if (sLibVLC == null) {
if(!VLCUtil.hasCompatibleCPU(context)) {
Timber.e(VLCUtil.getErrorMsg());
throw new IllegalStateException("LibVLC initialisation failed: " + VLCUtil.getErrorMsg());
}
String chroma = PrefUtils.get(context, Prefs.PIXEL_FORMAT, "");
sLibVLC = new LibVLC(VLCOptions.getLibOptions(context, true, "UTF-8", true, chroma, Common.DEBUG_ENABLED));
}
return sLibVLC;
}
public static synchronized void restart(Context context) throws IllegalStateException {
if (sLibVLC != null) {
sLibVLC.release();
String chroma = PrefUtils.get(context, Prefs.PIXEL_FORMAT, "");
sLibVLC = new LibVLC(VLCOptions.getLibOptions(context, true, "UTF-8", true, chroma, Common.DEBUG_ENABLED));
}
}
public static synchronized boolean hasCompatibleCPU(Context context) {
if (sLibVLC == null && !VLCUtil.hasCompatibleCPU(context)) {
return false;
} else
return true;
}
}
|
[
"chivonchhai@hotmail.com"
] |
chivonchhai@hotmail.com
|
8ab3560b0b3fb228d83c58cfdc598f81600ba8ce
|
c702da11625ef30fabd469f7b522209d8517b4ea
|
/piana-jpos/src/main/java/org/jpos/q2/iso/QMUXProxy.java
|
194c5ad44a97ed0dd716d412084d738eba896c8c
|
[] |
no_license
|
rahmatii1366/piana-switch
|
fe6d0ced2a32a6d083d316bccfc7c10821367302
|
7fd13d42d48ffb9e7eaa210336dfffad9e7b817b
|
refs/heads/master
| 2021-01-15T19:23:26.691703
| 2017-08-09T15:14:17
| 2017-08-09T15:14:17
| 99,821,894
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,474
|
java
|
/*
* jPOS Project [http://jpos.org]
* Copyright (C) 2000-2017 jPOS Software SRL
*
* This program 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.
*
* 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.jpos.q2.iso;
import org.jpos.core.Configurable;
import org.jpos.core.Configuration;
import org.jpos.core.ConfigurationException;
import org.jpos.iso.ISOException;
import org.jpos.iso.ISOMsg;
import org.jpos.iso.ISOResponseListener;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.rmi.server.*;
/**
* RMI QMUX Proxy
* @author Mark Salter
* @author Alejandro Revilla
* @author Niclas Hedhman
* @version $Revision: 2854 $ $Date: 2010-01-02 10:34:31 +0000 (Sat, 02 Jan 2010) $
* @since 1.4.9
*/
public class QMUXProxy implements RemoteQMUX, Configurable {
QMUX qmux;
private RemoteRef ref;
private RemoteStub stub;
public QMUXProxy (QMUX qmux) throws RemoteException {
super();
this.qmux = qmux;
startService ();
}
private void startService () throws RemoteException
{
try {
LocateRegistry.createRegistry (Registry.REGISTRY_PORT);
} catch (ExportException ignored) {
// NOPMD registry already exists
}
stub = UnicastRemoteObject.exportObject (this);
ref = stub.getRef();
}
public boolean isConnected() {
return qmux.isConnected();
}
public ISOMsg request(ISOMsg m, long timeout) throws ISOException {
return qmux.request(m, timeout);
}
public void request(ISOMsg m, long timeout, ISOResponseListener rl,
Object handBack) throws ISOException {
qmux.request(m, timeout, rl, handBack);
}
public void setConfiguration(Configuration cfg)
throws ConfigurationException {
qmux.setConfiguration(cfg);
}
}
|
[
"Rahmati@office.dml.com"
] |
Rahmati@office.dml.com
|
fb9671f00a2f0473deb80a821bd0520e8db95cc0
|
0386dd72896464326174b50eb6743a02d1a87c3f
|
/core12/src/test/java/org/apache/myfaces/component/html/ext/HtmlMessageTest.java
|
f0b8a06e77f3a0b17f46a12809c87f48b9d0deac
|
[] |
no_license
|
bschuette/tomahawk
|
f6922930bbb54e6914325fce11764eeeff63ef07
|
8e300e4adbadeb7221df00c3bb2e71ead86b656f
|
refs/heads/master
| 2023-01-04T06:06:33.733606
| 2020-11-05T20:33:48
| 2020-11-05T20:33:48
| 310,410,746
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,879
|
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.myfaces.component.html.ext;
import java.io.IOException;
import javax.faces.application.FacesMessage;
import javax.faces.component.UIComponent;
import junit.framework.Test;
import org.apache.myfaces.test.AbstractTomahawkViewControllerTestCase;
import org.apache.myfaces.test.utils.TestUtils;
public class HtmlMessageTest extends AbstractTomahawkViewControllerTestCase
{
public HtmlMessageTest(String name)
{
super(name);
}
protected void setUp() throws Exception
{
super.setUp();
}
protected void tearDown() throws Exception
{
super.tearDown();
}
/*
public static Test suite()
{
return null; // keep this method or maven won't run it
}*/
/**
* Verify component renders with the default renderer.
*/
public void testDefaultRenderer()
{
// Define required panel group
HtmlPanelGroup panelGroup = new HtmlPanelGroup();
// Define the referenced component
UIComponent referencedComponent = new HtmlInputText();
referencedComponent.setId("referencedComponent");
//referencedComponent.setParent(panelGroup);
panelGroup.getChildren().add(referencedComponent);
facesContext.addMessage(referencedComponent.getId(), new FacesMessage(
FacesMessage.SEVERITY_ERROR, "summary", "detail"));
// Define the component
HtmlMessage component = new HtmlMessage();
component.setId("TestComponent");
referencedComponent.setParent(panelGroup);
panelGroup.getChildren().add(component);
component.setFor(referencedComponent.getId());
// Render the component
try
{
TestUtils.renderComponent(facesContext, panelGroup);
}
catch (IOException e)
{
fail(e.getMessage());
}
// Verify component was rendered
assertIdExists(component.getId());
}
}
|
[
"bjoern@schuette.se"
] |
bjoern@schuette.se
|
88ad924eb5a508afdd2143e9fe3559bbd2ac6619
|
ffaf149244c48a9a7909fc0316e509b2856e813c
|
/IdentityVerifier/AnalysisApi/src/test/java/org/abondar/experimental/analysis/handler/TestLogger.java
|
21ee69b4106ff2b137cdefe99abc1ad2b0878c99
|
[
"MIT"
] |
permissive
|
abondar24/ServerlessAI
|
a583dc2106b8a887836d7b1edd10cad44bab01ab
|
c9dc93e9573ab9256015f14971e9a516c9c13804
|
refs/heads/master
| 2023-07-29T12:08:17.045944
| 2021-09-11T02:13:02
| 2021-09-11T02:13:02
| 379,328,859
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 496
|
java
|
package org.abondar.experimental.analysis.handler;
import com.amazonaws.services.lambda.runtime.LambdaLogger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class TestLogger implements LambdaLogger {
private static final Logger logger = LoggerFactory.getLogger(TestLogger.class);
@Override
public void log(String message) {
logger.info(message);
}
@Override
public void log(byte[] message) {
logger.info(new String(message));
}
}
|
[
"abondar1992@gmail.com"
] |
abondar1992@gmail.com
|
2e13b43db2d9aca221cf7554434d32ba9d187781
|
1ecc41edc3bff029d9eb3e70c2ca05ef6a4e4707
|
/sharding-core/src/main/java/io/shardingsphere/core/constant/TransactionType.java
|
afcacf69315f0344e7dbae40225ef944ffdf706b
|
[
"Apache-2.0"
] |
permissive
|
qiankunshe/sharding-jdbc
|
d97b5905ab982b6407715f460a12d712687e7a9b
|
345f3df45a4c9634effde0e763ad9f24dd841715
|
refs/heads/dev
| 2020-03-16T01:08:19.039861
| 2018-07-11T15:11:07
| 2018-07-11T15:11:07
| 122,442,554
| 0
| 0
|
Apache-2.0
| 2018-05-06T06:26:01
| 2018-02-22T07:02:19
|
Java
|
UTF-8
|
Java
| false
| false
| 1,552
|
java
|
/*
* Copyright 2016-2018 shardingsphere.io.
* <p>
* 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.
* </p>
*/
package io.shardingsphere.core.constant;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
/**
* TransactionType Enum.
*
* @author zhaojun
*/
@RequiredArgsConstructor
@Getter
public enum TransactionType {
/**
* default local transaction.
*/
NONE(""),
/**
* XA distribute transaction provided by RDBMS vendor.
*/
XA("XA"),
/**
* TCC (Try-Confirm-Cancel) distribute transaction mode.
*/
TCC("TCC");
private final String type;
/**
* Find enum by type value.
*
* @param type property type
* @return value enum, return {@code NONE} if not found
*/
public static TransactionType findByValue(final String type) {
for (TransactionType each : TransactionType.values()) {
if (each.getType().equals(type)) {
return each;
}
}
return NONE;
}
}
|
[
"zhaojunv3@126.com"
] |
zhaojunv3@126.com
|
f4d5815ec348c59d94339d4a13e0c631377f314b
|
3a59bd4f3c7841a60444bb5af6c859dd2fe7b355
|
/sources/com/google/android/gms/internal/ads/zzctf.java
|
014cb3d3ac9f7dd642ca3ae52961851db83806c5
|
[] |
no_license
|
sengeiou/KnowAndGo-android-thunkable
|
65ac6882af9b52aac4f5a4999e095eaae4da3c7f
|
39e809d0bbbe9a743253bed99b8209679ad449c9
|
refs/heads/master
| 2023-01-01T02:20:01.680570
| 2020-10-22T04:35:27
| 2020-10-22T04:35:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 402
|
java
|
package com.google.android.gms.internal.ads;
public final class zzctf implements zzdti<zzctd> {
private final zzdtu<zzbbl> zzfgh;
private zzctf(zzdtu<zzbbl> zzdtu) {
this.zzfgh = zzdtu;
}
public static zzctf zzal(zzdtu<zzbbl> zzdtu) {
return new zzctf(zzdtu);
}
public final /* synthetic */ Object get() {
return new zzctd(this.zzfgh.get());
}
}
|
[
"joshuahj.tsao@gmail.com"
] |
joshuahj.tsao@gmail.com
|
0068310b97f014f3aee4cd89a4a4b31b016a1c7c
|
d1c35b77ced39d225473d6737f27699b3e7d8db1
|
/src/thread/redhat/com/PSClass.java
|
9c73b862092bc7d9665d6ec30c589347eae1bf70
|
[] |
no_license
|
kenzhaoyihui/javase_L
|
f5ec3635f99a41c75da9d6a89299507f03df65b6
|
1dd7dee3486c0cb9dadd41ae6f2e178848bb69a3
|
refs/heads/master
| 2020-03-16T00:27:24.139875
| 2018-07-30T17:04:12
| 2018-07-30T17:04:12
| 132,417,067
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,760
|
java
|
package thread.redhat.com;
import java.util.Random;
class Producer extends Thread{
private Buffer buffer;
public Producer(Buffer buffer){
this.buffer = buffer;
}
@Override
public void run() {
//super.run();
Random rand = new Random();
while(true){
int n = rand.nextInt();
buffer.produce(n);
}
}
}
class Consumer extends Thread{
private Buffer buffer;
public Consumer(Buffer buffer){
this.buffer = buffer;
}
@Override
public void run() {
//super.run();
int data;
while(true){
data = buffer.consumer();
}
}
}
class Buffer{
private int data;
private boolean empty;
public Buffer(){
this.empty = true;
}
public synchronized void produce(int newData){
while(!this.empty){
try{
this.wait();
}catch (InterruptedException e){
e.printStackTrace();
}
}
this.data = newData;
this.empty = false;
this.notify();
System.out.println("Produced: " + newData);
}
public synchronized int consumer(){
while(this.empty){
try{
this.wait();
}catch (InterruptedException e){
e.printStackTrace();
}
}
this.empty = true;
this.notify();
System.out.println("Consumed: " + data);
return data;
}
}
public class PSClass {
public static void main(String [] args){
Buffer buffer = new Buffer();
Producer p = new Producer(buffer);
Consumer c = new Consumer(buffer);
p.start();
c.start();
}
}
|
[
"yzhao@redhat.com"
] |
yzhao@redhat.com
|
e66c9d22e3445d316974d8819e911fae51a11670
|
245d027a539caed0a3919724892e01f53bffa919
|
/design-pattern/src/main/java/behavioral/template/TemplateDemo.java
|
ba1781e787c7c3816eb2f389a0b8ad4f6eb29b08
|
[
"Apache-2.0"
] |
permissive
|
yoshino1984/study-collection
|
c13db76cfb80d7aca87e7edac3f583a366ca00cb
|
bbb8c70adfef6419a0eb26e27a4308e68cb7d72a
|
refs/heads/main
| 2023-03-17T03:03:49.505772
| 2021-03-06T08:12:10
| 2021-03-06T08:12:10
| 345,039,303
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 242
|
java
|
package behavioral.template;
/**
* @author wangxin
* 2020/4/5 21:42
* @since
**/
public class TemplateDemo {
public static void main(String[] args) {
AbstractClass demo = new ConcreteClass1();
demo.method1();
}
}
|
[
"wx18868831926@gmail.com"
] |
wx18868831926@gmail.com
|
b2ad1b2bac25e75d036fa3a1ec72a5e22d42af37
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/polardb-20170801/src/main/java/com/aliyun/polardb20170801/models/DescribeAITaskStatusResponse.java
|
21f7868aea1a441768ec608e61793197c89712ac
|
[
"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,421
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.polardb20170801.models;
import com.aliyun.tea.*;
public class DescribeAITaskStatusResponse 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 DescribeAITaskStatusResponseBody body;
public static DescribeAITaskStatusResponse build(java.util.Map<String, ?> map) throws Exception {
DescribeAITaskStatusResponse self = new DescribeAITaskStatusResponse();
return TeaModel.build(map, self);
}
public DescribeAITaskStatusResponse setHeaders(java.util.Map<String, String> headers) {
this.headers = headers;
return this;
}
public java.util.Map<String, String> getHeaders() {
return this.headers;
}
public DescribeAITaskStatusResponse setStatusCode(Integer statusCode) {
this.statusCode = statusCode;
return this;
}
public Integer getStatusCode() {
return this.statusCode;
}
public DescribeAITaskStatusResponse setBody(DescribeAITaskStatusResponseBody body) {
this.body = body;
return this;
}
public DescribeAITaskStatusResponseBody getBody() {
return this.body;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
52704ca5ffd42abb68b4c06f159bd04b25b7296c
|
dc67b3b3321f0fb89cc2aababb6228b9dc8799e5
|
/jwsur_code/chapter2/awsClient3/CartAddResponse.java
|
d3aa646ca8fe8e29993a0bb2a9c152091f53b25e
|
[] |
no_license
|
gitrepo7777/jwsurcode
|
9316043d684c86e968a83d2a2649a5073ee873a8
|
0e4c25eb50179eb66732fc42f458c11f6f043aea
|
refs/heads/master
| 2020-07-03T12:17:26.193848
| 2014-06-12T15:00:29
| 2014-06-12T15:00:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,643
|
java
|
package awsClient3;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="{http://webservices.amazon.com/AWSECommerceService/2008-10-06}OperationRequest" minOccurs="0"/>
* <element ref="{http://webservices.amazon.com/AWSECommerceService/2008-10-06}Cart" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"operationRequest",
"cart"
})
@XmlRootElement(name = "CartAddResponse")
public class CartAddResponse {
@XmlElement(name = "OperationRequest")
protected OperationRequest operationRequest;
@XmlElement(name = "Cart")
protected List<Cart> cart;
/**
* Gets the value of the operationRequest property.
*
* @return
* possible object is
* {@link OperationRequest }
*
*/
public OperationRequest getOperationRequest() {
return operationRequest;
}
/**
* Sets the value of the operationRequest property.
*
* @param value
* allowed object is
* {@link OperationRequest }
*
*/
public void setOperationRequest(OperationRequest value) {
this.operationRequest = value;
}
/**
* Gets the value of the cart 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 cart property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getCart().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Cart }
*
*
*/
public List<Cart> getCart() {
if (cart == null) {
cart = new ArrayList<Cart>();
}
return this.cart;
}
}
|
[
"ntend7777@gmail.com"
] |
ntend7777@gmail.com
|
9db70d2edc95dda3a0fce71bd31e6823cf808e61
|
22d3a4ba3c5121ad8b5a0167084bb849cd7fca8b
|
/Cvac/src/main/java/cn/misection/cvac/ast/IVisitor.java
|
edd7e44fccf12822c1c830f1f59bf9fad38ca2ea
|
[] |
no_license
|
STLKoch/Cva
|
9fbafb7b019d8638a6afe3f6828966be52c009d9
|
dbdff4be8802319c3fc49b094d93e05554b72d82
|
refs/heads/master
| 2023-03-08T14:09:07.184579
| 2021-02-25T16:23:34
| 2021-02-25T16:23:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,799
|
java
|
package cn.misection.cvac.ast;
import cn.misection.cvac.ast.clas.AbstractCvaClass;
import cn.misection.cvac.ast.clas.CvaClass;
import cn.misection.cvac.ast.decl.*;
import cn.misection.cvac.ast.decl.nullptr.CvaNullDecl;
import cn.misection.cvac.ast.entry.*;
import cn.misection.cvac.ast.expr.*;
import cn.misection.cvac.ast.expr.nonterminal.binary.*;
import cn.misection.cvac.ast.expr.terminator.*;
import cn.misection.cvac.ast.expr.nonterminal.unary.*;
import cn.misection.cvac.ast.method.*;
import cn.misection.cvac.ast.program.AbstractProgram;
import cn.misection.cvac.ast.program.CvaProgram;
import cn.misection.cvac.ast.statement.*;
import cn.misection.cvac.ast.type.*;
import cn.misection.cvac.ast.type.basic.EnumCvaType;
import cn.misection.cvac.ast.type.reference.CvaClassType;
import cn.misection.cvac.ast.type.advance.CvaStringType;
/**
* Created by MI6 root 1/7.
*/
public interface IVisitor
{
/**
* type
* @param type t;
*/
default void visit(ICvaType type)
{
// 不是枚举;
if (type instanceof AbstractType)
{
switch ((type.toEnum()))
{
case STRING:
{
visit((CvaStringType) type);
break;
}
case POINTER:
{
// TODO;
break;
}
case ARRAY:
{
// TODO;
break;
}
case CLASS:
{
visit((CvaClassType) type);
}
default:
{
break;
}
}
}
// 基本枚举类型;
else
{
visit((EnumCvaType) type);
}
}
void visit(EnumCvaType basicType);
void visit(CvaStringType type);
void visit(CvaClassType type);
/**
* decl
* @param abstDecl decl;
*/
default void visit(AbstractDeclaration abstDecl)
{
if (!(abstDecl instanceof CvaNullDecl))
{
visit(((CvaDeclaration) abstDecl));
}
}
void visit(CvaDeclaration decl);
/**
* 做成map之后, 可以精简代码分散, 但是这里要用反射, 算了;
* @param expr e;
*/
default void visit(AbstractExpression expr)
{
// 用typeCode代替, 可以避免反射以及改名麻烦;
switch (expr.toEnum())
{
case AND_AND:
{
visit((CvaAndAndExpr) expr);
break;
}
case CALL:
{
visit((CvaCallExpr) expr);
break;
}
case IDENTIFIER:
{
visit((CvaIdentifierExpr) expr);
break;
}
case LESS_OR_MORE_THAN:
{
visit((CvaLessOrMoreThanExpr) expr);
break;
}
case NEW:
{
visit((CvaNewExpr) expr);
break;
}
case NEGATE:
{
visit((CvaNegateExpr) expr);
break;
}
case CONST_INT:
{
visit((CvaConstIntExpr) expr);
break;
}
case CONST_STRING:
{
visit((CvaConstStringExpr) expr);
break;
}
case CONST_TRUE:
{
visit((CvaConstTrueExpr) expr);
break;
}
case CONST_FALSE:
{
visit((CvaConstFalseExpr) expr);
break;
}
case CONST_NULL:
{
// TODO;
break;
}
case THIS:
{
visit((CvaThisExpr) expr);
break;
}
case BINARY_OPERAND_OP:
{
visit((CvaOperandOperatorExpr) expr);
break;
}
case INCREMENT:
case DECREMENT:
{
visit((CvaIncDecExpr) expr);
break;
}
case NULL_POINTER:
{
// 直接忽略, 转都不转;
break;
}
default:
{
// 将所有的都用绑定的enum判定;
System.err.println("unknown expr");
}
}
}
void visit(CvaAndAndExpr expr);
void visit(CvaCallExpr expr);
void visit(CvaConstFalseExpr expr);
void visit(CvaIdentifierExpr expr);
void visit(CvaLessOrMoreThanExpr expr);
void visit(CvaNewExpr expr);
void visit(CvaNegateExpr expr);
void visit(CvaConstIntExpr expr);
void visit(CvaConstStringExpr expr);
void visit(CvaThisExpr expr);
void visit(CvaConstTrueExpr expr);
void visit(CvaOperandOperatorExpr expr);
void visit(CvaIncDecExpr expr);
/**
* stm;
* @param abstStm stm;
*/
default void visit(AbstractStatement abstStm)
{
switch (abstStm.toEnum())
{
case ASSIGN:
{
visit((CvaAssignStatement) abstStm);
break;
}
case BLOCK:
{
visit((CvaBlockStatement) abstStm);
break;
}
case IF:
{
visit((CvaIfStatement) abstStm);
break;
}
case WRITE:
{
visit((CvaWriteStatement) abstStm);
break;
}
case WHILE_FOR:
{
visit((CvaWhileForStatement) abstStm);
break;
}
case INCREMENT:
{
visit((CvaIncreStatement) abstStm);
break;
}
default:
{
switch (abstStm.toEnum())
{
case NULL_POINTER:
{
// 直接忽略, 转都不用转;
break;
}
case EXPR_STATEMENT:
{
// decl statement 不需要用, 其只是辅助数据结构, 用完就扔;
visit((CvaExprStatement) abstStm);
break;
}
default:
{
System.err.println("unknown statement");
break;
}
}
}
}
}
void visit(CvaAssignStatement stm);
void visit(CvaBlockStatement stm);
void visit(CvaIfStatement stm);
void visit(CvaWriteStatement stm);
void visit(CvaWhileForStatement stm);
void visit(CvaIncreStatement stm);
void visit(CvaExprStatement stm);
/**
* Method
*/
default void visit(AbstractMethod abstMethod)
{
visit(((CvaMethod) abstMethod));
}
void visit(CvaMethod cvaMethod);
/**
* class;
* @param abstClass class;
*/
default void visit(AbstractCvaClass abstClass)
{
visit(((CvaClass) abstClass));
}
void visit(CvaClass cvaClass);
default void visit(AbstractEntryClass entryClass)
{
visit(((CvaEntryClass) entryClass));
}
void visit(CvaEntryClass entryClass);
void visit(CvaMainMethod entryMethod);
// Program
default void visit(AbstractProgram program)
{
visit(((CvaProgram) program));
}
void visit(CvaProgram program);
}
|
[
"hlrongzun@qq.com"
] |
hlrongzun@qq.com
|
eeb4a736a1c7b79798ff4c6262f2f016025808ba
|
8a50cb58f39b0336916eb1962a08a6043570e265
|
/2019.v2/03/src/Prob.java
|
a7564a5970647a1106d9c5947f4722d1eee5e382
|
[
"MIT"
] |
permissive
|
fireduck64/adventofcode
|
7b69b2d4f915552662d887c720da93a4ef5e36a6
|
e29929b04d25d7c4670fad9937dca2dab5983965
|
refs/heads/master
| 2023-01-07T20:55:18.630965
| 2022-12-27T18:01:04
| 2022-12-27T18:01:04
| 229,797,355
| 4
| 8
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,379
|
java
|
import java.io.FileInputStream;
import java.util.*;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
public class Prob
{
public static void main(String args[]) throws Exception
{
new Prob(new Scanner(new FileInputStream(args[0])));
}
Random rnd=new Random();
public Prob(Scanner scan)
{
String wire_1_str = scan.nextLine();
String wire_2_str = scan.nextLine();
Map2D<Integer> wire_1 = getMap(wire_1_str);
Map2D<Integer> wire_2 = getMap(wire_2_str);
HashSet<Point> points_1 = new HashSet<>();
points_1.addAll(wire_1.getAllPoints());
{
Point best = new Point(1000000,1000000);
for(Point b : wire_2.getAllPoints())
{
if (points_1.contains(b))
{
if (b.getDistM(new Point(0,0)) < best.getDistM(new Point(0,0)))
{
best =b;
}
}
}
System.out.println("Part 1:");
System.out.println(" " + best + " " + best.getDistM(new Point(0,0)));
}
{
int best_cost = 10000000;
Point best = new Point(1000000,1000000);
for(Point b : wire_2.getAllPoints())
{
if (points_1.contains(b))
{
int cost = wire_1.get(b) + wire_2.get(b);
if (cost < best_cost)
{
best = b;
best_cost = cost;
}
}
}
System.out.println("Part 2:");
System.out.println(" " + best + " " + best_cost);
}
}
// Up = +y
// Right = +x
public Map2D<Integer> getMap(String wire_str)
{
Map2D<Integer> map = new Map2D<Integer>(0);
Point pos = new Point(0,0);
List<String> moves = Tok.en(wire_str, ",");
int cost=0;
for(String move : moves)
{
int steps = getSteps(move);
Point dir = getDir(move);
for(int i=0; i<steps; i++)
{
cost++;
pos = pos.add(dir);
if (map.get(pos) == 0)
{
map.set(pos, cost);
}
}
}
return map;
}
public Point getDir(String move)
{
char d = move.charAt(0);
if (d=='U') return new Point(0,1);
if (d=='D') return new Point(0,-1);
if (d=='R') return new Point(1,0);
if (d=='L') return new Point(-1,0);
return null;
}
public int getSteps(String move)
{
return Integer.parseInt(move.substring(1));
}
}
|
[
"fireduck@gmail.com"
] |
fireduck@gmail.com
|
6d0adf84213a74d5bafd0603b84efb2107e0d117
|
b22a26199fefbfd40f7b1e918b728a800f564f51
|
/clas-io/src/main/java/org/jlab/bos/clas6/BosDataDescriptor.java
|
4bf277febce583f9ae124a1ea282ba89d6594173
|
[] |
no_license
|
wphelps/clas12
|
e3a6c307df5e56e20343c4197f304fe114e803e4
|
b429f8598331be1c23ca48c2d5583de465e29e92
|
refs/heads/master
| 2020-05-29T11:57:02.055519
| 2016-07-09T20:31:40
| 2016-07-09T20:31:40
| 55,807,936
| 0
| 1
| null | 2016-04-08T20:31:33
| 2016-04-08T20:31:32
| null |
UTF-8
|
Java
| false
| false
| 3,542
|
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 org.jlab.bos.clas6;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import org.jlab.data.io.DataDescriptor;
import org.jlab.data.io.DataEntryType;
/**
*
* @author gavalian
*/
public class BosDataDescriptor implements DataDescriptor {
private String bankname = "UNDEF";
private HashMap<String,Integer> entryOffsets = new HashMap<String,Integer>();
private HashMap<String,DataEntryType> entryTypes = new HashMap<String,DataEntryType>();
private int totalRowSize = 0;
public BosDataDescriptor(){
}
public BosDataDescriptor(String name){
bankname = name;
}
@Override
public void init(String s) {
String[] entries = s.split(":");
int startOffset = 0;
for(String entry : entries){
String[] pair = entry.split("/");
DataEntryType dt = DataEntryType.getType(pair[1]);
entryTypes.put(pair[0], dt);
entryOffsets.put(pair[0], startOffset);
startOffset += dt.size();
}
totalRowSize = startOffset;
}
@Override
public String[] getEntryList() {
String[] entrylist = new String[entryTypes.size()];
int icount = 0;
for(Map.Entry<String,Integer> entry : entryOffsets.entrySet()){
entrylist[icount] = entry.getKey();
icount++;
}
return entrylist;
}
@Override
public String getName() {
return bankname;
}
@Override
public int getProperty(String property_name, String entry_name) {
if(property_name.compareTo("offset")==0){
return entryOffsets.get(entry_name);
}
if(property_name.compareTo("type")==0){
return entryTypes.get(entry_name).id();
}
return 0;
}
@Override
public int getProperty(String property_name) {
if(property_name.compareTo("banksize")==0) return totalRowSize;
return 0;
}
@Override
public void show() {
System.out.println(">>>>>>>>>>>>>>> BANK " + this.getName() +
" ***** SIZE = " + this.getProperty("banksize"));
for(Map.Entry<String,Integer> entry : entryOffsets.entrySet()){
System.out.println(String.format("%12s : %6d %6d ",
entry.getKey(),
entry.getValue() , entryTypes.get(entry.getKey()).id()));
}
}
@Override
public String getXML() {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
@Override
public void setPropertyString(String name, String value) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
@Override
public String getPropertyString(String property_name) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
public boolean hasEntry(String entry) {
return this.entryTypes.containsKey(entry);
}
public boolean hasEntries(String... entries) {
for(String item : entries)
if(this.hasEntry(item)==false) return false;
return true;
}
}
|
[
"gavalian@meson.jlab.org"
] |
gavalian@meson.jlab.org
|
33360ed2ccccd58274e85fa97f98df1ce674d090
|
b34654bd96750be62556ed368ef4db1043521ff2
|
/component_-_check_profile_completeness_servlet_filter/tags/version-1.0.0.1/src/java/tests/com/topcoder/reg/profilecompleteness/filter/accuracytests/retrievers/WikiUserIdRetrieverAccuracyTest.java
|
99b90226584ef31b11ec3ba76effb7810fc57f1d
|
[] |
no_license
|
topcoder-platform/tcs-cronos
|
81fed1e4f19ef60cdc5e5632084695d67275c415
|
c4ad087bb56bdaa19f9890e6580fcc5a3121b6c6
|
refs/heads/master
| 2023-08-03T22:21:52.216762
| 2019-03-19T08:53:31
| 2019-03-19T08:53:31
| 89,589,444
| 0
| 1
| null | 2019-03-19T08:53:32
| 2017-04-27T11:19:01
| null |
UTF-8
|
Java
| false
| false
| 3,564
|
java
|
/*
* Copyright (C) 2011 TopCoder Inc., All Rights Reserved.
*/
package com.topcoder.reg.profilecompleteness.filter.accuracytests.retrievers;
import javax.servlet.http.HttpServletRequest;
import junit.framework.JUnit4TestAdapter;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.springframework.mock.web.MockHttpServletRequest;
import com.topcoder.reg.profilecompleteness.filter.impl.retrievers.WikiUserIdRetriever;
import com.topcoder.shared.security.Persistor;
import com.topcoder.shared.security.SimpleUser;
import com.topcoder.shared.security.User;
import com.topcoder.util.log.basic.BasicLogFactory;
import com.topcoder.web.common.security.SessionPersistor;
/**
* <p>
* Accuracy test for {@link WikiUserIdRetriever}.
* </p>
*
* @author gets0ul
* @version 1.0
*/
public class WikiUserIdRetrieverAccuracyTest {
/**
* The WikiUserIdRetriever instance to test against.
*/
private WikiUserIdRetriever retriever;
/**
* <p>
* Creates a test suite for the tests in this test case.
* </p>
*
* @return a Test suite for this test case.
*/
public static junit.framework.Test suite() {
return new JUnit4TestAdapter(WikiUserIdRetrieverAccuracyTest.class);
}
/**
* <p>
* Sets up test environment.
* </p>
*
* @throws Exception
* to junit
*/
@Before
public void setUp() throws Exception {
retriever = new WikiUserIdRetriever();
retriever.setLog(new BasicLogFactory().createLog("test"));
}
/**
* <p>
* Tears down test environment.
* </p>
*
* @throws Exception
* to junit
*/
@After
public void tearDown() throws Exception {
retriever = null;
}
/**
* <p>
* Tests WikiUserIdRetriever constructor.
* </p>
* <p>
* Instance should be created. No exception is expected.
* </p>
*/
@Test
public void testCtor() {
Assert.assertNotNull("WikiUserIdRetriever is not instantiated", retriever);
}
/**
* <p>
* Tests {@link WikiUserIdRetriever#getUserId(javax.servlet.http.HttpServletRequest)} when a user is logged.
* </p>
*
* @throws Exception
* to junit
*/
@Test
public void testGetUserId1() throws Exception {
HttpServletRequest request = new MockHttpServletRequest();
// Create a Persistor so we can persist a "logged" user
Persistor persistor = new SessionPersistor(request.getSession());
User user = new SimpleUser(2, "user", "password");
persistor.setObject("user_obj", user);
Long userId = retriever.getUserId(request);
Assert.assertNotNull("The user id should exist for logged user", userId);
Assert.assertEquals("Incorrect user id", user.getId(), userId.longValue());
}
/**
* <p>
* Tests {@link WikiUserIdRetriever#getUserId(javax.servlet.http.HttpServletRequest)} when a user is not
* logged.
* </p>
*
* @throws Exception
* to junit
*/
@Test
public void testGetUserId2() throws Exception {
HttpServletRequest request = new MockHttpServletRequest();
Long userId = retriever.getUserId(request);
Assert.assertNull("The user id should not exist for anonymous user", userId);
}
}
|
[
"tingyifang@fb370eea-3af6-4597-97f7-f7400a59c12a"
] |
tingyifang@fb370eea-3af6-4597-97f7-f7400a59c12a
|
56af5f643247198c3a93c54fccce49e436d2d91d
|
63567d9f5238ad0b1c37a47e738a2c3761ef9126
|
/jOOQ/src/main/java/org/jooq/impl/DiagnosticsListeners.java
|
95ac44202720ff092b8bcb47ac92675e7416496e
|
[
"Apache-2.0"
] |
permissive
|
jOOQ/jOOQ
|
d95f11b9a09dcc745fbdd55f985401a6304b90a5
|
f5ca5ae269c49afff712b5c4f13d1a5dc897b440
|
refs/heads/main
| 2023-09-04T00:46:18.889822
| 2023-09-01T16:07:54
| 2023-09-01T16:07:54
| 1,625,986
| 5,451
| 1,414
|
NOASSERTION
| 2023-09-11T06:05:27
| 2011-04-17T10:43:33
|
Java
|
UTF-8
|
Java
| false
| false
| 4,504
|
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
*
* 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.
*
* Other licenses:
* -----------------------------------------------------------------------------
* Commercial licenses for this work are available. These replace the above
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
* database integrations.
*
* For more information, please visit: https://www.jooq.org/legal/licensing
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package org.jooq.impl;
import static java.lang.Boolean.FALSE;
import static org.jooq.impl.Tools.combine;
import static org.jooq.impl.Tools.map;
import java.util.function.Predicate;
import org.jooq.Configuration;
import org.jooq.DiagnosticsContext;
import org.jooq.DiagnosticsListener;
import org.jooq.DiagnosticsListenerProvider;
import org.jooq.conf.Settings;
/**
* @author Lukas Eder
*/
final class DiagnosticsListeners implements DiagnosticsListener {
final DiagnosticsListener[] listeners;
DiagnosticsListeners(DiagnosticsListenerProvider[] providers) {
listeners = map(providers, p -> p.provide(), DiagnosticsListener[]::new);
}
static final DiagnosticsListeners get(Configuration configuration) {
DiagnosticsListenerProvider[] p = configuration.diagnosticsListenerProviders();
if (!FALSE.equals(configuration.settings().isDiagnosticsLogging()))
p = combine(DefaultDiagnosticsListenerProvider.providers(new LoggingDiagnosticsListener()), p);
return new DiagnosticsListeners(p);
}
private static final boolean check(DiagnosticsContext ctx, Predicate<? super Settings> test) {
return check(ctx.settings(), test);
}
static final boolean check(Settings settings, Predicate<? super Settings> test) {
return !FALSE.equals(test.test(settings));
}
private static final boolean checkPattern(DiagnosticsContext ctx, Predicate<? super Settings> test) {
return checkPattern(ctx.settings(), test);
}
static final boolean checkPattern(Settings settings, Predicate<? super Settings> test) {
return !FALSE.equals(settings.isDiagnosticsPatterns()) && check(settings, test);
}
@Override
public final void tooManyRowsFetched(DiagnosticsContext ctx) {
if (check(ctx, Settings::isDiagnosticsTooManyRowsFetched))
for (DiagnosticsListener listener : listeners)
listener.tooManyRowsFetched(ctx);
}
@Override
public final void tooManyColumnsFetched(DiagnosticsContext ctx) {
if (check(ctx, Settings::isDiagnosticsTooManyColumnsFetched))
for (DiagnosticsListener listener : listeners)
listener.tooManyColumnsFetched(ctx);
}
@Override
public final void unnecessaryWasNullCall(DiagnosticsContext ctx) {
if (check(ctx, Settings::isDiagnosticsUnnecessaryWasNullCall))
for (DiagnosticsListener listener : listeners)
listener.unnecessaryWasNullCall(ctx);
}
@Override
public final void missingWasNullCall(DiagnosticsContext ctx) {
if (check(ctx, Settings::isDiagnosticsMissingWasNullCall))
for (DiagnosticsListener listener : listeners)
listener.missingWasNullCall(ctx);
}
@Override
public final void duplicateStatements(DiagnosticsContext ctx) {
if (check(ctx, Settings::isDiagnosticsDuplicateStatements))
for (DiagnosticsListener listener : listeners)
listener.duplicateStatements(ctx);
}
@Override
public final void repeatedStatements(DiagnosticsContext ctx) {
if (check(ctx, Settings::isDiagnosticsRepeatedStatements))
for (DiagnosticsListener listener : listeners)
listener.repeatedStatements(ctx);
}
@Override
public final void exception(DiagnosticsContext ctx) {
for (DiagnosticsListener listener : listeners)
listener.exception(ctx);
}
}
|
[
"lukas.eder@gmail.com"
] |
lukas.eder@gmail.com
|
f79a8b21362169d0c9de1861d1feb3019ef050ef
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/14/14_c6aed2ac131cb225ca495ff4edf4e5665e9271c3/ExternalDebuggingEngineOptionsBlock/14_c6aed2ac131cb225ca495ff4edf4e5665e9271c3_ExternalDebuggingEngineOptionsBlock_s.java
|
b013b93896ac9cb7296f61e325fd4c9240805e32
|
[] |
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
| 3,726
|
java
|
package org.eclipse.dltk.debug.ui.preferences;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Map;
import org.eclipse.core.resources.IProject;
import org.eclipse.dltk.core.DLTKCore;
import org.eclipse.dltk.core.environment.EnvironmentPathUtils;
import org.eclipse.dltk.ui.environment.EnvironmentPathBlock;
import org.eclipse.dltk.ui.preferences.PreferenceKey;
import org.eclipse.dltk.ui.util.IStatusChangeListener;
import org.eclipse.dltk.ui.util.SWTFactory;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Link;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.browser.IWebBrowser;
import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
/**
* Options block for external debugging engine that require the user to specify
* their location on disk.
*/
public abstract class ExternalDebuggingEngineOptionsBlock extends
DebuggingEngineConfigOptionsBlock {
EnvironmentPathBlock enginePaths;
public ExternalDebuggingEngineOptionsBlock(IStatusChangeListener context,
IProject project, PreferenceKey[] allKeys,
IWorkbenchPreferenceContainer container) {
super(context, project, allKeys, container);
}
/**
* Add a link to an external site where the debugging engine can be
* downloaded from
*
* @param parent
* parent composite
* @param text
* link text
* @param url
* link url
*/
protected void addDownloadLink(Composite parent, String text,
final String url) {
Link link = new Link(parent, SWT.NONE);
link.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
openExternalUrl(url);
}
});
link.setText(text);
}
/**
* Returns the debugging engine path preference key.
*/
protected abstract PreferenceKey getDebuggingEnginePathKey();
/**
* Creates the engine path block.
*
* <p>
* Sub-classes are free to override if they wish to make additional
* contributions to the parent composite to provide additional options for
* their specific engine.
* </p>
*
* @param parent
* parent composite
*/
protected void createEngineBlock(final Composite parent) {
final Group group = SWTFactory.createGroup(parent,
ScriptDebugPreferencesMessages.ExternalEngineGroup, 3, 1,
GridData.FILL_BOTH);
enginePaths = new EnvironmentPathBlock();
enginePaths.createControl(group);
enginePaths.setPaths(getEnvironmentPaths());
}
protected boolean processChanges(IWorkbenchPreferenceContainer container) {
setEnvironmentPaths(enginePaths.getPaths());
return super.processChanges(container);
}
private Map getEnvironmentPaths() {
String pathKeyValue = getString(getDebuggingEnginePathKey());
return EnvironmentPathUtils.decodePaths(pathKeyValue);
}
private void setEnvironmentPaths(Map env2path) {
String pathKeyValue = EnvironmentPathUtils.encodePaths(env2path);
setString(getDebuggingEnginePathKey(), pathKeyValue);
}
protected void openExternalUrl(String url) {
try {
final IWebBrowser browser = PlatformUI.getWorkbench()
.getBrowserSupport().getExternalBrowser();
browser.openURL(new URL(url));
} catch (PartInitException e) {
if (DLTKCore.DEBUG) {
e.printStackTrace();
}
} catch (MalformedURLException e) {
if (DLTKCore.DEBUG) {
e.printStackTrace();
}
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
65c87e9be8b7591ece7574550b1f0cce611d16bb
|
5b18c2aa61fd21f819520f1b614425fd6bc73c71
|
/src/main/java/com/sinosoft/claim/resource/dtofactory/domain/DBSwfNode.java
|
f05708976cbf89b8ae4e36b26a4658dce346fdc7
|
[] |
no_license
|
Akira-09/claim
|
471cc215fa77212099ca385e7628f3d69f83d6d8
|
6dd8a4d4eedb47098c09c2bf3f82502aa62220ad
|
refs/heads/master
| 2022-01-07T13:08:27.760474
| 2019-03-24T23:50:09
| 2019-03-24T23:50:09
| null | 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 641
|
java
|
package com.sinosoft.claim.resource.dtofactory.domain;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.sinosoft.sysframework.reference.DBManager;
/**
* 这是WfNode工作流节点定义表的数据访问对象类<br>
* 创建于 2004-08-09 19:54:51.862<br>
* JToolpad(1.2.12-RC10) Vendor:zhouxianli@sinosoft.com.cn
*/
public class DBSwfNode extends DBSwfNodeBase{
private static Log logger = LogFactory.getLog(DBSwfNode.class);
/**
* 构造函数
* @param dbManager 资源管理类
*/
public DBSwfNode(DBManager dbManager){
super(dbManager);
}
}
|
[
"26166405+vincentdk77@users.noreply.github.com"
] |
26166405+vincentdk77@users.noreply.github.com
|
1a82ba62f8e749783c7e9916844b029315ee8210
|
de2eff0e71efe69175d7e54889d84d449d6ed974
|
/ext-api/src/main/java/org/omg/CORBA/ParameterMode.java
|
161660ae918a2191eaf27b7e8e3cd8409c8ec7ef
|
[] |
no_license
|
mmusgrov/corba
|
bb266f631ebdcbabb4719f7d70cb8c766609a3e5
|
03d993498b68d745018061b39196e7818e0fe64d
|
refs/heads/master
| 2021-01-18T10:42:20.114343
| 2013-01-22T06:02:07
| 2013-01-22T06:02:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,312
|
java
|
package org.omg.CORBA;
/**
* Generated from IDL enum "ParameterMode".
*
* @author JacORB IDL compiler V 2.3.1, 27-May-2009
* @version generated at 10/01/2013 11:46:10 AM
*/
public final class ParameterMode
implements org.omg.CORBA.portable.IDLEntity
{
private int value = -1;
public static final int _PARAM_IN = 0;
public static final ParameterMode PARAM_IN = new ParameterMode(_PARAM_IN);
public static final int _PARAM_OUT = 1;
public static final ParameterMode PARAM_OUT = new ParameterMode(_PARAM_OUT);
public static final int _PARAM_INOUT = 2;
public static final ParameterMode PARAM_INOUT = new ParameterMode(_PARAM_INOUT);
public int value()
{
return value;
}
public static ParameterMode from_int(int value)
{
switch (value) {
case _PARAM_IN: return PARAM_IN;
case _PARAM_OUT: return PARAM_OUT;
case _PARAM_INOUT: return PARAM_INOUT;
default: throw new org.omg.CORBA.BAD_PARAM();
}
}
public String toString()
{
switch (value) {
case _PARAM_IN: return "PARAM_IN";
case _PARAM_OUT: return "PARAM_OUT";
case _PARAM_INOUT: return "PARAM_INOUT";
default: throw new org.omg.CORBA.BAD_PARAM();
}
}
protected ParameterMode(int i)
{
value = i;
}
java.lang.Object readResolve()
throws java.io.ObjectStreamException
{
return from_int(value());
}
}
|
[
"stuart.w.douglas@gmail.com"
] |
stuart.w.douglas@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.