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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ccf97d64f3469fb02f9b00b5d0c591f658d55304
|
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
|
/methods/Method_1009963.java
|
bae5f0f4041232f17f6256d16649d21f4b41b840
|
[] |
no_license
|
P79N6A/icse_20_user_study
|
5b9c42c6384502fdc9588430899f257761f1f506
|
8a3676bc96059ea2c4f6d209016f5088a5628f3c
|
refs/heads/master
| 2020-06-24T08:25:22.606717
| 2019-07-25T15:31:16
| 2019-07-25T15:31:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 134
|
java
|
/**
* Return the data for the provided node.
*/
public List<Double> data(int node){
return datas == null ? null : datas[node];
}
|
[
"sonnguyen@utdallas.edu"
] |
sonnguyen@utdallas.edu
|
b92d9751bacddde7f482af63d0fe2eb90e24c375
|
77e2db8319e06e09e3e42ed73a48c21c9858d2ef
|
/src/java/us/temerity/pipeline/plugin/AcroreadEditor/v2_2_1/AcroreadEditor.java
|
636a8220bd1a30aff27f4f0d26ace3e552913d4b
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
JimCallahan/Pipeline
|
8e47b6124d322bb063e54d3a99b3ab273e8f825e
|
948ea80b84e13de69f049210b63e1d58f7a8f9de
|
refs/heads/master
| 2021-01-10T18:37:22.859871
| 2015-10-26T21:05:21
| 2015-10-26T21:05:21
| 21,285,228
| 10
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,908
|
java
|
// $Id: AcroreadEditor.java,v 1.1 2007/06/17 15:34:37 jim Exp $
package us.temerity.pipeline.plugin.AcroreadEditor.v2_2_1;
import us.temerity.pipeline.*;
/*------------------------------------------------------------------------------------------*/
/* A C R O R E A D E D I T O R */
/*------------------------------------------------------------------------------------------*/
/**
* The Adobe Portable Document Format (PDF) viewer.
*/
public
class AcroreadEditor
extends SimpleSingleEditor
{
/*----------------------------------------------------------------------------------------*/
/* C O N S T R U C T O R */
/*----------------------------------------------------------------------------------------*/
public
AcroreadEditor()
{
super("Acroread", new VersionID("2.2.1"), "Temerity",
"The Adobe Portable Document Format (PDF) viewer.",
"acroread");
addSupport(OsType.Windows);
}
/*----------------------------------------------------------------------------------------*/
/* A C C E S S */
/*----------------------------------------------------------------------------------------*/
/**
* Gets the name of the editor executable.
*/
public String
getProgram()
{
if(PackageInfo.sOsType == OsType.Windows)
return "AcroRd32.exe";
return super.getProgram();
}
/*----------------------------------------------------------------------------------------*/
/* S T A T I C I N T E R N A L S */
/*----------------------------------------------------------------------------------------*/
private static final long serialVersionUID = -3708653365446832856L;
}
|
[
"jim@temerity.us"
] |
jim@temerity.us
|
4092cd2e268c8277c5be9a8889e8b7222f698144
|
309120df8e3ee5d84f1099a585b73aec6d092fd2
|
/mqtt-spy/src/main/java/pl/baczkowicz/mqttspy/scripts/PublicationScriptIO.java
|
b04c16954e20a421d4ef5ac6067a0cdcb8b9f2a3
|
[] |
no_license
|
0x7678/mqtt-spy
|
52fd6fa653a615e4eac1917aa989e1f6b59c147a
|
f31a25b9b930a572703d50c744b4f752df11a4ef
|
refs/heads/main
| 2021-01-22T13:17:20.129801
| 2014-10-19T16:18:15
| 2014-10-19T16:18:15
| 38,623,648
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,434
|
java
|
package pl.baczkowicz.mqttspy.scripts;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Date;
import javafx.application.Platform;
import javax.script.Bindings;
import javax.script.ScriptContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import pl.baczkowicz.mqttspy.connectivity.MqttConnection;
import pl.baczkowicz.mqttspy.events.EventManager;
import pl.baczkowicz.mqttspy.ui.properties.PublicationScriptProperties;
import pl.baczkowicz.mqttspy.ui.utils.Utils;
public class PublicationScriptIO implements PublicationScriptIOInterface
{
private final static Logger logger = LoggerFactory.getLogger(PublicationScriptIO.class);
private final MqttConnection connection;
private PublicationScriptProperties script;
private int publishedMessages;
private long lastTouch;
private final EventManager eventManager;
public PublicationScriptIO(final MqttConnection connection, final EventManager eventManager, final PublicationScriptProperties script)
{
this.eventManager = eventManager;
this.connection = connection;
this.script = script;
}
@Override
public void touch()
{
this.lastTouch = Utils.getMonotonicTimeInMilliseconds();
}
@Override
public void setScriptTimeout(final long customTimeout)
{
script.setScriptTimeout(customTimeout);
logger.debug("Timeout for script {} changed to {}", script.getName(), customTimeout);
}
@Override
public boolean instantiate(final String className)
{
try
{
final Bindings bindings = script.getScriptEngine().getBindings(ScriptContext.ENGINE_SCOPE);
bindings.put(className.replace(".", "_"), Class.forName(className).newInstance());
script.getScriptEngine().setBindings(bindings, ScriptContext.ENGINE_SCOPE);
return true;
}
catch (Exception e)
{
logger.error("Cannot instantiate class " + className, e);
return false;
}
}
@Override
public String execute(final String command) throws IOException, InterruptedException
{
Runtime rt = Runtime.getRuntime();
Process p = rt.exec(command);
p.waitFor();
BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line = null;
try
{
final StringBuffer sb = new StringBuffer();
while ((line = input.readLine()) != null)
{
sb.append(line);
}
return sb.toString();
}
catch (IOException e)
{
e.printStackTrace();
}
return null;
}
@Override
public void publish(final String publicationTopic, final String data)
{
publish(publicationTopic, data, 0, false);
}
@Override
public void publish(final String publicationTopic, final String data, final int qos, final boolean retained)
{
touch();
if (connection.canPublish())
{
publishedMessages++;
if (!script.getStatus().equals(ScriptRunningState.RUNNING))
{
ScriptRunner.changeState(eventManager, script.getName(), ScriptRunningState.RUNNING, script);
}
logger.debug("[JS {}] Publishing message to {} with payload = {}, qos = {}, retained = {}", script.getName(), publicationTopic, data, qos, retained);
connection.publish(publicationTopic, data, qos, retained);
Platform.runLater(new Runnable()
{
@Override
public void run()
{
script.setLastPublished(new Date());
script.setCount(publishedMessages);
}
});
}
}
public long getLastTouch()
{
return lastTouch;
}
}
|
[
"kamil.baczkowicz@gmail.com"
] |
kamil.baczkowicz@gmail.com
|
f1734a2e9b0f34698ce66f6b1a4ce9605e997fe8
|
7ec0194c493e63b18ab17b33fe69a39ed6af6696
|
/masterlock/app_decompiled/sources/com/google/android/gms/analyticsservices_app_library/C0464R.java
|
1222b95e7597053a9f22fcb05556f9480ea7c557
|
[] |
no_license
|
rasaford/CS3235
|
5626a6e7e05a2a57e7641e525b576b0b492d9154
|
44d393fb3afb5d131ad9d6317458c5f8081b0c04
|
refs/heads/master
| 2020-07-24T16:00:57.203725
| 2019-11-05T13:00:09
| 2019-11-05T13:00:09
| 207,975,557
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 197
|
java
|
package com.google.android.gms.analyticsservices_app_library;
/* renamed from: com.google.android.gms.analyticsservices_app_library.R */
public final class C0464R {
private C0464R() {
}
}
|
[
"fruehaufmaximilian@gmail.com"
] |
fruehaufmaximilian@gmail.com
|
6cf84d1e1e82f36bbe4058b8ec5bf0d0cb8dcfed
|
aa97f7091839a6e755713fd7e709d0c3005839b6
|
/app/src/main/java/tv/merabihar/app/merabihar/CustomFonts/MyTextView_Roboto_Black.java
|
77ad71e697df382864ca96674b5e5485954f7b4f
|
[] |
no_license
|
nisharzingo/BiharMera
|
0f9d9fe878b26c88dfb0442eead80f376b3bd887
|
b6ba5834e568f7210fe4b94b908c416d780486ca
|
refs/heads/master
| 2020-04-03T16:00:09.928133
| 2018-12-04T12:15:56
| 2018-12-04T12:15:56
| 155,386,848
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 829
|
java
|
package tv.merabihar.app.merabihar.CustomFonts;
import android.content.Context;
import android.graphics.Typeface;
import android.util.AttributeSet;
import android.widget.TextView;
public class MyTextView_Roboto_Black extends TextView {
public MyTextView_Roboto_Black(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
init();
}
public MyTextView_Roboto_Black(Context context, AttributeSet attrs) {
super(context, attrs);
init();
}
public MyTextView_Roboto_Black(Context context) {
super(context);
init();
}
private void init() {
if (!isInEditMode()) {
Typeface tf = Typeface.createFromAsset(getContext().getAssets(), "fonts/Roboto-Black.ttf");
setTypeface(tf);
}
}
}
|
[
"nishar@zingohotels.com"
] |
nishar@zingohotels.com
|
3480f3b2b48fc2e7fe795bc194f610767dcf08bc
|
e9ce7f937722aeb0c9b5fdd98ba4fc746e3a5ddb
|
/src/main/java/com/davidm/mykindlenews/generated/jooq/mysql/tables/Servers.java
|
94aea7edb12fb15966c3375a8ec59912261fbf0b
|
[] |
no_license
|
davidmotson/kindlenews
|
5e3aa9079e7c301eee848505e356319672655761
|
9820473cb6de295f0420dc88b58d6c727acd8dcf
|
refs/heads/master
| 2016-09-10T23:20:16.362015
| 2015-08-15T17:41:56
| 2015-08-15T17:41:56
| 40,692,575
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,648
|
java
|
/**
* This class is generated by jOOQ
*/
package com.davidm.mykindlenews.generated.jooq.mysql.tables;
/**
* MySQL Foreign Servers table
*/
@javax.annotation.Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.5.4"
},
comments = "This class is generated by jOOQ"
)
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Servers extends org.jooq.impl.TableImpl<com.davidm.mykindlenews.generated.jooq.mysql.tables.records.ServersRecord> {
private static final long serialVersionUID = -1090966522;
/**
* The reference instance of <code>mysql.servers</code>
*/
public static final com.davidm.mykindlenews.generated.jooq.mysql.tables.Servers SERVERS = new com.davidm.mykindlenews.generated.jooq.mysql.tables.Servers();
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<com.davidm.mykindlenews.generated.jooq.mysql.tables.records.ServersRecord> getRecordType() {
return com.davidm.mykindlenews.generated.jooq.mysql.tables.records.ServersRecord.class;
}
/**
* The column <code>mysql.servers.Server_name</code>.
*/
public final org.jooq.TableField<com.davidm.mykindlenews.generated.jooq.mysql.tables.records.ServersRecord, java.lang.String> SERVER_NAME = createField("Server_name", org.jooq.impl.SQLDataType.CHAR.length(64).nullable(false).defaulted(true), this, "");
/**
* The column <code>mysql.servers.Host</code>.
*/
public final org.jooq.TableField<com.davidm.mykindlenews.generated.jooq.mysql.tables.records.ServersRecord, java.lang.String> HOST = createField("Host", org.jooq.impl.SQLDataType.CHAR.length(64).nullable(false).defaulted(true), this, "");
/**
* The column <code>mysql.servers.Db</code>.
*/
public final org.jooq.TableField<com.davidm.mykindlenews.generated.jooq.mysql.tables.records.ServersRecord, java.lang.String> DB = createField("Db", org.jooq.impl.SQLDataType.CHAR.length(64).nullable(false).defaulted(true), this, "");
/**
* The column <code>mysql.servers.Username</code>.
*/
public final org.jooq.TableField<com.davidm.mykindlenews.generated.jooq.mysql.tables.records.ServersRecord, java.lang.String> USERNAME = createField("Username", org.jooq.impl.SQLDataType.CHAR.length(64).nullable(false).defaulted(true), this, "");
/**
* The column <code>mysql.servers.Password</code>.
*/
public final org.jooq.TableField<com.davidm.mykindlenews.generated.jooq.mysql.tables.records.ServersRecord, java.lang.String> PASSWORD = createField("Password", org.jooq.impl.SQLDataType.CHAR.length(64).nullable(false).defaulted(true), this, "");
/**
* The column <code>mysql.servers.Port</code>.
*/
public final org.jooq.TableField<com.davidm.mykindlenews.generated.jooq.mysql.tables.records.ServersRecord, java.lang.Integer> PORT = createField("Port", org.jooq.impl.SQLDataType.INTEGER.nullable(false).defaulted(true), this, "");
/**
* The column <code>mysql.servers.Socket</code>.
*/
public final org.jooq.TableField<com.davidm.mykindlenews.generated.jooq.mysql.tables.records.ServersRecord, java.lang.String> SOCKET = createField("Socket", org.jooq.impl.SQLDataType.CHAR.length(64).nullable(false).defaulted(true), this, "");
/**
* The column <code>mysql.servers.Wrapper</code>.
*/
public final org.jooq.TableField<com.davidm.mykindlenews.generated.jooq.mysql.tables.records.ServersRecord, java.lang.String> WRAPPER = createField("Wrapper", org.jooq.impl.SQLDataType.CHAR.length(64).nullable(false).defaulted(true), this, "");
/**
* The column <code>mysql.servers.Owner</code>.
*/
public final org.jooq.TableField<com.davidm.mykindlenews.generated.jooq.mysql.tables.records.ServersRecord, java.lang.String> OWNER = createField("Owner", org.jooq.impl.SQLDataType.CHAR.length(64).nullable(false).defaulted(true), this, "");
/**
* Create a <code>mysql.servers</code> table reference
*/
public Servers() {
this("servers", null);
}
/**
* Create an aliased <code>mysql.servers</code> table reference
*/
public Servers(java.lang.String alias) {
this(alias, com.davidm.mykindlenews.generated.jooq.mysql.tables.Servers.SERVERS);
}
private Servers(java.lang.String alias, org.jooq.Table<com.davidm.mykindlenews.generated.jooq.mysql.tables.records.ServersRecord> aliased) {
this(alias, aliased, null);
}
private Servers(java.lang.String alias, org.jooq.Table<com.davidm.mykindlenews.generated.jooq.mysql.tables.records.ServersRecord> aliased, org.jooq.Field<?>[] parameters) {
super(alias, com.davidm.mykindlenews.generated.jooq.mysql.Mysql.MYSQL, aliased, parameters, "MySQL Foreign Servers table");
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.UniqueKey<com.davidm.mykindlenews.generated.jooq.mysql.tables.records.ServersRecord> getPrimaryKey() {
return com.davidm.mykindlenews.generated.jooq.mysql.Keys.KEY_SERVERS_PRIMARY;
}
/**
* {@inheritDoc}
*/
@Override
public java.util.List<org.jooq.UniqueKey<com.davidm.mykindlenews.generated.jooq.mysql.tables.records.ServersRecord>> getKeys() {
return java.util.Arrays.<org.jooq.UniqueKey<com.davidm.mykindlenews.generated.jooq.mysql.tables.records.ServersRecord>>asList(com.davidm.mykindlenews.generated.jooq.mysql.Keys.KEY_SERVERS_PRIMARY);
}
/**
* {@inheritDoc}
*/
@Override
public com.davidm.mykindlenews.generated.jooq.mysql.tables.Servers as(java.lang.String alias) {
return new com.davidm.mykindlenews.generated.jooq.mysql.tables.Servers(alias, this);
}
/**
* Rename this table
*/
public com.davidm.mykindlenews.generated.jooq.mysql.tables.Servers rename(java.lang.String name) {
return new com.davidm.mykindlenews.generated.jooq.mysql.tables.Servers(name, null);
}
}
|
[
"davidmotson@gmail.com"
] |
davidmotson@gmail.com
|
cbc3cea991fa7947cec18d50411d0e29fae9be43
|
f0568343ecd32379a6a2d598bda93fa419847584
|
/examples/dfp_axis/src/main/java/dfp/axis/v201308/reportservice/RunReachReport.java
|
dec8b50f7465957b015df11aac9e1f4ae2ecf2ee
|
[
"Apache-2.0"
] |
permissive
|
frankzwang/googleads-java-lib
|
bd098b7b61622bd50352ccca815c4de15c45a545
|
0cf942d2558754589a12b4d9daa5902d7499e43f
|
refs/heads/master
| 2021-01-20T23:20:53.380875
| 2014-07-02T19:14:30
| 2014-07-02T19:14:30
| 21,526,492
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,840
|
java
|
// Copyright 2013 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package dfp.axis.v201308.reportservice;
import com.google.api.ads.common.lib.auth.OfflineCredentials;
import com.google.api.ads.common.lib.auth.OfflineCredentials.Api;
import com.google.api.ads.dfp.axis.factory.DfpServices;
import com.google.api.ads.dfp.axis.utils.v201308.ReportDownloader;
import com.google.api.ads.dfp.axis.v201308.Column;
import com.google.api.ads.dfp.axis.v201308.DateRangeType;
import com.google.api.ads.dfp.axis.v201308.Dimension;
import com.google.api.ads.dfp.axis.v201308.ExportFormat;
import com.google.api.ads.dfp.axis.v201308.ReportJob;
import com.google.api.ads.dfp.axis.v201308.ReportQuery;
import com.google.api.ads.dfp.axis.v201308.ReportServiceInterface;
import com.google.api.ads.dfp.lib.client.DfpSession;
import com.google.api.client.auth.oauth2.Credential;
import java.io.File;
/**
* This example runs a reach report.
*
* Credentials and properties in {@code fromFile()} are pulled from the
* "ads.properties" file. See README for more info.
*
* Tags: ReportService.runReportJob
*
* @author Adam Rogal
*/
public class RunReachReport {
public static void runExample(DfpServices dfpServices, DfpSession session) throws Exception {
// Get the ReportService.
ReportServiceInterface reportService = dfpServices.get(session, ReportServiceInterface.class);
// Create report query.
ReportQuery reportQuery = new ReportQuery();
reportQuery.setDimensions(new Dimension[] {Dimension.LINE_ITEM_ID, Dimension.LINE_ITEM_NAME});
reportQuery.setColumns(new Column[] {Column.REACH_FREQUENCY,
Column.REACH_AVERAGE_REVENUE, Column.REACH});
// Set the dynamic date range type or a custom start and end date that is
// the beginning of the week (Sunday) to the end of the week (Saturday), or
// the first of the month to the end of the month.
reportQuery.setDateRangeType(DateRangeType.REACH_LIFETIME);
// Create report job.
ReportJob reportJob = new ReportJob();
reportJob.setReportQuery(reportQuery);
// Run report job.
reportJob = reportService.runReportJob(reportJob);
// Create report downloader.
ReportDownloader reportDownloader = new ReportDownloader(reportService, reportJob.getId());
// Wait for the report to be ready.
reportDownloader.waitForReportReady();
// Change to your file location.
String filePath = File.createTempFile("reach-report-", ".csv.gz").toString();
System.out.printf("Downloading report to %s ...", filePath);
// Download the report.
reportDownloader.downloadReport(ExportFormat.CSV_DUMP, filePath);
System.out.println("done.");
}
public static void main(String[] args) throws Exception {
// Generate a refreshable OAuth2 credential similar to a ClientLogin token
// and can be used in place of a service account.
Credential oAuth2Credential = new OfflineCredentials.Builder()
.forApi(Api.DFP)
.fromFile()
.build()
.generateCredential();
// Construct a DfpSession.
DfpSession session = new DfpSession.Builder()
.fromFile()
.withOAuth2Credential(oAuth2Credential)
.build();
DfpServices dfpServices = new DfpServices();
runExample(dfpServices, session);
}
}
|
[
"jradcliff@google.com"
] |
jradcliff@google.com
|
5d8e836442a96e93f5482f0851aff24790386737
|
1fd0dea6e6161a92d634a4caa076a2ecffa38637
|
/compon/src/main/java/com/dpcsa/compon/interfaces_classes/IDbListener.java
|
603be5d60f02b9646eda7768c0c330c3e31048a0
|
[] |
no_license
|
depro49/depro
|
ab8ba815f857970c7bf473497d9f57ed0db3df31
|
ebb04b5f1d21487c2e6104b1c91a84e62ac7f959
|
refs/heads/master
| 2020-06-14T02:36:38.539155
| 2020-04-29T04:12:29
| 2020-04-29T04:12:29
| 194,869,229
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 227
|
java
|
package com.dpcsa.compon.interfaces_classes;
import com.dpcsa.compon.json_simple.ListRecords;
public interface IDbListener {
public void onResponse(IBase iBase, ListRecords listRecords, String table, String nameAlias);
}
|
[
"yurakvlad@gmail.com"
] |
yurakvlad@gmail.com
|
7fa39feabd6c3aceabf79156ba7f680485dede17
|
c9d1ed728caf4b18ac6a68f13f093f43893db249
|
/chapter_005/src/main/java/ru/job4j/genericsimplearray/RoleStore.java
|
7a2af21e0efac34827f5f28d31f8788a3195e477
|
[
"Apache-2.0"
] |
permissive
|
danailKondov/dkondov
|
07580eabe06ffd7bc77566fc8969b0e2253dd20d
|
14b3d2940638b2f69072dbdc0a9d7f8ba1b3748b
|
refs/heads/master
| 2021-01-01T16:00:49.687121
| 2018-05-10T19:45:50
| 2018-05-10T19:45:50
| 97,752,582
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 784
|
java
|
package ru.job4j.genericsimplearray;
import java.util.Iterator;
/**
* Class for store roles.
*
* @since 20/08/2017
* @version 2
*/
public class RoleStore extends AbstractStore<Role> {
/**
* Constructor initializing database.
* @param size - size of database
*/
public RoleStore(int size) {
super(new SimpleArray<>(size));
}
/**
* String representation of object.
* @return users names
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
Iterator<Role> iterator = store.iterator();
while(iterator.hasNext()) {
Role role = iterator.next();
sb.append(role.role);
sb.append(" ");
}
return sb.toString();
}
}
|
[
"dkondov@yandex.ru"
] |
dkondov@yandex.ru
|
e23a21c243b72703b433b62c0ede504b8e8533e1
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_ac31820f201d63f55e84873e114434602aeb1f60/STweet/2_ac31820f201d63f55e84873e114434602aeb1f60_STweet_s.java
|
def2cca2d075421cdcd7431c8937f40b688da715
|
[] |
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,960
|
java
|
/*
Copyright (c) 2010, John Crepezzi <john@crepezzi.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the <organization> nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.crepezzi.tweetstream4j.types;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import net.sf.json.JSONObject;
/**
* A Class representing a streamed tweet from the Twitter streaming API.
*
* @author jcrepezzi
*/
public class STweet {
private Boolean favorited, truncated;
private Long inReplyToUserId, inReplyToStatusId, statusId;
private String text, inReplyToScreenName, source, createdAt;
private STweetUser user;
private STweetGeo geo;
private JSONObject json;
protected STweet() {
// no creating tweets
}
/**
* Parse the JSON of an incoming tweet and return an STweet instance
*
* @param obj
* The JSON object to parse
* @return The resultant STweet
*/
public static STweet parseJSON(JSONObject obj) {
STweet tweet = new STweet();
tweet.json = obj;
tweet.favorited = obj.getBoolean("favorited");
tweet.truncated = obj.getBoolean("truncated");
tweet.inReplyToUserId = obj.optLong("in_reply_to_user_id");
tweet.inReplyToStatusId = obj.optLong("in_reply_to_status_id");
tweet.statusId = obj.getLong("id");
tweet.text = obj.getString("text");
tweet.inReplyToScreenName = obj.getString("in_reply_to_screen_name");
tweet.source = obj.getString("source");
tweet.createdAt = obj.getString("created_at");
tweet.user = STweetUser.parseJSON(obj.getJSONObject("user"));
// get geo
JSONObject t = obj.optJSONObject("geo");
if (t != null && !t.isNullObject())
tweet.geo = STweetGeo.parseJSON(t);
return tweet;
}
public JSONObject getJSON() {
return this.json;
}
@Override
public String toString() {
return new ToStringBuilder(null)
.append("statusId", statusId)
.append("tweet", text)
.append("user", user)
.toString();
}
/**
* Equality is based on statusId
*/
@Override
public boolean equals(Object obj) {
if (obj == this) return true;
if (!(obj instanceof STweet)) return false;
STweet rhs = (STweet) obj;
return new EqualsBuilder().append(this.statusId, rhs.statusId).isEquals();
}
@Override
public int hashCode() {
return new HashCodeBuilder(-1944286887, -1020224145).append(statusId).hashCode();
}
public String getCreatedAt() {
return createdAt;
}
public Boolean getFavorited() {
return favorited;
}
public String getInReplyToScreenName() {
return inReplyToScreenName;
}
public Long getInReplyToStatusId() {
return inReplyToStatusId;
}
public Long getInReplyToUserId() {
return inReplyToUserId;
}
public String getSource() {
return source;
}
public Long getStatusId() {
return statusId;
}
public String getText() {
return text;
}
public Boolean getTruncated() {
return truncated;
}
public STweetUser getUser() {
return user;
}
public STweetGeo getGeo() {
return geo;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
31e15a54dca483d0882a94e327d0a1b14c3d77ba
|
4c214a6fdbc4334d5f386f48529f644398e09a1e
|
/Chapter08/PostgreSQL/Gradle/Basic/PojoTypes/src/main/java/com/classicmodels/udt/pojo/RecordEvaluationCriteria.java
|
58593e7bb144737d431d85ca5de0be45e545f06c
|
[
"MIT"
] |
permissive
|
PacktPublishing/jOOQ-Masterclass
|
3dfcebe369f6b080b6df987eb1536673f6f2073b
|
410b7c63c5b018a6f6ae40285de12d2c591d4a9f
|
refs/heads/master
| 2023-01-23T00:50:14.726939
| 2023-01-18T10:13:15
| 2023-01-18T10:13:15
| 295,348,949
| 27
| 17
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 169
|
java
|
package com.classicmodels.udt.pojo;
public record RecordEvaluationCriteria(Integer communicationAbility, Integer ethics, Integer performance, Integer employeeInput) {}
|
[
"leoprivacy@yahoo.com"
] |
leoprivacy@yahoo.com
|
e6e5bd3bbe833893307e423d8fa2f8d8c74b39c1
|
3ef657ad4cea6596ab95254f27d729e16bd5caad
|
/oracle2derby_tools/src/main/java/com/avn/dataload/model/CMFWKSPCDSC.java
|
b253930c5cc8aa491ded1cb5e26ebe879b405bff
|
[] |
no_license
|
synico/oracle2derby_tools
|
b72415369cbe97ccd88cee0543e7127d6ede6928
|
e8318382e53796efc39a1a79163ba2877eeb8ca0
|
refs/heads/master
| 2021-01-10T22:39:40.984475
| 2017-03-15T06:26:20
| 2017-03-15T06:26:20
| 70,386,969
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,830
|
java
|
package com.avn.dataload.model;
public class CMFWKSPCDSC {
private java.math.BigDecimal CMFWKSPC_ID;
public void setCMFWKSPC_ID(java.math.BigDecimal CMFWKSPC_ID) {
this.CMFWKSPC_ID = CMFWKSPC_ID;
}
public java.math.BigDecimal getCMFWKSPC_ID() {
return this.CMFWKSPC_ID;
}
private java.math.BigDecimal LANGUAGE_ID;
public void setLANGUAGE_ID(java.math.BigDecimal LANGUAGE_ID) {
this.LANGUAGE_ID = LANGUAGE_ID;
}
public java.math.BigDecimal getLANGUAGE_ID() {
return this.LANGUAGE_ID;
}
private java.lang.String NAME;
public void setNAME(java.lang.String NAME) {
this.NAME = NAME;
}
public java.lang.String getNAME() {
return this.NAME;
}
private java.lang.String DESCRIPTION;
public void setDESCRIPTION(java.lang.String DESCRIPTION) {
this.DESCRIPTION = DESCRIPTION;
}
public java.lang.String getDESCRIPTION() {
return this.DESCRIPTION;
}
private java.math.BigDecimal OPTCOUNTER;
public void setOPTCOUNTER(java.math.BigDecimal OPTCOUNTER) {
this.OPTCOUNTER = OPTCOUNTER;
}
public java.math.BigDecimal getOPTCOUNTER() {
return this.OPTCOUNTER;
}
public String toString() {
StringBuilder result = new StringBuilder();
result.append("CMFWKSPC_ID: " + getCMFWKSPC_ID() + "||");
result.append("LANGUAGE_ID: " + getLANGUAGE_ID() + "||");
result.append("NAME: " + getNAME() + "||");
result.append("DESCRIPTION: " + getDESCRIPTION() + "||");
result.append("OPTCOUNTER: " + getOPTCOUNTER() + "||");
return result.toString();
}
}
|
[
"synico@gmail.com"
] |
synico@gmail.com
|
df3331c1283b7ac7431f32fb6fd3e7e5c67445bd
|
0e06e096a9f95ab094b8078ea2cd310759af008b
|
/classes11-dex2jar/com/google/android/gms/common/internal/zze.java
|
f454205b143bbcdb307102156e97bc15a101f492
|
[] |
no_license
|
Manifold0/adcom_decompile
|
4bc2907a057c73703cf141dc0749ed4c014ebe55
|
fce3d59b59480abe91f90ba05b0df4eaadd849f7
|
refs/heads/master
| 2020-05-21T02:01:59.787840
| 2019-05-10T00:36:27
| 2019-05-10T00:36:27
| 185,856,424
| 1
| 2
| null | 2019-05-10T00:36:28
| 2019-05-09T19:04:28
|
Java
|
UTF-8
|
Java
| false
| false
| 6,472
|
java
|
//
// Decompiled by Procyon v0.5.34
//
package com.google.android.gms.common.internal;
import android.content.ServiceConnection;
import android.content.ComponentName;
import android.util.Log;
import android.os.Message;
import com.google.android.gms.common.stats.ConnectionTracker;
import android.content.Context;
import javax.annotation.concurrent.GuardedBy;
import java.util.HashMap;
import android.os.Handler;
import android.os.Handler$Callback;
final class zze extends GmsClientSupervisor implements Handler$Callback
{
private final Handler mHandler;
@GuardedBy("mConnectionStatus")
private final HashMap<zza, zzf> zzdu;
private final Context zzdv;
private final ConnectionTracker zzdw;
private final long zzdx;
private final long zzdy;
zze(final Context context) {
this.zzdu = new HashMap<zza, zzf>();
this.zzdv = context.getApplicationContext();
this.mHandler = new com.google.android.gms.internal.common.zze(context.getMainLooper(), (Handler$Callback)this);
this.zzdw = ConnectionTracker.getInstance();
this.zzdx = 5000L;
this.zzdy = 300000L;
}
public final boolean handleMessage(final Message message) {
switch (message.what) {
default: {
return false;
}
case 0: {
synchronized (this.zzdu) {
final zza zza = (zza)message.obj;
final zzf zzf = this.zzdu.get(zza);
if (zzf != null && zzf.zzr()) {
if (zzf.isBound()) {
zzf.zzf("GmsClientSupervisor");
}
this.zzdu.remove(zza);
}
return true;
}
}
case 1: {
while (true) {
while (true) {
Label_0243: {
synchronized (this.zzdu) {
final zza zza2 = (zza)message.obj;
final zzf zzf2 = this.zzdu.get(zza2);
if (zzf2 != null && zzf2.getState() == 3) {
final String value = String.valueOf(zza2);
Log.e("GmsClientSupervisor", new StringBuilder(String.valueOf(value).length() + 47).append("Timeout waiting for ServiceConnection callback ").append(value).toString(), (Throwable)new Exception());
ComponentName componentName;
if ((componentName = zzf2.getComponentName()) == null) {
componentName = zza2.getComponentName();
}
if (componentName != null) {
break Label_0243;
}
final ComponentName componentName2 = new ComponentName(zza2.getPackage(), "unknown");
zzf2.onServiceDisconnected(componentName2);
}
return true;
}
}
continue;
}
}
break;
}
}
}
@Override
protected final boolean zza(final zza zza, final ServiceConnection serviceConnection, final String s) {
while (true) {
Preconditions.checkNotNull(serviceConnection, "ServiceConnection must not be null");
while (true) {
zzf zzf;
synchronized (this.zzdu) {
zzf = this.zzdu.get(zza);
if (zzf == null) {
zzf = new zzf(this, zza);
zzf.zza(serviceConnection, s);
zzf.zze(s);
this.zzdu.put(zza, zzf);
final zzf zzf2 = zzf;
return zzf2.isBound();
}
this.mHandler.removeMessages(0, (Object)zza);
if (zzf.zza(serviceConnection)) {
final String value = String.valueOf(zza);
throw new IllegalStateException(new StringBuilder(String.valueOf(value).length() + 81).append("Trying to bind a GmsServiceConnection that was already connected before. config=").append(value).toString());
}
}
zzf.zza(serviceConnection, s);
switch (zzf.getState()) {
case 1: {
serviceConnection.onServiceConnected(zzf.getComponentName(), zzf.getBinder());
final zzf zzf2 = zzf;
continue;
}
case 2: {
zzf.zze(s);
final zzf zzf2 = zzf;
continue;
}
default: {
final zzf zzf2 = zzf;
continue;
}
}
break;
}
}
}
@Override
protected final void zzb(final zza zza, final ServiceConnection serviceConnection, final String s) {
Preconditions.checkNotNull(serviceConnection, "ServiceConnection must not be null");
final zzf zzf;
synchronized (this.zzdu) {
zzf = this.zzdu.get(zza);
if (zzf == null) {
final String value = String.valueOf(zza);
throw new IllegalStateException(new StringBuilder(String.valueOf(value).length() + 50).append("Nonexistent connection status for service config: ").append(value).toString());
}
}
final Throwable t;
if (!zzf.zza(serviceConnection)) {
final String value2 = String.valueOf(t);
throw new IllegalStateException(new StringBuilder(String.valueOf(value2).length() + 76).append("Trying to unbind a GmsServiceConnection that was not bound before. config=").append(value2).toString());
}
zzf.zzb(serviceConnection, s);
if (zzf.zzr()) {
this.mHandler.sendMessageDelayed(this.mHandler.obtainMessage(0, (Object)t), this.zzdx);
}
}
// monitorexit(hashMap)
}
|
[
"querky1231@gmail.com"
] |
querky1231@gmail.com
|
37b829d9c798bd03273c972b2d7cfe9cf44507c8
|
180c4924f2bbbf8c8b16f68c85c89f851312614b
|
/FAIDA/FAIDAAlgorithm/src/main/java/de/hpi/mpss2015n/approxind/utils/VirtualColumnStore.java
|
f93dbf41a7fbd1d436082e780cca9541059b7e01
|
[
"Apache-2.0"
] |
permissive
|
yuzhiweilai/metanome-algorithms
|
d7fce8ad84a5a331deb7bfcf1e659da6add5ca71
|
61c14ad342686bac622b9cce9d21a3a42404352e
|
refs/heads/master
| 2021-05-11T17:56:53.340887
| 2017-12-23T09:49:26
| 2017-12-23T09:49:26
| 117,808,897
| 1
| 0
| null | 2018-01-17T08:40:16
| 2018-01-17T08:40:16
| null |
UTF-8
|
Java
| false
| false
| 7,868
|
java
|
package de.hpi.mpss2015n.approxind.utils;
import de.metanome.algorithm_integration.input.*;
import it.unimi.dsi.fastutil.longs.LongOpenHashSet;
import it.unimi.dsi.fastutil.longs.LongSet;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
* Does not actually store columns. Instead, it only creates the sample that is of major importance for FAIDA.
* Other than that, it just exposes the original data store as a {@link AbstractColumnStore column store}.
*/
public final class VirtualColumnStore extends AbstractColumnStore {
/**
* {@link RelationalInputGenerator} for the backing relation. Will be used to serve rows.
*/
private final RelationalInputGenerator inputGenerator;
/**
* Whether the {@link #inputGenerator} should be close after a {@link ColumnIterator} is closed.
*/
private final boolean isCloseConnectionsRigorously;
/**
* Creates a new instance but does not load it.
*
* @param numColumns the number of columns to be hosted in this instance
* @param sampleGoal see {@link #sampleGoal}
* @see #load(String, int, RelationalInput)
*/
VirtualColumnStore(int numColumns, int sampleGoal, RelationalInputGenerator inputGenerator, boolean isCloseConnectionsRigorously) {
super(numColumns, sampleGoal);
this.inputGenerator = inputGenerator;
this.isCloseConnectionsRigorously = isCloseConnectionsRigorously;
}
/**
* @param activeColumns columns that should be read
* @return iterator for selected columns
*/
public ColumnIterator getRows(SimpleColumnCombination activeColumns) {
this.initHashCaches();
try {
return new VirtualColumnStore.ColumnIterator(this.inputGenerator.generateNewCopy(), activeColumns);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
@Override
protected void writeColumnsAndSample(RelationalInput input) throws InputIterationException, IOException {
List<List<String>> alternativeSamples = new ArrayList<>();
final List<LongSet> sampledColumnValues = new ArrayList<>();
for (int i = 0; i < this.getNumberOfColumns(); i++) {
sampledColumnValues.add(new LongOpenHashSet(this.sampleGoal < 0 ? 1000 : this.sampleGoal));
}
// Keeps track of the first value in each column if it is the only value seen.
Long[] firstColumnValues = new Long[this.getNumberOfColumns()];
int rowCounter = 0;
DebugCounter counter = new DebugCounter();
while (input.hasNext()) {
List<String> row = input.next();
boolean isSampleCompleted = true;
boolean rowHasUnseenValue = false;
for (int i = 0; i < this.getNumberOfColumns(); i++) {
// Write the hash to the column.
String str = row.get(i);
long hash = getHash(str, i);
// Keep track of the first column value and delete it if multiple values are observed.
if (rowCounter == 0) firstColumnValues[i] = hash;
else if (firstColumnValues[i] != null && firstColumnValues[i] != hash) firstColumnValues[i] = null;
// Check if the value requests to put the row into the sample.
if (hash != NULLHASH) {
final LongSet sampledValues = sampledColumnValues.get(i);
boolean shouldSample = this.sampleGoal < 0 || sampledValues.size() < this.sampleGoal;
isSampleCompleted &= !shouldSample;
if (shouldSample && sampledValues.add(hash)) {
rowHasUnseenValue = true;
}
}
}
if (rowHasUnseenValue) {
alternativeSamples.add(row);
}
counter.countUp();
rowCounter++;
if (isSampleCompleted) break;
}
counter.done();
writeSample(alternativeSamples);
// Check for constant and null columns.
for (int i = 0; i < firstColumnValues.length; i++) {
this.isNullColumn[i] = firstColumnValues[i] != null && firstColumnValues[i] == NULLHASH;
this.isConstantColumn[i] = firstColumnValues[i] != null && firstColumnValues[i] != NULLHASH;
}
}
/**
* Create a columns store for each fileInputGenerators
*
* @param fileInputGenerators input
* @param isCloseConnectionsRigorously whether connections for reading should be closed when currently not needed
* @return column stores
*/
public static VirtualColumnStore[] create(RelationalInputGenerator[] fileInputGenerators, int sampleGoal, boolean isCloseConnectionsRigorously) {
VirtualColumnStore[] stores = new VirtualColumnStore[fileInputGenerators.length];
for (int tableNumber = 0; tableNumber < fileInputGenerators.length; tableNumber++) {
RelationalInputGenerator generator = fileInputGenerators[tableNumber];
try (RelationalInput input = generator.generateNewCopy()) {
String datasetDir;
if (generator instanceof FileInputGenerator) {
datasetDir = ((FileInputGenerator) generator).getInputFile().getParentFile().getName();
} else {
datasetDir = "unknown";
}
stores[tableNumber] = new VirtualColumnStore(input.numberOfColumns(), sampleGoal, generator, isCloseConnectionsRigorously);
stores[tableNumber].load(datasetDir, tableNumber, input);
input.close();
if (isCloseConnectionsRigorously) {
generator.close();
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
return stores;
}
/**
* Provides the contents of a column file.
*/
private final class ColumnIterator implements de.hpi.mpss2015n.approxind.utils.ColumnIterator {
private final RelationalInput relationalInput;
private final long[] data;
private final SimpleColumnCombination activeColumns;
private final AOCacheMap<String, Long> hashCache;
ColumnIterator(RelationalInput relationalInput, SimpleColumnCombination activeColumns) {
this.relationalInput = relationalInput;
this.activeColumns = activeColumns;
this.data = new long[activeColumns.getColumns().length];
this.hashCache = new AOCacheMap<>(CACHE_THRESHOLD * this.activeColumns.getColumns().length);
}
@Override
public boolean hasNext() {
try {
return this.relationalInput.hasNext();
} catch (InputIterationException e) {
throw new RuntimeException(e);
}
}
@Override
public long[] next() {
try {
List<String> tuple = this.relationalInput.next();
for (int i = 0; i < this.activeColumns.getColumns().length; i++) {
String value = tuple.get(this.activeColumns.getColumn(i));
long hash = hash(value, this.hashCache);
this.data[i] = hash;
}
} catch (InputIterationException e) {
throw new RuntimeException(e);
}
return this.data;
}
@Override
public void close() {
try {
this.relationalInput.close();
if (VirtualColumnStore.this.isCloseConnectionsRigorously) {
VirtualColumnStore.this.inputGenerator.close();
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
|
[
"sebastian.kruse@hpi.de"
] |
sebastian.kruse@hpi.de
|
b2736b662088e2891e1f375d3981765f0d7c6de0
|
a25aa54ff549e00ed88c7b4b5393cbb55b2c8b12
|
/src/main/java/gg/galaxygaming/ts/RankManager/RankManager.java
|
b99a7ed6e4b7dea3a6fff07949af8590d852d359
|
[
"MIT"
] |
permissive
|
pupnewfster/JanetTS
|
e3a8c3d12e2f9ee8e1cd630eab8f0263d86be047
|
c7f28b9387a21edac44ecb9a6b6287883e6e9761
|
refs/heads/master
| 2020-04-16T02:24:25.957594
| 2017-04-25T23:18:25
| 2017-04-25T23:18:25
| 59,787,805
| 2
| 2
| null | 2016-06-28T00:35:42
| 2016-05-26T22:42:00
|
Java
|
UTF-8
|
Java
| false
| false
| 6,460
|
java
|
package gg.galaxygaming.ts.RankManager;
import com.github.theholywaffle.teamspeak3.TS3Api;
import com.github.theholywaffle.teamspeak3.api.ChannelProperty;
import com.github.theholywaffle.teamspeak3.api.wrapper.Client;
import com.github.theholywaffle.teamspeak3.api.wrapper.ServerGroup;
import gg.galaxygaming.ts.JanetConfig;
import gg.galaxygaming.ts.JanetTS;
import gg.galaxygaming.ts.Utils;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Properties;
public class RankManager {
private String url;
private int vid, sSup, gSup, umrID, caID, cSup, dndID;
private Properties properties;
public void init() {
JanetConfig config = JanetTS.getInstance().getConfig();
this.url = "jdbc:mysql://" + config.getString("dbHost") + "/" + config.getString("dbName");
this.vid = config.getInt("verifiedID");
this.sSup = config.getInt("silverID");
this.gSup = config.getInt("goldID");
this.cSup = config.getInt("communityID");
this.umrID = config.getInt("umrID");
this.caID = config.getInt("caID");
this.dndID = config.getInt("dndID");
this.properties = new Properties();
properties.setProperty("user", config.getString("dbUser"));
properties.setProperty("password", config.getString("dbPassword"));
properties.setProperty("useSSL", "false");
properties.setProperty("autoReconnect", "true");
properties.setProperty("useLegacyDatetimeCode", "false");
properties.setProperty("serverTimezone", "EST");
if (JanetTS.getApi().getClients() != null)
checkAll();
}
public void checkAll() {
JanetTS.getApi().getClients().stream().filter(c -> !c.isServerQueryClient() && c.getId() != JanetTS.getClientId()).forEach(c -> check(c.getUniqueIdentifier()));
}
public void check(String tsUID) {
try {
Connection conn = DriverManager.getConnection(this.url, this.properties);
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM cms_custom_database_2 WHERE field_3 = \"" + tsUID + "\"");
ArrayList<Integer> tsRanks = new ArrayList<>();
int room = -1;
String siteID = null;
if (rs.next()) {
siteID = rs.getString("member_id");
ResultSet rs2 = stmt.executeQuery("SELECT * FROM core_members WHERE member_id = \"" + siteID + "\"");
if (rs2.next()) {
int primary = rs2.getInt("member_group_id");
String secondary = rs2.getString("mgroup_others");
String[] secondaries = secondary.split(",");
StringBuilder query = new StringBuilder("site_rank_id = " + primary);
for (String s : secondaries)
if (Utils.legalInt(s))
query.append(" OR site_rank_id = ").append(Integer.parseInt(s));
ResultSet rs3 = stmt.executeQuery("SELECT * FROM id_lookup WHERE " + query);
while (rs3.next())
tsRanks.add(rs3.getInt("ts_rank_id"));
rs3.close();
tsRanks.add(this.vid);
}
rs2.close();
}
rs.close();
rs = stmt.executeQuery("SELECT * FROM cms_custom_database_2 WHERE member_id = \"" + siteID + "\"");
if (rs.next())
room = rs.getInt("field_4");
rs.close();
TS3Api api = JanetTS.getApi();
Client client = api.getClientByUId(tsUID);
if (!tsRanks.isEmpty() || siteID != null) {
int dbID = client.getDatabaseId();
if (tsRanks.contains(this.sSup) || tsRanks.contains(this.gSup) || tsRanks.contains(this.cSup)) {
if (room == -1) { //It needs to be created
String name = client.getNickname();
String cname = name + (name.endsWith("s") ? "'" : "'s") + " Room";
final HashMap<ChannelProperty, String> properties = new HashMap<>();
properties.put(ChannelProperty.CHANNEL_FLAG_PERMANENT, "1");
properties.put(ChannelProperty.CPID, Integer.toString(this.umrID));
properties.put(ChannelProperty.CHANNEL_TOPIC, cname);
int ncID = api.createChannel(cname, properties);
api.setClientChannelGroup(this.caID, ncID, dbID);
api.moveQuery(JanetTS.getDefaultChannelID());
stmt.executeUpdate("UPDATE cms_custom_database_2 SET field_4 = " + ncID + " WHERE member_id = \"" + siteID + "\"");
} else if (room != client.getChannelId() || this.caID != client.getChannelGroupId()) //Add them to admin for their room
api.setClientChannelGroup(this.caID, room, dbID); //If they are in the room already don't bother giving it again, otherwise do just in case
} else if (room != -1) { //Room needs to be removed because they are not a silver or gold supporter
api.deleteChannel(room, true);
stmt.executeUpdate("UPDATE cms_custom_database_2 SET field_4 = -1 WHERE member_id = \"" + siteID + "\"");
}
List<ServerGroup> sgroups = api.getServerGroupsByClient(client);
for (ServerGroup sgroup : sgroups)
if (tsRanks.contains(sgroup.getId()))
tsRanks.remove(tsRanks.indexOf(sgroup.getId()));
else if (sgroup.getId() != this.dndID)
api.removeClientFromServerGroup(sgroup, client);
tsRanks.forEach(tsRank -> api.addClientToServerGroup(tsRank, dbID));
} else { //Send them a message to verify
api.sendPrivateMessage(client.getId(), "Go to: galaxygaming.gg/index.php/ts3auth to verify your account.");
api.getServerGroupsByClient(client).forEach(sg -> api.removeClientFromServerGroup(sg, client));
}
stmt.close();
conn.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
|
[
"richard@freimer.com"
] |
richard@freimer.com
|
305fc2f298f1c4ebfb419deb4b85d7eb26c7e3c1
|
92225460ebca1bb6a594d77b6559b3629b7a94fa
|
/src/com/kingdee/eas/fdc/market/CompeteItemMarketingEntryCollection.java
|
5d62b5ddd3fd322aed81470dc797bdb2ec0c1722
|
[] |
no_license
|
yangfan0725/sd
|
45182d34575381be3bbdd55f3f68854a6900a362
|
39ebad6e2eb76286d551a9e21967f3f5dc4880da
|
refs/heads/master
| 2023-04-29T01:56:43.770005
| 2023-04-24T05:41:13
| 2023-04-24T05:41:13
| 512,073,641
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,346
|
java
|
package com.kingdee.eas.fdc.market;
import com.kingdee.bos.dao.AbstractObjectCollection;
import com.kingdee.bos.dao.IObjectPK;
public class CompeteItemMarketingEntryCollection extends AbstractObjectCollection
{
public CompeteItemMarketingEntryCollection()
{
super(CompeteItemMarketingEntryInfo.class);
}
public boolean add(CompeteItemMarketingEntryInfo item)
{
return addObject(item);
}
public boolean addCollection(CompeteItemMarketingEntryCollection item)
{
return addObjectCollection(item);
}
public boolean remove(CompeteItemMarketingEntryInfo item)
{
return removeObject(item);
}
public CompeteItemMarketingEntryInfo get(int index)
{
return(CompeteItemMarketingEntryInfo)getObject(index);
}
public CompeteItemMarketingEntryInfo get(Object key)
{
return(CompeteItemMarketingEntryInfo)getObject(key);
}
public void set(int index, CompeteItemMarketingEntryInfo item)
{
setObject(index, item);
}
public boolean contains(CompeteItemMarketingEntryInfo item)
{
return containsObject(item);
}
public boolean contains(Object key)
{
return containsKey(key);
}
public int indexOf(CompeteItemMarketingEntryInfo item)
{
return super.indexOf(item);
}
}
|
[
"yfsmile@qq.com"
] |
yfsmile@qq.com
|
e9648aadb03c784bec3a28b2d96359c2d2ebabda
|
0daf64ae6a724ef4d09e15cc9b9ec84c47ba13bd
|
/s2-tiger/src/main/java/org/seasar/framework/container/factory/intertype/EJB3IntertypeDefBuilder.java
|
eaa402687aae004d0b0ec15cd200519a41ec9b03
|
[
"Apache-2.0"
] |
permissive
|
gndpig/seasar2
|
0eeef17c22386e3a91c9018520e790e29e113846
|
28ad9a4925b0e601c09c842937ac2f3930d7c732
|
refs/heads/master
| 2020-12-26T01:49:45.057109
| 2016-03-02T02:59:24
| 2016-03-02T02:59:24
| 44,322,315
| 0
| 0
| null | 2015-10-15T14:17:27
| 2015-10-15T14:17:27
| null |
UTF-8
|
Java
| false
| false
| 5,779
|
java
|
/*
* Copyright 2004-2015 the Seasar Foundation and the Others.
*
* 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.seasar.framework.container.factory.intertype;
import java.util.HashSet;
import java.util.Set;
import javax.interceptor.Interceptors;
import org.seasar.framework.container.ComponentDef;
import org.seasar.framework.container.InterTypeDef;
import org.seasar.framework.container.PropertyDef;
import org.seasar.framework.container.factory.AnnotationHandler;
import org.seasar.framework.container.factory.IntertypeDefBuilder;
import org.seasar.framework.container.impl.InterTypeDefImpl;
import org.seasar.framework.container.impl.PropertyDefImpl;
import org.seasar.framework.ejb.EJB3BusinessMethodDesc;
import org.seasar.framework.ejb.EJB3Desc;
import org.seasar.framework.ejb.EJB3DescFactory;
import org.seasar.framework.ejb.EJB3InterceptorDesc;
import org.seasar.framework.ejb.impl.EJB3InterceptorSupportInterType;
/**
* {@link EJB3InterceptorSupportInterType EJB3をサポートするインタータイプ}の{@link InterTypeDef}を作成するコンポーネントの実装クラスです。
*
* @author koichik
*/
public class EJB3IntertypeDefBuilder implements IntertypeDefBuilder {
public void appendIntertypeDef(final AnnotationHandler annotationHandler,
final ComponentDef componentDef) {
final Class<?> componentClass = componentDef.getComponentClass();
if (componentClass == null) {
return;
}
final EJB3Desc ejb3Desc = EJB3DescFactory.getEJB3Desc(componentClass);
if (ejb3Desc == null) {
return;
}
final EJB3InterceptorSupportInterType interType = new EJB3InterceptorSupportInterType();
for (final Class<?> interceptorClass : getInterceptorClasses(ejb3Desc)) {
interType.addInterceptor(interceptorClass);
componentDef.addPropertyDef(createPropertyDef(annotationHandler,
interceptorClass));
}
componentDef.addInterTypeDef(new InterTypeDefImpl(interType));
}
/**
* {@link Interceptors}アノテーションで指定されたインターセプタクラスの配列を返します。
*
* @param ejb3desc
* {@link EJB3Desc}
* @return {@link Interceptors}アノテーションで指定されたインターセプタクラスの配列
*/
protected Set<Class<?>> getInterceptorClasses(final EJB3Desc ejb3desc) {
final Set<Class<?>> interceptorClasses = new HashSet<Class<?>>();
for (final EJB3InterceptorDesc interceptorDesc : ejb3desc
.getInterceptors()) {
interceptorClasses.add(interceptorDesc.getInterceptorClass());
}
for (final EJB3BusinessMethodDesc methodDesc : ejb3desc
.getBusinessMethods()) {
for (final EJB3InterceptorDesc interceptorDesc : methodDesc
.getInterceptors()) {
interceptorClasses.add(interceptorDesc.getInterceptorClass());
}
}
return interceptorClasses;
}
/**
* {@link EJB3InterceptorSupportInterType}が追加するプロパティに、 {@link Interceptors}アノテーションで指定されたインターセプタを設定する、
* {@link PropertyDef}を作成して返します。
*
* @param annotationHandler
* アノテーションハンドラ
* @param interceptorClass
* {@link Interceptors}アノテーションで指定されたインターセプタクラス
* @return {@link PropertyDef}
*/
protected PropertyDef createPropertyDef(
final AnnotationHandler annotationHandler,
final Class<?> interceptorClass) {
final PropertyDefImpl propDef = new PropertyDefImpl(
EJB3InterceptorSupportInterType.getFieldName(interceptorClass));
propDef.setChildComponentDef(createInterceptorComponentDef(
annotationHandler, interceptorClass));
return propDef;
}
/**
* {@link Interceptors}アノテーションで指定されたインターセプタをコンポーネントとして登録する
* {@link ComponentDef}を作成して返します。
*
* @param annotationHandler
* アノテーションハンドラ
* @param interceptorClass
* {@link Interceptors}アノテーションで指定されたインターセプタクラス
* @return {@link ComponentDef}
*/
protected ComponentDef createInterceptorComponentDef(
final AnnotationHandler annotationHandler,
final Class<?> interceptorClass) {
final ComponentDef interceptorCd = annotationHandler
.createComponentDef(interceptorClass, null);
annotationHandler.appendDI(interceptorCd);
annotationHandler.appendInitMethod(interceptorCd);
annotationHandler.appendDestroyMethod(interceptorCd);
annotationHandler.appendAspect(interceptorCd);
annotationHandler.appendInterType(interceptorCd);
return interceptorCd;
}
}
|
[
"koichik@improvement.jp"
] |
koichik@improvement.jp
|
4c53cfc5ca77486af59d0cc6ea25243a460fe934
|
ee461488c62d86f729eda976b421ac75a964114c
|
/tags/HtmlUnit-2.12/src/test/java/com/gargoylesoftware/htmlunit/javascript/regexp/mozilla/js1_2/AlphanumericTest.java
|
f4b50a2e8dc92f7c8159330a72f30d6bdad743c8
|
[
"Apache-2.0"
] |
permissive
|
svn2github/htmlunit
|
2c56f7abbd412e6d9e0efd0934fcd1277090af74
|
6fc1a7d70c08fb50fef1800673671fd9cada4899
|
refs/heads/master
| 2023-09-03T10:35:41.987099
| 2015-07-26T13:12:45
| 2015-07-26T13:12:45
| 37,107,064
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,703
|
java
|
/*
* Copyright (c) 2002-2013 Gargoyle Software Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.gargoylesoftware.htmlunit.javascript.regexp.mozilla.js1_2;
import static com.gargoylesoftware.htmlunit.BrowserRunner.Browser.IE;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.gargoylesoftware.htmlunit.BrowserRunner;
import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts;
import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented;
import com.gargoylesoftware.htmlunit.WebDriverTestCase;
/**
* Tests originally in '/js/src/tests/js1_2/regexp/alphanumeric.js'.
*
* @version $Revision$
* @author Ahmed Ashour
*/
@RunWith(BrowserRunner.class)
public class AlphanumericTest extends WebDriverTestCase {
private static final String non_alphanumeric = "~`!@#$%^&*()-+={[}]|\\\\:;\\'<,>./?\\f\\n\\r\\t \"\\v";
private static final String alphanumeric = "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
/**
* Be sure all alphanumerics are matched by \w.
* @throws Exception if the test fails
*/
@Test
@Alerts(alphanumeric)
public void test1() throws Exception {
test("'" + alphanumeric + "'.match(new RegExp('\\\\w+'))", false);
}
/**
* Be sure all non-alphanumerics are matched by \W.
* @throws Exception if the test fails
*/
@Test
@Alerts(FF = "7E-60-21-40-23-24-25-5E-26-2A-28-29-2D-2B-3D-7B-5B-7D-5D-7C-5C-"
+ "3A-3B-27-3C-2C-3E-2E-2F-3F-C-A-D-9-20-22-B-",
IE = "7E-60-21-40-23-24-25-5E-26-2A-28-29-2D-2B-3D-7B-5B-7D-5D-7C-5C-"
+ "3A-3B-27-3C-2C-3E-2E-2F-3F-C-A-D-9-20-22-")
@NotYetImplemented(IE)
public void test2() throws Exception {
test("'" + non_alphanumeric + "'.match(new RegExp('\\\\W+'))", true);
}
/**
* Be sure all non-alphanumerics are not matched by \w.
* @throws Exception if the test fails
*/
@Test
@Alerts(FF = "null", IE = "v")
@NotYetImplemented(IE)
public void test3() throws Exception {
test("'" + non_alphanumeric + "'.match(new RegExp('\\\\w+'))", false);
}
/**
* Be sure all alphanumerics are not matched by \W.
* @throws Exception if the test fails
*/
@Test
@Alerts("null")
public void test4() throws Exception {
test("'" + alphanumeric + "'.match(new RegExp('\\\\W+'))", false);
}
/**
* Be sure all alphanumerics are matched by \w.
* @throws Exception if the test fails
*/
@Test
@Alerts(FF = alphanumeric, IE = "v" + alphanumeric)
@NotYetImplemented(IE)
public void test5() throws Exception {
test("'" + non_alphanumeric + alphanumeric + "'.match(new RegExp('\\\\w+'))", false);
}
/**
* Be sure all non-alphanumerics are matched by \W.
* @throws Exception if the test fails
*/
@Test
@Alerts(FF = "7E-60-21-40-23-24-25-5E-26-2A-28-29-2D-2B-3D-7B-5B-7D-5D-7C-5C-"
+ "3A-3B-27-3C-2C-3E-2E-2F-3F-C-A-D-9-20-22-B-",
IE = "7E-60-21-40-23-24-25-5E-26-2A-28-29-2D-2B-3D-7B-5B-7D-5D-7C-5C-"
+ "3A-3B-27-3C-2C-3E-2E-2F-3F-C-A-D-9-20-22-")
@NotYetImplemented(IE)
public void test6() throws Exception {
test("'" + alphanumeric + non_alphanumeric + "'.match(new RegExp('\\\\W+'))", true);
}
/**
* Be sure all alphanumerics are matched by \w (using literals).
* @throws Exception if the test fails
*/
@Test
@Alerts(alphanumeric)
public void test7() throws Exception {
test("'" + alphanumeric + non_alphanumeric + "'.match(/\\w+/)", false);
}
/**
* Be sure all non-alphanumerics are matched by \W (using literals).
* @throws Exception if the test fails
*/
@Test
@Alerts(FF = "7E-60-21-40-23-24-25-5E-26-2A-28-29-2D-2B-3D-7B-5B-7D-5D-7C-5C-"
+ "3A-3B-27-3C-2C-3E-2E-2F-3F-C-A-D-9-20-22-B-",
IE = "7E-60-21-40-23-24-25-5E-26-2A-28-29-2D-2B-3D-7B-5B-7D-5D-7C-5C-"
+ "3A-3B-27-3C-2C-3E-2E-2F-3F-C-A-D-9-20-22-")
@NotYetImplemented(IE)
public void test8() throws Exception {
test("'" + alphanumeric + non_alphanumeric + "'.match(/\\W+/)", true);
}
/**
* Be sure the following test behaves consistently.
* @throws Exception if the test fails
*/
@Test
@Alerts("abcd*&^%$$,abcd,%$$")
public void test9() throws Exception {
test("'" + "abcd*&^%$$" + "'.match(/(\\w+)...(\\W+)/)", false);
}
/**
* Be sure all alphanumeric characters match individually.
* @throws Exception if the test fails
*/
@Test
public void test10() throws Exception {
for (int i = 0; i < alphanumeric.length(); i++) {
setExpectedAlerts(String.valueOf(alphanumeric.charAt(i)));
test("'" + "#$" + alphanumeric.charAt(i) + "%^" + "'.match(new RegExp('\\\\w'))", false);
}
}
/**
* Be sure all non_alphanumeric characters match individually.
* @throws Exception if the test fails
*/
@Test
public void test11() throws Exception {
for (int i = 0; i < non_alphanumeric.length() - 1; i++) {
final char ch = non_alphanumeric.charAt(i);
String expected = String.valueOf(ch);
String input = expected;
switch (ch) {
case '\\':
input = "\\" + ch;
break;
case '\'':
input = "\\" + ch;
break;
case 'f':
expected = "\f";
input = "\\" + ch;
break;
case 'n':
expected = "\n";
input = "\\" + ch;
break;
case 'r':
expected = "\r";
input = "\\" + ch;
break;
case 't':
expected = "\t";
input = "\\" + ch;
break;
case 'v':
expected = "\u000B";
input = "\\" + ch;
break;
default:
}
setExpectedAlerts(expected);
final String s = "sd" + input + String.valueOf(((i + 10) * (i + 10) - 2 * (i + 10)));
test("'" + s + "'.match(new RegExp('\\\\W'))", false);
}
}
private void test(final String script, final boolean charCode) throws Exception {
String html
= "<html><head><title>foo</title><script>\n";
if (charCode) {
html += " var string = " + script + ".toString();\n"
+ " var output = '';\n"
+ " for (var i = 0; i < string.length; i++) {\n"
+ " output += string.charCodeAt(i).toString(16).toUpperCase() + '-';\n"
+ " }\n"
+ " alert(output);\n";
}
else {
html += " alert(" + script + ");\n";
}
html += "</script></head><body>\n"
+ "</body></html>";
loadPageWithAlerts2(html);
}
}
|
[
"mguillem@5f5364db-9458-4db8-a492-e30667be6df6"
] |
mguillem@5f5364db-9458-4db8-a492-e30667be6df6
|
4fbcef8eeaff88f5162e5d8947a0cc8a1300e786
|
647ce242e20bc792b334cf445d1fb3243f0f3b47
|
/chintai-migration-cms/src/net/chintai/backend/sysadmin/demand/action/TorihikisakiWakuInfoAddPageAction.java
|
a7ed064752dfa8de988a9324edca93bc9e45b267
|
[] |
no_license
|
sangjiexun/20191031test
|
0ce6c9e3dabb7eed465d4add33a107e5b5525236
|
3248d86ce282c1455f2e6ce0e05f0dbd15e51518
|
refs/heads/master
| 2020-12-14T20:31:05.085987
| 2019-11-01T06:03:50
| 2019-11-01T06:03:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,639
|
java
|
/*
* $Id: TorihikisakiWakuInfoAddPageAction.java 3618 2007-12-17 12:08:24Z lee-hosup $
* ---------------------------------------------------------
* 更新日 更新者 内容
* ---------------------------------------------------------
* 2007/12/08 BGT)李昊燮 新規作成
*
*/
package net.chintai.backend.sysadmin.demand.action;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.struts.validator.DynaValidatorForm;
import org.springframework.context.ApplicationContext;
import net.chintai.backend.sysadmin.common.AuthorityId;
import net.chintai.backend.sysadmin.common.BaseActionSupport;
import net.chintai.backend.sysadmin.common.BusinessContext;
import net.chintai.backend.sysadmin.common.exception.ApplicationException;
import net.chintai.backend.sysadmin.common.service.AuthService;
import net.chintai.backend.sysadmin.common.util.DateUtil;
import net.chintai.backend.sysadmin.demand.DemandUtils;
import net.chintai.backend.sysadmin.demand.action.view.TorihikisakiWakuInfoAddView;
import net.chintai.backend.sysadmin.demand.service.TorihikisakiInfoService;
import net.chintai.backend.sysadmin.demand.service.bean.TorihikisakiInfoInServiceBean;
import net.chintai.backend.sysadmin.demand.service.bean.TorihikisakiInfoOutServiceBean;
/**
* 物件枠情報を登録
*
* @author lee-hosup
* @version $Revision: 3618 $
* Copyright: (C) CHINTAI Corporation All Right Reserved.
*/
public class TorihikisakiWakuInfoAddPageAction extends BaseActionSupport {
/* (non-Javadoc)
* @see net.chintai.backend.sysadmin.common.BaseActionSupport#doExecute(net.chintai.backend.sysadmin.common.BusinessContext)
*/
@Override
protected void doExecute(BusinessContext context) throws Exception {
// 画面データ取得
DynaValidatorForm form = (DynaValidatorForm) context.getForm();
TorihikisakiInfoInServiceBean inBean = new TorihikisakiInfoInServiceBean();
BeanUtils.copyProperties(inBean, form);
// injection
ApplicationContext ac = getWebApplicationContext();
TorihikisakiInfoService service =
(TorihikisakiInfoService) ac.getBean("torihikisakiInfoService");
// 取引先詳細照会
TorihikisakiInfoOutServiceBean outBean;
try {
outBean = service.getTorihikisakiDetailInfo(inBean);
} catch (ApplicationException e) {
context.setForward("fail");
context.setError("ERROR.M.DEMAND.0129");
return;
}
// ViewHelper設定
TorihikisakiWakuInfoAddView view = new TorihikisakiWakuInfoAddView();
BeanUtils.copyProperties(view, form);
BeanUtils.copyProperties(view, outBean);
// 適用年月プルダウン生成に使うデータを設定
view.setApplyYearList(DemandUtils.getYearList());
view.setApplyMonthList(DemandUtils.getMonthsList());
// 郵便番号画面表示形式に編集
view.setZipCd(DemandUtils.convertZipCd(view.getZipCd()));
// 適用月のValidationCheckのため現在日付をViewに設定
String nowDate = DateUtil.getToday("yyyyMM");
view.setNowDate(nowDate);
context.setForward("success", view);
}
/* (non-Javadoc)
* @see net.chintai.backend.sysadmin.common.BaseActionSupport#isAuthorized(java.lang.String)
*/
@Override
protected boolean isAuthorized(String userId) {
ApplicationContext ac = getWebApplicationContext();
AuthService auth = (AuthService) ac.getBean("authService");
return auth.authenticate(userId, AuthorityId.DEMAND);
}
}
|
[
"yuki.hirukawa@ctc-g.co.jp"
] |
yuki.hirukawa@ctc-g.co.jp
|
a9de6cf372cb9edaccd4c3e66edb130e94395eef
|
8164645e63555caa1cb7a423da3eb03449f78818
|
/src/it/csi/mddtools/guigen/CommandWidget.java
|
7b7445a15386dbf2fd05547fea7f01d3c7d44174
|
[] |
no_license
|
csipiemonte/guigen
|
1a3b7907f97095a47de70a547d44f82e16dd9473
|
82b05365d9c781df2c6714f8afc654ae85fd1aa0
|
refs/heads/master
| 2020-08-29T12:42:39.139671
| 2019-08-20T17:00:28
| 2019-08-20T17:00:28
| 218,027,979
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,585
|
java
|
/**
* <copyright>
* (C) Copyright 2011 CSI-PIEMONTE;
* Concesso in licenza a norma dell'EUPL, esclusivamente versione 1.1;
* Non e' possibile utilizzare l'opera salvo nel rispetto della Licenza.
* E' possibile ottenere una copia della Licenza al seguente indirizzo:
*
* http://www.eupl.it/opensource/eupl-1-1
*
* Salvo diversamente indicato dalla legge applicabile o concordato per
* iscritto, il software distribuito secondo i termini della Licenza e'
* distribuito "TAL QUALE", SENZA GARANZIE O CONDIZIONI DI ALCUN TIPO,
* esplicite o implicite.
* Si veda la Licenza per la lingua specifica che disciplina le autorizzazioni
* e le limitazioni secondo i termini della Licenza.
* </copyright>
*
* $Id$
*/
package it.csi.mddtools.guigen;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Command Widget</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* Classe astratta di widget con funzione di comando (es pulsanti)
* <!-- end-model-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link it.csi.mddtools.guigen.CommandWidget#getFunctionSpecifier <em>Function Specifier</em>}</li>
* </ul>
*
* @see it.csi.mddtools.guigen.GuigenPackage#getCommandWidget()
* @model annotation="logicpkg pkg='ui.widgets'"
* @generated
*/
public interface CommandWidget extends Widget {
/**
* Returns the value of the '<em><b>Function Specifier</b></em>' attribute.
* The default value is <code>"0"</code>.
* The literals are from the enumeration {@link it.csi.mddtools.guigen.CommandFunctions}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Function Specifier</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Function Specifier</em>' attribute.
* @see it.csi.mddtools.guigen.CommandFunctions
* @see #setFunctionSpecifier(CommandFunctions)
* @see it.csi.mddtools.guigen.GuigenPackage#getCommandWidget_FunctionSpecifier()
* @model default="0"
* @generated
*/
CommandFunctions getFunctionSpecifier();
/**
* Sets the value of the '{@link it.csi.mddtools.guigen.CommandWidget#getFunctionSpecifier <em>Function Specifier</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Function Specifier</em>' attribute.
* @see it.csi.mddtools.guigen.CommandFunctions
* @see #getFunctionSpecifier()
* @generated
*/
void setFunctionSpecifier(CommandFunctions value);
} // CommandWidget
|
[
"mauro.antonaci@csi.it"
] |
mauro.antonaci@csi.it
|
cc269bd632b5885cea3f2b64fcef00c7e4670e3b
|
1627f39bdce9c3fe5bfa34e68c276faa4568bc35
|
/src/stack/Boj1672.java
|
3d1fb33d611ccd9ad5e9891a06c7a2c1c0d66639
|
[
"Apache-2.0"
] |
permissive
|
minuk8932/Algorithm_BaekJoon
|
9ebb556f5055b89a5e5c8d885b77738f1e660e4d
|
a4a46b5e22e0ed0bb1b23bf1e63b78d542aa5557
|
refs/heads/master
| 2022-10-23T20:08:19.968211
| 2022-10-02T06:55:53
| 2022-10-02T06:55:53
| 84,549,122
| 3
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,399
|
java
|
package stack;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayDeque;
import java.util.HashMap;
/**
*
* @author exponential-e
* 백준 1672번: DNA 해독
*
* @see https://www.acmicpc.net/problem/1672/
*
*/
public class Boj1672 {
private static final HashMap<Character, Integer> INDEX = new HashMap<>();
private static final char[][] ORDER = {{'A', 'C', 'A', 'G'},
{'C', 'G', 'T', 'A'},
{'A', 'T', 'C', 'G'},
{'G', 'A', 'G', 'T'}};
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int N = Integer.parseInt(br.readLine());
init();
ArrayDeque<Character> stack = new ArrayDeque<>();
for(char c: br.readLine().toCharArray()) {
stack.push(c);
}
System.out.println(result(N, stack));
}
private static char result(int n, ArrayDeque<Character> stack) {
int loop = n - 1;
while(loop-- > 0) {
char peek = stack.pop();
char second = stack.pop();
stack.push(ORDER[INDEX.get(peek)][INDEX.get(second)]);
}
return stack.pop();
}
private static void init() {
INDEX.put('A', 0);
INDEX.put('G', 1);
INDEX.put('C', 2);
INDEX.put('T', 3);
}
}
|
[
"minuk8932@naver.com"
] |
minuk8932@naver.com
|
34950ec59e908f4023e009e8450950b98b603b6f
|
439c418a165b35d2efe49a71acdea0484c29209a
|
/Study/src/main/java/com/example/study/model/rule/noTargetArea/TargetContractLostParamsXml.java
|
bf87ef25f8f099e895339d98762fe241e7ddd1bc
|
[
"MIT"
] |
permissive
|
inzahgi/java_train
|
1eae0a80bf84cf64ff24ec3d5c9bdddfda3d1bad
|
6f546359b7bf50555074456c04dc0c9fa4bc02b3
|
refs/heads/master
| 2022-12-24T09:25:43.036761
| 2020-02-29T11:12:30
| 2020-02-29T11:12:30
| 47,551,241
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 677
|
java
|
package com.example.study.model.rule.noTargetArea;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.FIELD)
// XML文件中的根标识
@XmlRootElement(name = "params")
public class TargetContractLostParamsXml {
@XmlElement(name = "updatecycle")
private UpdateCycleXml updateCycleXml;
public void setUpdateCycleXml(UpdateCycleXml updateCycleXml){
this.updateCycleXml = updateCycleXml;
}
public UpdateCycleXml getUpdateCycleXml() {
return updateCycleXml;
}
}
|
[
"inzahgi@126.com"
] |
inzahgi@126.com
|
27198baafb71544de6aabfdf9b9866dab96f16f5
|
68f5e88f1a8b52a40e7c11e50cb5cf7af29c305a
|
/flinkx-admin/src/main/java/com/guoliang/flinkx/admin/entity/JobRegistry.java
|
a80bab464a72253e1429c7f098f32017ccb5072e
|
[
"Apache-2.0"
] |
permissive
|
jinguangyang/Lark
|
37d1b1d18fbd0173f8e82a553564c99f35e0cb80
|
8433a898d5041e6e9e679d3091b43cdc657b5077
|
refs/heads/master
| 2022-12-31T01:12:33.582589
| 2020-10-20T03:55:24
| 2020-10-20T03:55:24
| 294,577,739
| 0
| 0
|
Apache-2.0
| 2020-10-20T03:55:26
| 2020-09-11T02:50:48
|
Java
|
UTF-8
|
Java
| false
| false
| 529
|
java
|
package com.guoliang.flinkx.admin.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
/**
* Created by xuxueli on 16/9/30.
*/
@Data
public class JobRegistry {
private int id;
private String registryGroup;
private String registryKey;
private String registryValue;
private double cpuUsage;
private double memoryUsage;
private double loadAverage;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updateTime;
}
|
[
"wxgzgl@gmail.com"
] |
wxgzgl@gmail.com
|
2f4db48c9fe974c37a064fb5904053bfc57d09a8
|
cf729a7079373dc301d83d6b15e2451c1f105a77
|
/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/utils/v201601/batchjob/MutateResult.java
|
d934f6762a478b680a3472719fcf4c519c0b0003
|
[] |
no_license
|
cvsogor/Google-AdWords
|
044a5627835b92c6535f807ea1eba60c398e5c38
|
fe7bfa2ff3104c77757a13b93c1a22f46e98337a
|
refs/heads/master
| 2023-03-23T05:49:33.827251
| 2021-03-17T14:35:13
| 2021-03-17T14:35:13
| 348,719,387
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,374
|
java
|
// Copyright 2016 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.api.ads.adwords.axis.utils.v201601.batchjob;
import com.google.api.ads.adwords.axis.v201601.cm.ApiError;
import com.google.api.ads.adwords.axis.v201601.cm.Operand;
import com.google.api.ads.adwords.axis.v201601.cm.Operation;
import com.google.api.ads.adwords.lib.utils.BatchJobMutateResultInterface;
import org.apache.axis.description.ElementDesc;
import org.apache.axis.encoding.Deserializer;
import org.apache.axis.encoding.Serializer;
import java.io.Serializable;
/**
* The result for a single operation submitted to a batch job.
*/
public class MutateResult
implements Serializable, BatchJobMutateResultInterface<Operand, ApiError> {
private Long index;
private Operand operand;
private ErrorList errorList;
private static final org.apache.axis.description.TypeDesc TYPE_DESC =
new org.apache.axis.description.TypeDesc(MutateResult.class, true);
static {
TYPE_DESC.setXmlType(new javax.xml.namespace.QName(
"https://adwords.google.com/api/adwords/cm/v201601", "MutateResult"));
ElementDesc resultElemDesc = new ElementDesc();
resultElemDesc.setFieldName("operand");
resultElemDesc.setXmlName(new javax.xml.namespace.QName(
"https://adwords.google.com/api/adwords/cm/v201601", "result"));
resultElemDesc.setXmlType(new javax.xml.namespace.QName(
"https://adwords.google.com/api/adwords/cm/v201601", "Operand"));
resultElemDesc.setMinOccurs(0);
resultElemDesc.setNillable(false);
TYPE_DESC.addFieldDesc(resultElemDesc);
ElementDesc errorsElemDesc = new ElementDesc();
errorsElemDesc.setFieldName("errorList");
errorsElemDesc.setXmlName(new javax.xml.namespace.QName(
"https://adwords.google.com/api/adwords/cm/v201601", "errorList"));
errorsElemDesc.setXmlType(new javax.xml.namespace.QName(
"https://adwords.google.com/api/adwords/cm/v201601", "ErrorList"));
errorsElemDesc.setMinOccurs(0);
errorsElemDesc.setNillable(false);
TYPE_DESC.addFieldDesc(errorsElemDesc);
ElementDesc indexElemDesc = new ElementDesc();
indexElemDesc.setFieldName("index");
indexElemDesc.setXmlName(new javax.xml.namespace.QName(
"https://adwords.google.com/api/adwords/cm/v201601", "index"));
indexElemDesc.setXmlType(
new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "long"));
indexElemDesc.setMinOccurs(0);
indexElemDesc.setNillable(false);
TYPE_DESC.addFieldDesc(indexElemDesc);
}
@Override
public Operand getOperand() {
return operand;
}
public void setOperand(Operand operand) {
this.operand = operand;
}
@Override
public Long getIndex() {
return index;
}
public void setIndex(Long index) {
this.index = index;
}
@Override
public ErrorList getErrorList() {
return errorList;
}
public void setErrorList(ErrorList errorList) {
this.errorList = errorList;
}
/**
* Returns the type descriptor for this type.
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return TYPE_DESC;
}
/**
* Returns the Axis serializer for this object.
*/
public static Serializer getSerializer(@SuppressWarnings("unused") java.lang.String mechType,
java.lang.Class<? extends Operation> javaType, javax.xml.namespace.QName xmlType) {
return new org.apache.axis.encoding.ser.BeanSerializer(javaType, xmlType, TYPE_DESC);
}
/**
* Returns the Axis deserializer for this object.
*/
public static Deserializer getDeserializer(@SuppressWarnings("unused") java.lang.String mechType,
java.lang.Class<? extends Operation> javaType, javax.xml.namespace.QName xmlType) {
return new org.apache.axis.encoding.ser.BeanDeserializer(javaType, xmlType, TYPE_DESC);
}
}
|
[
"vacuum13@gmail.com"
] |
vacuum13@gmail.com
|
57d68b994bed1ae3d00f170c73fc740e9dd4e7d6
|
d1ea5077c83cb2e93fe69e3d19a2e26efe894a0e
|
/src/main/java/com/rograndec/feijiayun/chain/business/finance/receivablepayment/payment/vo/PayTotalPageVO.java
|
88e6f7dc9b8bfe2c8ac671f715affc80309b5dcd
|
[] |
no_license
|
Catfeeds/rog-backend
|
e89da5a3bf184e4636169e7492a97dfd0deef2a1
|
109670cfec6cbe326b751e93e49811f07045e531
|
refs/heads/master
| 2020-04-05T17:36:50.097728
| 2018-10-22T16:23:55
| 2018-10-22T16:23:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,642
|
java
|
package com.rograndec.feijiayun.chain.business.finance.receivablepayment.payment.vo;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
public class PayTotalPageVO implements Serializable{
/**
* 应付金额合计
*/
@ApiModelProperty(value = "应付金额合计")
private BigDecimal paymentAmountSummary;
/**
* 优惠金额合计
*/
@ApiModelProperty(value = "优惠金额合计")
private BigDecimal discountAmountSummary;
/**
* 实付金额合计
*/
@ApiModelProperty(value = "实付金额合计")
private BigDecimal realAmountSummary;
/**
* 列表
*/
@ApiModelProperty(value = "列表")
private List<PaymentPageVO> list;
public BigDecimal getPaymentAmountSummary() {
return paymentAmountSummary;
}
public void setPaymentAmountSummary(BigDecimal paymentAmountSummary) {
this.paymentAmountSummary = paymentAmountSummary;
}
public BigDecimal getDiscountAmountSummary() {
return discountAmountSummary;
}
public void setDiscountAmountSummary(BigDecimal discountAmountSummary) {
this.discountAmountSummary = discountAmountSummary;
}
public BigDecimal getRealAmountSummary() {
return realAmountSummary;
}
public void setRealAmountSummary(BigDecimal realAmountSummary) {
this.realAmountSummary = realAmountSummary;
}
public List<PaymentPageVO> getList() {
return list;
}
public void setList(List<PaymentPageVO> list) {
this.list = list;
}
}
|
[
"ruifeng.jia@rograndec.com"
] |
ruifeng.jia@rograndec.com
|
1481eaba4e7b46cd56c537983b3a232f992a78f4
|
cc953f667e11f32d4119ac827d9378ed477b7706
|
/backend-exts/orders-ext/src/main/java/com/stosz/order/ext/enums/OrdersSupplementReasonEnum.java
|
d93c0769308f9116ce3d821c62267371482e57b9
|
[] |
no_license
|
ttggaa/erp
|
e20ed03ecf6965da95c9fc472d505ae8ef4f3902
|
167f5d60d085d016b08452083f172df654a7c5c5
|
refs/heads/master
| 2020-04-22T12:03:43.913915
| 2018-12-05T16:16:11
| 2018-12-05T16:16:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,176
|
java
|
package com.stosz.order.ext.enums;
import com.stosz.plat.utils.IEnum;
import com.stosz.plat.utils.StringUtils;
/**
* 补发原因
*
* @author tangtao
* @date 2017-12-18
*/
public enum OrdersSupplementReasonEnum implements IEnum {
miss("漏发"),
lose("丢件"),
faulty("瑕疵品"),;
private String display = "";
OrdersSupplementReasonEnum(String display) {
this.display = display;
}
public static OrdersSupplementReasonEnum fromId(Integer id) {
if (null == id || id.intValue() < 0) return null;
for (OrdersSupplementReasonEnum reasonEnum : values()) {
if (reasonEnum.ordinal() == id.intValue()) {
return reasonEnum;
}
}
return null;
}
public static OrdersSupplementReasonEnum fromDisplay(String name) {
if (StringUtils.isEmpty(name)) return null;
for (OrdersSupplementReasonEnum reasonEnum : values()) {
if (reasonEnum.display().equals(name)) {
return reasonEnum;
}
}
return null;
}
@Override
public String display() {
return this.display;
}
}
|
[
"714106661@qq.com"
] |
714106661@qq.com
|
e6c2c83ae59e34f999661ea6795dba41f04951d5
|
14e71ba5fa362b6fb5eea5e15adb8b6b0f80c28d
|
/src/optimization/PopulationOptimization.java
|
642e6c7650b0eef5fffb18498ddb4f0fa519220e
|
[] |
no_license
|
jmacglashan/generalResearch
|
d9abc0856b68bd8b713d369f5266870f2ff634fe
|
e61dba03320f3335da0f85e88a4bbee51b7bce0e
|
refs/heads/master
| 2021-01-22T12:09:02.411427
| 2015-09-03T20:22:14
| 2015-09-03T20:22:14
| 13,426,325
| 6
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 161
|
java
|
package optimization;
import java.util.List;
public interface PopulationOptimization extends Optimization {
public List<VarFitnessPair> getPopulation();
}
|
[
"jmacglashan@gmail.com"
] |
jmacglashan@gmail.com
|
e99f9e6db171c70ed205d61517882cc8de8a9176
|
54f352a242a8ad6ff5516703e91da61e08d9a9e6
|
/Source Codes/AtCoder/abc088/B/4815836.java
|
755ef155d4ad05acc39ee09fb5395f3665fc29f5
|
[] |
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
| 664
|
java
|
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = Integer.parseInt(in.nextLine());
String[] tmp = in.nextLine().split(" ");
int[] a = Arrays.stream(tmp).mapToInt(Integer::parseInt).toArray();
Arrays.sort(a);
int aliceSum = 0;
int bobSum = 0;
boolean isAliceTurn = true;
for (int i = n - 1; i >= 0; i--) {
if (isAliceTurn) {
aliceSum += a[i];
} else {
bobSum += a[i];
}
isAliceTurn = !isAliceTurn;
}
System.out.println(aliceSum - bobSum);
}
}
|
[
"kwnafi@yahoo.com"
] |
kwnafi@yahoo.com
|
5e85d118fdf54b213a8d17b35f7648fbba99babd
|
35138ae59a61cbe205197aebefb3fe89a637d5bc
|
/dubbo-sso/dubbo-sso-consumer/src/main/java/com/wpx/web/TokenController.java
|
3dff955c7b0926a10b0299005a24d0ac61bc1244
|
[] |
no_license
|
wang125631/dubbo-demo
|
410bb9613ad8a912c62ad95510c36cb67bf18389
|
eb172661c7511ded3784de5d14c3fa509b151b1e
|
refs/heads/master
| 2020-03-22T18:12:06.853483
| 2018-07-13T06:53:56
| 2018-07-13T06:53:56
| 140,435,687
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 333
|
java
|
package com.wpx.web;
import javax.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.wpx.service.sso.TokenService;
@Controller
@RequestMapping("/sso")
public class TokenController {
@Resource
private TokenService tokenService;
}
|
[
"1256317570@qq.com"
] |
1256317570@qq.com
|
f0f556edc529f3258e3cfd32ee9f3bfd8a143f9d
|
c9f35539fc31dfbffd8dd20ff3412445074a96cb
|
/LTR-IE/src/pt/utl/ist/online/learning/utils/DataObject.java
|
ead9bc248e2d2c264d10156d0e89936fc6cd079a
|
[] |
no_license
|
wsgan001/LTR-IE
|
e161bfedee90ee4f310a1938bf5b027a7d600b90
|
876171b7d1268d1e2b05be84233575eb2af42a6a
|
refs/heads/master
| 2020-03-27T00:54:42.536393
| 2015-12-28T23:01:34
| 2015-12-28T23:01:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 692
|
java
|
package pt.utl.ist.online.learning.utils;
import java.io.Serializable;
public class DataObject<E> implements Serializable {
private E data;
private int hash = -1;
private boolean computedHash=false;
private int id;
public DataObject(E object, int id){
data=object;
this.id=id;
}
public E getData(){
return data;
}
public int getId(){
return id;
}
@Override
public boolean equals(Object other){
if(other instanceof DataObject){
return id==((DataObject) other).id && data.equals(((DataObject) other).data);
}
return false;
}
@Override
public int hashCode(){
if(!computedHash){
hash=data.hashCode();
computedHash=true;
}
return hash;
}
}
|
[
"pjbarrio@cs.columbia.edu"
] |
pjbarrio@cs.columbia.edu
|
fc5b620bfe59b8493487d27204b352cfe3f3d66f
|
c11ff0e2e559f2ead4079d106ca074638fdd79f7
|
/examples/src/main/java/org/modelmapper/flattening/example1/Address.java
|
65a626c5a10cffe08896e58ddf0d762d749ae3fe
|
[
"Apache-2.0"
] |
permissive
|
bwalther/modelmapper
|
e2079ebdb0634c82c7ada9e375d2ca93568283cc
|
2a59ee2bcf396a147c694aea30993fbe06406079
|
refs/heads/master
| 2021-01-18T05:43:48.826783
| 2012-03-06T23:51:11
| 2012-03-06T23:51:11
| 3,643,836
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 381
|
java
|
package org.modelmapper.flattening.example1;
public class Address {
private String street;
private String city;
public String getStreet() {
return street;
}
public void setStreet(String street) {
this.street = street;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
}
|
[
"jhalterman@gmail.com"
] |
jhalterman@gmail.com
|
95eb2bc95e3ac55e2bd91ddaaaefcca3451e8223
|
ddd2da2b0acec7b674a68b35d90785232c1985c9
|
/ProjectList/RockyCommon/src/rocky/common/Constant.java
|
4809ebeefd7f33192592d2198f6e2998a270838b
|
[] |
no_license
|
dkulagin/open-ones
|
0b28c7ccaca5bcb62b581c7db8b6265428c6d5ff
|
ff43220419ab910b85cf1b48297963bb5d35b8d2
|
refs/heads/master
| 2021-05-30T05:08:25.598052
| 2015-03-04T09:53:59
| 2015-03-04T09:53:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,235
|
java
|
/**
* Constant.java
* Copyright Rocky.
*/
package rocky.common;
/**
* Constant contains common usually constans.
* @author Thach Le
* @since 1.4
*/
public final class Constant {
public static final String DEF_DATEFMT = "dd-MMM-yyyy";
public static final String VN_DATEFMT = "dd/MM/yyyy";
public static final String DEF_ENCODE = "UTF-8";
public static final String[] BLANK_STRS = {};
public static final String DOT_XLS = ".xls";
public static final String DOT_XLSX = ".xlsx";
/** @deprecated use CHARA . */
public static final String BLANK = "";
/** @deprecated use CHARA . */
public static final String LF = "\n";
/** @deprecated use CHARA . */
public static final String LFCR = "\n\r";
/** @deprecated use CHARA . */
public static final String Y = "Y";
/** @deprecated use CHARA . */
public static final char CHAR_DOT = '.';
/** @deprecated use CHARA. String of dot character . */
public static final String DOT = ".";
/** String of dot character .
* @deprecated use CHARA
*/
public static final String STR_DOT = ".";
/** @deprecated use CHARA . */
public static final String COMMA = ",";
/** @deprecated use CHARA . */
public static final String SPACE = " ";
/** @deprecated use CHARA . */
public static final String UNDERSCORE = "_";
/** @deprecated use CHARA . */
public static final String HYPHEN = "-";
public static final String HTML_TAG_PARA_OPEN = "<P>";
public static final String HTML_TAG_PARA_CLOSE = "</P>";
public static final String JAVADOC_INDENT = " * ";
/** @deprecated use CHARA . */
public static final String QUOTE = "\"";
public static final String DEFAULT_NULL = "NOTHING";
public static final String STR_0 = "0";
/** @deprecated use CHARA . */
public static final String STR_BACKSLASH = "\\";
/** @deprecated use CHARA . */
public static final String STR_RIGHTSLASH = "/";
/** Success code. */
public static final int OK = 0;
/** Not good code. */
public static final int NG = -1;
}
|
[
"thachln@8c9dc9ed-9053-dc3b-3cd5-44c8541756d8"
] |
thachln@8c9dc9ed-9053-dc3b-3cd5-44c8541756d8
|
3767e8046fcc2c054b11ef8bce92c9e79ff9821d
|
b997ef6918f777535d52345537b8f2f5dfa592ed
|
/src/main/java/common/datastruct/TreeNode.java
|
22ac542769418cd71990180ff523544bab6f6570
|
[] |
no_license
|
lemonlmlian/algorithms
|
6345661f184a051fcc8ff5b436f6314c326969c8
|
234165b4c76d3110cdb7c9d4a35f9e7c0d3a63c0
|
refs/heads/master
| 2023-07-19T23:49:36.637451
| 2021-08-31T22:16:43
| 2021-08-31T22:17:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 384
|
java
|
package common.datastruct;
/**
* LeetCode 二叉树结点
*/
public class TreeNode {
public Integer val;
public TreeNode left;
public TreeNode right;
public TreeNode(Integer val) {
this.val = val;
}
public TreeNode(Integer val, TreeNode left, TreeNode right) {
this.val = val;
this.left = left;
this.right = right;
}
}
|
[
"tb178271@alibaba-inc.com"
] |
tb178271@alibaba-inc.com
|
3d90f4e3be741e2d8aee98c313ccd52ebc62a76a
|
51b6c46827f8d8b38e912a1ad86a9eb79e1f3cae
|
/src/main/java/seclogin/UserInterface.java
|
af6d0ce3382fce901f9e192310cb7f62d7621b82
|
[] |
no_license
|
chris-martin/password-hardening
|
e56ab1ce0cbec1e02eeee7db5dbf606008e9f4d9
|
57145e0387e97b454a40e61d8947a971a0f319f5
|
refs/heads/master
| 2016-09-06T08:41:25.640341
| 2013-02-26T03:00:48
| 2013-02-26T03:00:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 326
|
java
|
package seclogin;
public interface UserInterface {
String ask(String prompt);
String askSecret(String prompt);
void tell(String message);
String UserPrompt = "login:";
String PasswordPrompt = "password:";
String Success = "\n Login success.\n";
String Failure = "\n Login failure.\n";
}
|
[
"ch.martin@gmail.com"
] |
ch.martin@gmail.com
|
a4056ac9571df7c11a0c61071b91c3ef5a0f5c49
|
7aa36431660ff1832debbb21dede14ce277be8ca
|
/src/main/java/lucene/codecs/Codec.java
|
7d995bdb3d53d438cefc57da0b5dba0b3b47a177
|
[] |
no_license
|
DeanWanghewei/lucene-source-code-analysis
|
c329558f2f25c3517bc0277d64d4949db73afab2
|
1b50a9e8ece4ee0881d4745268ee1977b406c423
|
refs/heads/master
| 2020-04-28T21:26:30.584598
| 2019-03-15T10:13:42
| 2019-03-15T10:13:42
| 175,581,636
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,535
|
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 lucene.codecs;
import lucene.index.IndexWriterConfig;
import lucene.util.NamedSPILoader;
import java.util.Objects;
import java.util.ServiceLoader;
import java.util.Set;
/**
* Encodes/decodes an inverted index segment.
* <p>
* Note, when extending this class, the name ({@link #getName}) is
* written into the index. In order for the segment to be read, the
* name must resolve to your implementation via {@link #forName(String)}.
* This method uses Java's
* {@link ServiceLoader Service Provider Interface} (SPI) to resolve codec names.
* <p>
* If you implement your own codec, make sure that it has a no-arg constructor
* so SPI can load it.
* @see ServiceLoader
*/
public abstract class Codec implements NamedSPILoader.NamedSPI {
/**
* This static holder class prevents classloading deadlock by delaying
* init of default codecs and available codecs until needed.
*/
private static final class Holder {
private static final NamedSPILoader<Codec> LOADER = new NamedSPILoader<>(Codec.class);
private Holder() {}
static NamedSPILoader<Codec> getLoader() {
if (LOADER == null) {
throw new IllegalStateException("You tried to lookup a Codec by name before all Codecs could be initialized. "+
"This likely happens if you call Codec#forName from a Codec's ctor.");
}
return LOADER;
}
// TODO: should we use this, or maybe a system property is better?
static Codec defaultCodec = LOADER.lookup("Lucene80");
}
private final String name;
/**
* Creates a new codec.
* <p>
* The provided name will be written into the index segment: in order to
* for the segment to be read this class should be registered with Java's
* SPI mechanism (registered in META-INF/ of your jar file, etc).
* @param name must be all ascii alphanumeric, and less than 128 characters in length.
*/
protected Codec(String name) {
NamedSPILoader.checkServiceName(name);
this.name = name;
}
/** Returns this codec's name */
@Override
public final String getName() {
return name;
}
/** Encodes/decodes postings */
public abstract PostingsFormat postingsFormat();
/** Encodes/decodes docvalues */
public abstract DocValuesFormat docValuesFormat();
/** Encodes/decodes stored fields */
public abstract StoredFieldsFormat storedFieldsFormat();
/** Encodes/decodes term vectors */
public abstract TermVectorsFormat termVectorsFormat();
/** Encodes/decodes field infos file */
public abstract FieldInfosFormat fieldInfosFormat();
/** Encodes/decodes segment info file */
public abstract SegmentInfoFormat segmentInfoFormat();
/** Encodes/decodes document normalization values */
public abstract NormsFormat normsFormat();
/** Encodes/decodes live docs */
public abstract LiveDocsFormat liveDocsFormat();
/** Encodes/decodes compound files */
public abstract CompoundFormat compoundFormat();
/** Encodes/decodes points index */
public abstract PointsFormat pointsFormat();
/** looks up a codec by name */
public static Codec forName(String name) {
return Holder.getLoader().lookup(name);
}
/** returns a list of all available codec names */
public static Set<String> availableCodecs() {
return Holder.getLoader().availableServices();
}
/**
* Reloads the codec list from the given {@link ClassLoader}.
* Changes to the codecs are visible after the method ends, all
* iterators ({@link #availableCodecs()},...) stay consistent.
*
* <p><b>NOTE:</b> Only new codecs are added, existing ones are
* never removed or replaced.
*
* <p><em>This method is expensive and should only be called for discovery
* of new codecs on the given classpath/classloader!</em>
*/
public static void reloadCodecs(ClassLoader classloader) {
Holder.getLoader().reload(classloader);
}
/** expert: returns the default codec used for newly created
* {@link IndexWriterConfig}s.
*/
public static Codec getDefault() {
if (Holder.defaultCodec == null) {
throw new IllegalStateException("You tried to lookup the default Codec before all Codecs could be initialized. "+
"This likely happens if you try to get it from a Codec's ctor.");
}
return Holder.defaultCodec;
}
/** expert: sets the default codec used for newly created
* {@link IndexWriterConfig}s.
*/
public static void setDefault(Codec codec) {
Holder.defaultCodec = Objects.requireNonNull(codec);
}
/**
* returns the codec's name. Subclasses can override to provide
* more detail (such as parameters).
*/
@Override
public String toString() {
return name;
}
}
|
[
"deanwanghewei@163.com"
] |
deanwanghewei@163.com
|
21b9e9ff9051f5f06c3369f50be5d8e06db3c7d2
|
ed9e7da4886658526202c8afb70a8b9123431225
|
/src/net/minecraft/client/renderer/entity/RenderEntity.java
|
19f9296a8dd0ee90dec36872e406ce723833a1df
|
[] |
no_license
|
steviebeenz/FractionClient
|
4b31f3b3573cccc4fcc559a24f4a48c8774f750a
|
ccbd026542c5b43b1df9a64cd58eaf02145a11a7
|
refs/heads/master
| 2023-08-16T04:16:27.848858
| 2021-10-11T21:23:13
| 2021-10-14T22:14:19
| 416,090,058
| 0
| 0
| null | 2021-10-15T03:51:53
| 2021-10-11T21:19:49
|
Java
|
UTF-8
|
Java
| false
| false
| 1,055
|
java
|
package net.minecraft.client.renderer.entity;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
public class RenderEntity extends Render<Entity>
{
public RenderEntity(RenderManager renderManagerIn)
{
super(renderManagerIn);
}
/**
* Renders the desired {@code T} type Entity.
*/
public void doRender(Entity entity, double x, double y, double z, float entityYaw, float partialTicks)
{
GlStateManager.pushMatrix();
renderOffsetAABB(entity.getEntityBoundingBox(), x - entity.lastTickPosX, y - entity.lastTickPosY, z - entity.lastTickPosZ);
GlStateManager.popMatrix();
super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
/**
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
*/
protected ResourceLocation getEntityTexture(Entity entity)
{
return null;
}
}
|
[
"orress35@mail.ru"
] |
orress35@mail.ru
|
f837b2e7c2a0fb0b254d8c3e5da866c0d5d0963c
|
4c8178ef69d9d15ff62459515f5835adb5970cbe
|
/LayoutsDemos/Layouts-Demo/src/main/java/com/droidux/demos/layouts/MaskedDrawableTest.java
|
3f5f8f3dd56447296b2ca67184fa2ae76a7f1a04
|
[] |
no_license
|
Bravo2017/android-projects
|
3dbd71bef8310a333226a8bf0ac6321b565cb00b
|
f54962f10ab4137d15ece9d55019774023b4fbb4
|
refs/heads/master
| 2021-06-17T13:37:21.961147
| 2017-04-10T06:56:15
| 2017-04-10T06:56:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,001
|
java
|
/*
* Copyright (C) 2011-2014 Ximpl
* All Rights Reserved. This program and the accompanying materials
* are owned by Ximpl or its suppliers. The program is protected by
* international copyright laws and treaty provisions.
* Any violation will be prosecuted under applicable laws.
* NOTICE: The following is Source Code and is subject to all
* restrictions on such code as contained in the End User License Agreement
* accompanying this product.
*/
package com.droidux.demos.layouts;
import android.graphics.drawable.ShapeDrawable;
import android.graphics.drawable.shapes.OvalShape;
import android.os.Bundle;
import android.widget.ImageView;
/**
*
*/
public class MaskedDrawableTest extends BaseTestActivity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ImageView iv = (ImageView) findViewById(R.id.image1);
}
@Override
protected int getLayoutId() {
return R.layout.activity_maskeddrawabletest;
}
}
|
[
"imayadismas@gmail.com"
] |
imayadismas@gmail.com
|
cc1de2454632ff8f3ac2ec22200c495bd66e63f7
|
2645fe3571bd426f02231854d319217a1d50994d
|
/src/main/java/com/mycom/shoppingcart/service/ProductService.java
|
021f0ae6abba0f9682cfaddad0a0ec7e5a990733
|
[] |
no_license
|
kasunsk/shopping-cart-example
|
72eda3b56b10e323563c65e60552303a8990160a
|
99f286898606d48b36499b2fb7106a54226db881
|
refs/heads/master
| 2020-12-29T04:57:23.555748
| 2020-02-05T13:58:58
| 2020-02-05T13:58:58
| 238,462,146
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 166
|
java
|
package com.mycom.shoppingcart.service;
import com.mycom.shoppingcart.model.Product;
public interface ProductService {
Boolean saveProduct(Product product);
}
|
[
"kasunsk@gmail.com"
] |
kasunsk@gmail.com
|
ec00d0d440f23da782422eb996244c44c394f51a
|
e63363389e72c0822a171e450a41c094c0c1a49c
|
/Mate20_10_1_0/src/main/java/defpackage/j.java
|
6d844f43fcea170f7705b4e83adbe81d2e2a727a
|
[] |
no_license
|
solartcc/HwFrameWorkSource
|
fc23ca63bcf17865e99b607cc85d89e16ec1b177
|
5b92ed0f1ccb4bafc0fdb08b6fc4d98447b754ad
|
refs/heads/master
| 2022-12-04T21:14:37.581438
| 2020-08-25T04:30:43
| 2020-08-25T04:30:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,557
|
java
|
package defpackage;
import android.os.Handler;
import android.util.Log;
import com.huawei.android.feature.install.InstallRequest;
import com.huawei.android.feature.install.InstallStorageManager;
import com.huawei.android.feature.install.localinstall.FeatureLocalInstallManager;
import com.huawei.android.feature.install.localinstall.FeatureLocalInstallRequest;
import com.huawei.android.feature.install.localinstall.IFeatureLocalInstall;
import com.huawei.android.feature.install.localinstall.PathParser;
import com.huawei.android.feature.module.DynamicModuleManager;
import java.io.File;
import java.io.IOException;
import java.util.List;
/* renamed from: j reason: default package */
public final class j implements Runnable {
final /* synthetic */ InstallRequest g;
final /* synthetic */ IFeatureLocalInstall i;
final /* synthetic */ Handler j;
final /* synthetic */ boolean k;
final /* synthetic */ FeatureLocalInstallManager l;
public j(FeatureLocalInstallManager featureLocalInstallManager, IFeatureLocalInstall iFeatureLocalInstall, Handler handler, InstallRequest installRequest, boolean z) {
this.l = featureLocalInstallManager;
this.i = iFeatureLocalInstall;
this.j = handler;
this.g = installRequest;
this.k = z;
}
public final void run() {
this.l.notifyFeatureInstallBegin(this.i, this.j);
List<FeatureLocalInstallRequest> installRequestModules = this.g.getInstallRequestModules();
if (installRequestModules.size() > 100) {
Log.e(FeatureLocalInstallManager.TAG, "feature nums exceed the limit");
return;
}
for (FeatureLocalInstallRequest featureLocalInstallRequest : installRequestModules) {
try {
PathParser pathParser = this.l.mPathFactory.getPathParser(this.l.mContext, featureLocalInstallRequest.getPath());
int parsePath = pathParser.parsePath();
if (parsePath != 0) {
this.l.notifyFeatureInstallStatus(featureLocalInstallRequest.getFeatureName(), parsePath, this.i, this.j);
} else {
int dynamicFeatureState = DynamicModuleManager.getInstance().getDynamicFeatureState(featureLocalInstallRequest.getFeatureName());
if (!(dynamicFeatureState == 0 || 5 == dynamicFeatureState)) {
parsePath = -18;
}
if (parsePath != 0) {
this.l.notifyFeatureInstallStatus(featureLocalInstallRequest.getFeatureName(), parsePath, this.i, this.j);
} else {
File loadingFile = pathParser.getLoadingFile();
if (loadingFile == null) {
this.l.notifyFeatureInstallStatus(featureLocalInstallRequest.getFeatureName(), -10, this.i, this.j);
} else {
this.l.addInstallFeatureState(featureLocalInstallRequest.getFeatureName());
File file = new File(InstallStorageManager.getUnverifyApksDir(this.l.mContext), loadingFile.getName());
try {
if (this.k) {
FeatureLocalInstallManager.copy(loadingFile, file);
Log.d(FeatureLocalInstallManager.TAG, "copy apk file finished");
} else {
Log.d(FeatureLocalInstallManager.TAG, "rename : " + loadingFile.renameTo(file));
}
} catch (IOException e) {
Log.e(FeatureLocalInstallManager.TAG, e.toString());
this.l.procFeatureInstallEnd(featureLocalInstallRequest.getFeatureName(), -17, this.i, this.j);
}
this.l.procFeatureInstallEnd(featureLocalInstallRequest.getFeatureName(), DynamicModuleManager.installUnverifyFeatures(this.l.mContext, loadingFile.getName(), featureLocalInstallRequest.getSignature()), this.i, this.j);
}
}
}
} catch (IllegalArgumentException e2) {
Log.e(FeatureLocalInstallManager.TAG, e2.toString());
this.l.notifyFeatureInstallStatus(featureLocalInstallRequest.getFeatureName(), -19, this.i, this.j);
}
}
this.l.notifyFeatureInstallEnd(this.i, this.j);
}
}
|
[
"lygforbs0@gmail.com"
] |
lygforbs0@gmail.com
|
8b8479ca26627af0b87b13d2ad833d945dc9279c
|
087c3a7ba76fdc62db5f694054be60ee8a460ee5
|
/src/test/java/com/codeartisans/bugtracker/web/rest/TestUtil.java
|
3b46818a21bd6b170a5934394188d1ba8eb13d4d
|
[] |
no_license
|
gleclaire/jhipster-bug-tracker-sample
|
367f255306fb463a428d204e035134f31129ee19
|
99c08a6ec3e3e0c085f9d845750fd4260c0b2f76
|
refs/heads/master
| 2021-05-03T11:02:27.174429
| 2018-02-14T10:40:19
| 2018-02-14T10:40:19
| 120,542,913
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,193
|
java
|
package com.codeartisans.bugtracker.web.rest;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import org.hamcrest.Description;
import org.hamcrest.TypeSafeDiagnosingMatcher;
import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar;
import org.springframework.format.support.DefaultFormattingConversionService;
import org.springframework.format.support.FormattingConversionService;
import org.springframework.http.MediaType;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.time.ZonedDateTime;
import java.time.format.DateTimeParseException;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Utility class for testing REST controllers.
*/
public class TestUtil {
/** MediaType for JSON UTF8 */
public static final MediaType APPLICATION_JSON_UTF8 = new MediaType(
MediaType.APPLICATION_JSON.getType(),
MediaType.APPLICATION_JSON.getSubtype(), StandardCharsets.UTF_8);
/**
* Convert an object to JSON byte array.
*
* @param object
* the object to convert
* @return the JSON byte array
* @throws IOException
*/
public static byte[] convertObjectToJsonBytes(Object object)
throws IOException {
ObjectMapper mapper = new ObjectMapper();
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
JavaTimeModule module = new JavaTimeModule();
mapper.registerModule(module);
return mapper.writeValueAsBytes(object);
}
/**
* Create a byte array with a specific size filled with specified data.
*
* @param size the size of the byte array
* @param data the data to put in the byte array
* @return the JSON byte array
*/
public static byte[] createByteArray(int size, String data) {
byte[] byteArray = new byte[size];
for (int i = 0; i < size; i++) {
byteArray[i] = Byte.parseByte(data, 2);
}
return byteArray;
}
/**
* A matcher that tests that the examined string represents the same instant as the reference datetime.
*/
public static class ZonedDateTimeMatcher extends TypeSafeDiagnosingMatcher<String> {
private final ZonedDateTime date;
public ZonedDateTimeMatcher(ZonedDateTime date) {
this.date = date;
}
@Override
protected boolean matchesSafely(String item, Description mismatchDescription) {
try {
if (!date.isEqual(ZonedDateTime.parse(item))) {
mismatchDescription.appendText("was ").appendValue(item);
return false;
}
return true;
} catch (DateTimeParseException e) {
mismatchDescription.appendText("was ").appendValue(item)
.appendText(", which could not be parsed as a ZonedDateTime");
return false;
}
}
@Override
public void describeTo(Description description) {
description.appendText("a String representing the same Instant as ").appendValue(date);
}
}
/**
* Creates a matcher that matches when the examined string reprensents the same instant as the reference datetime
* @param date the reference datetime against which the examined string is checked
*/
public static ZonedDateTimeMatcher sameInstant(ZonedDateTime date) {
return new ZonedDateTimeMatcher(date);
}
/**
* Verifies the equals/hashcode contract on the domain object.
*/
@SuppressWarnings("unchecked")
public static void equalsVerifier(Class clazz) throws Exception {
Object domainObject1 = clazz.getConstructor().newInstance();
assertThat(domainObject1.toString()).isNotNull();
assertThat(domainObject1).isEqualTo(domainObject1);
assertThat(domainObject1.hashCode()).isEqualTo(domainObject1.hashCode());
// Test with an instance of another class
Object testOtherObject = new Object();
assertThat(domainObject1).isNotEqualTo(testOtherObject);
assertThat(domainObject1).isNotEqualTo(null);
// Test with an instance of the same class
Object domainObject2 = clazz.getConstructor().newInstance();
assertThat(domainObject1).isNotEqualTo(domainObject2);
// HashCodes are equals because the objects are not persisted yet
assertThat(domainObject1.hashCode()).isEqualTo(domainObject2.hashCode());
}
/**
* Create a FormattingConversionService which use ISO date format, instead of the localized one.
* @return the FormattingConversionService
*/
public static FormattingConversionService createFormattingConversionService() {
DefaultFormattingConversionService dfcs = new DefaultFormattingConversionService ();
DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
registrar.setUseIsoFormat(true);
registrar.registerFormatters(dfcs);
return dfcs;
}
}
|
[
"garvin.leclaire@gmail.com"
] |
garvin.leclaire@gmail.com
|
2b8d061cdbc0697c5910cf5b81cef41d8225d7b2
|
a5e03ae6c2c9bd310bd41eeeb45402460e94a9f2
|
/src/java.base/share/classes/org/checkerframework/checker/signature/qual/ClassGetSimpleName.java
|
6b5a3d1aab5732c1b967a54ba66b363bc2d6ea11
|
[] |
no_license
|
zhangjiangqige/mini-jdk11
|
ad05f5a2f862b3fe22bf45220124bdcbe899be6e
|
5c660a9a8e6b24e7084248d453611be05c1c1671
|
refs/heads/master
| 2020-09-10T18:19:33.494523
| 2019-11-27T22:23:30
| 2019-11-27T22:23:30
| 221,790,773
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 468
|
java
|
package org.checkerframework.checker.signature.qual;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
import org.checkerframework.framework.qual.QualifierForLiterals;
import org.checkerframework.framework.qual.SubtypeOf;
@SubtypeOf(SignatureUnknown.class)
@QualifierForLiterals(stringPatterns = "^(|[A-Za-z_][A-Za-z_0-9]*)(\\[\\])*$")
@Target({ ElementType.TYPE_USE, ElementType.TYPE_PARAMETER })
public @interface ClassGetSimpleName {
}
|
[
"zhangjiangqige@gmail.com"
] |
zhangjiangqige@gmail.com
|
9d3e218fedff795015d63c28161d7d625d5710cd
|
010917b675e6ef44574a567423ac3ac3b21dfca2
|
/src/main/java/org/sambhav/transport/repos/UserRepo.java
|
9b14789432d92de2c5984d3caa500f861314fab4
|
[] |
no_license
|
samwebber11/TransportAutomationSystem
|
7af4770bfe1439d16dc7b8a134fa26cb95d16411
|
cc69c264b34df8bf4f368bcf627da59624ee79f2
|
refs/heads/master
| 2023-07-24T05:39:00.091697
| 2019-07-02T08:55:26
| 2019-07-02T08:55:26
| 194,047,649
| 0
| 0
| null | 2023-07-13T17:02:28
| 2019-06-27T07:44:40
|
Java
|
UTF-8
|
Java
| false
| false
| 250
|
java
|
package org.sambhav.transport.repos;
import org.sambhav.transport.models.User;
import org.springframework.data.jpa.repository.JpaRepository;
public interface UserRepo extends JpaRepository<User,Integer> {
public User findByEmail(String email);
}
|
[
"="
] |
=
|
49de316f83e5695ae6592627a142e849724929d2
|
95e944448000c08dd3d6915abb468767c9f29d3c
|
/sources/com/p280ss/android/websocket/p344ws/p1781a/C45447e.java
|
1d8f99b34645ffd318729f2bb3331d02391c7f35
|
[] |
no_license
|
xrealm/tiktok-src
|
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
|
90f305b5f981d39cfb313d75ab231326c9fca597
|
refs/heads/master
| 2022-11-12T06:43:07.401661
| 2020-07-04T20:21:12
| 2020-07-04T20:21:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,327
|
java
|
package com.p280ss.android.websocket.p344ws.p1781a;
import com.p280ss.android.websocket.internal.proto.Frame.ExtendedEntry;
import java.util.Map;
/* renamed from: com.ss.android.websocket.ws.a.e */
public final class C45447e {
/* renamed from: a */
public final String f117045a;
/* renamed from: b */
public final byte[] f117046b;
/* renamed from: c */
public final long f117047c;
/* renamed from: d */
public final long f117048d;
/* renamed from: e */
public final int f117049e;
/* renamed from: f */
public final int f117050f;
/* renamed from: g */
public final String f117051g;
/* renamed from: h */
public final String f117052h;
/* renamed from: i */
private final Map<String, String> f117053i;
/* renamed from: a */
public final Map<String, String> mo108841a() {
new ExtendedEntry("", "");
return this.f117053i;
}
public C45447e(String str, int i, long j, long j2, int i2, byte[] bArr, String str2, String str3, Map<String, String> map) {
this.f117045a = str;
this.f117046b = bArr;
this.f117049e = i;
this.f117050f = i2;
this.f117047c = j;
this.f117048d = j2;
this.f117051g = str2;
this.f117052h = str3;
this.f117053i = map;
}
}
|
[
"65450641+Xyzdesk@users.noreply.github.com"
] |
65450641+Xyzdesk@users.noreply.github.com
|
7a9513fcab229c1ee04d46356b55cda3cbac4898
|
883a0cb8154385a337b31d0fc9d92e070510b7b1
|
/jetlinks-manager/notify-manager/src/main/java/org/jetlinks/community/notify/manager/service/NotifierCacheManager.java
|
f498a12573f5d095753613e6d3f28f68972cf451
|
[
"Apache-2.0"
] |
permissive
|
WangScaler/jetlinks-community
|
69e61941c958cc9b4702f72f0ea99d0fbcb6d530
|
d261352fa45a842dc0f2ac6c08e7e7546de78129
|
refs/heads/master
| 2023-07-14T16:53:47.977257
| 2020-12-03T01:54:26
| 2020-12-03T01:54:26
| 299,549,701
| 2
| 0
|
Apache-2.0
| 2021-09-01T06:28:24
| 2020-09-29T08:14:42
|
Java
|
UTF-8
|
Java
| false
| false
| 2,259
|
java
|
package org.jetlinks.community.notify.manager.service;
import lombok.extern.slf4j.Slf4j;
import org.hswebframework.web.crud.events.EntityDeletedEvent;
import org.hswebframework.web.crud.events.EntityModifyEvent;
import org.jetlinks.community.notify.NotifierManager;
import org.jetlinks.community.notify.manager.entity.NotifyConfigEntity;
import org.jetlinks.community.notify.manager.entity.NotifyTemplateEntity;
import org.jetlinks.community.notify.template.TemplateManager;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;
import reactor.core.publisher.Flux;
import java.util.List;
@Component
@Slf4j
public class NotifierCacheManager {
private final TemplateManager templateManager;
private final NotifierManager notifierManager;
public NotifierCacheManager(TemplateManager templateManager, NotifierManager notifierManager) {
this.templateManager = templateManager;
this.notifierManager = notifierManager;
}
@EventListener
public void handleTemplateModify(EntityModifyEvent<NotifyTemplateEntity> event) {
reloadTemplate(event.getBefore());
}
@EventListener
public void handleTemplateDelete(EntityDeletedEvent<NotifyTemplateEntity> event) {
reloadTemplate(event.getEntity());
}
@EventListener
public void handleConfigModify(EntityModifyEvent<NotifyConfigEntity> event) {
reloadConfig(event.getBefore());
}
@EventListener
public void handleConfigDelete(EntityDeletedEvent<NotifyConfigEntity> event) {
reloadConfig(event.getEntity());
}
protected void reloadConfig(List<NotifyConfigEntity> entities) {
Flux.fromIterable(entities)
.map(NotifyConfigEntity::getId)
.doOnNext(id -> log.info("clear notifier config [{}] cache", id))
.flatMap(notifierManager::reload)
.subscribe();
}
protected void reloadTemplate(List<NotifyTemplateEntity> entities) {
Flux.fromIterable(entities)
.map(NotifyTemplateEntity::getId)
.doOnNext(id -> log.info("clear template [{}] cache", id))
.flatMap(templateManager::reload)
.subscribe();
}
}
|
[
"zh.sqy@qq.com"
] |
zh.sqy@qq.com
|
c771494d3a724dd6d55449db51810344016bade7
|
e54722b7e83f6b9e3382dd41cfddd3d53403c08f
|
/apple-qos-server/apple-qos-server-statistics/src/main/java/com/appleframework/qos/server/statistics/service/DayStatCodeService.java
|
50da0f2a1d4df9b1a601cf4e11055811e951d870
|
[
"Apache-2.0"
] |
permissive
|
tjzx/apple-qos
|
bb8d74f9eff2680bebd2b811b15bbb9439fca106
|
4df121773dd8c9b0fe67ff6a47db96421a496b5c
|
refs/heads/master
| 2020-12-27T12:16:25.547715
| 2015-03-03T06:35:13
| 2015-03-03T06:35:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 694
|
java
|
package com.appleframework.qos.server.statistics.service;
import java.util.Date;
import com.appleframework.qos.server.core.entity.DayStatCode;
public interface DayStatCodeService {
public void createTable();
public void save(DayStatCode dsc);
public void update(DayStatCode dsc);
public DayStatCode getByDate(Date date, Long consumerAppId, Long providerAppId, String errorCode);
/*public List<DayStatCode> findByAppAndDay(Date startDate, Date endDate,
String consumerAppName, String providerAppName);
public List<DayStatCode> findPageByAppAndDay(Pagination page,
Date startDate, Date endDate, String consumerAppName, String providerAppName);*/
}
|
[
"xushaomin@foxmail.com"
] |
xushaomin@foxmail.com
|
ac18a1a655f19c581090eff44d8336f6a1e6c0a7
|
8e1e2558d9fa2dd83e4ab071a8fdaa595e8b1a4f
|
/bizili/src/main/java/com/vteba/cache/memcached/transaction/SoftLockManagerImpl.java
|
88776616ddadce225d2e0d8448cc0581d5f08c51
|
[] |
no_license
|
liveqmock/bizili
|
f021f6ae504b7b002d7cc87c2d21c537a7212620
|
3f10e89c3586e9e628e6b30c092533cc36411291
|
refs/heads/master
| 2020-07-12T19:57:34.930131
| 2015-05-01T07:17:47
| 2015-05-01T07:17:47
| 37,264,337
| 1
| 3
| null | 2015-06-11T13:59:27
| 2015-06-11T13:59:26
| null |
UTF-8
|
Java
| false
| false
| 1,115
|
java
|
package com.vteba.cache.memcached.transaction;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
/**
* A SoftLockFactory implementation which creates soft locks with Read-Committed isolation level
*
* @author Ludovic Orban
*/
public class SoftLockManagerImpl extends AbstractSoftLockManager {
// actually all we need would be a ConcurrentSet...
private final ConcurrentMap<SoftLockID, Boolean> newKeyLocks = new ConcurrentHashMap<SoftLockID, Boolean>();
private final ConcurrentMap<SoftLockID, SoftLock> allLocks = new ConcurrentHashMap<SoftLockID, SoftLock>();
/**
* Create a new ReadCommittedSoftLockFactoryImpl instance for a cache
* @param cacheName the name of the cache
*/
public SoftLockManagerImpl(String cacheName, SoftLockFactory lockFactory) {
super(cacheName, lockFactory);
}
@Override
protected ConcurrentMap<SoftLockID, SoftLock> getAllLocks() {
return allLocks;
}
@Override
protected ConcurrentMap<SoftLockID, Boolean> getNewKeyLocks() {
return newKeyLocks;
}
}
|
[
"tongku2008@126.com"
] |
tongku2008@126.com
|
cd20fe073b55aee1d2de7a9f1e4ff77086c3575d
|
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
|
/src/chosun/ciis/se/boi/rec/SE_MO_BOI_1020_SCOMMCDCUR2Record.java
|
a9ddc956fa31b95573c5c4afe8daf830687cd678
|
[] |
no_license
|
nosmoon/misdevteam
|
4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60
|
1829d5bd489eb6dd307ca244f0e183a31a1de773
|
refs/heads/master
| 2020-04-15T15:57:05.480056
| 2019-01-10T01:12:01
| 2019-01-10T01:12:01
| 164,812,547
| 1
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 1,441
|
java
|
/***************************************************************************************************
* 파일명 : SE_MO_BOI_1020_SCOMMCDCUR2Record.java_모바일용
* 기능 : 센터관리-센터정보관리-상세
* 작성일자 : 2017-04-13
* 작성자 : 장선희
***************************************************************************************************/
/***************************************************************************************************
* 수정내역 :
* 수정자 :
* 수정일자 :
* 백업 :
***************************************************************************************************/
package chosun.ciis.se.boi.rec;
import java.sql.*;
import chosun.ciis.se.boi.dm.*;
import chosun.ciis.se.boi.ds.*;
/**
*
*/
public class SE_MO_BOI_1020_SCOMMCDCUR2Record extends java.lang.Object implements java.io.Serializable{
public String cd;
public String cdnm;
public String cd_abrv_nm;
public SE_MO_BOI_1020_SCOMMCDCUR2Record(){}
public void setCd(String cd){
this.cd = cd;
}
public void setCdnm(String cdnm){
this.cdnm = cdnm;
}
public void setCd_abrv_nm(String cd_abrv_nm){
this.cd_abrv_nm = cd_abrv_nm;
}
public String getCd(){
return this.cd;
}
public String getCdnm(){
return this.cdnm;
}
public String getCd_abrv_nm(){
return this.cd_abrv_nm;
}
}
/* 작성시간 : Thu Apr 13 17:05:09 KST 2017 */
|
[
"DLCOM000@172.16.30.11"
] |
DLCOM000@172.16.30.11
|
6bd55aec330b8693b079c42ff546543771e8f7f7
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Time/7/org/joda/time/ReadWritableInterval_setInterval_34.java
|
0d3bb6a5840fdf97842805b1d5ad1a235fd55077
|
[] |
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
| 516
|
java
|
org joda time
writabl interv
author stephen colebourn
author brian neill o'neil
read writabl interv readwritableinterv readabl interv readableinterv
set interv millisecond instant
param start instant startinst start time interv
param end instant endinst start time interv
illeg argument except illegalargumentexcept end start
set interv setinterv start instant startinst end instant endinst
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
b6243cf7ac05004145df27378b5821dbec95df27
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/27/27_a0980a871416fd71d1b8f63333be5fbf9dcbc849/CdfDump/27_a0980a871416fd71d1b8f63333be5fbf9dcbc849_CdfDump_s.java
|
a64928bb9c84fabe16d1641cc16c23a44289db48
|
[] |
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
| 7,017
|
java
|
package cdf.util;
import cdf.Buf;
import cdf.CdfReader;
import cdf.Record;
import cdf.RecordFactory;
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.lang.reflect.Array;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
public class CdfDump {
private final CdfReader crdr_;
private final PrintStream out_;
private final boolean writeFields_;
private final boolean html_;
public CdfDump( CdfReader crdr, PrintStream out, boolean writeFields,
boolean html ) {
crdr_ = crdr;
out_ = out;
writeFields_ = writeFields;
html_ = html;
}
public void run() throws IOException {
Buf buf = crdr_.getBuf();
RecordFactory recFact = crdr_.getRecordFactory();
long offset = 8;
long leng = buf.getLength();
if ( html_ ) {
out_.println( "<html><body><pre>" );
}
for ( int ix = 0; offset < leng; ix++ ) {
Record rec = recFact.createRecord( buf, offset );
dumpRecord( ix, rec, offset );
offset += rec.getRecordSize();
}
if ( html_ ) {
out_.println( "</pre></body></html>" );
}
}
private void dumpRecord( int index, Record rec, long offset ) {
StringBuffer sbuf = new StringBuffer();
if ( html_ ) {
sbuf.append( "<hr /><strong>" );
}
sbuf.append( index )
.append( ":\t" )
.append( rec.getRecordTypeAbbreviation() )
.append( "\t" )
.append( rec.getRecordType() )
.append( "\t" )
.append( rec.getRecordSize() )
.append( "\t" )
.append( formatOffsetId( offset ) );
if ( html_ ) {
sbuf.append( "</strong>" );
}
out_.println( sbuf.toString() );
if ( writeFields_ ) {
Field[] fields = rec.getClass().getFields();
for ( int i = 0; i < fields.length; i++ ) {
Field field = fields[ i ];
int mods = field.getModifiers();
if ( Modifier.isFinal( mods ) &&
Modifier.isPublic( mods ) &&
! Modifier.isStatic( mods ) ) {
String name = field.getName();
Object value;
try {
value = field.get( rec );
}
catch ( IllegalAccessException e ) {
throw new RuntimeException( "Reflection error", e );
}
out_.println( formatFieldValue( adjustFieldName( name ),
value ) );
}
}
}
}
private String formatFieldValue( String name, Object value ) {
StringBuffer sbuf = new StringBuffer();
sbuf.append( spaces( 4 ) );
sbuf.append( name )
.append( ":" );
sbuf.append( spaces( 20 - sbuf.length() ) );
if ( value == null ) {
}
else if ( value.getClass().isArray() ) {
int len = Array.getLength( value );
if ( value instanceof long[] ) {
long[] larray = (long[]) value;
for ( int i = 0; i < len; i++ ) {
if ( i > 0 ) {
sbuf.append( ", " );
}
sbuf.append( formatOffsetRef( larray[ i ] ) );
}
}
else {
for ( int i = 0; i < len; i++ ) {
if ( i > 0 ) {
sbuf.append( ", " );
}
sbuf.append( Array.get( value, i ) );
}
}
}
else {
sbuf.append( value instanceof Long && ! name.endsWith( "Size" )
? formatOffsetRef( ((Long) value).longValue() )
: value.toString() );
}
return sbuf.toString();
}
private String formatOffsetId( long offset ) {
String txt = "0x" + Long.toHexString( offset );
return html_ ? "<a name='" + txt + "'>" + txt + "</a>"
: txt;
}
private String formatOffsetRef( long offset ) {
String txt = "0x" + Long.toHexString( offset );
return ( html_ && offset != -1L )
? "<a href='#" + txt + "'>" + txt + "</a>"
: txt;
}
private String adjustFieldName( String name ) {
return name.endsWith( "_" )
? name.substring( 0, name.length() - 1 )
: name;
}
private static String spaces( int count ) {
StringBuffer sbuf = new StringBuffer( count );
for ( int i = 0; i < count; i++ ) {
sbuf.append( ' ' );
}
return sbuf.toString();
}
public static int runMain( String[] args ) throws IOException {
String usage = new StringBuffer()
.append( "\n Usage:" )
.append( CdfDump.class.getName() )
.append( " [-help]" )
.append( " [-fields]" )
.append( " [-html]" )
.append( " <cdf-file>" )
.append( "\n" )
.toString();
List<String> argList = new ArrayList<String>( Arrays.asList( args ) );
File file = null;
boolean writeFields = false;
boolean html = false;
for ( Iterator<String> it = argList.iterator(); it.hasNext(); ) {
String arg = it.next();
if ( arg.equals( "-html" ) ) {
it.remove();
html = true;
}
else if ( arg.startsWith( "-h" ) ) {
it.remove();
System.out.println( usage );
return 0;
}
else if ( arg.startsWith( "-field" ) ) {
it.remove();
writeFields = true;
}
else if ( file == null ) {
it.remove();
file = new File( arg );
}
}
if ( ! argList.isEmpty() ) {
System.err.println( "Unused args: " + argList );
System.err.println( usage );
return 1;
}
if ( file == null ) {
System.err.println( usage );
return 1;
}
new CdfDump( new CdfReader( file ), System.out, writeFields, html )
.run();
return 0;
}
public static void main( String[] args ) throws IOException {
int status = runMain( args );
if ( status != 0 ) {
System.exit( status );
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
b411a7644ce9fc105d68ca925380075f8d052a68
|
9b7780f95ef454fc586d914263aa7baf15196f56
|
/ADSI_1349397_trimestre_5/JOYCD-HOUR/03_desarrollo/02_Source/04_version3/joycdHourV3/src/main/java/co/edu/sena/controller/factory/ProgramFactory.java
|
9897cf0856f6acf2ecdd773c4523c3a9f42d1277
|
[] |
no_license
|
davidbcaro/ADSI
|
eaa3cddc4c7225e2fa90bb6c34b792f711294609
|
5fab220093b0cf3a1d495baa072c3f18107aedb4
|
refs/heads/master
| 2022-09-15T14:21:47.912849
| 2019-06-23T13:02:05
| 2019-06-23T13:02:05
| 179,738,287
| 1
| 1
| null | 2022-08-31T23:05:47
| 2019-04-05T18:54:09
|
HTML
|
UTF-8
|
Java
| false
| false
| 509
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package co.edu.sena.controller.factory;
import co.edu.sena.controller.dao.ProgramDAO;
import co.edu.sena.controller.dao.mysql.ProgramDAOImpl;
/**
*
* @author liosalfar
*/
public class ProgramFactory {
public static ProgramDAO create(Class entityClass) {
return new ProgramDAOImpl(entityClass);
}
}
|
[
"davidbcaro@gmail.com"
] |
davidbcaro@gmail.com
|
54460f9fbd88ecccc0d7be722e6c8744358bb6ed
|
b214f96566446763ce5679dd2121ea3d277a9406
|
/modules/base/index-io/src/main/java/consulo/index/io/FileChunkKey.java
|
607ef49afbbc987b8121bae822fd9b4a99205091
|
[
"Apache-2.0",
"LicenseRef-scancode-jgraph"
] |
permissive
|
consulo/consulo
|
aa340d719d05ac6cbadd3f7d1226cdb678e6c84f
|
d784f1ef5824b944c1ee3a24a8714edfc5e2b400
|
refs/heads/master
| 2023-09-06T06:55:04.987216
| 2023-09-01T06:42:16
| 2023-09-01T06:42:16
| 10,116,915
| 680
| 54
|
Apache-2.0
| 2023-06-05T18:28:51
| 2013-05-17T05:48:18
|
Java
|
UTF-8
|
Java
| false
| false
| 1,822
|
java
|
/*
* Copyright 2000-2015 JetBrains s.r.o.
*
* 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 consulo.index.io;
import consulo.util.collection.ShareableKey;
import jakarta.annotation.Nonnull;
class FileChunkKey<OwnerType> implements Comparable<FileChunkKey<OwnerType>>, ShareableKey {
private OwnerType owner;
private long offset;
public FileChunkKey(OwnerType owner, long offset) {
this.owner = owner;
this.offset = offset;
}
public int hashCode() {
return (int)(owner.hashCode() * 31 + offset);
}
public OwnerType getOwner() {
return owner;
}
public long getOffset() {
return offset;
}
public boolean equals(final Object obj) {
if (getClass() != obj.getClass()) return false;
FileChunkKey<OwnerType> k = (FileChunkKey<OwnerType>)obj;
return k.owner == owner && k.offset == offset;
}
public void setup(OwnerType owner, long offset) {
this.owner = owner;
this.offset = offset;
}
@Override
public int compareTo(@Nonnull final FileChunkKey<OwnerType> o) {
if (owner != o.owner) {
return owner.hashCode() - o.owner.hashCode();
}
return offset == o.offset ? 0 : offset - o.offset < 0 ? -1 : 1;
}
@Override
public ShareableKey getStableCopy() {
return new FileChunkKey<OwnerType>(owner, offset);
}
}
|
[
"vistall.valeriy@gmail.com"
] |
vistall.valeriy@gmail.com
|
577ad3235f4c96198fe077dfe0c518709dd91b1f
|
e942dd8abe0c0c54d44924be21bf8cf3104a8918
|
/src/main/java/truequear/config/LiquibaseConfiguration.java
|
4afdd86e75daa6fd6474bd2fa93b75fc8b17c237
|
[] |
no_license
|
BulkSecurityGeneratorProject/truequear
|
984521429acded777a81b9740c6662e74ac9ce77
|
8064227a1546712355a63dcacc008cb1dd0c81be
|
refs/heads/master
| 2022-12-18T20:24:00.548403
| 2018-11-20T01:38:06
| 2018-11-20T01:38:06
| 296,597,161
| 0
| 0
| null | 2020-09-18T11:07:54
| 2020-09-18T11:07:53
| null |
UTF-8
|
Java
| false
| false
| 2,144
|
java
|
package truequear.config;
import javax.sql.DataSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties;
import org.springframework.cache.CacheManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.core.task.TaskExecutor;
import io.github.jhipster.config.JHipsterConstants;
import io.github.jhipster.config.liquibase.AsyncSpringLiquibase;
import liquibase.integration.spring.SpringLiquibase;
@Configuration
public class LiquibaseConfiguration {
private final Logger log = LoggerFactory.getLogger(LiquibaseConfiguration.class);
private final Environment env;
private final CacheManager cacheManager;
public LiquibaseConfiguration(Environment env, CacheManager cacheManager) {
this.env = env;
this.cacheManager = cacheManager;
}
@Bean
public SpringLiquibase liquibase(@Qualifier("taskExecutor") TaskExecutor taskExecutor,
DataSource dataSource, LiquibaseProperties liquibaseProperties) {
// Use liquibase.integration.spring.SpringLiquibase if you don't want Liquibase to start asynchronously
SpringLiquibase liquibase = new AsyncSpringLiquibase(taskExecutor, env);
liquibase.setDataSource(dataSource);
liquibase.setChangeLog("classpath:config/liquibase/master.xml");
liquibase.setContexts(liquibaseProperties.getContexts());
liquibase.setDefaultSchema(liquibaseProperties.getDefaultSchema());
liquibase.setDropFirst(liquibaseProperties.isDropFirst());
liquibase.setChangeLogParameters(liquibaseProperties.getParameters());
if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_NO_LIQUIBASE)) {
liquibase.setShouldRun(false);
} else {
liquibase.setShouldRun(liquibaseProperties.isEnabled());
log.debug("Configuring Liquibase");
}
return liquibase;
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
6767bee591aa9d1d8ef865d48d7a7b85113512e8
|
b6e99b0346572b7def0e9cdd1b03990beb99e26f
|
/src/gcom/gui/util/tabelaauxiliar/faixa/InserirTabelaAuxiliarFaixaAction.java
|
d724193313298084c56f6210352f91b5a8442db7
|
[] |
no_license
|
prodigasistemas/gsan
|
ad64782c7bc991329ce5f0bf5491c810e9487d6b
|
bfbf7ad298c3c9646bdf5d9c791e62d7366499c1
|
refs/heads/master
| 2023-08-31T10:47:21.784105
| 2023-08-23T17:53:24
| 2023-08-23T17:53:24
| 14,600,520
| 19
| 20
| null | 2015-07-29T19:39:10
| 2013-11-21T21:24:16
|
Java
|
ISO-8859-1
|
Java
| false
| false
| 3,362
|
java
|
package gcom.gui.util.tabelaauxiliar.faixa;
import gcom.fachada.Fachada;
import gcom.gui.GcomAction;
import gcom.util.ErroRepositorioException;
import gcom.util.tabelaauxiliar.faixa.TabelaAuxiliarFaixa;
import java.rmi.RemoteException;
import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
/**
* < <Descrição da Classe>>
*
* @author Administrador
*/
public class InserirTabelaAuxiliarFaixaAction extends GcomAction {
/**
* < <Descrição do método>>
*
* @param actionMapping
* Descrição do parâmetro
* @param actionForm
* Descrição do parâmetro
* @param httpServletRequest
* Descrição do parâmetro
* @param httpServletResponse
* Descrição do parâmetro
* @return Descrição do retorno
* @exception RemoteException
* Descrição da exceção
* @exception ErroRepositorioException
* Descrição da exceção
*/
public ActionForward execute(ActionMapping actionMapping,
ActionForm actionForm, HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse) throws RemoteException,
ErroRepositorioException {
ActionForward retorno = actionMapping.findForward("telaSucesso");
// Prepara o retorno da Ação
HttpSession sessao = httpServletRequest.getSession(false);
//Obtém o action form
TabelaAuxiliarFaixaActionForm tabelaAuxiliarFaixaActionForm = (TabelaAuxiliarFaixaActionForm) actionForm;
//Obtém a fachada
Fachada fachada = Fachada.getInstancia();
//Recebe o objeto TabelaAuxiliarFaixa
TabelaAuxiliarFaixa tabelaAuxiliarFaixa = (TabelaAuxiliarFaixa) sessao
.getAttribute("tabelaAuxiliarFaixa");
//Seta faixa inicial informada
tabelaAuxiliarFaixa.setFaixaInicial(tabelaAuxiliarFaixaActionForm
.getFaixaInicial());
//Seta faixa final faixa informada
tabelaAuxiliarFaixa.setFaixaFinal(tabelaAuxiliarFaixaActionForm
.getFaixaFinal());
//Seta a data atual
tabelaAuxiliarFaixa.setUltimaAlteracao(new Date());
//Insere objeto
fachada.inserirTabelaAuxiliar(tabelaAuxiliarFaixa);
//Monta a página de sucesso
if (retorno.getName().equalsIgnoreCase("telaSucesso")) {
montarPaginaSucesso(
httpServletRequest,
"Dados incluídos com sucesso",
"Inserir outro(a) "
+ ((String) sessao.getAttribute("titulo")),
((String) sessao
.getAttribute("funcionalidadeTabelaAuxiliarFaixaInserir")));
}
//Remove os objetos da sessão
sessao.removeAttribute("funcionalidadeTabelaAuxiliarFaixaInserir");
sessao.removeAttribute("titulo");
sessao.removeAttribute("tabelaAuxiliarFaixa");
return retorno;
}
}
|
[
"piagodinho@gmail.com"
] |
piagodinho@gmail.com
|
9ef131d2489acf3f1a6a13d3b991074d9aaecabe
|
fb91f96c6deb06ed1289231bf9c96ce64ce4f57a
|
/src/main/java/pl/asie/charset/module/crafting/cauldron/api/ICauldronRecipeViewable.java
|
ebe1d36576e4c16e9b11efbb1152ab036460703a
|
[] |
no_license
|
CharsetMC/Charset
|
b314c044b618bc66be6b8ddd2f4326553c7efcfa
|
401e25a10399c19adf1ed893b94dd5867c07a1f0
|
refs/heads/1.12-stable
| 2022-09-22T19:59:22.751395
| 2022-08-31T20:56:19
| 2022-08-31T20:56:19
| 47,063,120
| 59
| 54
| null | 2019-07-21T07:11:19
| 2015-11-29T12:43:17
|
Java
|
UTF-8
|
Java
| false
| false
| 1,295
|
java
|
/*
* Copyright (c) 2015, 2016, 2017, 2018, 2019, 2020 Adrian Siekierka
*
* This file is part of Charset.
*
* Charset 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 3 of the License, or
* (at your option) any later version.
*
* Charset 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 Charset. If not, see <http://www.gnu.org/licenses/>.
*/
package pl.asie.charset.module.crafting.cauldron.api;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
import java.util.Collection;
public interface ICauldronRecipeViewable extends ICauldronRecipe {
Collection<CauldronContents> getRecipesForInputItem(ItemStack stack);
Collection<CauldronContents> getRecipesForInputFluid(FluidStack stack);
Collection<CauldronContents> getRecipesForOutputItem(ItemStack stack);
Collection<CauldronContents> getRecipesForOutputFluid(FluidStack stack);
}
|
[
"kontakt@asie.pl"
] |
kontakt@asie.pl
|
37ad55ad2c9b24d4a51257c3aa2b8559e73f5043
|
94c91122c6231ce92d1c75e2a174b555527bdf7e
|
/test-utilities/src/main/java/com/taskadapter/connector/testlib/FieldRowBuilder.java
|
54944fe8c0d75855e56063a09d52c286219e0033
|
[] |
no_license
|
thecodemonkeyau/taskadapter
|
16c28f9599e36ff8b7538c326a57e87a8b75a14c
|
d871e377c6c1783f35c419edeb318ad3c965b801
|
refs/heads/master
| 2023-07-08T20:35:20.213934
| 2021-08-08T17:30:44
| 2021-08-08T17:30:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 571
|
java
|
package com.taskadapter.connector.testlib;
import com.taskadapter.connector.FieldRow;
import com.taskadapter.model.Field;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
public class FieldRowBuilder {
public static List<FieldRow<?>> rows(List<Field<?>> fields) {
return fields.stream()
.map(FieldRowBuilder::build)
.collect(Collectors.toList());
}
private static <T> FieldRow<T> build(Field<T> f) {
return new FieldRow<T>(Optional.of(f), Optional.of(f), null);
}
}
|
[
"alskor@gmail.com"
] |
alskor@gmail.com
|
a8857ccb5ffa43c64d98451ceb16b584ac90bd42
|
c501583b9b998984eb52229b9d3c38cd8f93d86e
|
/src/main/java/com/tencentcloudapi/scf/v20180416/models/Variable.java
|
2b7f0e822f2b2c778555c97a59fec8d8244df95d
|
[
"Apache-2.0"
] |
permissive
|
CoolLittle/tencentcloud-sdk-java
|
20cf19d0648edda1a92d90e55b023a7c9774ffd4
|
9ed1f3da70a1e01df441ec23ca56973dc8c7f634
|
refs/heads/master
| 2020-03-25T20:36:42.081853
| 2018-08-06T03:11:32
| 2018-08-06T03:11:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,309
|
java
|
package com.tencentcloudapi.scf.v20180416.models;
import com.tencentcloudapi.common.AbstractModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class Variable extends AbstractModel{
/**
* 变量的名称
*/
@SerializedName("Key")
@Expose
private String Key;
/**
* 变量的值
*/
@SerializedName("Value")
@Expose
private String Value;
/**
* 获取变量的名称
* @return Key 变量的名称
*/
public String getKey() {
return this.Key;
}
/**
* 设置变量的名称
* @param Key 变量的名称
*/
public void setKey(String Key) {
this.Key = Key;
}
/**
* 获取变量的值
* @return Value 变量的值
*/
public String getValue() {
return this.Value;
}
/**
* 设置变量的值
* @param Value 变量的值
*/
public void setValue(String Value) {
this.Value = Value;
}
/**
* 内部实现,用户禁止调用
*/
public void toMap(HashMap<String, String> map, String prefix) {
this.setParamSimple(map, prefix + "Key", this.Key);
this.setParamSimple(map, prefix + "Value", this.Value);
}
}
|
[
"tencentcloudapi@tencent.com"
] |
tencentcloudapi@tencent.com
|
a31d6814e913e34d9cfc34770f221e5e7729cd18
|
ba339901ce90d405c61084a3a8289b0114806c74
|
/src/main/java/com/mycompagny/myapp/config/DateTimeFormatConfiguration.java
|
e1c0bead2cf6c85b3cede19c44b068cc91f135e7
|
[] |
no_license
|
jeromedeparis13/devops
|
a87c44eda2fc20d9dec7974234a37351f3df30b8
|
ab38261a309c6b4c3ffa5265d45e548c382a81f4
|
refs/heads/master
| 2020-03-28T17:12:52.010493
| 2018-09-14T13:28:58
| 2018-09-14T13:28:58
| 148,768,444
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 647
|
java
|
package com.mycompagny.myapp.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.format.FormatterRegistry;
import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class DateTimeFormatConfiguration implements WebMvcConfigurer {
@Override
public void addFormatters(FormatterRegistry registry) {
DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
registrar.setUseIsoFormat(true);
registrar.registerFormatters(registry);
}
}
|
[
"vagrant@vagrant.vm"
] |
vagrant@vagrant.vm
|
0942ab296bb166c5ae254a3d7f2b2c042192d894
|
b86379285f58a93cfd8e72b8ba09874c4719f70a
|
/src/main/java/org/anarres/jdiagnostics/DefaultQuery.java
|
ca8a5d54a0099981dac753c101856826ab0a19b9
|
[
"Apache-2.0"
] |
permissive
|
shevek/jdiagnostics
|
b8be846e48c1160386b95a6c43145c5ce71965ad
|
e49365bb9ddddb63db021c73443e65423d5209f0
|
refs/heads/master
| 2020-12-30T10:10:57.762962
| 2020-11-11T08:26:18
| 2020-11-11T08:26:18
| 15,791,163
| 4
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,981
|
java
|
/**
* Copyright 2014 Shevek
*
* 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.
*/
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package org.anarres.jdiagnostics;
/**
* A composite of most other useful queries, and a good starting point.
*
* @see Query
* @author shevek
*/
public class DefaultQuery extends CompositeQuery {
public DefaultQuery() {
add(new SystemPropertiesQuery());
add(new SAXQuery());
add(new DOMQuery());
add(new JAXPQuery());
add(new ClassPathQuery());
add(new XSLTQuery());
add(new EnvironmentQuery());
add(new AntQuery());
add(new XalanQuery());
add(new XercesQuery());
add(new TmpDirQuery());
// add(new ProcessEnvironmentQuery()); // This can expose private data. We will exclude it by default.
add(new ProductMetadataQuery());
add(new ClassLoaderQuery("system", String.class.getClassLoader()));
add(new ClassLoaderQuery("threadcontext", Thread.currentThread().getContextClassLoader()));
add(new ClassLoaderQuery("jdiagnostics", getClass().getClassLoader()));
}
public DefaultQuery(Throwable t) {
this();
add(new ThrowableQuery(t));
}
public static void main(String[] args) {
System.out.println(new DefaultQuery().call());
}
}
|
[
"shevek@anarres.org"
] |
shevek@anarres.org
|
716b2a5398f5c3a7105eb625e8a0f2fa4861c571
|
004ffa079df0e0eb2811de0013edf0bd567e88b3
|
/src/test/java/dev/tunks/taxitrips/service/TaxiTripServiceTest.java
|
fee3a7bb879f523293cc9fbc05f82d21ef2d5647
|
[] |
no_license
|
tunks/mcse-nyc-trips-service
|
b5124d64bae7a0d85eee98eb90197ce50a8ac436
|
4aaa4fff82eee9246b3994f035588e0ee02828f8
|
refs/heads/main
| 2023-03-04T06:31:04.210492
| 2021-02-15T04:13:16
| 2021-02-15T04:13:16
| 338,922,498
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,167
|
java
|
package dev.tunks.taxitrips.service;
import static org.junit.jupiter.api.Assertions.*;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import dev.tunks.taxitrips.TaxitripServiceApplication;
import dev.tunks.taxitrips.model.TaxiTrip;
import dev.tunks.taxitrips.model.TaxiType;
import dev.tunks.taxitrips.model.TripMetricsEntity;
import dev.tunks.taxitrips.queries.QueryFactory.MetricsName;
import dev.tunks.taxitrips.queries.QueryParams;
import dev.tunks.taxitrips.util.DataUtil;
import static dev.tunks.taxitrips.utils.DummyDataUtil.*;
@SpringBootTest(classes = {TaxitripServiceApplication.class})
public class TaxiTripServiceTest {
@Autowired
private TaxiTripService taxiTripService;
@Autowired
private MongoTemplate mongoTemplate;
private String pickupLocationId;
private String dropoffLocationId;
private List<TaxiTrip> trips;
@BeforeEach
public void setUp() throws Exception {
pickupLocationId = "4000";
dropoffLocationId = "4001";
trips = saveTrips(mongoTemplate,pickupLocationId, dropoffLocationId, 10);
}
@AfterEach
public void cleanup() throws Exception {
Criteria criteria = Criteria.where(DataUtil.PICKUP_LOCATION_ID).is(pickupLocationId)
.and(DataUtil.DROPOFF_LOCATION_ID).is(dropoffLocationId);
mongoTemplate.remove( new Query(criteria), TaxiTrip.class);
}
@Test
public void findAllPageable() {
Page<TaxiTrip> result = taxiTripService.findAll(PageRequest.of(0,Integer.MAX_VALUE));
assertEquals(trips.size(),result.getNumberOfElements());
}
/***
* Query with invalid query parameters and expected results are empty
*/
@Test
public void findAllWithInvalidQueryParams() {
QueryParams queryParams = QueryParams.newQueryParams().setPickupLocationId("00001").build();
Page<TaxiTrip> result = taxiTripService.findAll(queryParams, PageRequest.of(0, 10));
assertEquals(0, result.getNumberOfElements());
}
/***
* Query with valid zone location query parameters and expected results are not empty
*/
@Test
public void findAllWithLocationQueryParams() {
//Query parameters with pickupLocationId and the expected result is not empty
QueryParams queryParams = QueryParams.newQueryParams().setPickupLocationId(pickupLocationId).build();
Page<TaxiTrip> result = taxiTripService.findAll(queryParams, PageRequest.of(0, 10));
assertEquals(10, result.getNumberOfElements());
//Query parameters with pickupLocationId,dropoffLocationId and the expected result is not empty
queryParams = QueryParams.newQueryParams().setPickupLocationId(pickupLocationId)
.setDropoffLocationId(dropoffLocationId)
.build();
result = taxiTripService.findAll(queryParams, PageRequest.of(0, 10));
assertEquals(10, result.getNumberOfElements());
}
/***
* Query with date query parameters and expected results are not empty
*/
@Test
public void findAllWithDateQueryParams() {
//Query parameters with pickupDate and the expected result is not empty
Date pickupDate = toDate(LocalDateTime.now().minusMinutes(60));
QueryParams queryParams = QueryParams.newQueryParams().setPickupDate(pickupDate).build();
Page<TaxiTrip> result = taxiTripService.findAll(queryParams, PageRequest.of(0, 10));
assertEquals(10, result.getNumberOfElements());
//Query parameters with pickupDate,dropoffDate and the expected result is not empty
Date dropoffDate = toDate(LocalDateTime.now());
queryParams = QueryParams.newQueryParams().setPickupDate(pickupDate)
.setDropoffDate(dropoffDate).build();
result = taxiTripService.findAll(queryParams, PageRequest.of(0, 10));
assertEquals(10, result.getNumberOfElements());
//Query parameters with future pickupDate and the expected result is empty (zero)
pickupDate = toDate(LocalDateTime.now().plusDays(1));
queryParams = QueryParams.newQueryParams().setPickupDate(pickupDate).build();
result = taxiTripService.findAll(queryParams, PageRequest.of(0, 10));
assertEquals(0, result.getNumberOfElements());
}
/***
* Query with taxi type (green,yellow, rhi) query parameters and expected results are not empty
*/
@Test
public void findAllWithTaxiTypeQueryParams() {
//Query parameters with 'GREEN' taxi type and the expected result is not empty
QueryParams queryParams = QueryParams.newQueryParams().setTaxiType(TaxiType.GREEN).build();
Page<TaxiTrip> result = taxiTripService.findAll(queryParams, PageRequest.of(0, 10));
assertEquals(10, result.getNumberOfElements());
//Query parameters with 'YELLOW' taxi type and the expected result is not empty
queryParams = QueryParams.newQueryParams().setTaxiType(TaxiType.YELLOW).build();
result = taxiTripService.findAll(queryParams, PageRequest.of(0, 10));
assertEquals(10, result.getNumberOfElements());
//Query parameters with 'RHV' taxi type and the expected result is not empty
queryParams = QueryParams.newQueryParams().setTaxiType(TaxiType.RHV).build();
result = taxiTripService.findAll(queryParams, PageRequest.of(0, 10));
assertEquals(10, result.getNumberOfElements());
}
/***
*
* Query trip metrics with name query parameter
*/
@Test
public void testGetTripMetrics() {
QueryParams queryParams = QueryParams.newQueryParams()
.setPickupLocationId(pickupLocationId)
.setDropoffLocationId(dropoffLocationId).build();
List<TripMetricsEntity> result = taxiTripService.getTripMetrics(MetricsName.COST, queryParams);
//expected 3 groups (green, yellow , rhv)
assertEquals(3,result.size());
}
}
|
[
"ebrimatunkara@gmail.com"
] |
ebrimatunkara@gmail.com
|
30036786b0800e7e3f6e36413835bd11b079e089
|
f864e3dca27b9545cf9ce8aa1e67a422b8feb08b
|
/main/src/jp/hishidama/eclipse_plugin/dmdl_editor/extension/DirectioGenerator.java
|
f6a8da6b26c45640df0e911977a7056ec2a939b2
|
[] |
no_license
|
hishidama/dmdl-editor-plugin
|
2692181cd4565f660d46fec44902f3374adf90ef
|
86533c781de491dc9a6bcf2d4a6a2f38b0f6f2c0
|
refs/heads/master
| 2021-01-18T14:38:45.188221
| 2013-09-07T02:45:15
| 2013-09-07T02:45:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,613
|
java
|
package jp.hishidama.eclipse_plugin.dmdl_editor.extension;
import java.text.MessageFormat;
/**
* Direct I/OのImporter/Exporterクラスのソースを生成する.
*
* @since 2013.07.15
*/
public abstract class DirectioGenerator extends DMDLImporterExporterGenerator {
public static final String GROUP_DIRECTIO = "@directio";
public static final String GROUP_DIRECTIO_EXPORTER = "@directio Exporter";
public static final String KEY_BASE_PATH = "directio.basePath";
public static final String KEY_RESOURCE_PATTERN = "directio.resourcePattern";
public static final String KEY_ORDER = "directio.order";
public static final String KEY_DELETE_PATTERN = "directio.deletePattern";
// フィールド定義用
/**
* DirectIO CSV項目の追加.
*/
protected final void addFieldDirectioCsv() {
addFieldDirectio("csv");
}
/**
* DirectIO SequenceFile項目の追加.
*
* @since 2013.08.03
*/
protected final void addFieldDirectioSeqfile() {
addFieldDirectio("seq");
}
protected final void addFieldDirectio(String ext) {
addTextField(GROUP_DIRECTIO, KEY_BASE_PATH, true, "getBasePath()", "ベースパス", "論理パス\n"
+ "「example」と入力すると\nreturn \"example\";\nになります。");
String tip = MessageFormat.format("ファイル名のパターン\n" + "「data.{0}」と入力すると\nreturn \"data.{0}\";\nになります。", ext);
addTextField(GROUP_DIRECTIO, KEY_RESOURCE_PATTERN, true, "getResourcePattern()", "リソースパターン", tip);
}
/**
* DiorectIO CSV Exporter項目の追加.
*/
protected final void addFieldDirectioCsvExporter() {
addFieldDirectioExporter("csv");
}
/**
* DiorectIO SequenceFile Exporter項目の追加.
*
* @since 2013.08.03
*/
protected final void addFieldDirectioSeqfileExporter() {
addFieldDirectioExporter("seq");
}
protected final void addFieldDirectioExporter(String ext) {
addTextField(GROUP_DIRECTIO_EXPORTER, KEY_ORDER, false, "getOrder()", "ソート順", "出力ファイルのソート用カラム名(カンマ区切り)\n"
+ "「+id1, -id2」と入力すると\nreturn Arrays.asList(\"+id1\", \"-id2\");\nになります。");
String tip = MessageFormat.format("出力を行う前に削除するファイル名パターン(カンマ区切り)\n"
+ "「data*.{0}, test*.{0}」と入力すると\nreturn Arrays.asList(\"data*.{0}\", \"test*.{0}\");\nになります。", ext);
addTextField(GROUP_DIRECTIO_EXPORTER, KEY_DELETE_PATTERN, false, "getDeletePatterns()", "削除パターン", tip);
}
// メソッド生成用
/**
* getBasePath()メソッド生成.
*
* @param sb
* 生成先
*/
protected final void appendMethodBasePath(StringBuilder sb) {
appendMethod(sb, "getBasePath", getValue(KEY_BASE_PATH));
}
/**
* getResourcePattern()メソッド生成.
*
* @param sb
* 生成先
*/
protected final void appendMethodResourcePattern(StringBuilder sb) {
appendMethod(sb, "getResourcePattern", getValue(KEY_RESOURCE_PATTERN));
}
/**
* getOrder()メソッド生成.
*
* @param sb
* 生成先
*/
protected final void appendMethodOrder(StringBuilder sb) {
appendMethodList(sb, "getOrder", getValue(KEY_ORDER));
}
/**
* getDeletePatterns()メソッド生成.
*
* @param sb
* 生成先
*/
protected final void appendMethodDeletePatterns(StringBuilder sb) {
appendMethodList(sb, "getDeletePatterns", getValue(KEY_DELETE_PATTERN));
}
}
|
[
"hishi.dama@asahi.email.ne.jp"
] |
hishi.dama@asahi.email.ne.jp
|
15950ff517ea7b00e6b28aa4955fb1cb88ddd3e9
|
73458087c9a504dedc5acd84ecd63db5dfcd5ca1
|
/src/com/estrongs/fs/impl/usb/fs/ntfs/f.java
|
696652bd09b569508cd3251147fc813a5cddf264
|
[] |
no_license
|
jtap60/com.estr
|
99ff2a6dd07b02b41a9cc3c1d28bb6545e68fb27
|
8b70bf2da8b24c7cef5973744e6054ef972fc745
|
refs/heads/master
| 2020-04-14T02:12:20.424436
| 2018-12-30T10:56:45
| 2018-12-30T10:56:45
| 163,578,360
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 334
|
java
|
package com.estrongs.fs.impl.usb.fs.ntfs;
public abstract interface f
{
public abstract int a(long paramLong, byte[] paramArrayOfByte, int paramInt1, int paramInt2, int paramInt3, ab paramab);
}
/* Location:
* Qualified Name: com.estrongs.fs.impl.usb.fs.ntfs.f
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
cf82d51d7a3fa38ef2f4678b1677126d2dcaa47d
|
e0fd595a98ca7a23ecf90f4c08801bf7e0361bf2
|
/results_without_immortals/netbeans/antcraziness/ContextManagerTest/ContextManagerTest_2.java
|
631326b2e70044a0cb540979615524c7a60e67d9
|
[] |
no_license
|
amchristi/AdFL
|
690699a1c3d0d0e84e412b79826aa1b51b572979
|
40c879e7fe5f87afbf4abc29e442a6e37b1e6541
|
refs/heads/master
| 2021-12-15T11:43:07.539575
| 2019-07-18T05:56:21
| 2019-07-18T05:56:21
| 176,834,877
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,479
|
java
|
package org.openide.awt;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.lang.ref.WeakReference;
import javax.swing.Action;
import org.netbeans.junit.NbTestCase;
import org.netbeans.junit.RandomlyFails;
import org.openide.util.ContextAwareAction;
import org.openide.util.Lookup;
import org.openide.util.lookup.AbstractLookup;
import org.openide.util.lookup.InstanceContent;
/**
* @author Jaroslav Tulach <jtulach@netbeans.org>
*/
public class ContextManagerTest extends NbTestCase {
private AbstractLookup lkp;
private ContextManager cm;
public ContextManagerTest(String name) {
super(name);
}
private static class L implements PropertyChangeListener {
int cnt;
@Override
public void propertyChange(PropertyChangeEvent evt) {
cnt++;
}
}
@ActionID(category = "cat", id = "survive")
@ActionRegistration(displayName = "Survive", surviveFocusChange = true)
public static final class Survival implements ActionListener {
static int value;
private Integer context;
public Survival(Integer context) {
this.context = context;
}
@Override
public void actionPerformed(ActionEvent ae) {
value += context;
}
}
@Override
protected boolean runInEQ() {
return true;
}
public void testListenerGCed() throws Exception {
InstanceContent ic = new InstanceContent();
lkp = new AbstractLookup(ic);
Lookup.Result<Integer> lookupResult = lkp.lookupResult(Integer.class);
Action action = ((ContextAwareAction) Actions.forID("cat", "survive")).createContextAwareInstance(lkp);
Action fallbackAction = ((GeneralAction.DelegateAction) action).fallback;
WeakReference<Action> fallbackActionRef = new WeakReference<Action>(fallbackAction);
WeakReference<Action> clone = new WeakReference<Action>(action);
cm = ContextManager.findManager(lkp, true);
WeakReference lsetRef = new WeakReference<Object>(cm.findLSet(Integer.class));
action = null;
assertGC("Action should be GCed", clone);
fallbackAction = null;
assertGC("Fallback action should be GCed", fallbackActionRef);
assertGC("Action LSet Should be GCed", lsetRef);
lookupResult.allInstances();
}
}
|
[
"amchristi@bitbucket.org"
] |
amchristi@bitbucket.org
|
9033fa7d4de0275f6f335462be5b8f7bfa292f91
|
60f7b508bed2dffa32cff6c3f50d6dd6b0f25507
|
/user-center/src/main/java/com/boyu/erp/platform/usercenter/service/warehouse/WarehUgDtlService.java
|
b7097e62e1352464bf9882e1a2a65c8c6f5aae27
|
[] |
no_license
|
clfbai/heoll
|
8cca5d62eb8bce47d0882b07fb328baf508612b5
|
69845c4e78437bb0aea79a32d6a24c2fc299f388
|
refs/heads/master
| 2022-09-29T09:03:58.700436
| 2019-12-21T05:06:43
| 2019-12-21T05:06:43
| 165,189,003
| 0
| 0
| null | 2022-09-01T23:17:47
| 2019-01-11T06:08:00
|
Java
|
UTF-8
|
Java
| false
| false
| 394
|
java
|
package com.boyu.erp.platform.usercenter.service.warehouse;
import java.util.List;
/**
* 仓库分组明细接口
* @author HHe
* @date 2019/10/13 11:34
*/
public interface WarehUgDtlService {
/**
* 根据仓库分组集合查询出所有相关的仓库Id
* @author HHe
* @date 2019/10/13 11:34
*/
List<Long> queryWarehIdsByWarehUgIds(List<Long> warehUgIds);
}
|
[
"https://gitee.com/onecaolf/mytext.git"
] |
https://gitee.com/onecaolf/mytext.git
|
fd8ddc0176c02165ab55a7ca0088fe95e133c442
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-new-fitness/results/XWIKI-13546-3-10-Single_Objective_GGA-IntegrationSingleObjective-BasicBlockCoverage/org/xwiki/model/reference/EntityReference_ESTest_scaffolding.java
|
1fd8f9525d21f324236fdb365b25b47e8a1dc034
|
[
"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
| 3,078
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sat May 16 13:42:41 UTC 2020
*/
package org.xwiki.model.reference;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class EntityReference_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.xwiki.model.reference.EntityReference";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(EntityReference_ESTest_scaffolding.class.getClassLoader() ,
"org.xwiki.model.internal.reference.LocalizedStringEntityReferenceSerializer",
"org.xwiki.model.internal.reference.StringReferenceSeparators$3",
"org.xwiki.model.internal.reference.AbstractStringEntityReferenceSerializer",
"org.xwiki.stability.Unstable",
"org.xwiki.model.internal.reference.StringReferenceSeparators$4",
"org.xwiki.component.annotation.Component",
"org.xwiki.model.reference.EntityReference",
"org.xwiki.model.internal.reference.StringReferenceSeparators",
"org.xwiki.model.internal.reference.StringReferenceSeparators$1",
"org.xwiki.text.StringUtils",
"org.xwiki.model.internal.reference.StringReferenceSeparators$2",
"org.apache.commons.lang3.StringUtils",
"org.xwiki.model.internal.reference.DefaultStringEntityReferenceSerializer",
"org.apache.commons.lang3.Validate",
"org.xwiki.model.reference.DocumentReference",
"org.xwiki.model.reference.LocalDocumentReference",
"org.apache.commons.lang3.builder.Builder",
"org.apache.commons.lang3.builder.HashCodeBuilder",
"org.xwiki.model.EntityType",
"org.xwiki.model.reference.EntityReferenceSerializer"
);
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
17fc926bdd3f985c62ea499ba0bf8cfb83b8b99e
|
599852be70da03a5c9b76bb9ee3928c0d56e7727
|
/MyBox/src/main/java/mara/mybox/controller/SecurityCertificatesBypassController.java
|
b63d9dac1f34ba3782fcc190197c4dc2a384034b
|
[
"Apache-2.0"
] |
permissive
|
FazliMolaJan/MyBox
|
f2c98b0cc066b0ab459a4a962240e028e9d67d2d
|
59630c1f0eba865c8920651abf8b73c6e9fd036e
|
refs/heads/master
| 2020-12-28T15:40:57.161392
| 2020-01-02T16:21:36
| 2020-01-02T16:21:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,324
|
java
|
package mara.mybox.controller;
import java.util.List;
import java.util.Optional;
import javafx.fxml.FXML;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TextInputDialog;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.stage.Stage;
import mara.mybox.data.CertificateBypass;
import mara.mybox.db.TableBrowserBypassSSL;
import mara.mybox.fxml.TableDateCell;
import mara.mybox.value.AppVariables;
import static mara.mybox.value.AppVariables.logger;
import static mara.mybox.value.AppVariables.message;
/**
* @Author Mara
* @CreateDate 2019-12-1
* @License Apache License Version 2.0
*/
public class SecurityCertificatesBypassController extends TableController<CertificateBypass> {
@FXML
protected TableColumn<CertificateBypass, String> hostColumn;
@FXML
protected TableColumn<CertificateBypass, Long> timeColumn;
public SecurityCertificatesBypassController() {
baseTitle = AppVariables.message("SSLVerificationBypassList");
}
@Override
protected void initColumns() {
try {
hostColumn.setCellValueFactory(new PropertyValueFactory<>("host"));
timeColumn.setCellValueFactory(new PropertyValueFactory<>("createTime"));
timeColumn.setCellFactory(new TableDateCell());
} catch (Exception e) {
logger.error(e.toString());
}
}
@Override
public void load() {
tableData.clear();
tableData.addAll(TableBrowserBypassSSL.read());
checkSelected();
}
@Override
protected boolean deleteSelectedData() {
List<CertificateBypass> selected = tableView.getSelectionModel().getSelectedItems();
return TableBrowserBypassSSL.delete(selected);
}
@Override
protected boolean clearData() {
return new TableBrowserBypassSSL().clear();
}
@FXML
@Override
public void addAction() {
try {
TextInputDialog dialog = new TextInputDialog("docs.oracle.com");
dialog.setTitle(message("SSLVerificationByPass"));
dialog.setHeaderText(message("InputAddress"));
dialog.setContentText("");
dialog.getEditor().setPrefWidth(500);
Stage stage = (Stage) dialog.getDialogPane().getScene().getWindow();
stage.setAlwaysOnTop(true);
stage.toFront();
Optional<String> result = dialog.showAndWait();
if (!result.isPresent()) {
return;
}
String address = result.get().trim();
if (address.isBlank()) {
return;
}
for (CertificateBypass p : tableData) {
if (p.getHost().equals(address)) {
return;
}
}
if (TableBrowserBypassSSL.write(address)) {
CertificateBypass newdata = TableBrowserBypassSSL.read(address);
if (newdata != null) {
tableData.add(newdata);
tableView.refresh();
popSuccessul();
} else {
popFailed();
}
} else {
popFailed();
}
} catch (Exception e) {
logger.error(e.toString());
}
}
}
|
[
"rshmara@sina.com"
] |
rshmara@sina.com
|
dd12b68c3a8d5802681e91dc48178b4732a72fde
|
d6ab38714f7a5f0dc6d7446ec20626f8f539406a
|
/backend/collecting/dsfj/Java/edited/netty.NettyServer.java
|
91d2f66a5c758c6914d3bd4c64572e2dc77707b6
|
[] |
no_license
|
haditabatabaei/webproject
|
8db7178affaca835b5d66daa7d47c28443b53c3d
|
86b3f253e894f4368a517711bbfbe257be0259fd
|
refs/heads/master
| 2020-04-10T09:26:25.819406
| 2018-12-08T12:21:52
| 2018-12-08T12:21:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,884
|
java
|
package com.alibaba.dubbo.remoting.transport.netty;
import com.alibaba.dubbo.common.Constants;
import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.common.logger.Logger;
import com.alibaba.dubbo.common.logger.LoggerFactory;
import com.alibaba.dubbo.common.utils.ExecutorUtil;
import com.alibaba.dubbo.common.utils.NamedThreadFactory;
import com.alibaba.dubbo.common.utils.NetUtils;
import com.alibaba.dubbo.remoting.Channel;
import com.alibaba.dubbo.remoting.ChannelHandler;
import com.alibaba.dubbo.remoting.RemotingException;
import com.alibaba.dubbo.remoting.Server;
import com.alibaba.dubbo.remoting.transport.AbstractServer;
import com.alibaba.dubbo.remoting.transport.dispatcher.ChannelHandlers;
import org.jboss.netty.bootstrap.ServerBootstrap;
import org.jboss.netty.channel.ChannelFactory;
import org.jboss.netty.channel.ChannelPipeline;
import org.jboss.netty.channel.ChannelPipelineFactory;
import org.jboss.netty.channel.Channels;
import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory;
import java.net.InetSocketAddress;
import java.util.Collection;
import java.util.HashSet;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class NettyServer extends AbstractServer implements Server {
private static final Logger logger = LoggerFactory.getLogger(NettyServer.class);
private Map<String, Channel> channels;
private ServerBootstrap bootstrap;
private org.jboss.netty.channel.Channel channel;
public NettyServer(URL url, ChannelHandler handler) throws RemotingException {
super(url, ChannelHandlers.wrap(handler, ExecutorUtil.setThreadName(url, SERVER_THREAD_POOL_NAME)));
}
@Override
protected void doOpen() throws Throwable {
NettyHelper.setNettyLoggerFactory();
ExecutorService boss = Executors.newCachedThreadPool(new NamedThreadFactory("NettyServerBoss", true));
ExecutorService worker = Executors.newCachedThreadPool(new NamedThreadFactory("NettyServerWorker", true));
ChannelFactory channelFactory = new NioServerSocketChannelFactory(boss, worker, getUrl().getPositiveParameter(Constants.IO_THREADS_KEY, Constants.DEFAULT_IO_THREADS));
bootstrap = new ServerBootstrap(channelFactory);
final NettyHandler nettyHandler = new NettyHandler(getUrl(), this);
channels = nettyHandler.getChannels();
bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
public ChannelPipeline getPipeline() {
NettyCodecAdapter adapter = new NettyCodecAdapter(getCodec(), getUrl(), NettyServer.this);
ChannelPipeline pipeline = Channels.pipeline();
pipeline.addLast("decoder", adapter.getDecoder());
pipeline.addLast("encoder", adapter.getEncoder());
pipeline.addLast("handler", nettyHandler);
return pipeline;
}
});
channel = bootstrap.bind(getBindAddress());
}
@Override
protected void doClose() throws Throwable {
try {
if (channel != null) {
channel.close();
}
} catch (Throwable e) {
logger.warn(e.getMessage(), e);
}
try {
Collection<com.alibaba.dubbo.remoting.Channel> channels = getChannels();
if (channels != null && !channels.isEmpty()) {
for (com.alibaba.dubbo.remoting.Channel channel : channels) {
try {
channel.close();
} catch (Throwable e) {
logger.warn(e.getMessage(), e);
}
}
}
} catch (Throwable e) {
logger.warn(e.getMessage(), e);
}
try {
if (bootstrap != null) {
bootstrap.releaseExternalResources();
}
} catch (Throwable e) {
logger.warn(e.getMessage(), e);
}
try {
if (channels != null) {
channels.clear();
}
} catch (Throwable e) {
logger.warn(e.getMessage(), e);
}
}
public Collection<Channel> getChannels() {
Collection<Channel> chs = new HashSet<Channel>();
for (Channel channel : this.channels.values()) {
if (channel.isConnected()) {
chs.add(channel);
} else {
channels.remove(NetUtils.toAddressString(channel.getRemoteAddress()));
}
}
return chs;
}
public Channel getChannel(InetSocketAddress remoteAddress) {
return channels.get(NetUtils.toAddressString(remoteAddress));
}
public boolean isBound() {
return channel.isBound();
}
}
|
[
"mahdisadeghzadeh24@gamil.com"
] |
mahdisadeghzadeh24@gamil.com
|
b80370eb30bc3f3f0cd2b51d707378d1abed81ab
|
028cbe18b4e5c347f664c592cbc7f56729b74060
|
/v2/persistence-impl/deployment/src/com/sun/persistence/spi/deployment/DeploymentUnitContext.java
|
fa3e28a2e8907689c2d53ed0ed1ba87eff800459
|
[] |
no_license
|
dmatej/Glassfish-SVN-Patched
|
8d355ff753b23a9a1bd9d7475fa4b2cfd3b40f9e
|
269e29ba90db6d9c38271f7acd2affcacf2416f1
|
refs/heads/master
| 2021-05-28T12:55:06.267463
| 2014-11-11T04:21:44
| 2014-11-11T04:21:44
| 23,610,469
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,965
|
java
|
/*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the "License"). You may not use this file except
* in compliance with the License.
*
* You can obtain a copy of the license at
* glassfish/bootstrap/legal/CDDLv1.0.txt or
* https://glassfish.dev.java.net/public/CDDLv1.0.html.
* See the License for the specific language governing
* permissions and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* HEADER in each file and include the License file at
* glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable,
* add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your
* own identifying information: Portions Copyright [yyyy]
* [name of copyright owner]
*/
/*
* DeploymentUnitContext.java
*
* Created on March 7, 2005, 9:20 AM
*/
package com.sun.persistence.spi.deployment;
import com.sun.enterprise.deployment.annotation.AnnotatedElementHandler;
import com.sun.persistence.api.deployment.DeploymentUnit;
/**
* This context holds the reference to deployment unit that is getting built by
* the annotation processor. We register handlers with annotation processor for
* annotation types of our interest. While parsing the classe in jar file, when
* annotation processor comes across such annotations, it calls back our
* annotation handler with an {@link com.sun.enterprise.deployment.annotation.AnnotationInfo}.
* This AnnotationInfo object encapsulates two things, viz: a) an {@link
* java.lang.reflect.AnnotatedElement} -- this provides the actual annotation
* encountered. b) a {@link DeploymentUnitContext} -- this provides the context
* for processing the annotation.
*
* @author Sanjeeb.Sahoo@Sun.COM
* @see AnnotatedElementHandler
*/
public interface DeploymentUnitContext extends AnnotatedElementHandler {
public DeploymentUnit getDeploymentUnit();
}
|
[
"kohsuke@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5"
] |
kohsuke@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5
|
fdff5d2db7d799e774c66b2c0a199f7195cac719
|
001eae35851e132f4d76c54fb668bd013c53dc60
|
/nosql/mapdb/src/test/java/org/mapdb/HeartbeatFileLockTest.java
|
a1e8ecaea91dd09a24beaaed8ece6d57b8d98dd4
|
[
"CC-PDDC",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
paulnguyen/data
|
b7f538bd4b4a24787c3c320e27535e3ce6558dd2
|
991f3930ff0b86cfc3afbe14cf94d983e1fcf77e
|
refs/heads/master
| 2021-12-14T09:50:30.339094
| 2021-12-04T03:17:10
| 2021-12-04T03:17:10
| 47,385,936
| 1
| 24
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,756
|
java
|
package org.mapdb;
import org.junit.Test;
import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.*;
import java.util.concurrent.atomic.AtomicInteger;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
public class HeartbeatFileLockTest {
@Test
public void testFutureModificationDate() throws Exception {
if(TT.scale()==0)
return;
File f = File.createTempFile("mapdbTest","madpb");
f.delete();
f.createNewFile();
f.setLastModified(System.currentTimeMillis() + 10000);
DataIO.HeartbeatFileLock lock = new DataIO.HeartbeatFileLock(f,CC.FILE_LOCK_HEARTBEAT);
lock.lock();
lock.unlock();
}
@Test
public void testSimple() throws IOException {
if(TT.scale()==0)
return;
File f = File.createTempFile("mapdbTest","madpb");
f.delete();
DataIO.HeartbeatFileLock lock1 = new DataIO.HeartbeatFileLock(f,CC.FILE_LOCK_HEARTBEAT);
DataIO.HeartbeatFileLock lock2 = new DataIO.HeartbeatFileLock(f,CC.FILE_LOCK_HEARTBEAT);
f.delete();
new DataIO.HeartbeatFileLock(f,CC.FILE_LOCK_HEARTBEAT);
lock1.lock();
//second lock should throw exception
try{
lock2.lock();
fail();
}catch(DBException.FileLocked e){
//ignored;
}
lock1.unlock();
lock2 = new DataIO.HeartbeatFileLock(f,CC.FILE_LOCK_HEARTBEAT);
lock2.lock();
lock2.unlock();
}
@Test
public void test_parallel() throws InterruptedException, IOException, ExecutionException {
int count = 16* TT.scale();
final long end = System.currentTimeMillis()+100000*count;
if(count==0)
return;
final File f = File.createTempFile("mapdbTest","mapdb");
f.delete();
final AtomicInteger counter = new AtomicInteger();
List<Future> futures = TT.fork(count, new Callable() {
@Override
public Object call() throws Exception {
while (System.currentTimeMillis() < end) {
DataIO.HeartbeatFileLock lock = new DataIO.HeartbeatFileLock(f, CC.FILE_LOCK_HEARTBEAT);
try {
lock.lock();
} catch (DBException.FileLocked e) {
continue;
}
assertEquals(1, counter.incrementAndGet());
lock.unlock();
assertEquals(0, counter.decrementAndGet());
}
return null;
}
});
//await termination
TT.forkAwait(futures);
}
}
|
[
"paul.nguyen@sjsu.edu"
] |
paul.nguyen@sjsu.edu
|
b51ab72b6fb06290f6e16d9ecb5d00bddb833fa8
|
d0e74ff6e8d37984cea892dfe8508e2b44de5446
|
/logistics-wms-city-1.1.3.44.5/logistics-wms-city-service/src/main/java/com/yougou/logistics/city/service/AuthorityRoleService.java
|
d5a62d171349cd2ce0576558f7d6b497ade9089c
|
[] |
no_license
|
heaven6059/wms
|
fb39f31968045ba7e0635a4416a405a226448b5a
|
5885711e188e8e5c136956956b794f2a2d2e2e81
|
refs/heads/master
| 2021-01-14T11:20:10.574341
| 2015-04-11T08:11:59
| 2015-04-11T08:11:59
| 29,462,213
| 1
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 879
|
java
|
package com.yougou.logistics.city.service;
import java.util.List;
import com.yougou.logistics.base.common.exception.ServiceException;
import com.yougou.logistics.base.service.BaseCrudService;
import com.yougou.logistics.city.common.model.AuthorityRole;
/**
* 权限业务逻辑处理
* @author wei.hj
*
*/
public interface AuthorityRoleService extends BaseCrudService{
int removeRole(Long roleId);
int addRole(AuthorityRole record) throws ServiceException;
AuthorityRole queryRoleById(Long roleId);
int updateRole(AuthorityRole record);
List<AuthorityRole> queryRoleList(AuthorityRole role);
int removeAuthorityRoleMenu(Long roleId);
int insertAuthorityRoleMenu( Long roleId, Long menuId);
List<AuthorityRole> queryMyRoleByUserId(Long userId);
List<AuthorityRole> queryNoMyRoleByUserId(Long userId);
}
|
[
"heaven6059@126.com"
] |
heaven6059@126.com
|
4ab5b2f85bdf6db709bf33130c48560eb5d7a6ba
|
ce2813f714d83602ee9b3b237c7304446ae741da
|
/src/LINTCODE8/LINTCODE747.java
|
e604a57b6ccd4ea0fe1a57363b1af5e2197bac94
|
[] |
no_license
|
tmhbatw/LINTCODEANSWER
|
bc54bb40a4826b0f9aa11aead4d99978a22e1ee8
|
7db879f075cde6e1b2fce86f6a3068e59f4e9b34
|
refs/heads/master
| 2021-12-13T16:38:05.780408
| 2021-10-09T16:50:59
| 2021-10-09T16:50:59
| 187,010,547
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,838
|
java
|
package LINTCODE8;
public class LINTCODE747 {
/*Description
* 设计一个自动咖啡机,加入一袋咖啡包,简单地煮一杯咖啡。
* 每个咖啡包包含有咖啡的配方,如加入了多少牛奶,或加入了多少糖
* 咖啡机可根据咖啡包提供的配方制作咖啡
* 只考虑两种成分成分:糖(sugar)和牛奶(milk)
* 普通咖啡的成本是2元。 加入一份牛奶或糖会使成本增加0.5元
* 考虑使用Decorator Design Pattern
* */
public class CoffeeMaker {
public Coffee makeCoffee(CoffeePack pack) {
Coffee result=new SimpleCoffee();
for(int i=0;i<pack.getNeededMilk();i++)
result=new WithMilk(result);
for(int i=0;i<pack.getNeededSugar();i++)
result=new WithSugar(result);
return result;
// write your code here
}
}
class CoffeePack {
private int neededMilk;
private int neededSugar;
public CoffeePack(int neededMilk, int neededSugar) {
this.neededMilk = neededMilk;
this.neededSugar = neededSugar;
}
public int getNeededMilk() {
return neededMilk;
}
public int getNeededSugar() {
return neededSugar;
}
}
interface Coffee {
public double getCost();
public String getIngredients();
}
class SimpleCoffee implements Coffee {
@Override
public double getCost() {
// TODO Auto-generated method stub
return 2;
}
@Override
public String getIngredients() {
// TODO Auto-generated method stub
return "Plain Coffee";
}
}
abstract class CoffeeDecorator implements Coffee {
protected final Coffee decoratedCoffee;
public CoffeeDecorator(Coffee coffee) {
this.decoratedCoffee = coffee;
}
public double getCost() {
return decoratedCoffee.getCost();
}
public String getIngredients() {
return decoratedCoffee.getIngredients();
}
}
class WithMilk extends CoffeeDecorator {
public WithMilk(Coffee coffee) {
super(coffee);
}
public double getCost() {
return super.getCost() + 0.5;
}
public String getIngredients() {
return super.getIngredients() + ", Milk";
}
}
class WithSugar extends CoffeeDecorator {
public WithSugar(Coffee coffee) {
super(coffee);
}
public double getCost() {
return super.getCost() + 0.5;
}
public String getIngredients() {
return super.getIngredients() + ", Sugar";
}
}
}
|
[
"1060226998@qq.com"
] |
1060226998@qq.com
|
69736fc4fce909cb5398887d2d64a1f52290401a
|
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
|
/program_data/JavaProgramData/104/1440.java
|
c831af4b7682c83588bad3411d38c6796098347e
|
[
"MIT"
] |
permissive
|
qiuchili/ggnn_graph_classification
|
c2090fefe11f8bf650e734442eb96996a54dc112
|
291ff02404555511b94a4f477c6974ebd62dcf44
|
refs/heads/master
| 2021-10-18T14:54:26.154367
| 2018-10-21T23:34:14
| 2018-10-21T23:34:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 774
|
java
|
package <missing>;
public class GlobalMembers
{
public static int[] a = new int[20];
public static int[] b = new int[20];
public static int i = 0;
public static void f(int x)
{
if (x == 1)
{
a[i] = x;
i++;
}
else
{
f(x / 2);
a[i] = x;
i++;
}
}
public static int Main()
{
int x;
int y;
int j;
int counter = 0;
int k;
x = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));
y = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));
f(y);
for (j = 0;j < 20;j++)
{
b[j] = a[j];
a[j] = 0;
}
i = 0;
f(x);
for (j = 0;j < 20;j++)
{
if (b[j] == a[j] && b[j] > 0)
{
counter++;
}
else
{
break;
}
}
System.out.print(a[counter - 1]);
System.out.print("\n");
return 0;
}
}
|
[
"y.yu@open.ac.uk"
] |
y.yu@open.ac.uk
|
c10bebec8ea33b5b5de0e1014e8d40e29a6fc7d9
|
d4d680301730e70f539675a989f0c5252a847811
|
/core/src/main/java/juzu/impl/bridge/spi/portlet/PortletActionBridge.java
|
d59176dcdabcf0c47fbc9a990a0a28ec1e2e260c
|
[] |
no_license
|
nscavell/juzu
|
90dd3fddb7b0d78ada178cd9136f0838cabacafa
|
1f59725ec16d9d1a061800f68265be2f153dcaac
|
refs/heads/master
| 2021-01-24T16:47:54.629944
| 2012-10-10T04:29:52
| 2012-10-10T04:41:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,579
|
java
|
/*
* Copyright (C) 2012 eXo Platform SAS.
*
* This 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 software 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 software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package juzu.impl.bridge.spi.portlet;
import juzu.Response;
import juzu.impl.plugin.application.ApplicationContext;
import juzu.impl.bridge.spi.ActionBridge;
import juzu.impl.plugin.controller.descriptor.MethodDescriptor;
import juzu.portlet.JuzuPortlet;
import juzu.request.ClientContext;
import juzu.request.Phase;
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.portlet.PortletMode;
import javax.portlet.PortletModeException;
import javax.portlet.WindowState;
import javax.portlet.WindowStateException;
import java.io.IOException;
import java.util.Map;
/** @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a> */
public class PortletActionBridge extends PortletRequestBridge<ActionRequest, ActionResponse> implements ActionBridge {
/** . */
private final PortletClientContext clientContext;
public PortletActionBridge(ApplicationContext application, ActionRequest request, ActionResponse response, boolean prod) {
super(application, request, response, prod);
//
this.clientContext = new PortletClientContext(request);
}
public ClientContext getClientContext() {
return clientContext;
}
@Override
protected Phase getPhase() {
return Phase.ACTION;
}
public void setResponse(Response response) throws IllegalStateException, IOException {
super.setResponse(response);
if (response instanceof Response.Update) {
Response.Update update = (Response.Update)response;
// Parameters
for (Map.Entry<String, String[]> entry : update.getParameters().entrySet()) {
super.resp.setRenderParameter(entry.getKey(), entry.getValue());
}
//
MethodDescriptor method = application.getDescriptor().getControllers().getMethodByHandle(update.getTarget());
// Method id
super.resp.setRenderParameter("juzu.op", method.getId());
//
PortletMode portletMode = update.getProperties().getValue(JuzuPortlet.PORTLET_MODE);
if (portletMode != null) {
try {
super.resp.setPortletMode(portletMode);
}
catch (PortletModeException e) {
throw new IllegalArgumentException(e);
}
}
//
WindowState windowState = update.getProperties().getValue(JuzuPortlet.WINDOW_STATE);
if (windowState != null) {
try {
super.resp.setWindowState(windowState);
}
catch (WindowStateException e) {
throw new IllegalArgumentException(e);
}
}
}
else if (response instanceof Response.Redirect) {
Response.Redirect redirect = (Response.Redirect)response;
super.resp.sendRedirect(redirect.getLocation());
} else {
throw new IllegalArgumentException();
}
}
}
|
[
"julien@julienviet.com"
] |
julien@julienviet.com
|
31f8b8f2f85f0bba8bae2bea078bacde5d4c9eaf
|
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
|
/genny_JavaWithoutLambdas/applicationModule/src/test/java/applicationModulepackageJava5/Foo117Test.java
|
f399c50c6769db64885e2974e31948eb4c8f6888
|
[] |
no_license
|
NikitaKozlov/generated-project-for-desugaring
|
0bc1443ab3ddc84cd289331c726761585766aea7
|
81506b3711004185070ca4bb9a93482b70011d36
|
refs/heads/master
| 2020-03-20T00:35:06.996525
| 2018-06-12T09:30:37
| 2018-06-12T09:30:37
| 137,049,317
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 481
|
java
|
package applicationModulepackageJava5;
import org.junit.Test;
public class Foo117Test {
@Test
public void testFoo0() {
new Foo117().foo0();
}
@Test
public void testFoo1() {
new Foo117().foo1();
}
@Test
public void testFoo2() {
new Foo117().foo2();
}
@Test
public void testFoo3() {
new Foo117().foo3();
}
@Test
public void testFoo4() {
new Foo117().foo4();
}
@Test
public void testFoo5() {
new Foo117().foo5();
}
}
|
[
"nikita.e.kozlov@gmail.com"
] |
nikita.e.kozlov@gmail.com
|
513c47e00d8cb1b3719097ba444ca013559c9d4b
|
71b491ba1bc32a8bb5713cbe481f93bd4abb2fa5
|
/app/src/main/java/com/datacomo/mc/spider/android/SquareManActivity.java
|
2b392e14422b4827545142f985307ceb548610fd
|
[] |
no_license
|
niucong/MC_Spider_Android_Client_V2.0
|
1d26f16cafd1a15eab5528a3e44a281c3b39add1
|
02fc0d39f02a435839cde60bccc046fc20b0cc50
|
refs/heads/master
| 2020-12-03T06:45:17.513496
| 2017-06-30T01:57:27
| 2017-06-30T01:57:27
| 95,725,302
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,563
|
java
|
package com.datacomo.mc.spider.android;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import com.datacomo.mc.spider.android.application.ScreenManager;
public class SquareManActivity extends BasicActionBarActivity {
// private static final String TAG = "SquareManActivity";
private LinearLayout phone, finds;
private String groupId;
@Override
protected void onDestroy() {
ScreenManager.getInctance().removeActivity(this);
super.onDestroy();
}
@Override
public void onCreate(Bundle savedInstanceState) {
ScreenManager.getInctance().pushActivity(this);
super.onCreate(savedInstanceState);
setContent(R.layout.layout_squareman);
// setTitle("邀请朋友", R.drawable.title_fanhui, null);
ab.setTitle("邀请朋友");
setView();
}
private void setView() {
groupId = getIntent().getStringExtra("groupId");
phone = (LinearLayout) findViewById(R.id.phone);
finds = (LinearLayout) findViewById(R.id.finds);
phone.setOnClickListener(this);
finds.setOnClickListener(this);
}
@Override
public void onClick(View v) {
super.onClick(v);
switch (v.getId()) {
case R.id.phone:
Intent intent = new Intent(SquareManActivity.this,
PhoneActivity.class);
intent.putExtra("groupId", groupId);
startActivity(intent);
finish();
break;
case R.id.finds:
Intent intent2 = new Intent(SquareManActivity.this,
FriendsIdActivity.class);
intent2.putExtra("groupId", groupId);
startActivity(intent2);
finish();
break;
}
}
}
|
[
"niucong@julong.cc"
] |
niucong@julong.cc
|
40bbed2e01377d55d66d5a08decae75dce5ca76c
|
a1de9cd2a3dee055e8baaf58515fbbb0b78776e3
|
/core/cas-server-core-services-api/src/main/java/org/apereo/cas/services/RegexRegisteredService.java
|
a5c1de62ada87e7418809eb6baa910682d35a854
|
[
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-free-unknown"
] |
permissive
|
bhubert/cas
|
21927acf9a5dd0123314002b7bce78c444bd2823
|
9d417ab06bd0e6c1e0a93c1d0783fb94e0f0e5a9
|
refs/heads/master
| 2023-03-05T09:40:22.302417
| 2021-02-22T18:08:49
| 2021-02-22T18:08:49
| 259,693,459
| 1
| 0
|
Apache-2.0
| 2020-04-28T16:33:37
| 2020-04-28T16:33:36
| null |
UTF-8
|
Java
| false
| false
| 1,925
|
java
|
package org.apereo.cas.services;
import org.apereo.cas.authentication.principal.Service;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.StringUtils;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
/**
* Mutable registered service that uses Java regular expressions for service matching.
* Matching is case insensitive, and is successful, if, and only if, the entire region
* sequence matches the pattern.
*
* @author Marvin S. Addison
* @author Misagh Moayyed
* @since 3.4
*/
@Entity
@DiscriminatorValue("regex")
@EqualsAndHashCode(callSuper = true)
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS)
public class RegexRegisteredService extends AbstractRegisteredService {
private static final long serialVersionUID = -8258660210826975771L;
@Override
public void setServiceId(final String id) {
this.serviceId = id;
}
@Override
public boolean matches(final Service service) {
return service != null && matches(service.getId());
}
@Override
public boolean matches(final String serviceId) {
configureMatchingStrategy();
return !StringUtils.isBlank(serviceId) && getMatchingStrategy().matches(this, serviceId);
}
@JsonIgnore
@Override
public String getFriendlyName() {
return "CAS Client";
}
/**
* Configure matching strategy.
* If the strategy is undefined, it will default to {@link FullRegexRegisteredServiceMatchingStrategy}.
*/
protected void configureMatchingStrategy() {
if (getMatchingStrategy() == null) {
setMatchingStrategy(new FullRegexRegisteredServiceMatchingStrategy());
}
}
@Override
protected AbstractRegisteredService newInstance() {
return new RegexRegisteredService();
}
}
|
[
"mm1844@gmail.com"
] |
mm1844@gmail.com
|
b9da0a41beec6703e614904863c8e33e7a336ce5
|
d6d19a25a5e66dc885662cdd66c416b427e4e5eb
|
/nineimagesetview/src/main/java/individual/leobert/uilib/nineimagesetview/OnItemImageClickListener.java
|
fe95dd5374a2bf784229c35331b9ad8d8a3fe8cb
|
[
"MIT"
] |
permissive
|
da-dadadada/UiLib
|
2724f3c58c9aed60a7c47f388987f619fc7849a0
|
89c579c9025414f4b741769eb61fe0125c980669
|
refs/heads/master
| 2020-04-10T00:01:24.868570
| 2017-07-05T06:34:43
| 2017-07-05T06:34:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 849
|
java
|
package individual.leobert.uilib.nineimagesetview;
import android.content.Context;
import android.widget.ImageView;
import java.util.List;
/**
* <p><b>Package:</b> individual.leobert.uilib.nineimagesetview </p>
* <p><b>Project:</b> UiLib </p>
* <p><b>Classname:</b> OnItemImageClickListener </p>
* <p><b>Description:</b> TODO </p>
* Created by leobert on 2017/5/26.
*/
public interface OnItemImageClickListener<T> {
void onItemImageClick(Context context,
/*current click image*/
ImageView imageView,
/*current click position,start from 0*/
int index,
/*duplicated,use list.size()*/
//int count,
/*all data*/
List<T> list);
}
|
[
"774057695@qq.com"
] |
774057695@qq.com
|
a696afddfa89b8ffb4a8aaff65d368e942b73911
|
96f24caba3511efb342fd9bb991698e7a0ba1c63
|
/4.SWING_n/src/ru/javabegin/training/l2_jlgui/player/util/FileNameFilter.java
|
3e9df4202079d1231c2c4d0e7f086f5abdfa1bd5
|
[] |
no_license
|
Abergaz/JavaBeginWork
|
877f87b0f21b6fdac6d24ad14f6d28d574a14742
|
a443adacfd8265839ced00b1eeab22294e9fb42d
|
refs/heads/master
| 2020-06-30T11:15:53.414126
| 2019-11-16T06:00:45
| 2019-11-16T06:00:45
| 200,809,640
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,467
|
java
|
/*
* FileNameFilter.
*
* JavaZOOM : jlgui@javazoom.net
* http://www.javazoom.net
*
*-----------------------------------------------------------------------
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as published
* by the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*----------------------------------------------------------------------
*/
package ru.javabegin.training.l2_jlgui.player.util;
import java.io.File;
import java.util.ArrayList;
import java.util.StringTokenizer;
/**
* FileName filter that works for both javax.swing.filechooser and java.io.
*/
public class FileNameFilter extends javax.swing.filechooser.FileFilter implements java.io.FileFilter
{
protected java.util.List extensions = new ArrayList();
protected String default_extension = null;
protected String description;
protected boolean allowDir = true;
/**
* Constructs the list of extensions out of a string of comma-separated
* elements, each of which represents one extension.
*
* @param ext the list of comma-separated extensions
*/
public FileNameFilter(String ext, String description)
{
this(ext, description, true);
}
public FileNameFilter(String ext, String description, boolean allowDir)
{
this.description = description;
this.allowDir = allowDir;
StringTokenizer st = new StringTokenizer(ext, ", ");
String extension;
while (st.hasMoreTokens())
{
extension = st.nextToken();
extensions.add(extension);
if (default_extension == null) default_extension = extension;
}
}
/**
* determines if the filename is an acceptable one. If a
* filename ends with one of the extensions the filter was
* initialized with, then the function returns true. if not,
* the function returns false.
*
* @param dir the directory the file is in
* @return true if the filename has a valid extension, false otherwise
*/
public boolean accept(File dir)
{
for (int i = 0; i < extensions.size(); i++)
{
if (allowDir)
{
if (dir.isDirectory() || dir.getName().endsWith("." + (String) extensions.get(i))) return true;
}
else
{
if (dir.getName().endsWith("." + (String) extensions.get(i))) return true;
}
}
return extensions.size() == 0;
}
/**
* Returns the default extension.
*
* @return the default extension
*/
public String getDefaultExtension()
{
return default_extension;
}
public void setDefaultExtension(String ext)
{
default_extension = ext;
}
public String getDescription()
{
return description;
}
}
|
[
"zagreba@gmail.com"
] |
zagreba@gmail.com
|
3433427a50cb5383f33dfba6f26bf4ae524921e2
|
11e91d4eb8d8a9cc18718182aab5b3d6df619248
|
/src/main/java/erebus/client/render/entity/RenderTarantulaBaby.java
|
e976826e2ce429d4aafb1af25285b500fb081d6c
|
[] |
no_license
|
vadis365/TheErebus
|
3f71eb8344aaaf3226253a2c854cbba7bf4301eb
|
e0cbec6c69b864b0ffde3b52232e1416a95b6109
|
refs/heads/mc1.12
| 2021-06-03T07:25:53.959396
| 2021-02-21T19:26:09
| 2021-02-21T19:26:09
| 16,282,196
| 20
| 24
| null | 2023-02-20T21:58:27
| 2014-01-27T15:02:45
|
Java
|
UTF-8
|
Java
| false
| false
| 1,229
|
java
|
package erebus.client.render.entity;
import erebus.client.model.entity.ModelTarantula;
import erebus.entity.EntityTarantulaBaby;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class RenderTarantulaBaby extends RenderLiving<EntityTarantulaBaby> {
private final ResourceLocation[] TEXTURES = new ResourceLocation[] {
new ResourceLocation("erebus:textures/entity/tarantula.png"),
new ResourceLocation("erebus:textures/entity/tarantula_turqoise.png"),
new ResourceLocation("erebus:textures/entity/tarantula_yellow.png") };
public RenderTarantulaBaby(RenderManager rendermanagerIn) {
super(rendermanagerIn, new ModelTarantula(), 0.25F);
}
@Override
protected void preRenderCallback(EntityTarantulaBaby tarantula, float partialTickTime) {
GlStateManager.scale(0.3F, 0.3F, 0.3F);
}
@Override
protected ResourceLocation getEntityTexture(EntityTarantulaBaby tarantula) {
return TEXTURES[tarantula.getSkin()];
}
}
|
[
"curve_linear@hotmail.com"
] |
curve_linear@hotmail.com
|
689c7d23b4c8134bf874fd2689acca76a73e5609
|
5fddb9a3f85f50cdefe3bf29ca06b33ad44bcd62
|
/src/main/java/com/syncleus/aethermud/game/Abilities/Misc/TemporaryImmunity.java
|
1df2204b6b19786ffff47f72f02345d35c671b07
|
[
"Apache-2.0"
] |
permissive
|
freemo/AetherMUD-coffee
|
da315ae8046d06069a058fb38723750a02f72853
|
dbc091b3e1108aa6aff3640da4707ace4c6771e5
|
refs/heads/master
| 2021-01-19T22:34:29.830622
| 2017-08-26T14:01:24
| 2017-08-26T14:06:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,014
|
java
|
/**
* Copyright 2017 Syncleus, Inc.
* with portions copyright 2004-2017 Bo Zimmerman
*
* 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.syncleus.aethermud.game.Abilities.Misc;
import com.syncleus.aethermud.game.Abilities.StdAbility;
import com.syncleus.aethermud.game.Abilities.interfaces.Ability;
import com.syncleus.aethermud.game.Common.interfaces.CMMsg;
import com.syncleus.aethermud.game.MOBS.interfaces.MOB;
import com.syncleus.aethermud.game.core.CMLib;
import com.syncleus.aethermud.game.core.CMParms;
import com.syncleus.aethermud.game.core.CMath;
import com.syncleus.aethermud.game.core.collections.Pair;
import com.syncleus.aethermud.game.core.collections.PairVector;
import com.syncleus.aethermud.game.core.interfaces.Environmental;
import com.syncleus.aethermud.game.core.interfaces.Tickable;
import java.util.List;
public class TemporaryImmunity extends StdAbility {
public final static long IMMUNITY_TIME = 36000000;
private final static String localizedName = CMLib.lang().L("Temporary Immunity");
protected final PairVector<String, Long> set = new PairVector<String, Long>();
protected volatile int tickUp = 10;
public TemporaryImmunity() {
super();
tickUp = 10;
}
@Override
public String ID() {
return "TemporaryImmunity";
}
@Override
public String name() {
return localizedName;
}
@Override
public String displayText() {
return "";
}
@Override
protected int canAffectCode() {
return CAN_MOBS;
}
@Override
protected int canTargetCode() {
return 0;
}
@Override
public int abstractQuality() {
return Ability.QUALITY_BENEFICIAL_SELF;
}
@Override
public int classificationCode() {
return Ability.ACODE_PROPERTY;
}
@Override
public boolean canBeUninvoked() {
return true;
}
@Override
public boolean isAutoInvoked() {
return true;
}
@Override
public void unInvoke() {
super.unInvoke();
}
@Override
public boolean tick(Tickable ticking, int tickID) {
if ((affected instanceof MOB)
&& (tickID == Tickable.TICKID_MOB)
&& ((--tickUp) == 0)) {
tickUp = 10;
makeLongLasting();
for (int s = set.size() - 1; s >= 0; s--) {
final Long L = set.elementAt(s).second;
if ((System.currentTimeMillis() - L.longValue()) > IMMUNITY_TIME)
set.removeElementAt(s);
}
if (set.size() == 0) {
unInvoke();
return false;
}
}
return super.tick(ticking, tickID);
}
@Override
public String text() {
if (set.size() == 0)
return "";
final StringBuffer str = new StringBuffer("");
for (int s = 0; s < set.size(); s++)
str.append(set.elementAt(s).first + "/" + set.elementAt(s).second.longValue() + ";");
return str.toString();
}
@Override
public void setMiscText(String str) {
if (str.startsWith("+")) {
str = str.substring(1);
final int x = set.indexOfFirst(str);
if (x >= 0)
set.setElementAt(new Pair<String, Long>(str, Long.valueOf(System.currentTimeMillis())), x);
else
set.addElement(str, Long.valueOf(System.currentTimeMillis()));
} else {
set.clear();
final List<String> V = CMParms.parseSemicolons(str, true);
for (int v = 0; v < V.size(); v++) {
final String s = V.get(v);
final int x = s.indexOf('/');
if (x > 0)
set.addElement(s.substring(0, x), Long.valueOf(CMath.s_long(s.substring(x + 1))));
}
}
}
@Override
public boolean okMessage(final Environmental myHost, final CMMsg msg) {
if ((msg.amITarget(affected))
&& (msg.tool() instanceof Ability)
&& (set.containsFirst(msg.tool().ID()))
&& (affected instanceof MOB)) {
final MOB mob = (MOB) affected;
if (!mob.amDead()) {
if (msg.source() != msg.target())
mob.location().show(mob, msg.source(), CMMsg.MSG_OK_VISUAL, L("<S-NAME> seem(s) immune to @x1.", msg.tool().name()));
return false;
}
}
return true;
}
}
|
[
"jeffrey.freeman@syncleus.com"
] |
jeffrey.freeman@syncleus.com
|
0eb25cea36d309a466117048b052e09ecc36ce1b
|
4ca1ee4b61510e5c1002f5039ff123ec487c6dd1
|
/appng-api/src/main/java/org/appng/api/DataProvider.java
|
1b524292280b2acc14f2ac4d5568e258b7fe75bd
|
[
"Apache-2.0"
] |
permissive
|
appNG/appng
|
014f417f83e30e65a75f503393373b119f285277
|
98a4874cdae6b74986d53ffd3773027523adb914
|
refs/heads/appng-1.26.x
| 2023-09-01T03:37:15.040991
| 2023-08-29T09:43:16
| 2023-08-29T09:43:16
| 95,534,270
| 39
| 18
|
Apache-2.0
| 2023-09-12T21:12:17
| 2017-06-27T08:13:25
|
Java
|
UTF-8
|
Java
| false
| false
| 2,931
|
java
|
/*
* Copyright 2011-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.appng.api;
import org.appng.api.model.Application;
import org.appng.api.model.Site;
import org.appng.xml.platform.Action;
import org.appng.xml.platform.Data;
import org.appng.xml.platform.DataConfig;
import org.appng.xml.platform.Datasource;
import org.appng.xml.platform.DatasourceRef;
import org.appng.xml.platform.FieldDef;
import org.appng.xml.platform.MetaData;
import org.appng.xml.platform.SectionelementDef;
/**
* An {@link DataProvider} usually retrieves some data from the persistence layer and returns it as a
* {@link DataContainer}. The implementing class needs to be defined in the application's {@code beans.xml}. This bean
* is then being referenced within an {@link Action} or a {@link SectionelementDef} using a {@link DatasourceRef}.
* <p>
*
* @author Matthias Müller
*/
public interface DataProvider {
/**
* Retrieves some data from the application, wrapped in a {@link DataContainer}.
* <p>
* Either {@link DataContainer#setItem(Object)} or one of
* <ul>
* <li>{@link DataContainer#setItems(java.util.Collection)}
* <li>{@link DataContainer#setPage(java.util.Collection, org.springframework.data.domain.Pageable)}
* <li>{@link DataContainer#setPage(org.springframework.data.domain.Page)}
* </ul>
* must have been called on the returned {@link DataContainer}.
* <p>
* Those item(s) need(s) to be of the type defined in {@link MetaData#getBindClass()} of the {@link Datasource}'s
* {@link DataConfig}.
*
* @param site
* the current {@link Site}
* @param application
* the current {@link Application}
* @param environment
* the current {@link Environment}
* @param options
* the {@link Options} for this {@link DataProvider}
* @param request
* the current {@link Request}
* @param fieldProcessor
* the {@link FieldProcessor} containing all readable {@link FieldDef}initions for this
* DataProvider
*
* @return a {@link DataContainer} holding the {@link Data} for the defining {@link Datasource}
*/
DataContainer getData(Site site, Application application, Environment environment, Options options, Request request,
FieldProcessor fieldProcessor);
}
|
[
"matthias.mueller@appng.org"
] |
matthias.mueller@appng.org
|
ade84563fe65d41b3bd62514ae2da1f83cc6bcc6
|
647eef4da03aaaac9872c8b210e4fc24485e49dc
|
/TestMemory/admobapk/src/main/java/art.java
|
01c3a855396e250398e9574dba8d0c85501ae793
|
[] |
no_license
|
AlbertSnow/git_workspace
|
f2d3c68a7b6e62f41c1edcd7744f110e2bf7f021
|
a0b2cd83cfa6576182f440a44d957a9b9a6bda2e
|
refs/heads/master
| 2021-01-22T17:57:16.169136
| 2016-12-05T15:59:46
| 2016-12-05T15:59:46
| 28,154,580
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 231
|
java
|
import android.os.Parcelable.Creator;
public final class art
implements Parcelable.Creator
{
}
/* Location: C:\Program Files\APK反编译\classes_dex2jar.jar
* Qualified Name: art
* JD-Core Version: 0.6.0
*/
|
[
"zhaojialiang@conew.com"
] |
zhaojialiang@conew.com
|
dfcc6a9b7478743f60d0a3933343b05d2a555079
|
e0532d36d933f76c1a3ccf90dcb78489ee01501e
|
/middlegroudInterfaceTest/src/main/java/com/duoweidu/model/hsq/RefundDetailData.java
|
24e74cecd934689b84ce3c8dcb3d7155befa83ce
|
[] |
no_license
|
wuhaiyanwhy/jiekouzidonghua_dwd
|
ff7bdbbcc21683d2d592ea48624b476dd9ff027f
|
1627453a5ad678b5438ad424ca1f23e0de2b3aa0
|
refs/heads/master
| 2022-07-15T16:40:14.545287
| 2019-10-25T08:32:34
| 2019-10-25T08:32:34
| 217,483,394
| 1
| 0
| null | 2022-06-29T17:44:05
| 2019-10-25T08:03:53
|
HTML
|
UTF-8
|
Java
| false
| false
| 1,126
|
java
|
package com.duoweidu.model.hsq;
import java.util.ArrayList;
public class RefundDetailData {
public String title;
public String content;
public ArrayList<AuditListModel> auditList;
public RefundInfoModel refundInfo;
public static class AuditListModel {
public int type;
public int auditUserId;
public String note;
public String time;
public int status;
public String statusDesc;
public int amount;
public ArrayList<String> pics;
}
public static class RefundInfoModel {
public int id;
public String reason;
public String method;
public int refundMoney;
public int amount;
public String amountDesc;
public int deliveryAmount;
public String note;
public String applyTime;
public String complaintTime;
public String complaintExpiredTime;
public String auditExpiredTime;
public ArrayList<String> pics;
public int canComplaint;
public int canAgree;
public int type;
public int refundType;
}
}
|
[
"1174837652@qq.com"
] |
1174837652@qq.com
|
3fa74634bb9087756d257d40d56c4491ecbf9d47
|
b363fc29dbd970558165bc5e99c71f9baf7c897b
|
/modules/integration/osgi/felix/src/main/java/org/apache/tamaya/integration/osgi/felix/Activator.java
|
9053aa77dd7432310559162e2c50a91b6e5f7043
|
[
"Apache-2.0"
] |
permissive
|
lazycrazyowl/incubator-tamaya
|
9f50d97b8ccc3c09ff5ef35015f6d0cdc1222ddc
|
e941425fbb1316070f0ec50cd2408f3bbb9a1c15
|
refs/heads/master
| 2021-01-15T11:03:07.767930
| 2015-11-09T03:18:53
| 2015-11-09T03:19:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,355
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.tamaya.integration.osgi.felix;
import org.apache.felix.cm.PersistenceManager;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.Constants;
import org.osgi.framework.ServiceRegistration;
import java.util.Hashtable;
/**
* Activator that registers the Tamaya implementation of {@link org.apache.felix.cm.PersistenceManager},
* hereby overriding the version registered by felix CM by default.
*/
public class Activator implements BundleActivator{
/**
* Our registration, used on stop.
*/
private ServiceRegistration<PersistenceManager> pmRegistration;
@Override
public void start(BundleContext bundleContext) throws Exception {
TamayaPersistenceManager tpm = new TamayaPersistenceManager(bundleContext);
Hashtable props = new Hashtable();
props.put( Constants.SERVICE_PID, tpm.getClass().getName() );
props.put( Constants.SERVICE_DESCRIPTION, "Apache Tamaya Persistence Manager" );
props.put( Constants.SERVICE_VENDOR, "Apache Software Foundation" );
Integer ranking = 10;
// TODO Make ranking configurable...
props.put( Constants.SERVICE_RANKING, ranking );
pmRegistration = bundleContext.registerService( PersistenceManager.class, tpm, props );
}
@Override
public void stop(BundleContext bundleContext) throws Exception {
if(pmRegistration!=null){
pmRegistration.unregister();
pmRegistration = null;
}
}
}
|
[
"anatole@apache.org"
] |
anatole@apache.org
|
1b526f9fbe17554cd2d8fedb1492446b6ec090d2
|
4aa90348abcb2119011728dc067afd501f275374
|
/app/src/main/java/com/tencent/mm/modelstat/e$1.java
|
53776251a4b63b8cf80bc2fe14abde5a2ab53925
|
[] |
no_license
|
jambestwick/HackWechat
|
0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6
|
6a34899c8bfd50d19e5a5ec36a58218598172a6b
|
refs/heads/master
| 2022-01-27T12:48:43.446804
| 2021-12-29T10:36:30
| 2021-12-29T10:36:30
| 249,366,791
| 0
| 0
| null | 2020-03-23T07:48:32
| 2020-03-23T07:48:32
| null |
UTF-8
|
Java
| false
| false
| 5,095
|
java
|
package com.tencent.mm.modelstat;
import android.content.Context;
import android.net.wifi.WifiManager;
import android.util.Pair;
import com.tencent.mm.a.o;
import com.tencent.mm.kernel.a;
import com.tencent.mm.kernel.g;
import com.tencent.mm.modelstat.e.b;
import com.tencent.mm.sdk.platformtools.ac;
import com.tencent.mm.sdk.platformtools.ak;
import com.tencent.mm.sdk.platformtools.bh;
import com.tencent.mm.sdk.platformtools.x;
import java.util.List;
class e$1 implements Runnable {
final /* synthetic */ int hLI;
final /* synthetic */ boolean hQO;
final /* synthetic */ float hQP;
final /* synthetic */ float hQQ;
final /* synthetic */ boolean hQR;
final /* synthetic */ int hQS;
final /* synthetic */ e hQT;
e$1(e eVar, boolean z, float f, float f2, int i, boolean z2, int i2) {
this.hQT = eVar;
this.hQO = z;
this.hQP = f;
this.hQQ = f2;
this.hLI = i;
this.hQR = z2;
this.hQS = i2;
}
public final void run() {
try {
if (g.Dh().Cy()) {
g.Dh();
if (!a.Cs()) {
long Wp = bh.Wp();
if (e.a(this.hQT) == 0 || Wp - e.a(this.hQT) >= 1800000) {
List b;
Pair pair;
if (this.hQO) {
b = e.b(this.hQT);
} else {
Object c = e.c(this.hQT);
}
int i = 0;
while (i < b.size()) {
if (e.o(this.hQP, ((Float) ((Pair) b.get(i)).first).floatValue()) && e.o(this.hQQ, ((Float) ((Pair) b.get(i)).second).floatValue())) {
pair = (Pair) b.get(i);
break;
}
i++;
}
pair = null;
if (pair == null) {
x.d("MicroMsg.IndoorReporter", "Ignore this report, no hit any Point");
return;
}
int i2;
e.a(this.hQT, Wp);
StringBuilder stringBuilder = new StringBuilder();
g.Dh();
String stringBuilder2 = stringBuilder.append(new o(a.Cg()).toString()).append("_").append(e.a(this.hQT)).toString();
StringBuilder append = new StringBuilder().append(pair.first).append(",").append(pair.second).append(",").append(this.hLI).append(",");
int i3 = this.hQR ? 1 : 2;
if (this.hQO) {
i2 = 10;
} else {
i2 = 20;
}
String stringBuilder3 = append.append(i2 + i3).append(",").append(this.hQP).append(",").append(this.hQQ).append(",0,").append(this.hQS).append(",").append(e.a(this.hQT)).append(",").toString();
e$c com_tencent_mm_modelstat_e_c = new e$c(this.hQT);
Context context = ac.getContext();
i3 = e.d(this.hQT);
int e = e.e(this.hQT);
if (com_tencent_mm_modelstat_e_c.bni == null) {
com_tencent_mm_modelstat_e_c.bni = (WifiManager) context.getSystemService("wifi");
}
com_tencent_mm_modelstat_e_c.hRn = i3;
com_tencent_mm_modelstat_e_c.hQL = e;
com_tencent_mm_modelstat_e_c.startTime = bh.Wp();
com_tencent_mm_modelstat_e_c.hRo = true;
com_tencent_mm_modelstat_e_c.thread.start();
b bVar = new b(this.hQT);
if (bVar.u(ac.getContext(), e.f(this.hQT))) {
g.Dk();
new ak(g.Dm().oAt.getLooper(), new 1(this, bVar, com_tencent_mm_modelstat_e_c, stringBuilder3, stringBuilder2), true).J(3000, 3000);
return;
}
x.e("MicroMsg.IndoorReporter", "Ignore this report. Error:start wifi:%b sensor:%b ", new Object[]{Boolean.valueOf(true), Boolean.valueOf(bVar.u(ac.getContext(), e.f(this.hQT)))});
bVar.ST();
com_tencent_mm_modelstat_e_c.ST();
com.tencent.mm.plugin.report.service.g.pQN.k(13381, stringBuilder3 + stringBuilder2 + ",-10002,ERROR:StartFailed.");
return;
}
x.e("MicroMsg.IndoorReporter", "Ignore this Report,Another Report is Running & not timeout:%d.", new Object[]{Long.valueOf(Wp - e.a(this.hQT))});
}
}
} catch (Exception e2) {
x.e("MicroMsg.IndoorReporter", "reprot Start exception:%s", new Object[]{e2.getMessage()});
}
}
}
|
[
"malin.myemail@163.com"
] |
malin.myemail@163.com
|
84c8fa670ccef10633918250b35170e9f3f8ec0e
|
139960e2d7d55e71c15e6a63acb6609e142a2ace
|
/mobile_app1/module502/src/main/java/module502packageJava0/Foo781.java
|
64c6f152b946788e4ab8e447dbba80e03cb13979
|
[
"Apache-2.0"
] |
permissive
|
uber-common/android-build-eval
|
448bfe141b6911ad8a99268378c75217d431766f
|
7723bfd0b9b1056892cef1fef02314b435b086f2
|
refs/heads/master
| 2023-02-18T22:25:15.121902
| 2023-02-06T19:35:34
| 2023-02-06T19:35:34
| 294,831,672
| 83
| 7
|
Apache-2.0
| 2021-09-24T08:55:30
| 2020-09-11T23:27:37
|
Java
|
UTF-8
|
Java
| false
| false
| 820
|
java
|
package module502packageJava0;
import java.lang.Integer;
public class Foo781 {
Integer int0;
Integer int1;
Integer int2;
public void foo0() {
new module502packageJava0.Foo780().foo15();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
public void foo6() {
foo5();
}
public void foo7() {
foo6();
}
public void foo8() {
foo7();
}
public void foo9() {
foo8();
}
public void foo10() {
foo9();
}
public void foo11() {
foo10();
}
public void foo12() {
foo11();
}
public void foo13() {
foo12();
}
public void foo14() {
foo13();
}
public void foo15() {
foo14();
}
}
|
[
"oliviern@uber.com"
] |
oliviern@uber.com
|
e068fc4c37ee52cbc0d92ec32dd06dd6e8bb3773
|
f1a85ae8b9d5d9d9a848c4c8d9c2410b9726e194
|
/library/datasource/src/main/java/com/yaoguang/datasource/company/CompanyForwardDataSource.java
|
553bd9f6dc5026e22e6e7c1923d0060c63dc3ba4
|
[] |
no_license
|
P79N6A/as
|
45dc7c76d58cdc62e3e403c9da4a1c16c4234568
|
a57ee2a3eb2c73cc97c3fb130b8e389899b19d99
|
refs/heads/master
| 2020-04-20T05:55:10.175425
| 2019-02-01T08:49:15
| 2019-02-01T08:49:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,032
|
java
|
package com.yaoguang.datasource.company;
import com.yaoguang.datasource.api.company.CompanyApi;
import com.yaoguang.datasource.api.company.CompanyForwardApi;
import com.yaoguang.datasource.common.DataStatic;
import com.yaoguang.greendao.entity.common.UserOfficeWrapper;
import com.yaoguang.greendao.entity.company.ViewTransferCancel;
import com.yaoguang.lib.base.BaseApplication;
import com.yaoguang.lib.common.constants.Constants;
import com.yaoguang.lib.net.Api;
import com.yaoguang.lib.net.bean.BaseResponse;
import com.yaoguang.lib.net.bean.PageList;
import java.util.ArrayList;
import java.util.List;
import io.reactivex.Observable;
import retrofit2.http.Query;
/**
* Created by zhongjh on 2018/11/18.
*/
public class CompanyForwardDataSource {
/**
* 派单
*
* @param ids - 工作单id
* @param templateId - 模板id
* @param transferType - 派单类型(0:货代派单 1:装货派单 2:送货派单)
*/
public Observable<BaseResponse<String>> transfer(String ids, String templateId, String transferType) {
CompanyForwardApi companyForwardApi = Api.getInstance().retrofit.create(CompanyForwardApi.class);
return companyForwardApi.transfer(ids, templateId, transferType);
}
/**
* 派单管理 - 取消预览列表
*
* @param ids - 工作单id
*/
public Observable<BaseResponse<List<ViewTransferCancel>>> transferCancelView(String ids) {
CompanyForwardApi companyForwardApi = Api.getInstance().retrofit.create(CompanyForwardApi.class);
return companyForwardApi.transferCancelView(ids);
}
/**
* 订单派单管理 - 取消派单
*
* @param viewTransferCancel 集合
*/
public Observable<BaseResponse<String>> transferCancel(ArrayList<ViewTransferCancel> viewTransferCancel) {
CompanyForwardApi companyForwardApi = Api.getInstance().retrofit.create(CompanyForwardApi.class);
return companyForwardApi.transferCancel(viewTransferCancel);
}
}
|
[
"254191389@qq.com"
] |
254191389@qq.com
|
ef836611b52fa4a30c8c09a774ef83ad103249fd
|
8394e1f30784a5e57a244dbf0764668086dbd8fb
|
/src/main/java/com/example/demo/aop/QuoterAspect.java
|
e14e936a64e73d6a6b97c003dbb0b6db89d2ea90
|
[] |
no_license
|
Jeka1978/demo-boot-after-joker-2019
|
2654241009f4ddbd4d25759d1fc7b4224edb95c0
|
b25401619447a293d259f72f7e0599127af0c2cb
|
refs/heads/master
| 2020-08-28T22:31:47.914811
| 2019-10-27T14:50:01
| 2019-10-27T14:50:01
| 217,840,142
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 928
|
java
|
package com.example.demo.aop;
import lombok.SneakyThrows;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;
/**
* @author Evgeny Borisov
*/
@Component
@Aspect
public class QuoterAspect {
@Pointcut("execution(* com.example.demo.services..*.say*(..))")
public void allSayMethods(){}
@Around("allSayMethods()")
@SneakyThrows
public Object handleSayMethods(ProceedingJoinPoint jp){
String simpleName = jp.getTarget().getClass().getSimpleName();
System.out.println("а теперь цитата "+simpleName+": ");
Object retVal = jp.proceed();
System.out.println("the end");
return retVal;
}
}
|
[
"kit2009"
] |
kit2009
|
b93802ef080f2c70c6d3f195b334c0d3b4956fb8
|
b97a9d99fbf4066469e64592065d6a62970d9833
|
/test/integration/src/test/java/com/aw/rest/resources/SimpleRulesResourceTest.java
|
a1ff4115fb7dff71328b770ffa2c871739e34ea7
|
[] |
no_license
|
analyticswarescott/ares
|
2bacb8eaac612e36836f7138c4398b6560468a91
|
5ac8d4ed50ca749b52eafc6fe95593ff68b85b54
|
refs/heads/master
| 2020-05-29T16:08:56.917029
| 2016-11-11T21:11:02
| 2016-11-11T21:11:02
| 59,563,723
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 238
|
java
|
package com.aw.rest.resources;
/**
* @author jhaight
*/
public class SimpleRulesResourceTest extends DocumentResourceTestBase {
protected String getBasePath() { return com.aw.util.Statics.VERSIONED_REST_PREFIX + "/simple_rules"; }
}
|
[
"scott@analyticsware.com"
] |
scott@analyticsware.com
|
158ef24caf861f43de81e7310aba12ccf287ee6d
|
17e8438486cb3e3073966ca2c14956d3ba9209ea
|
/dso/tags/3.7.10/dso-l1/src/main/java/com/tc/object/bytecode/AccessibleObjectAdapter.java
|
0e11c296c4a9cc54495f21512fc7f78ca2d56166
|
[] |
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,598
|
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.tc.object.bytecode;
import com.tc.asm.ClassVisitor;
import com.tc.asm.Label;
import com.tc.asm.MethodVisitor;
import com.tc.asm.Opcodes;
import com.tc.asm.Type;
import com.tc.object.TCObjectExternal;
import java.lang.reflect.AccessibleObject;
public class AccessibleObjectAdapter extends ClassVisitor implements Opcodes {
public AccessibleObjectAdapter(ClassVisitor cv) {
super(Opcodes.ASM5, cv);
}
@Override
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions);
if ("setAccessible0".equals(name) && "(Ljava/lang/reflect/AccessibleObject;Z)V".equals(desc)) { return new AccessibleSetAccessibleMethodVisitor(
mv); }
return mv;
}
private static class AccessibleSetAccessibleMethodVisitor extends MaxLocalVarStoreDetectingMethodAdapter {
private AccessibleSetAccessibleMethodVisitor(MethodVisitor mv) {
super(mv);
}
@Override
public void visitFieldInsn(int opcode, String owner, String name, String desc) {
if (PUTFIELD == opcode && owner.equals(Type.getInternalName(AccessibleObject.class)) && name.equals("override")
&& desc.equals("Z")) {
int boolean_var_store = getMaxLocalVarStore() + 1;
int tcobject_var_store = boolean_var_store + 1;
// make a copy of the boolean that's currently on the stack,
// ready to be assigned to the 'override' field
mv.visitInsn(DUP);
// store the boolean value in the appropriate local variable slot
mv.visitVarInsn(ISTORE, boolean_var_store);
// load the reference to the currently executing object instance
mv.visitVarInsn(ALOAD, 0);
// look up the TCObject from the TC manager that corresponds
// to the current object instance
mv.visitMethodInsn(INVOKESTATIC, Type.getInternalName(ManagerUtil.class), "lookupExistingOrNull",
"(Ljava/lang/Object;)Lcom/tc/object/TCObjectExternal;", false);
// store the TCObject in the appropriate local variable slot
mv.visitVarInsn(ASTORE, tcobject_var_store);
// check if the TCObject instance is null, and jump over the state
// modification code that follows
mv.visitVarInsn(ALOAD, tcobject_var_store);
Label label_tcobject_null = new Label();
mv.visitJumpInsn(IFNULL, label_tcobject_null);
// if the TCObject instance is not null, obtain it again so
// that it can be used to signal the new value for the local 'override"
// variable
mv.visitVarInsn(ALOAD, tcobject_var_store);
mv.visitLdcInsn(AccessibleObject.class.getName());
mv.visitLdcInsn(AccessibleObject.class.getName() + ".override");
mv.visitVarInsn(ILOAD, boolean_var_store);
mv.visitInsn(ICONST_M1);
mv.visitMethodInsn(INVOKEINTERFACE, Type.getInternalName(TCObjectExternal.class), "booleanFieldChanged",
"(Ljava/lang/String;Ljava/lang/String;ZI)V", true);
// label that is jumped to in case the TCObject instance is null
mv.visitLabel(label_tcobject_null);
}
super.visitFieldInsn(opcode, owner, name, desc);
}
}
}
|
[
"cruise@7fc7bbf3-cf45-46d4-be06-341739edd864"
] |
cruise@7fc7bbf3-cf45-46d4-be06-341739edd864
|
a29163f9c739bc45e2049d670407b47b3fa339c0
|
6a1c8540e81a34e315e10c1a33a1202d2f8db8ce
|
/AdAdmin/src/main/cn/adwalker/ad/admin/finance/bean/ChannelQueryBean.java
|
fa1d6acc0a68d4c165aeebbb071d6c1c1676a834
|
[] |
no_license
|
springwindyike/ad-server
|
7624a3129c705ce5cd97bfe983704d1f29b09889
|
c2878216505e5aea7222e830ad759a22fc6a22da
|
refs/heads/master
| 2021-12-11T05:29:26.909006
| 2016-10-24T02:48:55
| 2016-10-24T02:48:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,060
|
java
|
/**
* <p>Title: ChannelQueryBean.java</p>
* <p>Description:TODO</p>
* <p>Copyright: Copyright (c) </p>
* <p>Company: adwalker</p>
* @author hadoop
* @date 2013-10-31
* @version 1.0
*/
package cn.adwalker.ad.admin.finance.bean;
import java.io.Serializable;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.math.NumberUtils;
/**
* <p>
* Title: ChannelQueryBean
* </p>
* <p>
* Description:TODO
* </p>
* <p>
* Company: adwalker
* </p>
*
* @author cuidd
* @date 2013-10-31
*/
public class ChannelQueryBean implements Serializable {
/** @Fields serialVersionUID : TODO */
private static final long serialVersionUID = -7932417613771795980L;
private String start_date;
private String end_date;
private String media;
private String os;
private String campaign;
public Long getMedia_id() {
Long l = 0l;
if (!StringUtils.isEmpty(media) && NumberUtils.isNumber(media)) {
l = Long.valueOf(media);
}
return l;
}
public Long getCampaign_id() {
Long l = 0l;
if (!StringUtils.isEmpty(campaign) && NumberUtils.isNumber(campaign)) {
l = Long.valueOf(campaign);
}
return l;
}
public String getMedia_name() {
String media_name = null;
if (!StringUtils.isEmpty(media)) {
media_name = media.trim();
}
return media_name;
}
public String getCampaign_name() {
String name = null;
if (!StringUtils.isEmpty(campaign)) {
name = campaign.trim();
}
return name;
}
public String getCampaign() {
return campaign;
}
public void setCampaign(String campaign) {
this.campaign = campaign;
}
public String getMedia() {
return media;
}
public void setMedia(String media) {
this.media = media;
}
public String getStart_date() {
return start_date;
}
public void setStart_date(String start_date) {
this.start_date = start_date;
}
public String getEnd_date() {
return end_date;
}
public void setEnd_date(String end_date) {
this.end_date = end_date;
}
public String getOs() {
return os;
}
public void setOs(String os) {
this.os = os;
}
}
|
[
"13565644@qq.com"
] |
13565644@qq.com
|
3233162d51a8df2433ad26942005539eb705cc51
|
d5b1beab4cd257001ba8d9812d8d3aee8e4f1a1d
|
/polymonitor/com.siteview.kernel.core/src/main/java/com/dragonflow/SiteView/ScheduleEvent.java
|
767f9482ee3eb1a70f830a3173f85fb40c44aca5
|
[] |
no_license
|
liuyaoao/polymer-project
|
65e6ace94b150c16a93ac9cfe559b35529192232
|
0b10de5658b059ad544f48a856fca8c452b65ef4
|
refs/heads/master
| 2021-01-24T18:25:50.899371
| 2017-12-18T02:13:02
| 2017-12-18T02:13:02
| 84,430,279
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,095
|
java
|
/*
*
* Created on 2014-2-16 16:43:31
*
* ScheduleEvent.java
*
* History:
*
*/
package com.dragonflow.SiteView;
/**
* Comment for <code>ScheduleEvent</code>
*
* @author
* @version 0.0
*
*
*/
// Referenced classes of package com.dragonflow.SiteView:
// Platform, Action
public abstract class ScheduleEvent {
long time;
Action action;
boolean repeat;
long lastTime;
ScheduleEvent(Action action1) {
time = 0L;
repeat = true;
action = action1;
}
public long calculateNextTime() {
return calculateNextTime(Platform.timeMillis());
}
abstract long calculateNextTime(long l);
public long getTime() {
return time;
}
public Action getAction() {
return action;
}
public boolean isRepeated() {
return repeat;
}
public String toString() {
return "[ScheduleEvent,time=" + time + ", action=" + action + "]";
}
public void setRepeated(boolean flag) {
repeat = flag;
}
public void doAction() {
action.trigger();
}
}
|
[
"623578381@qq.com"
] |
623578381@qq.com
|
dbe792bad6129a9f501f9d81da6e4caf90eedd84
|
234499eb92966fb2cccc93bab4e5e09c15aa725e
|
/src/main/java/com/yoxiang/multi_thread_programming/chapter01/stop_thread2/MyThread2.java
|
0e82359b12ee109c073ed046c550f40a53d44c4c
|
[] |
no_license
|
RiversLau/concurrent-study
|
b8d7dbf0599a9eae6ffb31c175001c29669d60bb
|
c43a763bd2098e431ad7e9b4789889eb1cdd0419
|
refs/heads/master
| 2021-09-14T09:38:43.815287
| 2018-05-11T12:46:02
| 2018-05-11T12:46:02
| 115,006,276
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 583
|
java
|
package com.yoxiang.multi_thread_programming.chapter01.stop_thread2;
/**
* Author: Rivers
* Date: 2017/12/27 06:25
*/
public class MyThread2 extends Thread {
@Override
public void run() {
super.run();
for (int i = 0; i < 500000; i++) {
if (this.isInterrupted()) {
System.out.println("已经是停止状态了!我要退出了!");
break;
}
System.out.println("i = " + (i + 1));
}
System.out.println("线程已经停止了,但是此处依旧被执行了!");
}
}
|
[
"zhaoxiang0805@hotmail.com"
] |
zhaoxiang0805@hotmail.com
|
03216eaee8fda6ff44b53fbef96b38a53081aac5
|
92aba68ccebf23376d5ce48d5657b93553c11d04
|
/central/src/test/java/org/glowroot/central/repo/RoleDaoIT.java
|
a65ad94db56f714fe0780c4675b0635d75f30306
|
[
"Apache-2.0"
] |
permissive
|
marcelogwolff/glowroot
|
c1d7b0d395fc1a404916d7daa9c45890e369e5f9
|
c00097f985d948c9c2bb7f7919e75d70578b2e61
|
refs/heads/master
| 2020-03-28T00:03:25.948337
| 2018-09-03T22:34:13
| 2018-09-04T04:24:17
| 147,371,262
| 0
| 0
|
Apache-2.0
| 2018-09-04T15:53:59
| 2018-09-04T15:53:58
| null |
UTF-8
|
Java
| false
| false
| 2,239
|
java
|
/*
* Copyright 2016-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.glowroot.central.repo;
import com.datastax.driver.core.Cluster;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.glowroot.central.util.ClusterManager;
import org.glowroot.central.util.Session;
import org.glowroot.common2.config.ImmutableRoleConfig;
import org.glowroot.common2.config.RoleConfig;
import static org.assertj.core.api.Assertions.assertThat;
public class RoleDaoIT {
private static Cluster cluster;
private static Session session;
private static ClusterManager clusterManager;
private static RoleDao roleDao;
@BeforeClass
public static void setUp() throws Exception {
SharedSetupRunListener.startCassandra();
cluster = Clusters.newCluster();
session = new Session(cluster.newSession(), "glowroot_unit_tests");
clusterManager = ClusterManager.create();
roleDao = new RoleDao(session, clusterManager);
}
@AfterClass
public static void tearDown() throws Exception {
clusterManager.close();
session.close();
cluster.close();
SharedSetupRunListener.stopCassandra();
}
@Test
public void shouldRead() throws Exception {
// given
roleDao.insert(ImmutableRoleConfig.builder()
.central(true)
.name("abc")
.addPermissions("*:*")
.build());
// when
RoleConfig roleConfig = roleDao.read("abc");
// then
assertThat(roleConfig.name()).isEqualTo("abc");
assertThat(roleConfig.permissions()).containsExactly("*:*");
}
}
|
[
"trask.stalnaker@gmail.com"
] |
trask.stalnaker@gmail.com
|
7acb3e06d3bd16b6e48058927b7a7f30d25aee36
|
0f77c5ec508d6e8b558f726980067d1058e350d7
|
/1_39_120042/com/ankamagames/wakfu/client/ui/theme/ImageHavenWorldEvolution.java
|
2bbfa6e4fb29c809eea55c3f1d976d82d2f7474c
|
[] |
no_license
|
nightwolf93/Wakxy-Core-Decompiled
|
aa589ebb92197bf48e6576026648956f93b8bf7f
|
2967f8f8fba89018f63b36e3978fc62908aa4d4d
|
refs/heads/master
| 2016-09-05T11:07:45.145928
| 2014-12-30T16:21:30
| 2014-12-30T16:21:30
| 29,250,176
| 5
| 5
| null | 2015-01-14T15:17:02
| 2015-01-14T15:17:02
| null |
UTF-8
|
Java
| false
| false
| 1,465
|
java
|
package com.ankamagames.wakfu.client.ui.theme;
import java.util.*;
import com.ankamagames.xulor2.component.*;
import com.ankamagames.xulor2.core.*;
import com.ankamagames.xulor2.util.alignment.*;
import com.ankamagames.xulor2.appearance.*;
public class ImageHavenWorldEvolution implements StyleSetter
{
private DocumentParser doc;
private Stack<ElementMap> elementMaps;
public ImageHavenWorldEvolution() {
super();
this.elementMaps = new Stack<ElementMap>();
}
@Override
public void applyStyle(final ElementMap item, final DocumentParser doc, final Widget widget) {
this.doc = doc;
this.elementMaps.push(item);
final ElementMap elementMap = this.elementMaps.peek();
final DecoratorAppearance appearance = widget.getAppearance();
appearance.setElementMap(elementMap);
widget.addBasicElement(appearance);
appearance.onAttributesInitialized();
final PixmapElement checkOut = PixmapElement.checkOut();
checkOut.setElementMap(elementMap);
checkOut.setHeight(55);
checkOut.setPosition(Alignment17.CENTER);
checkOut.setTexture(this.doc.getTexture("default_0.tga"));
checkOut.setWidth(55);
checkOut.setX(770);
checkOut.setY(35);
appearance.addBasicElement(checkOut);
checkOut.onAttributesInitialized();
checkOut.onChildrenAdded();
appearance.onChildrenAdded();
}
}
|
[
"totomakers@hotmail.fr"
] |
totomakers@hotmail.fr
|
bd9286ac6212be42d3c302025999c87e1e82096a
|
2019b6ebabf13daa22a66f4e2f0e61e7c4106987
|
/app/src/main/java/com/cvnavi/logistics/i51ehang/app/activity/cargo/adapter/home/pickuprecord/CargoPickupRecordAdapter.java
|
ef98f89e786911504234d5e19d478d6bccff3a62
|
[] |
no_license
|
ChenJun1/EHANG
|
f352a072624b2306adf7d383219da09073ccad09
|
969a68627e6748743ea09543fdf1e53230ecc455
|
refs/heads/master
| 2021-01-21T15:30:53.640839
| 2017-03-02T02:05:05
| 2017-03-02T02:05:05
| 83,622,801
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,756
|
java
|
package com.cvnavi.logistics.i51ehang.app.activity.cargo.adapter.home.pickuprecord;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.cvnavi.logistics.i51ehang.app.R;
import com.cvnavi.logistics.i51ehang.app.bean.cargo.mode.GetTakeManifestsDataValue;
import com.cvnavi.logistics.i51ehang.app.callback.driver.home.trans.OnClickItemListener;
import com.cvnavi.logistics.i51ehang.app.utils.SetViewValueUtil;
import com.cvnavi.logistics.i51ehang.app.utils.Utils;
import com.cvnavi.logistics.i51ehang.app.widget.viewholder.ViewHolder;
import java.util.List;
/**
* 版权所有 上海势航网络科技
* Created: ChenJun
* Email: 791954958@qq.com
* Phone: 17774530310
* CreatedTime: 2017/1/16 14:10
* version: 2.3.2
* Depict: 货主 取货记录
*/
public class CargoPickupRecordAdapter extends BaseAdapter{
private Context context;
private List<GetTakeManifestsDataValue> mList;
private OnClickItemListener listener;
public CargoPickupRecordAdapter(Context context,List<GetTakeManifestsDataValue> mList,OnClickItemListener listener) {
this.context = context;
this.mList = mList;
this.listener = listener;
}
@Override
public int getCount() {
if (mList == null) {
return 0;
} else {
return mList.size();
}
}
@Override
public Object getItem(int position) {
return mList.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
GetTakeManifestsDataValue bean = mList.get(position);
if (convertView == null){
convertView = LayoutInflater.from(context).inflate(R.layout.activity_cargo_pickup_record_item,null);
}
LinearLayout LLlayout = ViewHolder.get(convertView,R.id.cargo_pickup_item_LLlayout);
TextView Ticket_No_text = ViewHolder.get(convertView,R.id.Ticket_No_text);
TextView Goods_Breed_text = ViewHolder.get(convertView,R.id.Goods_Breed_text);
TextView Goods_Casing_text = ViewHolder.get(convertView,R.id.Goods_Casing_text);
TextView Goods_Num_text = ViewHolder.get(convertView,R.id.Goods_Num_text);
TextView SendMan_Address_txet = ViewHolder.get(convertView,R.id.SendMan_Address_txet);
TextView Operate_DateTime_text = ViewHolder.get(convertView,R.id.Operate_DateTime_text);
LLlayout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (listener != null) {
listener.onClick(position);
}
}
});
// ObjectAnimationUtils.showScaleXScalexY(LLlayout);
SetViewValueUtil.setTextViewValue(Ticket_No_text,bean.Ticket_No);
SetViewValueUtil.setTextViewValue(Goods_Breed_text,bean.Goods_Breed);
SetViewValueUtil.setTextViewValue(Goods_Casing_text,bean.Goods_Casing);
SetViewValueUtil.setTextViewValue(Goods_Num_text,String.format(Utils.getResourcesString(R.string.my_order_jian),bean.Goods_Num)
+"/"+String.format(Utils.getResourcesString(R.string.my_order_kg),bean.Goods_Weight)
+"/"+String.format(Utils.getResourcesString(R.string.my_order_m),bean.Bulk_Weight)
);
SetViewValueUtil.setTextViewValue(SendMan_Address_txet,bean.SendMan_Address);
SetViewValueUtil.setTextViewValue(Operate_DateTime_text,bean.Operate_DateTime);
return convertView;
}
}
|
[
"791954958@qq.com"
] |
791954958@qq.com
|
fc7cf155ec2bb28f10bdfd726cfbd5bcf076a3a4
|
bfe820fdaf9a525245553c0a03ea6bf03e6648a3
|
/marathon-projects/javafx-samples-2.2.80/src/Ensemble/src/ensemble/Pages.java
|
d4d167383a1aa40f0e58fe2c9dff6ffac8097f4a
|
[
"Apache-2.0"
] |
permissive
|
jalian-systems/marathonv5
|
323aee5ea5b1b521063835f604fe6d9c85eabb57
|
d957a6a920b4c458d3db4f684529d3619a3124a2
|
refs/heads/master
| 2022-05-03T01:36:52.214118
| 2021-01-13T08:01:28
| 2021-01-13T08:01:28
| 83,883,701
| 14
| 24
|
Apache-2.0
| 2022-04-19T12:20:52
| 2017-03-04T09:54:47
|
Java
|
UTF-8
|
Java
| false
| false
| 5,302
|
java
|
/*
* Copyright (c) 2008, 2012 Oracle and/or its affiliates.
* All rights reserved. Use is subject to license terms.
*
* This file is available and licensed under the following license:
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the distribution.
* - Neither the name of Oracle Corporation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* 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.
*/
package ensemble;
import ensemble.pages.AllPagesPage;
import ensemble.pages.CategoryPage;
import ensemble.pages.SamplePage;
/**
* Pages
*
*/
public class Pages {
public static final String SAMPLES = "SAMPLES";
public static final String API_DOCS = "API DOCUMENTATION";
public static final String NEW = "NEW!";
public static final String HIGHLIGHTS = "HIGHLIGHTS";
private AllPagesPage root;
private CategoryPage samples;
private CategoryPage docs;
private CategoryPage newSamples;
private CategoryPage highlightedSamples;
public Pages() {
// create all the pages
root = new AllPagesPage();
samples = new CategoryPage(SAMPLES);
docs = new CategoryPage(API_DOCS);
newSamples = new CategoryPage(NEW);
highlightedSamples = new CategoryPage(HIGHLIGHTS);
root.getChildren().addAll(highlightedSamples, newSamples);
root.getChildren().add(samples);
root.getChildren().add(docs);
}
public void parseSamples(){
SampleHelper.getSamples(samples);
// ADD PAGES TO HIGHLIGHTS CATEGORY
highlightedSamples.getChildren().addAll(
new SamplePage((SamplePage)getPage("SAMPLES/Web/Web View")),
new SamplePage((SamplePage)getPage("SAMPLES/Web/H T M L Editor")),
new SamplePage((SamplePage)getPage("SAMPLES/Graphics 3d/Cube")),
new SamplePage((SamplePage)getPage("SAMPLES/Graphics 3d/Cube System")),
new SamplePage((SamplePage)getPage("SAMPLES/Graphics 3d/Xylophone")),
new SamplePage((SamplePage)getPage("SAMPLES/Media/Advanced Media")),
new SamplePage((SamplePage)getPage("SAMPLES/Graphics/Digital Clock")),
new SamplePage((SamplePage)getPage("SAMPLES/Graphics/Display Shelf")),
new SamplePage((SamplePage)getPage("SAMPLES/Charts/Area/Adv Area Audio Chart")),
new SamplePage((SamplePage)getPage("SAMPLES/Charts/Bar/Adv Bar Audio Chart")),
new SamplePage((SamplePage)getPage("SAMPLES/Charts/Line/Advanced Stock Line Chart")),
new SamplePage((SamplePage)getPage("SAMPLES/Charts/Custom/Adv Candle Stick Chart")),
new SamplePage((SamplePage)getPage("SAMPLES/Charts/Scatter/Advanced Scatter Chart"))
);
// ADD PAGES TO NEW CATEGORY
newSamples.getChildren().addAll(
new SamplePage((SamplePage)getPage("SAMPLES/Canvas/Fireworks")),
new SamplePage((SamplePage)getPage("SAMPLES/Controls/Pagination")),
new SamplePage((SamplePage)getPage("SAMPLES/Controls/Color Picker")),
new SamplePage((SamplePage)getPage("SAMPLES/Controls/List/List View Cell Factory")),
new SamplePage((SamplePage)getPage("SAMPLES/Controls/Table/Table Cell Factory")),
new SamplePage((SamplePage)getPage("SAMPLES/Graphics/Images/Image Operator")),
new SamplePage((SamplePage)getPage("SAMPLES/Scenegraph/Events/Multi Touch"))
);
}
public Page getPage(String name) {
Page page = root.getChild(name);
// if (page == null) {
// System.err.print("Can not load page named '" + name + "'");
// }
return page;
}
public Page getHighlighted() {
return highlightedSamples;
}
public Page getNew() {
return newSamples;
}
public Page getSamples() {
return samples;
}
public Page getDocs() {
return docs;
}
public Page getRoot() {
return root;
}
}
|
[
"dakshinamurthy.karra@jaliansystems.com"
] |
dakshinamurthy.karra@jaliansystems.com
|
a7cede886e951b11e457510e811cb85e822fb75d
|
4df0c5aa8186288fc70d1dfd080f5a1b02c181c3
|
/app/views/src/main/java/com/tlabs/android/jeeves/views/wallet/WalletJournalWidget.java
|
8238a45bb601b819b884614ca0be6fafbc9315fe
|
[
"Apache-2.0"
] |
permissive
|
Destidom/evanova
|
0b79f9f9f56d382e519a459e6d3f039e147c00ca
|
1adaaa8af22d2792af82f582970aab5f122eecc7
|
refs/heads/master
| 2021-01-17T23:47:21.837190
| 2016-06-01T21:40:54
| 2016-06-01T21:40:54
| 60,223,233
| 0
| 1
| null | 2016-06-02T01:38:06
| 2016-06-02T01:38:04
| null |
UTF-8
|
Java
| false
| false
| 3,384
|
java
|
package com.tlabs.android.jeeves.views.wallet;
import android.content.Context;
import android.graphics.Color;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.tlabs.android.jeeves.views.EveFormat;
import com.tlabs.android.jeeves.views.R;
import com.tlabs.android.jeeves.views.ui.list.AbstractListRecyclerView;
import com.tlabs.android.jeeves.views.ui.list.AbstractListRowHolder;
import com.tlabs.android.jeeves.views.ui.list.ListRecyclerViewAdapter;
import com.tlabs.eve.api.WalletJournalEntry;
import org.apache.commons.lang3.StringUtils;
public class WalletJournalWidget extends AbstractListRecyclerView<WalletJournalEntry> {
private static final class JournalEntryHolder extends AbstractListRowHolder<WalletJournalEntry> {
private final TextView amountView;
private final TextView balanceView;
private final TextView owner1View;
private final TextView owner2View;
private final TextView reasonView;
private final TextView typeView;
private final TextView whenView;
public JournalEntryHolder(View view) {
super(view);
this.amountView = findView(R.id.j_walletJournalAmount);
this.balanceView = findView(R.id.j_walletJournalBalance);
this.owner1View = findView(R.id.j_walletJournalOwner1);
this.owner2View = findView(R.id.j_walletJournalOwner2);
this.reasonView = findView(R.id.j_walletJournalReason);
this.typeView = findView(R.id.j_walletJournalType);
this.whenView = findView(R.id.j_walletJournalWhen);
}
@Override
public void render(WalletJournalEntry e) {
whenView.setText(EveFormat.DateTime.LONG(e.getWhen(), false));
amountView.setText(EveFormat.Currency.LONG(e.getAmount()));
balanceView.setText(EveFormat.Currency.LONG(e.getBalance()));
owner1View.setText(e.getOwnerName1());
owner2View.setText(e.getOwnerName2());
typeView.setText(e.getRefTypeName());
if((e.getRefTypeID() == 10 || e.getRefTypeID() == 37) && StringUtils.isNotBlank(e.getReason())) {
reasonView.setVisibility(View.VISIBLE);
reasonView.setText(e.getReason());
} else {
reasonView.setVisibility(View.GONE);
}
if (e.getAmount() < 0) {
amountView.setTextColor(Color.RED);
}
else {
amountView.setTextColor(Color.GREEN);
}
}
}
public WalletJournalWidget(Context context) {
super(context);
}
public WalletJournalWidget(Context context, AttributeSet attrs) {
super(context, attrs);
}
public WalletJournalWidget(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@Override
protected ListRecyclerViewAdapter.ViewHolder<WalletJournalEntry> onCreateViewHolder(ViewGroup parent, int viewType) {
return new JournalEntryHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.jeeves_row_wallet_journal, parent, false));
}
@Override
protected long getItemId(WalletJournalEntry item) {
return item.getId();
}
}
|
[
"evanova.mobile@gmail.com"
] |
evanova.mobile@gmail.com
|
f984d7b5bc6b31ab0f773cb609868df01848096b
|
0d7577f21b490c754c3a556e752e223d81e73d96
|
/src/main/java/com/offcn/dao/MobileNumberDao.java
|
1983487f0a248be55397e2e916951397f8fb23a6
|
[] |
no_license
|
chaotain/SelectMobileNum
|
e22eb7651bab2391c836a180e578b5298c7fdb80
|
9ec564448ab507c910e27eb21f7289a394d2ed57
|
refs/heads/master
| 2021-08-27T20:17:29.791856
| 2017-11-28T07:07:47
| 2017-11-28T07:07:47
| 112,294,285
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 155
|
java
|
package com.offcn.dao;
import com.offcn.po.MobileNumber;
public interface MobileNumberDao {
public MobileNumber getnum(String mobilenumber);
}
|
[
"root@qq.com"
] |
root@qq.com
|
bcdee9ad32b4a8e587df1ad5f9dbc526485d3e29
|
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
|
/com.tencent.mm/classes.jar/com/tencent/mm/vending/j/f.java
|
c772b308cfaf03c0218ebec8968f24a7c822f0e9
|
[] |
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
| 282
|
java
|
package com.tencent.mm.vending.j;
public class f<$1, $2, $3, $4, $5>
extends e<$1, $2, $3, $4>
{}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes8.jar
* Qualified Name: com.tencent.mm.vending.j.f
* JD-Core Version: 0.7.0.1
*/
|
[
"98632993+tsuzcx@users.noreply.github.com"
] |
98632993+tsuzcx@users.noreply.github.com
|
92d5a5cb4b3b804da0f290bc3974764ba061c05f
|
4c5e190a9eb4925d5ef4be5f9e7f69f2bae8a9c0
|
/Utils/cleansdk/src/main/java/com/clean/spaceplus/cleansdk/boost/util/ProcessUtils.java
|
eeb76c52dac89e4fd2768cf96b086c3cb2702047
|
[] |
no_license
|
SteamedBunZL/AndroidUtils
|
5bb4346a373b0ef3deace4d7ad69e9deeca90ab2
|
31f9b630f5b67d8608a6b5bfc6caee4cd3c045ee
|
refs/heads/master
| 2020-09-18T05:34:36.300027
| 2018-06-05T06:24:57
| 2018-06-05T06:24:57
| 66,835,083
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,650
|
java
|
package com.clean.spaceplus.cleansdk.boost.util;
import android.app.ActivityManager;
import android.app.Service;
import android.content.ComponentName;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.text.TextUtils;
import com.clean.spaceplus.cleansdk.app.SpaceApplication;
import com.clean.spaceplus.cleansdk.boost.engine.data.ProcessModel;
import com.clean.spaceplus.cleansdk.boost.engine.process.ProcScanResult;
import com.clean.spaceplus.cleansdk.boost.engine.process.ProcessInfo;
import com.clean.spaceplus.cleansdk.util.BackgroundThread;
import com.hawkclean.framework.log.NLog;
/**
* @author zengtao.kuang
* @Description: 杀进程的工具
* @date 2016/4/6 18:44
* @copyright TCL-MIG
*/
public class ProcessUtils {
public static final String TAG = ProcessUtils.class.getSimpleName();
private static ActivityManager sActivityManager = null;
private static PackageManager sPackageManager = null;
private ProcessUtils() {
}
/**后台杀进程*/
public static void killBackground(String pkgName) {
if (TextUtils.isEmpty(pkgName)) {
return ;
}
ActivityManager am = getAm();
if (am != null) {
am.killBackgroundProcesses(pkgName);
}
NLog.d("KillTask", "Restart:" + pkgName);
}
private static class ProcessKillerTask implements Runnable {
private ProcessModel mModel;
public ProcessKillerTask(ProcessModel m) {
mModel = m;
}
@Override
public void run() {
if (mModel.getServComponentList() != null) {
for (ComponentName component : mModel.getServComponentList()) {
Intent intent = new Intent();
intent.setComponent(component);
try {
SpaceApplication.getInstance().getContext().stopService(intent);
} catch (Exception e) {
NLog.printStackTrace(e);
}
}
}
//系统标识的属性
if (mModel.mType == ProcessModel.PROCESS_SYS ||
mModel.isAbnormal() ||
mModel.isInFlexibleWhiteListState() ||
mModel.getExtKillStrategy() == ProcScanResult.STRATEGY_KILL ||
mModel.getCleanStrategy() == ProcessInfo.PROC_STRATEGY_KILL) {
NLog.d(TAG, "KillBackground:" + mModel.getPkgName() + " " + mModel.getTitle() +
" mOOM:" + mModel.getOOMADJ() + " mUID:" + mModel.getUid() +
" mem:" + mModel.getMemory() / 1024 +
" servces:" + mModel.getServicesCount());
restartPackageUtils(getAm(), mModel.getPkgName());
return;
}
//FIXME
/*if (Build.VERSION.SDK_INT > 7 && SuExec.getInstance().checkRoot()) {
ForceStopPkgQueue.getInstance().asyncForceStopPackage(mModel.getPkgName());
NLog.d("KillTask", "ForceStop:" + mModel.getPkgName() +
" mOOM:" + mModel.getOOMADJ() + " mUID:" + mModel.getUid() +
" mem:" + mModel.mGetMemory() / 1024 +
" servces:" + mModel.getServicesCount());
} else */{
restartPackageUtils(getAm(), mModel.getPkgName());
NLog.d(TAG, "KillBackground:" + mModel.getPkgName() +
" mOOM:" + mModel.getOOMADJ() + " mUID:" + mModel.getUid() +
" mem:" + mModel.getMemory() / 1024 +
" servces:" + mModel.getServicesCount());
// it will kill process in background
CleanProcessUtilBackground.getInstance().addProcessModel(mModel);
}
}
}
public static void killAsync(ProcessModel model) {
BackgroundThread.getHandler().post(new ProcessKillerTask(model));
}
public static void killSystem(String packageName) {
restartPackageUtils(getAm(), packageName);
}
private static void restartPackageUtils(ActivityManager am, String packageName) {
try {
am.restartPackage(packageName);
} catch (SecurityException e) {
} catch (Exception e) {
}
}
private synchronized static ActivityManager getAm() {
if (sActivityManager == null) {
sActivityManager = (ActivityManager) SpaceApplication.getInstance().getContext().getSystemService(Service.ACTIVITY_SERVICE);
}
return sActivityManager;
}
}
|
[
"stevezhang@tcl.com"
] |
stevezhang@tcl.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.