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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3f2d5f742f2d4bd807bd83db0140a389acc25e90
|
8d6abb758579b15beb8540406a82097f7c1360eb
|
/src/main/java/de/doering/dwca/CliCommand.java
|
e30f8e3b3ffb4b366da7d6328109ddd3fff82bc0
|
[] |
no_license
|
maduhu/checklist_builder
|
c175672cb5a1735f485dc2ff9107cd6b6e6e6989
|
a864750bb758bf0000e4d3b4561a1c318ad6fbf2
|
refs/heads/master
| 2020-12-01T01:09:14.432777
| 2015-09-03T10:39:27
| 2015-09-03T10:39:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,235
|
java
|
package de.doering.dwca;
import org.gbif.cli.BaseCommand;
import org.gbif.cli.Command;
import com.google.inject.Guice;
import com.google.inject.Injector;
import de.doering.dwca.ipni.ArchiveBuilder;
import org.kohsuke.MetaInfServices;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Checklist build command
*/
@MetaInfServices(Command.class)
public class CliCommand extends BaseCommand {
private static final Logger LOG = LoggerFactory.getLogger(CliCommand.class);
private final CliConfiguration cfg = new CliConfiguration();
public CliCommand() {
super("build");
}
@Override
protected Object getConfigurationObject() {
return cfg;
}
@Override
protected void doRun() {
Injector inj = Guice.createInjector(new CliModule(cfg));
LOG.info("Building {} checklist", cfg.source);
if (cfg.source.equalsIgnoreCase("ipnitest")) {
ArchiveBuilder ipni = new ArchiveBuilder(cfg, "Linaceae", "Siphonodontaceae", "Stylidiceae");
ipni.run();
} else {
Runnable builder = inj.getInstance(cfg.builderClass());
builder.run();
}
LOG.info("{} checklist completed", cfg.source);
}
}
|
[
"m.doering@mac.com"
] |
m.doering@mac.com
|
46198bcd1103fd9b069f35b4dfbe415f32521bbb
|
f20e30351c8ee4d291b1abcc5bb35f7ba93245d9
|
/block-scouter-core/src/main/java/blockscouter/core/node/eth/EthNodeConfigBuilder.java
|
376d3c507352579c58a43cc047ed08fe73c56469
|
[
"Apache-2.0"
] |
permissive
|
zacscoding/block-scouter
|
86a20f38ac9711736804b472937a28b7d19dea1b
|
376050d600ef94933d80c9b0d3029f01f543a91e
|
refs/heads/master
| 2021-12-27T16:19:09.209578
| 2020-01-20T14:18:24
| 2020-01-20T14:18:24
| 227,137,508
| 0
| 1
|
Apache-2.0
| 2021-12-14T21:38:52
| 2019-12-10T14:13:06
|
Java
|
UTF-8
|
Java
| false
| false
| 4,317
|
java
|
/*
* Copyright 2020 Block scouter Project.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package blockscouter.core.node.eth;
import static com.google.common.base.Preconditions.checkNotNull;
import blockscouter.core.health.eth.EthHealthIndicatorType;
import blockscouter.core.health.eth.EthHealthIndicatorType.EthConnectedOnly;
/**
* Ethereum node config builder
*/
public final class EthNodeConfigBuilder {
private String chainId = Defaults.CHAIN_ID;
private String name;
private String rpcUrl = Defaults.RPC_URL;
private long blockTime = Defaults.BLOCK_TIME;
private boolean subscribeNewBlock = Defaults.SUBSCRIBE_NEW_BLOCK;
private boolean subscribePendingTransaction = Defaults.SUBSCRIBE_PENDING_TRANSACTION;
private long pendingTransactionPollingInterval = Defaults.PENDING_TRANSACTION_POLLING_INTERVAL;
private EthHealthIndicatorType healthIndicatorType = Defaults.HEALTH_INDICATOR_TYPE;
public static EthNodeConfigBuilder builder(String name) {
return new EthNodeConfigBuilder(name);
}
private EthNodeConfigBuilder(String name) {
this.name = checkNotNull(name, name);
}
public EthNodeConfigBuilder chainId(String chainId) {
this.chainId = checkNotNull(chainId, "chainId");
return this;
}
public EthNodeConfigBuilder rpcUrl(String rpcUrl) {
this.rpcUrl = checkNotNull(rpcUrl, "rpcUrl");
return this;
}
public EthNodeConfigBuilder blockTime(long blockTime) {
if (blockTime <= 1000L) {
throw new IllegalStateException("Block time must be greater than or equals to 1000L");
}
this.blockTime = checkNotNull(blockTime, "blockTime");
return this;
}
public EthNodeConfigBuilder subscribeNewBlock(boolean subscribeNewBlock) {
this.subscribeNewBlock = checkNotNull(subscribeNewBlock, "subscribeNewBlock");
return this;
}
public EthNodeConfigBuilder subscribePendingTransaction(boolean subscribePendingTransaction) {
this.subscribePendingTransaction = checkNotNull(subscribePendingTransaction,
"subscribePendingTransaction");
return this;
}
public EthNodeConfigBuilder pendingTransactionPollingInterval(long pendingTransactionPollingInterval) {
if (blockTime <= 0) {
throw new IllegalStateException("Block time must be greater than or equals to 0L");
}
this.pendingTransactionPollingInterval = checkNotNull(pendingTransactionPollingInterval,
"pendingTransactionPollingInterval");
return this;
}
public EthNodeConfigBuilder healthIndicatorType(EthHealthIndicatorType healthIndicatorType) {
this.healthIndicatorType = checkNotNull(healthIndicatorType, "healthIndicatorType");
return this;
}
/**
* Build a {@link EthNodeConfig}
*/
public EthNodeConfig build() {
return new EthNodeConfig(chainId, name, rpcUrl, blockTime, subscribeNewBlock,
subscribePendingTransaction, pendingTransactionPollingInterval,
healthIndicatorType);
}
private static final class Defaults {
private static final String CHAIN_ID = "0";
private static final String RPC_URL = "http://localhost:8545";
private static final long BLOCK_TIME = 15000L;
private static final boolean SUBSCRIBE_NEW_BLOCK = false;
private static final boolean SUBSCRIBE_PENDING_TRANSACTION = false;
private static final long PENDING_TRANSACTION_POLLING_INTERVAL = 0L;
private static final EthHealthIndicatorType HEALTH_INDICATOR_TYPE = EthConnectedOnly.INSTANCE;
}
}
|
[
"zaccoding725@gmail.com"
] |
zaccoding725@gmail.com
|
f6ccd1cd98d6fed32a9116737866e27286266c77
|
470af6a13f39dfa1a217fb2856d6bce286e58165
|
/libevent-sample-rocketmq/src/main/java/com/personal/oyl/event/sample/web/TestResult.java
|
929207b72e00220fb999022eb8a83308550e1bfc
|
[
"Apache-2.0"
] |
permissive
|
OuYangLiang/libevent
|
b1d7693f6d4eda3eee3e0f4621d638b1d3f2ef2d
|
984cd535ad89c24fabf5b806185747e2e03e9e23
|
refs/heads/master
| 2022-08-01T03:48:43.689018
| 2022-06-21T02:56:45
| 2022-06-21T02:56:45
| 145,525,526
| 25
| 16
|
Apache-2.0
| 2022-07-01T21:23:49
| 2018-08-21T07:39:41
|
Java
|
UTF-8
|
Java
| false
| false
| 1,281
|
java
|
package com.personal.oyl.event.sample.web;
import com.personal.oyl.event.sample.order.DailyOrderReport;
import com.personal.oyl.event.sample.order.UserOrderReport;
import java.util.List;
public class TestResult {
private List<UserOrderReport> items;
private List<DailyOrderReport> dailyItems;
private long totalOrders;
private long totalAmount;
public List<UserOrderReport> getItems() {
return items;
}
public void setItems(List<UserOrderReport> items) {
this.items = items;
if (null != items) {
for (UserOrderReport report : items) {
totalOrders += report.getOrderNum();
totalAmount += report.getOrderTotal();
}
}
}
public List<DailyOrderReport> getDailyItems() {
return dailyItems;
}
public void setDailyItems(List<DailyOrderReport> dailyItems) {
this.dailyItems = dailyItems;
}
public long getTotalOrders() {
return totalOrders;
}
public void setTotalOrders(long totalOrders) {
this.totalOrders = totalOrders;
}
public long getTotalAmount() {
return totalAmount;
}
public void setTotalAmount(long totalAmount) {
this.totalAmount = totalAmount;
}
}
|
[
"ouyanggod@gmail.com"
] |
ouyanggod@gmail.com
|
bf9640c9d794f0c933edf4801defd69826597543
|
1f71ab1d79fb5d93b9017e84399b08540f646379
|
/src/ro/nextreports/server/api/client/DatabaseMetaDataWebServiceClient.java
|
bbe8465fb6ce867fd7b09ba7e3ae5902f689c69d
|
[
"Apache-2.0"
] |
permissive
|
yikunw/nextreports-server
|
7e5dca06d85e21f8a8b4391075d79f9e97857386
|
199a014b158e6bb830f0f1890ac3e5bfd5cecd2a
|
refs/heads/master
| 2021-01-22T07:23:07.532380
| 2014-03-13T12:19:16
| 2014-03-13T12:19:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,111
|
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 ro.nextreports.server.api.client;
import org.apache.commons.beanutils.BeanUtils;
import ro.nextreports.server.api.client.jdbc.ResultSet;
import com.sun.jersey.api.client.ClientResponse;
/**
* @author Decebal Suiu
*/
public class DatabaseMetaDataWebServiceClient extends WebServiceClient {
public DatabaseMetaDataWebServiceClient(WebServiceClient webServiceClient) {
try {
BeanUtils.copyProperties(this, webServiceClient);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public String getDatabaseProductName(String id) throws WebServiceException {
ClientResponse response = createRootResource().path("jdbc/databaseMetaData/getDatabaseProductName")
.post(ClientResponse.class, id);
checkForException(response);
return response.getEntity(String.class);
}
public String getDatabaseProductVersion(String id) throws WebServiceException {
ClientResponse response = createRootResource().path("jdbc/databaseMetaData/getDatabaseProductVersion")
.post(ClientResponse.class, id);
checkForException(response);
return response.getEntity(String.class);
}
public String getDriverName(String id) throws WebServiceException {
ClientResponse response = createRootResource().path("jdbc/databaseMetaData/getDriverName")
.post(ClientResponse.class, id);
checkForException(response);
return response.getEntity(String.class);
}
public String getDriverVersion(String id) throws WebServiceException {
ClientResponse response = createRootResource().path("jdbc/databaseMetaData/getDriverVersion")
.post(ClientResponse.class, id);
checkForException(response);
return response.getEntity(String.class);
}
public String getUserName(String id) throws WebServiceException {
ClientResponse response = createRootResource().path("jdbc/databaseMetaData/getUserName")
.post(ClientResponse.class, id);
checkForException(response);
return response.getEntity(String.class);
}
public String getSQLKeywords(String id) throws WebServiceException {
ClientResponse response = createRootResource().path("jdbc/databaseMetaData/getSQLKeywords")
.post(ClientResponse.class, id);
checkForException(response);
return response.getEntity(String.class);
}
public ResultSet getSchemas(String id) throws WebServiceException {
ClientResponse response = createRootResource().path("jdbc/databaseMetaData/getSchemas")
.post(ClientResponse.class, id);
checkForException(response);
ResultSetDTO theData = response.getEntity(ResultSetDTO.class);
return new ResultSet(theData);
}
public ResultSet getTables(String id, String catalog, String schemaPattern, String tableNamePattern, String[] types)
throws WebServiceException {
TableDTO tableDTO = new TableDTO();
tableDTO.id = id;
tableDTO.catalog = catalog;
tableDTO.schemaPattern = schemaPattern;
tableDTO.tableNamePattern = tableNamePattern;
tableDTO.types = types;
ClientResponse response = createRootResource().path("jdbc/databaseMetaData/getTables")
.post(ClientResponse.class, tableDTO);
checkForException(response);
ResultSetDTO theData = response.getEntity(ResultSetDTO.class);
return new ResultSet(theData);
}
public ResultSet getProcedures(String id, String catalog, String schemaPattern, String procedureNamePattern)
throws WebServiceException {
ProcedureDTO procedureDTO = new ProcedureDTO();
procedureDTO.id = id;
procedureDTO.catalog = catalog;
procedureDTO.schemaPattern = schemaPattern;
procedureDTO.procedureNamePattern = procedureNamePattern;
ClientResponse response = createRootResource().path("jdbc/databaseMetaData/getProcedures")
.post(ClientResponse.class, procedureDTO);
checkForException(response);
ResultSetDTO theData = response.getEntity(ResultSetDTO.class);
return new ResultSet(theData);
}
public ResultSet getPrimaryKeys(String id, String catalog, String schema, String table)
throws WebServiceException {
KeyDTO keyDTO = new KeyDTO();
keyDTO.id = id;
keyDTO.catalog = catalog;
keyDTO.schema = schema;
keyDTO.table = table;
ClientResponse response = createRootResource().path("jdbc/databaseMetaData/getPrimaryKeys")
.post(ClientResponse.class, keyDTO);
checkForException(response);
ResultSetDTO theData = response.getEntity(ResultSetDTO.class);
return new ResultSet(theData);
}
public ResultSet getImportedKeys(String id, String catalog, String schema, String table)
throws WebServiceException {
KeyDTO keyDTO = new KeyDTO();
keyDTO.id = id;
keyDTO.catalog = catalog;
keyDTO.schema = schema;
keyDTO.table = table;
ClientResponse response = createRootResource().path("jdbc/databaseMetaData/getImportedKeys")
.post(ClientResponse.class, keyDTO);
checkForException(response);
ResultSetDTO theData = response.getEntity(ResultSetDTO.class);
return new ResultSet(theData);
}
public ResultSet getProcedureColumns(String id, String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern)
throws WebServiceException {
ProcedureColumnDTO procedureColumnDTO = new ProcedureColumnDTO();
procedureColumnDTO.id = id;
procedureColumnDTO.catalog = catalog;
procedureColumnDTO.schemaPattern = schemaPattern;
procedureColumnDTO.procedureNamePattern = procedureNamePattern;
procedureColumnDTO.columnNamePattern = columnNamePattern;
ClientResponse response = createRootResource().path("jdbc/databaseMetaData/getProcedureColumns")
.post(ClientResponse.class, procedureColumnDTO);
checkForException(response);
ResultSetDTO theData = response.getEntity(ResultSetDTO.class);
return new ResultSet(theData);
}
public ResultSet getIndexInfo(String id, String catalog, String schema, String table, boolean unique, boolean approximate)
throws WebServiceException {
IndexDTO indexDTO = new IndexDTO();
indexDTO.id = id;
indexDTO.catalog = catalog;
indexDTO.schema = schema;
indexDTO.table = table;
indexDTO.unique = unique;
indexDTO.approximate = approximate;
ClientResponse response = createRootResource().path("jdbc/databaseMetaData/getIndexInfo")
.post(ClientResponse.class, indexDTO);
checkForException(response);
ResultSetDTO theData = response.getEntity(ResultSetDTO.class);
return new ResultSet(theData);
}
}
|
[
"decebal.suiu@gmail.com"
] |
decebal.suiu@gmail.com
|
84d50efd47a3852561d9d8b0459162b50f1db032
|
38de64b543ef82453c498acd1571ee17fbcdcf82
|
/src/main/java/com/sun/corba/se/PortableActivationIDL/InitialNameServiceHolder.java
|
84b82babcfe7d2aec6574c84b8c64e7fc33190dd
|
[] |
no_license
|
whg333/jdk1.8.0_51_src
|
3d7237533ca4fe75aa7342dc2e960d609fd73c3f
|
f92da0f06a900ec6fe814b26c76dd15f3688dc46
|
refs/heads/master
| 2021-01-22T06:01:58.826274
| 2017-03-15T06:55:46
| 2017-03-15T06:55:46
| 81,727,489
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,280
|
java
|
package com.sun.corba.se.PortableActivationIDL;
/**
* com/sun/corba/se/PortableActivationIDL/InitialNameServiceHolder.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from c:/re/workspace/8-2-build-windows-amd64-cygwin/jdk8u51/3951/corba/src/share/classes/com/sun/corba/se/PortableActivationIDL/activation.idl
* Monday, June 8, 2015 6:04:02 PM PDT
*/
/** Interface used to support binding references in the bootstrap name
* service.
*/
public final class InitialNameServiceHolder implements org.omg.CORBA.portable.Streamable
{
public com.sun.corba.se.PortableActivationIDL.InitialNameService value = null;
public InitialNameServiceHolder ()
{
}
public InitialNameServiceHolder (com.sun.corba.se.PortableActivationIDL.InitialNameService initialValue)
{
value = initialValue;
}
public void _read (org.omg.CORBA.portable.InputStream i)
{
value = com.sun.corba.se.PortableActivationIDL.InitialNameServiceHelper.read (i);
}
public void _write (org.omg.CORBA.portable.OutputStream o)
{
com.sun.corba.se.PortableActivationIDL.InitialNameServiceHelper.write (o, value);
}
public org.omg.CORBA.TypeCode _type ()
{
return com.sun.corba.se.PortableActivationIDL.InitialNameServiceHelper.type ();
}
}
|
[
"whg3.3.3@163.com"
] |
whg3.3.3@163.com
|
a6ffe5c1dbe9ee52d1e97e9c85494a36902752c4
|
84ea2482160793454994353a2ecadea6a3472da5
|
/http/src/main/java/com/example/http/Request.java
|
37296f6ffcd34522835dc6e1bc0baafffb28b34b
|
[
"Apache-2.0"
] |
permissive
|
remerber/MyHttp
|
077960daa540d88c1dd756151e1e50d245e92d30
|
8bfab340c297ba60aa10d95c1c9b43f8b63328d6
|
refs/heads/master
| 2021-01-17T12:34:15.090099
| 2017-04-27T14:39:58
| 2017-04-27T14:39:58
| 84,069,503
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,487
|
java
|
package com.example.http;
import java.util.Map;
/**
* Created by HP on 2017/1/13.
*/
public class Request {
public ICallBack iCallBack;
public int maxRetryCount;
public String url;
public String content;
public Map<String, String> headers;
public boolean enableProgressUpdated = false;
public OnGlobalExceptionListener onGlobalExceptionListener;
public volatile boolean isCancelled;
public String tag;
public void setCallback(ICallBack iCallBack) {
this.iCallBack = iCallBack;
}
public void enableProgressUpdated(boolean enalbe) {
this.enableProgressUpdated = true;
}
public void setGlobalExceptionListener(OnGlobalExceptionListener onGlobalExceptionListener) {
this.onGlobalExceptionListener = onGlobalExceptionListener;
}
public void checkIfCancelled() throws AppException {
if (isCancelled) {
throw new AppException(AppException.ErrorType.CANCEL, "the request has cancelled");
}
}
public void cancel() {
isCancelled = true;
iCallBack.cancel();
}
public void setTag(String tag) {
this.tag = tag;
}
public enum RequestMethod {GET, POST, PUT, DELETE}
public RequestMethod method;
public Request(String url, RequestMethod method) {
this.url = url;
this.method = method;
}
public Request(String url) {
this.url = url;
this.method = RequestMethod.GET;
}
}
|
[
"275281462@qq.com"
] |
275281462@qq.com
|
ffc1a0aed009142615f9ff65dcff2546830e0a7c
|
6bf21efc512bbc3368bd4762e272c30728f815a3
|
/src/main/java/com/dtkq/api/dao/ArticleDao.java
|
6f0638baef395d5a67482ba5714cbb226872bcca
|
[] |
no_license
|
Ch3nKaiM1ng/DTKQ-API-boot
|
bd751d8becaa763c3e830dc97b6857c531bee339
|
07c39842d7dec047bfca8e3fa3c27964f9633e19
|
refs/heads/master
| 2022-12-15T03:36:53.653010
| 2020-09-14T02:54:42
| 2020-09-14T02:54:42
| 295,287,026
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,526
|
java
|
package com.dtkq.api.dao;
import com.dtkq.api.entity.Article;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* (Article)表数据库访问层
*
* @author makejava
* @since 2019-07-24 17:11:28
*/
public interface ArticleDao {
/**
* 通过ID查询单条数据
*
* @param artId 主键
* @return 实例对象
*/
Article queryById(Integer artId);
/**
* 查询指定行数据
*
* @param offset 查询起始位置
* @param limit 查询条数
* @return 对象列表
*/
List<Article> queryAllByLimit(@Param("offset") int offset, @Param("limit") int limit);
/**
* 通过实体作为筛选条件查询
*
* @param article 实例对象
* @return 对象列表
*/
List<Article> queryAll(Article article);
/**
* 新增数据
*
* @param article 实例对象
* @return 影响行数
*/
int insert(Article article);
/**
* 修改数据
*
* @param article 实例对象
* @return 影响行数
*/
int update(Article article);
int addNum(Article article);
/**
* 通过主键删除数据
*
* @param artId 主键
* @return 影响行数
*/
int deleteById(Integer artId);
int countNum(Article article);
List<Article> selectByKeyWord(@Param("keyword") String keyword, @Param("offset") Integer offset, @Param("limit") Integer limit);
Integer selectByKeyWordNum(@Param("keyword")String keyword);
}
|
[
"lbi.goog@gmail.com"
] |
lbi.goog@gmail.com
|
2c4a987c804b11fc689ab62bd3ddee52f9099f18
|
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
|
/com.tencent.qqlite/assets/exlibs.1.jar/classes.jar/amj.java
|
0b4026b9d4e44a3a4660300f2a731bb890977823
|
[] |
no_license
|
tsuzcx/qq_apk
|
0d5e792c3c7351ab781957bac465c55c505caf61
|
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
|
refs/heads/main
| 2022-07-02T10:32:11.651957
| 2022-02-01T12:41:38
| 2022-02-01T12:41:38
| 453,860,108
| 36
| 9
| null | 2022-01-31T09:46:26
| 2022-01-31T02:43:22
|
Java
|
UTF-8
|
Java
| false
| false
| 2,066
|
java
|
import android.annotation.SuppressLint;
import android.content.Context;
import com.tencent.mobileqq.activity.ForwardFriendListActivity;
import com.tencent.mobileqq.activity.ForwardOperations;
import com.tencent.mobileqq.activity.contact.SearchResultDialog;
import com.tencent.mobileqq.adapter.ForwardSelectionFriendListAdapter;
import com.tencent.mobileqq.app.QQAppInterface;
import com.tencent.mobileqq.data.Friends;
import com.tencent.mobileqq.search.ContactSearchableFriend;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
public class amj
extends SearchResultDialog
{
public amj(ForwardFriendListActivity paramForwardFriendListActivity, Context paramContext, QQAppInterface paramQQAppInterface, int paramInt, ForwardOperations paramForwardOperations)
{
super(paramContext, paramQQAppInterface, paramInt, paramForwardOperations);
}
@SuppressLint({"UseSparseArrays"})
protected List a(Context paramContext, QQAppInterface paramQQAppInterface, int paramInt)
{
ArrayList localArrayList = new ArrayList();
HashMap localHashMap = ForwardFriendListActivity.a(this.a).a();
Iterator localIterator = localHashMap.keySet().iterator();
while (localIterator.hasNext())
{
Object localObject = (ArrayList)localHashMap.get((Integer)localIterator.next());
if (localObject != null)
{
localObject = ((ArrayList)localObject).iterator();
while (((Iterator)localObject).hasNext())
{
Friends localFriends = (Friends)((Iterator)localObject).next();
localArrayList.add(new ContactSearchableFriend(paramContext, paramQQAppInterface, localFriends, ForwardFriendListActivity.a(this.a).a(localFriends.groupid), 0L, 34359738368L));
}
}
}
return localArrayList;
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.qqlite\assets\exlibs.1.jar\classes.jar
* Qualified Name: amj
* JD-Core Version: 0.7.0.1
*/
|
[
"98632993+tsuzcx@users.noreply.github.com"
] |
98632993+tsuzcx@users.noreply.github.com
|
57360d066be56928dc99d4b3cd28a94d9c4ceaa6
|
fdd4cc6f8b5a473c0081af5302cb19c34433a0cf
|
/src/modules/agrega/portaladministracion/src/main/java/es/pode/administracion/presentacion/categoriasFaqs/crearCategoriaFaq/FormularioAltaValidaFormulario.java
|
222a12e8c2639aa521455d09cd2c8a9adb792704
|
[] |
no_license
|
nwlg/Colony
|
0170b0990c1f592500d4869ec8583a1c6eccb786
|
07c908706991fc0979e4b6c41d30812d861776fb
|
refs/heads/master
| 2021-01-22T05:24:40.082349
| 2010-12-23T14:49:00
| 2010-12-23T14:49:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,391
|
java
|
// license-header java merge-point
package es.pode.administracion.presentacion.categoriasFaqs.crearCategoriaFaq;
/**
*
*/
public final class FormularioAltaValidaFormulario extends org.apache.struts.action.Action
{
public org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
{
final FormularioAltaValidaFormularioFormImpl specificForm = (FormularioAltaValidaFormularioFormImpl)form;
org.apache.struts.action.ActionForward forward = null;
try
{
forward = _validarFormulario(mapping, form, request, response);
}
catch (java.lang.Exception exception)
{
// we populate the current form with only the request parameters
Object currentForm = request.getSession().getAttribute("form");
// if we can't get the 'form' from the session, try from the request
if (currentForm == null)
{
currentForm = request.getAttribute("form");
}
if (currentForm != null)
{
final java.util.Map parameters = new java.util.HashMap();
for (final java.util.Enumeration names = request.getParameterNames(); names.hasMoreElements();)
{
final String name = String.valueOf(names.nextElement());
parameters.put(name, request.getParameter(name));
}
try
{
org.apache.commons.beanutils.BeanUtils.populate(currentForm, parameters);
}
catch (java.lang.Exception populateException)
{
// ignore if we have an exception here (we just don't populate).
}
}
throw exception;
}
request.getSession().setAttribute("form", form);
return forward;
}
/**
*
*/
private org.apache.struts.action.ActionForward _guardarCategoria(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
{
org.apache.struts.action.ActionForward forward = null;
es.pode.administracion.presentacion.categoriasFaqs.crearCategoriaFaq.CrearCategoriaFaqControllerFactory.getCrearCategoriaFaqControllerInstance().guardarCategoriaFaq(mapping, (FormularioAltaValidaFormularioFormImpl)form, request, response);
forward = mapping.findForward("aceptar");
return forward;
}
/**
*
*/
private org.apache.struts.action.ActionForward _recuperarDatos(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
{
org.apache.struts.action.ActionForward forward = null;
es.pode.administracion.presentacion.categoriasFaqs.crearCategoriaFaq.CrearCategoriaFaqControllerFactory.getCrearCategoriaFaqControllerInstance().recuperarDatos(mapping, (FormularioAltaValidaFormularioFormImpl)form, request, response);
forward = mapping.findForward("recupera.datos");
return forward;
}
/**
*
*/
private org.apache.struts.action.ActionForward _validarFormulario(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
{
org.apache.struts.action.ActionForward forward = null;
es.pode.administracion.presentacion.categoriasFaqs.crearCategoriaFaq.CrearCategoriaFaqControllerFactory.getCrearCategoriaFaqControllerInstance().validarFormulario(mapping, (FormularioAltaValidaFormularioFormImpl)form, request, response);
forward = __analizaValidacion(mapping, form, request, response);
return forward;
}
/**
*
*/
private org.apache.struts.action.ActionForward __analizaValidacion(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
{
final java.lang.String value = java.lang.String.valueOf(es.pode.administracion.presentacion.categoriasFaqs.crearCategoriaFaq.CrearCategoriaFaqControllerFactory.getCrearCategoriaFaqControllerInstance().analizaValidacion(mapping, (FormularioAltaValidaFormularioFormImpl)form, request, response));
if (value.equals("TRUE"))
{
return _guardarCategoria(mapping, form, request, response);
}
if (value.equals("FALSE"))
{
return _recuperarDatos(mapping, form, request, response);
}
// we take the last action in case we have an invalid return value from the controller
return _recuperarDatos(mapping, form, request, response);
}
}
|
[
"build@zeno.siriusit.co.uk"
] |
build@zeno.siriusit.co.uk
|
7dd1e2b9ee9c73e43d25c76d640b044868931591
|
8bc41e1a19b37a19d5cf9e1c06c5a7ce206ff70e
|
/siem/franken-logdb/src/main/java/kr/co/future/logdb/query/parser/OptionCheckerParser.java
|
e5539acc3ffa07d35be98a8222db402d7b6d77ad
|
[] |
no_license
|
pkseop/franken
|
5121449f406da7ad30764f8e77f01bd23ac53664
|
bbb4c736c35a0c5e6ba04d0845a3e4926848e1dd
|
refs/heads/master
| 2021-01-22T01:11:21.956563
| 2017-09-02T15:48:45
| 2017-09-02T15:48:45
| 102,206,586
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,983
|
java
|
package kr.co.future.logdb.query.parser;
import static kr.co.future.bnf.Syntax.choice;
import static kr.co.future.bnf.Syntax.k;
import static kr.co.future.bnf.Syntax.ref;
import static kr.co.future.bnf.Syntax.rule;
import kr.co.future.bnf.Binding;
import kr.co.future.bnf.Parser;
import kr.co.future.bnf.Syntax;
import kr.co.future.logdb.LogQueryParser;
import kr.co.future.logdb.query.OptionPlaceholder;
import kr.co.future.logdb.query.command.OptionChecker;
public class OptionCheckerParser implements LogQueryParser {
@Override
public void addSyntax(Syntax syntax) {
// @formatter:off
SingleOptionCheckerParser s = new SingleOptionCheckerParser();
MultipleOptionCheckerParser m = new MultipleOptionCheckerParser();
syntax.add("option_checker_single", s, choice(rule(k("("), ref("option_checker_single"), k(")")), new OptionPlaceholder()));
syntax.add("option_checker_multi1", m, choice(rule(k("("), ref("option_checker_multi1"), k(")")), rule(ref("option_checker_single"),
choice(k("and"), k("or")), choice(ref("option_checker_multi1"), ref("option_checker_single")))));
syntax.add("option_checker_multi2", m, choice(rule(k("("), ref("option_checker_multi2"), k(")")), rule(ref("option_checker_multi1"),
choice(k("and"), k("or")), choice(ref("option_checker_multi1"), ref("option_checker_single")))));
syntax.add("option_checker", this, choice(ref("option_checker_single"), ref("option_checker_multi1"), ref("option_checker_multi2")));
// @formatter:on
}
@Override
public Object parse(Binding b) {
return b.getValue();
}
private class SingleOptionCheckerParser implements Parser {
@Override
public Object parse(Binding b) {
if (b.getChildren() != null && b.getChildren().length == 3)
return b.getChildren()[1].getValue();
return b.getValue();
}
}
private class MultipleOptionCheckerParser implements Parser {
@Override
public Object parse(Binding b) {
if (b.getChildren()[0].getValue().equals("(")) {
OptionChecker result = (OptionChecker) b.getChildren()[1].getValue();
result.setBracket(true);
return result;
}
OptionChecker lh = (OptionChecker) b.getChildren()[0].getValue();
boolean isAnd = "and".equalsIgnoreCase((String) b.getChildren()[1].getValue());
OptionChecker rh = (OptionChecker) b.getChildren()[2].getValue();
if (isAnd) {
if (!lh.isHighPriority() && !rh.isHighPriority()) // {A|B}&{C|D}=>(A|(B&C))|D
return new OptionChecker(new OptionChecker(lh.getLh2(), false, new OptionChecker(lh.getRh2(), true, rh.getLh2())),
false, rh.getRh2());
else if (!lh.isHighPriority()) // {A|B}&C=>A|(B&C)
return new OptionChecker(lh.getLh2(), false, new OptionChecker(lh.getRh2(), true, rh));
else if (!rh.isHighPriority()) // A&{B|C}=>(A&B)|C
return new OptionChecker(new OptionChecker(lh, true, rh.getLh2()), false, rh.getRh2());
}
return new OptionChecker(lh, isAnd, rh);
}
}
}
|
[
"patchboys@MacBook-Pro.local"
] |
patchboys@MacBook-Pro.local
|
36104bcd0a2215445fcf39d29ee3074f3adb5926
|
7df84ffd084caff7f89e4f9bfe4ea92531148568
|
/src/com/thinkinginjava/containers/example/chapter17_2/ex17_2_2/package-info.java
|
bde087c1cc0d0611c21d06deafa3521de69c0294
|
[] |
no_license
|
MonikaSophin/myproject
|
ece1fb8d0406867a67b5e2b53291973e20843c9e
|
679ae00ff5533f7d502b1e4fead60eff462ced1d
|
refs/heads/master
| 2022-06-25T22:50:55.316203
| 2020-12-02T07:22:07
| 2020-12-02T07:22:07
| 152,444,035
| 0
| 1
| null | 2022-06-21T03:27:24
| 2018-10-10T15:12:07
|
Java
|
UTF-8
|
Java
| false
| false
| 154
|
java
|
package com.thinkinginjava.containers.example.chapter17_2.ex17_2_2;
/**
* page 462
* -- chapter_17 容器深入研究
*
* 17.2.2 Map生成器
*/
|
[
"1436080962@qq.com"
] |
1436080962@qq.com
|
0bc24e5f335724fe449684ace471b6f39e597942
|
83d781a9c2ba33fde6df0c6adc3a434afa1a7f82
|
/ServiceLiveCommonDomain/src/main/java/com/servicelive/domain/sku/maintenance/AbstractLuServiceTypeTemplate.java
|
5eea1ef4ab978ef1a0e2b43ce46f5ac8f195cb35
|
[] |
no_license
|
ssriha0/sl-b2b-platform
|
71ab8ef1f0ccb0a7ad58b18f28a2bf6d5737fcb6
|
5b4fcafa9edfe4d35c2dcf1659ac30ef58d607a2
|
refs/heads/master
| 2023-01-06T18:32:24.623256
| 2020-11-05T12:23:26
| 2020-11-05T12:23:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,302
|
java
|
package com.servicelive.domain.sku.maintenance;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
/**
* AbstractLuServiceTypeTemplate generated by MyEclipse Persistence Tools
*/
@MappedSuperclass
public abstract class AbstractLuServiceTypeTemplate implements java.io.Serializable {
// Fields
/**
*
*/
private static final long serialVersionUID = -7796717874079612710L;
private Integer serviceTypeTemplateId;
private Integer nodeId;
private String descr;
private Integer sortOrder;
// Constructors
/** default constructor */
public AbstractLuServiceTypeTemplate() {
// intentionally blank
}
/** full constructor */
public AbstractLuServiceTypeTemplate(Integer serviceTypeTemplateId, Integer nodeId, String descr, Integer sortOrder) {
this.serviceTypeTemplateId = serviceTypeTemplateId;
this.nodeId = nodeId;
this.descr = descr;
this.sortOrder = sortOrder;
}
// Property accessors
@Id
@Column(name="service_type_template_id", unique=true, nullable=false, insertable=true, updatable=true)
public Integer getServiceTypeTemplateId() {
return this.serviceTypeTemplateId;
}
public void setServiceTypeTemplateId(Integer serviceTypeTemplateId) {
this.serviceTypeTemplateId = serviceTypeTemplateId;
}
@Column(name="node_id", unique=false, nullable=false, insertable=true, updatable=true)
public Integer getNodeId() {
return this.nodeId;
}
public void setNodeId(Integer nodeId) {
this.nodeId = nodeId;
}
@Column(name="descr", unique=false, nullable=false, insertable=true, updatable=true, length=50)
public String getDescr() {
return this.descr;
}
public void setDescr(String descr) {
this.descr = descr;
}
@Column(name="sort_order", unique=false, nullable=false, insertable=true, updatable=true)
public Integer getSortOrder() {
return this.sortOrder;
}
public void setSortOrder(Integer sortOrder) {
this.sortOrder = sortOrder;
}
}
|
[
"Kunal.Pise@transformco.com"
] |
Kunal.Pise@transformco.com
|
fb62cb20dec7c553065cd3c87fb51654c2b082e9
|
6c562db04d1b4399aec403237c9f19dfc4e70884
|
/AndroidApp/javademo/src/test/java/com/arouter/jingshuai/javademo/ExampleUnitTest.java
|
bcaa4ba3faa9f89b7c4dfcc8f72f883766d60aca
|
[] |
no_license
|
jingshauizh/android_sundy
|
cc38ce2dc9fd38b91d4472b1fb84272d700ca90e
|
fe638704a52385f1457cf443f9e009a4c7123937
|
refs/heads/master
| 2021-07-12T02:44:22.920117
| 2020-08-12T11:08:14
| 2020-08-12T11:08:14
| 59,533,378
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 424
|
java
|
package com.arouter.jingshuai.javademo;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
}
|
[
"jingshuai.zhang@ericsson.com"
] |
jingshuai.zhang@ericsson.com
|
7187f19ccde89be09c8838214ef14882cf4b41c0
|
c96b0be86c08f639d388498851384706a3c87815
|
/KCX-Mapping-Convert/src/com/kewill/kcx/component/mapping/countries/de/Import/EFssImportMessages.java
|
8f1405ea6c1815b60bef62c1350f349af4834587
|
[] |
no_license
|
joelsousa/KCX-Mapping-Convert
|
cf1b4b785af839f6f369bcdf539bd023d4478f72
|
9da4b25db31f5b1dfbefd279eb76c555f3977c0e
|
refs/heads/master
| 2020-06-07T12:06:43.517765
| 2014-10-03T14:14:51
| 2014-10-03T14:14:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,024
|
java
|
package com.kewill.kcx.component.mapping.countries.de.Import;
/**
* Module : EFssImportMessages
* Created : 12.09.2011
* Description : Valid Names of FSS-message names in Zabis Import.
*
* @author iwaniuk
* @version 7.0.00
*/
public enum EFssImportMessages {
/**
* Functional name: E_ARR_NOT
* Technical Name: IE007
* Description (en): ImportTaxAssessment
* Description (de): ImportTaxAssessment
* Direction: Customer to customs.
*/
CTX,
/**
* Functional name: E_DEC_DAT
* Technical Name: IE015
* Description (en): ImportDeclarationDecision
* Description (de): ImportDeclarationDecision
* Direction: Customer to customs.
*/
CRL,
/**
* Functional name: E_DEC_DAT
* Technical Name: IE015
* Description (en): ImportDeclarationResponse
* Description (de): ImportDeclarationResponse
* Direction: Customer to customs.
*/
REC,
ERR,
CON,
STI,
}
|
[
"joel@moredata.pt"
] |
joel@moredata.pt
|
4cc84e62a507fbd7a941a5287ccdbae08085fc72
|
1b0c578992559628dc9b5f7c3abaf0d467a23899
|
/Kevin_G_Exercises/Chapter_18_Recursion/Programming_Exercise_28.java
|
8588d10b96f293f3bac708d58de30ab4c184b975
|
[] |
no_license
|
RomaniEzzatYoussef/Exercises
|
c9897b92507abf2d7ddc79f7e05b8b3d208f1dad
|
396900c05dac95954f7ddbc424c5023deb562242
|
refs/heads/master
| 2020-09-25T05:52:16.701228
| 2019-12-13T19:26:12
| 2019-12-13T19:26:12
| 225,932,027
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,748
|
java
|
package Chapter_18_Recursion;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
/**
* Nonrecursive directory size
* Rewrite Listing 18.7, DirectorySize.java, without using recursion.
*
*
* @author kevgu
*
*/
public class Programming_Exercise_28
{
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
System.out.print("Enter a directory: ");
String path = input.next();
try
{
System.out.println("The size of \"" + path + "\" is " + getDirectorySize(new File(path), 30));
}
catch (Exception ex)
{
System.out.print(ex);
}
input.close();
}
public static long getDirectorySize(File file, int depth) throws FileNotFoundException
{
if (!file.exists())
throw new FileNotFoundException(file + " not found");
long totalSize = 0;
if (file.isFile())
return file.length();
else
{
int i = 0;
int index = 0;
int[] indices = new int[depth];
boolean switcher = false;
File[] files = file.listFiles();
while (!switcher)
{
for (i = indices[index]; i < files.length; i++)
{
if (files[i].isFile())
{
totalSize += files[i].length();
indices[index]++;
}
else
{
File[] filesAux = files[i].listFiles();
if (filesAux.length != 0)
{
indices[index]++;
index++;
files = filesAux;
indices[index] = 0;
i = -1;
}
else
indices[index]++;
}
}
if (index == 0)
switcher = true;
else
{
index--;
files = new File(new File(files[i - 1].getParent()).getParent()).listFiles();
}
}
}
return totalSize;
}
}
|
[
"romaniezzat@hotmail.com"
] |
romaniezzat@hotmail.com
|
91b70c33e2c2429a3414c24824ee13699f23239d
|
3d4349c88a96505992277c56311e73243130c290
|
/Preparation/processed-dataset/long-method_1_536/header.java
|
476357114cd24752ff5f249f6fefb3e096f61e56
|
[] |
no_license
|
D-a-r-e-k/Code-Smells-Detection
|
5270233badf3fb8c2d6034ac4d780e9ce7a8276e
|
079a02e5037d909114613aedceba1d5dea81c65d
|
refs/heads/master
| 2020-05-20T00:03:08.191102
| 2019-05-15T11:51:51
| 2019-05-15T11:51:51
| 185,272,690
| 7
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 189
|
java
|
void method0() {
private static final marauroa.common.Logger logger = Log4J.getLogger(RPObjectDAO.class);
/** factory for creating object instances */
protected RPObjectFactory factory;
}
|
[
"dariusb@unifysquare.com"
] |
dariusb@unifysquare.com
|
ef555045621073c4bef7e03a5dcf603d063abe20
|
5aa1d34ac9497d14662601b5363ee31c4a059a4b
|
/src/leetcode/l_111.java
|
446ead35fa8c0b7e80179ddc505851bd2ba27bf7
|
[] |
no_license
|
liyuan231/leetcode
|
dc71eeb2b6d68c7cd99a6d67e9f4522a957abd35
|
3e35297c5eea356e8543aee930fed832c6576cd2
|
refs/heads/master
| 2023-04-18T20:12:02.162298
| 2021-05-01T01:59:03
| 2021-05-01T01:59:03
| 286,483,592
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 345
|
java
|
package leetcode;
public class l_111 {
public static void main(String[] args) {
TreeNode treeNode = TreeNode.create();
System.out.println(minDepth(treeNode));
}
public static int minDepth(TreeNode root) {
if(root==null){return 0;}
return Math.min(minDepth(root.left),minDepth(root.right))+1;
}
}
|
[
"1987151116@qq.com"
] |
1987151116@qq.com
|
42b85fd207e85fa56f38b326b5c62b79fd9ae996
|
7d8c64f1f09e13043f14a5a235c4e61272a77506
|
/sources/android/support/p000v4/text/ICUCompatIcs.java
|
58479db3868cf263209836c227d94ec3bf7501f5
|
[] |
no_license
|
AlexKohanim/QuickReturn
|
168530c2ef4035faff817a901f1384ed8a554f73
|
1ce10de7020951d49f80b66615fe3537887cea80
|
refs/heads/master
| 2022-06-25T19:00:59.818761
| 2020-05-08T20:11:14
| 2020-05-08T20:11:14
| 262,418,565
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,050
|
java
|
package android.support.p000v4.text;
import android.util.Log;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Locale;
/* renamed from: android.support.v4.text.ICUCompatIcs */
class ICUCompatIcs {
private static final String TAG = "ICUCompatIcs";
private static Method sAddLikelySubtagsMethod;
private static Method sGetScriptMethod;
ICUCompatIcs() {
}
static {
try {
Class<?> clazz = Class.forName("libcore.icu.ICU");
if (clazz != null) {
sGetScriptMethod = clazz.getMethod("getScript", new Class[]{String.class});
sAddLikelySubtagsMethod = clazz.getMethod("addLikelySubtags", new Class[]{String.class});
}
} catch (Exception e) {
sGetScriptMethod = null;
sAddLikelySubtagsMethod = null;
Log.w(TAG, e);
}
}
public static String maximizeAndGetScript(Locale locale) {
String localeWithSubtags = addLikelySubtags(locale);
if (localeWithSubtags != null) {
return getScript(localeWithSubtags);
}
return null;
}
private static String getScript(String localeStr) {
try {
if (sGetScriptMethod != null) {
return (String) sGetScriptMethod.invoke(null, new Object[]{localeStr});
}
} catch (IllegalAccessException e) {
Log.w(TAG, e);
} catch (InvocationTargetException e2) {
Log.w(TAG, e2);
}
return null;
}
private static String addLikelySubtags(Locale locale) {
String localeStr = locale.toString();
try {
if (sAddLikelySubtagsMethod != null) {
return (String) sAddLikelySubtagsMethod.invoke(null, new Object[]{localeStr});
}
} catch (IllegalAccessException e) {
Log.w(TAG, e);
} catch (InvocationTargetException e2) {
Log.w(TAG, e2);
}
return localeStr;
}
}
|
[
"akohanim@sfsu.edu"
] |
akohanim@sfsu.edu
|
b53cc5cf02c16ee1a7aa38ab71ff69df1304f82e
|
d6b5b5e50347de72c375402efdba7a09f782689f
|
/cds/product/production/opencds/opencds-parent/opencds-dss-components/opencds-dss-drools-61-adapter/src/main/java/org/opencds/service/drools/v61/KieScannerAdapter.java
|
942f485aca2a0ce0370254f331312db0c59afc5a
|
[
"Apache-2.0"
] |
permissive
|
CoherentLogic/ehmp20
|
85879f30174dd5a5be88504d0fd1dcf4f36c69aa
|
fc674005ec7c226704dbc50f8f8d6216f847096e
|
refs/heads/master
| 2021-01-22T04:02:05.698299
| 2017-02-09T21:19:57
| 2017-02-09T21:19:57
| 81,489,481
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,582
|
java
|
package org.opencds.service.drools.v61;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.kie.api.command.Command;
import org.kie.api.runtime.ExecutionResults;
import org.kie.api.runtime.KieContainer;
import org.kie.api.runtime.StatelessKieSession;
import org.kie.internal.command.CommandFactory;
import org.omg.dss.DSSRuntimeExceptionFault;
import org.opencds.config.api.ExecutionEngineAdapter;
import org.opencds.config.api.ExecutionEngineContext;
public class KieScannerAdapter implements ExecutionEngineAdapter<List<Command<?>>, ExecutionResults, KieContainer> {
private static Log log = LogFactory.getLog(KieScannerAdapter.class);
@Override
public ExecutionEngineContext<List<Command<?>>, ExecutionResults> execute(KieContainer kContainer,
ExecutionEngineContext<List<Command<?>>, ExecutionResults> context) throws DSSRuntimeExceptionFault {
ExecutionResults results = null;
try {
StatelessKieSession kSession = kContainer.newStatelessKieSession();
log.debug("KM (Drools) execution...");
results = kSession.execute(CommandFactory.newBatchExecution(context.getInput()));
context.setResults(results);
log.debug("KM (Drools) execution done.");
} catch (Exception e) {
String err = "OpenCDS call to Drools.execute failed with error: " + e.getMessage();
log.error(err, e);
throw new DSSRuntimeExceptionFault(err);
}
return context;
}
}
|
[
"jpw@coherent-logic.com"
] |
jpw@coherent-logic.com
|
880d9bb8b06f996875322f769db3534f71df8a17
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-ws/results/XWIKI-14263-5-2-Single_Objective_GGA-WeightedSum/org/xwiki/security/authorization/DefaultAuthorizationManager_ESTest.java
|
b56e78455d7cd5219186cbee6f44204c5b584c00
|
[
"MIT",
"CC-BY-4.0"
] |
permissive
|
STAMP-project/Botsing-basic-block-coverage-application
|
6c1095c6be945adc0be2b63bbec44f0014972793
|
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
|
refs/heads/master
| 2022-07-28T23:05:55.253779
| 2022-04-20T13:54:11
| 2022-04-20T13:54:11
| 285,771,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 593
|
java
|
/*
* This file was automatically generated by EvoSuite
* Wed Apr 01 04:00:44 UTC 2020
*/
package org.xwiki.security.authorization;
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 DefaultAuthorizationManager_ESTest extends DefaultAuthorizationManager_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
7ba029fd3ab4f2a2366dc96f51475ee53edb60b8
|
5f56e84aa190d65ae984e24cc833fdca36fbf330
|
/fxsyncrest/src/main/java/com/fxdigital/syncclient/bean/.svn/text-base/LocalCenter.java.svn-base
|
414fd6a4c1544e5a273afaeb2aa2ac6e1fe145b3
|
[] |
no_license
|
hetao0921/tt
|
71a57b5964cc114d9a59194beb46fbf6bf2a3224
|
5ca6b233718ed832087485c38154e5f89a9ec458
|
refs/heads/master
| 2020-04-05T23:04:40.604232
| 2016-01-29T09:38:17
| 2016-01-29T09:38:17
| 37,107,666
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,571
|
package com.fxdigital.syncclient.bean;
/**
* 本级服务器信息
*
* @author fucz
* @version 2014-7-24
*/
public class LocalCenter {
private String id;
private String ip;
private String centerMask;
private String centerGate;
private String name;
private int port;
private String syncServerIP;
private int syncServerPort;
private String syncServerPostAddress;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip;
}
public String getCenterMask() {
return centerMask;
}
public void setCenterMask(String centerMask) {
this.centerMask = centerMask;
}
public String getCenterGate() {
return centerGate;
}
public void setCenterGate(String centerGate) {
this.centerGate = centerGate;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getPort() {
return port;
}
public void setPort(int port) {
this.port = port;
}
public String getSyncServerIP() {
return syncServerIP;
}
public void setSyncServerIP(String syncServerIP) {
this.syncServerIP = syncServerIP;
}
public int getSyncServerPort() {
return syncServerPort;
}
public void setSyncServerPort(int syncServerPort) {
this.syncServerPort = syncServerPort;
}
public String getSyncServerPostAddress() {
return syncServerPostAddress;
}
public void setSyncServerPostAddress(String syncServerPostAddress) {
this.syncServerPostAddress = syncServerPostAddress;
}
}
|
[
"hetao0921@126.com"
] |
hetao0921@126.com
|
|
ededcdb4803108cbd1d245d582f86b66eb492c85
|
9923e30eb99716bfc179ba2bb789dcddc28f45e6
|
/openapi-generator/java-undertow-server/src/main/java/org/openapitools/model/InlineResponse2004.java
|
374b62e1c854b52ea94089e3e5876a6963f57618
|
[] |
no_license
|
silverspace/samsara-sdks
|
cefcd61458ed3c3753ac5e6bf767229dd8df9485
|
c054b91e488ab4266f3b3874e9b8e1c9e2d4d5fa
|
refs/heads/master
| 2020-04-25T13:16:59.137551
| 2019-03-01T05:49:05
| 2019-03-01T05:49:05
| 172,804,041
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,944
|
java
|
package org.openapitools.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import org.openapitools.model.VehicleMaintenance;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaUndertowServerCodegen", date = "2019-03-01T05:34:49.851Z[GMT]")
public class InlineResponse2004 {
private List<VehicleMaintenance> vehicles = new ArrayList<VehicleMaintenance>();
/**
**/
public InlineResponse2004 vehicles(List<VehicleMaintenance> vehicles) {
this.vehicles = vehicles;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("vehicles")
public List<VehicleMaintenance> getVehicles() {
return vehicles;
}
public void setVehicles(List<VehicleMaintenance> vehicles) {
this.vehicles = vehicles;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
InlineResponse2004 inlineResponse2004 = (InlineResponse2004) o;
return Objects.equals(vehicles, inlineResponse2004.vehicles);
}
@Override
public int hashCode() {
return Objects.hash(vehicles);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class InlineResponse2004 {\n");
sb.append(" vehicles: ").append(toIndentedString(vehicles)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"greg@samsara.com"
] |
greg@samsara.com
|
1229aa6a5627491081ae014b793c4ed7763621de
|
b2344f332da869903606fb5fb7b9774d4839d48f
|
/src/main/java/com/atguigu/springcloud/EurekaServer7002_App.java
|
927e9d035858b5f82712cc37002b09944e34555f
|
[] |
no_license
|
xtchou1508/7002
|
0078c5accda245e37f50056d55e66485bdcb69fa
|
c561a3607f188297617f7e307c6599124068c13d
|
refs/heads/master
| 2020-04-28T00:16:08.047748
| 2019-03-10T12:01:22
| 2019-03-10T12:01:22
| 174,809,073
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 510
|
java
|
package com.atguigu.springcloud;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
@SpringBootApplication
@EnableEurekaServer // EurekaServer服务器端启动类,接受其它微服务注册进来
public class EurekaServer7002_App {
public static void main(String[] args) {
SpringApplication.run(EurekaServer7002_App.class, args);
}
}
|
[
"goodMorning_pro@atguigu.com"
] |
goodMorning_pro@atguigu.com
|
8d2b3b6f097d2bd4028a3183374169acf2b35465
|
83d781a9c2ba33fde6df0c6adc3a434afa1a7f82
|
/MarketPublicMobileAPI/test/com/newco/marketplace/api/mobile/services/DeleteFilterTest.java
|
4d19f9c567d341d3ebb1b1b9cbee06cf113b7dac
|
[] |
no_license
|
ssriha0/sl-b2b-platform
|
71ab8ef1f0ccb0a7ad58b18f28a2bf6d5737fcb6
|
5b4fcafa9edfe4d35c2dcf1659ac30ef58d607a2
|
refs/heads/master
| 2023-01-06T18:32:24.623256
| 2020-11-05T12:23:26
| 2020-11-05T12:23:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,571
|
java
|
/**
*
*/
package com.newco.marketplace.api.mobile.services;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import com.newco.marketplace.api.mobile.beans.deleteFilter.DeleteFilterResponse;
import com.newco.marketplace.mobile.api.utils.validators.v3_0.MobileGenericValidator;
/**
* @author Infosys
*
*/
public class DeleteFilterTest {
private MobileGenericValidator validator;
@Before
public void setUp() {
validator = new MobileGenericValidator();
}
@Test
public void validateMandatoryFilterId(){
try {
DeleteFilterResponse response = validator.validateDeleteFilterParam("");
Assert.assertNotNull(response);
Assert.assertNotNull(response.getResults().getError().get(0).getCode());
Assert.assertEquals("3050", response.getResults().getError().get(0).getCode());
} catch (Exception e) {
e.printStackTrace();
}
}
@Test
public void validateFilterIdInteger(){
try {
DeleteFilterResponse response = validator.validateDeleteFilterParam("abc");
Assert.assertNotNull(response);
Assert.assertNotNull(response.getResults().getError().get(0).getCode());
Assert.assertEquals("3050", response.getResults().getError().get(0).getCode());
} catch (Exception e) {
e.printStackTrace();
}
}
@Test
public void validateSuccess(){
try {
DeleteFilterResponse response = validator.validateDeleteFilterParam("1");
Assert.assertNull(response);
} catch (Exception e) {
e.printStackTrace();
}
}
}
|
[
"Kunal.Pise@transformco.com"
] |
Kunal.Pise@transformco.com
|
a47095651b9028b4a13a698959098297bdc10865
|
ed865190ed878874174df0493b4268fccb636a29
|
/PuridiomInterface/src/com/coda/www/efinance/schemas/elementmaster/elementfinder_11_2/webservice/ElementFinderService.java
|
2184af22529cd297205ce01df17227f7d2fb99f5
|
[] |
no_license
|
zach-hu/srr_java8
|
6841936eda9fdcc2e8185b85b4a524b509ea4b1b
|
9b6096ba76e54da3fe7eba70989978edb5a33d8e
|
refs/heads/master
| 2021-01-10T00:57:42.107554
| 2015-11-06T14:12:56
| 2015-11-06T14:12:56
| 45,641,885
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 788
|
java
|
/**
* ElementFinderService.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
*/
package com.coda.www.efinance.schemas.elementmaster.elementfinder_11_2.webservice;
public interface ElementFinderService extends javax.xml.rpc.Service {
public java.lang.String getElementFinderServicePortAddress();
public com.coda.www.efinance.schemas.elementmaster.elementfinder_11_2.webservice.ElementFinderServicePortTypes getElementFinderServicePort() throws javax.xml.rpc.ServiceException;
public com.coda.www.efinance.schemas.elementmaster.elementfinder_11_2.webservice.ElementFinderServicePortTypes getElementFinderServicePort(java.net.URL portAddress) throws javax.xml.rpc.ServiceException;
}
|
[
"brickerz@9227675a-84a3-4efe-bc6c-d7b3a3cf6466"
] |
brickerz@9227675a-84a3-4efe-bc6c-d7b3a3cf6466
|
e833ac055c0866240592a9be3bd728b972b1ad4e
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/repairnator/learning/1623/Properties.java
|
5b3854400ac2c155241030a9690608a8406d24d9
|
[] |
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
| 2,230
|
java
|
package fr.inria.spirals.repairnator.process.inspectors.properties;
import fr.inria.spirals.repairnator.process.inspectors.properties.builds.Builds;
import fr.inria.spirals.repairnator.process.inspectors.properties.commits.Commits;
import fr.inria.spirals.repairnator.process.inspectors.properties.patchDiff.PatchDiff;
import fr.inria.spirals.repairnator.process.inspectors.properties.projectMetrics.ProjectMetrics;
import fr.inria.spirals.repairnator.process.inspectors.properties.repository.Repository;
import fr.inria.spirals.repairnator.process.inspectors.properties.reproductionBuggyBuild.ReproductionBuggyBuild;
import fr.inria.spirals.repairnator.process.inspectors.properties.tests.Tests;
public class Properties {
private String version; // this property is specific for bears.json
private String type;
private Repository repository;
private Builds builds;
private Commits commits;
private Tests tests;
private PatchDiff patchDiff;
private ProjectMetrics projectMetrics;
private ReproductionBuggyBuild reproductionBuggyBuild;
public Properties() {
this.repository = new Repository();
this.builds = new Builds();
this.commits = new Commits();
this.tests = new Tests();
this.patchDiff = new PatchDiff();
this.projectMetrics = new ProjectMetrics();
this.reproductionBuggyBuild = new ReproductionBuggyBuild();
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public Repository getRepository() {
return repository;
}
public Builds getBuilds() {
return builds;
}
public Commits getCommits() {
return commits;
}
public Tests getTests() {
return tests;
}
public PatchDiff getPatchDiff() {
return patchDiff;
}
public ProjectMetrics getProjectMetrics() {
return projectMetrics;
}
public ReproductionBuggyBuild getReproductionBuggyBuild() {
return reproductionBuggyBuild;
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
c133f13f986fcfb60bc7db3a75b88d86ccbbd9da
|
cb8206caf428eddaf0ad3bbb6e32acc0b5f31590
|
/src/Eclipse-IDE/org.robotframework.ide.eclipse.main.plugin/src/org/robotframework/ide/eclipse/main/plugin/project/build/validation/ExecutableForValidator.java
|
d36b54bb8c2cf8adf9d1c3c00034fb38e517b6ae
|
[
"Apache-2.0"
] |
permissive
|
puraner/RED
|
75420b81b639c47476981065fc53ab15b783ec2d
|
d41b7c244ff2e449c541fd0691213fcf5a3b30c1
|
refs/heads/master
| 2020-07-04T04:08:09.203533
| 2019-08-13T13:27:23
| 2019-08-13T13:27:23
| 202,150,040
| 0
| 0
|
NOASSERTION
| 2019-08-13T13:24:49
| 2019-08-13T13:24:48
| null |
UTF-8
|
Java
| false
| false
| 6,863
|
java
|
/*
* Copyright 2018 Nokia Solutions and Networks
* Licensed under the Apache License, Version 2.0,
* see license.txt file for details.
*/
package org.robotframework.ide.eclipse.main.plugin.project.build.validation;
import java.util.List;
import java.util.Set;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.rf.ide.core.testdata.model.AModelElement;
import org.rf.ide.core.testdata.model.RobotFileOutput.BuildMessage;
import org.rf.ide.core.testdata.model.table.IExecutableStepsHolder;
import org.rf.ide.core.testdata.model.table.LocalSetting;
import org.rf.ide.core.testdata.model.table.RobotEmptyRow;
import org.rf.ide.core.testdata.model.table.RobotExecutableRow;
import org.rf.ide.core.testdata.model.table.exec.descs.IExecutableRowDescriptor;
import org.rf.ide.core.testdata.model.table.exec.descs.IExecutableRowDescriptor.RowType;
import org.rf.ide.core.testdata.model.table.exec.descs.impl.ForLoopDeclarationRowDescriptor;
import org.rf.ide.core.testdata.model.table.variables.names.VariableNamesSupport;
import org.rf.ide.core.testdata.text.read.recognizer.RobotToken;
import org.rf.ide.core.testdata.text.read.recognizer.RobotTokenType;
import org.rf.ide.core.validation.ProblemPosition;
import org.robotframework.ide.eclipse.main.plugin.project.build.AttributesAugmentingReportingStrategy;
import org.robotframework.ide.eclipse.main.plugin.project.build.RobotArtifactsValidator.ModelUnitValidator;
import org.robotframework.ide.eclipse.main.plugin.project.build.RobotProblem;
import org.robotframework.ide.eclipse.main.plugin.project.build.ValidationReportingStrategy;
import org.robotframework.ide.eclipse.main.plugin.project.build.causes.KeywordsProblem;
import org.robotframework.ide.eclipse.main.plugin.project.build.validation.versiondependent.VersionDependentValidators;
import com.google.common.collect.Range;
public class ExecutableForValidator implements ExecutableValidator {
private final FileValidationContext validationContext;
private final Set<String> additionalVariables;
private final ValidationReportingStrategy reporter;
private final IExecutableRowDescriptor<?> descriptor;
public ExecutableForValidator(final FileValidationContext validationContext, final Set<String> additionalVariables,
final IExecutableRowDescriptor<?> descriptor, final ValidationReportingStrategy reporter) {
this.validationContext = validationContext;
this.additionalVariables = additionalVariables;
this.descriptor = descriptor;
this.reporter = reporter;
}
@Override
public void validate(final IProgressMonitor monitor) throws CoreException {
reportVersionDependentProblems();
reportInconsistentName();
reportEmptyLoop();
reportForLoopBuildMessages();
reportUnknownVariables();
descriptor.getCreatedVariables()
.forEach(var -> additionalVariables.add(VariableNamesSupport.extractUnifiedVariableName(var)));
}
private void reportVersionDependentProblems() {
new VersionDependentValidators(validationContext, reporter)
.getForLoopValidators((ForLoopDeclarationRowDescriptor<?>) descriptor)
.forEach(ModelUnitValidator::validate);
}
private void reportInconsistentName() {
final RobotToken forToken = descriptor.getAction().getToken();
final String actualText = forToken.getText();
if (!actualText.equals(":FOR") && !actualText.equals("FOR")) {
final RobotProblem problem = RobotProblem
.causedBy(KeywordsProblem.FOR_OCCURRENCE_NOT_CONSISTENT_WITH_DEFINITION)
.formatMessageWith(actualText);
reporter.handleProblem(problem, validationContext.getFile(), forToken);
}
}
private void reportEmptyLoop() {
final AModelElement<?> row = descriptor.getRow();
final IExecutableStepsHolder<?> holder = (IExecutableStepsHolder<?>) row.getParent();
final List<?> children = holder.getElements();
final int index = children.indexOf(row);
if (index >= 0 && !isFollowedByForContinuationRow(children, index, shouldSettingBreakRule(row))) {
final RobotProblem problem = RobotProblem.causedBy(KeywordsProblem.FOR_IS_EMPTY);
reporter.handleProblem(problem, validationContext.getFile(), descriptor.getAction().getToken());
}
}
private boolean shouldSettingBreakRule(final AModelElement<?> row) {
return !row.getDeclaration().getTypes().contains(RobotTokenType.FOR_WITH_END);
}
private boolean isFollowedByForContinuationRow(final List<?> children, final int index,
final boolean settingEndsLoop) {
for (int i = index + 1; i < children.size(); i++) {
if (children.get(i) instanceof RobotExecutableRow<?>) {
final RobotExecutableRow<?> nextRow = (RobotExecutableRow<?>) children.get(i);
final RowType type = nextRow.buildLineDescription().getRowType();
if (type == RowType.FOR_CONTINUE) {
return true;
} else if (type == RowType.COMMENTED_HASH) {
continue;
}
break;
} else if (children.get(i) instanceof RobotEmptyRow<?>) {
continue;
} else if (children.get(i) instanceof LocalSetting<?>) {
if (settingEndsLoop) {
return false;
} else {
continue;
}
} else {
return false;
}
}
return false;
}
private void reportForLoopBuildMessages() {
for (final BuildMessage buildMessage : descriptor.getMessages()) {
final ProblemPosition position = new ProblemPosition(buildMessage.getFileRegion().getStart().getLine(),
Range.closed(buildMessage.getFileRegion().getStart().getOffset(),
buildMessage.getFileRegion().getEnd().getOffset()));
final RobotProblem problem = RobotProblem.causedBy(KeywordsProblem.INVALID_FOR_KEYWORD)
.formatMessageWith(buildMessage.getMessage());
reporter.handleProblem(problem, validationContext.getFile(), position);
}
}
private void reportUnknownVariables() {
final UnknownVariables unknownVarsValidator = new UnknownVariables(validationContext,
AttributesAugmentingReportingStrategy.withLocalVarFixer(reporter));
unknownVarsValidator.reportUnknownVarsDeclarations(additionalVariables, descriptor.getUsedVariables());
}
}
|
[
"michalanglart@users.noreply.github.com"
] |
michalanglart@users.noreply.github.com
|
14d1d8a3b072222a28245a598052b410ee117ca1
|
01ebbc94cd4d2c63501c2ebd64b8f757ac4b9544
|
/backend/gxqpt-pt/gxqpt-ops-api/src/main/java/com/hengyunsoft/platform/ops/servicedto/TrainManageDTO.java
|
fc5ebcbcba3a92f2657c490384963e6ebd122dcd
|
[] |
no_license
|
KevinAnYuan/gxq
|
60529e527eadbbe63a8ecbbad6aaa0dea5a61168
|
9b59f4e82597332a70576f43e3f365c41d5cfbee
|
refs/heads/main
| 2023-01-04T19:35:18.615146
| 2020-10-27T06:24:37
| 2020-10-27T06:24:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,315
|
java
|
package com.hengyunsoft.platform.ops.servicedto;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "TrainManageDTO", description = "培训申请请求参数")
public class TrainManageDTO {
/**
* 培训id
*/
@ApiModelProperty(value = "培训id,修改时候传")
private Long id;
/**
* 培训类别
*/
@ApiModelProperty(value = "培训类别")
private String trainType;
/**
* 培训名称
*/
@ApiModelProperty(value = "培训名称")
private String trainName;
/**
* 培训地点
*/
@ApiModelProperty(value = "培训地点")
private String trainAddress;
/**
* 培训时间
*/
@ApiModelProperty(value = "培训时间",required = false)
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date trainTime;
/**
* 培训内容
*/
@ApiModelProperty(value = "培训内容")
private String trainInfo;
/**
* 提交单位
*/
@ApiModelProperty(value = "提交单位")
private String company;
}
|
[
"470382668@qq.com"
] |
470382668@qq.com
|
8f349c366e501f76d6b54c1f00810cf31af213b5
|
e42c98daf48cb6b70e3dbd5f5af3517d901a06ab
|
/modules/uctool-manager/src/main/java/com/cisco/axl/api/_10/XCallForwardNoAnswerInt.java
|
5c3bc6db1ec97a8a909404b1858ec45d92027d42
|
[] |
no_license
|
mgnext/UCTOOL
|
c238d8f295e689a8babcc1156eb0b487cba31da0
|
5e7aeb422a33b3cf33fca0231616ac0416d02f1a
|
refs/heads/master
| 2020-06-03T04:07:57.650216
| 2015-08-07T10:44:04
| 2015-08-07T10:44:04
| 39,693,900
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,186
|
java
|
package com.cisco.axl.api._10;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for XCallForwardNoAnswerInt complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="XCallForwardNoAnswerInt">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence minOccurs="0">
* <element name="forwardToVoiceMail" type="{http://www.cisco.com/AXL/API/10.5}boolean" minOccurs="0"/>
* <element name="callingSearchSpaceName" type="{http://www.cisco.com/AXL/API/10.5}XFkType"/>
* <element name="destination" type="{http://www.cisco.com/AXL/API/10.5}String50" minOccurs="0"/>
* <element name="duration" type="{http://www.cisco.com/AXL/API/10.5}XInteger" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "XCallForwardNoAnswerInt", propOrder = {
"forwardToVoiceMail",
"callingSearchSpaceName",
"destination",
"duration"
})
public class XCallForwardNoAnswerInt {
protected String forwardToVoiceMail;
@XmlElementRef(name = "callingSearchSpaceName", type = JAXBElement.class, required = false)
protected JAXBElement<XFkType> callingSearchSpaceName;
@XmlElementRef(name = "destination", type = JAXBElement.class, required = false)
protected JAXBElement<String> destination;
@XmlElementRef(name = "duration", type = JAXBElement.class, required = false)
protected JAXBElement<String> duration;
/**
* Gets the value of the forwardToVoiceMail property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getForwardToVoiceMail() {
return forwardToVoiceMail;
}
/**
* Sets the value of the forwardToVoiceMail property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setForwardToVoiceMail(String value) {
this.forwardToVoiceMail = value;
}
/**
* Gets the value of the callingSearchSpaceName property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link XFkType }{@code >}
*
*/
public JAXBElement<XFkType> getCallingSearchSpaceName() {
return callingSearchSpaceName;
}
/**
* Sets the value of the callingSearchSpaceName property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link XFkType }{@code >}
*
*/
public void setCallingSearchSpaceName(JAXBElement<XFkType> value) {
this.callingSearchSpaceName = value;
}
/**
* Gets the value of the destination property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public JAXBElement<String> getDestination() {
return destination;
}
/**
* Sets the value of the destination property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public void setDestination(JAXBElement<String> value) {
this.destination = value;
}
/**
* Gets the value of the duration property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public JAXBElement<String> getDuration() {
return duration;
}
/**
* Sets the value of the duration property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public void setDuration(JAXBElement<String> value) {
this.duration = value;
}
}
|
[
"agentmilindu@gmail.com"
] |
agentmilindu@gmail.com
|
cf451b11013fb7841ae17089e18fb4efd1aa5939
|
006de6d78677e9af6013f10ac71fd26c55e10095
|
/src/main/java/com/briup/demo/bean/Ex/IndexResult.java
|
b5a99257570ffe5fc7c6fa0d268912300f2bd878
|
[] |
no_license
|
18573811202/CMS
|
8a5ab6b22cd7b015d67ef5d00ecdce728d05faeb
|
4145efa9a32812c59a09c7e504e1a8aba52b920e
|
refs/heads/master
| 2022-06-22T10:23:59.544969
| 2020-04-08T12:45:46
| 2020-04-08T12:45:46
| 254,083,977
| 1
| 0
| null | 2022-06-21T03:10:00
| 2020-04-08T12:40:02
|
Java
|
UTF-8
|
Java
| false
| false
| 782
|
java
|
package com.briup.demo.bean.Ex;
import java.io.Serializable;
import java.util.List;
import com.briup.demo.bean.Link;
/**
* 保存首页是所有数据
* @author 亮澳
*
*/
public class IndexResult implements Serializable {
private static final long serialVersionUID = 1L;
private List<CategoryEx> categoryExs;
private List<Link> ink;
public List<CategoryEx> getCategoryExs() {
return categoryExs;
}
public void setCategoryExs(List<CategoryEx> categoryExs) {
this.categoryExs = categoryExs;
}
public List<Link> getInk() {
return ink;
}
public void setInk(List<Link> ink) {
this.ink = ink;
}
public IndexResult(List<CategoryEx> categoryExs, List<Link> ink) {
super();
this.categoryExs = categoryExs;
this.ink = ink;
}
public IndexResult() {
}
}
|
[
"1"
] |
1
|
880673238bdd4b999ee7bb67be961a8092cca1d4
|
7098f2d71cb0699a46a11c2db96e76285d35727c
|
/dss-src/apps/tlmanager/tlmanager-app/src/main/java/eu/europa/ec/markt/tlmanager/model/AdditionalServiceInformationAdapter.java
|
c50861f2be9c67778fdd787aaf339d87a5955043
|
[] |
no_license
|
p4535992/sd-dss-3.0.3
|
4344521a309efaacd1798ed4bd7e7ef37a69f874
|
b2fa77670267732daca5d86a5e46a9f71bd16247
|
refs/heads/master
| 2021-08-30T11:07:59.383832
| 2017-12-17T15:07:14
| 2017-12-17T15:07:14
| 112,770,373
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,484
|
java
|
/*
* DSS - Digital Signature Services
*
* Copyright (C) 2011 European Commission, Directorate-General Internal Market and Services (DG MARKT), B-1049 Bruxelles/Brussel
*
* Developed by: 2011 ARHS Developments S.A. (rue Nicolas Bové 2B, L-1253 Luxembourg) http://www.arhs-developments.com
*
* This file is part of the "DSS - Digital Signature Services" project.
*
* "DSS - Digital Signature Services" is free software: you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* DSS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along with
* "DSS - Digital Signature Services". If not, see <http://www.gnu.org/licenses/>.
*/
package eu.europa.ec.markt.tlmanager.model;
import eu.europa.ec.markt.tlmanager.core.Configuration;
import eu.europa.ec.markt.tlmanager.core.QNames;
import eu.europa.ec.markt.tlmanager.util.Util;
import eu.europa.ec.markt.tlmanager.view.multivalue.MultipleModel;
import eu.europa.ec.markt.tlmanager.view.panel.AdditionalServiceInformationModel;
import eu.europa.ec.markt.tsl.jaxb.tsl.AdditionalServiceInformationType;
import eu.europa.ec.markt.tsl.jaxb.tsl.ExtensionType;
import eu.europa.ec.markt.tsl.jaxb.tsl.NonEmptyMultiLangURIType;
import javax.xml.bind.JAXBElement;
import java.awt.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Adapter for a list of <code>AdditionalServiceInformationType</code>. It implements the <code>MultipleModel</code> and
* uses a hashmap as working copy of the managed entries. On request, the bean is updated and given back.
*
*
* @version $Revision: 2525 $ - $Date: 2013-09-13 17:10:46 +0200 (ven., 13 sept. 2013) $
*/
public class AdditionalServiceInformationAdapter implements MultipleModel<AdditionalServiceInformationModel> {
private List<ExtensionType> extensionTypes;
private Map<String, AdditionalServiceInformationModel> values = new HashMap<String, AdditionalServiceInformationModel>();
private String initialValueKey = null;
private int createdEntryCounter = 0;
/**
* Instantiates a new additional service information adapter.
*
* @param extensionTypes the additional service information extension
*/
public AdditionalServiceInformationAdapter(List<ExtensionType> extensionTypes) {
this.extensionTypes = extensionTypes;
initialValueKey = Util.getInitialCounterItem();
// Note: There may be other Extensions in the provided list besides the ASI
List<ExtensionType> matchingExtensionTypes = Util.extractMatching(extensionTypes,
QNames._AdditionalServiceInformation_QNAME.getLocalPart(), false);
if (!matchingExtensionTypes.isEmpty()) {
for (ExtensionType extension : matchingExtensionTypes) {
AdditionalServiceInformationModel model = new AdditionalServiceInformationModel();
model.setCritical(extension.isCritical());
JAXBElement<?> element = Util.extractJAXBElement(extension);
AdditionalServiceInformationType value = (AdditionalServiceInformationType) element.getValue();
NonEmptyMultiLangURIType uri = value.getURI();
// uri.getLang() // here, lang will always be 'en'
model.setAdditionalInformationURI(uri.getValue());
model.setServiceInformationClassification(value.getInformationValue());
setValue(Util.getCounterItem(createdEntryCounter++), model);
}
} else {
createNewItem();
}
}
/** {@inheritDoc} */
@Override
public AdditionalServiceInformationModel getValue(String key) {
return values.get(key);
}
/** {@inheritDoc} */
@Override
public void setValue(String key, AdditionalServiceInformationModel value) {
if (value instanceof AdditionalServiceInformationModel) {
values.put(key, (AdditionalServiceInformationModel) value);
}
}
/** {@inheritDoc} */
@Override
public void removeItem(String key) {
values.remove(key);
}
/** {@inheritDoc} */
@Override
public void updateBeanValues() {
List<ExtensionType> nevv = getExtensionTypes();
extensionTypes.clear();
extensionTypes.addAll(nevv);
}
/** {@inheritDoc} */
@Override
public String createNewItem() {
String key = Util.getCounterItem(createdEntryCounter++);
setValue(key, new AdditionalServiceInformationModel());
return key;
}
/** {@inheritDoc} */
@Override
public String getInitialValueKey() {
return initialValueKey;
}
/**
* Rebuild the list of <code>ExtensionType</code> by going through the value map. Other <code>ExtensionType</code>,
* that do not match the AdditionalServiceInformation_QName have to stay unharmed and have to be carried over.
*
* @return the list of all <code>ExtensionType</code>
*/
public List<ExtensionType> getExtensionTypes() {
List<ExtensionType> list = new ArrayList<ExtensionType>();
AdditionalServiceInformationType additionalServiceInformation = new AdditionalServiceInformationType();
for (AdditionalServiceInformationModel value : values.values()) {
ExtensionType extensionType = new ExtensionType();
extensionType.setCritical(value.isCritical());
AdditionalServiceInformationType asi = new AdditionalServiceInformationType();
asi.setInformationValue(value.getServiceInformationClassification());
NonEmptyMultiLangURIType nemlut = new NonEmptyMultiLangURIType();
nemlut.setLang(Configuration.LanguageCodes.getEnglishLanguage());
nemlut.setValue(value.getAdditionalInformationURI());
asi.setURI(nemlut);
JAXBElement<AdditionalServiceInformationType> element = new JAXBElement<AdditionalServiceInformationType>(
QNames._AdditionalServiceInformation_QNAME, AdditionalServiceInformationType.class, null, asi);
extensionType.getContent().add(element);
list.add(extensionType);
}
List<ExtensionType> notMatching = Util.extractMatching(extensionTypes,
QNames._AdditionalServiceInformation_QNAME.getLocalPart(), true);
list.addAll(notMatching); // these are the extensiontypes, which have to be just carried along
return list;
}
/** {@inheritDoc} */
@Override
public List<String> getKeys() {
return new ArrayList<String>(values.keySet());
}
/** {@inheritDoc} */
@Override
public int size() {
int size = 0;
for (AdditionalServiceInformationModel value : values.values()) {
if (!value.isEmpty()) {
size++;
}
}
return size;
}
@Override
public Dimension getRecommendedDialogSize() {
return null;
}
/** {@inheritDoc} */
@Override
public boolean isEmpty() {
return size() == 0;
}
}
|
[
"tentimarco0@gmail.com"
] |
tentimarco0@gmail.com
|
e83ca3197a0bff347ebe11118b269214632d0a6d
|
0ddb1b811a26e422a42972cc3bdf13672f696b00
|
/server/src/main/java/com/erzhiqianyi/mall/domain/DateAudit.java
|
706207da80b71f28af5b16a9c60bbde19cf9bf59
|
[
"Apache-2.0"
] |
permissive
|
erzhiqianyi/wechat_mini_program
|
f46b40b3d8206cfd0359c3fb506824e06c9058da
|
44c9dd4544364a52c28a698dcd03da03f5791c5e
|
refs/heads/master
| 2022-06-26T23:26:16.364955
| 2020-08-27T09:30:20
| 2020-08-27T09:30:20
| 174,367,658
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 890
|
java
|
package com.erzhiqianyi.mall.domain;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import javax.persistence.Column;
import javax.persistence.EntityListeners;
import javax.persistence.MappedSuperclass;
import java.io.Serializable;
import java.time.Instant;
@MappedSuperclass
@EntityListeners(AuditingEntityListener.class)
@JsonIgnoreProperties(value = {"createdAt", "updatedAt"}, allowGetters = true)
@Data
public abstract class DateAudit implements Serializable {
@CreatedDate
@Column(nullable = false)
private Instant createAt;
@LastModifiedDate
@Column(nullable = false)
private Instant updateAt;
}
|
[
"github@caofeng.me"
] |
github@caofeng.me
|
19ea9f4ed7547ce628d1124d5035c3626466b11e
|
fe9e1e526d2a103a023d01d907bef329569c1066
|
/disconnect-highcharts/src/main/java/com/github/fluorumlabs/disconnect/highcharts/SeriesSankeyOptions.java
|
d4f840c6feaf35aa1e95bc1c5838213b61dcad4b
|
[
"Apache-2.0"
] |
permissive
|
Heap-leak/disconnect-project
|
0a7946b4c79ec25cb6a602ebb220a64b90f0db94
|
04f6d77d4db3c385bcbeb5b701c97bd411540059
|
refs/heads/master
| 2022-11-14T05:23:30.074640
| 2020-04-29T14:14:47
| 2020-04-29T14:14:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,097
|
java
|
package com.github.fluorumlabs.disconnect.highcharts;
import javax.annotation.Nullable;
import js.extras.JsEnum;
import js.util.collections.Array;
import org.teavm.jso.JSProperty;
/**
* (Highcharts) A <code>sankey</code> series. If the type option is not specified, it is
* inherited from chart.type.
*
* Configuration options for the series are given in three levels:
*
* <ol>
* <li>
* Options for all series in a chart are defined in the plotOptions.series
* object.
*
* </li>
* <li>
* Options for all <code>sankey</code> series are defined in plotOptions.sankey.
*
* </li>
* <li>
* Options for one single series are given in the series instance array.
*
* </li>
* </ol>
* (see online documentation for example)
*
* @see <a href="https://api.highcharts.com/highcharts/series.sankey">https://api.highcharts.com/highcharts/series.sankey</a>
*
*/
public interface SeriesSankeyOptions extends PlotSankeyOptions, SeriesOptions {
/**
* (Highcharts) An array of data points for the series. For the <code>sankey</code>
* series type, points can be given in the following way:
*
* An array of objects with named values. The following snippet shows only a
* few settings, see the complete options set below. If the total number of
* data points exceeds the series' turboThreshold, this option is not
* available.(see online documentation for example)
*
* @see <a href="https://api.highcharts.com/highcharts/series.sankey.data">https://api.highcharts.com/highcharts/series.sankey.data</a>
*
* @implspec data?: Array<SeriesSankeyDataOptions>;
*
*/
@JSProperty("data")
@Nullable
Array<SeriesSankeyDataOptions> getData();
/**
* (Highcharts) An array of data points for the series. For the <code>sankey</code>
* series type, points can be given in the following way:
*
* An array of objects with named values. The following snippet shows only a
* few settings, see the complete options set below. If the total number of
* data points exceeds the series' turboThreshold, this option is not
* available.(see online documentation for example)
*
* @see <a href="https://api.highcharts.com/highcharts/series.sankey.data">https://api.highcharts.com/highcharts/series.sankey.data</a>
*
* @implspec data?: Array<SeriesSankeyDataOptions>;
*
*/
@JSProperty("data")
void setData(Array<SeriesSankeyDataOptions> value);
/**
* (Highcharts, Highstock, Highmaps) This property is only in TypeScript
* non-optional and might be <code>undefined</code> in series objects from unknown
* sources.
*
* @implspec type: "sankey";
*
*/
@JSProperty("type")
Type getType();
/**
* (Highcharts, Highstock, Highmaps) This property is only in TypeScript
* non-optional and might be <code>undefined</code> in series objects from unknown
* sources.
*
* @implspec type: "sankey";
*
*/
@JSProperty("type")
void setType(Type value);
/**
*/
abstract class Type extends JsEnum {
public static final Type SANKEY = JsEnum.of("sankey");
}
}
|
[
"fluorumlabs@users.noreply.github.com"
] |
fluorumlabs@users.noreply.github.com
|
72fb136bd37a18b18a50602622555cbd2d9c0350
|
816176de6184ff3717db7cf33d57d1fcf59a9d27
|
/obj/Debug/android/src/md583354cc5cea02c36576f165d5ba86deb/Playing_CountDown.java
|
a005307136039c88f9074921c296cdeec02a5bb5
|
[] |
no_license
|
ShyamPandey2895/XamarinFlagsQuizApp
|
0cf1be90213d4fee36889eaa31449486be768584
|
9c6c9b6822b4e7ee8b298fe64abf11f8041c2a26
|
refs/heads/master
| 2021-06-09T05:00:54.187587
| 2016-12-10T05:12:49
| 2016-12-10T05:12:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,530
|
java
|
package md583354cc5cea02c36576f165d5ba86deb;
public class Playing_CountDown
extends android.os.CountDownTimer
implements
mono.android.IGCUserPeer
{
/** @hide */
public static final String __md_methods;
static {
__md_methods =
"n_onFinish:()V:GetOnFinishHandler\n" +
"n_onTick:(J)V:GetOnTick_JHandler\n" +
"";
mono.android.Runtime.register ("XamarinFlagsQuizApp.Acitivty.Playing+CountDown, XamarinFlagsQuizApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null", Playing_CountDown.class, __md_methods);
}
public Playing_CountDown (long p0, long p1) throws java.lang.Throwable
{
super (p0, p1);
if (getClass () == Playing_CountDown.class)
mono.android.TypeManager.Activate ("XamarinFlagsQuizApp.Acitivty.Playing+CountDown, XamarinFlagsQuizApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null", "System.Int64, mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e:System.Int64, mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e", this, new java.lang.Object[] { p0, p1 });
}
public void onFinish ()
{
n_onFinish ();
}
private native void n_onFinish ();
public void onTick (long p0)
{
n_onTick (p0);
}
private native void n_onTick (long p0);
private java.util.ArrayList refList;
public void monodroidAddReference (java.lang.Object obj)
{
if (refList == null)
refList = new java.util.ArrayList ();
refList.add (obj);
}
public void monodroidClearReferences ()
{
if (refList != null)
refList.clear ();
}
}
|
[
"eddydn@gmail.com"
] |
eddydn@gmail.com
|
52d7e5ecc653ce71b6500a0d408272486b5f7ed1
|
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
|
/checkstyle_cluster/12307/src_0.java
|
d3ec70887fe6108947129227024952fd441d75d3
|
[] |
no_license
|
martinezmatias/GenPat-data-C3
|
63cfe27efee2946831139747e6c20cf952f1d6f6
|
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
|
refs/heads/master
| 2022-04-25T17:59:03.905613
| 2020-04-15T14:41:34
| 2020-04-15T14:41:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,153
|
java
|
////////////////////////////////////////////////////////////////////////////////
// checkstyle: Checks Java source code for adherence to a set of rules.
// Copyright (C) 2001-2008 Oliver Burn
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
////////////////////////////////////////////////////////////////////////////////
package com.puppycrawl.tools.checkstyle.checks.coding;
import com.puppycrawl.tools.checkstyle.api.Check;
import com.puppycrawl.tools.checkstyle.api.DetailAST;
import com.puppycrawl.tools.checkstyle.api.TokenTypes;
/**
* Checks that no method having zero parameters is defined
* using the name <em>finalize</em>.
*
* @author fqian@google.com (Feng Qian)
* @author smckay@google.com (Steve McKay)
* @author lkuehne
*/
public class NoFinalizerCheck extends Check
{
@Override
public int[] getDefaultTokens()
{
return new int[] {TokenTypes.METHOD_DEF};
}
@Override
public void visitToken(DetailAST aAST)
{
final DetailAST mid = aAST.findFirstToken(TokenTypes.IDENT);
final String methodName = mid.getText();
if ("finalize".equals(methodName)) {
final DetailAST params = aAST.findFirstToken(TokenTypes.PARAMETERS);
final boolean hasEmptyParamList =
!params.branchContains(TokenTypes.PARAMETER_DEF);
if (hasEmptyParamList) {
log(aAST.getLineNo(), "avoid.finalizer.method");
}
}
}
}
|
[
"375833274@qq.com"
] |
375833274@qq.com
|
76fcb13f1afa96630734699cac88dcfa7d58c2e8
|
a4b9bcf602647bf48a5412ad0f7d274b1bb147a9
|
/appendix/equalshashcode/SpringDetector.java
|
efe50cf58beba2c0761fb43a190f58e811660eb7
|
[] |
no_license
|
huangketsudou/javalearning
|
5680884584771b6c9a9fb1ba5838824cd0ebb550
|
6a5b751e50007702641d14588cb90c0ea0ca0f4c
|
refs/heads/master
| 2022-11-10T14:50:08.716494
| 2020-06-25T09:12:02
| 2020-06-25T09:12:02
| 264,204,472
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,137
|
java
|
package appendix.equalshashcode;
// equalshashcode/SpringDetector.java
// What will the weather be?
import java.util.*;
import java.util.stream.*;
import java.util.function.*;
import java.lang.reflect.*;
public class SpringDetector {
public static <T extends Groundhog>
void detectSpring(Class<T> type) {
try {
Constructor<T> ghog =
type.getConstructor(int.class);
Map<Groundhog, Prediction> map =
IntStream.range(0, 10)
.mapToObj(i -> {
try {
return ghog.newInstance(i);
} catch(Exception e) {
throw new RuntimeException(e);
}
})
.collect(Collectors.toMap(
Function.identity(),
gh -> new Prediction()));
map.forEach((k, v) ->
System.out.println(k + ": " + v));
Groundhog gh = ghog.newInstance(3);
System.out.println(
"Looking up prediction for " + gh);
if(map.containsKey(gh))
System.out.println(map.get(gh));
else
System.out.println("Key not found: " + gh);
} catch(NoSuchMethodException |
IllegalAccessException |
InvocationTargetException |
InstantiationException e) {
throw new RuntimeException(e);
}
}
public static void main(String[] args) {
detectSpring(Groundhog.class);
}
}
/* Output:
Groundhog #3: Six more weeks of Winter!
Groundhog #0: Early Spring!
Groundhog #8: Six more weeks of Winter!
Groundhog #6: Early Spring!
Groundhog #4: Early Spring!
Groundhog #2: Six more weeks of Winter!
Groundhog #1: Early Spring!
Groundhog #9: Early Spring!
Groundhog #5: Six more weeks of Winter!
Groundhog #7: Six more weeks of Winter!
Looking up prediction for Groundhog #3
Key not found: Groundhog #3
*/
|
[
"1941161938@qq.com"
] |
1941161938@qq.com
|
cb1146eb692663670b1bb8efcc714fd7aecf8154
|
c7406de612eff59725824a8120d960c585da4b2c
|
/member/src/main/java/com/tomtop/member/services/webservice/rspread/GetSubscriberDetailResponseGetSubscriberDetailResult.java
|
b9835658ab53c840f3f4c29a4133979364df5dd4
|
[] |
no_license
|
liudih/tt-58
|
92b9a53a6514e13d30e4c2afbafc8de68f096dfb
|
0a921f35cc10052f20ff3f8434407dc3eabd7aa1
|
refs/heads/master
| 2021-01-20T18:02:12.917030
| 2016-06-28T04:08:30
| 2016-06-28T04:08:30
| 62,108,984
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,921
|
java
|
/**
* GetSubscriberDetailResponseGetSubscriberDetailResult.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
*/
package com.tomtop.member.services.webservice.rspread;
public class GetSubscriberDetailResponseGetSubscriberDetailResult implements java.io.Serializable, org.apache.axis.encoding.AnyContentType {
private org.apache.axis.message.MessageElement [] _any;
public GetSubscriberDetailResponseGetSubscriberDetailResult() {
}
public GetSubscriberDetailResponseGetSubscriberDetailResult(
org.apache.axis.message.MessageElement [] _any) {
this._any = _any;
}
/**
* Gets the _any value for this GetSubscriberDetailResponseGetSubscriberDetailResult.
*
* @return _any
*/
public org.apache.axis.message.MessageElement [] get_any() {
return _any;
}
/**
* Sets the _any value for this GetSubscriberDetailResponseGetSubscriberDetailResult.
*
* @param _any
*/
public void set_any(org.apache.axis.message.MessageElement [] _any) {
this._any = _any;
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof GetSubscriberDetailResponseGetSubscriberDetailResult)) return false;
GetSubscriberDetailResponseGetSubscriberDetailResult other = (GetSubscriberDetailResponseGetSubscriberDetailResult) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = true &&
((this._any==null && other.get_any()==null) ||
(this._any!=null &&
java.util.Arrays.equals(this._any, other.get_any())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = 1;
if (get_any() != null) {
for (int i=0;
i<java.lang.reflect.Array.getLength(get_any());
i++) {
java.lang.Object obj = java.lang.reflect.Array.get(get_any(), i);
if (obj != null &&
!obj.getClass().isArray()) {
_hashCode += obj.hashCode();
}
}
}
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(GetSubscriberDetailResponseGetSubscriberDetailResult.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("http://service.reasonablespread.com/", ">>GetSubscriberDetailResponse>GetSubscriberDetailResult"));
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanSerializer(
_javaType, _xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanDeserializer(
_javaType, _xmlType, typeDesc);
}
}
|
[
"liudih@qq.com"
] |
liudih@qq.com
|
092e5fecb474c6a4b30180018e5083b340338c3b
|
c91cf304f329350f1d2b0426a15d39f9496cd28f
|
/basex-core/src/main/java/org/basex/query/func/fn/FnDocumentUri.java
|
e98921c1db1555fc253ebc74469db684aead69a0
|
[
"BSD-3-Clause"
] |
permissive
|
kalibuk/basex
|
fca95dcccbee3bdad6e57684d4eb75e0c400ec9b
|
d231cf20517cee6ed55532b9f654b0acdef7b6d1
|
refs/heads/master
| 2021-01-13T04:02:00.436159
| 2017-01-02T16:30:16
| 2017-01-02T16:30:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,250
|
java
|
package org.basex.query.func.fn;
import org.basex.core.locks.*;
import org.basex.data.*;
import org.basex.query.*;
import org.basex.query.func.*;
import org.basex.query.util.*;
import org.basex.query.value.item.*;
import org.basex.query.value.node.*;
import org.basex.query.value.type.*;
import org.basex.util.*;
/**
* Function implementation.
*
* @author BaseX Team 2005-16, BSD License
* @author Christian Gruen
*/
public final class FnDocumentUri extends StandardFunc {
@Override
public Item item(final QueryContext qc, final InputInfo ii) throws QueryException {
final ANode node = toEmptyNode(ctxArg(0, qc), qc);
if(node == null || node.type != NodeType.DOC) return null;
// return empty sequence for documents constructed via parse-xml
final Data data = node.data();
if(data != null && data.meta.name.isEmpty()) return null;
final byte[] uri = node.baseURI();
return uri.length == 0 ? null : Uri.uri(uri, false);
}
@Override
public boolean has(final Flag flag) {
return exprs.length == 0 && flag == Flag.CTX || super.has(flag);
}
@Override
public boolean accept(final ASTVisitor visitor) {
return (exprs.length != 0 || visitor.lock(Locking.CONTEXT)) && super.accept(visitor);
}
}
|
[
"christian.gruen@gmail.com"
] |
christian.gruen@gmail.com
|
bbf1fd74512ed738f253df044676169647448066
|
24d8cf871b092b2d60fc85d5320e1bc761a7cbe2
|
/SQuirrel_SQL/rev4007-4051/base-branch-4007/fw/src/net/sourceforge/squirrel_sql/fw/sql/SQLDriverManager.java
|
c819e6c6014472ad8316acc528f53b5c3f94ecdc
|
[] |
no_license
|
joliebig/featurehouse_fstmerge_examples
|
af1b963537839d13e834f829cf51f8ad5e6ffe76
|
1a99c1788f0eb9f1e5d8c2ced3892d00cd9449ad
|
refs/heads/master
| 2016-09-05T10:24:50.974902
| 2013-03-28T16:28:47
| 2013-03-28T16:28:47
| 9,080,611
| 3
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,100
|
java
|
package net.sourceforge.squirrel_sql.fw.sql;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.net.MalformedURLException;
import java.sql.Connection;
import java.sql.Driver;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import net.sourceforge.squirrel_sql.fw.id.IIdentifier;
import net.sourceforge.squirrel_sql.fw.util.StringManager;
import net.sourceforge.squirrel_sql.fw.util.StringManagerFactory;
import net.sourceforge.squirrel_sql.fw.util.StringUtilities;
import net.sourceforge.squirrel_sql.fw.util.log.ILogger;
import net.sourceforge.squirrel_sql.fw.util.log.LoggerController;
public class SQLDriverManager
{
private static final StringManager s_stringMgr =
StringManagerFactory.getStringManager(SQLDriverManager.class);
private static final ILogger s_log =
LoggerController.createLogger(SQLDriverManager.class);
private Map<IIdentifier, Driver> _driverInfo =
new HashMap<IIdentifier, Driver>();
private Map<IIdentifier, SQLDriverClassLoader> _classLoaders =
new HashMap<IIdentifier, SQLDriverClassLoader>();
private MyDriverListener _myDriverListener = new MyDriverListener();
public synchronized void registerSQLDriver(ISQLDriver sqlDriver)
throws IllegalAccessException, InstantiationException,
ClassNotFoundException, MalformedURLException
{
unregisterSQLDriver(sqlDriver);
sqlDriver.addPropertyChangeListener(_myDriverListener);
SQLDriverClassLoader loader = new SQLDriverClassLoader(sqlDriver);
Driver driver =
(Driver)(Class.forName(sqlDriver.getDriverClassName(),
false,
loader).newInstance());
_driverInfo.put(sqlDriver.getIdentifier(), driver);
_classLoaders.put(sqlDriver.getIdentifier(), loader);
sqlDriver.setJDBCDriverClassLoaded(true);
}
public synchronized void unregisterSQLDriver(ISQLDriver sqlDriver)
{
sqlDriver.setJDBCDriverClassLoaded(false);
sqlDriver.removePropertyChangeListener(_myDriverListener);
_driverInfo.remove(sqlDriver.getIdentifier());
_classLoaders.remove(sqlDriver.getIdentifier());
}
public ISQLConnection getConnection(ISQLDriver sqlDriver, ISQLAlias alias,
String user, String pw)
throws ClassNotFoundException, IllegalAccessException,
InstantiationException, MalformedURLException, SQLException
{
return getConnection(sqlDriver, alias, user, pw, null);
}
public synchronized SQLConnection getConnection(ISQLDriver sqlDriver,
ISQLAlias alias, String user,
String pw,
SQLDriverPropertyCollection props)
throws ClassNotFoundException, IllegalAccessException,
InstantiationException, MalformedURLException, SQLException
{
Properties myProps = new Properties();
if (props != null)
{
props.applyTo(myProps);
}
if (user != null)
{
myProps.put("user", user);
}
if (pw != null)
{
myProps.put("password", pw);
}
Driver driver = _driverInfo.get(sqlDriver.getIdentifier());
if (driver == null)
{
s_log.debug("Loading driver that wasn't registered: " +
sqlDriver.getDriverClassName());
ClassLoader loader = new SQLDriverClassLoader(sqlDriver);
driver = (Driver)(Class.forName(sqlDriver.getDriverClassName(),
false,
loader).newInstance());
}
Connection jdbcConn = driver.connect(alias.getUrl(), myProps);
if (jdbcConn == null)
{
throw new SQLException(s_stringMgr.getString("SQLDriverManager.error.noconnection"));
}
return new SQLConnection(jdbcConn, props, sqlDriver);
}
public Driver getJDBCDriver(IIdentifier id)
{
if (id == null)
{
throw new IllegalArgumentException("IIdentifier == null");
}
return _driverInfo.get(id);
}
public SQLDriverClassLoader getSQLDriverClassLoader(ISQLDriver driver)
{
if (driver == null)
{
throw new IllegalArgumentException("SQLDriverClassLoader == null");
}
return _classLoaders.get(driver.getIdentifier());
}
private final class MyDriverListener implements PropertyChangeListener
{
public void propertyChange(PropertyChangeEvent evt)
{
final String propName = evt.getPropertyName();
if (propName == null
|| propName.equals(ISQLDriver.IPropertyNames.DRIVER_CLASS)
|| propName.equals(ISQLDriver.IPropertyNames.JARFILE_NAMES))
{
Object obj = evt.getSource();
if (obj instanceof ISQLDriver)
{
ISQLDriver driver = (ISQLDriver) obj;
SQLDriverManager.this.unregisterSQLDriver(driver);
try
{
SQLDriverManager.this.registerSQLDriver(driver);
}
catch (IllegalAccessException ex)
{
s_log.error("Unable to create instance of Class "
+ driver.getDriverClassName()
+ " for JDBC driver "
+ driver.getName(), ex);
}
catch (InstantiationException ex)
{
s_log.error("Unable to create instance of Class "
+ driver.getDriverClassName()
+ " for JDBC driver "
+ driver.getName(), ex);
}
catch (MalformedURLException ex)
{
s_log.error("Unable to create instance of Class "
+ driver.getDriverClassName()
+ " for JDBC driver "
+ driver.getName(), ex);
}
catch (ClassNotFoundException ex)
{
String[] jars = driver.getJarFileNames();
String jarFileList = "<empty list>";
if (jars != null) {
jarFileList =
"[ " + StringUtilities.join(jars, ", ") + " ]";
}
s_log.error("Unable to find Driver Class "
+ driver.getDriverClassName()
+ " for JDBC driver "
+ driver.getName()
+ "; jar filenames = "+jarFileList);
}
}
else
{
s_log.error("SqlDriverManager.MyDriverListener is listening to a non-ISQLDriver");
}
}
}
}
}
|
[
"joliebig@fim.uni-passau.de"
] |
joliebig@fim.uni-passau.de
|
3a95ceea7ddd9188a96830eeca21817a21e1b4d6
|
96a7d93cb61cef2719fab90742e2fe1b56356d29
|
/selected projects/mobile/Signal-Android-4.60.5/app/src/main/java/org/thoughtcrime/securesms/groups/ui/GroupMemberEntry.java
|
24df4655a57612ad6dede02e2674a332045fa9a4
|
[
"MIT"
] |
permissive
|
danielogen/msc_research
|
cb1c0d271bd92369f56160790ee0d4f355f273be
|
0b6644c11c6152510707d5d6eaf3fab640b3ce7a
|
refs/heads/main
| 2023-03-22T03:59:14.408318
| 2021-03-04T11:54:49
| 2021-03-04T11:54:49
| 307,107,229
| 0
| 1
|
MIT
| 2021-03-04T11:54:49
| 2020-10-25T13:39:50
|
Java
|
UTF-8
|
Java
| false
| false
| 6,108
|
java
|
package org.thoughtcrime.securesms.groups.ui;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.lifecycle.LiveData;
import org.signal.zkgroup.groups.UuidCiphertext;
import org.thoughtcrime.securesms.recipients.Recipient;
import org.thoughtcrime.securesms.util.DefaultValueLiveData;
import java.util.Collection;
public abstract class GroupMemberEntry {
private final DefaultValueLiveData<Boolean> busy = new DefaultValueLiveData<>(false);
private GroupMemberEntry() {
}
public LiveData<Boolean> getBusy() {
return busy;
}
public void setBusy(boolean busy) {
this.busy.postValue(busy);
}
@Override
public abstract boolean equals(@Nullable Object obj);
@Override
public abstract int hashCode();
abstract boolean sameId(@NonNull GroupMemberEntry newItem);
public final static class NewGroupCandidate extends GroupMemberEntry {
private final DefaultValueLiveData<Boolean> isSelected = new DefaultValueLiveData<>(false);
private final Recipient member;
public NewGroupCandidate(@NonNull Recipient member) {
this.member = member;
}
public @NonNull Recipient getMember() {
return member;
}
public @NonNull LiveData<Boolean> isSelected() {
return isSelected;
}
public void setSelected(boolean isSelected) {
this.isSelected.postValue(isSelected);
}
@Override
boolean sameId(@NonNull GroupMemberEntry newItem) {
if (getClass() != newItem.getClass()) return false;
return member.getId().equals(((NewGroupCandidate) newItem).member.getId());
}
@Override
public boolean equals(@Nullable Object obj) {
if (!(obj instanceof NewGroupCandidate)) return false;
NewGroupCandidate other = (NewGroupCandidate) obj;
return other.member.equals(member);
}
@Override
public int hashCode() {
return member.hashCode();
}
}
public final static class FullMember extends GroupMemberEntry {
private final Recipient member;
private final boolean isAdmin;
public FullMember(@NonNull Recipient member, boolean isAdmin) {
this.member = member;
this.isAdmin = isAdmin;
}
public Recipient getMember() {
return member;
}
public boolean isAdmin() {
return isAdmin;
}
@Override
boolean sameId(@NonNull GroupMemberEntry newItem) {
if (getClass() != newItem.getClass()) return false;
return member.getId().equals(((GroupMemberEntry.FullMember) newItem).member.getId());
}
@Override
public boolean equals(@Nullable Object obj) {
if (!(obj instanceof FullMember)) return false;
FullMember other = (FullMember) obj;
return other.member.equals(member) &&
other.isAdmin == isAdmin;
}
@Override
public int hashCode() {
return member.hashCode() * 31 + (isAdmin ? 1 : 0);
}
}
public final static class PendingMember extends GroupMemberEntry {
private final Recipient invitee;
private final UuidCiphertext inviteeCipherText;
private final boolean cancellable;
public PendingMember(@NonNull Recipient invitee, @NonNull UuidCiphertext inviteeCipherText, boolean cancellable) {
this.invitee = invitee;
this.inviteeCipherText = inviteeCipherText;
this.cancellable = cancellable;
}
public Recipient getInvitee() {
return invitee;
}
public UuidCiphertext getInviteeCipherText() {
return inviteeCipherText;
}
public boolean isCancellable() {
return cancellable;
}
@Override
boolean sameId(@NonNull GroupMemberEntry newItem) {
if (getClass() != newItem.getClass()) return false;
return invitee.getId().equals(((GroupMemberEntry.PendingMember) newItem).invitee.getId());
}
@Override
public boolean equals(@Nullable Object obj) {
if (!(obj instanceof PendingMember)) return false;
PendingMember other = (PendingMember) obj;
return other.invitee.equals(invitee) &&
other.inviteeCipherText.equals(inviteeCipherText) &&
other.cancellable == cancellable;
}
@Override
public int hashCode() {
int hash = invitee.hashCode();
hash *= 31;
hash += inviteeCipherText.hashCode();
hash *= 31;
return hash + (cancellable ? 1 : 0);
}
}
public final static class UnknownPendingMemberCount extends GroupMemberEntry {
private final Recipient inviter;
private final Collection<UuidCiphertext> ciphertexts;
private final boolean cancellable;
public UnknownPendingMemberCount(@NonNull Recipient inviter,
@NonNull Collection<UuidCiphertext> ciphertexts,
boolean cancellable) {
this.inviter = inviter;
this.ciphertexts = ciphertexts;
this.cancellable = cancellable;
}
public Recipient getInviter() {
return inviter;
}
public int getInviteCount() {
return ciphertexts.size();
}
public Collection<UuidCiphertext> getCiphertexts() {
return ciphertexts;
}
public boolean isCancellable() {
return cancellable;
}
@Override
boolean sameId(@NonNull GroupMemberEntry newItem) {
if (getClass() != newItem.getClass()) return false;
return inviter.getId().equals(((GroupMemberEntry.UnknownPendingMemberCount) newItem).inviter.getId());
}
@Override
public boolean equals(@Nullable Object obj) {
if (!(obj instanceof UnknownPendingMemberCount)) return false;
UnknownPendingMemberCount other = (UnknownPendingMemberCount) obj;
return other.inviter.equals(inviter) &&
other.ciphertexts.equals(ciphertexts) &&
other.cancellable == cancellable;
}
@Override
public int hashCode() {
int hash = inviter.hashCode();
hash *= 31;
hash += ciphertexts.hashCode();
hash *= 31;
return hash + (cancellable ? 1 : 0);
}
}
}
|
[
"danielogen@gmail.com"
] |
danielogen@gmail.com
|
cd857003e0203abcd5ca634f0ed5b4406f61f64e
|
2bf30c31677494a379831352befde4a5e3d8ed19
|
/apisvc/src/main/java/com/emc/storageos/api/service/impl/resource/AuditService.java
|
8f6e858cb2f07627de0f650c3a1519ca2d411af8
|
[] |
no_license
|
dennywangdengyu/coprhd-controller
|
fed783054a4970c5f891e83d696a4e1e8364c424
|
116c905ae2728131e19631844eecf49566e46db9
|
refs/heads/master
| 2020-12-30T22:43:41.462865
| 2015-07-23T18:09:30
| 2015-07-23T18:09:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,304
|
java
|
/*
* Copyright 2015 EMC Corporation
* All Rights Reserved
*/
/**
* Copyright (c) 2012 EMC Corporation
* All Rights Reserved
*
* This software contains the intellectual property of EMC Corporation
* or is licensed to EMC Corporation from third parties. Use of this
* software and the intellectual property contained therein is expressly
* limited to the terms and conditions of the License Agreement under which
* it is provided by or on behalf of EMC.
*/
package com.emc.storageos.api.service.impl.resource;
import java.io.*;
import java.util.List;
import javax.ws.rs.*;
import javax.ws.rs.core.*;
import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.emc.storageos.api.service.impl.resource.utils.AuditLogRetriever;
import com.emc.storageos.api.service.impl.resource.utils.MarshallingExcetion;
import com.emc.storageos.db.client.TimeSeriesMetadata;
import com.emc.storageos.security.authorization.CheckPermission;
import com.emc.storageos.security.authorization.Role;
import com.emc.storageos.svcs.errorhandling.resources.APIException;
/**
* Audit log resource implementation
*/
@Path("/audit")
public class AuditService extends ResourceService {
final private Logger _logger = LoggerFactory.getLogger(AuditService.class);
private AuditLogRetriever _auditlogRetriever;
/**
* formats to be used to parse supported time bucket strings
*/
public static final String HOUR_BUCKET_TIME_FORMAT = "yyyy-MM-dd'T'HH";
public static final String MINUTE_BUCKET_TIME_FORMAT = "yyyy-MM-dd'T'HH:mm";
public static final String BAD_TIMEBUCKET_MSG = "Error: time_bucket parameter format supplied is not valid.\n"
+ "Acceptable formats: yyyy-MM-dd'T'HH , yyyy-MM-dd'T'HH:mm";
/**
* getter
*/
public AuditLogRetriever getAuditLogRetriever() {
return _auditlogRetriever;
}
/**
* setter
*/
public void setAuditLogRetriever(AuditLogRetriever auditlogRetriever) {
_auditlogRetriever = auditlogRetriever;
}
/**
* Retrieves the bulk auditlogs and alerts in a specified time bucket (minute
* or hour).
*
* @param timeBucket Time bucket for retrieval of auditlogs. Acceptable
* formats are: yyyy-MM-dd'T'HH for hour bucket,
* yyyy-MM-dd'T'HH:mm for minute bucket
* @param language Lanuage for the auditlog description. "en_US" by default
* @brief Show audit logs for time period
* @return Output stream of auditlogs or an error status.
*/
@GET
@Path("/logs")
@Produces( { MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@CheckPermission(roles = { Role.SYSTEM_AUDITOR })
public Response getAuditLogs(@QueryParam("time_bucket") final String timeBucket,
@QueryParam("language") @DefaultValue("en_US") final String language, @Context HttpHeaders header) {
ArgValidator.checkFieldNotNull(timeBucket, "time_bucket");
_logger.debug("getAuditLogs: timebucket: {}", timeBucket);
MediaType mType = MediaType.APPLICATION_XML_TYPE;
List<MediaType> mTypes = header.getAcceptableMediaTypes();
if (mTypes != null) {
for (MediaType media : mTypes) {
if (media.equals(MediaType.APPLICATION_JSON_TYPE)
|| media.equals(MediaType.APPLICATION_XML_TYPE)) {
mType = media;
break;
}
}
}
return Response.ok(getStreamOutput(timeBucket, mType, language), mType).build();
}
/**
* Return an output stream object as http response entity so that the client
* could stream potentially large response.
*
* @param time - the time bucket to retrieve auditlogs.
* @param type - media type of the response.
* @param lang - language of output. style: en_US
* @return - the stream object from which client retrieves response message
* body.
*/
private StreamingOutput getStreamOutput(final String time, final MediaType type,
final String lang) {
return new StreamingOutput() {
@Override
public void write(OutputStream outputStream) {
// try two time formats which are supported
DateTimeFormatter hourBucketFormat = DateTimeFormat.forPattern(
HOUR_BUCKET_TIME_FORMAT).withZoneUTC();
DateTimeFormatter minuteBucketFormat = DateTimeFormat.forPattern(
MINUTE_BUCKET_TIME_FORMAT).withZoneUTC();
DateTime timeBucket = null;
TimeSeriesMetadata.TimeBucket timeBucketGran = TimeSeriesMetadata.TimeBucket.HOUR;
try {
if ((null != time) && (time.length() == HOUR_BUCKET_TIME_FORMAT.length() - 2)) {
timeBucket = hourBucketFormat.parseDateTime(time);
timeBucketGran = TimeSeriesMetadata.TimeBucket.HOUR;
} else if ((null != time)
&& (time.length() == MINUTE_BUCKET_TIME_FORMAT.length() - 2)) {
timeBucket = minuteBucketFormat.parseDateTime(time);
timeBucketGran = TimeSeriesMetadata.TimeBucket.MINUTE;
} else {
throw APIException.badRequests.invalidTimeBucket(time);
}
} catch (final IllegalArgumentException e) {
throw APIException.badRequests.invalidTimeBucket(time, e);
}
if (timeBucket == null) {
throw APIException.badRequests.invalidTimeBucket(time);
}
BufferedWriter out = new BufferedWriter(new OutputStreamWriter(outputStream));
try {
getAuditLogs(timeBucket, timeBucketGran, type, lang, out);
} catch (MarshallingExcetion e) {
_logger.error("retrieving event error", e);
} finally {
try {
out.close();
} catch (IOException e) {
_logger.error("stream close error", e);
}
}
}
};
}
/**
* Retrieve auditlogs from underlying source through a streamed writer
*
* @param time - the time bucket within which to retrieve auditlogs from.
* @param bucket - granularity of the time bucket, can be hour or minute.
* @param type - media type of the auditlogs to be streamed.
* @param writer - the writer into which the auditlogs to be streamed.
* @throws MarshallingExcetion - internal marshalling error on auditlog
* object.
*/
private void getAuditLogs(DateTime time, TimeSeriesMetadata.TimeBucket bucket, MediaType type,
String lang, Writer writer) throws MarshallingExcetion {
if (_auditlogRetriever == null) {
throw APIException.internalServerErrors.noAuditLogRetriever();
}
_auditlogRetriever.getBulkAuditLogs(time, bucket, type, lang, writer);
}
}
|
[
"review-coprhd@coprhd.org"
] |
review-coprhd@coprhd.org
|
b96e74a9a70fb9bf7ad8ea16f098a03254a43c68
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/34/34_26008ff924d8795b4a0640505a9b156e1da40bda/JenaPersistentDataSourceSetup/34_26008ff924d8795b4a0640505a9b156e1da40bda_JenaPersistentDataSourceSetup_t.java
|
e6affa5b1564a0565871a165a88552541c3e5483
|
[] |
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,870
|
java
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.vitro.webapp.servlet.setup;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.hp.hpl.jena.ontology.OntModel;
import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.ModelFactory;
import edu.cornell.mannlib.vitro.webapp.dao.jena.ModelSynchronizer;
public class JenaPersistentDataSourceSetup extends JenaDataSourceSetupBase
implements ServletContextListener {
private static final Log log = LogFactory.getLog(
JenaPersistentDataSourceSetup.class.getName());
@Override
public void contextInitialized(ServletContextEvent sce) {
ServletContext ctx = sce.getServletContext();
if (AbortStartup.isStartupAborted(ctx)) {
return;
}
// user accounts Model
try {
Model userAccountsDbModel = makeDBModelFromConfigurationProperties(
JENA_USER_ACCOUNTS_MODEL, DB_ONT_MODEL_SPEC, ctx);
if (userAccountsDbModel.size() == 0) {
firstStartup = true;
readOntologyFilesInPathSet(AUTHPATH, sce.getServletContext(),
userAccountsDbModel);
}
OntModel userAccountsModel = ModelFactory.createOntologyModel(
MEM_ONT_MODEL_SPEC);
userAccountsModel.add(userAccountsDbModel);
userAccountsModel.getBaseModel().register(
new ModelSynchronizer(userAccountsDbModel));
sce.getServletContext().setAttribute(
"userAccountsOntModel", userAccountsModel);
if (userAccountsModel.isEmpty()) {
initializeUserAccounts(ctx, userAccountsModel);
}
} catch (Throwable t) {
log.error("Unable to load user accounts model from DB", t);
}
// display, editing and navigation Model
try {
Model appDbModel = makeDBModelFromConfigurationProperties(
JENA_DISPLAY_METADATA_MODEL, DB_ONT_MODEL_SPEC, ctx);
if (appDbModel.size() == 0)
readOntologyFilesInPathSet(
APPPATH, sce.getServletContext(),appDbModel);
OntModel appModel = ModelFactory.createOntologyModel(
MEM_ONT_MODEL_SPEC);
appModel.add(appDbModel);
appModel.getBaseModel().register(new ModelSynchronizer(appDbModel));
ctx.setAttribute("displayOntModel", appModel);
} catch (Throwable t) {
log.error("Unable to load user application configuration model from DB", t);
}
//display tbox - currently reading in every time
try {
Model displayTboxModel = makeDBModelFromConfigurationProperties(
JENA_DISPLAY_TBOX_MODEL, DB_ONT_MODEL_SPEC, ctx);
//Reading in single file every time
//TODO: Check if original needs to be cleared/removed every time?
readOntologyFileFromPath(APPPATH_LOAD + "displayTBOX.n3", displayTboxModel, sce.getServletContext());
OntModel appTBOXModel = ModelFactory.createOntologyModel(
MEM_ONT_MODEL_SPEC);
appTBOXModel.add(displayTboxModel);
appTBOXModel.getBaseModel().register(new ModelSynchronizer(displayTboxModel));
ctx.setAttribute("displayOntModelTBOX", appTBOXModel);
} catch (Throwable t) {
log.error("Unable to load user application configuration model TBOX from DB", t);
}
//Display Display model, currently empty, create if doesn't exist but no files to load
try {
Model displayDisplayModel = makeDBModelFromConfigurationProperties(
JENA_DISPLAY_DISPLAY_MODEL, DB_ONT_MODEL_SPEC, ctx);
//Reading in single file every time
//TODO: Check if original needs to be cleared/removed every time?
readOntologyFileFromPath(APPPATH_LOAD + "displayDisplay.n3", displayDisplayModel, sce.getServletContext());
OntModel appDisplayDisplayModel = ModelFactory.createOntologyModel(
MEM_ONT_MODEL_SPEC);
appDisplayDisplayModel.add(displayDisplayModel);
appDisplayDisplayModel.getBaseModel().register(new ModelSynchronizer(displayDisplayModel));
ctx.setAttribute("displayOntModelDisplayModel", appDisplayDisplayModel);
} catch (Throwable t) {
log.error("Unable to load user application configuration model Display Model from DB", t);
}
}
@Override
public void contextDestroyed(ServletContextEvent sce) {
// Nothing to do.
}
private void initializeUserAccounts(ServletContext ctx,
Model userAccountsModel) {
readOntologyFilesInPathSet(AUTHPATH, ctx, userAccountsModel);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
0f94d001e2fadf59e673595306e92715bf7c776f
|
df712303b969d53bc48ed907f447826cf2327b1e
|
/src/main/java/com/meiqi/dsmanager/po/sms/SMSServiceResponseData.java
|
c827bcd5b1b462dc7b936c7d6be56a87c4031a82
|
[] |
no_license
|
weimingtom/DSORM
|
d452b7034a69e08853ca9101282b6f62564f919a
|
e80f730e7494a5d794cc44da4c7d4f28f90c0850
|
refs/heads/master
| 2021-01-09T20:37:12.755144
| 2016-05-03T02:43:31
| 2016-05-03T02:43:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 702
|
java
|
package com.meiqi.dsmanager.po.sms;
import java.util.List;
import java.util.Map;
import com.meiqi.dsmanager.po.ResponseBaseData;
/**
* @author 作者 xubao
* @version 创建时间:2015年6月9日 下午3:07:55 类说明 对短信模板进行增删改查返回的数据
*/
public class SMSServiceResponseData extends ResponseBaseData {
Map<String, Object> rowMap;
List<Map<String, Object>> rows;
public Map<String, Object> getRowMap() {
return rowMap;
}
public void setRowMap(Map<String, Object> rowMap) {
this.rowMap = rowMap;
}
public List<Map<String, Object>> getRows() {
return rows;
}
public void setRows(List<Map<String, Object>> rows) {
this.rows = rows;
}
}
|
[
"2785739797@qq.com"
] |
2785739797@qq.com
|
4dcde5d61703c1683b5ca1da8b09e907e7dff760
|
1f9f97d0c229f51b135a47747285803b2f2958e5
|
/src/main/java/charpter11_handle_generation_relationship/ver07_extract_superclass/after_refactor2/Department.java
|
eb3e0fe4becd2300039799b42af0b49b8665edc8
|
[] |
no_license
|
caoxincx/refactoring
|
d7b61491a55fd92fa67b34ded641761dda0f5a4e
|
81403352a5ae93d99633d38522026d85def8b642
|
refs/heads/master
| 2020-09-22T09:57:17.563242
| 2019-12-01T10:28:37
| 2019-12-01T10:28:37
| 225,147,145
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 787
|
java
|
package charpter11_handle_generation_relationship.ver07_extract_superclass.after_refactor2;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
* 需求编号:2019D0519
* 问题编号:
* 开发人员: caoxin
* 创建日期:2019/11/28
* 功能描述:
* 修改日期:2019/11/28
* 修改描述:
*/
public class Department extends Party {
private List<Party> partys = new ArrayList<>();
protected Department(String name) {
super(name);
}
protected int getAnnualCost() {
return partys.stream().filter(Objects::nonNull).map(i->i.getAnnualCost()).reduce(0,Integer::sum);
}
public void addParty(Party party) {
partys.add(party);
}
public int getHeadCount() {
return partys.size();
}
}
|
[
"120972361@qq.com"
] |
120972361@qq.com
|
1ed7be8ed40abe5cd029acfefb908892c0a73721
|
263b9556d76279459ab9942b0005a911e2b085c5
|
/src/main/java/com/alipay/api/domain/AlipayDataDataserviceShoppingmallrecVoucherQueryModel.java
|
6d00fa55b79d843482fd7c3cd0299caea6c11989
|
[
"Apache-2.0"
] |
permissive
|
getsgock/alipay-sdk-java-all
|
1c98ffe7cb5601c715b4f4b956e6c2b41a067647
|
1ee16a85df59c08fb9a9b06755743711d5cd9814
|
refs/heads/master
| 2020-03-30T05:42:59.554699
| 2018-09-19T06:17:22
| 2018-09-19T06:17:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,952
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 商场券推荐
*
* @author auto create
* @since 1.0, 2017-08-15 19:53:24
*/
public class AlipayDataDataserviceShoppingmallrecVoucherQueryModel extends AlipayObject {
private static final long serialVersionUID = 4748323266376969677L;
/**
* 纬度;注:高德坐标系。经纬度是门店搜索和活动推荐的重要参数,录入时请确保经纬度参数准确。高德经纬度查询:http://lbs.amap.com/console/show/picker
*/
@ApiField("latitude")
private String latitude;
/**
* 经度;注:高德坐标系。经纬度是门店搜索和活动推荐的重要参数,录入时请确保经纬度参数准确。高德经纬度查询:http://lbs.amap.com/console/show/picker
*/
@ApiField("longitude")
private String longitude;
/**
* 系统内商场的唯一标识id
*/
@ApiField("mall_id")
private String mallId;
/**
* 本次请求的全局唯一标识, 支持英文字母和数字, 由开发者自行定义
*/
@ApiField("request_id")
private String requestId;
/**
* 系统内支付宝用户唯一标识id. 支付宝用户号是以2088开头的纯数字组成
*/
@ApiField("user_id")
private String userId;
public String getLatitude() {
return this.latitude;
}
public void setLatitude(String latitude) {
this.latitude = latitude;
}
public String getLongitude() {
return this.longitude;
}
public void setLongitude(String longitude) {
this.longitude = longitude;
}
public String getMallId() {
return this.mallId;
}
public void setMallId(String mallId) {
this.mallId = mallId;
}
public String getRequestId() {
return this.requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
public String getUserId() {
return this.userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
}
|
[
"liuqun.lq@alibaba-inc.com"
] |
liuqun.lq@alibaba-inc.com
|
4cf377fb8253337b45e1c0e83fb30769788eabed
|
79c19666c35943338e4514e5d9c96125129bd861
|
/src/main/java/cn/jmu/marxism/mapper/UserMapper.java
|
f7a6e934178cce1d90e740a16ced917ad25712a2
|
[] |
no_license
|
qbzhou/marxismCLassWebsite
|
4dbd003d8068af5d5a312221cce8bb5523b0b02c
|
c00c1410243ec2106e590ddcc0d743f3eced148b
|
refs/heads/master
| 2022-11-06T17:11:54.711756
| 2020-06-23T09:55:27
| 2020-06-23T09:55:27
| 273,631,693
| 0
| 0
| null | 2020-06-20T03:31:17
| 2020-06-20T03:31:16
| null |
UTF-8
|
Java
| false
| false
| 1,295
|
java
|
package cn.jmu.marxism.mapper;
import cn.jmu.marxism.userManagement.model.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
/**
* @author PlumK
* @version 1.0
* @date 2020/6/17 10:52
* User映射
*/
@Repository
public interface UserMapper {
/**
* 通过id查找用户
* @param userId
* @return User对象
*/
@Select("select * from user where userId = #{userId}")
User getUserById(@Param("userId") int userId);
/**
* 用户登录
* @param username 用户名
* @param password 密码
* @return
*/
@Select("select * from user where username = #{username} and password=MD5(#{password})")
User userLogin(@Param("username") String username, @Param("password") String password);
/**
* 用户注册
* @param username 用户名
* @param password 密码
* @param identification 身份,S(学生)或T(老师)
* @return
*/
@Select("insert into user (username, password, identification) values (#{username},MD5(#{password}),#{identification})")
Integer register(@Param("username") String username, @Param("password") String password, @Param("identification") String identification);
}
|
[
"test@qq.com"
] |
test@qq.com
|
d203132e2c3e0d470628b50af001b9e46eec0f81
|
f40ba0be10e056339daf3be94b80363ed46bc416
|
/src/main/java/doNotSolve/codewars/kyu5/mySmallestCodeInterpreter_20201022/BrainLuck.java
|
027d53df471463f81bfd4ccb33158b3f514b3e36
|
[] |
no_license
|
JinHoooooou/codeWarsChallenge
|
e94a3d078389bc35eb25928ddc6c963f5878eb3e
|
4f6cbc7351e6f027f2451b5237db05aa1dc5f857
|
refs/heads/master
| 2022-05-21T03:04:36.139987
| 2021-10-25T06:29:05
| 2021-10-25T06:29:05
| 253,538,045
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,025
|
java
|
package doNotSolve.codewars.kyu5.mySmallestCodeInterpreter_20201022;
import java.util.*;
public class BrainLuck {
private String code;
private ArrayList<Character> memory;
public BrainLuck(String code) {
this.code = code;
this.memory = new ArrayList<>();
}
public String process(String input) {
int inputPointer = 0, memoryPointer = 0;
String result = "";
for (int i = 0; i < code.length(); i++) {
char c = code.charAt(i);
if (c == '>') {
memoryPointer++;
} else if (c == '<') {
memoryPointer--;
} else if (c == '+') {
saveToMemory(memoryPointer, (char) (getFromMemory(memoryPointer) + 1));
} else if (c == '-') {
saveToMemory(memoryPointer, (char) (getFromMemory(memoryPointer) - 1));
} else if (c == '.') {
result += getFromMemory(memoryPointer);
} else if (c == ',') {
saveToMemory(memoryPointer, input.charAt(inputPointer));
inputPointer++;
} else if (c == '[') {
if (getFromMemory(memoryPointer) == 0) {
i = getMatching('[', ']', i, 1);
}
} else if (c == ']') {
if (getFromMemory(memoryPointer) != 0) {
i = getMatching(']', '[', i, -1);
}
}
}
return result;
}
private void saveToMemory(int index, char input) {
if (input > 255) {
input = 0;
} else if (input < 0) {
input = 255;
}
for (int i = memory.size(); i <= index; i++) {
memory.add((char) 0);
}
memory.set(index, input);
}
private char getFromMemory(int index) {
if (index >= memory.size()) {
return 0;
} else {
return memory.get(index);
}
}
private int getMatching(char x, char match, int i, int dir) {
int count = 0;
while (i > 0 && i <= code.length()) {
if (code.charAt(i) == x) {
count++;
} else if (code.charAt(i) == match) {
count--;
}
if (count == 0) {
break;
}
i += dir;
}
return i;
}
}
|
[
"jinho4744@naver.com"
] |
jinho4744@naver.com
|
ac72977f9228bb8e1c3eae6bc808165727b2a35e
|
fe08d4dff5dc7a0d4c63624287065f74c348318a
|
/app/src/main/java/com/bfyd/easypay/utils/options/Option.java
|
fc17655ba7bb0f97dcf8a78050a5e105bd16a2ff
|
[] |
no_license
|
yukun314/EasyPay
|
f8232f1dea31a485ba99471f37685454273d4b97
|
b597419e7df7551fd84027273b0c7d2ecbf93edd
|
refs/heads/master
| 2021-01-17T17:33:21.284606
| 2016-10-14T10:17:32
| 2016-10-14T10:17:32
| 60,684,818
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 927
|
java
|
package com.bfyd.easypay.utils.options;
public abstract class Option {
public static final String PLATFORM_GROUP = "PlatformOptions";
private final String myGroup;
private final String myOptionName;
protected boolean myIsSynchronized;
protected Option(String group, String optionName) {
myGroup = group.intern();
myOptionName = optionName.intern();
myIsSynchronized = false;
}
protected final String getConfigValue(String defaultValue) {
Config config = Config.Instance();
return (config != null) ?
config.getValue(myGroup, myOptionName, defaultValue) : defaultValue;
}
protected final void setConfigValue(String value) {
Config config = Config.Instance();
if (config != null) {
config.setValue(myGroup, myOptionName, value);
}
}
protected final void unsetConfigValue() {
Config config = Config.Instance();
if (config != null) {
config.unsetValue(myGroup, myOptionName);
}
}
}
|
[
"yukun314@126.com"
] |
yukun314@126.com
|
99b8161a573f861942df8ae773c591fe4c5e5e34
|
256ea91e8680089c092a43f7145acbe6279ab0df
|
/src/main/java/com/techshroom/emergencylanding/library/lwjgl/tex/BufferedTexture.java
|
c00cfd2fc7428ac8a70eb11ffe5c200278fd3b92
|
[
"MIT"
] |
permissive
|
TechShroom/EmergencyLanding
|
35f352966ac50c24e6e88806ef9573dc66594f52
|
2cfed3e79118cc17058355da63a0fc3b9fa5164b
|
refs/heads/master
| 2021-01-17T11:22:01.897470
| 2016-09-06T23:46:28
| 2016-09-06T23:46:28
| 15,019,417
| 0
| 0
| null | 2016-09-07T06:29:07
| 2013-12-08T06:42:37
|
Java
|
UTF-8
|
Java
| false
| false
| 4,516
|
java
|
/*
* This file is part of EmergencyLanding, licensed under the MIT License (MIT).
*
* Copyright (c) TechShroom Studios <https://techshoom.com>
* Copyright (c) contributors
*
* 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 com.techshroom.emergencylanding.library.lwjgl.tex;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
import org.lwjgl.BufferUtils;
import org.lwjgl.system.Platform;
import com.flowpowered.math.vector.Vector2i;
import com.techshroom.emergencylanding.library.util.LUtils;
import de.matthiasmann.twl.utils.PNGDecoder;
import de.matthiasmann.twl.utils.PNGDecoder.Format;
public class BufferedTexture extends ELTexture {
private static final String REGEX_DOUBLE_WINDOWS_SEPERATOR = File.separator.replace("\\", "\\\\");
private static final String ENDS_WITH_DOUBLE_WINDOWS_SEPEARATOR = "^(.+)" + REGEX_DOUBLE_WINDOWS_SEPERATOR + "$",
STARTS_WITH_DOUBLE_WINDOWS_SEPERATOR = "^" + REGEX_DOUBLE_WINDOWS_SEPERATOR + "(.+)$";
public static BufferedTexture generateTexture(String parentDir, String name) {
if (parentDir == null) {
parentDir =
System.getProperty("user.home", (Platform.get() == Platform.WINDOWS ? "C:" : "") + File.separator);
}
if (name == null) {
throw new IllegalStateException("name cannot be null");
}
try {
return LUtils
.processPathData(parentDir
+ ((parentDir.matches(ENDS_WITH_DOUBLE_WINDOWS_SEPEARATOR)
|| name.matches(STARTS_WITH_DOUBLE_WINDOWS_SEPERATOR)) ? "" : File.separator)
+ name, BufferedTexture::fromInputStream);
} catch (IOException e) {
throw new RuntimeException("Error retriving stream", e);
}
}
public static BufferedTexture fromInputStream(InputStream stream) throws IOException {
// Link the PNG decoder to this stream
PNGDecoder decoder = new PNGDecoder(stream);
// Decode the PNG file in a ByteBuffer
ByteBuffer buf = ByteBuffer.allocateDirect(4 * decoder.getWidth() * decoder.getHeight());
decoder.decode(buf, decoder.getWidth() * 4, Format.RGBA);
buf.flip();
return new BufferedTexture(buf, decoder.getWidth(), decoder.getHeight());
}
private final ByteBuffer sourceBuffer;
public BufferedTexture(byte[] image, int width, int height) {
this(ByteBuffer.wrap(image), width, height);
}
public BufferedTexture(ByteBuffer image, int width, int height) {
this.dim = new Vector2i(width, height);
// We can't assume the image is a direct buffer.
// Save it for later!
this.sourceBuffer = image;
super.init();
}
@Override
public void setup() {
this.sourceBuffer.mark();
this.buf = BufferUtils.createByteBuffer(this.sourceBuffer.capacity());
this.buf.put(this.sourceBuffer);
this.sourceBuffer.reset();
this.buf.flip();
}
@Override
public boolean isLookAlike(ELTexture t) {
if (t instanceof BufferedTexture) {
BufferedTexture other = (BufferedTexture) t;
if (other.dim.equals(this.dim)) {
return this.sourceBuffer.equals(other.sourceBuffer);
}
}
return false;
}
@Override
protected void onDestruction() {
}
}
|
[
"ket1999@gmail.com"
] |
ket1999@gmail.com
|
f33b29fdc22f16355bc60003f40443705f56be69
|
45e5b8e4d43925525e60fe3bc93dc43a04962c4a
|
/nodding/libs/GlassVoice/com/google/common/base/internal/Finalizer.java
|
f43786f3fef2f30b62a05bade6e4c6e74932ff20
|
[
"BSD-3-Clause"
] |
permissive
|
ramonwirsch/glass_snippets
|
1818ba22b4c11cdb8a91714e00921028751dd405
|
2495edec63efc051e3a10bf5ed8089811200e9ad
|
refs/heads/master
| 2020-04-08T09:37:22.980415
| 2014-06-24T12:07:53
| 2014-06-24T12:07:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,087
|
java
|
package com.google.common.base.internal;
import java.lang.ref.PhantomReference;
import java.lang.ref.Reference;
import java.lang.ref.ReferenceQueue;
import java.lang.ref.WeakReference;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.logging.Level;
import java.util.logging.Logger;
public class Finalizer
implements Runnable
{
private static final String FINALIZABLE_REFERENCE = "com.google.common.base.FinalizableReference";
private static final Field inheritableThreadLocals = getInheritableThreadLocalsField();
private static final Logger logger = Logger.getLogger(Finalizer.class.getName());
private final WeakReference<Class<?>> finalizableReferenceClassReference;
private final PhantomReference<Object> frqReference;
private final ReferenceQueue<Object> queue;
private Finalizer(Class<?> paramClass, ReferenceQueue<Object> paramReferenceQueue, PhantomReference<Object> paramPhantomReference)
{
this.queue = paramReferenceQueue;
this.finalizableReferenceClassReference = new WeakReference(paramClass);
this.frqReference = paramPhantomReference;
}
private void cleanUp(Reference<?> paramReference)
throws Finalizer.ShutDown
{
Method localMethod = getFinalizeReferentMethod();
while (true)
{
paramReference.clear();
if (paramReference == this.frqReference)
throw new ShutDown(null);
try
{
localMethod.invoke(paramReference, new Object[0]);
paramReference = this.queue.poll();
if (paramReference != null)
continue;
return;
}
catch (Throwable localThrowable)
{
while (true)
logger.log(Level.SEVERE, "Error cleaning up after reference.", localThrowable);
}
}
}
private Method getFinalizeReferentMethod()
throws Finalizer.ShutDown
{
Class localClass = (Class)this.finalizableReferenceClassReference.get();
if (localClass == null)
throw new ShutDown(null);
try
{
Method localMethod = localClass.getMethod("finalizeReferent", new Class[0]);
return localMethod;
}
catch (NoSuchMethodException localNoSuchMethodException)
{
throw new AssertionError(localNoSuchMethodException);
}
}
public static Field getInheritableThreadLocalsField()
{
try
{
Field localField = Thread.class.getDeclaredField("inheritableThreadLocals");
localField.setAccessible(true);
return localField;
}
catch (Throwable localThrowable)
{
logger.log(Level.INFO, "Couldn't access Thread.inheritableThreadLocals. Reference finalizer threads will inherit thread local values.");
}
return null;
}
public static void startFinalizer(Class<?> paramClass, ReferenceQueue<Object> paramReferenceQueue, PhantomReference<Object> paramPhantomReference)
{
if (!paramClass.getName().equals("com.google.common.base.FinalizableReference"))
throw new IllegalArgumentException("Expected com.google.common.base.FinalizableReference.");
Thread localThread = new Thread(new Finalizer(paramClass, paramReferenceQueue, paramPhantomReference));
localThread.setName(Finalizer.class.getName());
localThread.setDaemon(true);
try
{
if (inheritableThreadLocals != null)
inheritableThreadLocals.set(localThread, null);
localThread.start();
return;
}
catch (Throwable localThrowable)
{
while (true)
logger.log(Level.INFO, "Failed to clear thread local values inherited by reference finalizer thread.", localThrowable);
}
}
public void run()
{
try
{
while (true)
label0: cleanUp(this.queue.remove());
}
catch (InterruptedException localInterruptedException)
{
break label0;
}
catch (ShutDown localShutDown)
{
}
}
private static class ShutDown extends Exception
{
}
}
/* Location: /home/phil/workspace/glass_hello_world/libs/GlassVoice-dex2jar.jar
* Qualified Name: com.google.common.base.internal.Finalizer
* JD-Core Version: 0.6.2
*/
|
[
"scholl@ess.tu-darmstadt.de"
] |
scholl@ess.tu-darmstadt.de
|
5d612a87c854cd0b22d52b4bf83f582d64d33b8a
|
65b7d91f6b52c5f896ffffcc9502ffa644f1110c
|
/src/com/hnmoma/driftbottle/custom/BallonImageView.java
|
93758bd309adb3222e11cddaac00999224ff94b1
|
[] |
no_license
|
szmoma/DriftBottle
|
5eb3be2c4fa5ed90a68970f173462644caba81e5
|
1db785efb27df9280eda7a1b84924daa77fbc8c1
|
refs/heads/master
| 2021-01-10T02:47:16.459681
| 2016-03-01T01:37:36
| 2016-03-01T01:37:36
| 52,838,438
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,765
|
java
|
package com.hnmoma.driftbottle.custom;
import com.hnmoma.driftbottle.util.MoMaUtil;
import android.content.Context;
import android.os.Handler;
import android.util.AttributeSet;
import android.widget.ImageView;
import android.widget.RelativeLayout;
/*
* 气球的移动
*/
public class BallonImageView extends ImageView{
Handler handler = new Handler();
class MyThread implements Runnable{
@Override
public void run() {
move();
handler.postDelayed(mt, 100);
}
}
MyThread mt = new MyThread();
private int moveY = MoMaUtil.dip2px(this.getContext(), 50),
leftMargin = MoMaUtil.dip2px(this.getContext(), 30), right,
moveX = leftMargin;
RelativeLayout.LayoutParams lp;
/**
* 0为从左往右
* 1为从右往左
*/
int flag;
public BallonImageView(Context context) {
super(context);
}
public BallonImageView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public void init(int width){
right = width - leftMargin*2;
}
private void move(){
if(moveX >= right){
flag = 1;
}else if(moveX <= leftMargin){
flag = 0;
}
if(flag==0){
moveX += 1;
}else{
moveX -= 1;
}
// moveY++;
this.layout(moveX, moveY, moveX+this.getWidth(), moveY+this.getHeight());
if(lp == null){
lp = (RelativeLayout.LayoutParams) this.getLayoutParams();
}
lp.leftMargin = moveX;
}
public void start() {
handler.post(mt);
}
public void onPause(){
handler.removeCallbacks(mt);
}
public void onResume(){
handler.post(mt);
}
public void onDestroy(){
handler.removeCallbacks(mt);
handler = null;
mt = null;
lp = null;
}
}
|
[
"admin@admin-PC"
] |
admin@admin-PC
|
5834b05fe092eea770da9a30e9631904f54e18fc
|
f50c73ef878cf1f7bb6815eb5ef26c842c2e6cd3
|
/网上书店/src/com/fk/javaServlet/LoginServlet.java
|
ab7ed267b104050276cf97a43dc2fc2cd462cdd9
|
[] |
no_license
|
FK7075/FK-001
|
ca27dcaad73bdb9956fe1d5d40835f2a67aae2e4
|
6cf87b69d63a60257384f4f2bc34ad935bcf7b60
|
refs/heads/master
| 2020-03-24T00:43:42.605342
| 2018-07-30T08:12:04
| 2018-07-30T08:12:04
| 142,304,999
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 5,405
|
java
|
package com.fk.javaServlet;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import com.fk.javaBean.Users;
import com.fk.javaBean.UsersUtil;
/**
* Servlet implementation class LoginServlet
*/
@WebServlet("/LoginServlet")
public class LoginServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public LoginServlet() {
super();
// TODO Auto-generated constructor stub
}
/**
* @throws IOException
* @throws ServletException
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
request.setCharacterEncoding("utf-8");
response.setCharacterEncoding("UTF-8");
int fk=Integer.parseInt(request.getParameter("fk"));
if(fk==1) {//用于用户登录,判断有户名是否合法,
String Uid=request.getParameter("username");
String Password=request.getParameter("userpass");
String isChick=request.getParameter("checkbox");
String id=java.net.URLEncoder.encode(Uid, "utf-8");
Cookie userIDcookie= new Cookie("userID",id);
Cookie userpasscookie=new Cookie("userPass",Password);
if(isChick!=null) {
userIDcookie.setMaxAge(7*24*60*60);
userpasscookie.setMaxAge(7*24*60*60);
}else {
userIDcookie.setMaxAge(0);
userpasscookie.setMaxAge(0);
}
response.addCookie(userIDcookie);
response.addCookie(userpasscookie);
UsersUtil ut=new UsersUtil();
Users u=new Users();
u=ut.selectByIDPass(Uid, Password);
if(u==null) {
request.getRequestDispatcher("Login.jsp?ok=ok").forward(request,response);
}else {
//将用户名和密码存入session备用
request.getSession().setAttribute("userName",u.getUid());
request.getSession().setAttribute("userPass",u.getPassword());
request.getSession().setAttribute("Perm", u.getPerm());
// 根据权限判断用户身份,从而进入不同子系统
if(u.getPerm()==1)
request.getRequestDispatcher("U_main.jsp").forward(request,response);
if(u.getPerm()==2)
request.getRequestDispatcher("A_main.jsp").forward(request,response);
if(u.getPerm()==0||u.getPerm()==-1) {
request.getRequestDispatcher("404.jsp").forward(request,response);
}
}
}
if(fk==2) {//用于普通用户注册时的用户名验证
String Uid=request.getParameter("text3");
String Password=request.getParameter("text4");
UsersUtil us=new UsersUtil();
if(us.isNuptial(Uid)) {
request.getRequestDispatcher("U_Registered.jsp?cz=on").forward(request, response);
}else {
us.addUser(Uid, Password);
request.getRequestDispatcher("OK_1.jsp?xinxi=1").forward(request, response);
}
}
if(fk==3) {//用于管理员注册时的用户名验证
String Uid=request.getParameter("text3");
String Password=request.getParameter("text4");
UsersUtil us=new UsersUtil();
if(us.isNuptial(Uid)) {
request.getRequestDispatcher("A_Add.jsp?cz=on").forward(request, response);
}else {
us.addAdmin(Uid, Password);
request.getRequestDispatcher("OK_1.jsp?xinxi=2").forward(request, response);
}
}
if(fk==4) {//修改登录密码
HttpSession session=request.getSession();
String Uid=session.getAttribute("userName").toString();
String password=request.getParameter("newPass").toString();
UsersUtil us=new UsersUtil();
int n=us.updatePass(Uid, password);
if(n==0) {
request.getRequestDispatcher("err1.jsp?xinxi=2").forward(request, response);
}
if(n==1){
request.getRequestDispatcher("OK_1.jsp?xinxi=3").forward(request, response);
}
}
if(fk==5) {
int p=Integer.parseInt(request.getParameter("p"));
String Uid=request.getParameter("xx").toString();
UsersUtil uu=new UsersUtil();
int i=uu.deleteUsrse(Uid);
if(i==1) {
if(p==2)
request.getRequestDispatcher("ok_3.jsp?op=2").forward(request, response);
else
request.getRequestDispatcher("ok_3.jsp?op=3").forward(request, response);
}
else {
if(p==2)
request.getRequestDispatcher("err3.jsp?op=2").forward(request, response);
else
request.getRequestDispatcher("err3.jsp?op=3").forward(request, response);
}
}
if(fk==6) {
String Uid=request.getParameter("Ui");
String Upass=request.getParameter("Up");
int Ur=Integer.parseInt(request.getParameter("Ur"));
int k=Integer.parseInt(request.getParameter("k"));
request.setAttribute("id", Uid);
request.setAttribute("pass", Upass);
request.setAttribute("ur", Ur);
if(k==1) {
request.getRequestDispatcher("A_correct.jsp?k=2&P=恢复管理员权限").forward(request, response);
}
if(k==2) {
request.getRequestDispatcher("U_correct.jsp?k=1&P=恢复用户权限").forward(request, response);
}
}
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
doGet(request, response);
}
}
|
[
"1814375626@qq.com"
] |
1814375626@qq.com
|
5e49f2d0dcb1d70a3894b38fb13f30cd35bf8df1
|
8cbf4e2df0cc4ad5f2118ff5ae9e5665184300a9
|
/src/com/hp/hpl/jena/n3/N3Parser.java
|
141ddcd4724f683479a60fe65c5e0e787c9f6201
|
[] |
no_license
|
ptaranti/Dominium
|
68abf2ce282f169b4c5feaa2d8ab12e3ccf6e269
|
178084e37767246ed7389a6329cbc9a5895c74d4
|
refs/heads/master
| 2020-03-18T05:25:01.501094
| 2018-05-24T15:58:14
| 2018-05-24T15:58:14
| 134,341,468
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,151
|
java
|
/*
* (c) Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007 Hewlett-Packard Development Company, LP
* [See end of file]
*/
package com.hp.hpl.jena.n3;
import java.io.* ;
import antlr.TokenStreamException;
import com.hp.hpl.jena.util.FileUtils ;
/** The formal interface to the N3 parser. Wraps up the antlr parser and lexer.
* @author Andy Seaborne
* @version $Id: N3Parser.java,v 1.9 2007/01/02 11:48:32 andy_seaborne Exp $
*/
public class N3Parser implements N3AntlrParserTokenTypes
{
N3AntlrLexer lexer = null ;
N3AntlrParser parser = null ;
public N3Parser(BufferedReader r, N3ParserEventHandler h)
{
lexer = new N3AntlrLexer(r) ;
parser = new N3AntlrParser(lexer) ;
parser.setEventHandler(h) ;
parser.setLexer(lexer) ;
}
public N3Parser(Reader r, N3ParserEventHandler h)
{
lexer = new N3AntlrLexer(r) ;
parser = new N3AntlrParser(lexer) ;
parser.setEventHandler(h) ;
parser.setLexer(lexer) ;
}
public N3Parser(InputStream in, N3ParserEventHandler h)
{
this(new BufferedReader(FileUtils.asUTF8(in)), h) ;
}
static public String[] getTokenNames() { return N3AntlrParser._tokenNames ; }
public int line() { return lexer.getLine() ; }
public int col() { return lexer.getColumn() ; }
public N3AntlrParser getParser() { return parser ; }
public N3AntlrLexer getLexer() { return lexer ; }
/** Call the top level parser rule */
public void parse() throws antlr.RecognitionException, TokenStreamException
{
parser.document() ;
}
}
/*
* (c) Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007 Hewlett-Packard Development Company, LP
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
|
[
"ptaranti@gmail.com"
] |
ptaranti@gmail.com
|
2d23fcf46395b432fbde74765a8a8bb94251b221
|
52de3147e7ce3941e0dc2676cf025965846bf16d
|
/org.dma.eclipse/src/org/dma/eclipse/swt/widgets/CustomBrowser.java
|
0475c2ac297c9c770128cf6286b65ff38e74f3e3
|
[] |
no_license
|
marcolopes/dma
|
022615160d09c526b82149c6a7da4ab347d24bc6
|
56d7e93c9f3e0958bcaca6c1ad458fd524083688
|
refs/heads/master
| 2023-08-08T02:27:48.296256
| 2023-07-31T19:44:37
| 2023-07-31T19:44:37
| 32,234,541
| 14
| 14
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,781
|
java
|
/*******************************************************************************
* Copyright 2008-2015 Marco Lopes (marcolopespt@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Contributors
* Marco Lopes (marcolopespt@gmail.com)
*******************************************************************************/
package org.dma.eclipse.swt.widgets;
import org.dma.java.util.SystemUtils;
import org.eclipse.swt.SWT;
import org.eclipse.swt.SWTError;
import org.eclipse.swt.SWTException;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
public final class CustomBrowser extends Browser {
@Override //subclassing
protected void checkSubclass() {}
public static Integer detectStyle(Composite parent) {
//WINDOWS
if (SystemUtils.IS_OS_WINDOWS) return SWT.NONE;
//LINUX e MAC
for(int style: new int[]{SWT.MOZILLA, SWT.WEBKIT}){
try{System.out.print("STYLE: "+style);
Browser b=new Browser(parent, style);
b.dispose();
return style;
}catch(SWTError e){
System.err.println(e);
}catch(SWTException e){
System.err.println(e);
}catch(Exception e){
System.err.println(e);
}
}return null;
}
/**
* Creates a Browser with a new shell as a parent
* <p>
* A new shell is created with style SWT.NONE and
* bounds are set to 0 to make it invisible.
*
* @see CustomBrowser#CustomBrowser(Display)
*/
public CustomBrowser(Display display) {
this(new Shell(display,SWT.NONE));
getShell().setBounds(0, 0, 0, 0);
}
/**
* Creates a platform dependant browser
*
* @see CustomBrowser#CustomBrowser(Composite)
*/
public CustomBrowser(Composite parent) {
this(parent, detectStyle(parent));
}
/**
* Creates a platform dependant browser
* <p>
* <b>If running on Linux or Mac</b>
* one of these should be present in VM parameters:<br>
* -Dorg.eclipse.swt.browser.DefaultType=mozilla<br>
* -Dorg.eclipse.swt.browser.DefaultType=webkit
*
* @see CustomBrowser#CustomBrowser(Composite, int)
*/
public CustomBrowser(Composite parent, int style) {
super(parent, style);
}
}
|
[
"marcolopespt@gmail.com"
] |
marcolopespt@gmail.com
|
c155c1f57958431ada25aa2db9773c0db8044782
|
e23af2c4d54c00ba76537551afe361567f394d63
|
/PhysicMasterTV-Common/app/src/main/java/com/lswuyou/tv/pm/net/response/order/GetOrderResponse.java
|
d9f3613d4bfffbccd514fe11b08167aa6a1d2ea3
|
[] |
no_license
|
00zhengfu00/prj
|
fc0fda2be28a9507afcce753077f305363d66c5c
|
29fae890a3a6941ece6c0ab21e5a98b5395727fa
|
refs/heads/master
| 2020-04-20T10:07:31.986565
| 2018-03-23T08:27:01
| 2018-03-23T08:27:01
| 168,782,201
| 1
| 0
| null | 2019-02-02T01:37:13
| 2019-02-02T01:37:13
| null |
UTF-8
|
Java
| false
| false
| 226
|
java
|
package com.lswuyou.tv.pm.net.response.order;
import com.lswuyou.tv.pm.net.response.Response;
/**
* Created by Administrator on 2016/8/18.
*/
public class GetOrderResponse extends Response {
public OrderWraper data;
}
|
[
"869981597@qq.com"
] |
869981597@qq.com
|
0b43b817b22f98f7b5d4dca3d3053187325102f4
|
fa3893cd5593cb0475e5a2308931a356c9bcab26
|
/src/org.xtuml.bp.ui.graphics/src/org/xtuml/bp/ui/graphics/policies/ConnectorEndpointEditPolicy.java
|
17a70cefeae3b272d4c1424d2ae1502314f02ecb
|
[
"Apache-2.0",
"EPL-1.0"
] |
permissive
|
leviathan747/bridgepoint
|
a2c13d615ff255eb64c8a4e21fcf1824f9eff3d5
|
cf7deed47d20290d422d4b4636e7486784d17c34
|
refs/heads/master
| 2023-08-04T11:05:10.679674
| 2023-07-06T19:10:37
| 2023-07-06T19:10:37
| 28,143,415
| 0
| 1
|
Apache-2.0
| 2023-05-08T13:26:39
| 2014-12-17T15:40:25
|
HTML
|
UTF-8
|
Java
| false
| false
| 2,037
|
java
|
package org.xtuml.bp.ui.graphics.policies;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.draw2d.ConnectionLocator;
import org.eclipse.draw2d.PolylineConnection;
import org.eclipse.gef.ConnectionEditPart;
import org.eclipse.gef.editpolicies.ConnectionEndpointEditPolicy;
import org.eclipse.gef.handles.ConnectionEndpointHandle;
import org.eclipse.gef.requests.ReconnectRequest;
import org.xtuml.bp.ui.graphics.anchors.WSAnchor;
import org.xtuml.bp.ui.graphics.handles.SnappingConnectionEndPointHandle;
public class ConnectorEndpointEditPolicy extends ConnectionEndpointEditPolicy {
private int fPreviousLineWidth = 0;
public ConnectorEndpointEditPolicy(int configuredLineWidth) {
fPreviousLineWidth = configuredLineWidth;
}
@Override
protected List<?> createSelectionHandles() {
fPreviousLineWidth = ((PolylineConnection) getHostFigure())
.getLineWidth();
if (fPreviousLineWidth == 0) {
((PolylineConnection) getConnection()).setLineWidth(2);
} else {
((PolylineConnection) getConnection())
.setLineWidth(fPreviousLineWidth * 2);
}
List<ConnectionEndpointHandle> list = new ArrayList<ConnectionEndpointHandle>();
list.add(new SnappingConnectionEndPointHandle(
(ConnectionEditPart) getHost(), ConnectionLocator.SOURCE));
list.add(new SnappingConnectionEndPointHandle(
(ConnectionEditPart) getHost(), ConnectionLocator.TARGET));
return list;
}
@Override
protected void removeSelectionHandles() {
super.removeSelectionHandles();
((PolylineConnection) getConnection()).setLineWidth(fPreviousLineWidth);
}
@Override
protected void showConnectionMoveFeedback(ReconnectRequest request) {
super.showConnectionMoveFeedback(request);
if (request.getTarget() == null) {
// never use the host figure as that will cause
// an infinite loop
WSAnchor anchor = WSAnchor.getWSAnchorFor(request, getHostFigure()
.getParent());
getFeedbackHelper(request).update(anchor, null);
}
}
}
|
[
"s.keith.brown@gmail.com"
] |
s.keith.brown@gmail.com
|
bffbc404ffe78c82fd2f83253dbfc3f5a484a088
|
492ab60eaa5619551af16c79c569bdb704b4d231
|
/src/net/sourceforge/plantuml/graph2/MagicPointsFactory2.java
|
f82647c453b5449c5c55f2bc6789a69ac26a6a80
|
[] |
no_license
|
ddcjackm/plantuml
|
36b89d07401993f6cbb109c955db4ab10a47ac78
|
4638f93975a0af9374cec8200d16e1fa180dafc2
|
refs/heads/master
| 2021-01-12T22:34:56.588483
| 2016-07-25T19:25:28
| 2016-07-25T19:25:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,242
|
java
|
/* ========================================================================
* PlantUML : a free UML diagram generator
* ========================================================================
*
* (C) Copyright 2009-2017, Arnaud Roques
*
* Project Info: http://plantuml.com
*
* This file is part of PlantUML.
*
* PlantUML 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.
*
* PlantUML 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 library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA.
*
* [Java is a trademark or registered trademark of Sun Microsystems, Inc.
* in the United States and other countries.]
*
* Original Author: Arnaud Roques
*
* Revision $Revision: 19109 $
*
*/
package net.sourceforge.plantuml.graph2;
import java.awt.geom.AffineTransform;
import java.awt.geom.Point2D;
import java.util.ArrayList;
import java.util.List;
public class MagicPointsFactory2 {
private final Point2D.Double p1;
private final Point2D.Double p2;
private final List<Point2D.Double> result = new ArrayList<Point2D.Double>();
public MagicPointsFactory2(Point2D.Double p1, Point2D.Double p2) {
this.p1 = p1;
this.p2 = p2;
final double dx = p2.x - p1.x;
final double dy = p2.y - p1.y;
final int interv = 5;
final int intervAngle = 10;
final double theta = Math.PI * 2 / intervAngle;
for (int a = 0; a < 10; a++) {
final AffineTransform at = AffineTransform.getRotateInstance(theta * a, p1.x, p1.y);
for (int i = 0; i < interv * 2; i++) {
final Point2D.Double p = new Point2D.Double(p1.x + dx * i / interv, p1.y + dy * i / interv);
result.add((Point2D.Double) at.transform(p, null));
}
}
}
public List<Point2D.Double> get() {
return result;
}
}
|
[
"plantuml@gmail.com"
] |
plantuml@gmail.com
|
395776ed01fb6574a68b874407746747595869b0
|
44b18053cdd56f054821e0af93eef1b116053bc9
|
/core/cas-server-core-services-api/src/main/java/org/apereo/cas/services/util/RegisteredServiceJsonSerializer.java
|
cf9d261d2c8fcb4c2671740ec36f6ab0f020d723
|
[
"Apache-2.0",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
dongyongok/cas
|
c364f27fe5ff10b779737f9764ea7a0f5623087b
|
45139a50fbdf5fe37302d556260395fd73a67007
|
refs/heads/master
| 2022-09-19T10:31:20.645502
| 2022-09-06T03:43:15
| 2022-09-06T03:43:15
| 231,773,571
| 0
| 0
|
Apache-2.0
| 2022-09-19T01:52:27
| 2020-01-04T14:06:27
|
Java
|
UTF-8
|
Java
| false
| false
| 1,515
|
java
|
package org.apereo.cas.services.util;
import org.apereo.cas.services.RegisteredService;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import lombok.val;
import org.apache.commons.io.FileUtils;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.http.MediaType;
import java.io.File;
import java.nio.charset.StandardCharsets;
import java.util.List;
/**
* Serializes registered services to JSON based on the Jackson JSON library.
*
* @author Misagh Moayyed
* @since 4.1.0
*/
public class RegisteredServiceJsonSerializer extends BaseRegisteredServiceSerializer {
private static final long serialVersionUID = 7645698151115635245L;
public RegisteredServiceJsonSerializer(final ConfigurableApplicationContext applicationContext) {
super(applicationContext);
}
@Override
public boolean supports(final File file) {
try {
val content = FileUtils.readFileToString(file, StandardCharsets.UTF_8.name());
return supports(content);
} catch (final Exception e) {
return false;
}
}
@Override
public boolean supports(final String content) {
return content.contains(JsonTypeInfo.Id.CLASS.getDefaultPropertyName());
}
@Override
public Class<RegisteredService> getTypeToSerialize() {
return RegisteredService.class;
}
@Override
public List<MediaType> getContentTypes() {
return List.of(MediaType.APPLICATION_JSON);
}
}
|
[
"mm1844@gmail.com"
] |
mm1844@gmail.com
|
8cb2238173a66e51fe488a21046a161c4190e2c1
|
6f31629748be043b5fef7e05c2c00b2cc0534d3f
|
/src/innerclasses/Parcel10.java
|
532990232d4e8db22646acebde795a24436d3f2d
|
[] |
no_license
|
lyzkhqby/ThinkInJava
|
a7ecf6278bea97bc30ec27233a786efdd8c3df3a
|
a90668a5f23c01d83f51b6953f6a0144451ed329
|
refs/heads/master
| 2021-05-04T18:37:36.503063
| 2018-04-12T07:14:41
| 2018-04-12T07:14:41
| 120,162,267
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 659
|
java
|
package innerclasses;
public class Parcel10 {
public Destination destination(final String dest, final float price) {
return new Destination() {
private int cost;
{
cost = Math.round(price);
if (cost > 100) {
System.out.println("Over budget!");
}
}
private String label = dest;
public String readLabel() {
return label;
}
};
}
public static void main(String[] args) {
Parcel10 p = new Parcel10();
Destination d = p.destination("Tasmania", 101.395F);
}
}
|
[
"lyzkhqby@sina.com"
] |
lyzkhqby@sina.com
|
2d4f22952c4a2f4358311763b3ff107c42061290
|
17e8438486cb3e3073966ca2c14956d3ba9209ea
|
/dso/tags/3.0.1/code/base/dso-l1/src/com/tcclient/util/ConcurrentHashMapKeySetWrapper.java
|
6254ebcf831b90f3878ce69892fd25866be92e20
|
[] |
no_license
|
sirinath/Terracotta
|
fedfc2c4f0f06c990f94b8b6c3b9c93293334345
|
00a7662b9cf530dfdb43f2dd821fa559e998c892
|
refs/heads/master
| 2021-01-23T05:41:52.414211
| 2015-07-02T15:21:54
| 2015-07-02T15:21:54
| 38,613,711
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,767
|
java
|
/*
* All content copyright (c) 2003-2008 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
*/
package com.tcclient.util;
import com.tc.object.bytecode.Manageable;
import com.tc.object.bytecode.ManagerUtil;
import com.tc.object.bytecode.TCMap;
import java.lang.reflect.Array;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
@SuppressWarnings("unchecked")
public class ConcurrentHashMapKeySetWrapper implements Set {
protected final Set realKeySet;
protected final Map map;
public ConcurrentHashMapKeySetWrapper(Map map, Set realKeySet) {
this.realKeySet = realKeySet;
this.map = map;
}
public boolean add(Object o) {
return realKeySet.add(o);
}
public boolean addAll(Collection c) {
return realKeySet.addAll(c);
}
public void clear() {
realKeySet.clear();
}
public boolean contains(Object o) {
return realKeySet.contains(o);
}
public boolean containsAll(Collection c) {
return realKeySet.containsAll(c);
}
public boolean isEmpty() {
return realKeySet.isEmpty();
}
public Iterator iterator() {
if (((Manageable)map).__tc_isManaged()) {
return new IteratorWrapper(this, realKeySet.iterator());
} else {
return realKeySet.iterator();
}
}
public boolean remove(Object o) {
if (((Manageable)map).__tc_isManaged()) {
int sizeB4 = size();
((TCMap)map).__tc_remove_logical(o);
return (size() != sizeB4);
} else {
return realKeySet.remove(o);
}
}
public boolean removeAll(Collection c) {
if (((Manageable)map).__tc_isManaged()) {
boolean modified = false;
if (size() > c.size()) {
for (Iterator i = c.iterator(); i.hasNext();) {
if (remove(i.next())) {
modified = true;
}
}
} else {
for (Iterator i = iterator(); i.hasNext();) {
if (c.contains(i.next())) {
i.remove();
modified = true;
}
}
}
return modified;
} else {
return realKeySet.removeAll(c);
}
}
public boolean retainAll(Collection c) {
if (((Manageable)map).__tc_isManaged()) {
boolean modified = false;
for (Iterator i = iterator(); i.hasNext();) {
if (!c.contains(i.next())) {
modified = true;
i.remove();
}
}
return modified;
} else {
return realKeySet.retainAll(c);
}
}
public int size() {
return realKeySet.size();
}
public Object[] toArray() {
return realKeySet.toArray();
}
public Object[] toArray(Object[] a) {
int size = size();
if (a.length < size) a = (Object[]) Array.newInstance(((Object) (a)).getClass().getComponentType(), size);
int index = 0;
for (Iterator iterator = iterator(); iterator.hasNext();) {
ManagerUtil.objectArrayChanged(a, index++, iterator.next());
}
if (a.length > size) {
ManagerUtil.objectArrayChanged(a, size, null);
}
return a;
}
private static class IteratorWrapper implements Iterator {
protected final Iterator realIterator;
protected final Set keys;
private Object latestKey;
IteratorWrapper(Set keys, Iterator realIterator) {
this.keys = keys;
this.realIterator = realIterator;
}
public void remove() {
if (latestKey == null)
throw new IllegalStateException();
keys.remove(latestKey);
latestKey = null;
}
public final boolean hasNext() {
return realIterator.hasNext();
}
public final Object next() {
latestKey = realIterator.next();
return latestKey;
}
}
}
|
[
"foshea@7fc7bbf3-cf45-46d4-be06-341739edd864"
] |
foshea@7fc7bbf3-cf45-46d4-be06-341739edd864
|
742b0ff01ac538b5b4f4c00f412f3bda6bc627d4
|
0d1835c1fbfe08dad1d59cd1f6261e706146e609
|
/CardioMRI/src/com/pixelmed/convert/EncapsulateCompressedPixelData.java
|
a748704f1366accd8bd33c1f789c5b655c699fd5
|
[
"LicenseRef-scancode-warranty-disclaimer"
] |
no_license
|
inevitably2484848/MRI
|
c57dc4313b06f47796e7ac6b200485b20af04d66
|
2185d5a9dcbe4cca09dcce49d43b77df35677f84
|
refs/heads/master
| 2021-01-14T08:25:25.978877
| 2016-04-27T19:31:10
| 2016-04-27T19:31:10
| 29,896,364
| 2
| 2
| null | 2015-11-30T23:39:51
| 2015-01-27T03:53:59
|
Java
|
UTF-8
|
Java
| false
| false
| 2,389
|
java
|
package com.pixelmed.convert;
import com.pixelmed.dicom.Attribute;
import com.pixelmed.dicom.AttributeList;
import com.pixelmed.dicom.OtherByteAttributeMultipleCompressedFrames;
import com.pixelmed.dicom.TagFromName;
import com.pixelmed.dicom.TransferSyntax;
import java.io.File;
public class EncapsulateCompressedPixelData {
/**
* <p>Create a DICOM image format file encoded in a compressed transfer syntax with the compressed bitstreams supplied from files.</p>
*
* <p>The frames will be created in the order of the input file names on the command line.</p>
*
* <p>The input DICOM file with the header is expected to have the correct Transfer Syntax UID and Pixel Data Module attribute values; any PixelData is discarded.</p>
*
* @param arg three or more parameters, the outputFile, an input DICOM file with the header, and one or more input files each containing a compressed bit stream
*/
public static void main(String arg[]) {
try {
if (arg.length >= 3) {
AttributeList list = new AttributeList();
list.read(arg[1]);
list.remove(TagFromName.PixelData); // just in case
int numberOfFrames = arg.length - 2;
File[] frameFiles = new File[numberOfFrames];
for (int f=0; f<numberOfFrames; ++f) {
frameFiles[f] = new File(arg[f+2]);
}
String transferSyntaxUID = Attribute.getSingleStringValueOrEmptyString(list,TagFromName.TransferSyntaxUID);
if (transferSyntaxUID.length() == 0) {
throw new Exception("Missing TransferSyntaxUID in input file");
}
list.removeGroupLengthAttributes();
// do NOT removeMetaInformationHeaderAttributes() ... else missing TransferSyntaxUID (do not know why list.write() does not add it)
list.remove(TagFromName.DataSetTrailingPadding);
OtherByteAttributeMultipleCompressedFrames aPixelData = new OtherByteAttributeMultipleCompressedFrames(TagFromName.PixelData,frameFiles);
list.put(aPixelData);
list.write(arg[0],transferSyntaxUID,true/*useMeta*/,true/*useBufferedStream*/);
}
else {
System.err.println("Error: Incorrect number of arguments");
System.err.println("Usage: EncapsulateCompressedPixelData outputFile dicomHeaderSourceFile inputFrame1 [inputFrame2 ...]");
System.exit(1);
}
}
catch (Exception e) {
e.printStackTrace();
}
}
}
|
[
"mhd0003@auburn.edu"
] |
mhd0003@auburn.edu
|
1988c2d6715afdae27415fd54a5946a5620a527f
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Lang/39/org/apache/commons/lang3/ArrayUtils_toPrimitive_2360.java
|
fa437732c8094a82a6edc302245e4ced4b423b72
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 5,304
|
java
|
org apach common lang3
oper arrai primit arrai code code
primit wrapper arrai code integ code
handl code code input gracefulli
except thrown code code
arrai input object arrai code code
element except method document behaviour
author apach softwar foundat
author moritz petersen
author href mailto fredrik westermarck fredrik westermarck
author nikolai metchev
author matthew hawthorn
author tim brien o'brien
author pete gieser
author gari gregori
author href mailto equinus100 hotmail ashwin
author maarten coen
version
arrai util arrayutil
convert arrai object long primit handl code code
method return code code code code input arrai
param arrai code long code arrai code code
param null valuefornul insert code code found
code code arrai code code arrai input
primit toprimit long arrai null valuefornul
arrai
arrai length
empti long arrai
result arrai length
arrai length
long arrai
result null valuefornul longvalu
result
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
600ad178666626188b278135f11176b97b0eb06d
|
0d430563d908de7cda867380b6fe85e77be11c3d
|
/workspace/DSA Programs/src/com/RandomMix/DeleteMidOfStack.java
|
eed4c1b68ba11b0b0a98eb4164c729bcfe8202c8
|
[] |
no_license
|
hshar89/MyCodes
|
e2eec3b9a2649fec04e5b391d0ca3d4d9d5ae6dc
|
e388f005353c9606873b6cafdfce1e92d13273e7
|
refs/heads/master
| 2022-12-23T00:36:01.951137
| 2020-04-03T13:39:22
| 2020-04-03T13:39:22
| 252,720,397
| 1
| 0
| null | 2022-12-16T00:35:41
| 2020-04-03T12:04:10
|
Java
|
UTF-8
|
Java
| false
| false
| 695
|
java
|
package PractiseJavaPrograms;
import java.util.Stack;
public class DeleteMidOfStack {
public static void main(String[] args) {
// TODO Auto-generated method stub
Stack<Integer> st = new Stack<Integer>();
st.push(1);
st.push(2);
st.push(3);
st.push(4);
st.push(5);
st.push(6);
deleteMid(st,st.size(),0);
}
public static Stack<Integer> deleteMid(Stack<Integer>s,int n,int curr)
{
//Your code here
if(curr == n/2){
s.pop();
return s;
}
int data = s.pop();
curr++;
s = deleteMid(s,n,curr);
s.push(data);
return s;
}
}
|
[
"harshsharma3@deloitte.com"
] |
harshsharma3@deloitte.com
|
ec1d124a28c8d8c2650aa60fef18ae8314e237b1
|
238f8c3c2eac430fa133caef1c4f8f9cd565d4cb
|
/sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/param/ByteArrayStreamWrapper.java
|
64ede5fa5f3b2aba3bbdafd331a30f3789a706e4
|
[
"MIT"
] |
permissive
|
yanjingyun/SOP
|
3f1e65cce174938ddc7b2cc0082fc23ac3a3f752
|
8515bb57720d9c1078212bed241976500f1612d2
|
refs/heads/main
| 2023-04-21T07:35:32.063725
| 2021-05-16T00:58:39
| 2021-05-16T00:58:39
| 310,877,568
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,209
|
java
|
package com.gitee.sop.servercommon.param;
import javax.servlet.ReadListener;
import javax.servlet.ServletInputStream;
import java.io.IOException;
/**
* byte数组流包装
*
* @author tanghc
*/
public class ByteArrayStreamWrapper extends ServletInputStream {
private byte[] data;
private int idx = 0;
/**
* Creates a new <code>ByteArrayStreamWrapper</code> instance.
*
* @param data a <code>byte[]</code> value
*/
public ByteArrayStreamWrapper(byte[] data) {
if (data == null) {
data = new byte[0];
}
this.data = data;
}
@Override
public int read() throws IOException {
if (idx == data.length) {
return -1;
}
// I have to AND the byte with 0xff in order to ensure that it is returned as an unsigned integer
// the lack of this was causing a weird bug when manually unzipping gzipped request bodies
return data[idx++] & 0xff;
}
@Override
public boolean isFinished() {
return true;
}
@Override
public boolean isReady() {
return true;
}
@Override
public void setReadListener(ReadListener readListener) {
}
}
|
[
"326015540@qq.com"
] |
326015540@qq.com
|
42326483cbeaa702f7f0f682f9a974b616699c8e
|
129f58086770fc74c171e9c1edfd63b4257210f3
|
/src/testcases/CWE113_HTTP_Response_Splitting/CWE113_HTTP_Response_Splitting__database_addCookieServlet_54c.java
|
80279e94bf495d40d1c26a92ba22b1dee838a1a0
|
[] |
no_license
|
glopezGitHub/Android23
|
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
|
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
|
refs/heads/master
| 2023-03-07T15:14:59.447795
| 2023-02-06T13:59:49
| 2023-02-06T13:59:49
| 6,856,387
| 0
| 3
| null | 2023-02-06T18:38:17
| 2012-11-25T22:04:23
|
Java
|
UTF-8
|
Java
| false
| false
| 1,697
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE113_HTTP_Response_Splitting__database_addCookieServlet_54c.java
Label Definition File: CWE113_HTTP_Response_Splitting.label.xml
Template File: sources-sinks-54c.tmpl.java
*/
/*
* @description
* CWE: 113 HTTP Response Splitting
* BadSource: database Read data from a database
* GoodSource: A hardcoded string
* Sinks: addCookieServlet
* GoodSink: URLEncode input
* BadSink : querystring to addCookie()
* Flow Variant: 54 Data flow: data passed as an argument from one method through three others to a fifth; all five functions are in different classes in the same package
*
* */
package testcases.CWE113_HTTP_Response_Splitting;
import testcasesupport.*;
import javax.servlet.http.*;
import java.net.URLEncoder;
public class CWE113_HTTP_Response_Splitting__database_addCookieServlet_54c
{
public void bad_sink(String data , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
(new CWE113_HTTP_Response_Splitting__database_addCookieServlet_54d()).bad_sink(data , request, response);
}
/* goodG2B() - use goodsource and badsink */
public void goodG2B_sink(String data , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
(new CWE113_HTTP_Response_Splitting__database_addCookieServlet_54d()).goodG2B_sink(data , request, response);
}
/* goodB2G() - use badsource and goodsink */
public void goodB2G_sink(String data , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
(new CWE113_HTTP_Response_Splitting__database_addCookieServlet_54d()).goodB2G_sink(data , request, response);
}
}
|
[
"guillermo.pando@gmail.com"
] |
guillermo.pando@gmail.com
|
0fad509e42d5e7ef4ba4c364d2336bfabc3dcbc0
|
54f352a242a8ad6ff5516703e91da61e08d9a9e6
|
/Source Codes/AtCoder/agc009/A/4337757.java
|
b2d56aaab7ec28a757ee1a03a8601f7cbb2a454b
|
[] |
no_license
|
Kawser-nerd/CLCDSA
|
5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb
|
aee32551795763b54acb26856ab239370cac4e75
|
refs/heads/master
| 2022-02-09T11:08:56.588303
| 2022-01-26T18:53:40
| 2022-01-26T18:53:40
| 211,783,197
| 23
| 9
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 617
|
java
|
import java.util.*;
import static java.lang.System.*;
public class Main {
public static void main(String[] $) {
Scanner sc = new Scanner(in);
int n=sc.nextInt();
long[] a=new long[n];
long[] b=new long[n];
for (int i = 0; i < n; i++) {
a[i]=sc.nextLong();
b[i]=sc.nextLong();
}
long ans=0;
for (int i = n-1; i > -1; i--) {
a[i]+=ans;
if(a[i]%b[i]!=0) {
long t = b[i] - a[i] % b[i];
ans+=t;
}
}
out.println(ans);
}
}
|
[
"kwnafi@yahoo.com"
] |
kwnafi@yahoo.com
|
95ed489b90ba1d0cf4e1a9a99735e66a2a5ddf68
|
6e81dd7321764b665aeeb146cf8e481159fb3718
|
/src/test/java/com/github/chen0040/magento/MagentoClientInventoryUnitTest.java
|
f34996cace3b30692fba5cbe1197ae00320b377e
|
[
"MIT"
] |
permissive
|
mhopkins-turnbull/java-magento-client
|
882d70f5a7c7e33d9cbf49796581cef37e75e624
|
b3b680675f09addc03ee19612d2dc0077aa8f782
|
refs/heads/master
| 2020-09-01T13:59:10.699323
| 2020-02-04T18:56:51
| 2020-02-04T18:56:51
| 218,973,948
| 0
| 0
|
MIT
| 2019-11-01T11:37:03
| 2019-11-01T11:37:03
| null |
UTF-8
|
Java
| false
| false
| 1,499
|
java
|
package com.github.chen0040.magento;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.github.chen0040.magento.models.StockItems;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testng.annotations.Test;
/**
* Created by xschen on 15/6/2017.
*/
public class MagentoClientInventoryUnitTest {
private static final Logger logger = LoggerFactory.getLogger(MagentoClientInventoryUnitTest.class);
@Test
public void test_getStockItems(){
String productSku = "product_dynamic_571";
MagentoClient client = new MagentoClient(Mediator.url);
client.loginAsAdmin(Mediator.adminUsername, Mediator.adminPassword);
logger.info("stock item: {}", JSON.toJSONString(client.inventory().getStockItems(productSku), SerializerFeature.PrettyFormat));
productSku = "B203-SKU";
logger.info("stock item: {}", JSON.toJSONString(client.inventory().getStockItems(productSku), SerializerFeature.PrettyFormat));
}
@Test
public void test_saveStockItems(){
String productSku = "product_dynamic_571";
MagentoClient client = new MagentoClient(Mediator.url);
client.loginAsAdmin(Mediator.adminUsername, Mediator.adminPassword);
productSku = "B203-SKU";
StockItems si = client.inventory().getStockItems(productSku);
si.setQty(2);
String stockId = client.inventory().saveStockItems(productSku, si);
logger.info("stock item saved: {}", stockId);
}
}
|
[
"xs0040@gmail.com"
] |
xs0040@gmail.com
|
104dced7c1c79f5fe269b733f00b7d510e59293b
|
ed2fa0fc455cb4a56669b34639bb95b25c6b7f83
|
/wen-13/Design-Test/src/main/java/nancy/modol/Student.java
|
09bad672f4c1647ce412b8411280779660f81db7
|
[] |
no_license
|
w7436/wen-Java
|
5bcc2b09faa478196218e46ff64cd23ba64da441
|
6fc9f2a336c512a0d9be70c69950ad5610b3b152
|
refs/heads/master
| 2022-11-27T07:51:28.158473
| 2020-09-11T03:49:41
| 2020-09-11T03:49:41
| 210,778,808
| 0
| 0
| null | 2022-11-16T08:36:03
| 2019-09-25T07:08:33
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 382
|
java
|
package nancy.modol;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
/**
* @ClassName Student
* @Description TODO
* @Author DELL
* @Data 2020/6/17 9:29
* @Version 1.0
**/
@Setter
@Getter
@ToString
public class Student {
private int Id;//学生ID
private String name;//姓名
private String department;//系
private int score;//成绩
}
|
[
"3239741254@qq.com"
] |
3239741254@qq.com
|
9cf9294adf888b69d442905827ad5a8dcaaa185d
|
6baf1fe00541560788e78de5244ae17a7a2b375a
|
/hollywood/com.oculus.unifiedtelemetry-UnifiedTelemetry/sources/com/oculus/ossdk/inject/DeviceAuthMethodAutoProvider.java
|
fa5e51abf4bfb43eecd1fddbff4081e4b56f670c
|
[] |
no_license
|
phwd/quest-tracker
|
286e605644fc05f00f4904e51f73d77444a78003
|
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
|
refs/heads/main
| 2023-03-29T20:33:10.959529
| 2021-04-10T22:14:11
| 2021-04-10T22:14:11
| 357,185,040
| 4
| 2
| null | 2021-04-12T12:28:09
| 2021-04-12T12:28:08
| null |
UTF-8
|
Java
| false
| false
| 364
|
java
|
package com.oculus.ossdk.inject;
import X.AbstractC0097Hv;
import X.C00208d;
import com.facebook.annotations.Generated;
import com.oculus.os.DeviceAuth;
@Generated({"By: InjectorProcessor"})
public class DeviceAuthMethodAutoProvider extends AbstractC0097Hv<DeviceAuth> {
public final Object get() {
return OsSdkModule.A01(C00208d.A00(this));
}
}
|
[
"cyuubiapps@gmail.com"
] |
cyuubiapps@gmail.com
|
5f45b408bea7b126661041b0e146d77b53e7f388
|
f00e6bb5809627b1894efcbecf9df3a560828caa
|
/ipc/src/main/java/com/wyz/manual/BookManagerImpl.java
|
9f510d976dab630e3f90856192f6d9f42896d0db
|
[] |
no_license
|
jaxwog/Demo
|
a166deab6c02e6fe195ee74a1d7029ecb9072984
|
97e558c40ec84c5a4738f7823ffe24fc2973979c
|
refs/heads/master
| 2021-01-18T18:04:39.201819
| 2017-09-12T02:51:37
| 2017-09-12T02:51:37
| 86,841,004
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,705
|
java
|
package com.wyz.manual;
import android.os.Binder;
import android.os.IBinder;
import android.os.Parcel;
import android.os.RemoteException;
import java.util.List;
/**
* Created by wangyongzheng on 2017/4/21.
*/
public class BookManagerImpl extends Binder implements IBookManager {
public BookManagerImpl() {
this.attachInterface(this, DESCRIPTOR);
}
public static IBookManager asInterface(IBinder obj) {
if ((obj == null)) {
return null;
}
android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
if (((iin != null) && (iin instanceof IBookManager))) {
return ((IBookManager) iin);
}
return new BookManagerImpl.Proxy(obj);
}
//运行在服务端
@Override
protected boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {
switch (code) {
case INTERFACE_TRANSACTION: {
reply.writeString(DESCRIPTOR);
return true;
}
case TRANSACTION_getBookList: {
data.enforceInterface(DESCRIPTOR);
List<Book> result = this.getBookList();
reply.writeNoException();
reply.writeTypedList(result);
return true;
}
case TRANSACTION_addBook: {
data.enforceInterface(DESCRIPTOR);
Book arg0;
if ((0 != data.readInt())) {
arg0 = Book.CREATOR.createFromParcel(data);
} else {
arg0 = null;
}
this.addBook(arg0);
reply.writeNoException();
return true;
}
}
return super.onTransact(code, data, reply, flags);
}
@Override
public List<Book> getBookList() throws RemoteException {
//待实现
return null;
}
@Override
public void addBook(Book book) throws RemoteException {
//待实现
}
@Override
public IBinder asBinder() {
return this;
}
//运行在客户端
private static class Proxy implements IBookManager {
private IBinder mRemote;
Proxy(IBinder obj) {
this.mRemote = obj;
}
public java.lang.String getInterfaceDescriptor() {
return DESCRIPTOR;
}
@Override
public List<Book> getBookList() throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
List<Book> result;
try {
data.writeInterfaceToken(DESCRIPTOR);
mRemote.transact(TRANSACTION_getBookList, data, reply, 0);
reply.readException();
result = reply.createTypedArrayList(Book.CREATOR);
} finally {
reply.recycle();
data.recycle();
}
return result;
}
@Override
public void addBook(Book book) throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
try {
data.writeInterfaceToken(DESCRIPTOR);
if ((book != null)) {
data.writeInt(1);
book.writeToParcel(data, 0);
} else {
data.writeInt(0);
}
mRemote.transact(TRANSACTION_addBook, data, reply, 0);
reply.readException();
} finally {
reply.recycle();
data.recycle();
}
}
@Override
public IBinder asBinder() {
return mRemote;
}
}
}
|
[
"yongzheng13@gmail.com"
] |
yongzheng13@gmail.com
|
3cf69dad88e67807c69ba8bfef4c6021105df32f
|
341ed102cd8c2e7ab9e07af58daed3c28253c1c9
|
/SistemaFat/SistemaFaturamento/src/gcom/gui/atendimentopublico/ordemservico/ConsultarComandosOSSeletivaInspecaoAnormalidadeActionForm.java
|
6fe85e4ec86e9fff7a1da5c70ee9e1092a8d6edb
|
[] |
no_license
|
Relesi/Stream
|
a2a6772c4775a66a753d5cc830c92f1098329270
|
15710d5a2bfb5e32ff8563b6f2e318079bcf99d5
|
refs/heads/master
| 2021-01-01T17:40:52.530660
| 2017-08-21T22:57:02
| 2017-08-21T22:57:02
| 98,132,060
| 2
| 0
| null | null | null | null |
ISO-8859-1
|
Java
| false
| false
| 7,589
|
java
|
/*
* Copyright (C) 2007-2007 the GSAN - Sistema Integrado de Gestão de Serviços de Saneamento
*
* This file is part of GSAN, an integrated service management system for Sanitation
*
* GSAN is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License.
*
* GSAN is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
/*
* GSAN - Sistema Integrado de Gestão de Serviços de Saneamento
* Copyright (C) <2007>
* Adriano Britto Siqueira
* Alexandre Santos Cabral
* Ana Carolina Alves Breda
* Ana Maria Andrade Cavalcante
* Aryed Lins de Araújo
* Bruno Leonardo Rodrigues Barros
* Carlos Elmano Rodrigues Ferreira
* Cláudio de Andrade Lira
* Denys Guimarães Guenes Tavares
* Eduardo Breckenfeld da Rosa Borges
* Fabíola Gomes de Araújo
* Flávio Leonardo Cavalcanti Cordeiro
* Francisco do Nascimento Júnior
* Homero Sampaio Cavalcanti
* Ivan Sérgio da Silva Júnior
* José Edmar de Siqueira
* José Thiago Tenório Lopes
* Kássia Regina Silvestre de Albuquerque
* Leonardo Luiz Vieira da Silva
* Márcio Roberto Batista da Silva
* Maria de Fátima Sampaio Leite
* Micaela Maria Coelho de Araújo
* Nelson Mendonça de Carvalho
* Newton Morais e Silva
* Pedro Alexandre Santos da Silva Filho
* Rafael Corrêa Lima e Silva
* Rafael Francisco Pinto
* Rafael Koury Monteiro
* Rafael Palermo de Araújo
* Raphael Veras Rossiter
* Roberto Sobreira Barbalho
* Rodrigo Avellar Silveira
* Rosana Carvalho Barbosa
* Sávio Luiz de Andrade Cavalcante
* Tai Mu Shih
* Thiago Augusto Souza do Nascimento
* Tiago Moreno Rodrigues
* Vivianne Barbosa Sousa
*
* Este programa é software livre; você pode redistribuí-lo e/ou
* modificá-lo sob os termos de Licença Pública Geral GNU, conforme
* publicada pela Free Software Foundation; versão 2 da
* Licença.
* Este programa é distribuído na expectativa de ser útil, mas SEM
* QUALQUER GARANTIA; sem mesmo a garantia implícita de
* COMERCIALIZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM
* PARTICULAR. Consulte a Licença Pública Geral GNU para obter mais
* detalhes.
* Você deve ter recebido uma cópia da Licença Pública Geral GNU
* junto com este programa; se não, escreva para Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307, USA.
*/
package gcom.gui.atendimentopublico.ordemservico;
import org.apache.struts.action.ActionForm;
/**
* [UC1193] Consultar Comandos de OS Seletiva de Inspeção de Anormalidade
*
* @author Vivianne Sousa, Raimundo Martins
* @since 11/07/2011
*/
public class ConsultarComandosOSSeletivaInspecaoAnormalidadeActionForm extends ActionForm {
private static final long serialVersionUID = 1L;
private String idEmpresa;
private String nomeEmpresa;
private String periodoExecucaoInicial;
private String periodoExecucaoFinal;
private Integer[] idRegistros;
private String idRegistro;
private String localidade;
private String nomeLocalidade;
private String localidadeFinal;
private String nomeLocalidadeFinal;
private String codigoSetorComercialOrigem;
private String descricaoSetorComercialOrigem;
private String codigoSetorComercialDestino;
private String descricaoSetorComercialDestino;
private String idImovel;
private String inscricaoImovel;
private String ordemServico;
private String descricaoOrdemServico;
public String getIdEmpresa() {
return idEmpresa;
}
public void setIdEmpresa(String idEmpresa) {
this.idEmpresa = idEmpresa;
}
public String getNomeEmpresa() {
return nomeEmpresa;
}
public void setNomeEmpresa(String nomeEmpresa) {
this.nomeEmpresa = nomeEmpresa;
}
public String getPeriodoExecucaoFinal() {
return periodoExecucaoFinal;
}
public void setPeriodoExecucaoFinal(String periodoExecucaoFinal) {
this.periodoExecucaoFinal = periodoExecucaoFinal;
}
public String getPeriodoExecucaoInicial() {
return periodoExecucaoInicial;
}
public void setPeriodoExecucaoInicial(String periodoExecucaoInicial) {
this.periodoExecucaoInicial = periodoExecucaoInicial;
}
public ConsultarComandosOSSeletivaInspecaoAnormalidadeActionForm(String idEmpresa, String nomeEmpresa, String periodoExecucaoInicial, String periodoExecucaoFinal) {
super();
this.idEmpresa = idEmpresa;
this.nomeEmpresa = nomeEmpresa;
this.periodoExecucaoInicial = periodoExecucaoInicial;
this.periodoExecucaoFinal = periodoExecucaoFinal;
}
public ConsultarComandosOSSeletivaInspecaoAnormalidadeActionForm() {
super();
}
public String getIdRegistro() {
return idRegistro;
}
public void setIdRegistro(String idRegistro) {
this.idRegistro = idRegistro;
}
public Integer[] getIdRegistros() {
return idRegistros;
}
public void setIdRegistros(Integer[] idRegistros) {
this.idRegistros = idRegistros;
}
public String getLocalidade() {
return localidade;
}
public void setLocalidade(String localidade) {
this.localidade = localidade;
}
public String getNomeLocalidade() {
return nomeLocalidade;
}
public void setNomeLocalidade(String nomeLocalidade) {
this.nomeLocalidade = nomeLocalidade;
}
public String getCodigoSetorComercialOrigem() {
return codigoSetorComercialOrigem;
}
public void setCodigoSetorComercialOrigem(String codigoSetorComercialOrigem) {
this.codigoSetorComercialOrigem = codigoSetorComercialOrigem;
}
public String getDescricaoSetorComercialOrigem() {
return descricaoSetorComercialOrigem;
}
public void setDescricaoSetorComercialOrigem(String descricaoSetorComercialOrigem) {
this.descricaoSetorComercialOrigem = descricaoSetorComercialOrigem;
}
public String getCodigoSetorComercialDestino() {
return codigoSetorComercialDestino;
}
public void setCodigoSetorComercialDestino(String codigoSetorComercialDestino) {
this.codigoSetorComercialDestino = codigoSetorComercialDestino;
}
public String getDescricaoSetorComercialDestino() {
return descricaoSetorComercialDestino;
}
public void setDescricaoSetorComercialDestino(String descricaoSetorComercialDestino) {
this.descricaoSetorComercialDestino = descricaoSetorComercialDestino;
}
public String getIdImovel() {
return idImovel;
}
public void setIdImovel(String idImovel) {
this.idImovel = idImovel;
}
public String getInscricaoImovel() {
return inscricaoImovel;
}
public void setInscricaoImovel(String inscricaoImovel) {
this.inscricaoImovel = inscricaoImovel;
}
public String getOrdemServico() {
return ordemServico;
}
public void setOrdemServico(String ordemServico) {
this.ordemServico = ordemServico;
}
public String getDescricaoOrdemServico() {
return descricaoOrdemServico;
}
public void setDescricaoOrdemServico(String descricaoOrdemServico) {
this.descricaoOrdemServico = descricaoOrdemServico;
}
public String getLocalidadeFinal() {
return localidadeFinal;
}
public void setLocalidadeFinal(String localidadeFinal) {
this.localidadeFinal = localidadeFinal;
}
public String getNomeLocalidadeFinal() {
return nomeLocalidadeFinal;
}
public void setNomeLocalidadeFinal(String nomeLocalidadeFinal) {
this.nomeLocalidadeFinal = nomeLocalidadeFinal;
}
}
|
[
"renatolessa.2011@hotmail.com"
] |
renatolessa.2011@hotmail.com
|
c77092bd150f77772dfdf27c23cef19f254416e1
|
9c66f726a3f346fe383c5656046a2dbeea1caa82
|
/myrobotlab/src/org/myrobotlab/j4kdemo/augmentedrealityapp/ViewerPanel3D.java
|
550783dd35ba108fc8745cb82bdbb1192bf760e3
|
[
"Apache-2.0"
] |
permissive
|
Navi-nk/Bernard-InMoov
|
c6c9e9ba22a13aa5cbe812b4c1bf5f9f9b03dd21
|
686fa377141589a38d4c9bed54de8ddd128e2bca
|
refs/heads/master
| 2021-01-21T10:29:28.949744
| 2017-05-23T05:39:28
| 2017-05-23T05:39:28
| 91,690,887
| 0
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,183
|
java
|
package org.myrobotlab.j4kdemo.augmentedrealityapp;
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
import javax.media.opengl.GL2;
import edu.ufl.digitalworlds.math.Geom;
import edu.ufl.digitalworlds.opengl.OpenGLPanel;
import edu.ufl.digitalworlds.opengl.OpenGLTexture;
import edu.ufl.digitalworlds.j4k.DepthMap;
import edu.ufl.digitalworlds.j4k.Skeleton;
import edu.ufl.digitalworlds.j4k.VideoFrame;
/*
* Copyright 2011-2014, Digital Worlds Institute, University of
* Florida, Angelos Barmpoutis.
* All rights reserved.
*
* When this program is used for academic or research purposes,
* please cite the following article that introduced this Java library:
*
* A. Barmpoutis. "Tensor Body: Real-time Reconstruction of the Human Body
* and Avatar Synthesis from RGB-D', IEEE Transactions on Cybernetics,
* October 2013, Vol. 43(5), Pages: 1347-1356.
*
* 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 this copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce this
* 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
* OWNER 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.
*/
@SuppressWarnings("serial")
public class ViewerPanel3D extends OpenGLPanel
{
private float view_rotx = 0.0f, view_roty = 0.0f, view_rotz = 0.0f;
private int prevMouseX, prevMouseY;
DepthMap current_map=null;
VideoFrame videoTexture;
Skeleton skeletons[];
OpenGLTexture xray;
OpenGLTexture box;
int mode=5;
float mem_sk[];
public void setup()
{
mem_sk=new float[25*3];
xray=new OpenGLTexture("data/xray.png");
box=new OpenGLTexture("data/box.png");
//OPENGL SPECIFIC INITIALIZATION (OPTIONAL)
GL2 gl=getGL2();
gl.glEnable(GL2.GL_CULL_FACE);
float light_model_ambient[] = {0.3f, 0.3f, 0.3f, 1.0f};
float light0_diffuse[] = {0.9f, 0.9f, 0.9f, 0.9f};
float light0_direction[] = {0.0f, -0.4f, 1.0f, 0.0f};
gl.glEnable(GL2.GL_NORMALIZE);
gl.glShadeModel(GL2.GL_SMOOTH);
gl.glLightModeli(GL2.GL_LIGHT_MODEL_LOCAL_VIEWER, GL2.GL_FALSE);
gl.glLightModeli(GL2.GL_LIGHT_MODEL_TWO_SIDE, GL2.GL_FALSE);
gl.glLightModelfv(GL2.GL_LIGHT_MODEL_AMBIENT, light_model_ambient,0);
gl.glLightfv(GL2.GL_LIGHT0, GL2.GL_DIFFUSE, light0_diffuse,0);
gl.glLightfv(GL2.GL_LIGHT0, GL2.GL_POSITION, light0_direction,0);
gl.glEnable(GL2.GL_LIGHT0);
gl.glEnable(GL2.GL_COLOR_MATERIAL);
gl.glEnable(GL2.GL_LIGHTING);
gl.glColor3f(0.9f,0.9f,0.9f);
skeletons=new Skeleton[6];
videoTexture=new VideoFrame();
background(0, 0, 0);
}
public void draw() {
GL2 gl=getGL2();
pushMatrix();
translate(0,0,-2);
rotate(view_rotx, 1.0, 0.0, 0.0);
rotate(view_roty, 0.0, 1.0, 0.0);
rotate(view_rotz, 0.0, 0.0, 1.0);
translate(0,0,2);
DepthMap map=current_map;
if(map!=null)
{
if(mode==0 || mode==1 || mode==2 || mode==3 || mode==4 || mode==5)
{
gl.glDisable(GL2.GL_LIGHTING);
gl.glEnable(GL2.GL_TEXTURE_2D);
gl.glColor3f(1f,1f,1f);
videoTexture.use(gl);
map.drawTexture(gl);
gl.glDisable(GL2.GL_TEXTURE_2D);
}
if(mode==1)
{
gl.glClear(GL2.GL_DEPTH_BUFFER_BIT);
gl.glEnable(GL2.GL_TEXTURE_2D);
xray.use(gl);
pushMatrix();
translate(0,0.05,-3);
image(0.8,2.1);
popMatrix();
gl.glDisable(GL2.GL_TEXTURE_2D);
gl.glClear(GL2.GL_DEPTH_BUFFER_BIT);
gl.glColorMask(false,false,false,false);
color(1,0,0);
pushMatrix();
translate(-0.55,0,-0.4);
rect(1,1);
popMatrix();
pushMatrix();
translate(+0.55,0,-0.4);
rect(1,1);
popMatrix();
pushMatrix();
translate(0,0.63,-0.4);
rect(1,1);
popMatrix();
pushMatrix();
translate(0,-0.63,-0.4);
rect(1,1);
popMatrix();
gl.glColorMask(true,true,true,true);
}
if(mode==1 || mode==2 || mode==3)
{
gl.glEnable(GL2.GL_LIGHTING);
gl.glDisable(GL2.GL_TEXTURE_2D);
gl.glColor3f(0.9f,0.9f,0.9f);
map.maskPlayers();
map.drawNormals(gl);
}
}
if(mode==3 || mode==4 || mode==5)
{
if(mode==3||mode==4||mode==5)gl.glClear(GL2.GL_DEPTH_BUFFER_BIT);
gl.glDisable(GL2.GL_LIGHTING);
gl.glLineWidth(2);
gl.glColor3f(1f,0f,0f);
boolean found=false;
for(int i=0;i<6 && !found;i++)
if(skeletons[i]!=null)
{
if(skeletons[i].isTracked())
{
float sk[]=skeletons[i].getJointPositions();
for(int j=0;j<sk.length;j++) mem_sk[j]=mem_sk[j]*0.8f+sk[j]*0.2f;
found=true;
}
if((mode==3 || mode==4) && skeletons[i].getTimesDrawn()<=10 && skeletons[i].isTracked())
{
skeletons[i].draw(gl);
skeletons[i].increaseTimesDrawn();
}
}
}
if(mode==5)
{
Skeleton sk=new Skeleton();
sk.setJointPositions(mem_sk);
double transf[]=Geom.identity4();
double inv_transf[]=Geom.identity4();
double s=sk.getBetweenHandsTransform(transf, inv_transf);
//System.out.println(s);
pushMatrix();
gl.glLoadIdentity();
gl.glMultMatrixd(transf,0);
gl.glScaled(s,s,s);
/*gl.glBegin(GL2.GL_LINES);
gl.glColor3f(0,0,0);gl.glVertex3d(-0.5f,0,0);gl.glColor3f(1,0,0);gl.glVertex3d(0.5f,0,0);
gl.glColor3f(0,0,0);gl.glVertex3d(0,-0.5f,0);gl.glColor3f(0,1,0);gl.glVertex3d(0,0.5f,0);
gl.glColor3f(0,0,0);gl.glVertex3d(0,0,-0.5f);gl.glColor3f(0,0,1);gl.glVertex3d(0,0,0.5f);
gl.glEnd();*/
rotateY(180);
pushMatrix();
translate(0,0,+0.4);
//rotateY(180);
color(1,1,1);
box.use(gl);
image(0.8,0.8);
popMatrix();
pushMatrix();
translate(+0.4,0,0);
rotateY(90);
color(1,1,1);
box.use(gl);
image(0.8,0.8);
popMatrix();
pushMatrix();
translate(-0.4,0,0);
rotateY(-90);
color(1,1,1);
box.use(gl);
image(0.8,0.8);
popMatrix();
pushMatrix();
translate(0,-0.4,0);
rotateX(90);
color(1,1,1);
box.use(gl);
image(0.8,0.8);
popMatrix();
pushMatrix();
translate(0,0.4,0);
rotateX(-90);
color(1,1,1);
box.use(gl);
image(0.8,0.8);
popMatrix();
popMatrix();
}
popMatrix();
}
public void mouseDragged(int x, int y, MouseEvent e) {
//Dimension size = e.getComponent().getSize();
if(isMouseButtonPressed(3)||isMouseButtonPressed(1))
{
//float thetaY = 360.0f * ( (float)(x-prevMouseX)/(float)size.width);
//float thetaX = 360.0f * ( (float)(prevMouseY-y)/(float)size.height);
//view_rotx -= thetaX;
//view_roty += thetaY;
}
prevMouseX = x;
prevMouseY = y;
}
public void mousePressed(int x, int y, MouseEvent e) {
prevMouseX = x;
prevMouseY = y;
}
public void keyPressed(char keyChar, KeyEvent e)
{
if(e.getKeyCode()==33)//page up
{
mode+=1;
if(mode>5)mode=0;
}
else if(e.getKeyCode()==34)//page down
{
mode-=1;
if(mode<0) mode=5;
}
}
}
|
[
"naval.kumar99@gmail.com"
] |
naval.kumar99@gmail.com
|
569550e1ea7a016fcdef9e6f87ed1c7e4da1eaba
|
76a8c23c3038ca1e47aca330a027a66eb07cbd78
|
/api_service/src/main/java/com/vip/yyl/config/AsyncConfiguration.java
|
5b5504df0695bb8924bf8f3bb812ca4dff5b4887
|
[] |
no_license
|
ThunderStorm1503/ApiIntelligenceRobot
|
a17c0a7b1ee33b13f2b4a88c427f47d284f0a156
|
4c8e1e8e7c953029fe143fbac4ab3547cd7ad6ca
|
refs/heads/master
| 2021-01-11T21:33:56.237708
| 2017-01-13T01:57:25
| 2017-01-13T01:57:25
| 78,805,492
| 0
| 1
| null | 2017-02-23T07:00:21
| 2017-01-13T02:02:24
|
Java
|
UTF-8
|
Java
| false
| false
| 1,616
|
java
|
package com.vip.yyl.config;
import com.vip.yyl.async.ExceptionHandlingAsyncTaskExecutor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
import org.springframework.aop.interceptor.SimpleAsyncUncaughtExceptionHandler;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.*;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import java.util.concurrent.Executor;
import javax.inject.Inject;
@Configuration
@EnableAsync
@EnableScheduling
public class AsyncConfiguration implements AsyncConfigurer {
private final Logger log = LoggerFactory.getLogger(AsyncConfiguration.class);
@Inject
private JHipsterProperties jHipsterProperties;
@Override
@Bean(name = "taskExecutor")
public Executor getAsyncExecutor() {
log.debug("Creating Async Task Executor");
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(jHipsterProperties.getAsync().getCorePoolSize());
executor.setMaxPoolSize(jHipsterProperties.getAsync().getMaxPoolSize());
executor.setQueueCapacity(jHipsterProperties.getAsync().getQueueCapacity());
executor.setThreadNamePrefix("apiservice-Executor-");
return new ExceptionHandlingAsyncTaskExecutor(executor);
}
@Override
public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() {
return new SimpleAsyncUncaughtExceptionHandler();
}
}
|
[
"king.yu@vipshop.com"
] |
king.yu@vipshop.com
|
b400f9190f55d0724fcb1567ab22675edcb92680
|
0a86fd5bbed27bc81bb95ee3d52f0808a6655126
|
/src/main/java/paleoftheancients/bandit/actions/WeirdMoveGuyAction.java
|
0eb3c185c02f395fb306ba7b24a876829f5d99e1
|
[] |
no_license
|
a-personal-account/PaleOfTheAncients
|
bfb13d7b510079d915cadfd70b13180722e8a10e
|
f1d590100796f3b3ab9903464413f6b7546a6ecc
|
refs/heads/master
| 2022-07-12T20:55:34.654067
| 2022-06-27T16:30:57
| 2022-06-27T16:30:57
| 203,721,380
| 0
| 1
| null | 2020-03-20T11:29:44
| 2019-08-22T05:36:02
|
Java
|
UTF-8
|
Java
| false
| false
| 1,437
|
java
|
package paleoftheancients.bandit.actions;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.math.Interpolation;
import com.megacrit.cardcrawl.actions.AbstractGameAction;
import paleoftheancients.bandit.board.AbstractBoard;
import paleoftheancients.bandit.board.AbstractDrone;
public class WeirdMoveGuyAction extends AbstractGameAction {
private float startX;
private float startY;
private float endX;
private float endY;
private float cur;
private float speed;
private AbstractBoard board;
private AbstractDrone drone;
public WeirdMoveGuyAction(AbstractBoard board, float x, float y, float speed, AbstractDrone drone) {
this.endX = x;
this.endY = y;
this.speed = speed;
this.cur = 0.0F;
this.drone = drone;
this.board = board;
}
public void update() {
if (this.startX == 0.0F) {
this.startX = this.drone.location.x;
this.startY = this.drone.location.y;
}
this.cur += Gdx.graphics.getDeltaTime();
if (this.cur > this.speed) {
this.cur = this.speed;
}
this.drone.location.x = (int)Interpolation.linear.apply(this.startX, this.endX, this.cur / this.speed);
this.drone.location.y = (int)Interpolation.linear.apply(this.startY, this.endY, this.cur / this.speed);
if (this.cur == this.speed) {
this.isDone = true;
}
}
}
|
[
"razash@gmail.com"
] |
razash@gmail.com
|
7f15356e99972b44d818c10a81c8fb00def7d81a
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/Atmosphere--atmosphere/33bf25198a0999a711d53191015333cc5a27541a/before/AtmosphereResourceStateRecovery.java
|
b44c2db342626db77a263b06a51577f510103640
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,001
|
java
|
/*
* Copyright 2013 Jeanfrancois Arcand
*
* 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.atmosphere.interceptor;
import org.atmosphere.cpr.Action;
import org.atmosphere.cpr.AtmosphereConfig;
import org.atmosphere.cpr.AtmosphereInterceptor;
import org.atmosphere.cpr.AtmosphereResource;
import org.atmosphere.cpr.AtmosphereResourceEvent;
import org.atmosphere.cpr.AtmosphereResourceEventListenerAdapter;
import org.atmosphere.cpr.Broadcaster;
import org.atmosphere.cpr.BroadcasterFactory;
import org.atmosphere.cpr.BroadcasterListenerAdapter;
import org.atmosphere.util.ExecutorsFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import static org.atmosphere.cpr.ApplicationConfig.STATE_RECOVERY_TIMEOUT;
/**
* This interceptor associates a {@link AtmosphereResource} to all {@link Broadcaster} the resource was added before
* the underlying connection got closed and resume. This allow an application to restore the state of the client before the
* disconnection occurred, and for the long-polling transport to return to it's previous state.
*
* @author Jeanfrancois Arcand
*/
public class AtmosphereResourceStateRecovery implements AtmosphereInterceptor {
private final static Logger logger = LoggerFactory.getLogger(AtmosphereResourceStateRecovery.class);
private final ConcurrentHashMap<String, BroadcasterTracker> states = new ConcurrentHashMap<String, BroadcasterTracker>();
private BroadcasterFactory factory;
private ScheduledExecutorService stateTracker;
private long timeout = 5 * 1000 * 60;
@Override
public void configure(AtmosphereConfig config) {
factory = config.getBroadcasterFactory();
factory.addBroadcasterListener(new B());
stateTracker = ExecutorsFactory.getScheduler(config);
String s = config.getInitParameter(STATE_RECOVERY_TIMEOUT);
if (s != null) {
timeout = Long.parseLong(s);
}
clearStateTracker();
logger.trace("{} started.", AtmosphereResourceStateRecovery.class.getName());
}
protected void clearStateTracker(){
stateTracker.scheduleAtFixedRate(new Runnable() {
@Override
public void run() {
long now = System.currentTimeMillis();
for (Map.Entry<String,BroadcasterTracker> t: states.entrySet()) {
if (now - t.getValue().lastTick() > timeout) {
logger.trace("AtmosphereResource {} state destroyed.", t.getKey());
states.remove(t.getKey());
}
}
}
}, timeout, timeout, TimeUnit.NANOSECONDS);
}
@Override
public Action inspect(final AtmosphereResource r) {
if (!r.transport().equals(AtmosphereResource.TRANSPORT.POLLING)
&& !r.transport().equals(AtmosphereResource.TRANSPORT.AJAX)) {
r.addEventListener(new AtmosphereResourceEventListenerAdapter() {
@Override
public void onPreSuspend(AtmosphereResourceEvent e) {
// We have state
BroadcasterTracker tracker = track(r).tick();
for (String broadcasterID : tracker.ids()) {
Broadcaster b = factory.lookup(broadcasterID, false);
if (b != null && !b.getID().equalsIgnoreCase(r.getBroadcaster().getID())) {
logger.trace("Associate AtmosphereResource {} with Broadcaster {}", r.uuid(), broadcasterID);
b.addAtmosphereResource(r);
} else {
logger.trace("Broadcaster {} is no longer available", broadcasterID);
}
}
r.removeEventListener(this);
}
});
}
return Action.CONTINUE;
}
private BroadcasterTracker track(AtmosphereResource r) {
BroadcasterTracker tracker = states.get(r.uuid());
if (tracker == null) {
tracker = new BroadcasterTracker();
states.put(r.uuid(), tracker);
logger.trace("AtmosphereResource {} state now tracked", r.uuid());
}
return tracker;
}
@Override
public void postInspect(AtmosphereResource r) {
}
public final class B extends BroadcasterListenerAdapter {
@Override
public void onAddAtmosphereResource(Broadcaster b, AtmosphereResource r) {
BroadcasterTracker t = states.get(r.uuid());
if (t == null) {
t = track(r);
}
t.add(b);
}
@Override
public void onRemoveAtmosphereResource(Broadcaster b, AtmosphereResource r) {
// We track cancelled and resumed connection only.
BroadcasterTracker t = states.get(r.uuid());
if (t != null && !r.isCancelled() && !r.isResumed()) {
t.remove(b);
} else {
logger.trace("Keeping the state of {} with broadcaster {}", r.uuid(), b.getID());
}
}
}
public final static class BroadcasterTracker {
private final List<String> broadcasterIds;
private long tick;
public BroadcasterTracker() {
this.broadcasterIds = new LinkedList<String>();
tick = System.currentTimeMillis();
}
public BroadcasterTracker add(Broadcaster b) {
logger.trace("Adding {}", b.getID());
broadcasterIds.add(b.getID());
return this;
}
public BroadcasterTracker remove(Broadcaster b) {
logger.trace("Removing {}", b.getID());
broadcasterIds.remove(b.getID());
return this;
}
public List<String> ids() {
return broadcasterIds;
}
public BroadcasterTracker tick(){
tick = System.currentTimeMillis();
return this;
}
public long lastTick(){
return tick;
}
}
public ConcurrentHashMap<String, BroadcasterTracker> states(){
return states;
}
@Override
public String toString(){
return "AtmosphereResource state recovery";
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
e12e26eaa60e8b174a031c71a9c300dd2a771cc1
|
c52d10478436bd84b4641e2ccbc8e30175d63edc
|
/domino-jna/src/main/java/com/mindoo/domino/jna/constants/Compression.java
|
18b5ffe3622687dfe8b46b2efd6080608cb6f9d8
|
[
"Apache-2.0"
] |
permissive
|
klehmann/domino-jna
|
a04f90cbd44f6b724ccce03a9beca2814a8c4f22
|
4820a406702bbaab5de13ab6cd92409ab9ad199c
|
refs/heads/master
| 2023-05-26T13:58:42.713347
| 2022-05-31T13:27:03
| 2022-05-31T13:27:48
| 54,467,476
| 72
| 23
|
Apache-2.0
| 2023-04-14T18:50:03
| 2016-03-22T10:48:44
|
Java
|
UTF-8
|
Java
| false
| false
| 488
|
java
|
package com.mindoo.domino.jna.constants;
/**
* Specifies compression algorithm used when attaching file to a note.
*
* @author Karsten Lehmann
*/
public enum Compression {
/** no compression */
NONE(0),
/** huffman encoding for compression */
HUFF(1),
/** LZ1 compression */
LZ1(2),
/** Huffman compression even if server supports LZ1 */
RECOMPRESS_HUFF(3);
private int m_val;
Compression(int val) {
m_val = val;
}
public int getValue() {
return m_val;
}
}
|
[
"karsten.lehmann@mindoo.de"
] |
karsten.lehmann@mindoo.de
|
9b3eb478ef63d4909cddbf75ddf2cd80383d4fe7
|
cca3d472da06b62c11a074f0451749ef3ed552c5
|
/packages/SystemUI/src/com/android/systemui/ssos/batterybar/Prefs.java
|
a88fb11d3f0d1f0eda4413a20f9b5ea218a0924b
|
[
"Apache-2.0",
"LicenseRef-scancode-unicode"
] |
permissive
|
MezzLasha/android_frameworks_base-1
|
2ede647ef1d3e527b12ddea596255ee03ff91763
|
8b133a7af88e785645f94a121dc43042f9667dee
|
refs/heads/android_11
| 2023-07-06T23:34:51.078358
| 2021-08-06T15:48:35
| 2021-08-06T15:48:35
| 314,557,896
| 0
| 0
|
NOASSERTION
| 2020-11-20T13:11:53
| 2020-11-20T13:11:52
| null |
UTF-8
|
Java
| false
| false
| 1,515
|
java
|
/*
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.systemui.ssos.batterybar;
import android.content.Context;
import android.content.SharedPreferences;
public class Prefs {
private static final String SHARED_PREFS_NAME = "status_bar";
public static final String LAST_BATTERY_LEVEL = "last_battery_level";
public static SharedPreferences read(Context context) {
return context.getSharedPreferences(Prefs.SHARED_PREFS_NAME, Context.MODE_PRIVATE);
}
public static SharedPreferences.Editor edit(Context context) {
return context.getSharedPreferences(Prefs.SHARED_PREFS_NAME, Context.MODE_PRIVATE).edit();
}
public static void setLastBatteryLevel(Context context, int level) {
edit(context).putInt(LAST_BATTERY_LEVEL, level).commit();
}
public static int getLastBatteryLevel(Context context) {
return read(context).getInt(LAST_BATTERY_LEVEL, 50);
}
}
|
[
"ashutoshsundresh@gmail.com"
] |
ashutoshsundresh@gmail.com
|
1836ab256dc16f456269ee71dd756205274cf8dd
|
3891d7793e5f9036ecb9e2999fc43e9975057ac5
|
/src/main/java/com/curd/springbootdemo/entity/Employee.java
|
47614fbbaebed9f1f3cd3dcc808400b388307fc2
|
[] |
no_license
|
liuliangyun/thoughtworks_week6_SpringBootPractice1
|
5c94735ad28a28ed078fff4baf0a10e7b709a5e3
|
664fa7100821d01ed19305a2336aa46b2733621d
|
refs/heads/master
| 2020-03-14T12:05:40.588064
| 2018-04-30T14:13:41
| 2018-04-30T14:13:41
| 131,604,295
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 935
|
java
|
package com.curd.springbootdemo.entity;
import org.hibernate.annotations.Table;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
/**
* Created by Liu
*/
@Entity
public class Employee {
@Id
private Integer id;
private String name;
private Integer age;
private String gender;
//必须要有构造函数
public Employee() {
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getAge() {
return age;
}
public void setAge(Integer age) {
this.age = age;
}
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
}
|
[
"you@example.com"
] |
you@example.com
|
b34cae026d64ceaa95e31abdbf4133a3e7c07c64
|
40cd4da5514eb920e6a6889e82590e48720c3d38
|
/desktop/applis/apps/bean/bean_games/presidentbean/src/main/java/cards/president/beans/RulesPresidentBean.java
|
5c538b8115e4442ab6e9ce34bd73698689fd9660
|
[] |
no_license
|
Cardman/projects
|
02704237e81868f8cb614abb37468cebb4ef4b31
|
23a9477dd736795c3af10bccccb3cdfa10c8123c
|
refs/heads/master
| 2023-08-17T11:27:41.999350
| 2023-08-15T07:09:28
| 2023-08-15T07:09:28
| 34,724,613
| 4
| 0
| null | 2020-10-13T08:08:38
| 2015-04-28T10:39:03
|
Java
|
UTF-8
|
Java
| false
| false
| 3,360
|
java
|
package cards.president.beans;
import cards.consts.CoreResourcesAccess;
import cards.consts.EnumCardsExporterUtil;
import cards.consts.MixCardsChoice;
import cards.president.HandPresident;
import cards.president.RulesPresident;
import cards.president.enumerations.EqualtyPlaying;
import cards.president.enumerations.PresidentResoucesAccess;
import code.bean.Bean;
import code.format.Format;
public final class RulesPresidentBean extends Bean {
private String cartesBattues;
private int nbPlayers = 4;
private int nbStacks = 1;
private String equalty = "";
private boolean possibleReversing;
private boolean hasToPlay;
private boolean loosingIfFinishByBestCards = true;
private boolean switchCards = true;
private boolean looserStartsFirst = true;
private byte nbCardsPerPlayerMin;
private byte nbCardsPerPlayerMax;
private RulesPresident dataBase;
public RulesPresident db() {
return dataBase;
}
public void setDataBase(RulesPresident _dataBase) {
dataBase = _dataBase;
}
@Override
public void beforeDisplaying() {
RulesPresident rules_ = db();
cartesBattues=toString(rules_.getCommon().getMixedCards(), rules_.getCommon().getGeneral());
nbPlayers = rules_.getNbPlayers();
nbStacks = rules_.getNbStacks();
equalty = toString(rules_.getEqualty(), rules_.getCommon().getSpecific());
possibleReversing = rules_.isPossibleReversing();
hasToPlay = rules_.isHasToPlay();
loosingIfFinishByBestCards = rules_.isLoosingIfFinishByBestCards();
switchCards = rules_.isSwitchCards();
looserStartsFirst = rules_.isLooserStartsFirst();
int nbCards_ = HandPresident.pileBase().total() * nbStacks;
nbCardsPerPlayerMin = (byte) (nbCards_ / nbPlayers);
nbCardsPerPlayerMax = nbCardsPerPlayerMin;
if (nbCards_ % nbPlayers > 0) {
nbCardsPerPlayerMax++;
}
}
static String toString(MixCardsChoice _b, String _file) {
return Format.getConstanteLangue(key(_b), _file);
}
static String key(MixCardsChoice _b) {
return Format.concatParts(CoreResourcesAccess.MIX, EnumCardsExporterUtil.fromMixCardsChoice(_b));
}
static String toString(EqualtyPlaying _b, String _file){
return Format.getConstanteLangue(PresidentResoucesAccess.key(_b), _file);
}
public boolean sameAmount() {
return nbCardsPerPlayerMin == nbCardsPerPlayerMax;
}
public String getCartesBattues() {
return cartesBattues;
}
public int getNbPlayers() {
return nbPlayers;
}
public int getNbStacks() {
return nbStacks;
}
public String getEqualty() {
return equalty;
}
public boolean isPossibleReversing() {
return possibleReversing;
}
public boolean isHasToPlay() {
return hasToPlay;
}
public boolean isLoosingIfFinishByBestCards() {
return loosingIfFinishByBestCards;
}
public boolean isSwitchCards() {
return switchCards;
}
public boolean isLooserStartsFirst() {
return looserStartsFirst;
}
public byte getNbCardsPerPlayerMin() {
return nbCardsPerPlayerMin;
}
public byte getNbCardsPerPlayerMax() {
return nbCardsPerPlayerMax;
}
}
|
[
"f.desrochettes@gmail.com"
] |
f.desrochettes@gmail.com
|
95841a4effb0340aaefd13bedbf9449a9138881b
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/alibaba--druid/de1d141e4b077f54cd5f568e94e9abbe4ae61399/after/DMLInsertParserTest.java
|
ff30e0eb02adf071c13c43f203180cb2dc3f5cdb
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,845
|
java
|
package com.alibaba.druid.bvt.sql.cobar;
import org.junit.Assert;
import com.alibaba.druid.sql.SQLUtils;
import com.alibaba.druid.sql.ast.SQLStatement;
import com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser;
import com.alibaba.druid.sql.parser.Token;
import junit.framework.TestCase;
public class DMLInsertParserTest extends TestCase {
public void testInsert_0() throws Exception {
String sql = "insErt HIGH_PRIORITY intO test.t1 seT t1.id1=?, id2 := '123'";
MySqlStatementParser parser = new MySqlStatementParser(sql);
SQLStatement stmt = parser.parseStatementList().get(0);
parser.match(Token.EOF);
String output = SQLUtils.toMySqlString(stmt);
Assert.assertEquals("INSERT HIGH_PRIORITY INTO test.t1 (t1.id1, id2)\n" + //
"VALUES (?, '123')", output);
}
public void testInsert_1() throws Exception {
String sql = "insErt IGNORE test.t1 seT t1.id1:=? oN dupLicatE key UPDATE ex.col1=?, col2=12";
MySqlStatementParser parser = new MySqlStatementParser(sql);
SQLStatement stmt = parser.parseStatementList().get(0);
parser.match(Token.EOF);
String output = SQLUtils.toMySqlString(stmt);
Assert.assertEquals("INSERT IGNORE INTO test.t1 (t1.id1)\nVALUES (?) " + //
"ON DUPLICATE KEY UPDATE ex.col1 = ?, col2 = 12", output);
}
public void testInsert_2() throws Exception {
String sql = "insErt t1 value (123,?) oN dupLicatE key UPDATE ex.col1=?";
MySqlStatementParser parser = new MySqlStatementParser(sql);
SQLStatement stmt = parser.parseStatementList().get(0);
parser.match(Token.EOF);
String output = SQLUtils.toMySqlString(stmt);
Assert.assertEquals("INSERT INTO t1\nVALUES (123, ?) ON DUPLICATE KEY UPDATE ex.col1 = ?", output);
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
9eea2a30dcf220c4c89ccbeef14b2a80f1bd9501
|
1f7a8a0a76e05d096d3bd62735bc14562f4f071a
|
/NeverPuk/net/qe.java
|
d81f1c5c97a8e4e866ba84adf15603e1c0025548
|
[] |
no_license
|
yunusborazan/NeverPuk
|
b6b8910175634523ebd4d21d07a4eb4605477f46
|
a0e58597858de2fcad3524daaea656362c20044d
|
refs/heads/main
| 2023-05-10T09:08:02.183430
| 2021-06-13T17:17:50
| 2021-06-13T17:17:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 475
|
java
|
package net;
import net.bx;
import net.qy;
import net.nk.h;
import net.nn.j;
import net.y0.cq;
import net.y0.d;
import net.y6.e3;
public class qe extends qy {
public qe() {
super(h.class, "vindication_illager", 0.5F);
}
public net.y6.z J() {
return new e3(0.0F, 0.0F, 64, 64);
}
public bx A(net.y6.z var1, float var2) {
d var3 = j.b().N();
cq var4 = new cq(var3);
var4.y = var1;
var4.W = var2;
return var4;
}
}
|
[
"68544940+Lazy-Hero@users.noreply.github.com"
] |
68544940+Lazy-Hero@users.noreply.github.com
|
1f55efaf117cdb8edc38ac82b73c3a5cd99620ba
|
f2b6d20a53b6c5fb451914188e32ce932bdff831
|
/src/com/linkedin/android/cropphotoview/scrollerproxy/IcsScroller.java
|
9f086c2390faed26c556d54deda6965a929d2c93
|
[] |
no_license
|
reverseengineeringer/com.linkedin.android
|
08068c28267335a27a8571d53a706604b151faee
|
4e7235e12a1984915075f82b102420392223b44d
|
refs/heads/master
| 2021-04-09T11:30:00.434542
| 2016-07-21T03:54:43
| 2016-07-21T03:54:43
| 63,835,028
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 964
|
java
|
package com.linkedin.android.cropphotoview.scrollerproxy;
import android.annotation.TargetApi;
import android.content.Context;
import android.widget.OverScroller;
@TargetApi(15)
public final class IcsScroller
extends ScrollerProxy
{
protected final OverScroller mScroller;
public IcsScroller(Context paramContext)
{
mScroller = new OverScroller(paramContext);
}
public final boolean computeScrollOffset()
{
return mScroller.computeScrollOffset();
}
public final void forceFinished$1385ff()
{
mScroller.forceFinished(true);
}
public final int getCurrX()
{
return mScroller.getCurrX();
}
public final int getCurrY()
{
return mScroller.getCurrY();
}
public final boolean isFinished()
{
return mScroller.isFinished();
}
}
/* Location:
* Qualified Name: com.linkedin.android.cropphotoview.scrollerproxy.IcsScroller
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
9ec56972ac19ad5e013216a46eb02883528119a4
|
b7011f2912afc9f62fc0ecff2cfc3b88d708fdd9
|
/sipin-sales-cloud-backend-merchandise-pojo/src/main/java/cn/sipin/cloud/merchandise/constants/MerchandiseConstants.java
|
c0b0c67d50244ee7b6760a0d04af99ffdfcb8098
|
[] |
no_license
|
zhouxhhn/merchandise
|
cb6ad268f0f0d2ab5a415b22daae5b7c17f1f5f6
|
4ddca824e20ed558e28b7013622cc309ed0de150
|
refs/heads/master
| 2020-04-05T10:21:09.216078
| 2018-11-09T02:02:25
| 2018-11-09T02:02:25
| 156,795,480
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 296
|
java
|
/*
* (C) Copyright 2018 Siyue Holding Group.
*/
package cn.sipin.cloud.merchandise.constants;
public class MerchandiseConstants {
public final static String REDIS_SKU_SN_NO_HASH = "sku_sn_no_hash";
public final static String REDIS_SKU_NO_MATERIAL_HASH = "sku_no_material_entity_hash";
}
|
[
"joey.zhou@siyue.cn"
] |
joey.zhou@siyue.cn
|
ff02ec13ef553fca16a1a0feb60475c24d8e666a
|
6128b4b8b2a7c0e1abdc4e7dc5b4ca506531aedb
|
/src/main/java/cn/onlov/admin/core/dao/interfaces/IUserService.java
|
26686a865142dc46b02c1cf5ab963aa0ab8ed10f
|
[] |
no_license
|
mwf415/on_admin
|
85519d74cc38c411ef6eb8951d1b53fa03118804
|
e76c8eba9bc7190a52cde9e6b9428299a3d0add2
|
refs/heads/master
| 2022-08-10T15:31:53.991747
| 2019-07-19T10:26:12
| 2019-07-19T10:26:12
| 197,681,595
| 0
| 0
| null | 2022-06-17T02:18:05
| 2019-07-19T01:39:26
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 298
|
java
|
package cn.onlov.admin.core.dao.interfaces;
import cn.onlov.admin.core.dao.entities.OnlovUser;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 服务类
* </p>
*
* @author kaifa
* @since 2019-01-04
*/
public interface IUserService extends IService<OnlovUser> {
}
|
[
"mwf415@126.com"
] |
mwf415@126.com
|
f68a2086e22ab8fbd8e9fbaf417568b8c20c3ba5
|
e6e0ca179e70722c218aa4ec817fd384c7b39deb
|
/src/main/java/net/javacoding/jspider/api/event/resource/MalformedBaseURLFoundEvent.java
|
c1c97858840f8e6cbba6fe883884ef213dd2e683
|
[] |
no_license
|
qwordy/spider4java
|
dda5be8386a75d21d81852a52b058547a66f00cb
|
57ac3ceb9bd018821f66879c98522bac13c4409c
|
refs/heads/master
| 2021-01-19T02:31:43.365184
| 2017-04-05T08:51:49
| 2017-04-05T08:51:49
| 87,287,224
| 1
| 0
| null | 2017-04-05T08:46:04
| 2017-04-05T08:46:04
| null |
UTF-8
|
Java
| false
| false
| 933
|
java
|
package net.javacoding.jspider.api.event.resource;
import net.javacoding.jspider.api.model.FetchedResource;
import net.javacoding.jspider.api.event.EventVisitor;
/**
* $Id: MalformedBaseURLFoundEvent.java,v 1.2 2003/04/08 15:50:25 vanrogu Exp $
*/
public class MalformedBaseURLFoundEvent extends ResourceRelatedEvent {
protected String malformedBaseURL;
public MalformedBaseURLFoundEvent(FetchedResource resource, String malformedBaseURL) {
super(resource);
this.malformedBaseURL = malformedBaseURL;
}
public FetchedResource getResource() {
return (FetchedResource) resource;
}
public String getComment() {
return "malformed baseURL found in resource '" + resource.getURL() + "' : '" + malformedBaseURL + "'";
}
public String getMalformedBaseURL() {
return malformedBaseURL;
}
public void accept(EventVisitor visitor) {
visitor.visit(this);
}
public String toString() {
return getComment();
}
}
|
[
"lcs.005@163.com"
] |
lcs.005@163.com
|
cec33f2fdee6c05c9e1fc1bcba3585ebde41735b
|
1e4f7db36c0c4fe059b75edbf6d3389980785b7f
|
/EnchantTrapPack/src/com/sucy/trap/enchant/WebTrap.java
|
c089f2b910dce3ecc2cb2fcccbe9a1e2c6b61f75
|
[] |
no_license
|
TANJX/EnchantmentPack
|
683d5c93a299262421810c7172fb1fc26aeac8eb
|
9faf0cb7ac85ec6761d68cecd05b7fb38930a064
|
refs/heads/master
| 2020-04-05T23:23:22.776702
| 2016-02-03T16:31:27
| 2016-02-03T16:31:27
| 51,013,067
| 0
| 0
| null | 2016-02-03T16:27:44
| 2016-02-03T16:27:42
|
Java
|
UTF-8
|
Java
| false
| false
| 2,332
|
java
|
package com.sucy.trap.enchant;
import com.rit.sucy.service.SuffixGroups;
import com.sucy.trap.data.EnchantDefaults;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.LivingEntity;
import org.bukkit.plugin.Plugin;
import java.util.ArrayList;
public class WebTrap extends RedstoneTrap {
/**
* Constructor
*
* @param plugin plugin reference
*/
public WebTrap(Plugin plugin) {
super(plugin, EnchantDefaults.WEB_TRAP, 3);
description = "Places a trap that spawns temporary webs";
suffixGroups.add(SuffixGroups.SLOWING.getKey());
layout = new boolean[][] {
{ false, false, true, true },
{ false, false, true, false, true },
{ true, true, false, true, true },
{ true, false, true },
{ false, true, true }};
}
/**
* Creates webs around an entity entering the trap
*
* @param trap trap walked into
* @param entity enemy that walked into the trap
* @param level enchantment level used for the trap
*/
@Override
public void onEnter(Trap trap, LivingEntity entity, int level) {
if (entity != trap.owner && works(entity, trap.owner)) {
Location loc = entity.getLocation();
ArrayList<Block> webs = new ArrayList<Block>();
int count = spawn(level);
int max = 0;
while (max * max * max < count)
max++;
loc.setX(loc.getX() - max / 2);
loc.setZ(loc.getZ() - max / 2);
loc.setY(loc.getY() - max / 2 + 1);
for (int i = 0; i < count; i++) {
Location temp = new Location(loc.getWorld(),
loc.getX() + i % max,
loc.getY() + ((double)i / max) / max,
loc.getZ() + ((double)i / max) % max);
Block block = loc.getWorld().getBlockAt(temp);
if (block.getType() == Material.AIR || !block.getType().isSolid()) {
webs.add(block);
block.setType(Material.WEB);
}
}
new WebTask(webs).runTaskLater(plugin, duration(level));
trap.remove();
}
}
}
|
[
"steven_sucy@yahoo.com"
] |
steven_sucy@yahoo.com
|
40d54c6207b90d321a2782ddcb4461a81f49cc9f
|
0c1f1db1f3e94109e8d9f5e91f0f870519d2e708
|
/app/src/main/java/com/qf/besttravel/LookPicsActivity.java
|
5a778e82855f8d21cbddc2de0187a7463a6ae8d6
|
[] |
no_license
|
luckeystronglu/BestTravel-master
|
f33792bf0b73c720dd77176d047523b791b8a94f
|
f20b44696bf786295896e9e65ba16f3b1f5cfda9
|
refs/heads/master
| 2020-07-27T09:31:49.071125
| 2016-12-10T16:51:50
| 2016-12-10T16:51:50
| 73,432,989
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,647
|
java
|
package com.qf.besttravel;
import android.content.Context;
import android.content.Intent;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.bm.library.PhotoView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.qf.entity.TravelNote2Entity;
import com.qfkf.base.BaseActivity;
import java.util.List;
/**
* Created by lenovo on 2016/10/23.
*/
public class LookPicsActivity extends BaseActivity{
TextView tv_num_now, tv_num_total;
private ViewPager picvp;
private PicsVpAdapter vpAdapter;
private List<TravelNote2Entity.DataBean.ActivityBean.ContentsBean> contents;
@Override
public int getContentViewId() {
return R.layout.activity_lookpics;
}
@Override
protected void init() {
picvp = findViewByIds(R.id.pic_viewpager);
tv_num_now = findViewByIds(R.id.pic_num_now);
tv_num_total = findViewByIds(R.id.pic_num_total);
Intent intent = getIntent();
TravelNote2Entity.DataBean travelentity = (TravelNote2Entity.DataBean) intent.getSerializableExtra("entity");
contents = travelentity.getActivity().getContents();
int po = intent.getIntExtra("picnum",-1);
tv_num_now.setText((po + 1) + "");
tv_num_total.setText(contents.size() + "");
vpAdapter = new PicsVpAdapter(this, contents);
picvp.setAdapter(vpAdapter);
picvp.setCurrentItem(po);
picvp.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
}
@Override
public void onPageSelected(int position) {
tv_num_now.setText((position + 1) + "");
}
@Override
public void onPageScrollStateChanged(int state) {
}
});
}
@Override
protected void onDestroy() {
super.onDestroy();
contents.clear();
}
public static class PicsVpAdapter extends PagerAdapter{
private Context context;
private List<TravelNote2Entity.DataBean.ActivityBean.ContentsBean> piclist;
public PicsVpAdapter(Context context,List<TravelNote2Entity.DataBean.ActivityBean.ContentsBean> piclist) {
this.context = context;
this.piclist = piclist;
}
@Override
public int getCount() {
return piclist.size();
}
@Override
public boolean isViewFromObject(View view, Object object) {
return view == object;
}
@Override
public Object instantiateItem(ViewGroup container, int position) {
PhotoView photoView = new PhotoView(context);
photoView.enable();//可缩放
photoView.setScaleType(ImageView.ScaleType.FIT_XY);
Glide.with(context)
.load(piclist.get(position).getPhoto_url())
.crossFade(500)
.diskCacheStrategy(DiskCacheStrategy.ALL)
.placeholder(R.drawable.home_user_place_holder)
.thumbnail(0.1f)
.into(photoView);
container.addView(photoView);
return photoView;
}
@Override
public void destroyItem(ViewGroup container, int position, Object object) {
container.removeView((View) object);
}
}
}
|
[
"903804013@qq.com"
] |
903804013@qq.com
|
1bb89fb04a73cc2d815ac7f630769ffbbd75dc55
|
c64612e5801bcf2832f26142807f1b6fb40be767
|
/container/wildfly/extension/src/main/java/org/wildfly/extension/fabric/parser/Namespace10.java
|
421210c21abf5a19e1a51496f0396fccfe5eca4c
|
[
"Apache-2.0"
] |
permissive
|
tdiesler/fabric8poc
|
570034d4e68b54112f1b9bd90a7892af744eaeeb
|
baa3363ec65e5249413745bb039d95bc032a8269
|
refs/heads/master
| 2021-01-01T05:51:09.404703
| 2014-06-27T17:37:48
| 2014-06-27T18:26:38
| 17,744,303
| 1
| 2
| null | 2014-06-23T11:05:43
| 2014-03-14T11:33:23
|
Java
|
UTF-8
|
Java
| false
| false
| 2,866
|
java
|
/*
* #%L
* Fabric8 :: Container :: WildFly :: Extension
* %%
* Copyright (C) 2014 Red Hat
* %%
* 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.
* #L%
*/
package org.wildfly.extension.fabric.parser;
import java.util.HashMap;
import java.util.Map;
/**
* Constants related to namespace {@link Namespace#VERSION_1_0}.
*
* @since 13-Nov-2013
*/
interface Namespace10 {
enum Attribute {
UNKNOWN(null),
ID("id"),
;
private final String name;
Attribute(final String name) {
this.name = name;
}
/**
* Get the local name of this attribute.
*
* @return the local name
*/
public String getLocalName() {
return name;
}
private static final Map<String, Attribute> MAP;
static {
final Map<String, Attribute> map = new HashMap<String, Attribute>();
for (Attribute element : values()) {
final String name = element.getLocalName();
if (name != null) map.put(name, element);
}
MAP = map;
}
public static Attribute forName(String localName) {
final Attribute element = MAP.get(localName);
return element == null ? UNKNOWN : element;
}
@Override
public String toString() {
return getLocalName();
}
}
enum Element {
// must be first
UNKNOWN(null),
;
private final String name;
Element(final String name) {
this.name = name;
}
/**
* Get the local name of this element.
*
* @return the local name
*/
public String getLocalName() {
return name;
}
private static final Map<String, Element> MAP;
static {
final Map<String, Element> map = new HashMap<String, Element>();
for (Element element : values()) {
final String name = element.getLocalName();
if (name != null) map.put(name, element);
}
MAP = map;
}
public static Element forName(String localName) {
final Element element = MAP.get(localName);
return element == null ? UNKNOWN : element;
}
}
}
|
[
"thomas.diesler@jboss.com"
] |
thomas.diesler@jboss.com
|
67831af9163a6d64c2f88169dce6993253dfa0ee
|
c278b2e06e98b0b99ca7350cfc12d2e535db1841
|
/customer/src/main/java/com/yl/customer/action/MenuAction.java
|
bd5487f2e93a2183b3d4d8a8af08506f10d9f761
|
[] |
no_license
|
SplendorAnLin/paymentSystem
|
ea778c03179a36755c52498fd3f5f1a5bbeb5d34
|
db308a354a23bd3a48ff88c16b29a43c4e483e7d
|
refs/heads/master
| 2023-02-26T14:16:27.283799
| 2022-10-20T07:50:35
| 2022-10-20T07:50:35
| 191,535,643
| 5
| 6
| null | 2023-02-22T06:42:24
| 2019-06-12T09:01:15
|
Java
|
UTF-8
|
Java
| false
| false
| 1,773
|
java
|
/**
*
*/
package com.yl.customer.action;
import java.util.List;
import com.yl.customer.entity.Menu;
import com.yl.customer.service.MenuService;
/**
* 菜单控制器
*
* @author 聚合支付有限公司
* @since 2016年8月4日
* @version V1.0.0
*/
public class MenuAction extends Struts2ActionSupport {
private Menu menu;;
private List<Menu> menuList;
private MenuService menuService;
public String toMenuQuery(){
menuList = menuService.findAll();
return SUCCESS;
}
public String toMenuEdit(){
String menuId = getHttpRequest().getParameter("menuId");
Long id = Long.parseLong(menuId);
menu = menuService.findById(id);
List<Menu> pMenus = menuService.findByLevel("1");
getHttpRequest().setAttribute("pMenus", pMenus);
return SUCCESS;
}
public String modifyMenu(){
Menu menuDb = menuService.findById(menu.getId());
menuDb.setName(menu.getName());
menuDb.setUrl(menu.getUrl());
menuDb.setDisplayOrder(menu.getDisplayOrder());
menuDb.setStatus(menu.getStatus());
menuDb.setParentId(menu.getParentId());
menu = menuService.update(menuDb);
return SUCCESS;
}
public String addChildMenu(){
Menu menuDb = menuService.findById(menu.getParentId());
Long level = Long.parseLong(menuDb.getLevel());
menu.setIsLeaf("Y");
menu.setLevel(String.valueOf(level+1));
menu = menuService.create(menu);
return SUCCESS;
}
public Menu getMenu() {
return menu;
}
public void setMenu(Menu menu) {
this.menu = menu;
}
public List<Menu> getMenuList() {
return menuList;
}
public void setMenuList(List<Menu> menuList) {
this.menuList = menuList;
}
public MenuService getMenuService() {
return menuService;
}
public void setMenuService(MenuService menuService) {
this.menuService = menuService;
}
}
|
[
"zl88888@live.com"
] |
zl88888@live.com
|
bd6587f471903ab91e157965b4130aca9a12e623
|
3fc798c01fbaf8af228b9798e62fd99d195935d0
|
/src/main/java/com/zt/entity/WarningReceiver.java
|
26e8206ce92ab115481d97331e5bf90a3222ba20
|
[] |
no_license
|
zt1115798334/myTest
|
dcc34acaff9558de9bddd6727aeeb60b977b3823
|
6a54d8cb75b0068815a8b6058806c29bf2eb6347
|
refs/heads/master
| 2021-07-03T16:17:36.479460
| 2017-09-25T08:24:12
| 2017-09-25T08:24:12
| 104,722,870
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,867
|
java
|
package com.zt.entity;
import javax.persistence.*;
import java.sql.Timestamp;
@Entity
@Table(name = "t_warning_receiver", schema = "jdjropinion", catalog = "")
public class WarningReceiver {
private int id;
private String warningType;
private String isEnable;
private String receiver;
private String createUser;
private Timestamp createDate;
@Id
@Column(name = "id")
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
@Basic
@Column(name = "warning_type")
public String getWarningType() {
return warningType;
}
public void setWarningType(String warningType) {
this.warningType = warningType;
}
@Basic
@Column(name = "is_enable")
public String getIsEnable() {
return isEnable;
}
public void setIsEnable(String isEnable) {
this.isEnable = isEnable;
}
@Basic
@Column(name = "receiver")
public String getReceiver() {
return receiver;
}
public void setReceiver(String receiver) {
this.receiver = receiver;
}
@Basic
@Column(name = "create_user")
public String getCreateUser() {
return createUser;
}
public void setCreateUser(String createUser) {
this.createUser = createUser;
}
@Basic
@Column(name = "create_date")
public Timestamp getCreateDate() {
return createDate;
}
public void setCreateDate(Timestamp createDate) {
this.createDate = createDate;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
WarningReceiver that = (WarningReceiver) o;
if (id != that.id) return false;
if (warningType != null ? !warningType.equals(that.warningType) : that.warningType != null) return false;
if (isEnable != null ? !isEnable.equals(that.isEnable) : that.isEnable != null) return false;
if (receiver != null ? !receiver.equals(that.receiver) : that.receiver != null) return false;
if (createUser != null ? !createUser.equals(that.createUser) : that.createUser != null) return false;
if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false;
return true;
}
@Override
public int hashCode() {
int result = id;
result = 31 * result + (warningType != null ? warningType.hashCode() : 0);
result = 31 * result + (isEnable != null ? isEnable.hashCode() : 0);
result = 31 * result + (receiver != null ? receiver.hashCode() : 0);
result = 31 * result + (createUser != null ? createUser.hashCode() : 0);
result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
return result;
}
}
|
[
"zhangtong9498@qq.com"
] |
zhangtong9498@qq.com
|
b95751ff5058d09dea0d2db8ccefe3b5a783e403
|
2158db1f5b9ba2ba8b4b706a14aa350fa3f914dc
|
/src/chap20/Ex2ServletContextListener.java
|
537e4543146dd938136a9812daf7822e42d96552
|
[] |
no_license
|
dmswldi/JSP
|
cbf6b04876de86520890ebb573b0c901e3fec8eb
|
49c8e462a0f50038723113a0ed4f8b44dc9912ef
|
refs/heads/master
| 2023-02-03T05:08:25.290013
| 2020-12-18T07:20:13
| 2020-12-18T07:20:13
| 309,549,660
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,697
|
java
|
package chap20;
import java.sql.Connection;
import java.sql.DriverManager;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;
/**
* Application Lifecycle Listener implementation class Ex2ServletContextListener
*
*/
@WebListener
public class Ex2ServletContextListener implements ServletContextListener {
/**
* Default constructor.
*/
public Ex2ServletContextListener() {
// TODO Auto-generated constructor stub
}
/**
* @see ServletContextListener#contextDestroyed(ServletContextEvent)
*/
public void contextDestroyed(ServletContextEvent sce) {
// TODO Auto-generated method stub
}
/**
* @see ServletContextListener#contextInitialized(ServletContextEvent)
*/
public void contextInitialized(ServletContextEvent sce) {
// 초기화 이후에 실행되는 코드
System.out.println("우리 앱 실행 EX2");
ServletContext application = sce.getServletContext();
String val = application.getInitParameter("my-param1");
System.out.println(val);
String url = application.getInitParameter("jdbcUrl");
String user = application.getInitParameter("jdbcUser");
String password = application.getInitParameter("jdbcPassword");
DBUtil.setUrl(url);
DBUtil.setUser(user);
DBUtil.setPassword(password);
try (Connection con = DriverManager.getConnection(url, user, password)) {
System.out.println(con);
} catch(Exception e) {
e.printStackTrace();
}
}
}
|
[
"eeeunzz20@gmail.com"
] |
eeeunzz20@gmail.com
|
9439343574063b5824ef24ea30349b77c076aeeb
|
139f0cc1f10a5f021d830390b53ee48107a9a5d6
|
/accessControl/src/main/java/com/student/accessControl/service/UserRoleServiceImpl.java
|
cf7845dbe5258c0d33c739ed3a31e39855d4a9c7
|
[
"MIT"
] |
permissive
|
aanush/object-oriented
|
8cb70629dd3ae7d48deeb75343d6b9c2c4573fe0
|
235bb32a8799f08edd46e00d85888d951b2035be
|
refs/heads/master
| 2021-07-11T09:21:57.948976
| 2017-10-02T23:02:50
| 2017-10-02T23:02:50
| 104,231,279
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 602
|
java
|
package com.student.accessControl.service;
import com.student.accessControl.cache.AccessCache;
import com.student.accessControl.pojo.Role;
import com.student.accessControl.pojo.User;
import org.springframework.stereotype.Service;
@Service
public class UserRoleServiceImpl implements UserRoleService {
@Override
public void updateRoleForUser(Role role, User user) {
if (role == null || user == null) {
throw new IllegalArgumentException();
}
AccessCache.getInstance().updateUserToAccessTheResource(user, role.getAccessType(), role.getResource());
}
}
|
[
"anish.anushang@outlook.com"
] |
anish.anushang@outlook.com
|
20adbf6c57a9db00d53a6b6ca3b00e36b674ec35
|
19599ad278e170175f31f3544f140a8bc4ee6bab
|
/src/com/ametis/cms/web/form/ExportImportTemplateForm.java
|
19192e8635088b5f1a10fe82f20c1ce9afe3ff06
|
[] |
no_license
|
andreHer/owlexaGIT
|
a2a0df83cd64a399e1c57bb6451262434e089631
|
426df1790443e8e8dd492690d6b7bd8fd37fa3d7
|
refs/heads/master
| 2021-01-01T04:26:16.039616
| 2016-05-12T07:37:20
| 2016-05-12T07:37:20
| 58,693,624
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,757
|
java
|
package com.ametis.cms.web.form;
import com.ametis.cms.datamodel.*;
import com.ametis.cms.util.*;
// imports+
// imports-
/**
* ExportImportTemplate is a mapping of export_import_template Table.
*/
public class ExportImportTemplateForm implements java.io.Serializable
// extends+
// extends-
{
private boolean isNewExportImportTemplate = false;
private ExportImportTemplate exportImportTemplateBean ;
/*
<form>Bean merupakan representasi dari "SINGLE" table dan
misalkan ada form2 yang merupakan referensi dari tabel lain
bikin aja field2 bean yang mengacu ke referensi itu
biar nanti automatic loading
*/
public ExportImportTemplateForm()
{
this.exportImportTemplateBean = new ExportImportTemplate();
this.isNewExportImportTemplate = true;
}
public ExportImportTemplateForm (ExportImportTemplate object){
this.exportImportTemplateBean = object;
}
public boolean isNewExportImportTemplate (){
return this.isNewExportImportTemplate;
}
public ExportImportTemplate getExportImportTemplate (){
return this.exportImportTemplateBean ;
}
public void setExportImportTemplate (ExportImportTemplate object){
this.exportImportTemplateBean = object;
}
public void setId(String obj){
exportImportTemplateBean.setId(StringUtil.getIntegerValue(obj,0));
}
public String getId(){
return StringUtil.getStringValue(
exportImportTemplateBean.getId());
}
public void setTemplateName(String obj){
exportImportTemplateBean.setTemplateName(new String(obj));
}
public String getTemplateName(){
return StringUtil.getStringValue(
exportImportTemplateBean.getTemplateName());
}
public void setDescription(String obj){
exportImportTemplateBean.setDescription(new String(obj));
}
public String getDescription(){
return StringUtil.getStringValue(
exportImportTemplateBean.getDescription());
}
public void setTemplateMapping(String obj){
exportImportTemplateBean.setTemplateMapping(new String(obj));
}
public String getTemplateMapping(){
return StringUtil.getStringValue(
exportImportTemplateBean.getTemplateMapping());
}
public void setJenisTransfer(String obj){
if (obj != null && !obj.equalsIgnoreCase("")){
exportImportTemplateBean.setJenisTransfer(Integer.valueOf(obj));
}
}
public String getJenisTransfer(){
String result = "";
if (exportImportTemplateBean.getJenisTransfer() != null){
result = StringUtil.getStringValue(
exportImportTemplateBean.getJenisTransfer());
}
return result;
}
public void setTipe(String obj){
exportImportTemplateBean.setTipe(StringUtil.getIntegerValue(obj,0));
}
public String getTipe(){
return StringUtil.getStringValue(
exportImportTemplateBean.getTipe());
}
public void setCreatedTime(String obj){
exportImportTemplateBean.setCreatedTime(java.sql.Timestamp.valueOf(obj));
}
public String getCreatedTime(){
return StringUtil.getStringValue(
exportImportTemplateBean.getCreatedTime());
}
public void setCreatedBy(String obj){
exportImportTemplateBean.setCreatedBy(new String(obj));
}
public String getCreatedBy(){
return StringUtil.getStringValue(
exportImportTemplateBean.getCreatedBy());
}
public void setModifiedTime(String obj){
exportImportTemplateBean.setModifiedTime(java.sql.Timestamp.valueOf(obj));
}
public String getModifiedTime(){
return StringUtil.getStringValue(
exportImportTemplateBean.getModifiedTime());
}
public void setModifiedBy(String obj){
exportImportTemplateBean.setModifiedBy(new String(obj));
}
public String getModifiedBy(){
return StringUtil.getStringValue(
exportImportTemplateBean.getModifiedBy());
}
public void setDeletedTime(String obj){
exportImportTemplateBean.setDeletedTime(java.sql.Timestamp.valueOf(obj));
}
public String getDeletedTime(){
return StringUtil.getStringValue(
exportImportTemplateBean.getDeletedTime());
}
public void setDeletedBy(String obj){
exportImportTemplateBean.setDeletedBy(new String(obj));
}
public String getDeletedBy(){
return StringUtil.getStringValue(
exportImportTemplateBean.getDeletedBy());
}
public void setDeletedStatus(String obj){
exportImportTemplateBean.setDeletedStatus(StringUtil.getIntegerValue(obj,0));
}
public String getDeletedStatus(){
return StringUtil.getStringValue(
exportImportTemplateBean.getDeletedStatus());
}
public void setDelimiter(String obj){
exportImportTemplateBean.setDelimiter(obj);
}
public String getDelimiter(){
return StringUtil.getStringValue(
exportImportTemplateBean.getDelimiter());
}
// foreign affairs
// -- foreign affairs end
// class+
// class-
}
|
[
"mashuri@7a4bab5d-9f4e-4b47-a10f-b21823e054b7"
] |
mashuri@7a4bab5d-9f4e-4b47-a10f-b21823e054b7
|
bf634def4869daaa0364cc9026fdf8aab051c9e2
|
a076c5e6f9aa8b7875af0c9c03ea89bd464b016d
|
/src/class27_ArrayList_and_Iterator/FoodtaskTest.java
|
41c92a657c479274f920ec1d8e5e938cf9063b94
|
[] |
no_license
|
Guljemal1994/JavaBasics
|
c0f91189ad7b4735774e3eb1c4d99e2764ee23f6
|
4439131cef289031e9140b8e219fa048b000656d
|
refs/heads/master
| 2021-04-04T02:51:06.751747
| 2020-05-17T23:21:07
| 2020-05-17T23:21:07
| 248,418,906
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 856
|
java
|
package class27_ArrayList_and_Iterator;
import java.util.ArrayList;
import java.util.Iterator;
public class FoodtaskTest {
public static void main(String[] args) {
ArrayList<FoodTask> f = new ArrayList<>();
f.add(new Yogut());
f.add(new Fruit());
f.add(new Nuts());
System.out.println("==>advanced for loop<==");
for (FoodTask food : f) {
food.fruitSalad();
food.healthyFoods();
food.snackFoods();
}
System.out.println();
System.out.println("==>iterator<==");
Iterator<FoodTask> fd = f.iterator();
while (fd.hasNext()) {
FoodTask gul = fd.next();
gul.fruitSalad();
gul.healthyFoods();
gul.snackFoods();
}
System.out.println();
System.out.println("==>for lopp<===");
for (int i = 0; i < f.size(); i++) {
f.get(i).fruitSalad();
f.get(i).healthyFoods();
f.get(i).snackFoods();
}
}
}
|
[
"konulkuly@gmail.com"
] |
konulkuly@gmail.com
|
7ab950f2010dbbd42f8c89281d0b6de7eb26c6a4
|
0cf378b7320592a952d5343a81b8a67275ab5fab
|
/webprotege-client/src/main/java/edu/stanford/bmir/protege/web/client/bulkop/SetAnnotationValueViewImpl.java
|
c7f647753cd386875d93021e6106d5e8815d9faf
|
[
"BSD-2-Clause"
] |
permissive
|
curtys/webprotege-attestation
|
945de9f6c96ca84b7022a60f4bec4886c81ab4f3
|
3aa909b4a8733966e81f236c47d6b2e25220d638
|
refs/heads/master
| 2023-04-11T04:41:16.601854
| 2023-03-20T12:18:44
| 2023-03-20T12:18:44
| 297,962,627
| 0
| 0
|
MIT
| 2021-08-24T08:43:21
| 2020-09-23T12:28:24
|
Java
|
UTF-8
|
Java
| false
| false
| 2,526
|
java
|
package edu.stanford.bmir.protege.web.client.bulkop;
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTMLPanel;
import edu.stanford.bmir.protege.web.client.primitive.DefaultLanguageEditor;
import edu.stanford.bmir.protege.web.client.primitive.LanguageEditor;
import edu.stanford.bmir.protege.web.client.primitive.PrimitiveDataEditorImpl;
import edu.stanford.bmir.protege.web.shared.entity.OWLAnnotationPropertyData;
import edu.stanford.bmir.protege.web.shared.entity.OWLPrimitiveData;
import org.semanticweb.owlapi.model.OWLLiteral;
import javax.annotation.Nonnull;
import javax.inject.Inject;
import java.util.Optional;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Matthew Horridge
* Stanford Center for Biomedical Informatics Research
* 24 Sep 2018
*/
public class SetAnnotationValueViewImpl extends Composite implements SetAnnotationValueView {
interface SetAnnotationValueViewImplUiBinder extends UiBinder<HTMLPanel, SetAnnotationValueViewImpl> {
}
private static SetAnnotationValueViewImplUiBinder ourUiBinder = GWT.create(SetAnnotationValueViewImplUiBinder.class);
@UiField(provided = true)
PrimitiveDataEditorImpl propertyField;
@UiField(provided = true)
PrimitiveDataEditorImpl valueField;
@UiField(provided = true)
DefaultLanguageEditor langEditor;
@Inject
public SetAnnotationValueViewImpl(@Nonnull PrimitiveDataEditorImpl propertyField,
@Nonnull PrimitiveDataEditorImpl valueField) {
this.propertyField = checkNotNull(propertyField);
this.valueField = checkNotNull(valueField);
this.langEditor = (DefaultLanguageEditor) valueField.getLanguageEditor();
initWidget(ourUiBinder.createAndBindUi(this));
}
@Override
protected void onAttach() {
super.onAttach();
requestFocus();
}
@Override
public void requestFocus() {
propertyField.requestFocus();
}
@Nonnull
@Override
public Optional<OWLAnnotationPropertyData> getProperty() {
return propertyField.getValue()
.filter(v -> v instanceof OWLAnnotationPropertyData)
.map(v -> (OWLAnnotationPropertyData) v);
}
@Nonnull
@Override
public Optional<OWLPrimitiveData> getValue() {
return valueField.getValue();
}
}
|
[
"matthew.horridge@stanford.edu"
] |
matthew.horridge@stanford.edu
|
95087c53fe55d9230a129c2913ca8dda7f833f5c
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/spoon/learning/6644/MMMethodKind.java
|
9b83b578f2c413eebb184c39ecb3f4b04952f335
|
[] |
no_license
|
ASSERT-KTH/synthetic-checkstyle-error-dataset
|
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
|
40c057e1669584bfc6fecf789b5b2854660222f3
|
refs/heads/master
| 2023-03-18T12:50:55.410343
| 2019-01-25T09:54:39
| 2019-01-25T09:54:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,803
|
java
|
/**
* Copyright (C) 2006-2018 INRIA and contributors
* Spoon - http://spoon.gforge.inria.fr/
*
* This software is governed by the CeCILL-C License under French law and
* abiding by the rules of distribution of free software. You can use, modify
* and/or redistribute the software under the terms of the CeCILL-C license as
* circulated by CEA, CNRS and INRIA at http://www.cecill.info.
*
* 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 CeCILL-C License for more details.
*
* The fact that you are presently reading this means that you have had
* knowledge of the CeCILL-C license and that you accept its terms.
*/
package spoon.metamodel;
import java.util.function.Predicate;
import spoon.SpoonException;
import spoon.reflect.declaration.CtField;
import spoon.reflect.declaration.CtMethod;
/**
* Represents the type of metamodel method.
* eg {@link spoon.reflect.declaration.CtType#addField(CtField)} has MMMethodKind{@link #ADD_FIRST}.
*/
public enum MMMethodKind {
/**
* Getter.
* T get()
*/
GET(-1, false, 1, m -> m.getParameters().isEmpty() && (m.getSimpleName().startsWith("get") || m.getSimpleName().startsWith("is"))),
/**
* Setter
* void set(T)
*/
SET(0, false, 1, m -> m.getParameters().size() == 1 && m.getSimpleName().startsWith("set")),
/**
* void addFirst(T)
*/
ADD_FIRST(0, true, 10, m -> {
if (m.getParameters().size() == 1) {
if (m.getSimpleName().startsWith("add") || m.getSimpleName().startsWith("insert")) {
return m.getSimpleName().endsWith("AtTop") || m.getSimpleName().endsWith("Begin");
}
}
return false;
}),
/**
* void add(T)
*/
ADD_LAST(0, true, 1, m -> {
if (m.getParameters().size() == 1) {
return m.getSimpleName().startsWith("add") || m.getSimpleName().startsWith("insert");
}
return false;
}),
/**
* void addOn(int, T)
*/
ADD_ON(1, true, 1, m -> {
if (m.getParameters().size() == 2 && "int".equals(m.getParameters().get(0).getType().getSimpleName())) {
return m.getSimpleName().startsWith("add") || m.getSimpleName().startsWith("insert");
}
return false;
}),
/**
* void remove(T)
*/
REMOVE(0, true, 1, m -> m.getParameters(). size() == 1 && m.getSimpleName().startsWith("remove")),
/**
* Return element by its name
* T get(String)
*/
GET_BY(-1, true, 1, m -> m.getSimpleName().startsWith("get")
&& m.getParameters().size() == 1 && m.getParameters().get(0).getType().getQualifiedName().equals(String.class.getName())),
/**
* The not matching method
*/
OTHER(-2, false, 0, m -> true);
private final Predicate<CtMethod<?>> detector;
private final int level;
private final boolean multi;
private final int valueParameterIndex;
MMMethodKind(int valueParameterIndex, boolean multi, int level, Predicate<CtMethod<?>> detector) {
this.multi = multi;
this.level = level;
this.detector = detector;
this.valueParameterIndex = valueParameterIndex;
}
/**
* @return true if this accessor provides access to elements of a collection.
* false if it accessed full value of attribute
*/
public boolean isMulti() {
return multi;
}
/**
* Detect kind of method
* @param method to be check method
* @return detected {@link MMMethodKind}, which fits to the `method`
*/
public static MMMethodKind kindOf(CtMethod<?> method) {
MMMethodKind result = OTHER;
for (MMMethodKind k : values()) {
if (k.detector.test(method) && result.level <= k.level) {
if (result.level == k.level && k != OTHER) {
throw new SpoonException("Ambiguous method kinds " + result.name() + " X " + k.name() + " for method " + method.getSignature());
}
result = k;
}
}
return result;
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
c00afef2879bbe2f5753cffd437c480170e7a651
|
91d0c30f45ecebb9614eef9eca1d2a4a7d22c428
|
/src/test/java/com/hcl/trading/service/OrderServiceImplTest.java
|
8f855c129f49ba2acbf8ee773841806e277f3f5d
|
[] |
no_license
|
slokakish/SonarQube
|
a544234f896a04a6899cef7c665cd7ecf86d6e27
|
5e0ece207887c8c73933eaaf569898268f3619f2
|
refs/heads/master
| 2020-12-10T15:22:21.386918
| 2019-08-28T04:54:12
| 2019-08-28T04:54:12
| 233,632,192
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,176
|
java
|
package com.hcl.trading.service;
import java.time.LocalDate;
import java.util.Optional;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.junit.MockitoJUnitRunner;
import org.springframework.web.client.RestTemplate;
import com.hcl.trading.dto.GlobalQuoteDto;
import com.hcl.trading.dto.LatestStockPriceDto;
import com.hcl.trading.dto.OrderRequestDto;
import com.hcl.trading.dto.OrderResponseDto;
import com.hcl.trading.entity.Orders;
import com.hcl.trading.entity.Stocks;
import com.hcl.trading.entity.User;
import com.hcl.trading.exception.CommonException;
import com.hcl.trading.repository.LatestPriceRepository;
import com.hcl.trading.repository.OrdersRepository;
import com.hcl.trading.repository.StockRepository;
import com.hcl.trading.repository.UserRepository;
@RunWith(MockitoJUnitRunner.class)
public class OrderServiceImplTest {
@Mock
OrdersRepository orderRepository;
@Mock
StockRepository stockRepository;
@Mock
UserRepository userRepository;
@Mock
LatestPriceRepository latestPriceRepository;
@InjectMocks
OrderServiceImpl orderServiceImpl;
@Mock
RestTemplate restTemplate;
OrderRequestDto orderRequestDto;
OrderResponseDto orderResponseDto;
User user;
Stocks stock;
Orders orders;
LatestStockPriceDto latestStockPriceDto;
GlobalQuoteDto globalQuoteDto;
@Before
public void setUp() {
orderRequestDto=getOrderRequestDto();
orderResponseDto=getOrderResponseDto();
user=getUser();
stock=getStock();
orders=getOrders();
latestStockPriceDto=getLatestPriceDto();
globalQuoteDto=getGlobalQote();
}
@Test(expected = CommonException.class)
public void createBookTest_1()
{
orderServiceImpl.createOrder(orderRequestDto);
}
@Test(expected = CommonException.class)
public void createBookTest_2()
{
Mockito.when(stockRepository.findById(Mockito.anyInt())).thenReturn(Optional.of(stock));
orderServiceImpl.createOrder(orderRequestDto);
}
@Test(expected = CommonException.class)
public void createBookTest_3()
{
Mockito.when(stockRepository.findById(Mockito.anyInt())).thenReturn(Optional.of(stock));
Mockito.when(userRepository.findById(Mockito.anyInt())).thenReturn(Optional.of(user));
orderRequestDto.setStockQuantity(100);
orderServiceImpl.createOrder(orderRequestDto);
}
public OrderRequestDto getOrderRequestDto()
{
return new OrderRequestDto(1,1,20,"GOOGL");
}
public OrderResponseDto getOrderResponseDto()
{
return new OrderResponseDto(1, 100.00, 200.00);
}
public User getUser()
{
return new User(1, "priya", "123", "h@gmail.com");
}
public Stocks getStock()
{
return new Stocks(1, "NSE", "GOOGL", 1000.00, 2, 1);
}
public Orders getOrders()
{
return new Orders(1, 1, 20, 1000.00, LocalDate.now(), LocalDate.now(), "P", 1);
}
public LatestStockPriceDto getLatestPriceDto()
{
return new LatestStockPriceDto("GOOGL", 123.00, 123.00, 12.00, 12.00, 12, LocalDate.now(), 11.00, 11.00, "11.00");
}
public GlobalQuoteDto getGlobalQote() {
return new GlobalQuoteDto(getLatestPriceDto());
}
}
|
[
"nithin2889@gmail.com"
] |
nithin2889@gmail.com
|
1902095dfddd6bb19fcceff07552a064f2753a85
|
3d8eb855896fc35302119f34a6f4b5e0e30e7c73
|
/src/Main/java/tree/PermutationsII.java
|
6136dce8549ff6dd42f7bd9e02de2256d0079c1c
|
[] |
no_license
|
wangshen2014/shuati_for_sichu
|
83f15544ce86cc6b987da661f6b5769f38ca7805
|
7380d0a9c52d6890bd2acaa5a559c7edb17553e2
|
refs/heads/master
| 2021-01-17T14:19:31.251583
| 2017-03-06T16:13:42
| 2017-03-06T16:13:42
| 84,084,088
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 178
|
java
|
package tree;
import java.util.List;
/**
* Created by patrickyu on 10/4/16.
*/
public interface PermutationsII {
public List<List<Integer>> permuteUnique(int[] nums);
}
|
[
"someone@someplace.com"
] |
someone@someplace.com
|
6dc9aeaf9ca0abcfa581adbb675e3ba17a90c647
|
998765712cb3277c308b517e4331528117271cb0
|
/castle.core/src/main/java/com/castle/util/throwables/SilentHandler.java
|
827f17cf03581f8017e394b2c26ea343c38434a8
|
[
"Apache-2.0"
] |
permissive
|
tomtzook/Castle
|
aad7e2d355a9016cd85a8ec09c28a6e75c2536bb
|
80e699f314b59778d7ddcd2548a4048a6c169efe
|
refs/heads/master
| 2023-05-13T10:17:20.295030
| 2023-04-30T17:13:26
| 2023-04-30T17:13:26
| 191,920,441
| 0
| 0
|
Apache-2.0
| 2022-11-23T22:26:36
| 2019-06-14T10:00:54
|
Java
|
UTF-8
|
Java
| false
| false
| 216
|
java
|
package com.castle.util.throwables;
import com.castle.annotations.Immutable;
@Immutable
public class SilentHandler implements ThrowableHandler {
@Override
public void handle(Throwable throwable) {
}
}
|
[
"tomtzook@gmail.com"
] |
tomtzook@gmail.com
|
f0592dfa018346697ace3c261606188fbf1640eb
|
755da35585bd16e66430289a19eb994d01ed16ef
|
/src/main/java/ch/ethz/idsc/owl/car/model/CarSteering.java
|
f4aac14c47efa3881441eea7d501b19c2b078be8
|
[] |
no_license
|
datahaki/retina
|
001f0ebe89d23a461ee95c946d93c3ba35bbdf25
|
b01b72aae54cca859b1f845748f70aa2c765f947
|
refs/heads/master
| 2020-09-01T08:32:54.658322
| 2019-10-27T12:25:36
| 2019-10-27T12:25:36
| 103,564,223
| 1
| 0
| null | 2018-10-20T02:02:24
| 2017-09-14T17:54:32
|
Matlab
|
UTF-8
|
Java
| false
| false
| 420
|
java
|
// code by jph
package ch.ethz.idsc.owl.car.model;
import ch.ethz.idsc.tensor.DoubleScalar;
import ch.ethz.idsc.tensor.Scalar;
public enum CarSteering {
FRONT(1), // Ackermann
FRONT_PARALLEL(1), // simple, only recommended for tests
REAR(1), // Ackermann
BOTH(.5), // Ackermann
;
// ---
private CarSteering(double factor) {
this.factor = DoubleScalar.of(factor);
}
public final Scalar factor;
}
|
[
"jan.hakenberg@gmail.com"
] |
jan.hakenberg@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.