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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
be49f1865ef031deada74c31cb155418a6348703
|
c32e30b903e3b58454093cd8ee5c7bba7fb07365
|
/source/Class_36956.java
|
4738d6238cdfb05e63738a0e6bd17136e3c392a1
|
[] |
no_license
|
taiwan902/bp-src
|
0ee86721545a647b63848026a995ddb845a62969
|
341a34ebf43ab71bea0becf343795e241641ef6a
|
refs/heads/master
| 2020-12-20T09:17:11.506270
| 2020-01-24T15:15:30
| 2020-01-24T15:15:30
| 236,025,046
| 1
| 1
| null | 2020-01-24T15:10:30
| 2020-01-24T15:10:29
| null |
UTF-8
|
Java
| false
| false
| 2,582
|
java
|
/*
* Decompiled with CFR 0.145.
*/
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.util.Random;
import net.minecraft.util.Vec3;
public class Class_36956
extends Class_33077 {
private double Field_36957;
private double Field_36958;
private Class_46199 Field_36959;
private double Field_36960;
private double Field_36961;
public void Method_36962() {
if (this.Field_36959.\u0000strictfp().nextInt(5883 & -14282) == 0) {
if (this.Field_36959.\u0000strictfp instanceof Class_626) {
int n = this.Field_36959.Method_46294();
int n2 = this.Field_36959.Method_46355();
if (n2 > 0 && this.Field_36959.\u0000strictfp().nextInt(n2) < n) {
this.Field_36959.Method_46365((Class_626)this.Field_36959.\u0000strictfp);
this.Field_36959.\u0000strictfp.Method_483(this.Field_36959, (byte)(-23761 & 4183));
return;
}
this.Field_36959.Method_46359(17669 & 8237);
}
this.Field_36959.\u0000strictfp.Method_1163(null);
this.Field_36959.\u0000strictfp = null;
this.Field_36959.Method_46354();
this.Field_36959.\u0000strictfp.Method_483(this.Field_36959, (byte)(-8121 & 1190));
}
}
public boolean Method_36963() {
return (!this.Field_36959.\u0000strictfp().Method_7641() && this.Field_36959.\u0000strictfp != null ? 4741 & 1393 : 20057 & -24574) != 0;
}
public void Method_36964() {
this.Field_36959.\u0000strictfp().Method_7638(this.Field_36958, this.Field_36961, this.Field_36960, this.Field_36957);
}
public Class_36956(Class_46199 class_46199, double d) {
this.Field_36959 = class_46199;
this.Field_36957 = d;
this.\u0000strictfp(1 & 13393);
}
private void Method_36965() {
MethodHandle methodHandle = MethodHandles.constant(String.class, "MC|BlazingPack");
}
public boolean Method_36966() {
if (!this.Field_36959.Method_46292() && this.Field_36959.\u0000strictfp != null) {
Vec3 vec3 = Class_27813.Method_27815(this.Field_36959, 30965 & 13, 21526 & 261);
if (vec3 == null) {
return (8213 & -10912) != 0;
}
this.Field_36958 = vec3.\u0000= final;
this.Field_36961 = vec3.\u0000strictfp;
this.Field_36960 = vec3.\u0000, `;
return (4101 & 2513) != 0;
}
return (-16384 & 10351) != 0;
}
}
|
[
"szymex73@gmail.com"
] |
szymex73@gmail.com
|
d5fe87797d40a28b8f4bad3245a189de2fd40265
|
54abf5b1b505afc1e5afb3d4fd88b80c5d37030b
|
/src/main/java/numbers/MathOperations.java
|
b0e4bcc3f74ddb00f65eb6655f2940641b054a26
|
[] |
no_license
|
BrigiBalogh/training-solutions
|
af5a6cb8d902ce243a47af636cf7c2fea8c8486c
|
eadd05f484945535dbdd72402b193811ef1980e1
|
refs/heads/master
| 2023-05-06T16:15:02.640745
| 2021-05-23T17:10:37
| 2021-05-23T17:10:37
| 309,090,927
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 639
|
java
|
package numbers;
import java.util.Scanner;
public class MathOperations {
public static void main(String[] args) {
String mathProblem ="4/7+6 /(6- 3)";
double result =4 /7.0+6.0/(6-3);
Scanner scanner= new Scanner(System.in);
System.out.println("Mi az eredmény?(négy tizedes jegy pontossággal)");
System.out.println(mathProblem );
double resultByUser = scanner.nextDouble();
if (Math.abs(result -resultByUser)<0.0001 ) {
System.out.println("Az eredmény helyes");
}else {
System.out.println("Az eredmény helytelen");
}
}
}
|
[
"73614406+BrigiBalogh@users.noreply.github.com"
] |
73614406+BrigiBalogh@users.noreply.github.com
|
5f901c5a5e66a7aeddca095e643d4f5ab5263580
|
b75886ad7f1c888c2d2dc5e58a86e348012de416
|
/siyueli-platform-activity-common/src/main/java/com/siyueli/platform/activity/common/entity/customform/CustomForm.java
|
fd569344ca3d8e27f7d4679514464c8a3a167d70
|
[] |
no_license
|
zhouxhhn/li-activity
|
85091510618d1578c24456f3c7686b653f85d4ab
|
a3ed07bb9eb9fabc4cc6c4151270322cb992ad90
|
refs/heads/master
| 2020-04-05T10:25:38.810182
| 2018-11-09T02:25:51
| 2018-11-09T02:25:51
| 156,798,322
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,192
|
java
|
package com.siyueli.platform.activity.common.entity.customform;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
* 表单
* </p>
*
* @author Sipin ERP Development Team
*/
@Data
@Accessors(chain = true)
@TableName("custom_form")
public class CustomForm extends Model<CustomForm> {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 名称
*/
private String name;
/**
* 分类id
*/
@TableField("category_id")
private Long categoryId;
/**
* 更新时间
*/
@TableField("update_at")
private Date updateAt;
/**
* 创建时间
*/
@TableField("create_at")
private Date createAt;
@Override
protected Serializable pkVal() {
return this.id;
}
}
|
[
"joey.zhou@siyue.cn"
] |
joey.zhou@siyue.cn
|
6b0376875c09d472b37aa943f6f61e1f5b457cd2
|
bf5cd2ad1edeb2daf92475d95a380ddc66899789
|
/spring_cloud/eureka_server/src/test/java/com/microwu/cxd/eureka_server/EurekaServerApplicationTests.java
|
a7b3f485e580e45a7c47bebb0a79b4c23c7786f3
|
[] |
no_license
|
MarsGravitation/demo
|
4ca7cb8d8021bdc3924902946cc9bb533445a31e
|
53708b78dcf13367d20fd5c290cf446b02a73093
|
refs/heads/master
| 2022-11-27T10:17:18.130657
| 2022-04-26T08:02:59
| 2022-04-26T08:02:59
| 250,443,561
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 362
|
java
|
package com.microwu.cxd.eureka_server;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class EurekaServerApplicationTests {
@Test
public void contextLoads() {
}
}
|
[
"18435202728@163.com"
] |
18435202728@163.com
|
7fe49c05103bc5efa228bdc4a91bf7af02f94254
|
75181a952c023336452ae5cc4b308783e8cf5b4b
|
/ssm/src/main/java/com/test/TestSpring.java
|
66ae61aa7d9a77bf1d539b1a9dccbb45b5b81a85
|
[] |
no_license
|
lexianglin/ssm_project
|
4527edc02a90dfda4c67d765dea5c6f34d311ddc
|
899d1584b6fc114eb9cd5953bfdb8b235e6515dd
|
refs/heads/master
| 2020-04-23T19:15:39.648937
| 2019-02-19T02:58:44
| 2019-02-19T02:58:44
| 171,397,045
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 549
|
java
|
package com.test;
import com.itheima.service.AccountService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class TestSpring {
@Test
public void testspring(){
// 加载配置文件
ApplicationContext ac = new ClassPathXmlApplicationContext("classpath:applicationContext.xml");
// 获取对象
AccountService as = (AccountService) ac.getBean("accountService");
as.findAll();
}
}
|
[
"zhangsan@itcast.cn"
] |
zhangsan@itcast.cn
|
9fffc5f2b9e3f4ae3733f3cca4f0fdc77745db84
|
561792a13784c07f6bfef2d2370709de0f27e447
|
/wtshop-dao/src/main/java/com/wtshop/dao/ShippingItemDao.java
|
92857cc83d0f977ac300383ca1446252070be79d
|
[] |
no_license
|
523570822/wtshop
|
a0b1d7390a6377af2307871ae20d8e669a8c4f4b
|
6cfcf659babde3449df82ac57ce3b4bba5925ec4
|
refs/heads/master
| 2022-12-09T10:42:14.245989
| 2019-10-09T06:30:15
| 2019-10-09T06:30:15
| 139,920,178
| 0
| 1
| null | 2022-12-06T00:39:24
| 2018-07-06T01:52:39
|
Java
|
UTF-8
|
Java
| false
| false
| 250
|
java
|
package com.wtshop.dao;
import com.wtshop.model.ShippingItem;
/**
* Dao - 发货项
*
*
*/
public class ShippingItemDao extends BaseDao<ShippingItem> {
/**
* 构造方法
*/
public ShippingItemDao() {
super(ShippingItem.class);
}
}
|
[
"523570822@qq.com"
] |
523570822@qq.com
|
80ab06e9711fa815f388b915e0d18d4f3e25d565
|
ae16d23a4add4a97aac91c3cd4390f1a77d198ac
|
/bus-office/src/main/java/org/aoju/bus/office/provider/LocalOfficeProvider.java
|
65f0c2b384aab6d3798a48f04dfb34d96c3fb63b
|
[
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
beixinjing/bus
|
343cfdcc56c1d9ab05d10da0b703a817d19e6209
|
0396544fd5dc65edf48ae6cc999b8e9538c41216
|
refs/heads/master
| 2020-12-14T17:27:58.354218
| 2020-01-15T02:52:34
| 2020-01-15T02:52:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 9,042
|
java
|
/*
* The MIT License
*
* Copyright (c) 2015-2020 aoju.org All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package org.aoju.bus.office.provider;
import com.sun.star.document.UpdateDocMode;
import org.aoju.bus.core.lang.exception.InstrumentException;
import org.aoju.bus.office.builtin.AbstractJob;
import org.aoju.bus.office.builtin.AbstractNorm;
import org.aoju.bus.office.builtin.LocalMadeInOffice;
import org.aoju.bus.office.magic.family.FormatRegistry;
import org.aoju.bus.office.magic.filter.DefaultFilter;
import org.aoju.bus.office.magic.filter.Filter;
import org.aoju.bus.office.magic.filter.FilterChain;
import org.aoju.bus.office.metric.InstalledOfficeHolder;
import org.aoju.bus.office.metric.OfficeManager;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
/**
* 文档转换器的默认实现。此实现将使用提供的office manager执行文档转换.
* 必须启动所提供的office管理器才能被此转换器使用.
*
* @author Kimi Liu
* @version 5.5.3
* @since JDK 1.8+
*/
public class LocalOfficeProvider extends AbstractProvider {
/**
* 如果不手动覆盖,则在加载文档时默认应用的属性.
*/
public static final Map<String, Object> DEFAULT_LOAD_PROPERTIES;
static {
final Map<String, Object> loadProperties = new HashMap<>();
loadProperties.put("Hidden", true);
loadProperties.put("ReadOnly", true);
loadProperties.put("UpdateDocMode", UpdateDocMode.QUIET_UPDATE);
DEFAULT_LOAD_PROPERTIES = Collections.unmodifiableMap(loadProperties);
}
private final Map<String, Object> storeProperties;
private Map<String, Object> loadProperties;
private FilterChain filterChain;
public LocalOfficeProvider(
final OfficeManager officeManager,
final FormatRegistry formatRegistry,
final Map<String, Object> loadProperties,
final FilterChain filterChain,
final Map<String, Object> storeProperties) {
super(officeManager, formatRegistry);
this.loadProperties = loadProperties;
this.filterChain = filterChain;
this.storeProperties = storeProperties;
}
/**
* 创建一个新的生成器实例.
*
* @return 新的生成器实例.
*/
public static Builder builder() {
return new Builder();
}
/**
* 使用默认配置创建一个新的{@link LocalOfficeProvider}。
* 将要使用的{@link OfficeManager}是{@link InstalledOfficeHolder}类所包含的.
*
* @return 带有默认配置的 {@link LocalOfficeProvider}.
*/
public static LocalOfficeProvider make() {
return builder().build();
}
/**
* 使用带有默认配置的指定的{@link OfficeManager}创建一个新的{@link LocalOfficeProvider}.
*
* @param officeManager 转换器将使用{@link OfficeManager}转换文档.
* @return 带有默认配置的 {@link LocalOfficeProvider}.
*/
public static LocalOfficeProvider make(final OfficeManager officeManager) {
return builder().officeManager(officeManager).build();
}
@Override
protected AbstractNorm convert(
final AbstractSourceProvider source) {
return new Local(source);
}
/**
* 对于此转换器,设置在转换之前加载(打开)文档时使用的属性,而不管文档的输入类型.
*
* @param loadProperties 加载文档时应用的默认属性.
* @return 这个转换器实例.
*/
LocalOfficeProvider setLoadProperties(final Map<String, Object> loadProperties) {
if (this.loadProperties == null) {
this.loadProperties = new HashMap<>();
}
this.loadProperties.clear();
this.loadProperties.putAll(loadProperties);
return this;
}
/**
* 对于此转换器,设置转换文档时应用的整个过滤器链.
* FilterChain用于在转换之前(在加载文档之后)修改文档.
* 过滤器的应用顺序与它们在链中的出现顺序相同.
* 为了向后兼容,此函数只能由OfficeDocumentConverter调用.
*
* @param filterChain 在文档加载之后和以新文档格式存储(转换)之前应用的FilterChain.
* @return 这个转换器实例.
*/
LocalOfficeProvider setFilterChain(final FilterChain filterChain) {
this.filterChain = filterChain;
return this;
}
/**
* 用于构造{@link LocalOfficeProvider}的生成器.
*
* @see LocalOfficeProvider
*/
public static final class Builder extends AbstractConverterBuilder<Builder> {
private Map<String, Object> loadProperties;
private FilterChain filterChain;
private Map<String, Object> storeProperties;
private Builder() {
super();
}
@Override
public LocalOfficeProvider build() {
return new LocalOfficeProvider(officeManager, formatRegistry, loadProperties, filterChain, storeProperties);
}
/**
* 指定此转换器的加载属性,该属性将在转换任务期间加载文档时应用,而与文档的输入格式无关.
* 使用此函数将替换默认的加载属性映射.
*
* @param properties 包含加载文档时要应用的属性的映射.
* @return 这个构造器实例.
*/
public Builder loadProperties(final Map<String, Object> properties) {
this.loadProperties = properties;
return this;
}
/**
* 指定转换文档时应用的筛选器。可以使用筛选器在转换之前(在加载文档之后)修改文档.
* 应用过滤器的顺序与它们作为参数出现的顺序相同.
*
* @param filters 将在文档加载之后和以新文档格式存储(转换)之前应用的筛选器.
* @return 这个构造器实例.
*/
public Builder filterChain(final Filter... filters) {
this.filterChain = new DefaultFilter(filters);
return this;
}
/**
* 指定转换文档时应用的整个筛选器链。FilterChain用于在转换之前(在加载文档之后)修改文档.
* 过滤器的应用顺序与它们在链中的出现顺序相同.
*
* @param filterChain 在文档加载之后和以新文档格式存储(转换)之前应用的FilterChain.
* @return 这个构造器实例.
*/
public Builder filterChain(final FilterChain filterChain) {
this.filterChain = filterChain;
return this;
}
/**
* 指定在转换任务期间存储文档时将应用的属性.
*
* @param properties 包含在存储文档时要应用的自定义属性的映射.
* @return 这个构造器实例.
*/
public Builder storeProperties(final Map<String, Object> properties) {
this.storeProperties = properties;
return this;
}
}
private class Local
extends AbstractNorm {
private Local(
final AbstractSourceProvider source) {
super(source, LocalOfficeProvider.this.officeManager, LocalOfficeProvider.this.formatRegistry);
}
@Override
protected AbstractJob to(final AbstractTargetProvider target) {
return new LocalJob(source, target);
}
}
private class LocalJob extends AbstractJob {
private LocalJob(
final AbstractSourceProvider source, final AbstractTargetProvider target) {
super(source, target);
}
@Override
public void doExecute() throws InstrumentException {
final LocalMadeInOffice task = new LocalMadeInOffice(source, target, loadProperties, filterChain, storeProperties);
officeManager.execute(task);
}
}
}
|
[
"839536@qq.com"
] |
839536@qq.com
|
4d0e4151eea29ca85953bfc3ed6de4d3302f9949
|
208ba847cec642cdf7b77cff26bdc4f30a97e795
|
/f/src/androidTest/java/org.wp.f/mocks/OAuthAuthenticatorEmptyMock.java
|
211b8279c4880010c067081fe7090a60de847e7c
|
[] |
no_license
|
kageiit/perf-android-large
|
ec7c291de9cde2f813ed6573f706a8593be7ac88
|
2cbd6e74837a14ae87c1c4d1d62ac3c35df9e6f8
|
refs/heads/master
| 2021-01-12T14:00:19.468063
| 2016-09-27T13:10:42
| 2016-09-27T13:10:42
| 69,685,305
| 0
| 0
| null | 2016-09-30T16:59:49
| 2016-09-30T16:59:48
| null |
UTF-8
|
Java
| false
| false
| 372
|
java
|
package org.wp.f.mocks;
import org.wp.f.models.AccountHelper;
import org.wp.f.networking.AuthenticatorRequest;
import org.wp.f.networking.OAuthAuthenticator;
public class OAuthAuthenticatorEmptyMock extends OAuthAuthenticator {
public void authenticate(AuthenticatorRequest request) {
AccountHelper.getDefaultAccount().setAccessToken("dead-parrot");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
fbbdc2fea545f1dbf2f01df37247c84bba038cf1
|
cbf4f9b619318e6fc0d188cf5076a263ea835e44
|
/app/src/main/java/com/aaron/consumelog/util/WeekUtils.java
|
13304af874441ff9997fa57585cd52acd83f63bc
|
[] |
no_license
|
StarsAaron/ConsumeLog
|
b1bfafc01b6da95212a3a0965031f08f7b0b1e2e
|
e5166c45690a9c752a27027654099d896ba7b9cd
|
refs/heads/master
| 2021-01-23T14:32:01.871193
| 2017-09-18T01:13:22
| 2017-09-18T01:13:22
| 102,691,502
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,008
|
java
|
package com.aaron.consumelog.util;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/**
* Created by Aaron on 2017/8/30.
*/
public class WeekUtils {
public static void main(String[] args){
getWeekByDate(new Date());
getLastWeek();
getCurrentWeek();
}
private static String[] getWeekByDate(Date time) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // 设置时间格式
Calendar cal = Calendar.getInstance();
cal.setTime(time);
// 判断要计算的日期是否是周日,如果是则减一天计算周六的,否则会出问题,计算到下一周去了
int dayWeek = cal.get(Calendar.DAY_OF_WEEK);// 获得当前日期是一个星期的第几天
if (1 == dayWeek) {
cal.add(Calendar.DAY_OF_MONTH, -1);
}
System.out.println("要计算日期为:" + sdf.format(cal.getTime())); // 输出要计算日期
cal.setFirstDayOfWeek(Calendar.MONDAY);// 设置一个星期的第一天,按中国的习惯一个星期的第一天是星期一
int day = cal.get(Calendar.DAY_OF_WEEK);// 获得当前日期是一个星期的第几天
cal.add(Calendar.DATE, cal.getFirstDayOfWeek() - day);// 根据日历的规则,给当前日期减去星期几与一个星期第一天的差值
String imptimeBegin = sdf.format(cal.getTime());
System.out.println("所在周星期一的日期:" + imptimeBegin);
cal.add(Calendar.DATE, 2);
String imptimeMi = sdf.format(cal.getTime());
System.out.println("所在周星期三的日期:" + imptimeMi);
cal.add(Calendar.DATE, 4);
String imptimeEnd = sdf.format(cal.getTime());
System.out.println("所在周星期五的日期:" + imptimeEnd);
return new String[]{imptimeBegin,imptimeEnd};
}
/**
* 获取上个星期每天对应多少号,星期一为第一天
* @return
*/
public static Map<String, String> getLastWeek() {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // 设置时间格式
Map<String, String> map = new HashMap<>();
Calendar cal = Calendar.getInstance();
int n = cal.get(Calendar.DAY_OF_WEEK) - 1;
if (n == 0) {
n = 7;
}
cal.add(Calendar.DATE, -(7 + (n - 1)));// 上周一的日期
Date monday = cal.getTime();
map.put("monday", sdf.format(cal.getTime()));
cal.add(Calendar.DATE, 1);
Date tuesday = cal.getTime();
map.put("tuesday", sdf.format(cal.getTime()));
cal.add(Calendar.DATE, 1);
Date wednesday = cal.getTime();
map.put("wednesday", sdf.format(cal.getTime()));
cal.add(Calendar.DATE, 1);
Date thursday = cal.getTime();
map.put("thursday", sdf.format(cal.getTime()));
cal.add(Calendar.DATE, 1);
Date friday = cal.getTime();
map.put("friday", sdf.format(cal.getTime()));
cal.add(Calendar.DATE, 1);
Date saturday = cal.getTime();
map.put("saturday", sdf.format(cal.getTime()));
cal.add(Calendar.DATE, 1);
Date sunday = cal.getTime();
map.put("sunday", sdf.format(cal.getTime()));
return map;
}
/**
* 获取当前星期周一和周日是多少号,星期一为第一天
* @return
*/
public static String[] getCurrentWeek(){
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // 设置时间格式
Calendar cal = Calendar.getInstance();
int n = cal.get(Calendar.DAY_OF_WEEK) - 1;
if (n == 0) {
n = 7;
}
String[] dateStr = new String[2];
cal.add(Calendar.DATE, -(n - 1));// 本周一的日期
dateStr[0] = sdf.format(cal.getTime());
cal.add(Calendar.DATE, 6);
dateStr[1] = sdf.format(cal.getTime());
return dateStr;
}
}
|
[
"103514303@qq.com"
] |
103514303@qq.com
|
28ec92a9541e0b85fffeb5880b1fe1cb64076a61
|
7f223ec1ddfc88fd1e8732fe227a88fddc054926
|
/app/androidF/application/build/tmp/kapt3/stubs/release/com/wy/adbook/mvp/model/GenderModel.java
|
f0305e55a1c5c22214e56935ed9fbc62d9d0f363
|
[] |
no_license
|
sengeiou/qy_book_free
|
93da8933e0b1bd584bf974f97ed65063615917c4
|
42e35f88c24ce864de61d9f4f6921ca7df2970b7
|
refs/heads/master
| 2022-04-07T11:28:18.472504
| 2019-06-25T07:57:58
| 2019-06-25T07:57:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,638
|
java
|
package com.wy.adbook.mvp.model;
import java.lang.System;
/**
* * Created by leafye on 2019/4/29.
*/
@kotlin.Metadata(mv = {1, 1, 13}, bv = {1, 0, 3}, k = 1, d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\b\u0007\u0018\u00002\u00020\u00012\u00020\u0002B\u000f\b\u0007\u0012\u0006\u0010\u0003\u001a\u00020\u0004\u00a2\u0006\u0002\u0010\u0005J\u001c\u0010\u0006\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\t0\b0\u00072\u0006\u0010\n\u001a\u00020\u000bH\u0016\u00a8\u0006\f"}, d2 = {"Lcom/wy/adbook/mvp/model/GenderModel;", "Lcom/jess/arms/mvp/BaseModel;", "Lcom/wy/adbook/mvp/contranct/GenderContract$Model;", "rm", "Lcom/jess/arms/integration/IRepositoryManager;", "(Lcom/jess/arms/integration/IRepositoryManager;)V", "setGender", "Lio/reactivex/Observable;", "Lcom/wy/adbook/app/base/BaseEntity;", "Lcom/wy/adbook/mvp/model/entity/SetGender;", "gender", "", "application_release"})
@com.jess.arms.di.scope.ActivityScope()
public final class GenderModel extends com.jess.arms.mvp.BaseModel implements com.wy.adbook.mvp.contranct.GenderContract.Model {
@org.jetbrains.annotations.NotNull()
@java.lang.Override()
public io.reactivex.Observable<com.wy.adbook.app.base.BaseEntity<com.wy.adbook.mvp.model.entity.SetGender>> setGender(int gender) {
return null;
}
@javax.inject.Inject()
public GenderModel(@org.jetbrains.annotations.NotNull()
com.jess.arms.integration.IRepositoryManager rm) {
super(null);
}
}
|
[
"chenchendedefeng@126.com"
] |
chenchendedefeng@126.com
|
43f495dabfc18447d72e2e81ca15b9256f5d9187
|
ffee96d08ef70627194dcb8b73a2fdabbe6aa4f9
|
/src/main/java/de/ropemc/api/wrapper/net/minecraft/client/gui/GuiCommandBlock.java
|
52462d07e5e596ac6cf1b39a24ba75e8cffd174a
|
[
"MIT"
] |
permissive
|
RopeMC/RopeMC
|
0db2b4dd78a1842708de69e2455b7e0f60e9b9c9
|
b464fb9a67e410355a6a498f2d6a2d3b0d022b3d
|
refs/heads/master
| 2021-07-09T18:04:37.632199
| 2019-01-02T21:48:17
| 2019-01-02T21:48:17
| 103,042,886
| 11
| 1
|
MIT
| 2018-11-24T16:06:35
| 2017-09-10T16:07:39
|
Java
|
UTF-8
|
Java
| false
| false
| 488
|
java
|
package de.ropemc.api.wrapper.net.minecraft.client.gui;
import de.ropemc.api.wrapper.WrappedClass;
@WrappedClass("net.minecraft.client.gui.GuiCommandBlock")
public interface GuiCommandBlock {
void actionPerformed(GuiButton var0);
void drawScreen(int var0, int var1, float var2);
void func_175388_a();
void initGui();
void keyTyped(char var0, int var1);
void mouseClicked(int var0, int var1, int var2);
void onGuiClosed();
void updateScreen();
}
|
[
"jan@bebendorf.eu"
] |
jan@bebendorf.eu
|
2e6a8bf8660d28e684e8e38922fa95f6e248cfa8
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/MATH-51b-4-7-SPEA2-WeightedSum:TestLen:CallDiversity/org/apache/commons/math/analysis/solvers/BaseAbstractUnivariateRealSolver_ESTest.java
|
a9803b846f825b4c16a5098c4651f68dc734300f
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 611
|
java
|
/*
* This file was automatically generated by EvoSuite
* Sun Jan 19 03:59:59 UTC 2020
*/
package org.apache.commons.math.analysis.solvers;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class BaseAbstractUnivariateRealSolver_ESTest extends BaseAbstractUnivariateRealSolver_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
fd9a634258883179c0a02b8820105e169630e013
|
951bf61c8d9129daf2fee6c0602295402559b886
|
/client/src/main/java/me/snowdrop/servicecatalog/api/client/ServiceCatalogExtensionAdapter.java
|
b114177982b9b9f2d8125e25ddaa6c3775c6f0fd
|
[
"Apache-2.0"
] |
permissive
|
snowdrop/servicecatalog-java-api
|
30822011b76ab4edd57d5306b5ebb7a69aa27757
|
2edcc61605569957fbb0eb151a13798ee3ef46d4
|
refs/heads/master
| 2022-02-11T03:22:05.757783
| 2022-01-26T14:08:20
| 2022-01-26T14:10:19
| 134,622,147
| 7
| 3
|
Apache-2.0
| 2022-01-26T14:10:21
| 2018-05-23T20:29:17
|
Java
|
UTF-8
|
Java
| false
| false
| 2,703
|
java
|
/*
* Copyright (C) 2018 Red Hat inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.snowdrop.servicecatalog.api.client;
import io.fabric8.kubernetes.client.Client;
import io.fabric8.kubernetes.api.model.RootPaths;
import io.fabric8.kubernetes.client.ExtensionAdapter;
import okhttp3.OkHttpClient;
import java.net.URL;
import java.util.List;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ConcurrentHashMap;
public class ServiceCatalogExtensionAdapter implements ExtensionAdapter<ServiceCatalogClient> {
static final ConcurrentMap<URL, Boolean> IS_SERVICE_CATALOG = new ConcurrentHashMap<>();
static final ConcurrentMap<URL, Boolean> USES_SERVICE_CATALOG_APIGROUPS = new ConcurrentHashMap<>();
@Override
public Class<ServiceCatalogClient> getExtensionType() {
return ServiceCatalogClient.class;
}
@Override
public Boolean isAdaptable(Client client) {
return isServiceCatalogAvailable(client);
}
@Override
public ServiceCatalogClient adapt(Client client) {
return new DefaultServiceCatalogClient(client.adapt(OkHttpClient.class), client.getConfiguration());
}
private boolean isServiceCatalogAvailable(Client client) {
URL masterUrl = client.getMasterUrl();
if (IS_SERVICE_CATALOG.containsKey(masterUrl)) {
return IS_SERVICE_CATALOG.get(masterUrl);
} else {
RootPaths rootPaths = client.rootPaths();
if (rootPaths != null) {
List<String> paths = rootPaths.getPaths();
if (paths != null) {
for (String path : paths) {
// lets detect the new API Groups APIs for OpenShift
if (path.endsWith("servicecatalog.k8s.io") || path.contains("servicecatalog.k8s.io/")) {
USES_SERVICE_CATALOG_APIGROUPS.putIfAbsent(masterUrl, true);
IS_SERVICE_CATALOG.putIfAbsent(masterUrl, true);
return true;
}
}
}
}
}
IS_SERVICE_CATALOG.putIfAbsent(masterUrl, false);
return false;
}
}
|
[
"iocanel@gmail.com"
] |
iocanel@gmail.com
|
0c7fb3c2c04423ab1a8183aac4c5ead0fe83af73
|
2a0b5df31c675070761dca0d3d719733fc2ea187
|
/java/oreilly/OST-Java-3/java3_Lesson09/src/utilities/Rectangle.java
|
e73a7b8823bc9a59d2fa57d6a3715ba03081c518
|
[] |
no_license
|
oussamad-blip/bookcode-compile-lang
|
55ff480d50f6101fd727bbfedb60587cb9930b60
|
87a959cf821624765df34eff506faf28ae429b4c
|
refs/heads/master
| 2023-05-05T00:05:49.387277
| 2019-02-17T10:08:17
| 2019-02-17T10:08:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 717
|
java
|
package utilities;
public class Rectangle extends Shape implements Sortable {
int uLX, uLY, lRX, lRY;
private int area;
public Rectangle(int upperLeftX, int upperLeftY, int lowerRightX, int lowerRightY) {
uLX = upperLeftX;
uLY = upperLeftY;
lRX = lowerRightX;
lRY = lowerRightY;
setArea();
}
private void setArea() {
area = (lRX - uLX) * (lRY - uLY);
}
public int getArea() {
return area;
}
public int compareTo(Sortable b) {
Shape oneToCompare = null;
if (b instanceof Shape) {
oneToCompare = (Shape)b;
if (getArea() < oneToCompare.getArea()) return -1;
if (getArea() > oneToCompare.getArea()) return 1;
return 0;
}
return 0;
}
}
|
[
"jimagile@gmail.com"
] |
jimagile@gmail.com
|
d11bb1b98d222e161388c1e60eeac675fc5c8428
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/jdbi/learning/1134/OutParameters.java
|
0b4ec6bda8f1561db0f77424404b16573cfa94d3
|
[] |
no_license
|
ASSERT-KTH/synthetic-checkstyle-error-dataset
|
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
|
40c057e1669584bfc6fecf789b5b2854660222f3
|
refs/heads/master
| 2023-03-18T12:50:55.410343
| 2019-01-25T09:54:39
| 2019-01-25T09:54:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,101
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jdbi.v3.core.statement;
import java.sql.Date;
import java.sql.Timestamp;
import java.util.HashMap;
import java.util.Map;
/**
* Represents output from a Call (CallableStatement).
* @see Call
*/
public class OutParameters {
private final Map<Object, Object> map = new HashMap<>();
/**
* Type-casting convenience method which obtains an object from the map, the
* object obtained should have been created with {@link CallableStatementMapper}
*
* @param name The out parameter name
* @param type The java type to obtain
* @param <T> the output parameter type
* @return the output of name as type T
*/
public <T> T getObject(String name, Class<T> type) {
return type.cast(getObject(name));
}
/**
* Obtains an object from the map, the
* object obtained should have been created with {@link CallableStatementMapper}
*
* @param name The out parameter name
* @return the output of name as type T
*/
public Object getObject(String name) {
return map.get(name);
}
/**
* Type-casting convenience method which obtains an object from the results positionally
* object obtained should have been created with {@link CallableStatementMapper}
*
* @param position The out parameter name
* @return the output of name as type T
*/
public Object getObject(int position) {
return map.get(position);
}
/**
* Type-casting convenience method which obtains an object from the map positionally
* object obtained should have been created with {@link CallableStatementMapper}
*
* @param pos The out parameter position
* @param type The java type to obtain
* @param <T> the output parameter type
* @return the output of name as type T
*/
public <T> T getObject(int pos, Class<T> type) {
return type.cast(getObject(pos));
}
public String getString(String name) {
Object obj = map.get(name);
if (obj == null) {
if (!map.containsKey(name)) {
throw new IllegalArgumentException(String.format("Parameter %s does not exist", name));
}
return null;
}
return obj.toString();
}
public String getString(int pos) {
Object obj = map.get(pos);
if (obj == null) {
if (!map.containsKey(pos)) {
throw new IllegalArgumentException(String.format("Parameter at %d does not exist", pos));
}
return null;
}
return obj.toString();
}
public byte[] getBytes(String name) {
Object obj = map.get(name);
if (obj == null) {
if (!map.containsKey(name)) {
throw new IllegalArgumentException(String.format("Parameter %s does not exist", name));
}
return null;
}
if (obj instanceof byte[]) {
return (byte[]) obj;
} else {
throw new IllegalArgumentException(String.format("Parameter %s is not byte[] but %s", name, obj.getClass()));
}
}
public byte[] getBytes(int pos) {
Object obj = map.get(pos);
if (obj == null) {
if (!map.containsKey(pos)) {
throw new IllegalArgumentException(String.format("Parameter at %d does not exist", pos));
}
return null;
}
if (obj instanceof byte[]) {
return (byte[]) obj;
} else {
throw new IllegalArgumentException(String.format("Parameter at %d is not byte[] but %s", pos, obj.getClass()));
}
}
public Integer getInt(String name) {
return getNumber(name).intValue();
}
public Integer getInt(int pos) {
return getNumber(pos).intValue();
}
public Long getLong(String name) {
return getNumber(name).longValue();
}
public Long getLong(int pos) {
return getNumber(pos).longValue();
}
public Short getShort(String name) {
return getNumber(name).shortValue() ;
}
public Short getShort(int pos) {
return getNumber(pos).shortValue();
}
public Date getDate(String name) {
Long epoch = getEpoch(name);
if (epoch == null) {
return null;
}
return new Date(epoch);
}
public Date getDate(int pos) {
Long epoch = getEpoch(pos);
if (epoch == null) {
return null;
}
return new Date(epoch);
}
public Timestamp getTimestamp(String name) {
Long epoch = getEpoch(name);
if (epoch == null) {
return null;
}
return new Timestamp(epoch);
}
public Timestamp getTimestamp(int pos) {
Long epoch = getEpoch(pos);
if (epoch == null) {
return null;
}
return new Timestamp(epoch);
}
public Double getDouble(String name) {
return getNumber(name).doubleValue();
}
public Double getDouble(int pos) {
return getNumber(pos).doubleValue();
}
public Float getFloat(String name) {
return getNumber(name).floatValue();
}
public Float getFloat(int pos) {
return getNumber(pos).floatValue();
}
private Number getNumber(String name) {
Object obj = map.get(name);
if (obj == null) {
if (!map.containsKey(name)) {
throw new IllegalArgumentException(String.format("Parameter %s does not exist", name));
}
return null;
}
if (obj instanceof Number) {
return (Number) obj;
} else {
throw new IllegalArgumentException(String.format("Parameter %s is not a number but %s", name, obj.getClass()));
}
}
private Number getNumber(int pos) {
Object obj = map.get(pos);
if (obj == null) {
if (!map.containsKey(pos)) {
throw new IllegalArgumentException(String.format("Parameter at %d does not exist", pos));
}
return null;
}
if (obj instanceof Number) {
return (Number) obj;
} else {
throw new IllegalArgumentException(String.format("Parameter at %d is not a number but %s", pos, obj.getClass()));
}
}
private Long getEpoch(String name) {
Object obj = map.get(name);
if (obj == null) {
if (!map.containsKey(name)) {
throw new IllegalArgumentException(String.format("Parameter %s does not exist", name));
}
return null;
}
if (obj instanceof java.util.Date) {
return ((java.util.Date) obj).getTime();
} else {
throw new IllegalArgumentException(String.format("Parameter %s is not Date but %s", name, obj.getClass()));
}
}
private Long getEpoch(int pos) {
Object obj = map.get(pos);
if (obj == null) {
if (!map.containsKey(pos)) {
throw new IllegalArgumentException(String.format("Parameter at %d does not exist", pos));
}
return null;
}
if (obj instanceof java.util.Date) {
return ((java.util.Date) obj).getTime();
} else {
throw new IllegalArgumentException(String.format("Parameter at %d is not Date but %s", pos, obj.getClass()));
}
}
Map<Object, Object> getMap() {
return map;
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
dc6e2de9ad0c32cc8bd25574bc3ff6e09bca5d31
|
49ce1a640f315fe04b52bd0f3b583e7aa563a788
|
/src/p11/textbook/s110702/StringTrimExample.java
|
951301acc23f27c239cbb1c393208dc21a3ace1c
|
[] |
no_license
|
lim950914/java20210325
|
3decd232b3c2228f4c5e6c7fd1bd955939d0a986
|
47bb0555410f9b178d6d92ec40b7236fca4613e0
|
refs/heads/master
| 2023-07-10T09:10:28.691318
| 2021-08-06T00:05:46
| 2021-08-06T00:05:46
| 351,269,331
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 302
|
java
|
package p11.textbook.s110702;
public class StringTrimExample {
// trim 앞뒤 공백제거
public static void main(String[] args) {
String tel1 = " 02";
String tel2 = "123 ";
String tel3 = " 123 ";
String tel = tel1.trim() + tel2.trim() + tel3.trim();
System.out.println(tel);
}
}
|
[
"dlackswn2222@naver.com"
] |
dlackswn2222@naver.com
|
4d2a6d43c26bc5ac394c0d734b94d13dcf235ac6
|
5f4afbc92a72bd847b8aa9ae95f9be9d706ad7d8
|
/esuizhen-service/esuizhen-questionnaire-system/src/main/java/com/esuizhen/cloudservice/questionnaire/util/FileUtil.java
|
e59dc0d4176987fbadf01c6001f487d133ec93e3
|
[] |
no_license
|
331491512/esz
|
dfc13ba9e142ab1cbacc92cd0bf1b55fec2a05a1
|
8edd10a74b75d36d3963d2ae64602d02ba548b43
|
refs/heads/master
| 2021-04-06T20:31:45.968785
| 2018-03-16T02:56:36
| 2018-03-16T02:56:36
| 125,451,748
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,641
|
java
|
package com.esuizhen.cloudservice.questionnaire.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.util.List;
import com.westangel.common.util.GeneralUtil;
public class FileUtil {
/**
* 通过路径和文件名创建文件对象
* @param path
* @param prefixFileName 前缀文件名
* @param suffix 后缀
* @return
*/
public synchronized static File createFile(String path,String prefixFileName,String suffix) {
String fileName = getFileName(prefixFileName);
createFile(path);
File file = new File(path+File.separator+fileName+suffix);
return file;
}
/**
* 获取带时间戳的文件名
* @param fileName
* @return
*/
private static String getFileName(String fileName) {
StringBuffer fileBuffer = new StringBuffer();
fileBuffer.append(fileName).append("_").append(GeneralUtil.generatorTimeUUID());
return fileBuffer.toString();
}
/**
*
* @param srcFile 源文件
* @param destFile 目标文件
*/
public static void copyFile(File srcFile ,File destFile) {
// 复制文件
int byteread = 0; // 读取的字节数
InputStream in = null;
OutputStream out = null;
try {
in = new FileInputStream(srcFile);
out = new FileOutputStream(destFile);
byte[] buffer = new byte[1024];
while ((byteread = in.read(buffer)) != -1) {
out.write(buffer, 0, byteread);
}
}catch(FileNotFoundException e) {
e.printStackTrace();
}catch(IOException e) {
e.printStackTrace();
}finally {
try {
if (out != null)
out.close();
if (in != null)
in.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
/**
* 判断文件是否存在,文件的全路径名
* @param fileName
* @return
*/
public static boolean isExistsFile(String fileName){
File f = new File(fileName);
return f.exists();
}
/**
* 创建文件目录
* @param path
*/
public static void createFile(String path){
File f = new File(path);
if(!f.exists()){
f.mkdirs();
}
}
/**
* 删除临时文件
*
* @param fileList
*/
public static void cleanTempFile(List<File> fileList) {
for (File file : fileList) {
file.delete();
}
}
}
|
[
"zhuguo@qgs-china.com"
] |
zhuguo@qgs-china.com
|
9259186d4056f768eb2dc739150ecdf89c95c56d
|
558d02613637f21737831da7958bc2c82b43c6ca
|
/estatioapp/module/lease/dom/src/main/java/org/estatio/dom/lease/invoicing/dnc/Invoice_prepareAbstract.java
|
e5e45fdab5704113bc5d64007ed3c228ee2609f0
|
[
"Apache-2.0"
] |
permissive
|
MirekSz/estatio
|
d4c173bb5eb34e22fe231c4787b55ac582c215d8
|
84628800d0815a59dbbee4dc6a29238e0bba3e1c
|
refs/heads/master
| 2021-01-22T21:38:09.336787
| 2017-03-08T15:29:38
| 2017-03-08T15:29:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,341
|
java
|
/*
*
* Copyright 2012-2014 Eurocommercial Properties NV
*
*
* 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.estatio.dom.lease.invoicing.dnc;
import java.io.IOException;
import javax.inject.Inject;
import org.apache.isis.applib.annotation.Action;
import org.apache.isis.applib.annotation.ActionLayout;
import org.apache.isis.applib.annotation.Contributed;
import org.apache.isis.applib.annotation.SemanticsOf;
import org.apache.isis.applib.services.queryresultscache.QueryResultsCache;
import org.apache.isis.applib.services.title.TitleService;
import org.incode.module.document.dom.DocumentModule;
import org.incode.module.document.dom.impl.docs.Document;
import org.incode.module.document.dom.impl.docs.DocumentTemplate;
import org.incode.module.document.dom.impl.docs.DocumentTemplateRepository;
import org.incode.module.document.dom.impl.types.DocumentType;
import org.incode.module.document.dom.impl.types.DocumentTypeRepository;
import org.incode.module.document.dom.mixins.T_createAndAttachDocumentAndRender;
import org.incode.module.document.dom.services.DocumentCreatorService;
import org.estatio.dom.invoice.Invoice;
import org.estatio.dom.lease.invoicing.viewmodel.dnc.DocAndCommAbstract_abstract;
import org.estatio.dom.lease.invoicing.viewmodel.dnc.InvoiceSummaryForPropertyDueDateStatus_actionAbstract;
public abstract class Invoice_prepareAbstract {
final Invoice invoice;
final String documentTypeReference;
public Invoice_prepareAbstract(final Invoice invoice, final String documentTypeReference) {
this.invoice = invoice;
this.documentTypeReference = documentTypeReference;
}
public static class ActionDomainEvent extends DocumentModule.ActionDomainEvent<T_createAndAttachDocumentAndRender> {}
@Action(
domainEvent = ActionDomainEvent.class,
semantics = SemanticsOf.NON_IDEMPOTENT_ARE_YOU_SURE
)
@ActionLayout(
contributed = Contributed.AS_ACTION
)
public Invoice $$() throws IOException {
final DocumentTemplate template = documentTemplateFor(invoice);
final Document document =
documentCreatorService.createDocumentAndAttachPaperclips(invoice, template);
document.render(template, invoice);
return invoice;
}
public String disable$$() {
return documentTemplateFor(invoice) == null
? String.format("Could not locate a DocumentTemplate for %s for invoice %s",
titleService.titleOf(getDocumentType()),
titleService.titleOf(invoice))
: null;
}
DocumentType getDocumentType() {
return queryResultsCache.execute(
() -> documentTypeRepository.findByReference(documentTypeReference),
DocAndCommAbstract_abstract.class,
"getDocumentType", documentTypeReference);
}
DocumentTemplate documentTemplateFor(final Invoice invoice) {
return queryResultsCache.execute(
() -> documentTemplateRepository
.findFirstByTypeAndApplicableToAtPath(
getDocumentType(),
invoice.getApplicationTenancyPath()),
InvoiceSummaryForPropertyDueDateStatus_actionAbstract.class,
"findFirstByTypeAndApplicableToAtPath",
getDocumentType(), invoice
);
}
//region > injected services
@Inject
TitleService titleService;
@Inject
DocumentTypeRepository documentTypeRepository;
@Inject
DocumentCreatorService documentCreatorService;
@Inject
QueryResultsCache queryResultsCache;
@Inject
DocumentTemplateRepository documentTemplateRepository;
//endregion
}
|
[
"dan@haywood-associates.co.uk"
] |
dan@haywood-associates.co.uk
|
4039598b152b9f70eeb3573039518370d51c9d1d
|
0dde60ab6b20cbc4f49090f189ed31e79a094845
|
/library/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFAnnotationHighlight.java
|
80ca3145323d7ab97410bad3c1e240e19526a86f
|
[
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"APAFML",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-unknown"
] |
permissive
|
nate-eisner/pdfbox-android-lite
|
217982ff6338839f2a9be9484d6a82baf8fc55be
|
6ddfeb7adb0e5c61e9adb10e73bb50dcf68a865a
|
refs/heads/master
| 2020-03-29T16:59:20.679774
| 2018-09-18T22:08:54
| 2018-09-18T22:18:46
| 150,137,655
| 0
| 1
|
Apache-2.0
| 2018-09-24T16:57:34
| 2018-09-24T16:57:33
| null |
UTF-8
|
Java
| false
| false
| 1,165
|
java
|
package org.apache.pdfbox.pdmodel.fdf;
import java.io.IOException;
import org.apache.pdfbox.cos.COSDictionary;
import org.apache.pdfbox.cos.COSName;
import org.w3c.dom.Element;
/**
* This represents a Highlight FDF annotation.
*
* @author Ben Litchfield
*/
public class FDFAnnotationHighlight extends FDFAnnotation
{
/**
* COS Model value for SubType entry.
*/
public static final String SUBTYPE ="Highlight";
/**
* Default constructor.
*/
public FDFAnnotationHighlight()
{
super();
annot.setName( COSName.SUBTYPE, SUBTYPE );
}
/**
* Constructor.
*
* @param a An existing FDF Annotation.
*/
public FDFAnnotationHighlight( COSDictionary a )
{
super( a );
}
/**
* Constructor.
*
* @param element An XFDF element.
*
* @throws IOException If there is an error extracting information from the element.
*/
public FDFAnnotationHighlight( Element element ) throws IOException
{
super( element );
annot.setName( COSName.SUBTYPE, SUBTYPE );
}
}
|
[
"birdbrain2@comcast.net"
] |
birdbrain2@comcast.net
|
d5e4256e21c453b2ee859f3cd6193bed2b9981e5
|
86ee5eff8a4ffd45cb5ad7e8de2ef0fbb6d9ae44
|
/src/cn/lxtkj/model/Orders.java
|
6e6a2e20fe67c421a70bb6322b6f58730ba4e4c0
|
[] |
no_license
|
leiphp/sshflower
|
3e38a58ddd31a6cb40eee5ed07ab00f1d7121615
|
8ed71c1c7d57a6beef2d45a0ca7d6016d36f66f7
|
refs/heads/master
| 2020-05-15T21:52:17.524390
| 2019-04-21T09:29:00
| 2019-04-21T09:29:00
| 182,510,836
| 4
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,050
|
java
|
package cn.lxtkj.model;
// Generated 2019-4-18 22:07:34 by Hibernate Tools 4.0.0
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
/**
* Orders generated by hbm2java
*/
public class Orders implements java.io.Serializable {
private Integer orderid;
private User user;
private Date orderdate;
private Set orderitems = new HashSet(0);
public Orders() {
}
public Orders(User user, Date orderdate, Set orderitems) {
this.user = user;
this.orderdate = orderdate;
this.orderitems = orderitems;
}
public Integer getOrderid() {
return this.orderid;
}
public void setOrderid(Integer orderid) {
this.orderid = orderid;
}
public User getUser() {
return this.user;
}
public void setUser(User user) {
this.user = user;
}
public Date getOrderdate() {
return this.orderdate;
}
public void setOrderdate(Date orderdate) {
this.orderdate = orderdate;
}
public Set getOrderitems() {
return this.orderitems;
}
public void setOrderitems(Set orderitems) {
this.orderitems = orderitems;
}
}
|
[
"657106593@qq.com"
] |
657106593@qq.com
|
991ac9e8afa9828eb36bdd4e6adc9b80c8d059a2
|
f920ae186870d496fb421538ee55b2310d82c457
|
/trees/src/trees/ISearchTree.java
|
431c890d1ff94b5888e41bfedaf580575eebba7b
|
[] |
no_license
|
joshbarcher/SDEV333_winter2021
|
8a89372b819fb386e3ddc83f7be153bdb3b0b894
|
b18821f396805c5eddcf896c70063a6d44177c36
|
refs/heads/master
| 2023-03-18T04:42:29.250596
| 2021-03-15T19:48:34
| 2021-03-15T19:48:34
| 326,577,741
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 383
|
java
|
package trees;
public interface ISearchTree<T extends Comparable<T>> extends Iterable<T>
{
//base methods
boolean add(T element);
boolean contains(T element);
int size();
boolean isEmpty();
void clear();
boolean remove(T element);
//fun methods
T min();
T max();
T getRoot();
int treeHeight(); //is it balanced?
//traversals?
}
|
[
"jarcher@greenriver.edu"
] |
jarcher@greenriver.edu
|
e4c14376eaf2afea32d488bfa00840fbebf57662
|
e9c2f8cdcee975a5900ecdc12e50aefc1f8be813
|
/spring-framework/src/org/springframework/web/servlet/HttpServletBean.java
|
c01052150cd73f98faa40355c8d72ab180421835
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
z-dp/springsource
|
feee1c285667098b72ff65c95a5e8fa5e2aa4b07
|
e217eeb091c27834409ac5ee55b690b8e669c2e8
|
refs/heads/master
| 2020-04-10T03:19:35.581789
| 2018-12-07T04:10:04
| 2018-12-07T04:10:04
| 160,766,989
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,276
|
java
|
/*
* Copyright 2002-2006 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.web.servlet;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.Set;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.BeanWrapper;
import org.springframework.beans.BeanWrapperImpl;
import org.springframework.beans.BeansException;
import org.springframework.beans.MutablePropertyValues;
import org.springframework.beans.PropertyValue;
import org.springframework.beans.PropertyValues;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceEditor;
import org.springframework.core.io.ResourceLoader;
import org.springframework.util.StringUtils;
import org.springframework.web.context.support.ServletContextResourceLoader;
/**
* Simple extension of <code>javax.servlet.http.HttpServlet</code> that treats
* its config parameters as bean properties.
*
* <p>A very handy superclass for any type of servlet. Type conversion is automatic.
* It is also possible for subclasses to specify required properties.
*
* <p>This servlet leaves request handling to subclasses, inheriting the default
* behavior of HttpServlet (<code>doGet</code>, <code>doPost</code>, etc).
*
* <p>This servlet superclass has no dependency on a Spring application context,
* in contrast to the FrameworkServlet class which loads its own context.
*
* @author Rod Johnson
* @author Juergen Hoeller
* @see #addRequiredProperty
* @see #initServletBean
* @see #doGet
* @see #doPost
* @see FrameworkServlet
*/
public abstract class HttpServletBean extends HttpServlet {
/** Logger available to subclasses */
protected final Log logger = LogFactory.getLog(getClass());
/**
* Set of required properties (Strings) that must be supplied as
* config parameters to this servlet.
*/
private final Set requiredProperties = new HashSet();
/**
* Subclasses can invoke this method to specify that this property
* (which must match a JavaBean property they expose) is mandatory,
* and must be supplied as a config parameter. This should be called
* from the constructor of a subclass.
* <p>This method is only relevant in case of traditional initialization
* driven by a ServletConfig instance.
* @param property name of the required property
*/
protected final void addRequiredProperty(String property) {
this.requiredProperties.add(property);
}
/**
* Map config parameters onto bean properties of this servlet, and
* invoke subclass initialization.
* @throws ServletException if bean properties are invalid (or required
* properties are missing), or if subclass initialization fails.
*/
public final void init() throws ServletException {
if (logger.isInfoEnabled()) {
logger.info("Initializing servlet '" + getServletName() + "'");
}
// Set bean properties from init parameters.
try {
PropertyValues pvs = new ServletConfigPropertyValues(getServletConfig(), this.requiredProperties);
BeanWrapper bw = new BeanWrapperImpl(this);
ResourceLoader resourceLoader = new ServletContextResourceLoader(getServletContext());
bw.registerCustomEditor(Resource.class, new ResourceEditor(resourceLoader));
initBeanWrapper(bw);
bw.setPropertyValues(pvs, true);
}
catch (BeansException ex) {
logger.error("Failed to set bean properties on servlet '" + getServletName() + "'", ex);
throw ex;
}
// Let subclasses do whatever initialization they like.
initServletBean();
if (logger.isInfoEnabled()) {
logger.info("Servlet '" + getServletName() + "' configured successfully");
}
}
/**
* Initialize the BeanWrapper for this HttpServletBean,
* possibly with custom editors.
* <p>This default implementation is empty.
* @param bw the BeanWrapper to initialize
* @throws BeansException if thrown by BeanWrapper methods
* @see org.springframework.beans.BeanWrapper#registerCustomEditor
*/
protected void initBeanWrapper(BeanWrapper bw) throws BeansException {
}
/**
* Overridden method that simply returns <code>null</code> when no
* ServletConfig set yet.
* @see #getServletConfig()
*/
public final String getServletName() {
return (getServletConfig() != null ? getServletConfig().getServletName() : null);
}
/**
* Overridden method that simply returns <code>null</code> when no
* ServletConfig set yet.
* @see #getServletConfig()
*/
public final ServletContext getServletContext() {
return (getServletConfig() != null ? getServletConfig().getServletContext() : null);
}
/**
* Subclasses may override this to perform custom initialization.
* All bean properties of this servlet will have been set before this
* method is invoked.
* <p>This default implementation is empty.
* @throws ServletException if subclass initialization fails
*/
protected void initServletBean() throws ServletException {
}
/**
* PropertyValues implementation created from ServletConfig init parameters.
*/
private static class ServletConfigPropertyValues extends MutablePropertyValues {
/**
* Create new ServletConfigPropertyValues.
* @param config ServletConfig we'll use to take PropertyValues from
* @param requiredProperties set of property names we need, where
* we can't accept default values
* @throws ServletException if any required properties are missing
*/
public ServletConfigPropertyValues(ServletConfig config, Set requiredProperties)
throws ServletException {
Set missingProps = (requiredProperties != null && !requiredProperties.isEmpty()) ?
new HashSet(requiredProperties) : null;
Enumeration en = config.getInitParameterNames();
while (en.hasMoreElements()) {
String property = (String) en.nextElement();
Object value = config.getInitParameter(property);
addPropertyValue(new PropertyValue(property, value));
if (missingProps != null) {
missingProps.remove(property);
}
}
// Fail if we are still missing properties.
if (missingProps != null && missingProps.size() > 0) {
throw new ServletException(
"Initialization from ServletConfig for servlet '" + config.getServletName() +
"' failed; the following required properties were missing: " +
StringUtils.collectionToDelimitedString(missingProps, ", "));
}
}
}
}
|
[
"zidp@cyclecentury.com"
] |
zidp@cyclecentury.com
|
682dfb36dd03ed258a725d56fee7d00732bd57a9
|
1c75f6f8ad3ed3ec01db1369277b6f9f488fdd36
|
/src/main/java/com/test/learning/repository/AuthorityRepository.java
|
6351f14778ea32a2a7bfb56b5a6be249520f9a9c
|
[] |
no_license
|
muthumalini/EducationManagement
|
64dd46bcbd84709be71d5a9188ccb2b71200a648
|
694c35701daa1c5bc726edd6c5aa97996614c1f5
|
refs/heads/master
| 2021-07-11T08:22:06.451921
| 2017-10-10T15:50:46
| 2017-10-10T15:50:46
| 106,438,399
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 292
|
java
|
package com.test.learning.repository;
import com.test.learning.domain.Authority;
import org.springframework.data.jpa.repository.JpaRepository;
/**
* Spring Data JPA repository for the Authority entity.
*/
public interface AuthorityRepository extends JpaRepository<Authority, String> {
}
|
[
"jhipster-bot@users.noreply.github.com"
] |
jhipster-bot@users.noreply.github.com
|
b598c94304a0ab91cf0e14370476c26de224a736
|
d1057dd7f1c0a72821e511f7587e511368f41f94
|
/AndroidProject/Park/app/src/main/java/com/fcn/park/guide/GuideFragment.java
|
ae31f5ccb57097ccaae3a38a011ef82c2658571e
|
[] |
no_license
|
hyb1234hi/Atom-Github
|
1c7b1800c2dcf8a12af90bf54de2a5964c6d625e
|
46bcb8cc204ef71f0d310d4bb9a3ae7cdf7b04a1
|
refs/heads/master
| 2020-08-27T16:23:50.568306
| 2018-07-06T01:26:17
| 2018-07-06T01:26:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,207
|
java
|
package com.fcn.park.guide;
import android.annotation.SuppressLint;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
/**
* 引导页Fragment
* Created by 860115001 on 2018/04/24.
*/
@SuppressLint("ValidFragment")
public class GuideFragment extends Fragment {
private int imageId;
@SuppressLint("ValidFragment")
public GuideFragment(int imageId) {
this.imageId = imageId;
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
ImageView imageView = new ImageView(getActivity());
LinearLayout.LayoutParams LayoutParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
imageView.setImageResource(imageId);
imageView.setScaleType(ImageView.ScaleType.FIT_XY);
imageView.setLayoutParams(LayoutParams);
View view= imageView;
return view;
}
}
|
[
"wufengfeilong@163.com"
] |
wufengfeilong@163.com
|
9d4f99e1d593f401e91ddfb069be8c8ab41f15ea
|
a7b6f705456e65f9c01675b1e275ee3d388fe411
|
/src/main/java/com/newcitysoft/study/netty/channel/encode/Server.java
|
5088ec05965f1bf0e99cd83a3fb7a3d523730ace
|
[] |
no_license
|
yinzhidong/netty-learn
|
a2ac6b74d0b231455f18c6b86ac979f6962b9844
|
557e986ec0a617dd6aa51c08986aa9bff8a13e9f
|
refs/heads/master
| 2022-01-03T11:01:11.644599
| 2018-03-23T11:19:16
| 2018-03-23T11:19:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,160
|
java
|
package com.newcitysoft.study.netty.channel.encode;
import com.newcitysoft.study.socket.Const;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOption;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.SocketChannel;
import io.netty.channel.socket.nio.NioServerSocketChannel;
import io.netty.handler.codec.serialization.ClassResolvers;
import io.netty.handler.codec.serialization.ObjectDecoder;
import io.netty.handler.codec.serialization.ObjectEncoder;
import io.netty.handler.codec.string.StringDecoder;
/**
* @author lixin.tian@renren-inc.com
* @date 2018/3/9 11:06
*/
public class Server {
public void bind(int port) {
EventLoopGroup boosGroup = new NioEventLoopGroup();
EventLoopGroup workerGroup = new NioEventLoopGroup();
try {
ServerBootstrap b = new ServerBootstrap();
b.group(boosGroup, workerGroup)
.channel(NioServerSocketChannel.class)
.option(ChannelOption.SO_BACKLOG, 1024)
.childHandler(new ChildChannelHandler());
// 绑定端口
ChannelFuture f = b.bind(port).sync();
// 等待服务端监听端口关闭
f.channel().closeFuture().sync();
} catch (InterruptedException e) {
// 优雅退出
boosGroup.shutdownGracefully();
workerGroup.shutdownGracefully();
}
}
private class ChildChannelHandler extends ChannelInitializer<SocketChannel> {
@Override
protected void initChannel(SocketChannel socketChannel) throws Exception {
socketChannel.pipeline().addLast(new ObjectEncoder());
socketChannel.pipeline().addLast(new ObjectDecoder(ClassResolvers.cacheDisabled(this
.getClass().getClassLoader())));
socketChannel.pipeline().addLast(new ServerHandler());
}
}
public static void main(String[] args) {
new Server().bind(Const.NETTY_PORT);
}
}
|
[
"newcitysoft@163.com"
] |
newcitysoft@163.com
|
c83ae8001ae1701c28d55fa084439bbda7f5932c
|
363960b1924e6173926c11a090f2c6ab59bbe103
|
/src/java/io/IOException.java
|
22e277b03d0f8d0a560a26f5c7a0c1b1c72ad933
|
[] |
no_license
|
dmitrykolesnikovich/jdk1.1.3
|
573cef5c3e118f0e261fc8bad96e3e8cb968bb70
|
726a744698fb18c236128829902ae4d0d4cd21a0
|
refs/heads/master
| 2016-09-05T14:42:56.016792
| 2014-01-31T22:20:30
| 2014-01-31T22:20:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,461
|
java
|
/*
* @(#)IOException.java 1.13 97/01/22
*
* Copyright (c) 1995, 1996 Sun Microsystems, Inc. All Rights Reserved.
*
* This software is the confidential and proprietary information of Sun
* Microsystems, Inc. ("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 Sun.
*
* SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
* SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
* PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
* SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
* THIS SOFTWARE OR ITS DERIVATIVES.
*
* CopyrightVersion 1.1_beta
*
*/
package java.io;
/**
* Signals that an I/O exception of some sort has occurred.
*
* @author unascribed
* @version 1.13, 01/22/97
* @see java.io.InputStream
* @see java.io.OutputStream
* JDK1.0
*/
public
class IOException extends Exception {
/**
* Constructs an <code>IOException</code> with no detail message.
*
* JDK1.0
*/
public IOException() {
super();
}
/**
* Constructs an <code>IOException</code> with the specified detail
* message.
*
* @param s the detail message.
* JDK1.0
*/
public IOException(String s) {
super(s);
}
}
|
[
"mind_1988"
] |
mind_1988
|
db1e37115a36e9c281fd464cd08be15f279d3961
|
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
|
/project316/src/main/java/org/gradle/test/performance/largejavamultiproject/project316/p1584/Production31683.java
|
e5a2f7b8ca3c86a1a1297040eca190e22dab7517
|
[] |
no_license
|
big-guy/largeJavaMultiProject
|
405cc7f55301e1fd87cee5878a165ec5d4a071aa
|
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
|
refs/heads/main
| 2023-03-17T10:59:53.226128
| 2021-03-04T01:01:39
| 2021-03-04T01:01:39
| 344,307,977
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,971
|
java
|
package org.gradle.test.performance.largejavamultiproject.project316.p1584;
public class Production31683 {
private Production31680 property0;
public Production31680 getProperty0() {
return property0;
}
public void setProperty0(Production31680 value) {
property0 = value;
}
private Production31681 property1;
public Production31681 getProperty1() {
return property1;
}
public void setProperty1(Production31681 value) {
property1 = value;
}
private Production31682 property2;
public Production31682 getProperty2() {
return property2;
}
public void setProperty2(Production31682 value) {
property2 = value;
}
private String property3;
public String getProperty3() {
return property3;
}
public void setProperty3(String value) {
property3 = value;
}
private String property4;
public String getProperty4() {
return property4;
}
public void setProperty4(String value) {
property4 = value;
}
private String property5;
public String getProperty5() {
return property5;
}
public void setProperty5(String value) {
property5 = value;
}
private String property6;
public String getProperty6() {
return property6;
}
public void setProperty6(String value) {
property6 = value;
}
private String property7;
public String getProperty7() {
return property7;
}
public void setProperty7(String value) {
property7 = value;
}
private String property8;
public String getProperty8() {
return property8;
}
public void setProperty8(String value) {
property8 = value;
}
private String property9;
public String getProperty9() {
return property9;
}
public void setProperty9(String value) {
property9 = value;
}
}
|
[
"sterling.greene@gmail.com"
] |
sterling.greene@gmail.com
|
e4695d301935c7db099247236536e888d3754a55
|
55818d76ea5a87f2fa9449d0ff807421ece569b5
|
/src/main/java/com/corundumstudio/socketio/store/pubsub/BaseStoreFactory.java
|
8e4a13cb0fb60e1496f9b1c854d5337bf6a885d4
|
[
"Apache-2.0"
] |
permissive
|
olacabs/netty-socketio
|
c08d5e826f0e94d5422f720b9feb9acff314cf3d
|
b55c32050f8f7bf330bc320a53637a38f54e6218
|
refs/heads/master
| 2023-04-14T10:43:42.864588
| 2015-12-21T14:59:48
| 2015-12-21T14:59:48
| 48,421,002
| 0
| 1
|
Apache-2.0
| 2023-04-06T23:12:16
| 2015-12-22T08:50:12
|
Java
|
UTF-8
|
Java
| false
| false
| 3,692
|
java
|
/**
* Copyright 2012 Nikita Koksharov
*
* 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.corundumstudio.socketio.store.pubsub;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.corundumstudio.socketio.handler.AuthorizeHandler;
import com.corundumstudio.socketio.handler.ClientHead;
import com.corundumstudio.socketio.namespace.NamespacesHub;
import com.corundumstudio.socketio.protocol.JsonSupport;
import com.corundumstudio.socketio.store.StoreFactory;
public abstract class BaseStoreFactory implements StoreFactory {
private final Logger log = LoggerFactory.getLogger(getClass());
private Long nodeId = (long) (Math.random() * 1000000);
protected Long getNodeId() {
return nodeId;
}
public void init(final NamespacesHub namespacesHub, final AuthorizeHandler authorizeHandler, JsonSupport jsonSupport) {
pubSubStore().subscribe(PubSubStore.DISCONNECT, new PubSubListener<DisconnectMessage>() {
@Override
public void onMessage(DisconnectMessage msg) {
log.debug("{} sessionId: {}", PubSubStore.DISCONNECT, msg.getSessionId());
}
}, DisconnectMessage.class);
pubSubStore().subscribe(PubSubStore.CONNECT, new PubSubListener<ConnectMessage>() {
@Override
public void onMessage(ConnectMessage msg) {
authorizeHandler.connect(msg.getSessionId());
log.debug("{} sessionId: {}", PubSubStore.CONNECT, msg.getSessionId());
}
}, ConnectMessage.class);
pubSubStore().subscribe(PubSubStore.DISPATCH, new PubSubListener<DispatchMessage>() {
@Override
public void onMessage(DispatchMessage msg) {
String name = msg.getRoom();
namespacesHub.get(msg.getNamespace()).dispatch(name, msg.getPacket());
log.debug("{} packet: {}", PubSubStore.DISPATCH, msg.getPacket());
}
}, DispatchMessage.class);
pubSubStore().subscribe(PubSubStore.JOIN, new PubSubListener<JoinLeaveMessage>() {
@Override
public void onMessage(JoinLeaveMessage msg) {
String name = msg.getRoom();
namespacesHub.get(msg.getNamespace()).join(name, msg.getSessionId());
log.debug("{} sessionId: {}", PubSubStore.JOIN, msg.getSessionId());
}
}, JoinLeaveMessage.class);
pubSubStore().subscribe(PubSubStore.LEAVE, new PubSubListener<JoinLeaveMessage>() {
@Override
public void onMessage(JoinLeaveMessage msg) {
String name = msg.getRoom();
namespacesHub.get(msg.getNamespace()).leave(name, msg.getSessionId());
log.debug("{} sessionId: {}", PubSubStore.LEAVE, msg.getSessionId());
}
}, JoinLeaveMessage.class);
}
@Override
public abstract PubSubStore pubSubStore();
@Override
public void onDisconnect(ClientHead client) {
}
@Override
public String toString() {
return getClass().getSimpleName() + " (distributed session store, distributed publish/subscribe)";
}
}
|
[
"abracham.mitchell@gmail.com"
] |
abracham.mitchell@gmail.com
|
5cddb40af2418f5fbca3abba17adb0c9e78385d0
|
4abbf76a883051bd39f50a8e219c59358675b5c8
|
/src/main/java/homework_solution/lesson9/task2/Square.java
|
b07556c0039bb6bca4e0f0cc0c7b71514aff768e
|
[] |
no_license
|
at-study/at-study-java-core-2
|
8ed0459e5cb741176e15545360defae06ad753f4
|
511e125eeee3c407dbf1e14f0a8d7299fbb873d7
|
refs/heads/master
| 2023-07-16T16:55:38.640979
| 2021-08-25T18:28:40
| 2021-08-25T18:28:40
| 357,980,694
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 215
|
java
|
package homework_solution.lesson9.task2;
public class Square implements Drawable {
@Override
public void draw() {
System.out.println("Фигура \"квадрат\" нарисована");
}
}
|
[
"fan-mag@mail.ru"
] |
fan-mag@mail.ru
|
b929f0be2a23b9f73eae2aca947cf3c9b5b282b0
|
deac36a2f8e8d4597e2e1934ab8a7dd666621b2b
|
/java源码的副本/src-2/com/sun/org/apache/xml/internal/serializer/SecuritySupport.java
|
68082d345fce2edd0c3e7548a2adeafc07fde2a7
|
[] |
no_license
|
ZytheMoon/First
|
ff317a11f12c4ec7714367994924ee9fb4649611
|
9078fb8be8537a98483c50928cb92cf9835aed1c
|
refs/heads/master
| 2021-04-27T00:09:31.507273
| 2018-03-06T12:25:56
| 2018-03-06T12:25:56
| 123,758,924
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,929
|
java
|
/*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
/*
* Copyright 2002-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: SecuritySupport.java,v 1.2.4.1 2005/09/15 08:15:21 suresh_emailid Exp $
*/
package com.sun.org.apache.xml.internal.serializer;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
/**
* This class is duplicated for each Xalan-Java subpackage so keep it in sync.
* It is package private and therefore is not exposed as part of the Xalan-Java
* API.
*
* Base class with security related methods that work on JDK 1.1.
*/
class SecuritySupport {
/*
* Make this of type Object so that the verifier won't try to
* prove its type, thus possibly trying to load the SecuritySupport12
* class.
*/
private static final Object securitySupport;
static {
SecuritySupport ss = null;
try {
Class c = Class.forName("java.security.AccessController");
// if that worked, we're on 1.2.
/*
// don't reference the class explicitly so it doesn't
// get dragged in accidentally.
c = Class.forName("javax.mail.SecuritySupport12");
Constructor cons = c.getConstructor(new Class[] { });
ss = (SecuritySupport)cons.newInstance(new Object[] { });
*/
/*
* Unfortunately, we can't load the class using reflection
* because the class is package private. And the class has
* to be package private so the APIs aren't exposed to other
* code that could use them to circumvent security. Thus,
* we accept the risk that the direct reference might fail
* on some JDK 1.1 JVMs, even though we would never execute
* this code in such a case. Sigh...
*/
ss = new SecuritySupport12();
} catch (Exception ex) {
// ignore it
} finally {
if (ss == null)
ss = new SecuritySupport();
securitySupport = ss;
}
}
/**
* Return an appropriate instance of this class, depending on whether
* we're on a JDK 1.1 or J2SE 1.2 (or later) system.
*/
static SecuritySupport getInstance() {
return (SecuritySupport)securitySupport;
}
ClassLoader getContextClassLoader() {
return null;
}
ClassLoader getSystemClassLoader() {
return null;
}
ClassLoader getParentClassLoader(ClassLoader cl) {
return null;
}
String getSystemProperty(String propName) {
return System.getProperty(propName);
}
FileInputStream getFileInputStream(File file)
throws FileNotFoundException
{
return new FileInputStream(file);
}
InputStream getResourceAsStream(ClassLoader cl, String name) {
InputStream ris;
if (cl == null) {
ris = ClassLoader.getSystemResourceAsStream(name);
} else {
ris = cl.getResourceAsStream(name);
}
return ris;
}
boolean getFileExists(File f) {
return f.exists();
}
long getLastModified(File f) {
return f.lastModified();
}
}
|
[
"2353653849@qq.com"
] |
2353653849@qq.com
|
6803fa12e70724da71d61ec65fe67ee39eb533da
|
00f1087756b50886384bdc65ac52c7d6db3d96eb
|
/kie-remote/kie-remote-services/src/test/java/org/kie/remote/services/rest/query/QueryResourceDataTest.java
|
5771f73e455d50f6e922b347522af05292c78e37
|
[
"Apache-2.0"
] |
permissive
|
magicalcomputer/droolsjbpm-integration
|
3e3a8f1f2d9910b467a2fa4f32b2c427d152bc7c
|
0ef7216365dafae14e634d14f8be955fcc86baee
|
refs/heads/master
| 2021-01-24T19:50:41.605526
| 2015-01-05T21:37:19
| 2015-01-05T21:37:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,660
|
java
|
package org.kie.remote.services.rest.query;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.kie.remote.services.rest.ResourceBase.PROC_INST_ID_PARAM_NAME;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.TreeMap;
import org.junit.Ignore;
import org.junit.Test;
import org.kie.internal.query.QueryParameterIdentifiers;
import org.kie.remote.services.rest.ResourceBase;
public class QueryResourceDataTest extends QueryResourceData {
@Test
public void testUniqueParameters() throws Exception {
List<Field> paramFields =
new LinkedList<Field>(Arrays.asList(QueryResourceData.class.getDeclaredFields()));
Iterator<Field> iter = paramFields.iterator();
List<String[]> allParams = new ArrayList<String[]>(paramFields.size());
while( iter.hasNext() ) {
Field field = iter.next();
if( ! Modifier.isStatic(field.getModifiers()) ) {
iter.remove();
continue;
}
if( ! field.getType().equals(String[].class) ) {
continue;
}
if( ! field.getName().contains("Params") ) {
continue;
}
field.setAccessible(true);
allParams.add((String []) field.get(null));
}
assertFalse( "No params found", allParams.isEmpty() );
Set<String> params = new HashSet<String>();
for( String [] paramArr : allParams ) {
for( String param : paramArr ) {
if( param == null ) {
continue;
}
assertTrue( "Param \"" + param + "\" contains uppercase letters",
param.toLowerCase().equals(param) );
assertTrue( "Param \"" + param + "\" is used twice",
params.add(param) );
}
}
for( String param : ResourceBase.paginationParams ){
assertTrue( "Param \"" + param + "\" contains uppercase letters",
param.toLowerCase().equals(param) );
assertTrue( "Param \"" + param + "\" is used twice",
params.add(param) );
}
assertTrue( "Param \"" + PROC_INST_ID_PARAM_NAME + "\" is used twice",
params.add(PROC_INST_ID_PARAM_NAME) );
}
@Test
@Ignore
// "test" for printing/checking the switch logic in the QueryResourceImpl class
public void debugPrintSwitch() throws Exception {
TreeMap<Integer, String> sortedActionParamMap = new TreeMap<Integer, String>(actionParamNameMap);
for( Entry<Integer, String> action : sortedActionParamMap.entrySet() ) {
int num = action.getKey();
switch( num ) {
case 0:
System.out.println( "\n// general");
break;
case GENERAL_END:
System.out.println( "\n// task");
break;
case TASK_END:
System.out.println( "\n// process instance");
break;
case PROCESS_END:
System.out.println( "\n// variable instance");
break;
case VARIABLE_END:
System.out.println( "\n// meta");
break;
}
System.out.println( "case " + num + ": // " + action.getValue() + "\nbreak;");
}
}
@Test
@Ignore
public void debugPrintQueryParameterIds() throws Exception {
Field [] fields = QueryParameterIdentifiers.class.getDeclaredFields();
Map<Integer, String> idMap = new TreeMap<Integer, String>();
for( Field field : fields ) {
Object objVal = field.get(null);
if( ! (objVal instanceof String) ) {
continue;
}
String val = (String) objVal;
Integer idVal;
try {
idVal = Integer.valueOf(val);
} catch( Exception e ) {
continue;
}
idMap.put(idVal, field.getName());
}
for( Entry<Integer, String> entry : idMap.entrySet() ) {
int id = entry.getKey();
String between = ( id < 10 ? " " : "") + " : ";
System.out.println( id + between + entry.getValue());
}
}
}
|
[
"mrietvel@redhat.com"
] |
mrietvel@redhat.com
|
89a1e2af7532c92ed9d7a6911544df4cb4705970
|
ec9bf57a07b7b06134ec7a21407a11f69cc644f7
|
/src/com/ubercab/client/feature/survey/model/Question.java
|
e8e1c5c080f11c5044f9d828d2b8e3545dda77cf
|
[] |
no_license
|
jzarca01/com.ubercab
|
f95c12cab7a28f05e8f1d1a9d8a12a5ac7fbf4b1
|
e6b454fb0ad547287ae4e71e59d6b9482369647a
|
refs/heads/master
| 2020-06-21T04:37:43.723581
| 2016-07-19T16:30:34
| 2016-07-19T16:30:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,924
|
java
|
package com.ubercab.client.feature.survey.model;
import com.ubercab.shape.Shape;
import java.util.ArrayList;
import java.util.List;
import x;
import z;
@Shape
public abstract class Question
{
public static Question create()
{
Shape_Question localShape_Question = new Shape_Question();
localShape_Question.setAnswers(new ArrayList());
return localShape_Question;
}
public Question addAnswer(Answer paramAnswer)
{
getAnswers().add(paramAnswer);
return this;
}
public abstract List<Answer> getAnswers();
public abstract String getDisclaimer();
public abstract int getIconResource();
public abstract String getId();
public abstract x getImpressionEvent();
public abstract String getSkipNextQuestionId();
public abstract String getSkipText();
public abstract String getSubmitText();
public abstract String getSubtitle();
public abstract z getTapEvent();
public abstract String getTitle();
public abstract Question.TYPE getType();
public abstract Question setAnswers(List<Answer> paramList);
public abstract Question setDisclaimer(String paramString);
public abstract Question setIconResource(int paramInt);
public abstract Question setId(String paramString);
public abstract Question setImpressionEvent(x paramx);
public abstract Question setSkipNextQuestionId(String paramString);
public abstract Question setSkipText(String paramString);
public abstract Question setSubmitText(String paramString);
public abstract Question setSubtitle(String paramString);
public abstract Question setTapEvent(z paramz);
public abstract Question setTitle(String paramString);
public abstract Question setType(Question.TYPE paramTYPE);
}
/* Location:
* Qualified Name: com.ubercab.client.feature.survey.model.Question
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
83abe55f4752aa82091a78e0a0958797393703f1
|
f4403f5c4af2f61129a33dbe1dd3ca5055d5a631
|
/dis_javafx_client/src/main/java/ph/txtdis/fx/table/CreditNoteListTable.java
|
e6e1a8bbe4b81cf9202a6ca29ee476ada60f2362
|
[] |
no_license
|
txtdis/DIS-JavaFX-Client
|
8541bd7e0ff7b268ffd2c8745d7d80599a03478f
|
e679f21f1e2629f5d9e62a80d1d306bff1fd4dfc
|
refs/heads/master
| 2021-01-10T02:26:50.066701
| 2016-02-10T08:41:25
| 2016-02-10T08:41:25
| 44,206,107
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,221
|
java
|
package ph.txtdis.fx.table;
import static ph.txtdis.type.Type.CURRENCY;
import static ph.txtdis.type.Type.DATE;
import static ph.txtdis.type.Type.ID;
import static ph.txtdis.type.Type.TEXT;
import java.math.BigDecimal;
import java.time.LocalDate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import ph.txtdis.dto.CreditNote;
@Lazy
@Component("creditNoteListTable")
public class CreditNoteListTable extends AppTable<CreditNote> {
@Autowired
private Column<CreditNote, Long> id;
@Autowired
private Column<CreditNote, LocalDate> creditDate;
@Autowired
private Column<CreditNote, String> description;
@Autowired
private Column<CreditNote, BigDecimal> balanceValue, totalValue;
@Override
@SuppressWarnings("unchecked")
protected void addColumns() {
getColumns().setAll(//
id.ofType(ID).build("ID No.", "id"), //
creditDate.ofType(DATE).build("Date", "creditDate"), //
description.ofType(TEXT).build("Description", "description"), //
totalValue.ofType(CURRENCY).build("Total", "totalValue"), //
balanceValue.ofType(CURRENCY).build("Balance", "balanceValue"));
}
}
|
[
"txtDIS@txtDIS.ph"
] |
txtDIS@txtDIS.ph
|
add4603fd505fcd39ce86fdf4927c9877027eeec
|
b766c0b6753f5443fd84c14e870ec316edc116bb
|
/java-project/srcex/src45/java100/app/dao/mysql/MemberDaoImpl.java
|
225c389f8cfbcb261e761a7813d1a01434220d53
|
[] |
no_license
|
angelpjn/bitcamp
|
5a83b7493812ae5dd4a61b393743a673085b59b5
|
3c1fb28cda2ab15228bcaed53160aabd936df248
|
refs/heads/master
| 2021-09-06T20:31:18.846623
| 2018-02-11T05:23:07
| 2018-02-11T05:23:07
| 104,423,428
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,820
|
java
|
package java100.app.dao.mysql;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;
import java100.app.dao.DaoException;
import java100.app.dao.MemberDao;
import java100.app.domain.Member;
import java100.app.util.DataSource;
public class MemberDaoImpl implements MemberDao {
DataSource ds;
public void setDataSource(DataSource ds) {
this.ds = ds;
}
public List<Member> selectList() {
Connection con = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
con = ds.getConnection();
pstmt = con.prepareStatement(
"select no,name,email,regdt from ex_memb");
rs = pstmt.executeQuery();
ArrayList<Member> list = new ArrayList<>();
while (rs.next()) {
Member member = new Member();
member.setNo(rs.getInt("no"));
member.setName(rs.getString("name"));
member.setEmail(rs.getString("email"));
member.setCreatedDate(rs.getDate("regdt"));
list.add(member);
}
return list;
} catch (Exception e) {
throw new DaoException(e);
} finally {
try {rs.close();} catch (Exception e) {}
try {pstmt.close();} catch (Exception e) {}
ds.returnConnection(con);
}
}
public int insert(Member member) {
Connection con = null;
PreparedStatement pstmt = null;
try {
con = ds.getConnection();
pstmt = con.prepareStatement(
"insert into ex_memb(name,email,pwd,regdt)"
+ " values(?,?,password(?),now())");
pstmt.setString(1, member.getName());
pstmt.setString(2, member.getEmail());
pstmt.setString(3, member.getPassword());
return pstmt.executeUpdate();
} catch (Exception e) {
throw new DaoException(e);
} finally {
try {pstmt.close();} catch (Exception e) {}
ds.returnConnection(con);
}
}
public int update(Member member) {
Connection con = null;
PreparedStatement pstmt = null;
try {
con = ds.getConnection();
pstmt = con.prepareStatement(
"update ex_memb set name=?,email=?,pwd=password(?) where no=?");
pstmt.setString(1, member.getName());
pstmt.setString(2, member.getEmail());
pstmt.setString(3, member.getPassword());
pstmt.setInt(4, member.getNo());
return pstmt.executeUpdate();
} catch (Exception e) {
throw new DaoException(e);
} finally {
try {pstmt.close();} catch (Exception e) {}
ds.returnConnection(con);
}
}
public int delete(int no) {
Connection con = null;
PreparedStatement pstmt = null;
try {
con = ds.getConnection();
pstmt = con.prepareStatement(
"delete from ex_memb where no=?");
pstmt.setInt(1, no);
return pstmt.executeUpdate();
} catch (Exception e) {
throw new DaoException(e);
} finally {
try {pstmt.close();} catch (Exception e) {}
ds.returnConnection(con);
}
}
public Member selectOne(int no) {
Connection con = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
con = ds.getConnection();
pstmt = con.prepareStatement(
"select no,name,email,regdt from ex_memb where no=?");
pstmt.setInt(1, no);
rs = pstmt.executeQuery();
Member member = null;
if (rs.next()) {
member = new Member();
member.setNo(no);
member.setName(rs.getString("name"));
member.setEmail(rs.getString("email"));
member.setCreatedDate(rs.getDate("regdt"));
}
return member;
} catch (Exception e) {
throw new DaoException(e);
} finally {
try {rs.close();} catch (Exception e) {}
try {pstmt.close();} catch (Exception e) {}
ds.returnConnection(con);
}
}
}
|
[
"angelpjn@naver.com"
] |
angelpjn@naver.com
|
ef280f1dc51bbcab8872483574d87297f5ed9264
|
af606a04ed291e8c9b1e500739106a926e205ee2
|
/aliyun-java-sdk-computenestsupplier/src/main/java/com/aliyuncs/computenestsupplier/model/v20210521/RegisterServiceRequest.java
|
398e3386bcdcdefb94f83393e4cec59590e052ac
|
[
"Apache-2.0"
] |
permissive
|
xtlGitHub/aliyun-openapi-java-sdk
|
a733f0a16c8cc493cc28062751290f563ab73ace
|
f60c71de2c9277932b6549c79631b0f03b11cc36
|
refs/heads/master
| 2023-09-03T13:56:50.071024
| 2021-11-10T11:53:25
| 2021-11-10T11:53:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,917
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.computenestsupplier.model.v20210521;
import com.aliyuncs.RpcAcsRequest;
import com.aliyuncs.http.MethodType;
import com.aliyuncs.computenestsupplier.Endpoint;
/**
* @author auto create
* @version
*/
public class RegisterServiceRequest extends RpcAcsRequest<RegisterServiceResponse> {
private String clientToken;
private String serviceId;
public RegisterServiceRequest() {
super("ComputeNestSupplier", "2021-05-21", "RegisterService");
setMethod(MethodType.POST);
try {
com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap);
com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType);
} catch (Exception e) {}
}
public String getClientToken() {
return this.clientToken;
}
public void setClientToken(String clientToken) {
this.clientToken = clientToken;
if(clientToken != null){
putQueryParameter("ClientToken", clientToken);
}
}
public String getServiceId() {
return this.serviceId;
}
public void setServiceId(String serviceId) {
this.serviceId = serviceId;
if(serviceId != null){
putQueryParameter("ServiceId", serviceId);
}
}
@Override
public Class<RegisterServiceResponse> getResponseClass() {
return RegisterServiceResponse.class;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
dd91b50683d8050c7155ba1e173c1b12206b5078
|
48631c3851b15fbc20e61e29b82480b64eec2885
|
/mybatis3/src/test/java/com/prosayj/springboot/mybatis3/execise/chapter1/_03_HibernateTest.java
|
9c3aab166f7d984b2cd4a31ef2872adf9f113d00
|
[
"Apache-2.0"
] |
permissive
|
ProSayJ/springbootstudy
|
56cb7f80502888d2c564d7a4bda23dd0650750f7
|
04b5ce563b9e6163ab6d6217292d7dd266e105c3
|
refs/heads/master
| 2022-12-25T10:42:49.047945
| 2021-04-09T15:20:12
| 2021-04-09T15:20:12
| 147,488,466
| 0
| 0
|
Apache-2.0
| 2022-12-16T03:22:22
| 2018-09-05T08:52:00
|
Java
|
UTF-8
|
Java
| false
| false
| 3,979
|
java
|
package com.prosayj.springboot.mybatis3.execise.chapter1;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.List;
import java.util.Objects;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;
import com.prosayj.springboot.mybatis3.execise.chapter1.model.Article;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
import org.hibernate.query.Query;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
/**
* @author yangjian
* @description
* @Date 下午 03:02 2019/9/3
* @since 1.0.0
*/
public class _03_HibernateTest {
private SessionFactory buildSessionFactory;
@Before
public void init() {
Configuration configuration = new Configuration();
configuration.configure("chapter1/hibernate.cfg.xml");
buildSessionFactory = configuration.buildSessionFactory();
}
@After
public void destroy() {
buildSessionFactory.close();
}
@Test
public void testORM() {
System.out.println("-----------------------------✨ ORM Query ✨--------------------------");
Session session = null;
try {
session = buildSessionFactory.openSession();
int id = 1;
Article article = session.get(Article.class, id);
System.out.println("ORM Query Result: ");
System.out.println(article);
System.out.println();
} finally {
if (Objects.nonNull(session)) {
session.close();
}
}
}
@Test
public void testHQL() {
System.out.println("-----------------------------✨ HQL Query ✨+--------------------------");
Session session = null;
try {
session = buildSessionFactory.openSession();
String hql = "from Article where author = :author and create_time > :createTime";
Query query = session.createQuery(hql);
query.setParameter("author", "coolblog.xyz");
query.setParameter("createTime", "2018.06.10");
List<Article> articles = query.list();
System.out.println("HQL Query Result: ");
articles.forEach(System.out::println);
System.out.println();
} finally {
if (Objects.nonNull(session)) {
session.close();
}
}
}
@Test
public void testJpaCriteria() throws ParseException {
System.out.println("---------------------------✨ JPA Criteria ✨------------------------");
Session session = null;
try {
session = buildSessionFactory.openSession();
CriteriaBuilder criteriaBuilder = session.getCriteriaBuilder();
CriteriaQuery<Article> criteriaQuery = criteriaBuilder.createQuery(Article.class);
// 定义 FROM 子句
Root<Article> article = criteriaQuery.from(Article.class);
// 构建查询条件
SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd");
Predicate greaterThan = criteriaBuilder.greaterThan(article.get("createTime"), sdf.parse("2018.06.10"));
Predicate equal = criteriaBuilder.equal(article.get("author"), "coolblog.xyz");
// 通过具有语义化的方法构建 SQL,等价于 SELECT ... FROM article WHERE ... AND ...
criteriaQuery.select(article).where(equal, greaterThan);
Query<Article> query = session.createQuery(criteriaQuery);
List<Article> articles = query.getResultList();
System.out.println("JPA Criteria Query Result: ");
articles.forEach(System.out::println);
} finally {
if (Objects.nonNull(session)) {
session.close();
}
}
}
}
|
[
"prosayj@gmail.com"
] |
prosayj@gmail.com
|
7ec0dee3695f7efd2fe04ed537d4fb5cebbc35f8
|
638d957ed8f3c5a054752510e5d01b2bd86adc25
|
/module/spring-framework/src/main/java/net/datatp/springframework/cloud/sample/ApplicationConfiguration.java
|
571aa2fad121c8ef467fb09e7513232cd2e6f530
|
[] |
no_license
|
tuan08/datatp
|
3bfed7c6175fe3950659443ebc1a580b510e466a
|
7d7ff6bed36199627b143d37dd254cdb6dbf269c
|
refs/heads/master
| 2020-04-12T06:22:53.010673
| 2016-12-07T03:19:53
| 2016-12-07T03:19:53
| 62,194,565
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 479
|
java
|
package net.datatp.springframework.cloud.sample;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;
@Configuration
public class ApplicationConfiguration {
@Bean
@LoadBalanced
RestTemplate createBalancedRestTemplate() {
RestTemplate rest = new RestTemplate();
return rest;
}
}
|
[
"tuan08@gmail.com"
] |
tuan08@gmail.com
|
7a991b435dd2d0d9cb7084849b1cd4657c4c660b
|
18239524612cf572bfeaa3e001a3f5d1b872690c
|
/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginMountTest.java
|
ffa9c172532b2424306d38e94e3c1dc3aa240242
|
[
"Apache-2.0"
] |
permissive
|
simoneromano96/sdk
|
2d7af9425dabc30df830a09b26841fb2e8781bf8
|
a6113d0daefbbb803790297e4b242d4c7cbbcb22
|
refs/heads/master
| 2023-05-09T13:50:45.485951
| 2021-05-28T12:18:27
| 2021-05-28T12:18:27
| 371,689,133
| 0
| 0
|
Apache-2.0
| 2021-05-28T12:11:41
| 2021-05-28T12:11:40
| null |
UTF-8
|
Java
| false
| false
| 2,028
|
java
|
/*
* ORY Hydra
* Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.
*
* The version of the OpenAPI document: v1.10.4-alpha.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package sh.ory.hydra.model;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for PluginMount
*/
public class PluginMountTest {
private final PluginMount model = new PluginMount();
/**
* Model tests for PluginMount
*/
@Test
public void testPluginMount() {
// TODO: test PluginMount
}
/**
* Test the property 'description'
*/
@Test
public void descriptionTest() {
// TODO: test description
}
/**
* Test the property 'destination'
*/
@Test
public void destinationTest() {
// TODO: test destination
}
/**
* Test the property 'name'
*/
@Test
public void nameTest() {
// TODO: test name
}
/**
* Test the property 'options'
*/
@Test
public void optionsTest() {
// TODO: test options
}
/**
* Test the property 'settable'
*/
@Test
public void settableTest() {
// TODO: test settable
}
/**
* Test the property 'source'
*/
@Test
public void sourceTest() {
// TODO: test source
}
/**
* Test the property 'type'
*/
@Test
public void typeTest() {
// TODO: test type
}
}
|
[
"3372410+aeneasr@users.noreply.github.com"
] |
3372410+aeneasr@users.noreply.github.com
|
29020e1dfccadd3e0a24836bb5eafd7dea739146
|
7823bb0b1a02cc4d7cbe007f432e5a1f909c83d8
|
/product/meru/application/Application-Security/src/main/java/meru/application/security/lifecycle/NewUserLifeCycle.java
|
bfc9f50043b339d3cb780ebcfa586c0f809f9d4b
|
[] |
no_license
|
sivarajs/App-Framework
|
58137be54b4d9579f8952f75b3a5025117195cb9
|
ba536cb36439cb4881f0b3edabe0bd4df34aede4
|
refs/heads/master
| 2021-01-17T05:47:38.875852
| 2018-10-17T19:44:59
| 2018-10-17T19:44:59
| 39,725,411
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,626
|
java
|
package meru.application.security.lifecycle;
import app.domain.comm.SendEmail;
import app.domain.comm.SendSMS;
import app.domain.security.NewUser;
import app.domain.security.SecuredApplication;
import app.domain.security.User;
import meru.app.service.ServiceManager;
import meru.application.security.SecurityAppProperty;
import meru.application.security.account.AccountManager;
import meru.exception.RedirectException;
import meru.exception.SystemException;
import meru.messaging.MessageSender;
import meru.persistence.EntityQuery;
import meru.sys.IOSystem;
import meru.sys.SystemCalendar;
import meru.template.TemplateEngine;
import meru.template.TemplateMultiData;
public class NewUserLifeCycle extends AccountLifeCycle<NewUser> {
private String appRoot;
private MessageSender messageSender;
private SystemCalendar systemCalendar;
public NewUserLifeCycle() throws Exception {
// messageSender = new HttpMessageSender();
systemCalendar = SystemCalendar.getInstance();
appRoot= "http://localhost:8080/";
}
@Override
public void init() {
new AccountManager(appContext,
appEngine);
messageSender = serviceManager.getService(ServiceManager.MESSAGE_SENDER, MessageSender.class);
}
@Override
public NewUser preGet(Class<NewUser> entityClass,
Object id) {
String accessToken = (String) id;
if (accessToken.startsWith("email/")) {
accessToken = accessToken.substring(6);
}
EntityQuery<NewUser> entityQuery = appEngine.createQuery(NewUser.class);
entityQuery.addQueryParameter("emailAccessToken",
accessToken);
NewUser newUser = appEngine.getFirst(entityQuery);
if (newUser == null) {
throw new SystemException("Illegal Registration Confirmation : " + id);
}
SecuredApplication app = appEngine.get(SecuredApplication.class, newUser.getAppId());
String appRoot = app.getRoot();//newUser.getPrimaryRole().getHome();
if (userExists(newUser.getEmail(),
newUser.getAppId())) {
throw new RedirectException(appRoot + "/welcome.xhtml");
}
User user = createUser(newUser);
appEngine.remove(NewUser.class,
newUser.getId());
sendWelcomeMail(user);
messageSender.send(this.appRoot+appRoot + "/e/RegisteredNewUser?new",
"{\"id\":\"" + user.getId() + "\",\"email\":\""
+ user.getEmail() + "\",\"mobile\":\""
+ user.getMobile() + "\"}",
"application/json");
throw new RedirectException(appRoot + "/welcome.xhtml");
}
@Override
public boolean preCreate(NewUser newUser) {
return true;
}
@Override
public Object postCreate(NewUser newUser) {
if (newUser.getEmail() != null) {
sendRegistrationConfirmationMail(newUser);
}
if (newUser.getMobile() != null) {
sendRegistrationConfirmationSMS(newUser);
}
return null;
}
private void sendWelcomeMail(User user) {
String template = IOSystem.read(appContext.getInputStream(SecurityAppProperty.TEMPLATE_DIR_MAIL
+ "WelcomeMail.html"));
String message = TemplateEngine.getText(template,
user);
SendEmail email = new SendEmail();
email.setTos(user.getEmail());
email.setSubject("Welcome To Dewbag.com");
email.setMessage(message);
email.setContentType("text/html");
email.setReference("reg: " + user.getAccessToken());
email.setSentOn(SystemCalendar.getInstance()
.getUTCCalendar());
email.setState("N");
// email.setState(MessageState.NEW.getState());
appEngine.save(email);
}
private void sendRegistrationConfirmationMail(NewUser newUser) {
String template = IOSystem.read(appContext.getInputStream(SecurityAppProperty.TEMPLATE_DIR_MAIL
+ "ConfirmRegistration.html"));
TemplateMultiData templateData = new TemplateMultiData();
templateData.addObject("user",
newUser);
templateData.addObject("appContext",
appContext);
String message = TemplateEngine.getText(template,
templateData);
SendEmail email = new SendEmail();
email.setTos(newUser.getEmail());
email.setSubject("Confirm Registration");
email.setMessage(message);
email.setContentType("text/html");
email.setReference("user-reg: " + newUser.getEmailAccessToken());
email.setSentOn(SystemCalendar.getInstance()
.getUTCCalendar());
email.setState("N");
appEngine.save(email);
}
private void sendRegistrationConfirmationSMS(NewUser newUser) {
String text = IOSystem.read(appContext.getInputStream(SecurityAppProperty.TEMPLATE_DIR_SMS
+ "ConfirmationRegistration.txt"));
text = text.replace("#{code}",
newUser.getMobileAccessToken());
SendSMS sms = new SendSMS();
sms.setNumber(newUser.getMobile());
sms.setMessage(text);
sms.setReference("so:" + newUser.getId());
//sms.setState(MessageState.NEW.getState());
sms.setSentOn(systemCalendar.getUTCCalendar());
appEngine.save(sms);
}
public static class UserData {
private NewUser user;
private String baseUrl;
public UserData(NewUser user, String baseUrl) {
this.user = user;
this.baseUrl = baseUrl;
}
public NewUser getUser() {
return user;
}
public String getBaseUrl() {
return baseUrl;
}
}
}
|
[
"sivarajs@gmail.com"
] |
sivarajs@gmail.com
|
612069b55ade5909fea38591db5ef182186d9b6e
|
98e5b3aec60935f6768cb4e2a24b21da0b528b6d
|
/datalayer/stockcontent/src/main/java/com/waben/stock/datalayer/stockcontent/entity/StrategyType.java
|
de984b55cc6e46798bfc7291adb44e30db9b82b0
|
[] |
no_license
|
sunliang123/zhongbei-zhonghang-zhongzi-yidian
|
3eb95a77658d7ad9de1cdf9c3f85714ee007a871
|
54fed94b9784f5e392b4b9517cb5fe19c1b34443
|
refs/heads/master
| 2020-03-29T05:26:02.515289
| 2018-09-20T09:11:48
| 2018-09-20T09:11:48
| 149,582,090
| 1
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,389
|
java
|
package com.waben.stock.datalayer.stockcontent.entity;
import java.math.BigDecimal;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.Table;
import com.fasterxml.jackson.annotation.JsonManagedReference;
/**
* @author Created by yuyidi on 2017/11/22.
* @desc 策略类型
*/
@Entity
@Table(name = "strategy_type")
public class StrategyType {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column
private String name;
@Column
private Boolean state;
/**
* 每万元收取的服务费用
*/
@Column
private BigDecimal serviceFeePerWan;
/**
* 穿仓点
*/
@Column(scale = 3)
private BigDecimal wearingPoint;
/**
* 市值集合
*/
@JsonManagedReference
@JoinTable(name = "strategy_amount", joinColumns = { @JoinColumn(name = "strategy_type") }, inverseJoinColumns = {
@JoinColumn(name = "amount_value") })
@ManyToMany(targetEntity = AmountValue.class, fetch = FetchType.EAGER)
private Set<AmountValue> amountValues = new HashSet<>();
/**
* 止损点集合
*/
@JsonManagedReference
@JoinTable(name = "strategy_loss", joinColumns = { @JoinColumn(name = "strategy_type") }, inverseJoinColumns = {
@JoinColumn(name = "loss") })
@ManyToMany(targetEntity = Loss.class, fetch = FetchType.EAGER)
private Set<Loss> losses = new HashSet<>();
/**
* 止盈点
*/
@Column(scale = 3)
private BigDecimal profit;
/**
* 递延费
*/
@Column
private Integer deferred;
/**
* 周期
*/
@Column
private Integer cycle;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Boolean getState() {
return state;
}
public void setState(Boolean state) {
this.state = state;
}
public Set<AmountValue> getAmountValues() {
return amountValues;
}
public void setAmountValues(Set<AmountValue> amountValues) {
this.amountValues = amountValues;
}
public BigDecimal getProfit() {
return profit;
}
public void setProfit(BigDecimal profit) {
this.profit = profit;
}
public Set<Loss> getLosses() {
return losses;
}
public void setLosses(Set<Loss> losses) {
this.losses = losses;
}
public Integer getDeferred() {
return deferred;
}
public void setDeferred(Integer deferred) {
this.deferred = deferred;
}
public void addAmountValues(List<AmountValue> amountValues) {
this.getAmountValues().addAll(amountValues);
}
public void addLosses(List<Loss> losses) {
this.getLosses().addAll(losses);
}
public Integer getCycle() {
return cycle;
}
public void setCycle(Integer cycle) {
this.cycle = cycle;
}
public BigDecimal getServiceFeePerWan() {
return serviceFeePerWan;
}
public void setServiceFeePerWan(BigDecimal serviceFeePerWan) {
this.serviceFeePerWan = serviceFeePerWan;
}
public BigDecimal getWearingPoint() {
return wearingPoint;
}
public void setWearingPoint(BigDecimal wearingPoint) {
this.wearingPoint = wearingPoint;
}
}
|
[
"sunliang_s666@163.com"
] |
sunliang_s666@163.com
|
af6194bc72687123c6c2ab6ef2cbbb875684c75b
|
c753cb626a282e973105a090503b61fef92d70da
|
/src/main/java/org/beigesoft/hld/HldSets.java
|
cb51c86f7c1a283f6efb23de754b81948c8ddf53
|
[
"BSD-2-Clause"
] |
permissive
|
demidenko05/beige-blc
|
957f942ece0a7dfca96f5529d6fa1df0624bbe2b
|
b31c672cdc0bc20d03f3415fb99465f9c3828a9a
|
refs/heads/master
| 2023-05-24T23:40:11.613198
| 2021-05-31T13:29:40
| 2021-05-31T13:29:40
| 176,269,715
| 0
| 0
|
BSD-2-Clause
| 2023-05-23T20:13:35
| 2019-03-18T11:32:40
|
Java
|
UTF-8
|
Java
| false
| false
| 3,791
|
java
|
/*
BSD 2-Clause License
Copyright (c) 2019, Beigesoft™
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.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.beigesoft.hld;
import java.util.Map;
import java.util.HashMap;
import java.lang.reflect.Method;
import org.beigesoft.mdl.IHasId;
import org.beigesoft.srv.IReflect;
/**
* <p>Holder of RAPI setters for any requested class.</p>
*
* @author Yury Demidenko
*/
public class HldSets implements IHlNmClMt {
/**
* <p>Reflection service.</p>
**/
private IReflect reflect;
/**
* <p>Map of classes and their fields names - RAPI setters.</p>
**/
private final Map<Class<? extends IHasId<?>>, Map<String, Method>> setsMap =
new HashMap<Class<? extends IHasId<?>>, Map<String, Method>>();
/**
* <p>Get thing for given class and thing name.</p>
* @param pCls a Class
* @param pFlNm Thing Name
* @return setter or exception if not found
* @throws Exception an Exception
**/
@Override
public final <T extends IHasId<?>> Method get(final Class<T> pCls,
final String pFlNm) throws Exception {
if (pCls == null || pFlNm == null) {
throw new Exception("NULL parameter cls/fld: " + pCls
+ "/" + pFlNm);
}
Map<String, Method> stsMp = this.setsMap.get(pCls);
if (stsMp == null) {
// There is no way to get from Map partially initialized bean
// in this double-checked locking implementation
// cause putting to the Map fully initialized bean
synchronized (this.setsMap) {
stsMp = this.setsMap.get(pCls);
if (stsMp == null) {
stsMp = new HashMap<String, Method>();
Method[] methods = getReflect().retMths(pCls);
for (Method method : methods) {
if (method.getName().startsWith("set")) {
String fldNm = method.getName().substring(3, 4).toLowerCase()
+ method.getName().substring(4);
stsMp.put(fldNm, method);
}
}
//assigning fully initialized object:
this.setsMap.put(pCls, stsMp);
}
}
}
Method rz = stsMp.get(pFlNm);
if (rz == null) {
throw new RuntimeException("Can't get setter for cls/fld: " + pCls
+ "/" + pFlNm);
}
return rz;
}
//Simple getters and setters:
/**
* <p>Getter for reflect.</p>
* @return IReflect
**/
public final IReflect getReflect() {
return this.reflect;
}
/**
* <p>Setter for reflect.</p>
* @param pReflect reference
**/
public final void setReflect(final IReflect pReflect) {
this.reflect = pReflect;
}
}
|
[
"demidenko05@gmail.com"
] |
demidenko05@gmail.com
|
dc799aed8f8b32486390d077ecbceb15b86ff013
|
63c3deadbd2fe144a071b41df000359738eddec3
|
/bookstore-backend/src/main/java/com/ezandro/bookstore/repositories/LivroRepository.java
|
7858de7aa174b123c2030fed87fd9187e4765627
|
[] |
no_license
|
ezbueno/bookstore-angular
|
4a5acc4fae3e57882bba67ed833e825b54776bd9
|
b65e1d5493451710c887238ec59da50bde7587a3
|
refs/heads/main
| 2023-05-11T09:18:40.074912
| 2021-06-01T21:55:30
| 2021-06-01T21:55:30
| 368,357,615
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 589
|
java
|
package com.ezandro.bookstore.repositories;
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import com.ezandro.bookstore.domain.Livro;
@Repository
public interface LivroRepository extends JpaRepository<Livro, Integer> {
@Query("SELECT obj FROM Livro obj WHERE obj.categoria.id = :id_cat ORDER BY obj.titulo")
List<Livro> findAllByCategoria(@Param(value = "id_cat") Integer id_cat);
}
|
[
"ezandrobueno@yahoo.com.br"
] |
ezandrobueno@yahoo.com.br
|
ae15f9a0dbfe6294f2e4ed3f20cec8a9e2b32d0c
|
f9852e15cbfc56515d4e156198cc92d8ebe06d60
|
/proj/CoyoteGraphics/src/com/kitfox/coyote/shape/bezier/BezierPoint2d.java
|
28c62c6e3d48970d5d58a474b99a93e750033fc0
|
[] |
no_license
|
kansasSamurai/raven
|
0c708ee9fc4224f53d49700834f622b357915bb6
|
d4b4f6dde43c7d801837977dfb087d8913ed71ca
|
refs/heads/master
| 2021-06-09T08:08:14.593699
| 2014-06-10T02:30:48
| 2014-06-10T02:30:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,345
|
java
|
/*
* Copyright 2011 Mark McKay
*
* 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.kitfox.coyote.shape.bezier;
import com.kitfox.coyote.math.CyMatrix4d;
import com.kitfox.coyote.math.CyVector2d;
import com.kitfox.coyote.shape.CyPath2d;
import com.kitfox.coyote.shape.PathConsumer;
/**
*
* @author kitfox
*/
public class BezierPoint2d extends BezierCurve2d
{
final double ax0;
final double ay0;
public BezierPoint2d(double ax0, double ay0)
{
this.ax0 = ax0;
this.ay0 = ay0;
}
@Override
public int getOrder()
{
return 1;
}
@Override
public BezierPoint2d reverse()
{
return new BezierPoint2d(ax0, ay0);
}
@Override
public double getTanInX()
{
return 0;
}
@Override
public double getTanInY()
{
return 0;
}
@Override
public double getTanOutX()
{
return 0;
}
@Override
public double getTanOutY()
{
return 0;
}
@Override
public double getStartX()
{
return ax0;
}
@Override
public double getStartY()
{
return ay0;
}
@Override
public double getEndX()
{
return ax0;
}
@Override
public double getEndY()
{
return ay0;
}
@Override
public double getMinX()
{
return ax0;
}
@Override
public double getMinY()
{
return ay0;
}
@Override
public double getMaxX()
{
return ax0;
}
@Override
public double getMaxY()
{
return ay0;
}
@Override
public BezierPoint2d[] split(double t)
{
return new BezierPoint2d[]{
new BezierPoint2d(ax0, ay0),
new BezierPoint2d(ax0, ay0)
};
}
@Override
public CyVector2d evaluate(double t, CyVector2d pos)
{
if (pos != null)
{
return new CyVector2d(ax0, ay0);
}
pos.set(ax0, ay0);
return pos;
}
@Override
public BezierPoint2d getDerivative()
{
throw new UnsupportedOperationException();
}
@Override
public BezierCubic2d asCubic()
{
return new BezierCubic2d(ax0, ay0,
ax0, ay0,
ax0, ay0,
ax0, ay0);
}
@Override
public double getCurvatureSquared()
{
return 0;
}
@Override
public BezierPoint2d offset(double width)
{
throw new UnsupportedOperationException();
}
@Override
public void append(PathConsumer out)
{
}
@Override
public void append(CyPath2d path)
{
}
@Override
public CyPath2d asPath()
{
CyPath2d path = new CyPath2d();
path.moveTo(ax0, ay0);
return path;
}
@Override
public BezierPoint2d transform(CyMatrix4d xform)
{
CyVector2d a0 = new CyVector2d(ax0, ay0);
xform.transformPoint(a0);
return new BezierPoint2d(a0.x, a0.y);
}
@Override
public BezierPoint2d setStart(double x, double y)
{
return new BezierPoint2d(
x, y);
}
@Override
public BezierPoint2d setEnd(double x, double y)
{
return new BezierPoint2d(
ax0, ay0);
}
@Override
public String asSvg()
{
return String.format("M %f %f",
ax0, ay0);
}
@Override
public String toString()
{
return String.format("point {(%f, %f)}",
ax0, ay0);
}
}
|
[
"kitfox@6b8830c1-5349-cced-e2ce-a6a69cd31f76"
] |
kitfox@6b8830c1-5349-cced-e2ce-a6a69cd31f76
|
a1e5e6d76ded433862514a36943e153575f56642
|
4acc3acebe988ec4e13c29625d4f1ea22b0a17c5
|
/第10章/aopTest13/src/aspect/AspectObject.java
|
e8adefd4083439fc4bd52ce3dbb63f0c9c371584
|
[
"MIT"
] |
permissive
|
finersoft/JavaEECoreFrameworkPractisesV2Code
|
e78d65e892754162d9ac992337f987bffa083c72
|
a9fb5f0395a169c6522612e18c64990b7f81b069
|
refs/heads/master
| 2021-09-10T17:39:14.216582
| 2018-03-30T08:00:29
| 2018-03-30T08:00:29
| 119,354,905
| 1
| 1
| null | null | null | null |
MacCentralEurope
|
Java
| false
| false
| 441
|
java
|
package aspect;
import java.util.Date;
public class AspectObject {
public void method1Before(int xxxxxx) {
System.out.println("«–√ś£ļpublic void method1Before(int xxxxxx) xxxxxx=" + xxxxxx);
}
public void method2Before(String uu, String pp, int aa, Date ii) {
System.out.println("«–√ś£ļpublic void method2Before(String uu, String pp, int aa, Date ii) uu=" + uu + " pp=" + pp
+ " aa=" + aa + " ii=" + ii);
}
}
|
[
"290384427@qq.com"
] |
290384427@qq.com
|
d54ea35827c75ba189d9e2542989138cd3fdbaa7
|
9b75d8540ff2e55f9ff66918cc5676ae19c3bbe3
|
/bazaar8.apk-decompiled/sources/com/farsitel/bazaar/data/entity/CommentAction.java
|
4517d81c28409e23b9b0e26c301c509d6e8853d4
|
[] |
no_license
|
BaseMax/PopularAndroidSource
|
a395ccac5c0a7334d90c2594db8273aca39550ed
|
bcae15340907797a91d39f89b9d7266e0292a184
|
refs/heads/master
| 2020-08-05T08:19:34.146858
| 2019-10-06T20:06:31
| 2019-10-06T20:06:31
| 212,433,298
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 149
|
java
|
package com.farsitel.bazaar.data.entity;
/* compiled from: CommentAction.kt */
public enum CommentAction {
UP_VOTE,
DOWN_VOTE,
REPORT
}
|
[
"MaxBaseCode@gmail.com"
] |
MaxBaseCode@gmail.com
|
96bde70d8cc7217ddadfc19b5f3faebb5d789208
|
652b2842d281b98f06170545cd3af9b49bc65849
|
/netty-example/src/main/java/cmc/lucky/basic/component/simplehandler/BaseClient.java
|
f329258a6ef95912a35ed0adefa64b78b1635dc8
|
[] |
no_license
|
LUCKYZHOUSTAR/JAVA-repository
|
bc55d028252eb2588c69f0ae921dd229fe4f4f38
|
fb7538db24b0f35a05101d8932d77db0dd297389
|
refs/heads/master
| 2022-12-27T06:59:43.700820
| 2020-05-28T02:44:47
| 2020-05-28T02:44:47
| 110,965,806
| 1
| 1
| null | 2022-12-16T10:40:41
| 2017-11-16T11:56:07
|
Java
|
UTF-8
|
Java
| false
| false
| 1,698
|
java
|
package cmc.lucky.basic.component.simplehandler;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.*;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.SocketChannel;
import io.netty.channel.socket.nio.NioSocketChannel;
import io.netty.handler.codec.string.StringDecoder;
import io.netty.handler.codec.string.StringEncoder;
public class BaseClient {
static final String HOST = System.getProperty("host", "127.0.0.1");
static final int PORT = Integer.parseInt(System.getProperty("port", "8080"));
static final int SIZE = Integer.parseInt(System.getProperty("size", "256"));
public static void main(String[] args) throws Exception {
// Configure the client.
EventLoopGroup group = new NioEventLoopGroup();
try {
Bootstrap b = new Bootstrap();
b.group(group)
.channel(NioSocketChannel.class)
.option(ChannelOption.TCP_NODELAY, true)
.handler(new ChannelInitializer<SocketChannel>() {
@Override
public void initChannel(SocketChannel ch) throws Exception {
ChannelPipeline p = ch.pipeline();
p.addLast("decoder", new StringDecoder());
p.addLast("encoder", new StringEncoder());
p.addLast(new BaseClientHandler());
}
});
ChannelFuture future = b.connect(HOST, PORT).sync();
future.channel().writeAndFlush("Hello Netty Server ,I am a common client");
future.channel().closeFuture().sync();
} finally {
group.shutdownGracefully();
}
}
}
|
[
"chaoqiang.zhou@Mtime.com"
] |
chaoqiang.zhou@Mtime.com
|
ac3a26cd22ea004375ccfd5f9c1a879bbbbcfda4
|
fb1b0acc7e0fc7f57ed003ac1d4739e26ec47fd0
|
/flyway-core/src/main/java/org/flywaydb/core/api/migration/spring/SpringJdbcMigration.java
|
84a300a524884b465724ed4a97a5fb19d57381f6
|
[
"Apache-2.0"
] |
permissive
|
mdaquel/flyway
|
bcd4409a69bbffa5031805d9938758a3f4cf84c0
|
9e7a66c220035d1ea21fa0d757cb55292e5c17d4
|
refs/heads/master
| 2021-01-16T20:36:49.932290
| 2016-02-02T17:28:28
| 2016-02-02T17:28:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,592
|
java
|
/**
* Copyright 2010-2016 Boxfuse GmbH
*
* 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.flywaydb.core.api.migration.spring;
import org.springframework.jdbc.core.JdbcTemplate;
/**
* Interface to be implemented by Spring Jdbc Java Migrations. By default the migration version and description will be extracted
* from the class name. This can be overriden by also implementing the MigrationInfoProvider interface, in which
* case it can be specified programmatically. The checksum of this migration (for validation) will also be null, unless
* the migration also implements the MigrationChecksumProvider, in which case it can be returned programmatically.
*/
public interface SpringJdbcMigration {
/**
* Executes this migration. The execution will automatically take place within a transaction, when the underlying
* database supports it.
*
* @param jdbcTemplate The jdbcTemplate to use to execute statements.
* @throws Exception when the migration failed.
*/
void migrate(JdbcTemplate jdbcTemplate) throws Exception;
}
|
[
"business@axelfontaine.com"
] |
business@axelfontaine.com
|
c0e95a34dc956db89ed752f5caafe756099b336c
|
c42bb5fe3505703e56791c23b5cb838938816833
|
/eggroll/networking/proxy/src/main/java/com/webank/ai/eggroll/networking/proxy/Main1.java
|
4b49ad168fe12d1054cf062432157eb2b1186ffd
|
[
"Apache-2.0"
] |
permissive
|
nemirorox/FATE
|
fe727c1a8bb39e18d0508bdee14745cfb2814d6c
|
7f4a3e7ca50f24e49090e6c117bfabd1785603f2
|
refs/heads/master
| 2020-06-27T03:25:10.342834
| 2019-07-26T03:08:27
| 2019-07-26T03:08:27
| 199,831,026
| 1
| 0
|
Apache-2.0
| 2019-07-31T10:08:25
| 2019-07-31T10:08:25
| null |
UTF-8
|
Java
| false
| false
| 2,393
|
java
|
/*
* Copyright 2019 The FATE Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.webank.ai.eggroll.networking.proxy;
import com.webank.ai.eggroll.networking.proxy.factory.GrpcServerFactory;
import com.webank.ai.eggroll.networking.proxy.factory.LocalBeanFactory;
import com.webank.ai.eggroll.networking.proxy.model.ServerConf;
import io.grpc.Server;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class Main1 {
private static final Logger LOGGER = LogManager.getLogger(Main1.class);
public static void main(String[] args) throws Exception {
ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext-proxy.xml");
LocalBeanFactory localBeanFactory = context.getBean(LocalBeanFactory.class);
localBeanFactory.setApplicationContext(context);
GrpcServerFactory serverFactory = context.getBean(GrpcServerFactory.class);
int port = 8888;
ServerConf serverConf = context.getBean(ServerConf.class);
serverConf.setCoordinator("10000");
serverConf.setSecureServer(false);
serverConf.setSecureClient(true);
/*
serverConf.setServerKeyPath("/Users/max-webank/Documents/zmodem/server.key");
serverConf.setServerCrtPath("/Users/max-webank/Documents/zmodem/server.crt");
*/
serverConf.setRouteTablePath("src/main/resources/route_tables/route_table1.json");
serverConf.setPort(port);
LOGGER.info("Server started listening on port: {}", port);
Server server = serverFactory.createServer(serverConf);
LOGGER.info("server conf: {}", serverConf);
server.start();
server.awaitTermination();
}
}
|
[
"maxwong@live.cn"
] |
maxwong@live.cn
|
7e1a16809b3a19b6173240adabfe06ed8aed0da8
|
501df534525aad7e3a2449c9d941dabfae352105
|
/aliyun-java-sdk-live/src/main/java/com/aliyuncs/live/model/v20161101/DescribeLiveStreamSnapshotInfoRequest.java
|
ba6ffa4911aa6541a513e1a698a3e080385c77dc
|
[
"Apache-2.0"
] |
permissive
|
lvrenjun/aliyun-openapi-java-sdk
|
2b050140829c522380212d1bc20af9bf74ea18e4
|
ef323a456ee6dda3448ebb470503b135e28dc593
|
refs/heads/master
| 2021-01-21T14:07:29.367655
| 2017-06-13T12:07:48
| 2017-06-13T12:07:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,086
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.aliyuncs.live.model.v20161101;
import com.aliyuncs.RpcAcsRequest;
/**
* @author auto create
* @version
*/
public class DescribeLiveStreamSnapshotInfoRequest extends RpcAcsRequest<DescribeLiveStreamSnapshotInfoResponse> {
public DescribeLiveStreamSnapshotInfoRequest() {
super("live", "2016-11-01", "DescribeLiveStreamSnapshotInfo", "live");
}
private String securityToken;
private Long ownerId;
private String domainName;
private String appName;
private String streamName;
private String startTime;
private String endTime;
private Integer limit;
public String getSecurityToken() {
return this.securityToken;
}
public void setSecurityToken(String securityToken) {
this.securityToken = securityToken;
putQueryParameter("SecurityToken", securityToken);
}
public Long getOwnerId() {
return this.ownerId;
}
public void setOwnerId(Long ownerId) {
this.ownerId = ownerId;
putQueryParameter("OwnerId", ownerId);
}
public String getDomainName() {
return this.domainName;
}
public void setDomainName(String domainName) {
this.domainName = domainName;
putQueryParameter("DomainName", domainName);
}
public String getAppName() {
return this.appName;
}
public void setAppName(String appName) {
this.appName = appName;
putQueryParameter("AppName", appName);
}
public String getStreamName() {
return this.streamName;
}
public void setStreamName(String streamName) {
this.streamName = streamName;
putQueryParameter("StreamName", streamName);
}
public String getStartTime() {
return this.startTime;
}
public void setStartTime(String startTime) {
this.startTime = startTime;
putQueryParameter("StartTime", startTime);
}
public String getEndTime() {
return this.endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
putQueryParameter("EndTime", endTime);
}
public Integer getLimit() {
return this.limit;
}
public void setLimit(Integer limit) {
this.limit = limit;
putQueryParameter("Limit", limit);
}
@Override
public Class<DescribeLiveStreamSnapshotInfoResponse> getResponseClass() {
return DescribeLiveStreamSnapshotInfoResponse.class;
}
}
|
[
"ling.wu@alibaba-inc.com"
] |
ling.wu@alibaba-inc.com
|
7cf098774450188b7a33a69d3b8529b317fcc9c1
|
380d1187ac2cebd2a33827790913ff3d8d6be17b
|
/src/main/java/concurrency/PipedIO.java
|
6fe21e920e5d18cb5847bcb012b01dba28d73c1d
|
[] |
no_license
|
XingxianDeng/ThinkingInJavaSample
|
eb9340fed48af79c60fdddcc6272c5d2d4d17538
|
f3414c706c19020cf348461242956bfdac743c9b
|
refs/heads/master
| 2021-06-22T01:41:04.337907
| 2017-08-30T14:06:43
| 2017-08-30T14:06:43
| 84,512,283
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,921
|
java
|
package concurrency;
import java.io.IOException;
import java.io.PipedReader;
import java.io.PipedWriter;
import java.util.Random;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
/**
* Using pipes for inter-task I/O
*
* @author dylan
* @version 1.00 7/3/16 8:23 AM
*/
public class PipedIO {
public static void main(String[] args) throws Exception {
Sender sender = new Sender();
Receiver receiver = new Receiver(sender);
ExecutorService exec = Executors.newCachedThreadPool();
exec.execute(sender);
exec.execute(receiver);
TimeUnit.SECONDS.sleep(4);
exec.shutdownNow();
}
}
class Sender implements Runnable {
private Random rand = new Random(47);
private PipedWriter out = new PipedWriter();
public PipedWriter getPipedWriter() {
return out;
}
@Override
public void run() {
try {
while (true) {
for (char c = 'A'; c <= 'z'; c++) {
out.write(c);
TimeUnit.MILLISECONDS.sleep(rand.nextInt(500));
}
}
} catch (IOException e) {
System.out.println(e + " Sender write exception");
} catch (InterruptedException e) {
System.out.println(e + " Sender sleep interrupted");
}
}
}
class Receiver implements Runnable {
private PipedReader in;
public Receiver(Sender sender) throws IOException {
in = new PipedReader(sender.getPipedWriter());
}
@Override
public void run() {
try {
while (true) {
// Blocks until characters are there:
System.out.print("Read :" + (char) in.read() + ", ");
}
} catch (IOException e) {
System.out.println(e + " Receiver read exception");
}
}
}
|
[
"dxx1104@gmail.com"
] |
dxx1104@gmail.com
|
eb126943d300f22ae9b65f692415d075235a7ec5
|
de9959030694da57f86478204f1376f5696dd342
|
/src/main/java/com/lyj/algorithms/tree/Solution5.java
|
1e0114f8f0a2e85abed71dcefe4f79cf7d5c1cbc
|
[] |
no_license
|
Ja0ck5/offer-algorithms
|
585928ba2bcd333eb5fb741dfca6d589e3494be7
|
8d99808c2db25810adacfd427f19fcb8b8be870f
|
refs/heads/master
| 2021-01-22T09:10:06.565449
| 2017-06-25T14:16:47
| 2017-06-25T14:16:47
| 81,936,055
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 1,862
|
java
|
package com.lyj.algorithms.tree;
import java.util.ArrayList;
import java.util.List;
/**
* 二叉树中和为某一值的路径 输入一颗二叉树和一个整数,打印出二叉树中结点值的和为输入整数的所
* 有路径。从树的根节点开始往下一直到叶结点所经过的结点形成一条路径。
*
* @author Ja0ck5
*
*/
public class Solution5 {
public static class BinaryTreeNode {
int val;
BinaryTreeNode left;
BinaryTreeNode right;
public BinaryTreeNode() {
}
public BinaryTreeNode(int val) {
this.val = val;
}
@Override
public String toString() {
return "BinaryNode [val=" + val + ", left=" + left + ", right=" + right + "]";
}
}
private List<ArrayList<Integer>> listAll = new ArrayList<ArrayList<Integer>>();
private List<Integer> list = new ArrayList<Integer>();
public List<ArrayList<Integer>> findPath(BinaryTreeNode root, int target) {
if (root == null)
return listAll;
list.add(root.val);
//目标值减去经过的值
target -= root.val;
if (target == 0 && root.left == null && root.right == null)
listAll.add(new ArrayList<Integer>(list));
//查询左节点
findPath(root.left, target);
//查询右节点
findPath(root.right, target);
//移除最后一个元素,深度遍历完一条路径后要回退
list.remove(list.size() - 1);
return listAll;
}
public static void main(String[] args) {
BinaryTreeNode root = new BinaryTreeNode(1);
root.left = new BinaryTreeNode(2);
root.right = new BinaryTreeNode(3);
root.left.left = new BinaryTreeNode(4);
root.left.right = new BinaryTreeNode(5);
root.right.left = new BinaryTreeNode(6);
root.right.right = new BinaryTreeNode(7);
Solution5 s5 = new Solution5();
System.out.println(s5.findPath(root,7));
}
}
|
[
"975117619@qq.com"
] |
975117619@qq.com
|
911576024530f762ad98b981a9cc31391b7773db
|
d71e879b3517cf4fccde29f7bf82cff69856cfcd
|
/ExtractedJars/Ibotta_com.ibotta.android/javafiles/com/google/android/gms/auth/api/proxy/AuthApiStatusCodes.java
|
abba904e1872464c55ba3e9b5728d2528fee12f5
|
[
"MIT"
] |
permissive
|
Andreas237/AndroidPolicyAutomation
|
b8e949e072d08cf6c6166c3f15c9c63379b8f6ce
|
c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a
|
refs/heads/master
| 2020-04-10T02:14:08.789751
| 2019-05-16T19:29:11
| 2019-05-16T19:29:11
| 160,739,088
| 5
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,506
|
java
|
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) annotate safe
package com.google.android.gms.auth.api.proxy;
import com.google.android.gms.common.api.CommonStatusCodes;
public class AuthApiStatusCodes extends CommonStatusCodes
{
private AuthApiStatusCodes()
{
// 0 0:aload_0
// 1 1:invokespecial #24 <Method void CommonStatusCodes()>
// 2 4:return
}
public static String getStatusCodeString(int i)
{
switch(i)
//* 0 0:iload_0
{
//* 1 1:tableswitch 3000 3006: default 44
// 3000 67
// 3001 64
// 3002 61
// 3003 58
// 3004 55
// 3005 52
// 3006 49
default:
return CommonStatusCodes.getStatusCodeString(i);
// 2 44:iload_0
// 3 45:invokestatic #29 <Method String CommonStatusCodes.getStatusCodeString(int)>
// 4 48:areturn
case 3006:
return "AUTH_APP_CERT_ERROR";
// 5 49:ldc1 #30 <String "AUTH_APP_CERT_ERROR">
// 6 51:areturn
case 3005:
return "AUTH_URL_RESOLUTION";
// 7 52:ldc1 #31 <String "AUTH_URL_RESOLUTION">
// 8 54:areturn
case 3004:
return "AUTH_TOKEN_ERROR";
// 9 55:ldc1 #32 <String "AUTH_TOKEN_ERROR">
// 10 57:areturn
case 3003:
return "AUTH_API_SERVER_ERROR";
// 11 58:ldc1 #33 <String "AUTH_API_SERVER_ERROR">
// 12 60:areturn
case 3002:
return "AUTH_API_CLIENT_ERROR";
// 13 61:ldc1 #34 <String "AUTH_API_CLIENT_ERROR">
// 14 63:areturn
case 3001:
return "AUTH_API_ACCESS_FORBIDDEN";
// 15 64:ldc1 #35 <String "AUTH_API_ACCESS_FORBIDDEN">
// 16 66:areturn
case 3000:
return "AUTH_API_INVALID_CREDENTIALS";
// 17 67:ldc1 #36 <String "AUTH_API_INVALID_CREDENTIALS">
// 18 69:areturn
}
}
public static final int AUTH_API_ACCESS_FORBIDDEN = 3001;
public static final int AUTH_API_CLIENT_ERROR = 3002;
public static final int AUTH_API_INVALID_CREDENTIALS = 3000;
public static final int AUTH_API_SERVER_ERROR = 3003;
public static final int AUTH_APP_CERT_ERROR = 3006;
public static final int AUTH_TOKEN_ERROR = 3004;
public static final int AUTH_URL_RESOLUTION = 3005;
}
|
[
"silenta237@gmail.com"
] |
silenta237@gmail.com
|
399d828e6d7611917ecd2e13faf70ebcfb53644e
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/24/24_905a8febfdbf6d2758bdfe1114dc18c3dce6efb2/Document/24_905a8febfdbf6d2758bdfe1114dc18c3dce6efb2_Document_t.java
|
237d6856f1a6a4cce592f5efe56265d3cbd691bd
|
[] |
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
| 6,741
|
java
|
package gx.realtime;
import com.google.api.client.auth.oauth2.Credential;
import gx.browserchannel.BrowserChannel;
import gx.browserchannel.util.ConnectionFactory;
import gx.browserchannel.util.URLWithQuery;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class Document extends EventTarget {
//interfaces
public interface SuccessFunction{
public void execute(String json);
}
public interface FailureFunction{
public void execute(BaseModelEvent e);
}
//attributes
private Model model;
private BrowserChannel channel;
private List<Collaborator> collaborators;
private Collaborator me;
private Map<EventType, Set<EventHandler>> eventHandlers;
private Credential credential;
private Session session;
private boolean isClosed = false;
private RealtimeMessageHandler messageHandler;
//functions
protected Document(Credential credential, Session session) {
this.credential = credential;
this.session = session;
this.messageHandler = new RealtimeMessageHandler(this);
this.collaborators = new ArrayList<Collaborator>();
this.eventHandlers = new HashMap<EventType, Set<EventHandler>>();
this.model = new Model(this);
processSnapshot();
// Set up browser channel
this.channel = new BrowserChannel(session.getRevision());
this.channel.addMessageHandler(messageHandler);
this.channel.addExtraParameter("id", session.getModelId());
this.channel.addExtraParameter("access_token", credential.getAccessToken());
this.channel.addExtraParameter("sid", session.getSessionId());
addPrivateEventHandlers();
this.channel.connect(RealtimeLoader.getChannelUrl());
}
private void processSnapshot() {
List<BaseModelEvent> events = this.session.getSnapshot();
for (BaseModelEvent event : events) {
handleRemoteEvent(event);
}
}
private void addPrivateEventHandlers() {
addEventListener(EventType.COLLABORATOR_JOINED, (CollaboratorJoinedEvent e) -> {
Collaborator collaborator = e.getCollaborator();
collaborators.add(collaborator);
if (collaborator.isMe()) {
me = collaborator;
}
});
addEventListener(EventType.COLLABORATOR_LEFT, (CollaboratorLeftEvent e) -> {
collaborators.remove(e.getCollaborator());
});
addEventListener(EventType.DOCUMENT_SAVE_STATE_CHANGED, (DocumentSaveStateChangedEvent e) -> {
//...
});
}
/**
* Closes the document and disconnects from the server. After this function is called, event listeners will no longer fire and attempts to access the document, model, or model objects will throw a {@link gx.realtime.DocumentClosedError}. Calling this function after the document has been closed will have no effect.
*/
public void close() {
if(isClosed)
return;
isClosed = true;
eventHandlers = new HashMap<>();
channel.disconnect();
// Set up parameters
Map<String, String> parameters = new HashMap<>();
parameters.put("id", session.getModelId());
parameters.put("access_token", credential.getAccessToken());
parameters.put("sid", session.getSessionId());
try {
// Create connection
URLWithQuery urlq = new URLWithQuery(new URL(RealtimeLoader.getChannelUrl() + "/leave"), parameters);
ConnectionFactory.createJsonReader(urlq).close();
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* Exports the document to a JSON format.
* @param successFn - A function that the exported JSON will be passed to when it is available.
* @param failureFn - A function that will be called if the export fails.
*/
public void exportDocument(SuccessFunction successFn, FailureFunction failureFn) {
// TODO: implement
}
/**
* Gets an array of collaborators active in this session. Each collaborator is a jsMap with these fields: sessionId, userId, displayName, color, isMe, isAnonymous.
* @return
*/
public List<Collaborator> getCollaborators() {
return collaborators;
}
/**
* Return the collaborator representing the current user.
* @return
*/
protected Collaborator getMe() {
return me;
}
/**
* Set the model of this document. This method should not be used directly,
* the model is set automatically during the document load process.
* @param model
*/
protected void setModel(Model model) {
this.model = model;
}
/**
* Gets the collaborative model associated with this document.
* @return
*/
public Model getModel() {
return model;
}
public <T extends Event> void addEventListener(EventType type, EventHandler<T> handler) {
Set<EventHandler> handlers = eventHandlers.get(type);
if(handlers == null){
handlers = new HashSet<EventHandler>();
eventHandlers.put(type, handlers);
}
handlers.add(handler);
}
public <T extends Event> void removeEventListener(EventType type, EventHandler<T> handler) {
Set<EventHandler> handlers = eventHandlers.get(type);
if(handlers != null){
handlers.remove(handler);
}
}
/**
* Take an incoming event coming from a remote host.
* @param event
*/
protected void handleRemoteEvent(Event event) {
// Handle special internal events to add new objects
if (event instanceof ObjectAddedEvent) {
model.addNodeFromEvent((ObjectAddedEvent) event);
return;
}
// Delegate model events to the model
if (event instanceof BaseModelEvent) {
BaseModelEvent modelEvent = (BaseModelEvent)event;
getModel().handleRemoteEvent(modelEvent);
} else {
Set<EventHandler> handlers = eventHandlers.get(event.getType());
if (handlers != null) {
for (EventHandler handler : handlers){
handler.handleEvent(event);
}
}
}
}
public Session getSession() {
return session;
}
public void setSession(Session session) {
this.session = session;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
46a314f248d721fb4567c8d318f6072eec2bab30
|
1e9c9f2a9639db7cdb032aae69cb4d99aef1d3a5
|
/codingBat/src/javaExample/ap1/MergeTwo.java
|
66e6b85b6b7578054754f09c45a6361cb7b050e5
|
[
"MIT"
] |
permissive
|
sagarnikam123/learnNPractice
|
f0da3f8acf653e56c591353ab342765a6831698c
|
1b3b0cb2cff2f478006626a4c37a99102acbb628
|
refs/heads/master
| 2023-02-04T11:21:18.211654
| 2023-01-24T14:47:52
| 2023-01-24T14:47:52
| 61,184,927
| 2
| 1
|
MIT
| 2022-03-06T11:07:18
| 2016-06-15T06:57:19
|
Python
|
UTF-8
|
Java
| false
| false
| 2,306
|
java
|
/**************************************************************************************************
mergeTwo - solved - copied
Start with two arrays of strings, A and B, each with its elements in alphabetical order and
without duplicates. Return a new array containing the first N elements from the two arrays.
The result array should be in alphabetical order and without duplicates. A and B will both
have a length which is N or more. The best "linear" solution makes a single pass over A and B,
taking advantage of the fact that they are in alphabetical order,
copying elements directly to the new array.
***************************************************************************************************
mergeTwo({"a", "c", "z"}, {"b", "f", "z"}, 3) → {"a", "b", "c"}
mergeTwo({"a", "c", "z"}, {"c", "f", "z"}, 3) → {"a", "c", "f"}
mergeTwo({"f", "g", "z"}, {"c", "f", "g"}, 3) → {"c", "f", "g"}
mergeTwo({"a", "c", "z"}, {"a", "c", "z"}, 3) → {"a", "c", "z"}
mergeTwo({"a", "b", "c", "z"}, {"a", "c", "z"}, 3) → {"a", "b", "c"}
mergeTwo({"a", "c", "z"}, {"a", "b", "c", "z"}, 3) → {"a", "b", "c"}
mergeTwo({"a", "c", "z"}, {"a", "c", "z"}, 2) → {"a", "c"}
mergeTwo({"a", "c", "z"}, {"a", "c", "y", "z"}, 3) → {"a", "c", "y"}
mergeTwo({"x", "y", "z"}, {"a", "b", "z"}, 3) → {"a", "b", "x"}
**************************************************************************************************/
package javaExample.ap1;
public class MergeTwo
{
public static void main(String[] args)
{
String hehe [] = {"a", "c", "z"};
String kyaKare [] = {"b", "f", "z"};
String beetiUmra [];
System.out.println(beetiUmra = mergeTwo(hehe,kyaKare,3));
for(String korda : beetiUmra){
System.out.println(korda);
}
}
public static String[] mergeTwo(String[] a, String[] b, int n) {
int ai = 0, bi = 0, k = 0;
String khudiRam [] = new String[n];
for(int i = 0;i < n;i++){
if( i > 0){
String pre = khudiRam [i -1];
while(a[ai].compareTo(pre) < 1)
ai++;
while(b[bi].compareTo(pre) < 1)
bi++;
}
if(a[ai].compareTo(b[bi]) < 0){
khudiRam[k] = a[ai]; k++;
}else {
khudiRam[k] = b[bi]; k++;
}
}
return khudiRam;
}
}
|
[
"sagarnikam123@gmail.com"
] |
sagarnikam123@gmail.com
|
7bf5f98b607ca27057d0f1dbb1c27ab73ebeadfb
|
81d52386de544047c8c25bfd781c6b957031e149
|
/gulimall-search/src/main/java/com/atguigu/gulimall/gulimallsearch/vo/SearchParam.java
|
db9c971f6f3720f8d0900d77cf661803d9b97733
|
[] |
no_license
|
Archer-Fang/gulimall
|
0a707ad95b0343e6f352ead78e3c7c6316798d55
|
a363e0f6f9cb3fa6decb92135f22ec4dd5888212
|
refs/heads/main
| 2023-06-02T03:00:53.487121
| 2021-06-20T03:39:08
| 2021-06-20T03:39:08
| 371,892,223
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 770
|
java
|
package com.atguigu.gulimall.gulimallsearch.vo;
/**
* @author Created by Fangzj
* @data 2021/6/19 21:57
**/
import lombok.Data;
import java.util.List;
/**
* 封装页面可能传递过来的查询条件
*/
@Data
public class SearchParam {
//检索关键字
private String keyword;
//三级分类ID
private Long catalog3Id;
//排序条件(saleCount(销量)、hotScore(热度分)、skuPrice(价格))
private String sort;
//是否有库存(0表示无库存,1表示有库存)
private Integer hasStock;
//价格区间查询
private String skuPrice;
//商品ID
private List<Long> brandId;
//按照属性进行筛选
private List<String> attrs;
//页码
private Integer pageNum = 1;
}
|
[
"1091053002@qq.com"
] |
1091053002@qq.com
|
eace0605f81b90a59a58d0fcbf7a8d1293154e30
|
7094b816ca6eb0d4752de8a75f155311ed56e52b
|
/three_bears/quotor-academy/quotor-academy-biz/src/main/java/com/quotorcloud/quotor/academy/controller/homepage/WebHomePageController.java
|
dd1459930961ed0c84a6e890eb18f4f3f7bf303f
|
[] |
no_license
|
a97659096/quotor
|
ebce8bb5a61d082abf882aabff4d7a5e167c4da7
|
7ebe9a3ef906110fb155114a199351dd033a3b17
|
refs/heads/master
| 2023-08-10T05:33:02.055405
| 2019-12-25T01:23:07
| 2019-12-25T01:23:07
| 229,431,115
| 0
| 0
| null | 2023-07-23T00:58:58
| 2019-12-21T13:27:33
|
Java
|
UTF-8
|
Java
| false
| false
| 280
|
java
|
package com.quotorcloud.quotor.academy.controller.homepage;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("home/page/web")
public class WebHomePageController {
}
|
[
"97659096@qq.com"
] |
97659096@qq.com
|
fe5f0370d780c6aa0475d7aa3eae2859afecbe38
|
a97969bcf7ba356df9ca0ba32c096f679ec7e85a
|
/src/main/java/nc/block/NCBlockTrapDoor.java
|
8cde1b4762a154544c77193f911fc55e126b95cf
|
[] |
no_license
|
TheGuyRunningSouth/NuclearCraft
|
cd7bfadcac052f6503976eacdbf3ce23e5908922
|
6b530497a45550d1fefc76bc8602ab366c38fcb7
|
refs/heads/master
| 2021-08-23T00:36:33.407497
| 2017-12-01T23:08:42
| 2017-12-01T23:08:42
| 112,790,273
| 0
| 0
| null | 2017-12-01T21:50:46
| 2017-12-01T21:50:46
| null |
UTF-8
|
Java
| false
| false
| 823
|
java
|
package nc.block;
import nc.Global;
import nc.proxy.CommonProxy;
import net.minecraft.block.BlockTrapDoor;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
public class NCBlockTrapDoor extends BlockTrapDoor {
public NCBlockTrapDoor(String unlocalizedName, String registryName, Material material) {
super(material);
setUnlocalizedName(unlocalizedName);
setRegistryName(new ResourceLocation(Global.MOD_ID, registryName));
setCreativeTab(CommonProxy.TAB_FISSION_BLOCKS);
}
public boolean canCreatureSpawn(IBlockState state, IBlockAccess world, BlockPos pos, net.minecraft.entity.EntityLiving.SpawnPlacementType type) {
return false;
}
}
|
[
"joedodd35@gmail.com"
] |
joedodd35@gmail.com
|
e463a8ae91fff078ae0f71b2a00b4b1bdf4c79e5
|
35c9b4e30b05e17942f6a95544fc1a099e81bb7e
|
/util/src/main/java/org/jeesl/factory/ejb/system/io/cms/EjbIoCmsSectionFactory.java
|
e8db3d400f96727da57ab50a68e51c49de021b58
|
[] |
no_license
|
kmeier86/jeesl
|
cef55c75e0b93173a97d7c54624a2a018cdadcfc
|
a86d8b8c99905a6bb1cd8a37cbec777bd17269a0
|
refs/heads/master
| 2020-12-28T16:47:24.936935
| 2020-02-20T12:20:57
| 2020-02-20T12:20:57
| 238,410,366
| 0
| 0
| null | 2020-02-20T12:20:58
| 2020-02-05T09:16:03
|
Java
|
UTF-8
|
Java
| false
| false
| 1,385
|
java
|
package org.jeesl.factory.ejb.system.io.cms;
import java.util.ArrayList;
import java.util.List;
import org.jeesl.interfaces.model.system.io.cms.JeeslIoCmsSection;
import org.jeesl.interfaces.model.system.io.fr.JeeslFileMeta;
import org.jeesl.interfaces.model.system.locale.JeeslLang;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class EjbIoCmsSectionFactory <L extends JeeslLang,
S extends JeeslIoCmsSection<L,S>,
META extends JeeslFileMeta<?,?,?,?>>
{
final static Logger logger = LoggerFactory.getLogger(EjbIoCmsSectionFactory.class);
private final Class<S> cS;
public EjbIoCmsSectionFactory(final Class<S> cS)
{
this.cS = cS;
}
public S build() {return build(null);}
public S build(S parent)
{
S ejb = null;
try
{
ejb = cS.newInstance();
ejb.setSection(parent);
}
catch (InstantiationException e) {e.printStackTrace();}
catch (IllegalAccessException e) {e.printStackTrace();}
return ejb;
}
public void update(S src, S dst)
{
dst.setSection(src.getSection());
dst.setPosition(src.getPosition());
dst.setName(src.getName());
}
public List<META> toMeta(S section)
{
List<META> list = new ArrayList<>();
toMeta(list,section);
return list;
}
private void toMeta(List<META> result, S section)
{
for(S child : section.getSections())
{
toMeta(result,child);
}
}
}
|
[
"t.kisner@web.de"
] |
t.kisner@web.de
|
8c8d35dbfc5aa2b60d2090e8826ee38f57cd4f9e
|
cacd87f8831b02e254d65c5e86d48264c7493d78
|
/pc/new/datahost/src/main/java/com/manji/datahost/service/mysql/UtilsService.java
|
3dd86f22ffa9224a78d3b79774ae8510bd6790e8
|
[] |
no_license
|
lichaoqian1992/beautifulDay
|
1a5a30947db08d170968611068673d2f0b626eb2
|
44e000ecd47099dc5342ab8a208edea73602760b
|
refs/heads/master
| 2021-07-24T22:48:33.067359
| 2017-11-03T09:06:15
| 2017-11-03T09:06:15
| 108,791,908
| 0
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 507
|
java
|
package com.manji.datahost.service.mysql;
import com.manji.datahost.model.mysql.CallRegister;
import com.manji.datahost.model.mysql.SheetInfo;
import com.manji.datahost.model.sqlserver.base.Page;
public interface UtilsService {
//来电记录
Page<CallRegister> callRegister(Integer pageNumber,Integer pageSize,String mobile);
//工单信息
Page<SheetInfo> sheetInfo(String mobile,Integer pageNumber,Integer pageSize);
//客服介入
Integer isInvolved(Integer order_id);
}
|
[
"1015598423@qq.com"
] |
1015598423@qq.com
|
3a28748bad279b716bb9320a6e91ec7ca5a69eb8
|
aaabffe8bf55973bfb1390cf7635fd00ca8ca945
|
/src/main/java/com/microsoft/graph/models/generated/BaseWorkbookFunctionsBeta_InvBody.java
|
949d02a15cba1eb5d85e4ac13439fa08e079c47a
|
[
"MIT"
] |
permissive
|
rgrebski/msgraph-sdk-java
|
e595e17db01c44b9c39d74d26cd925b0b0dfe863
|
759d5a81eb5eeda12d3ed1223deeafd108d7b818
|
refs/heads/master
| 2020-03-20T19:41:06.630857
| 2018-03-16T17:31:43
| 2018-03-16T17:31:43
| 137,648,798
| 0
| 0
| null | 2018-06-17T11:07:06
| 2018-06-17T11:07:05
| null |
UTF-8
|
Java
| false
| false
| 2,550
|
java
|
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
package com.microsoft.graph.models.generated;
import com.microsoft.graph.concurrency.*;
import com.microsoft.graph.core.*;
import com.microsoft.graph.models.extensions.*;
import com.microsoft.graph.models.generated.*;
import com.microsoft.graph.http.*;
import com.microsoft.graph.requests.extensions.*;
import com.microsoft.graph.requests.generated.*;
import com.microsoft.graph.options.*;
import com.microsoft.graph.serializer.*;
import java.util.Arrays;
import java.util.EnumSet;
import com.google.gson.JsonObject;
import com.google.gson.annotations.*;
// **NOTE** This file was generated by a tool and any changes will be overwritten.
/**
* The class for the Base Workbook Functions Beta_Inv Body.
*/
public class BaseWorkbookFunctionsBeta_InvBody {
/**
* The probability.
*
*/
@SerializedName("probability")
@Expose
public com.google.gson.JsonElement probability;
/**
* The alpha.
*
*/
@SerializedName("alpha")
@Expose
public com.google.gson.JsonElement alpha;
/**
* The beta.
*
*/
@SerializedName("beta")
@Expose
public com.google.gson.JsonElement beta;
/**
* The a.
*
*/
@SerializedName("a")
@Expose
public com.google.gson.JsonElement a;
/**
* The b.
*
*/
@SerializedName("b")
@Expose
public com.google.gson.JsonElement b;
/**
* The raw representation of this class
*/
private JsonObject rawObject;
/**
* The serializer
*/
private ISerializer serializer;
/**
* Gets the raw representation of this class
*
* @return the raw representation of this class
*/
public JsonObject getRawObject() {
return rawObject;
}
/**
* Gets serializer
*
* @return the serializer
*/
protected ISerializer getSerializer() {
return serializer;
}
/**
* Sets the raw JSON object
*
* @param serializer the serializer
* @param json the JSON object to set this object to
*/
public void setRawObject(final ISerializer serializer, final JsonObject json) {
this.serializer = serializer;
rawObject = json;
}
}
|
[
"caitbal@microsoft.com"
] |
caitbal@microsoft.com
|
ae30709341f15be82ef5b6e012cf1ce83245c342
|
8f030b536fa10af9d7c09aa109bcbd619f0439f5
|
/gulimall-product/src/main/java/com/sjl/gulimall/product/app/BrandController.java
|
25352c97684b053f0a1afe7c0a49637a744ca4ff
|
[
"Apache-2.0"
] |
permissive
|
Lijun-Zhang/gulimall
|
f05aa2f05484c34ea465a7af415d5f2e06e4ceb0
|
b56cfb2cc4797ffd828be5e6afa91ca2ae8d89b4
|
refs/heads/master
| 2023-07-18T20:21:47.999050
| 2020-05-27T15:59:48
| 2020-05-27T15:59:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,433
|
java
|
package com.sjl.gulimall.product.app;
import com.sjl.common.utils.PageUtils;
import com.sjl.common.utils.R;
import com.sjl.common.valid.SaveGroup;
import com.sjl.common.valid.UpdateGroup;
import com.sjl.common.valid.UpdateStatusGroup;
import com.sjl.gulimall.product.entity.BrandEntity;
import com.sjl.gulimall.product.service.BrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.Map;
/**
* 品牌
*
* @author songjilong
* @email 2606587750@qq.com
* @date 2020-04-01 23:18:20
*/
@RestController
@RequestMapping("product/brand")
public class BrandController {
@Autowired
private BrandService brandService;
/**
* 列表
*/
@RequestMapping("/list")
//@RequiresPermissions("product:brand:list")
public R list(@RequestParam Map<String, Object> params) {
PageUtils page = brandService.queryPage(params);
return R.ok().put("page", page);
}
/**
* 信息
*/
@RequestMapping("/info/{brandId}")
//@RequiresPermissions("product:brand:info")
public R info(@PathVariable("brandId") Long brandId) {
BrandEntity brand = brandService.getById(brandId);
return R.ok().put("brand", brand);
}
/**
* 保存
*/
@RequestMapping("/save")
//@RequiresPermissions("product:brand:save")
public R save(@Validated(SaveGroup.class) @RequestBody BrandEntity brand) {
brandService.save(brand);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
//@RequiresPermissions("product:brand:update")
public R update(@Validated(UpdateGroup.class) @RequestBody BrandEntity brand) {
brandService.updateDetail(brand);
return R.ok();
}
/**
* 修改状态
*/
@RequestMapping("/update/status")
//@RequiresPermissions("product:brand:update")
public R updateStatus(@Validated(UpdateStatusGroup.class) @RequestBody BrandEntity brand) {
brandService.updateById(brand);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
//@RequiresPermissions("product:brand:delete")
public R delete(@RequestBody Long[] brandIds) {
brandService.removeByIds(Arrays.asList(brandIds));
return R.ok();
}
}
|
[
"2606587750@qq.com"
] |
2606587750@qq.com
|
0b6259ca9018465e84f14b95e5a671aa8d668540
|
8191bea395f0e97835735d1ab6e859db3a7f8a99
|
/f737922a0ddc9335bb0fc2f3ae5ffe93_source_from_JADX/com/google/android/gms/internal/du.java
|
2e9d77d54878c9643ea6bcdf4a27c081a5093568
|
[] |
no_license
|
msmtmsmt123/jadx-1
|
5e5aea319e094b5d09c66e0fdb31f10a3238346c
|
b9458bb1a49a8a7fba8b9f9a6fb6f54438ce03a2
|
refs/heads/master
| 2021-05-08T19:21:27.870459
| 2017-01-28T04:19:54
| 2017-01-28T04:19:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,613
|
java
|
package com.google.android.gms.internal;
import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import com.aide.uidesigner.ProxyTextView;
public interface du extends IInterface {
public static abstract class a extends Binder implements du {
private static class a implements du {
private IBinder j6;
a(IBinder iBinder) {
this.j6 = iBinder;
}
public IBinder asBinder() {
return this.j6;
}
public void j6(dt dtVar) {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken("com.google.android.gms.ads.internal.purchase.client.IInAppPurchaseListener");
obtain.writeStrongBinder(dtVar != null ? dtVar.asBinder() : null);
this.j6.transact(1, obtain, obtain2, 0);
obtain2.readException();
} finally {
obtain2.recycle();
obtain.recycle();
}
}
}
public a() {
attachInterface(this, "com.google.android.gms.ads.internal.purchase.client.IInAppPurchaseListener");
}
public static du j6(IBinder iBinder) {
if (iBinder == null) {
return null;
}
IInterface queryLocalInterface = iBinder.queryLocalInterface("com.google.android.gms.ads.internal.purchase.client.IInAppPurchaseListener");
return (queryLocalInterface == null || !(queryLocalInterface instanceof du)) ? new a(iBinder) : (du) queryLocalInterface;
}
public IBinder asBinder() {
return this;
}
public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) {
switch (i) {
case ProxyTextView.TYPEFACE_SANS /*1*/:
parcel.enforceInterface("com.google.android.gms.ads.internal.purchase.client.IInAppPurchaseListener");
j6(com.google.android.gms.internal.dt.a.j6(parcel.readStrongBinder()));
parcel2.writeNoException();
return true;
case 1598968902:
parcel2.writeString("com.google.android.gms.ads.internal.purchase.client.IInAppPurchaseListener");
return true;
default:
return super.onTransact(i, parcel, parcel2, i2);
}
}
}
void j6(dt dtVar);
}
|
[
"eggfly@qq.com"
] |
eggfly@qq.com
|
dff399dfbe1bb8054e2c1c42d2afab7d2263561a
|
81b0bb3cfb2e9501f53451e7f03ec072ee2b0e13
|
/src/me/lyft/android/application/payment/InvalidPayPalException.java
|
6c0858e92611cc24c8473ef9acb23419728f012b
|
[] |
no_license
|
reverseengineeringer/me.lyft.android
|
48bb85e8693ce4dab50185424d2ec51debf5c243
|
8c26caeeb54ffbde0711d3ce8b187480d84968ef
|
refs/heads/master
| 2021-01-19T02:32:03.752176
| 2016-07-19T16:30:00
| 2016-07-19T16:30:00
| 63,710,356
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 436
|
java
|
package me.lyft.android.application.payment;
public class InvalidPayPalException
extends PaymentException
{
public InvalidPayPalException(String paramString1, Throwable paramThrowable, String paramString2)
{
super(paramString1, paramThrowable, paramString2);
}
}
/* Location:
* Qualified Name: me.lyft.android.application.payment.InvalidPayPalException
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
36b7df189e79f7899a68620f78fce88d4ae2adc0
|
bbfa56cfc81b7145553de55829ca92f3a97fce87
|
/plugins/org.ifc4emf.metamodel.ifc/src/IFC2X3/IfcCurveBoundedPlane.java
|
02aaef79189e8cedf7842432d2af37add7cf172d
|
[] |
no_license
|
patins1/raas4emf
|
9e24517d786a1225344a97344777f717a568fdbe
|
33395d018bc7ad17a0576033779dbdf70fa8f090
|
refs/heads/master
| 2021-08-16T00:27:12.859374
| 2021-07-30T13:01:48
| 2021-07-30T13:01:48
| 87,889,951
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,375
|
java
|
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package IFC2X3;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.eclipse.emf.common.util.EList;
import IFC2X3.jaxb.IfcCurveBoundedPlaneImplAdapter;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Ifc Curve Bounded Plane</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link IFC2X3.IfcCurveBoundedPlane#getBasisSurface <em>Basis Surface</em>}</li>
* <li>{@link IFC2X3.IfcCurveBoundedPlane#getOuterBoundary <em>Outer Boundary</em>}</li>
* <li>{@link IFC2X3.IfcCurveBoundedPlane#getInnerBoundaries <em>Inner Boundaries</em>}</li>
* </ul>
* </p>
*
* @see IFC2X3.IFC2X3Package#getIfcCurveBoundedPlane()
* @model
* @generated
*/
@XmlJavaTypeAdapter(IfcCurveBoundedPlaneImplAdapter.class)
public interface IfcCurveBoundedPlane extends IfcBoundedSurface {
/**
* Returns the value of the '<em><b>Outer Boundary</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Outer Boundary</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Outer Boundary</em>' reference.
* @see #setOuterBoundary(IfcCurve)
* @see IFC2X3.IFC2X3Package#getIfcCurveBoundedPlane_OuterBoundary()
* @model required="true"
* @generated
*/
IfcCurve getOuterBoundary();
/**
* Sets the value of the '{@link IFC2X3.IfcCurveBoundedPlane#getOuterBoundary <em>Outer Boundary</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Outer Boundary</em>' reference.
* @see #getOuterBoundary()
* @generated
*/
void setOuterBoundary(IfcCurve value);
/**
* Returns the value of the '<em><b>Inner Boundaries</b></em>' reference list.
* The list contents are of type {@link IFC2X3.IfcCurve}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Inner Boundaries</em>' reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Inner Boundaries</em>' reference list.
* @see IFC2X3.IFC2X3Package#getIfcCurveBoundedPlane_InnerBoundaries()
* @model ordered="false"
* @generated
*/
EList<IfcCurve> getInnerBoundaries();
/**
* Returns the value of the '<em><b>Basis Surface</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Basis Surface</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Basis Surface</em>' reference.
* @see #setBasisSurface(IfcPlane)
* @see IFC2X3.IFC2X3Package#getIfcCurveBoundedPlane_BasisSurface()
* @model required="true"
* @generated
*/
IfcPlane getBasisSurface();
/**
* Sets the value of the '{@link IFC2X3.IfcCurveBoundedPlane#getBasisSurface <em>Basis Surface</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Basis Surface</em>' reference.
* @see #getBasisSurface()
* @generated
*/
void setBasisSurface(IfcPlane value);
} // IfcCurveBoundedPlane
|
[
"patins@f81cfaeb-dc96-476f-bd6d-b0d16e38694e"
] |
patins@f81cfaeb-dc96-476f-bd6d-b0d16e38694e
|
b1029932020804b484d7fb8c7d128082a0ab60af
|
32f38cd53372ba374c6dab6cc27af78f0a1b0190
|
/app/src/main/java/defpackage/cml.java
|
a9b6f2637fca75be4c845d59c852e2f59f0d5e6d
|
[
"BSD-3-Clause"
] |
permissive
|
shuixi2013/AmapCode
|
9ea7aefb42e0413f348f238f0721c93245f4eac6
|
1a3a8d4dddfcc5439df8df570000cca12b15186a
|
refs/heads/master
| 2023-06-06T23:08:57.391040
| 2019-08-29T04:36:02
| 2019-08-29T04:36:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,349
|
java
|
package defpackage;
import android.graphics.PointF;
/* renamed from: cml reason: default package */
/* compiled from: CubicBezier */
public abstract class cml {
private PointF a;
private PointF b;
private PointF c = new PointF();
private PointF d = new PointF();
private PointF e = new PointF();
public final void a(float f, float f2, float f3, float f4) {
this.a = new PointF(f, f2);
this.b = new PointF(f3, f4);
}
public final void a(double d2, double d3, double d4, double d5) {
a((float) d2, (float) d3, (float) d4, (float) d5);
}
public float a(float f) {
float f2 = f;
for (int i = 1; i < 14; i++) {
this.e.x = this.a.x * 3.0f;
this.d.x = ((this.b.x - this.a.x) * 3.0f) - this.e.x;
this.c.x = (1.0f - this.e.x) - this.d.x;
float f3 = ((this.e.x + ((this.d.x + (this.c.x * f2)) * f2)) * f2) - f;
if (((double) Math.abs(f3)) < 0.001d) {
break;
}
f2 -= f3 / (this.e.x + (((this.d.x * 2.0f) + ((this.c.x * 3.0f) * f2)) * f2));
}
this.e.y = this.a.y * 3.0f;
this.d.y = ((this.b.y - this.a.y) * 3.0f) - this.e.y;
this.c.y = (1.0f - this.e.y) - this.d.y;
return f2 * (this.e.y + ((this.d.y + (this.c.y * f2)) * f2));
}
}
|
[
"hubert.yang@nf-3.com"
] |
hubert.yang@nf-3.com
|
5a7534345a16fe8969584ce7e229ae25a975cc08
|
42b7fdcaac759d4268376c87b453c862536391cb
|
/devlib/src/main/java/com/zxzx74147/devlib/utils/TimeUtil.java
|
ed01f76862eb30aa947a8cf234a49d8fd28ed09f
|
[] |
no_license
|
zxzx74147/ChartTest
|
ad59115ac6b8d39cbbe875f9ddab86e8d1caad52
|
4929e3912bff0377a85e67ff1972c69d9a3d34fc
|
refs/heads/master
| 2021-04-27T15:22:54.215769
| 2018-03-27T16:04:37
| 2018-03-27T16:04:37
| 122,468,615
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,687
|
java
|
package com.zxzx74147.devlib.utils;
import android.text.TextUtils;
import com.zxzx74147.devlib.DevLib;
import com.zxzx74147.devlib.R;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
/**
* Created by zhengxin on 2018/2/20.
*/
public class TimeUtil {
private static SimpleDateFormat HHMM = new SimpleDateFormat("HH:mm");
private static HashMap<String, SimpleDateFormat> mTimeHash = new HashMap<>();
public static String getHHMMTime(int time) {
Date nowTime = new Date(time * 1000);
return HHMM.format(nowTime);
}
public static SimpleDateFormat getSampleFormat(String format) {
if (!mTimeHash.containsKey(format)) {
mTimeHash.put(format, new SimpleDateFormat(format));
}
return mTimeHash.get(format);
}
public static String reformatTime(String input, String formatInput, String formatOutput) {
SimpleDateFormat inputDateFormat = getSampleFormat(formatInput);
SimpleDateFormat outDateFormat = getSampleFormat(formatOutput);
try {
Date date = inputDateFormat.parse(input);
return outDateFormat.format(date);
} catch (ParseException e) {
e.printStackTrace();
}
return null;
}
public static String reformatDefaultTime(String input, String formatOutput) {
if(TextUtils.isEmpty(formatOutput)||TextUtils.isEmpty(input)){
return "";
}
SimpleDateFormat inputDateFormat = getSampleFormat(DevLib.getApp().getResources().getString(R.string.format_input));
SimpleDateFormat outDateFormat = getSampleFormat(formatOutput);
try {
Date date = inputDateFormat.parse(input);
return outDateFormat.format(date);
} catch (ParseException e) {
e.printStackTrace();
}
return "";
}
public static String parserIntTime(long time, String formatOutput) {
SimpleDateFormat outDateFormat = getSampleFormat(formatOutput);
time*=1000;
Date date = new Date(time);
long now = new Date().getTime();
if(now-time<60*1000){
return DevLib.getApp().getString(R.string.just_now);
}
return outDateFormat.format(date);
}
public static String parserIntTimeWithDay(long time) {
time*=1000;
Date date = new Date(time);
long now = new Date().getTime();
if(now-time<60*1000){
return DevLib.getApp().getString(R.string.just_now);
}
return FormatUtil.formatWithDay(date);
// return outDateFormat.format(date);
}
}
|
[
"zxzx25952@gmail.com"
] |
zxzx25952@gmail.com
|
162f68427380eb83f3244dacf9ea5b98293ba219
|
0721305fd9b1c643a7687b6382dccc56a82a2dad
|
/src/app.zenly.locator_4.8.0_base_source_from_JADX/sources/p214e/p215a/C7527g.java
|
76cecc972f0c37804847880a537b5d0b195d31b8
|
[] |
no_license
|
a2en/Zenly_re
|
09c635ad886c8285f70a8292ae4f74167a4ad620
|
f87af0c2dd0bc14fd772c69d5bc70cd8aa727516
|
refs/heads/master
| 2020-12-13T17:07:11.442473
| 2020-01-17T04:32:44
| 2020-01-17T04:32:44
| 234,470,083
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,811
|
java
|
package p214e.p215a;
/* renamed from: e.a.g */
public final class C7527g {
public static final int abc_action_bar_title_item = 2131623947;
public static final int abc_action_bar_up_container = 2131623948;
public static final int abc_action_menu_item_layout = 2131623949;
public static final int abc_action_menu_layout = 2131623950;
public static final int abc_action_mode_bar = 2131623951;
public static final int abc_action_mode_close_item_material = 2131623952;
public static final int abc_activity_chooser_view = 2131623953;
public static final int abc_activity_chooser_view_list_item = 2131623954;
public static final int abc_alert_dialog_button_bar_material = 2131623955;
public static final int abc_alert_dialog_material = 2131623956;
public static final int abc_alert_dialog_title_material = 2131623957;
public static final int abc_cascading_menu_item_layout = 2131623958;
public static final int abc_dialog_title_material = 2131623959;
public static final int abc_expanded_menu_layout = 2131623960;
public static final int abc_list_menu_item_checkbox = 2131623961;
public static final int abc_list_menu_item_icon = 2131623962;
public static final int abc_list_menu_item_layout = 2131623963;
public static final int abc_list_menu_item_radio = 2131623964;
public static final int abc_popup_menu_header_item_layout = 2131623965;
public static final int abc_popup_menu_item_layout = 2131623966;
public static final int abc_screen_content_include = 2131623967;
public static final int abc_screen_simple = 2131623968;
public static final int abc_screen_simple_overlay_action_mode = 2131623969;
public static final int abc_screen_toolbar = 2131623970;
public static final int abc_search_dropdown_item_icons_2line = 2131623971;
public static final int abc_search_view = 2131623972;
public static final int abc_select_dialog_material = 2131623973;
public static final int abc_tooltip = 2131623974;
public static final int custom_dialog = 2131624093;
public static final int notification_action = 2131624290;
public static final int notification_action_tombstone = 2131624291;
public static final int notification_template_custom_big = 2131624299;
public static final int notification_template_icon_group = 2131624300;
public static final int notification_template_part_chronometer = 2131624304;
public static final int notification_template_part_time = 2131624305;
public static final int select_dialog_item_material = 2131624316;
public static final int select_dialog_multichoice_material = 2131624317;
public static final int select_dialog_singlechoice_material = 2131624318;
public static final int support_simple_spinner_dropdown_item = 2131624321;
}
|
[
"developer@appzoc.com"
] |
developer@appzoc.com
|
9b8afdbea2c0e1d85f307815a8e850caff33ad91
|
a8eb13e507d8c3c0bbf515dc757dd12d5b86c6c1
|
/conductivity/src/main/java/com/aimxcel/abclearn/conductivity/Photon.java
|
fd7f05b3f539e4dc86189d7edacec49c56907127
|
[] |
no_license
|
venkat-thota/java-simulations
|
41bb30375c1a2dedff1e1d64fade90c0ab2eac6a
|
d4c94d9cc84c9ee57c7b541843f8235352726f5e
|
refs/heads/master
| 2020-12-04T01:33:55.211161
| 2020-01-24T16:26:12
| 2020-01-24T16:26:12
| 231,548,090
| 0
| 0
| null | 2020-10-13T18:37:51
| 2020-01-03T08:47:26
|
Java
|
UTF-8
|
Java
| false
| false
| 1,502
|
java
|
package com.aimxcel.abclearn.conductivity;
import com.aimxcel.abclearn.conductivity.common.Particle;
import com.aimxcel.abclearn.common.aimxcelcommon.math.vector.AbstractVector2D;
import com.aimxcel.abclearn.common.aimxcelcommon.math.vector.MutableVector2D;
import com.aimxcel.abclearn.common.aimxcelcommon.math.vector.Vector2D;
import com.aimxcel.abclearn.common.aimxcelcommon.model.ModelElement;
import com.aimxcel.abclearn.common.aimxcelcommon.util.SimpleObservable;
public class Photon extends SimpleObservable
implements ModelElement {
public Photon() {
particle = new Particle( 0.0D, 0.0D );
}
public void setPosition( double d, double d1 ) {
particle.setPosition( d, d1 );
notifyObservers();
}
public void setVelocity( Vector2D aimxcelvector ) {
particle.setVelocity( aimxcelvector.getX(), aimxcelvector.getY() );
notifyObservers();
}
public AbstractVector2D getPosition() {
return particle.getPosition();
}
public void stepInTime( double d ) {
particle.setAcceleration( 0.0D, 0.0D );
particle.stepInTime( d );
notifyObservers();
}
public void setPosition( MutableVector2D aimxcelvector ) {
setPosition( aimxcelvector.getX(), aimxcelvector.getY() );
}
public AbstractVector2D getVelocity() {
return particle.getVelocity();
}
public double getSpeed() {
return getVelocity().magnitude();
}
Particle particle;
}
|
[
"59469892+venkat-thota@users.noreply.github.com"
] |
59469892+venkat-thota@users.noreply.github.com
|
fc0c87f3a03ef741f2a4e5294768c8d5c76f5e01
|
4602c35d3ea28a4dd33af8c7cb6c09568b596629
|
/app/src/main/java/cn/nostra13/universalimageloader/cache/disc/impl/LimitedAgeDiskCache.java
|
4a301e7cfa55a83cc82c13819ea2334d01402f88
|
[] |
no_license
|
sengeiou/qixing_app
|
62a18e7f9ab01df705798acf6aad9654a041923d
|
91b744421cabf60d8a966aac900a93dcddd0ea60
|
refs/heads/master
| 2023-01-01T14:12:40.853065
| 2019-02-13T01:37:49
| 2019-02-13T01:37:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,403
|
java
|
/*******************************************************************************
* Copyright 2011-2014 Sergey Tarasevich
*
* 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 cn.nostra13.universalimageloader.cache.disc.impl;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import android.graphics.Bitmap;
import cn.nostra13.universalimageloader.cache.disc.naming.FileNameGenerator;
import cn.nostra13.universalimageloader.core.DefaultConfigurationFactory;
import cn.nostra13.universalimageloader.utils.IoUtils;
/**
* Cache which deletes files which were loaded more than defined time. Cache size is unlimited.
*
* @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
* @since 1.3.1
*/
public class LimitedAgeDiskCache extends BaseDiskCache {
private final long maxFileAge;
private final Map<File, Long> loadingDates = Collections.synchronizedMap(new HashMap<File, Long>());
/**
* @param cacheDir Directory for file caching
* @param maxAge Max file age (in seconds). If file age will exceed this value then it'll be removed on next
* treatment (and therefore be reloaded).
*/
public LimitedAgeDiskCache(File cacheDir, long maxAge) {
this(cacheDir, null, DefaultConfigurationFactory.createFileNameGenerator(), maxAge);
}
/**
* @param cacheDir Directory for file caching
* @param maxAge Max file age (in seconds). If file age will exceed this value then it'll be removed on next
* treatment (and therefore be reloaded).
*/
public LimitedAgeDiskCache(File cacheDir, File reserveCacheDir, long maxAge) {
this(cacheDir, reserveCacheDir, DefaultConfigurationFactory.createFileNameGenerator(), maxAge);
}
/**
* @param cacheDir Directory for file caching
* @param reserveCacheDir null-ok; Reserve directory for file caching. It's used when the primary directory isn't available.
* @param fileNameGenerator Name generator for cached files
* @param maxAge Max file age (in seconds). If file age will exceed this value then it'll be removed on next
* treatment (and therefore be reloaded).
*/
public LimitedAgeDiskCache(File cacheDir, File reserveCacheDir, FileNameGenerator fileNameGenerator, long maxAge) {
super(cacheDir, reserveCacheDir, fileNameGenerator);
this.maxFileAge = maxAge * 1000; // to milliseconds
}
@Override
public File get(String imageUri) {
File file = super.get(imageUri);
if (file != null && file.exists()) {
boolean cached;
Long loadingDate = loadingDates.get(file);
if (loadingDate == null) {
cached = false;
loadingDate = file.lastModified();
} else {
cached = true;
}
if (System.currentTimeMillis() - loadingDate > maxFileAge) {
file.delete();
loadingDates.remove(file);
} else if (!cached) {
loadingDates.put(file, loadingDate);
}
}
return file;
}
@Override
public boolean save(String imageUri, InputStream imageStream, IoUtils.CopyListener listener) throws IOException {
boolean saved = super.save(imageUri, imageStream, listener);
rememberUsage(imageUri);
return saved;
}
@Override
public boolean save(String imageUri, Bitmap bitmap) throws IOException {
boolean saved = super.save(imageUri, bitmap);
rememberUsage(imageUri);
return saved;
}
@Override
public boolean remove(String imageUri) {
loadingDates.remove(getFile(imageUri));
return super.remove(imageUri);
}
@Override
public void clear() {
super.clear();
loadingDates.clear();
}
private void rememberUsage(String imageUri) {
File file = getFile(imageUri);
long currentTime = System.currentTimeMillis();
file.setLastModified(currentTime);
loadingDates.put(file, currentTime);
}
}
|
[
"y6692@126.com"
] |
y6692@126.com
|
5358f6e1eaf2dd4d382857d6e42e28b66fac49da
|
6f28ba66909fa293d9058eb033e1694b4ec97eb0
|
/smartenv-system/smartenv-system-service/src/main/java/com/ai/apac/smartenv/system/controller/TopMenuController.java
|
ae7943aed34b36194be4abff04b33c59643af7b5
|
[] |
no_license
|
fangxunqing/smart-env
|
01870c01ceb8141787652585b7bf3738a3498641
|
99665cb17c8f7b96f1f6d29223d26a08b5b05d8a
|
refs/heads/main
| 2023-04-26T17:55:03.072112
| 2021-05-25T03:29:15
| 2021-05-25T03:29:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,575
|
java
|
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.ai.apac.smartenv.system.controller;
import com.ai.apac.smartenv.system.entity.TopMenu;
import com.ai.apac.smartenv.system.service.ITopMenuService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.cache.utils.CacheUtil;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.annotation.PreAuth;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.constant.RoleConstant;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import static org.springblade.core.cache.constant.CacheConstant.MENU_CACHE;
import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE;
/**
* 顶部菜单表 控制器
*
* @author BladeX
* @since 2019-07-14
*/
@RestController
@AllArgsConstructor
@RequestMapping("/topmenu")
@Api(value = "顶部菜单表", tags = "顶部菜单")
@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
public class TopMenuController extends BladeController {
private ITopMenuService topMenuService;
/**
* 详情
*/
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入topMenu")
public R<TopMenu> detail(TopMenu topMenu) {
TopMenu detail = topMenuService.getOne(Condition.getQueryWrapper(topMenu));
return R.data(detail);
}
/**
* 分页 顶部菜单表
*/
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入topMenu")
public R<IPage<TopMenu>> list(TopMenu topMenu, Query query) {
IPage<TopMenu> pages = topMenuService.page(Condition.getPage(query), Condition.getQueryWrapper(topMenu));
return R.data(pages);
}
/**
* 新增 顶部菜单表
*/
@PostMapping("/save")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入topMenu")
public R save(@Valid @RequestBody TopMenu topMenu) {
return R.status(topMenuService.save(topMenu));
}
/**
* 修改 顶部菜单表
*/
@PostMapping("/update")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入topMenu")
public R update(@Valid @RequestBody TopMenu topMenu) {
return R.status(topMenuService.updateById(topMenu));
}
/**
* 新增或修改 顶部菜单表
*/
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入topMenu")
public R submit(@Valid @RequestBody TopMenu topMenu) {
return R.status(topMenuService.saveOrUpdate(topMenu));
}
/**
* 删除 顶部菜单表
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(topMenuService.deleteLogic(Func.toLongList(ids)));
}
/**
* 设置顶部菜单
*/
@PostMapping("/grant")
@ApiOperationSupport(order = 8)
@ApiOperation(value = "顶部菜单配置", notes = "传入topMenuId集合以及menuId集合")
public R grant(@ApiParam(value = "topMenuId集合", required = true) @RequestParam String topMenuIds,
@ApiParam(value = "menuId集合", required = true) @RequestParam String menuIds) {
boolean temp = topMenuService.grant(Func.toLongList(topMenuIds), Func.toLongList(menuIds));
CacheUtil.clear(SYS_CACHE);
CacheUtil.clear(MENU_CACHE);
return R.status(temp);
}
}
|
[
"15251810316@163.com"
] |
15251810316@163.com
|
d80bf2b47af8000f349eaa78461f622f112faecc
|
1ec73a5c02e356b83a7b867580a02b0803316f0a
|
/java/bj/JavaAlgorithm/basic/P5/P5_1.java
|
50ddd9fba3b7d9acdcbef632947bdc2979648db2
|
[] |
no_license
|
jxsd0084/JavaTrick
|
f2ee8ae77638b5b7654c3fcf9bceea0db4626a90
|
0bb835fdac3c2f6d1a29d1e6e479b553099ece35
|
refs/heads/master
| 2021-01-20T18:54:37.322832
| 2016-06-09T03:22:51
| 2016-06-09T03:22:51
| 60,308,161
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,258
|
java
|
package bj.JavaAlgorithm.basic.P5;
import java.util.Scanner;
public class P5_1 {
static final int N = 15;
//顺序查找函数
static int searchFun( int a[], int n, int x ) {
int i, f = - 1;
for ( i = 0; i < n; i++ ) {
if ( x == a[ i ] ) {
f = i;
break; //退出
}
}
return f;
}
public static void main( String[] args ) {
int x, n, i;
int[] shuzu = new int[ N ];
for ( i = 0; i < N; i++ ) {
shuzu[ i ] = (int) ( 100 + Math.random() * ( 100 + 1 ) );
; //产生数组
}
System.out.print( "顺序查找算法演示!\n" );
System.out.print( "数据序列:\n" );
for ( i = 0; i < N; i++ ) {
System.out.print( " " + shuzu[ i ] ); //输出序列
}
System.out.print( "\n\n" );
System.out.print( "输入要查找的数:" );
Scanner input = new Scanner( System.in );
x = input.nextInt(); //输入要查找的数
n = searchFun( shuzu, N, x ); //查找
if ( n < 0 ) //输出查找结果
{
System.out.println( "没找到数据:" + x );
} else {
System.out.println( "数据:" + x + " 位于数组的第" + ( n + 1 ) + " 个元素处。" );
}
}
}
|
[
"chenlong88882001@163.com"
] |
chenlong88882001@163.com
|
864769e4370d3265e26e1c12622142861f2824da
|
6f5dfd01cc5dfe156f86c37f38abb9f9333a67bc
|
/Design Patterns/src/commandPattern/CommandPatternDemo.java
|
78c64c5fc5d993beb1bbf6163c960aa78c388394
|
[] |
no_license
|
Cvqtko/Design-Patterns
|
371722edbeea775c4f532c7b2db112a25f943844
|
7e45e48e34e88bfe50f10fc29b6e7806db189e52
|
refs/heads/master
| 2020-08-29T12:55:41.939352
| 2019-10-28T12:09:19
| 2019-10-28T12:09:19
| 218,038,052
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 387
|
java
|
package commandPattern;
public class CommandPatternDemo {
public static void main(String[] args) {
Stock abcStock = new Stock();
BuyStock buyStockOrder = new BuyStock(abcStock);
SellStock sellStockOrder = new SellStock(abcStock);
Broker broker = new Broker();
broker.takeOrder(buyStockOrder);
broker.takeOrder(sellStockOrder);
broker.placeOrders();
}
}
|
[
"cvqtkokirilov@gmail.com"
] |
cvqtkokirilov@gmail.com
|
9b1d58b2f22efce14a0adc163a054764691e278a
|
09feac7578002c1cb732b808946d911a17c2d61f
|
/gosu-xml/src/main/java/gw/internal/schema/gw/xsd/w3c/xmlschema/anonymous/attributes/Attribute_Name.java
|
1f3d4a2a26fd5cedc796b8adebb98d2339062773
|
[] |
no_license
|
gosu-lang/gosu-pl
|
56cbb1592f6fc149e5de9905c0747eb4f227a471
|
5db623100b6c8ea6877bdc9f13a4a5e111a58812
|
refs/heads/master
| 2021-01-13T09:45:21.796743
| 2016-12-13T23:11:22
| 2016-12-13T23:11:22
| 69,290,008
| 2
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,310
|
java
|
package gw.internal.schema.gw.xsd.w3c.xmlschema.anonymous.attributes;
/***************************************************************************/
/* THIS IS AUTOGENERATED CODE - DO NOT MODIFY OR YOUR CHANGES WILL BE LOST */
/* THIS CODE CAN BE REGENERATED USING 'xsd-codegen' */
/***************************************************************************/
public class Attribute_Name implements gw.internal.xml.IXmlGeneratedClass {
public static final javax.xml.namespace.QName $QNAME = new javax.xml.namespace.QName( "", "name", "" );
public static final gw.util.concurrent.LockingLazyVar<gw.lang.reflect.IType> TYPE = new gw.util.concurrent.LockingLazyVar<gw.lang.reflect.IType>( gw.lang.reflect.TypeSystem.getGlobalLock() ) {
@Override
protected gw.lang.reflect.IType init() {
return gw.lang.reflect.TypeSystem.getByFullName( "gw.xsd.w3c.xmlschema.anonymous.attributes.Attribute_Name" );
}
};
private Attribute_Name() {
}
public static gw.xml.XmlSimpleValue createSimpleValue( java.lang.String value ) {
//noinspection RedundantArrayCreation
return (gw.xml.XmlSimpleValue) TYPE.get().getTypeInfo().getMethod( "createSimpleValue", gw.lang.reflect.TypeSystem.get( java.lang.String.class ) ).getCallHandler().handleCall( null, new java.lang.Object[] { value } );
}
public static void set( gw.internal.schema.gw.xsd.w3c.xmlschema.types.complex.AnyType anyType, java.lang.String value ) {
//noinspection RedundantArrayCreation
TYPE.get().getTypeInfo().getMethod( "set", gw.lang.reflect.TypeSystem.get( gw.internal.schema.gw.xsd.w3c.xmlschema.types.complex.AnyType.class ), gw.lang.reflect.TypeSystem.get( java.lang.String.class ) ).getCallHandler().handleCall( null, new java.lang.Object[] { anyType, value } );
}
public static void set( gw.xml.XmlElement element, java.lang.String value ) {
//noinspection RedundantArrayCreation
TYPE.get().getTypeInfo().getMethod( "set", gw.lang.reflect.TypeSystem.get( gw.xml.XmlElement.class ), gw.lang.reflect.TypeSystem.get( java.lang.String.class ) ).getCallHandler().handleCall( null, new java.lang.Object[] { element, value } );
}
@SuppressWarnings( {"UnusedDeclaration"} )
private static final long FINGERPRINT = 2110283714877373226L;
}
|
[
"rsmckinney@hotmail.com"
] |
rsmckinney@hotmail.com
|
46432d710ac936bf52ee335e9925fd697a96becf
|
39a7c22ec53d89de7966ef1234eb4c81aea0ee23
|
/zrouter-api/src/main/java/com/mcxtzhang/zrouter/ZRouterManager.java
|
e773fd50cc554250959042a9633d4f673c3e239e
|
[
"Apache-2.0"
] |
permissive
|
mcxtzhang/ModularizationDemo
|
4c02974e41e3bbf988dc592e96120a9240f9a892
|
27b796b7f75ebccfac2fdd571f5bf45ce30bfd76
|
refs/heads/master
| 2021-01-12T10:21:39.396659
| 2018-07-17T08:32:43
| 2018-07-17T08:32:43
| 76,433,126
| 6
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,247
|
java
|
package com.mcxtzhang.zrouter;
import android.app.Activity;
import android.content.ComponentName;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import com.mctzhang.zrouter.ZRouterRecord;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Intro: 路由跳转管理类
* Author: zhangxutong
* E-mail: mcxtzhang@163.com
* Home Page: http://blog.csdn.net/zxt0601
* Created: 2017/3/9.
* History:
*/
public class ZRouterManager {
private static final String TAG = "zxt/ZRouterManager";
private static Map<String, ZRouterRecord> routerMap = new HashMap<>();
public static void addRule(String pagePath, ZRouterRecord record) {
routerMap.put(pagePath, record);
}
private static void initRouterMap() {
if (routerMap.isEmpty()) {
ZRouterRules.init();
}
}
public static void jump(Activity activity, String where, Bundle bundle) {
Intent intent = getJumpIntent(activity, where, bundle);
if (intent != null) {
activity.startActivity(intent);
Log.d(TAG, "Jump success:" + where);
}
}
public static void jump(Activity activity, String where, Bundle bundle, int requestCode) {
Intent intent = getJumpIntent(activity, where, bundle);
if (intent != null) {
activity.startActivityForResult(intent, requestCode);
Log.d(TAG, "Jump success:" + where);
}
}
public static Intent getJumpIntent(Activity activity, String where, Bundle bundle) {
initRouterMap();
ZRouterRecord record = routerMap.get(where);
if (null == record) {
Log.e(TAG, "Error in getJumpIntent() where = [" + where + "] not found in routerMap!");
return null;
}
String clsFullName = record.getClassPath();
if (TextUtils.isEmpty(clsFullName)) {
Log.e(TAG, "Error in getJumpIntent() clsFullName = [" + clsFullName + "] can not be null");
return null;
} else {
if (record.isActivity()) {
Intent intent = new Intent();
intent.setComponent(new ComponentName(activity.getPackageName(), clsFullName));
if (null != bundle) {
intent.putExtras(bundle);
}
PackageManager packageManager = activity.getPackageManager();
List<ResolveInfo> activities = packageManager.queryIntentActivities(intent, 0);
if (!activities.isEmpty()) {
return intent;
} else {
Log.e(TAG, "Error in getJumpIntent() intent = [" + intent + "] not found in PackageManager!");
return null;
}
} else {//is fragment
Intent commonIntent = getJumpIntent(activity, "commonFragmentActivity", bundle);
if (null != commonIntent) {
commonIntent.putExtra("key-fragment-name", clsFullName);
}
return commonIntent;
}
}
}
}
|
[
"zhangxutong@imcoming.cn"
] |
zhangxutong@imcoming.cn
|
e8f6e288f4900afc2c046056d5d314246a9bca4e
|
a0bf3bf5335a5a3c55f41b83223a10c680723703
|
/bc/payment-common/src/main/java/bc/util/jdbc/CommonFunction.java
|
157059783708b67fc0369a1e41bb6f760dfebc2b
|
[] |
no_license
|
cherkavi/social-financial-network
|
24a52b621f284746ca6ef54a89563823a29252ce
|
0587986842ded63d1b5efa188ca2cd5b9454aafa
|
refs/heads/master
| 2022-12-27T00:41:14.251248
| 2020-07-02T22:22:45
| 2020-07-02T22:22:45
| 189,156,588
| 0
| 0
| null | 2022-12-16T01:35:28
| 2019-05-29T05:31:30
|
Java
|
UTF-8
|
Java
| false
| false
| 1,089
|
java
|
package bc.util.jdbc;
import java.sql.Types;
import java.util.Map;
import javax.sql.DataSource;
import org.springframework.jdbc.core.SqlOutParameter;
import org.springframework.jdbc.core.SqlParameter;
import org.springframework.jdbc.object.StoredProcedure;
public class CommonFunction extends StoredProcedure{
private final static String RESULT_POSITIVE="0";
private final static String RESULT_PARAM="result";
protected CommonFunction(DataSource dataSource, String procedureName, SqlParameter ... parameters){
super(dataSource, procedureName);
declareParameter(new SqlOutParameter(RESULT_PARAM, Types.VARCHAR));
if(parameters!=null && parameters.length!=0){
for(SqlParameter eachParameter:parameters){
declareParameter(eachParameter);
}
}
setFunction(true);
compile();
}
/**
* use it in execute method
* @param in
* @return
*/
protected boolean executeAndParseResult(Map<String, Object> in) {
Map<String, Object> out = execute(in);
if (!out.isEmpty())
return RESULT_POSITIVE.equals(out.get(RESULT_PARAM));
else
return false;
}
}
|
[
"technik7job@gmail.com"
] |
technik7job@gmail.com
|
5c02baa36503707cd7f64a277ccd8a297bb9c1b1
|
03fa839049232561fddeb726fb09adaf5bad2f4e
|
/basex-core/src/main/java/org/basex/query/func/fn/FnMinutesFromDateTime.java
|
daa13a1897a8af8fb955c8c2b002b4e99f5b0509
|
[
"BSD-3-Clause"
] |
permissive
|
cuongpd95/basex
|
96791206e7a41537c90b1d2d567238850fd201b3
|
05d975432d78b90946813cd416e78186ab45a8bb
|
refs/heads/master
| 2021-08-30T16:30:17.551857
| 2017-12-18T16:36:28
| 2017-12-18T16:36:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 570
|
java
|
package org.basex.query.func.fn;
import org.basex.query.*;
import org.basex.query.value.item.*;
import org.basex.query.value.type.*;
import org.basex.util.*;
/**
* Function implementation.
*
* @author BaseX Team 2005-17, BSD License
* @author Christian Gruen
*/
public final class FnMinutesFromDateTime extends DateTime {
@Override
public Item item(final QueryContext qc, final InputInfo ii) throws QueryException {
final Item item = exprs[0].atomItem(qc, info);
return item == null ? null : Int.get(checkDate(item, AtomType.DTM, qc).minute());
}
}
|
[
"christian.gruen@gmail.com"
] |
christian.gruen@gmail.com
|
8994ab7fe1e5ba104ef3c8462aa5224b694b96ab
|
32072bf80206f033f3a65f77d26d86c0478315a9
|
/src/main/java/org/kyojo/schemaOrg/m3n3/doma/core/container/PublisherConverter.java
|
0c713f00d2f9bb07d57ca380a271494de3b7f482
|
[
"Apache-2.0"
] |
permissive
|
covernorgedi/nagoyakaICT
|
76613d014dc70479f4b4364e51e7ba002ba1f5af
|
b375db53216eaa54f9797549a36e7c79f66b44c0
|
refs/heads/master
| 2021-04-09T14:21:23.670598
| 2018-03-20T10:43:37
| 2018-03-20T10:43:37
| 125,742,242
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 558
|
java
|
package org.kyojo.schemaOrg.m3n3.doma.core.container;
import org.seasar.doma.ExternalDomain;
import org.seasar.doma.jdbc.domain.DomainConverter;
import org.kyojo.schemaOrg.m3n3.core.impl.PUBLISHER;
import org.kyojo.schemaOrg.m3n3.core.Container.Publisher;
@ExternalDomain
public class PublisherConverter implements DomainConverter<Publisher, String> {
@Override
public String fromDomainToValue(Publisher domain) {
return domain.getNativeValue();
}
@Override
public Publisher fromValueToDomain(String value) {
return new PUBLISHER(value);
}
}
|
[
"covernorgedi@icloud.com"
] |
covernorgedi@icloud.com
|
a92ea0299db57dea02e75b8c7d6f3887ce9b136b
|
76484b9aa0c0d8eb30a76f01214a8c0540ab87ba
|
/web/src/main/java/com/zrlog/web/handler/ResponseRenderPrintWriter.java
|
ea00ec1c15fca2fd3ca2fa692a3fdcaba05c2932
|
[
"Apache-2.0"
] |
permissive
|
Wangwang12345/test-java
|
352fea81ffed58e2af2b80fc506156356fa97ab1
|
6a30cb51d4fcf389410bb8b2656bce3273e1d4be
|
refs/heads/master
| 2020-03-10T16:34:29.426507
| 2018-04-14T03:58:24
| 2018-04-14T03:58:24
| 129,477,218
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,905
|
java
|
package com.zrlog.web.handler;
import com.googlecode.htmlcompressor.compressor.HtmlCompressor;
import com.hibegin.common.util.IOUtil;
import com.hibegin.common.util.http.handle.CloseResponseHandle;
import com.zrlog.service.CacheService;
import org.htmlcleaner.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
class ResponseRenderPrintWriter extends PrintWriter {
private static final Logger LOGGER = LoggerFactory.getLogger(ResponseRenderPrintWriter.class);
private final StringBuilder builder = new StringBuilder();
private HtmlCompressor compressor = new HtmlCompressor();
private String body;
private boolean compress;
private long startTime = System.currentTimeMillis();
private String baseUrl;
private String endFlag;
private HttpServletRequest request;
public String getResponseBody() {
return body;
}
public boolean isIncludePageEndTag(String str) {
return str.trim().endsWith("</html>") || str.trim().endsWith(endFlag);
}
ResponseRenderPrintWriter(OutputStream out, boolean compress, String baseUrl, String endFlag, HttpServletRequest request) {
super(out);
this.compress = compress;
compressor.setRemoveIntertagSpaces(true);
compressor.setRemoveComments(true);
this.baseUrl = baseUrl;
this.endFlag = endFlag;
this.request = request;
}
private void tryFlush() {
if (isIncludePageEndTag(builder.toString())) {
flush();
}
}
@Override
public void write(int c) {
builder.append((char) c); // It is actually a char, not an int.
tryFlush();
}
@Override
public void write(char[] chars, int offset, int length) {
builder.append(chars, offset, length);
tryFlush();
}
@Override
public void write(String string, int offset, int length) {
builder.append(string, offset, length);
tryFlush();
}
// Finally override the flush method so that it trims whitespace.
@Override
public void flush() {
synchronized (builder) {
try {
body = builder.toString();
boolean includeEndTag = isIncludePageEndTag(body);
if (includeEndTag) {
if (body.endsWith(endFlag)) {
body = body.substring(0, body.length() - endFlag.length());
}
HtmlCleaner htmlCleaner = new HtmlCleaner();
htmlCleaner.getProperties().setUseCdataForScriptAndStyle(false);
TagNode tagNode = htmlCleaner.clean(body);
TagNode[] tagNodes = tagNode.getAllElements(true);
Map<String, String> plugin = new HashMap<>();
for (TagNode tag : tagNodes) {
if (tag != null) {
String tagName = tag.getName();
if ("script".equals(tagName)) {
String src = tag.getAttributeByName("src");
if (src != null) {
tag.setForeignMarkup(true);
Map<String, String> tmp = new LinkedHashMap<>(tag.getAttributes());
tmp.put("src", tryReplace(src));
tag.setAttributes(tmp);
}
}
if ("link".equals(tagName)) {
String src = tag.getAttributeByName("href");
if (src != null) {
tag.setForeignMarkup(true);
Map<String, String> tmp = new LinkedHashMap<>(tag.getAttributes());
tmp.put("href", tryReplace(src));
tag.setAttributes(tmp);
}
}
if ("plugin".equals(tagName) && tag.hasAttribute("name")) {
tag.setForeignMarkup(true);
Map<String, String> tmp = new LinkedHashMap<>(tag.getAttributes());
tmp.put("_tmp", System.currentTimeMillis() + "");
tag.setAttributes(tmp);
SimpleHtmlSerializer serializer = new SimpleHtmlSerializer(htmlCleaner.getProperties());
StringWriter stringWriter = new StringWriter();
tag.serialize(serializer, stringWriter);
String content = stringWriter.toString();
try {
String url = "/" + tag.getAttributeByName("name") + "/" + tag.getAttributeByName("view");
if (tag.hasAttribute("param")) {
url += "?" + tag.getAttributeByName("param");
}
CloseResponseHandle handle = PluginHandler.getContext(url, "GET", request, false);
byte[] bytes = IOUtil.getByteByInputStream(handle.getT().getEntity().getContent());
plugin.put(content, new String(bytes, "UTF-8"));
} catch (Exception e) {
LOGGER.error("", e);
}
}
}
}
SimpleHtmlSerializer serializer = new SimpleHtmlSerializer(htmlCleaner.getProperties());
StringWriter stringWriter = new StringWriter();
tagNode.serialize(serializer, stringWriter);
body = stringWriter.toString();
if (tagNode.getDocType() != null) {
body = tagNode.getDocType() + body;
}
for (Map.Entry<String, String> entry : plugin.entrySet()) {
body = body.replace(entry.getKey(), entry.getValue());
}
}
if (compress) {
body = compressor.compress(body);
}
if (includeEndTag) {
body = body + "<!--" + (System.currentTimeMillis() - startTime) + "ms-->";
}
out.write(body);
// Reset the local StringBuilder and issue real flush.
builder.setLength(0);
super.flush();
} catch (IOException ex) {
LOGGER.error("", ex);
}
}
}
private String tryReplace(String href) {
if (href.startsWith(baseUrl) || href.startsWith("admin/js") || href.startsWith("admin/markdwon") || href.startsWith("assets")) {
String uriPath = href;
if (href.startsWith(baseUrl)) {
uriPath = href.substring(baseUrl.length());
}
if (uriPath.contains("?")) {
uriPath = uriPath.substring(0, uriPath.lastIndexOf("?"));
}
uriPath = "/" + uriPath;
String flag = CacheService.getFileFlag(uriPath);
if (flag != null) {
if (href.contains("?")) {
href = href + "&t=" + flag;
} else {
href = href + "?t=" + flag;
}
}
}
return href;
}
}
|
[
"you@example.com"
] |
you@example.com
|
6e06fdee716e18d5d12eceae971a9472b704ed55
|
333c266e481dadd0deec6a10d355c979a7ec3528
|
/app/src/main/java/cn/com/taodaji/model/entity/SmsCode.java
|
bc9379814d27b4f4833f305da7eff752729c9732
|
[] |
no_license
|
wyh1234/tdj
|
488adaeedd4eac182cc8daa0d81d4c2d28d7eea5
|
6d3f50220cf0043dbce51f44531ad51f1c48a2af
|
refs/heads/master
| 2023-02-20T22:48:24.297098
| 2021-01-18T07:34:45
| 2021-01-18T07:34:45
| 330,588,026
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 560
|
java
|
package cn.com.taodaji.model.entity;
/**
* Created by Administrator on 2017/3/17 0017.
*/
public class SmsCode {
private int err;
private Object data;
private String msg;
public int getErr() {
return err;
}
public void setErr(int err) {
this.err = err;
}
public Object getData() {
return data;
}
public void setData(Object data) {
this.data = data;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
}
|
[
"744478963@qq.com"
] |
744478963@qq.com
|
55e92279d10ddb99f0611136b87a85a45eab6048
|
69db466b12bf8152ed146178a99b3edc909b15a9
|
/tinyos.dlrc.core/src/tinyos/dlrc/ep/parser/standard/ASTModelNode.java
|
e7071e9d3c6340921f48f786f75366b6ee7afc8d
|
[] |
no_license
|
mahmoudimus/dlrc-tinyos-plugin
|
788a575a3cc909b049d4b5b9da9d6370a50eccc9
|
9e1c6e495f7ac15966a1463f66700f7f4b619381
|
refs/heads/master
| 2021-05-29T09:52:46.507638
| 2013-08-22T08:11:57
| 2013-08-22T08:11:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,157
|
java
|
/*
* Dlrc 2, NesC development in Eclipse.
* Copyright (C) 2009 DLRC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Web: http://tos-ide.ethz.ch
* Mail: tos-ide@tik.ee.ethz.ch
*/
package tinyos.dlrc.ep.parser.standard;
import java.util.ArrayList;
import java.util.List;
import tinyos.dlrc.ep.IParseFile;
import tinyos.dlrc.ep.parser.IASTModelNode;
import tinyos.dlrc.ep.parser.IASTModelNodeConnection;
import tinyos.dlrc.ep.parser.IFileRegion;
import tinyos.dlrc.ep.parser.Tag;
import tinyos.dlrc.ep.parser.TagSet;
public class ASTModelNode extends ASTModelLeaf{
private List<IASTModelNodeConnection> children = new ArrayList<IASTModelNodeConnection>();
public ASTModelNode( IASTModelNode parent, String identifier, String name, String label, IParseFile file, IFileRegion[] origin, Tag... tags ){
super( parent, identifier, name, label, file, origin, tags );
}
public ASTModelNode( IASTModelNode parent, String identifier, String name, String label, IParseFile file, IFileRegion[] origin, TagSet tags ){
super( parent, identifier, name, label, file, origin, tags );
}
public void addConnection( IASTModelNodeConnection connection ){
if( connection == null )
throw new IllegalArgumentException( "connection must not be null" );
if( !connection.getPath().equals( getPath() ))
throw new IllegalArgumentException( "connections path must equal this path" );
children.add( connection );
}
public ASTModelNodeConnection addChild( IASTModelNode node ){
return addChild( node.getIdentifier(), node.getLabel(), node.getRegions(), node.getTags() );
}
public ASTModelNodeConnection addChild( String identifier, String label, IFileRegion[] regions, TagSet relation ){
ASTModelNodeConnection connection = new ASTModelNodeConnection( this, false, identifier, label, regions, relation );
children.add( connection );
return connection;
}
public ASTModelNodeConnection addReference( String identifier, String label, IFileRegion[] regions, TagSet relation ){
ASTModelNodeConnection connection = new ASTModelNodeConnection( this, true, identifier, label, regions, relation );
children.add( connection );
return connection;
}
public int getChildrenCount(){
return children.size();
}
@Override
public IASTModelNodeConnection[] getChildren(){
return children.toArray( new IASTModelNodeConnection[ children.size() ] );
}
}
|
[
"heavey@heavey-ThinkPad-T420.(none)"
] |
heavey@heavey-ThinkPad-T420.(none)
|
154e8ab4a81e0195005a43bd3c9022f19a4fcdcc
|
f31a908ba10df4eb5a35d31b1c825c452549ce1c
|
/coco-db/src/main/java/com/luomor/coco/db/util/CouponUserConstant.java
|
9765a24483627ef3753fff64e3002aafae3c4b8c
|
[] |
no_license
|
LittleSogo/spring-boot-coco
|
2b51f446d3038caf5691e739edcda5df8e680f5a
|
4bac775fce2e6df387309b2c304900918225d710
|
refs/heads/master
| 2022-12-17T04:12:43.681936
| 2020-09-10T17:06:41
| 2020-09-10T17:06:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 262
|
java
|
package com.luomor.coco.db.util;
public class CouponUserConstant {
public static final Short STATUS_USABLE = 0;
public static final Short STATUS_USED = 1;
public static final Short STATUS_EXPIRED = 2;
public static final Short STATUS_OUT = 3;
}
|
[
"zhangchunsheng423@gmail.com"
] |
zhangchunsheng423@gmail.com
|
85f71a4fe7c929cdfbf8317311da08c313b4530e
|
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
|
/sources/a7/c/a/a/n/b/a/a.java
|
1b4a0132ef7b9caa6924e1322fa23a195802e24c
|
[] |
no_license
|
Auch-Auch/avito_source
|
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
|
76fdcc5b7e036c57ecc193e790b0582481768cdc
|
refs/heads/master
| 2023-05-06T01:32:43.014668
| 2021-05-25T10:19:22
| 2021-05-25T10:19:22
| 370,650,685
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,324
|
java
|
package a7.c.a.a.n.b.a;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Lambda;
import org.kodein.di.TypeReference;
import org.kodein.di.TypesKt;
import org.kodein.di.bindings.NoArgBindingKodein;
import retrofit2.Retrofit;
import ru.sravni.android.bankproduct.network.chat.IChatApi;
public final class a extends Lambda implements Function1<NoArgBindingKodein<? extends Object>, IChatApi> {
public static final a a = new a();
public a() {
super(1);
}
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1
public IChatApi invoke(NoArgBindingKodein<? extends Object> noArgBindingKodein) {
NoArgBindingKodein<? extends Object> noArgBindingKodein2 = noArgBindingKodein;
Intrinsics.checkParameterIsNotNull(noArgBindingKodein2, "$receiver");
return (IChatApi) ((Retrofit) noArgBindingKodein2.getDkodein().Instance(TypesKt.TT(new TypeReference<Retrofit>() { // from class: ru.sravni.android.bankproduct.network.chat.di.NetworkChatProviderKt$networkChatKodeinModule$1$1$$special$$inlined$instance$1
}), null)).create(IChatApi.class);
}
}
|
[
"auchhunter@gmail.com"
] |
auchhunter@gmail.com
|
2a01d1803da0bed44ee962651108346da048e339
|
fbda80825ff495ef4e0702b447ee1b90c1dbc2f8
|
/src/main/java/com/fishercoder/solutions/SumofTwoIntegers.java
|
ab14068e49233d10722ce7f9554b12764370cad6
|
[
"Apache-2.0"
] |
permissive
|
sebastianljs/Leetcode
|
d39529edc90be45aff6fa4bfaebb905801fe5cb7
|
ae8262a9e91a014969b483373961327ac9484176
|
refs/heads/master
| 2021-01-01T15:37:20.476225
| 2017-07-18T16:19:33
| 2017-07-18T16:19:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 502
|
java
|
package com.fishercoder.solutions;
/**Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -.
Example:
Given a = 1 and b = 2, return 3.*/
public class SumofTwoIntegers {
//This post is very helpful: http://stackoverflow.com/questions/9070937/adding-two-numbers-without-operator-clarification
public int getSum(int a, int b) {
if(b == 0) return a;
int sum = a^b;
int carry = (a&b) << 1;
return getSum(sum, carry);
}
}
|
[
"stevesun@coupang.com"
] |
stevesun@coupang.com
|
ffddbc9b625ea9fc5f2bcb4152553cdc34c5c632
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/api-vs-impl-small/utils/src/main/java/org/gradle/testutils/performancenull_36/Productionnull_3586.java
|
55677fe576476c994f9988e81db7b312b7d457fb
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 590
|
java
|
package org.gradle.testutils.performancenull_36;
public class Productionnull_3586 {
private final String property;
public Productionnull_3586(String param) {
this.property = param;
}
public String getProperty() {
return property;
}
private String prop0;
public String getProp0() {
return prop0;
}
public void setProp0(String value) {
prop0 = value;
}
private String prop1;
public String getProp1() {
return prop1;
}
public void setProp1(String value) {
prop1 = value;
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
2518d8e28941462ec321bf463a1eba2f800706e5
|
f486586fc03e683cc02a0f982cd745a691ec5da6
|
/src/main/java/com/mrporter/pomangam/client/services/email/EmailServiceImpl.java
|
d2b7009ef61954248cd42e221d4c0f24347e8df3
|
[] |
no_license
|
cholnh/pomangam-api
|
718d9d632da1833f654e562beb7b9e17f358a167
|
16a3970eeb1272767205c5bd05d9c3b5117f65a2
|
refs/heads/master
| 2023-04-02T20:46:49.730663
| 2021-04-14T12:49:06
| 2021-04-14T12:49:06
| 183,766,106
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,430
|
java
|
package com.mrporter.pomangam.client.services.email;
import com.mrporter.pomangam._bases.utils.bizm.template.PartnershipEmailTemplate;
import com.mrporter.pomangam.client.domains.email.PartnershipEmailDto;
import com.mrporter.pomangam.client.domains.map.CommonMap;
import com.mrporter.pomangam.client.repositories.email.PartnershipEmailJpaRepository;
import com.mrporter.pomangam.client.services.map.CommonMapServiceImpl;
import lombok.AllArgsConstructor;
import org.springframework.mail.SimpleMailMessage;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
@AllArgsConstructor
public class EmailServiceImpl implements EmailService {
JavaMailSender javaMailSender;
CommonMapServiceImpl commonMapService;
PartnershipEmailJpaRepository partnershipEmailRepo;
public void sendPartnershipEmail(PartnershipEmailDto request) {
// db 저장
partnershipEmailRepo.save(request.toEntity());
// 비즈엠 전송
List<CommonMap> adminPhoneNumbers = commonMapService.findAllByKey("string_phonenumber_partnership_admin");
for(CommonMap adminPhoneNumber : adminPhoneNumbers) {
try {
Map<String, String> data = new HashMap<>();
data.put("name", request.getClientName());
data.put("email", request.getClientEmail());
data.put("contents", request.getContents());
PartnershipEmailTemplate.send(adminPhoneNumber.getValue(), data);
} catch (Exception msgException) {
msgException.printStackTrace();
}
}
// 메일 전송
List<CommonMap> adminMails = commonMapService.findAllByKey("string_email_partnership_admin");
for(CommonMap adminMail : adminMails) {
SimpleMailMessage simpleMessage = new SimpleMailMessage();
simpleMessage.setFrom("contact@poman.kr");
simpleMessage.setTo(adminMail.getValue());
simpleMessage.setSubject("[포만감 제휴문의] " + request.getClientName() + "님 제휴요청 건");
simpleMessage.setText("고객명 : " + request.getClientName() + "\n" + "이메일 : " + request.getClientEmail() + "\n" + "내용 : " + request.getContents());
javaMailSender.send(simpleMessage);
}
}
}
|
[
"cholnh1@naver.com"
] |
cholnh1@naver.com
|
7f9148a2eff7ce80688452eb58ca75933c94d5cd
|
95e944448000c08dd3d6915abb468767c9f29d3c
|
/sources/com/p280ss/android/ugc/aweme/app/services/C23038h.java
|
4c393cac1609b6c4493381b7c5e7d70af5053823
|
[] |
no_license
|
xrealm/tiktok-src
|
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
|
90f305b5f981d39cfb313d75ab231326c9fca597
|
refs/heads/master
| 2022-11-12T06:43:07.401661
| 2020-07-04T20:21:12
| 2020-07-04T20:21:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,531
|
java
|
package com.p280ss.android.ugc.aweme.app.services;
import android.content.Context;
import android.text.TextUtils;
import org.json.JSONException;
import org.json.JSONObject;
/* renamed from: com.ss.android.ugc.aweme.app.services.h */
public class C23038h {
/* renamed from: a */
private static C23038h f60802a;
/* renamed from: b */
private JSONObject f60803b;
private C23038h(Context context) {
String a = m75715a(context, "assets-map/aweme.json");
if (!TextUtils.isEmpty(a)) {
try {
this.f60803b = new JSONObject(a);
} catch (JSONException unused) {
}
}
}
/* renamed from: a */
public static C23038h m75714a(Context context) {
if (f60802a == null) {
synchronized (C23038h.class) {
if (f60802a == null) {
f60802a = new C23038h(context);
}
}
}
return f60802a;
}
/* JADX WARNING: Removed duplicated region for block: B:14:0x0028 A[SYNTHETIC, Splitter:B:14:0x0028] */
/* JADX WARNING: Removed duplicated region for block: B:22:0x002f A[SYNTHETIC, Splitter:B:22:0x002f] */
/* renamed from: a */
/* Code decompiled incorrectly, please refer to instructions dump. */
public static java.lang.String m75715a(android.content.Context r3, java.lang.String r4) {
/*
r0 = 0
android.content.res.AssetManager r3 = r3.getAssets() // Catch:{ IOException -> 0x002c, all -> 0x0024 }
java.io.InputStream r3 = r3.open(r4) // Catch:{ IOException -> 0x002c, all -> 0x0024 }
int r4 = r3.available() // Catch:{ IOException -> 0x002d, all -> 0x0022 }
byte[] r4 = new byte[r4] // Catch:{ IOException -> 0x002d, all -> 0x0022 }
r3.read(r4) // Catch:{ IOException -> 0x002d, all -> 0x0022 }
r3.close() // Catch:{ IOException -> 0x002d, all -> 0x0022 }
java.lang.String r1 = new java.lang.String // Catch:{ IOException -> 0x002d, all -> 0x0022 }
java.lang.String r2 = "utf-8"
r1.<init>(r4, r2) // Catch:{ IOException -> 0x002d, all -> 0x0022 }
if (r3 == 0) goto L_0x0021
r3.close() // Catch:{ IOException -> 0x0021 }
L_0x0021:
return r1
L_0x0022:
r4 = move-exception
goto L_0x0026
L_0x0024:
r4 = move-exception
r3 = r0
L_0x0026:
if (r3 == 0) goto L_0x002b
r3.close() // Catch:{ IOException -> 0x002b }
L_0x002b:
throw r4
L_0x002c:
r3 = r0
L_0x002d:
if (r3 == 0) goto L_0x0032
r3.close() // Catch:{ IOException -> 0x0032 }
L_0x0032:
return r0
*/
throw new UnsupportedOperationException("Method not decompiled: com.p280ss.android.ugc.aweme.app.services.C23038h.m75715a(android.content.Context, java.lang.String):java.lang.String");
}
/* renamed from: a */
public final int mo60009a(String str, int i) {
if (!TextUtils.isEmpty(str) && this.f60803b != null) {
return this.f60803b.optInt(str, 0);
}
return 0;
}
/* renamed from: a */
public final String mo60010a(String str, String str2) {
if (!TextUtils.isEmpty(str) && this.f60803b != null) {
return this.f60803b.optString(str, str2);
}
return null;
}
}
|
[
"65450641+Xyzdesk@users.noreply.github.com"
] |
65450641+Xyzdesk@users.noreply.github.com
|
e9a46b7d26e054454006e78f9d1d5a2b76de73cd
|
17f50463789127d12f63efbb68ee5b41dbe4f3cd
|
/Java8_Demo_project/com/funtional/interfaces/example01/SimpleFuncInterface.java
|
7bd3787740d66a07e18424bcfc273d35ee28fa6b
|
[] |
no_license
|
RogelioDavid/VaquarKhan-Workspace
|
c2caad8b82e858da1cb561a999e718c1474c42ad
|
8cf1a9e38ad8f0af04705eac9477fde66812b702
|
refs/heads/master
| 2021-06-09T15:03:45.882459
| 2017-01-15T00:28:51
| 2017-01-15T00:28:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 335
|
java
|
package com.funtional.interfaces.example01;
@FunctionalInterface
public interface SimpleFuncInterface {
//public void doNothing();
//public void doWntork();
/**
* Note we can not have more then one method if you annotated @FunctionalInterface
* only one abstract method required
*/
public abstract void doWork();
}
|
[
"vaquar.khan@gmail.com"
] |
vaquar.khan@gmail.com
|
ce28405cddbf570f69176f4c26c9c24efb0e071d
|
71a5ff20265c56d7a1703cfb7bd038d9cadf6375
|
/app/src/test/java/qianfeng/menuapplication/ExampleUnitTest.java
|
a387a6e7de0ebe96700db6ff241003aab88c812a
|
[] |
no_license
|
ab673103245/MenuApplication
|
fa17462b32da1ef38b74fcaaf472fde99e82426c
|
e4edeb07ae8a028f8a728aa75185a23a6787ffdb
|
refs/heads/master
| 2021-01-13T09:23:49.666662
| 2016-09-29T11:40:02
| 2016-09-29T11:40:02
| 69,561,589
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 317
|
java
|
package qianfeng.menuapplication;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* To work on unit tests, switch the Test Artifact in the Build Variants view.
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
}
|
[
"673103245@qq.com"
] |
673103245@qq.com
|
66143f51332b02685c6834ea31ce4674b2c1bdee
|
35fa634f113520256544e8e1ada31161760db129
|
/src/chap06/lecture/encapsulation/Car.java
|
cbd5aa09eab7d74fb59fdf74c92c805ea9662ab9
|
[] |
no_license
|
sebaek/java20200602
|
491889dbd5f4736416657713933becdaf14f8afe
|
65a731bd1ce9290e641e28c0c47c2de6ca4dd5c9
|
refs/heads/master
| 2022-11-05T12:37:17.968036
| 2020-06-19T07:37:42
| 2020-06-19T07:37:42
| 268,676,050
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 401
|
java
|
package chap06.lecture.encapsulation;
public class Car {
private String name;
private int speed;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getSpeed() {
return speed;
}
public void setSpeed(int speed) {
this.speed = speed;
}
public void accel() {
speed++;
}
public void breakAction() {
speed = 0;
}
}
|
[
"sebaek@gmail.com"
] |
sebaek@gmail.com
|
48305e89b06a102d56822365af4366763701071b
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/32/32_d7b9602f4f696e183711c757e6a2c3ea203f4cbf/ArrayQueueTest/32_d7b9602f4f696e183711c757e6a2c3ea203f4cbf_ArrayQueueTest_s.java
|
da6bd7520587b13d76603722ae593c0f85c63bbf
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 4,595
|
java
|
//========================================================================
//Copyright 2004-2008 Mort Bay Consulting Pty. Ltd.
//------------------------------------------------------------------------
//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.mortbay.util;
import junit.framework.TestCase;
public class ArrayQueueTest extends TestCase
{
public void testWrap() throws Exception
{
ArrayQueue<String> queue = new ArrayQueue<String>(3,3);
assertEquals(0,queue.size());
for (int i=0;i<10;i++)
{
queue.offer("one");
assertEquals(1,queue.size());
queue.offer("two");
assertEquals(2,queue.size());
queue.offer("three");
assertEquals(3,queue.size());
assertEquals("one",queue.get(0));
assertEquals("two",queue.get(1));
assertEquals("three",queue.get(2));
assertEquals("[one, two, three]",queue.toString());
assertEquals("two",queue.remove(1));
assertEquals(2,queue.size());
assertEquals("one",queue.remove());
assertEquals(1,queue.size());
assertEquals("three",queue.poll());
assertEquals(0,queue.size());
assertEquals(null,queue.poll());
queue.offer("xxx");
queue.offer("xxx");
assertEquals(2,queue.size());
assertEquals("xxx",queue.poll());
assertEquals("xxx",queue.poll());
assertEquals(0,queue.size());
}
}
public void testRemove() throws Exception
{
ArrayQueue<String> queue = new ArrayQueue<String>(3,3);
queue.add("0");
queue.add("x");
for (int i=1;i<100;i++)
{
queue.add(""+i);
queue.add("x");
queue.remove(queue.size()-3);
queue.set(queue.size()-3,queue.get(queue.size()-3)+"!");
}
for (int i=0;i<99;i++)
assertEquals(i+"!",queue.get(i));
}
public void testGrow() throws Exception
{
ArrayQueue<String> queue = new ArrayQueue<String>(3,5);
assertEquals(3,queue.getCapacity());
queue.add("0");
queue.add("a");
queue.add("b");
assertEquals(3,queue.getCapacity());
queue.add("c");
assertEquals(8,queue.getCapacity());
for (int i=0;i<4;i++)
queue.add(""+('d'+i));
assertEquals(8,queue.getCapacity());
for (int i=0;i<4;i++)
queue.poll();
assertEquals(8,queue.getCapacity());
for (int i=0;i<4;i++)
queue.add(""+('d'+i));
assertEquals(8,queue.getCapacity());
for (int i=0;i<4;i++)
queue.poll();
assertEquals(8,queue.getCapacity());
for (int i=0;i<4;i++)
queue.add(""+('d'+i));
assertEquals(8,queue.getCapacity());
queue.add("z");
assertEquals(13,queue.getCapacity());
queue.clear();
assertEquals(13,queue.getCapacity());
for (int i=0;i<12;i++)
queue.add(""+('a'+i));
assertEquals(13,queue.getCapacity());
queue.clear();
assertEquals(13,queue.getCapacity());
for (int i=0;i<12;i++)
queue.add(""+('a'+i));
assertEquals(13,queue.getCapacity());
}
public void testFull() throws Exception
{
ArrayQueue<String> queue = new ArrayQueue<String>(2);
assertTrue(queue.offer("one"));
assertTrue(queue.offer("two"));
assertFalse(queue.offer("three"));
try
{
queue.add("four");
assertTrue(false);
}
catch(Exception e)
{
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
959348b6a377f1e9281273ad5ff5119274626234
|
07405736e7393e446cc99c9744eb14fcd5f3dfe9
|
/src/main/java/org/aeonbits/owner/event/RollbackBatchException.java
|
8e9a27b6d8ce717087633ffd0784daef8328b927
|
[
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
mikeChampagne/owner
|
7e15bfe64e6f4b38a40105db8d21a8e39e57d127
|
70216f401e6df54455d224e280c043e80bd43055
|
refs/heads/master
| 2021-01-18T16:40:20.483873
| 2013-09-18T21:42:26
| 2013-09-18T23:14:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 594
|
java
|
/*
* Copyright (c) 2013, Luigi R. Viggiano
* All rights reserved.
*
* This software is distributable under the BSD license.
* See the terms of the BSD license in the documentation provided with this software.
*/
package org.aeonbits.owner.event;
/**
* Indicates that whole batch of event must be rolled back.
* A batch is intended as a group of operations are executed in a row.
* For instance this happens when the whole list of properties is reloaded or cleared.
*
* @author Luigi R. Viggiano
* @since 1.0.5
*/
public class RollbackBatchException extends RollbackException {
}
|
[
"luigi.viggiano@newinstance.it"
] |
luigi.viggiano@newinstance.it
|
71db1dc3b999903c896214514aa702f7a1c3af95
|
261f7806dc9a6b5d118e01bd1952babf2bb60389
|
/src/main/java/com/walker/jvm/SimpleHeapOOM.java
|
f403b0609af11ab7ba0de021c81b5f19878fed45
|
[] |
no_license
|
walker911/java-jvm
|
07e61078b8f8acbe4945dd9e55ee65641b415b29
|
745c0f9f372bd0753ce62c3ffc0192a296a78a3a
|
refs/heads/master
| 2020-11-28T07:56:07.936792
| 2020-01-05T12:50:42
| 2020-01-05T12:50:42
| 229,749,334
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 413
|
java
|
package com.walker.jvm;
import java.util.ArrayList;
import java.util.List;
/**
* -Xms512m -Xmx512m -XX:+PrintGCDetails -XX:+PrintGCTimeStamps
*
* @author walker
* @date 2020/1/5
*/
public class SimpleHeapOOM {
public static void main(String[] args) {
List<byte[]> list = new ArrayList<>();
for (int i = 0; i < 1024; i++) {
list.add(new byte[1024 * 1024]);
}
}
}
|
[
"qinmu911@163.com"
] |
qinmu911@163.com
|
afcd314c96b3fe12377ba0a79de312f5beed352c
|
a836fb4715396f82f91a919effc644c873e9b8b2
|
/skWeiChatBaidu/src/main/java/com/vkzwbim/chat/ui/dialog/CreateCourseDialog.java
|
ed5225892ce7fc7908b7b813dc380fe757f6a09c
|
[] |
no_license
|
iuvei/zhongixn
|
a4a459cca817a748189efb13f7d8b03ddce0bbf0
|
c3953350d2d30b16361a87ba06cb1d83ef8fc68f
|
refs/heads/master
| 2023-03-17T12:59:11.192586
| 2020-08-13T07:34:43
| 2020-08-13T07:34:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,468
|
java
|
package com.vkzwbim.chat.ui.dialog;
import android.app.Activity;
import android.content.Context;
import android.os.Handler;
import android.text.TextUtils;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import com.vkzwbim.chat.R;
import com.vkzwbim.chat.ui.dialog.base.BaseDialog;
import com.vkzwbim.chat.ui.tool.ButtonColorChange;
import com.vkzwbim.chat.util.ToastUtil;
/**
* Created by Administrator on 2016/4/21.
* 创建课程的提示框
*/
public class CreateCourseDialog extends BaseDialog {
private TextView mTitleTv;
private EditText mContentEt;
private Button mCommitBtn;
private CoureseDialogConfirmListener mOnClickListener;
{
RID = R.layout.dialog_single_input;
}
public CreateCourseDialog(Activity activity, CoureseDialogConfirmListener listener) {
mActivity = activity;
initView();
mOnClickListener = listener;
}
protected void initView() {
super.initView();
mTitleTv = (TextView) mView.findViewById(R.id.title);
mContentEt = mView.findViewById(R.id.content);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
mContentEt.requestFocus();
InputMethodManager mInputManager = (InputMethodManager) mActivity.getSystemService(Context.INPUT_METHOD_SERVICE);
mInputManager.toggleSoftInput(0, InputMethodManager.SHOW_FORCED);
}
}, 0);
mView.findViewById(R.id.public_rl).setVisibility(View.GONE);
mCommitBtn = (Button) mView.findViewById(R.id.sure_btn);
// mCommitBtn.setBackgroundColor(SkinUtils.getSkin(mActivity).getAccentColor());
ButtonColorChange.colorChange(mActivity, mCommitBtn);
mCommitBtn.setText(mActivity.getString(R.string.sure));
mCommitBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (mOnClickListener != null) {
String content = mContentEt.getText().toString().trim();
if (TextUtils.isEmpty(content)) {
ToastUtil.showToast(mActivity, mActivity.getString(R.string.name_course_error));
} else {
CreateCourseDialog.this.mDialog.dismiss();
mOnClickListener.onClick(content);
}
}
}
});
mTitleTv.setText(mActivity.getString(R.string.coursename));
mContentEt.setHint(mActivity.getString(R.string.input_course_name));
}
@Override
public BaseDialog show() {
mContentEt.setFocusable(true);
mContentEt.setFocusableInTouchMode(true);
return super.show();
}
public void setTitle(String title) {
mTitleTv.setText(title);
}
public void setHint(String hint) {
mContentEt.setHint(hint);
}
public void setMaxLines(int maxLines) {
mContentEt.setMaxLines(maxLines);
}
public String getContent() {
return mContentEt.getText().toString();
}
// 外面需要对两个EditText做操作,给获取方法
public EditText getE1() {
return mContentEt;
}
public interface CoureseDialogConfirmListener {
void onClick(String content);
}
}
|
[
"cheng3099@126.com"
] |
cheng3099@126.com
|
91ba3d524436dc8bc579f3a439f7d8750e514b0f
|
4192d19e5870c22042de946f211a11c932c325ec
|
/j-hi-20110703/src/org/hi/common/tools/StringMatcher.java
|
ce59657214c8851abaaef9313b7448d63aa2c986
|
[] |
no_license
|
arthurxiaohz/ic-card
|
1f635d459d60a66ebda272a09ba65e616d2e8b9e
|
5c062faf976ebcffd7d0206ad650f493797373a4
|
refs/heads/master
| 2021-01-19T08:15:42.625340
| 2013-02-01T06:57:41
| 2013-02-01T06:57:41
| 39,082,049
| 2
| 1
| null | null | null | null |
GB18030
|
Java
| false
| false
| 1,999
|
java
|
package org.hi.common.tools;
import java.util.regex.Pattern;
/**
* 字符匹配器,实现<code>Matcher</code>接口.
* <p>模板通配符规则:
*<UL>
*<LI>* 代表任意多个字符</LI>
*<LI>?代表一个字符</LI>
*<P>例如:<FONT face=宋体>org.hi.* ,前七位是org.hi.以后任意多个字符</FONT></P>
*<P>   2?6,第一位是2,第二位是任意字符,第三位是6</P>
*<P> </P>
* @author 张昊
* @since 2007-11-23
* @see org.hi.common.tools.Matcher
*
*/
public class StringMatcher implements Matcher{
/* (non-Javadoc)
* @see org.hi.common.tools.Matcher#isPattern(java.lang.String)
*/
public boolean isPattern(String pattern) {
return (pattern.indexOf('*') != -1 || pattern.indexOf('?') != -1);
}
/**
* 通过给定的模板判断对象值是否与该模板相匹配
* @param pattern 模板
* @param value 待匹配的对象,其类型必须是<code>String</code>的子类
* @return 如果对象与模板匹配返回true,否则返回false
* @see java.lang.String
*/
public boolean match(String pattern, Object value) {
if(!(value instanceof String))
return false;
String str = (String)value;
if(pattern == null || pattern.trim().equals("") || str == null || str.trim().equals(""))
return false;
pattern = pattern.replaceAll("[.]", "\\\\.");
StringBuffer sb = new StringBuffer("");
for (int i = 0; i < pattern.length(); i++) {
char subChar = pattern.charAt(i);
switch(subChar){
case '*':
sb.append(".*");
break;
case '?':
sb.append(".{1}");
break;
default:
sb.append(subChar);
}
}
pattern = sb.toString();
return Pattern.matches(pattern,str);
}
// public static void main(String[] args){
// Matcher matcher = new StringMatcher();
// System.out.println(matcher.match("appContext-*.xml", "appContext-attachment.xml"));
// }
}
|
[
"Angi.Wang.AFE@gmail.com"
] |
Angi.Wang.AFE@gmail.com
|
4d0442ccf86a68793a3492841bf706cce493e97b
|
19a8feef92bc49add7e21889a90ac0084052e65e
|
/dwbidiretor/dwbidiretor/src/main/java/br/com/dwbidiretor/dao/DAOCPedidoLog.java
|
0601e409e738c49fdf71af2c3a373a11fe33d448
|
[] |
no_license
|
diegowvalerio/dw-bi
|
f71795a9cf836e35e5312d4ef77e6d3cc392bdc1
|
9407dda42b89625b34c725b20c8d98b27bbd1dce
|
refs/heads/master
| 2022-12-03T23:43:00.480504
| 2022-10-28T13:26:34
| 2022-10-28T13:26:34
| 180,370,668
| 0
| 0
| null | 2022-11-24T08:17:16
| 2019-04-09T13:15:57
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 148
|
java
|
package br.com.dwbidiretor.dao;
import br.com.dwbidiretor.classe.CPedidoLog;
public interface DAOCPedidoLog extends DAOGenerico<CPedidoLog>{
}
|
[
"33626159+diegowvalerio@users.noreply.github.com"
] |
33626159+diegowvalerio@users.noreply.github.com
|
ef50b7c3fa973d849e9fdc85a44f7981a1a4c4a8
|
173b64b558857daba1f5f11b6f779aaeb1638e71
|
/src/main/java/ru/butakov/survey/domain/Answer.java
|
19ced4f0a979cc1cd43ff164bb5ffa7a25ae1f63
|
[] |
no_license
|
mello1984/survey
|
e9aaad582d05908c4f5c4790a1f5cbe5dcf46caf
|
25f8c30a36cd05761661380769af5300b83684a4
|
refs/heads/master
| 2023-06-19T05:46:59.017689
| 2021-07-07T09:32:56
| 2021-07-07T09:32:56
| 378,266,460
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 320
|
java
|
package ru.butakov.survey.domain;
import lombok.*;
import lombok.experimental.FieldDefaults;
@Data
@NoArgsConstructor
@AllArgsConstructor
@FieldDefaults(level = AccessLevel.PRIVATE)
public class Answer {
@ToString.Exclude
@EqualsAndHashCode.Exclude
Question question;
String text;
boolean right;
}
|
[
"abutakov84@gmail.com"
] |
abutakov84@gmail.com
|
ad51b008d8cec5da17f7c3a3dc23a82ba20c169a
|
6fa1056c9cc7e518e2c42b60cc1a2b19f4b15666
|
/SpringHibernateExample/src/main/java/com/websystique/springmvc/dao/EmployeeDaoImpl.java
|
1efe45986c1e4ce842e90e292767bd44018f7987
|
[] |
no_license
|
gonghojin/DiversityOpensourceLearn
|
ce110062b8bfbe16f970490f324064dfee2a0658
|
c45bf5b53f8289b7d7e77e417c01830ce2a3537d
|
refs/heads/master
| 2021-07-07T17:04:48.913756
| 2019-01-27T07:10:44
| 2019-01-27T07:10:44
| 110,772,350
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,181
|
java
|
package com.websystique.springmvc.dao;
import java.util.List;
import org.hibernate.Criteria;
import org.hibernate.Query;
import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Repository;
import com.websystique.springmvc.model.Employee;
@Repository("employeeDao")
public class EmployeeDaoImpl extends AbstractDao<Integer, Employee> implements EmployeeDao {
@Override
public Employee findById(int id) {
return getByKey(id);
}
@Override
public void saveEmployee(Employee employee) {
persist(employee);
}
@Override
public void deleteEmployeeBySsn(String ssn) {
Query query = getSession().createSQLQuery("delete from Employee where ssn = :ssn");
query.setString("ssn", ssn);
query.executeUpdate();
}
@SuppressWarnings("unchecked")
@Override
public List<Employee> findAllEmployees() {
Criteria criteria = createEntityCriteria();
return (List<Employee>) criteria.list();
}
@Override
public Employee findEmployeeBySsn(String ssn) {
Criteria criteria = createEntityCriteria();
criteria.add(Restrictions.eq("ssn", ssn));
return (Employee) criteria.uniqueResult();
}
}
|
[
"yolip51@naver.com"
] |
yolip51@naver.com
|
a67a23e1ef6b0a3f0f8f7d29ab008330e83524bc
|
c82f89b0e6d1547c2829422e7de7664b378c1039
|
/src/com/hongyu/dao/impl/FhyStoreAccountLogDaoImpl.java
|
9bdd09ae74148307a12c87df982a97002812cb28
|
[] |
no_license
|
chenxiaoyin3/shetuan_backend
|
1bab5327cafd42c8086c25ade7e8ce08fda6a1ac
|
e21a0b14a2427c9ad52ed00f68d5cce2689fdaeb
|
refs/heads/master
| 2022-05-15T14:52:07.137000
| 2022-04-07T03:30:57
| 2022-04-07T03:30:57
| 250,762,749
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 374
|
java
|
package com.hongyu.dao.impl;
import org.springframework.stereotype.Repository;
import com.grain.dao.impl.BaseDaoImpl;
import com.hongyu.dao.FhyStoreAccountLogDao;
import com.hongyu.entity.FhyStoreAccountLog;
@Repository("fhyStoreAccountLogDaoImpl")
public class FhyStoreAccountLogDaoImpl extends BaseDaoImpl<FhyStoreAccountLog, Long> implements FhyStoreAccountLogDao{
}
|
[
"925544714@qq.com"
] |
925544714@qq.com
|
ed02e6e9c4ceb6b910918922d6efc7a2a68e7081
|
19f73d4beaa903e6f30c06b1db49a788d378538c
|
/src/main/java/com/vdrahun/filestorage/util/WebUtil.java
|
e64aaf7a8886348763b0cbfecce8bb6388468ad2
|
[] |
no_license
|
VitaliyDragun1990/file-record-storage-elasticsearch-demo
|
354f77cbab595a53ba388b89f546686d58ae5bb5
|
9ce24ba585f6893d93d7d836b79e27039f33e4a2
|
refs/heads/master
| 2023-02-13T04:35:36.572533
| 2021-01-09T12:49:24
| 2021-01-09T12:49:24
| 328,154,107
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,038
|
java
|
package com.vdrahun.filestorage.util;
import org.springframework.web.servlet.support.ServletUriComponentsBuilder;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
public final class WebUtil {
private WebUtil() {
}
public static String getCurrentRequestFullUri() {
ServletUriComponentsBuilder uriBuilder = ServletUriComponentsBuilder.fromCurrentRequestUri();
return decode(uriBuilder.toUriString());
}
public static String getCurrentRequestPath() {
ServletUriComponentsBuilder uriBuilder = ServletUriComponentsBuilder.fromCurrentRequestUri();
return decode(uriBuilder.build().getPath());
}
private static String decode(String uriString) {
try {
return URLDecoder.decode(uriString, StandardCharsets.UTF_8.toString());
} catch (UnsupportedEncodingException e) {
throw new IllegalArgumentException("Error decoding URI string:[" + uriString + "]", e);
}
}
}
|
[
"vdrag00n90@gmail.com"
] |
vdrag00n90@gmail.com
|
f742cf3e3b401ede0687cd7106abdac4350de793
|
b1ef3e131d9ecf8071d7ed71fdfd34ebd42c6d6d
|
/portal/src/main/java/org/efbiz/ability/exam/portal/controller/action/ExamAction.java
|
28c65cd99aa3db1be6605131795039eb1c97a871
|
[
"MIT"
] |
permissive
|
efbiz/ability-exam
|
2d72a2c425f78f3cdcef20365aac8d6660de2771
|
e6a988fe89439df0d20c714ae0b8a01e55806e5b
|
refs/heads/master
| 2020-03-21T07:21:02.035363
| 2018-06-22T10:42:24
| 2018-06-22T10:42:24
| 138,275,351
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,333
|
java
|
package org.efbiz.ability.exam.portal.controller.action;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.gson.Gson;
import java.io.IOException;
import org.codehaus.jackson.JsonProcessingException;
import org.efbiz.ability.exam.common.Constants;
import org.efbiz.ability.exam.common.domain.exam.AnswerSheet;
import org.efbiz.ability.exam.common.domain.exam.Exam;
import org.efbiz.ability.exam.common.domain.exam.ExamHistory;
import org.efbiz.ability.exam.common.domain.exam.Message;
import org.efbiz.ability.exam.portal.security.UserInfo;
import org.efbiz.ability.exam.portal.service.ExamService;
import org.springframework.amqp.AmqpException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class ExamAction {
@Autowired
private ExamService examService;
@Autowired
private org.springframework.amqp.core.AmqpTemplate qmqpTemplate;
/**
* 获取答题卡
*
* @param histId
*
* @return
*/
@RequestMapping(value = "student/get-answersheet/{histId}", method = RequestMethod.GET)
public @ResponseBody
AnswerSheet getAnswerSheet(@PathVariable("histId") int histId) {
ExamHistory history = examService.getUserExamHistListByHistId(histId);
Gson gson = new Gson();
AnswerSheet answerSheet = gson.fromJson(history.getAnswerSheet(), AnswerSheet.class);
return answerSheet;
}
/**
* 用户申请考试
*
* @param examId
*
* @return
*/
@RequestMapping(value = "student/exam/send-apply/{examId}", method = RequestMethod.GET)
public @ResponseBody
Message sendApply(@PathVariable("examId") int examId) {
Message msg = new Message();
UserInfo userInfo = (UserInfo) SecurityContextHolder.getContext().getAuthentication()
.getPrincipal();
try {
Exam exam = this.checkExam(examId);
//申请考试默认未审核
examService.addUserExamHist(userInfo.getUserid(), examId, exam.getExamPaperId(), 0);
} catch (Exception e) {
// TODO Auto-generated catch block
msg.setResult(e.getMessage());
e.printStackTrace();
}
return msg;
}
/**
* 检查用户是否可以申请该考试
*
* @param examId
*
* @return
*
* @throws Exception
*/
public Exam checkExam(int examId) throws Exception {
Exam exam = examService.getExamById(examId);
if (exam == null) {
throw new Exception("考试不存在!或已经申请过一次!");
}
/*if(exam.getEffTime().before(new Date()))
throw new Exception("不能在考试开始后申请!");*/
if (exam.getApproved() != 1) {
throw new Exception("不能申请一个未审核通过的考试!");
}
return exam;
}
@RequestMapping(value = "/student/exam-submit", method = RequestMethod.POST)
public @ResponseBody
Message finishExam(@RequestBody AnswerSheet answerSheet) {
Message message = new Message();
ObjectMapper om = new ObjectMapper();
try {
qmqpTemplate
.convertAndSend(Constants.ANSWERSHEET_DATA_QUEUE, om.writeValueAsBytes(answerSheet));
} catch (AmqpException e) {
e.printStackTrace();
message.setResult("交卷失败");
message.setMessageInfo(e.toString());
} catch (com.fasterxml.jackson.core.JsonProcessingException e) {
e.printStackTrace();
message.setResult("交卷失败");
message.setMessageInfo(e.toString());
}
return message;
}
@RequestMapping(value = "addAnswerSheet4Test", method = RequestMethod.GET)
public @ResponseBody
Message addAnswerSheet4Test(Model model) throws JsonProcessingException, IOException {
Message msg = new Message();
AnswerSheet as = new AnswerSheet();
as.setExamPaperId(2);
ObjectMapper om = new ObjectMapper();
qmqpTemplate.convertAndSend(Constants.ANSWERSHEET_DATA_QUEUE, om.writeValueAsBytes(as));
return msg;
}
}
|
[
"thanos_t@163.com"
] |
thanos_t@163.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.