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
5ebc53e75f806106b52317e18562b98baa942992
51fa3cc281eee60058563920c3c9059e8a142e66
/Java/src/testcases/CWE191_Integer_Underflow/s03/CWE191_Integer_Underflow__int_URLConnection_multiply_71b.java
8246624687ddd2e54be912504f9030255a39f69e
[]
no_license
CU-0xff/CWE-Juliet-TestSuite-Java
0b4846d6b283d91214fed2ab96dd78e0b68c945c
f616822e8cb65e4e5a321529aa28b79451702d30
refs/heads/master
2020-09-14T10:41:33.545462
2019-11-21T07:34:54
2019-11-21T07:34:54
223,105,798
1
4
null
null
null
null
UTF-8
Java
false
false
2,346
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE191_Integer_Underflow__int_URLConnection_multiply_71b.java Label Definition File: CWE191_Integer_Underflow__int.label.xml Template File: sources-sinks-71b.tmpl.java */ /* * @description * CWE: 191 Integer Underflow * BadSource: URLConnection Read data from a web server with URLConnection * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: multiply * GoodSink: Ensure there will not be an underflow before multiplying data by 2 * BadSink : If data is negative, multiply by 2, which can cause an underflow * Flow Variant: 71 Data flow: data passed as an Object reference argument from one method to another in different classes in the same package * * */ package testcases.CWE191_Integer_Underflow.s03; import testcasesupport.*; import javax.servlet.http.*; public class CWE191_Integer_Underflow__int_URLConnection_multiply_71b { public void badSink(Object dataObject ) throws Throwable { int data = (Integer)dataObject; if(data < 0) /* ensure we won't have an overflow */ { /* POTENTIAL FLAW: if (data * 2) < Integer.MIN_VALUE, this will underflow */ int result = (int)(data * 2); IO.writeLine("result: " + result); } } /* goodG2B() - use goodsource and badsink */ public void goodG2BSink(Object dataObject ) throws Throwable { int data = (Integer)dataObject; if(data < 0) /* ensure we won't have an overflow */ { /* POTENTIAL FLAW: if (data * 2) < Integer.MIN_VALUE, this will underflow */ int result = (int)(data * 2); IO.writeLine("result: " + result); } } /* goodB2G() - use badsource and goodsink */ public void goodB2GSink(Object dataObject ) throws Throwable { int data = (Integer)dataObject; if(data < 0) /* ensure we won't have an overflow */ { /* FIX: Add a check to prevent an underflow from occurring */ if (data > (Integer.MIN_VALUE/2)) { int result = (int)(data * 2); IO.writeLine("result: " + result); } else { IO.writeLine("data value is too small to perform multiplication."); } } } }
[ "frank@fischer.com.mt" ]
frank@fischer.com.mt
2d4783b4c876aea4c2a532b202b208f8e5354b03
ae10be2acd490fd6e1650093d647ea6091181399
/BPMConsoleApp/src/main/java/com/rhiscom/bpm/console/shared/model/rs/TaskWrapper.java
763734d5e4d07c632e32a6ebb902fbc86c0da71e
[]
no_license
gschwarz/nickel
10d2906a109132ce0e0a4b5f1b90e6b4617f92f9
e6e5f704209716733699452edbd292dcf7c4165c
refs/heads/master
2021-01-10T10:59:58.728630
2015-09-23T19:44:42
2015-09-23T19:44:42
43,008,358
0
0
null
null
null
null
UTF-8
Java
false
false
246
java
package com.rhiscom.bpm.console.shared.model.rs; public class TaskWrapper { private TaskDetailRS tasks; public TaskDetailRS getTasks() { return tasks; } public void setTasks(TaskDetailRS tasks) { this.tasks = tasks; } }
[ "guillermo.schwarz@gmail.com" ]
guillermo.schwarz@gmail.com
20970c86379b5d8244c424d9bd2727c633abb218
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
/ast_results/fmetzger_android-sensorium/Sensorium/src/org/xmlrpc/android/IXMLRPCSerializer.java
5de6da09dcd29a176fe5e5ed878340db9bb964f8
[]
no_license
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
0564143d92f8024ff5fa6b659c2baebf827582b1
refs/heads/master
2020-07-13T13:53:40.297493
2019-01-11T11:51:18
2019-01-11T11:51:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,148
java
// isComment package org.xmlrpc.android; import java.io.IOException; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; import org.xmlpull.v1.XmlSerializer; public interface isClassOrIsInterface { String isVariable = "isStringConstant"; String isVariable = "isStringConstant"; String isVariable = "isStringConstant"; String isVariable = "isStringConstant"; String isVariable = "isStringConstant"; String isVariable = "isStringConstant"; String isVariable = "isStringConstant"; String isVariable = "isStringConstant"; String isVariable = "isStringConstant"; String isVariable = "isStringConstant"; String isVariable = "isStringConstant"; String isVariable = "isStringConstant"; String isVariable = "isStringConstant"; String isVariable = "isStringConstant"; // isComment String isVariable = "isStringConstant"; String isVariable = "isStringConstant"; void isMethod(XmlSerializer isParameter, Object isParameter) throws IOException; Object isMethod(XmlPullParser isParameter) throws XmlPullParserException, IOException; }
[ "matheus@melsolucoes.net" ]
matheus@melsolucoes.net
acdfae039e656ed04d66605186ee1822b722de4a
4a3ab0ac1d106330c556b80bd012d6648455993f
/kettle-ext/src/main/java/org/flhy/ext/job/steps/JobEntryWaitForSQL.java
b9ebde8cb609e5c43d2ee367ce1c65e356b45130
[]
no_license
Maxcj/KettleWeb
2e490e87103d14a069be4f1cf037d11423503d38
75be8f65584fe0880df6f6d637c72bcb1a66c4cd
refs/heads/master
2022-12-21T06:56:34.756989
2022-02-05T03:03:57
2022-02-05T03:03:57
192,645,149
13
10
null
2022-12-16T02:43:00
2019-06-19T02:36:43
JavaScript
UTF-8
Java
false
false
4,452
java
package org.flhy.ext.job.steps; import java.util.List; import org.flhy.ext.App; import org.flhy.ext.core.PropsUI; import org.flhy.ext.job.step.AbstractJobEntry; import org.flhy.ext.utils.JSONArray; import org.flhy.ext.utils.JSONObject; import org.flhy.ext.utils.StringEscapeHelper; import org.pentaho.di.core.Const; import org.pentaho.di.core.ObjectLocationSpecificationMethod; import org.pentaho.di.core.database.DatabaseMeta; import org.pentaho.di.core.logging.LogLevel; import org.pentaho.di.job.entry.JobEntryInterface; import org.pentaho.di.repository.ObjectId; import org.pentaho.di.repository.Repository; import org.pentaho.di.repository.RepositoryDirectoryInterface; import org.pentaho.di.repository.RepositoryElementMetaInterface; import org.pentaho.di.repository.RepositoryObject; import org.pentaho.di.repository.RepositoryObjectType; import org.pentaho.di.repository.StringObjectId; import org.pentaho.metastore.api.IMetaStore; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; import org.springframework.util.StringUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; import com.mxgraph.model.mxCell; import com.mxgraph.util.mxUtils; @Component("WAIT_FOR_SQL") @Scope("prototype") public class JobEntryWaitForSQL extends AbstractJobEntry { @Override public void decode(JobEntryInterface jobEntry, mxCell cell, List<DatabaseMeta> databases, IMetaStore metaStore) throws Exception { org.pentaho.di.job.entries.waitforsql.JobEntryWaitForSQL jobEntryWaitForSQL = (org.pentaho.di.job.entries.waitforsql.JobEntryWaitForSQL) jobEntry; //一般---服务器设置 jobEntryWaitForSQL.customSQL=(StringEscapeHelper.decode(cell.getAttribute("customSQL"))); String con = cell.getAttribute( "connection" ); jobEntryWaitForSQL.setDatabase(DatabaseMeta.findDatabase( databases, con )); jobEntryWaitForSQL.schemaname=cell.getAttribute("schemaname"); jobEntryWaitForSQL.tablename=(cell.getAttribute("tablename")); jobEntryWaitForSQL.successCondition= jobEntryWaitForSQL.getSuccessConditionByDesc(cell.getAttribute( "successCondition" )); jobEntryWaitForSQL.rowsCountValue=Const.NVL(cell.getAttribute("rowsCountValue"), "0"); jobEntryWaitForSQL.setMaximumTimeout(cell.getAttribute("maximumTimeout")); jobEntryWaitForSQL.setCheckCycleTime(cell.getAttribute("checkCycleTime")); jobEntryWaitForSQL.setSuccessOnTimeout("Y".equalsIgnoreCase(cell.getAttribute("successOnTimeout"))); jobEntryWaitForSQL.iscustomSQL=("Y".equalsIgnoreCase(cell.getAttribute("iscustomSQL"))); jobEntryWaitForSQL.isUseVars=("Y".equalsIgnoreCase(cell.getAttribute("isUseVars"))); jobEntryWaitForSQL.isClearResultList=("Y".equalsIgnoreCase(cell.getAttribute("isClearResultList"))); jobEntryWaitForSQL.isAddRowsResult=("Y".equalsIgnoreCase(cell.getAttribute("isAddRowsResult"))); } @Override public Element encode(JobEntryInterface jobEntry) throws Exception { org.pentaho.di.job.entries.waitforsql.JobEntryWaitForSQL jobEntryWaitForSQL = (org.pentaho.di.job.entries.waitforsql.JobEntryWaitForSQL) jobEntry; String[] successConditionsCode = org.pentaho.di.job.entries.evaluatetablecontent.JobEntryEvalTableContent.successConditionsCode; Document doc = mxUtils.createDocument(); Element e = doc.createElement(PropsUI.JOB_JOBENTRY_NAME); //一般---服务器设置 e.setAttribute("customSQL", StringEscapeHelper.encode(jobEntryWaitForSQL.customSQL)); e.setAttribute("connection", jobEntryWaitForSQL.getDatabase() == null ? "" : jobEntryWaitForSQL.getDatabase().getName()); e.setAttribute("schemaname", jobEntryWaitForSQL.schemaname ); e.setAttribute("tablename", jobEntryWaitForSQL.tablename); e.setAttribute("successCondition", successConditionsCode[jobEntryWaitForSQL.getSuccessCondition()]); e.setAttribute("rowsCountValue", jobEntryWaitForSQL.rowsCountValue ); e.setAttribute("maximumTimeout", jobEntryWaitForSQL.getMaximumTimeout() ); e.setAttribute("checkCycleTime", jobEntryWaitForSQL.getCheckCycleTime() ); e.setAttribute("successOnTimeout", jobEntryWaitForSQL.isSuccessOnTimeout() ? "Y" : "N"); e.setAttribute("iscustomSQL", jobEntryWaitForSQL.iscustomSQL ? "Y" : "N"); e.setAttribute("isUseVars", jobEntryWaitForSQL.isUseVars ? "Y" : "N"); e.setAttribute("isClearResultList", jobEntryWaitForSQL.isClearResultList ? "Y" : "N"); e.setAttribute("isAddRowsResult", jobEntryWaitForSQL.isAddRowsResult ? "Y" : "N"); return e; } }
[ "903283542@qq.com" ]
903283542@qq.com
6b7ebc27166b26a09aaec7fa2b3a8558860fee3d
eadbd6ba5a2d5c960ffa9788f5f7e79eeb98384d
/src/com/google/android/m4b/maps/bv/d.java
9870850780b3e00335c848e589446f6d2868c5d3
[]
no_license
marcoucou/com.tinder
37edc3b9fb22496258f3a8670e6349ce5b1d8993
c68f08f7cacf76bf7f103016754eb87b1c0ac30d
refs/heads/master
2022-04-18T23:01:15.638983
2020-04-14T18:04:10
2020-04-14T18:04:10
255,685,521
0
0
null
2020-04-14T18:00:06
2020-04-14T18:00:05
null
UTF-8
Java
false
false
1,815
java
package com.google.android.m4b.maps.bv; import java.lang.reflect.Field; public final class d<T> extends b.a { private final T a; private d(T paramT) { a = paramT; } public static <T> b a(T paramT) { return new d(paramT); } public static <T> T a(b paramb) { if ((paramb instanceof d)) { return (T)a; } paramb = paramb.asBinder(); Object localObject = paramb.getClass().getDeclaredFields(); if (localObject.length == 1) { localObject = localObject[0]; if (!((Field)localObject).isAccessible()) { ((Field)localObject).setAccessible(true); try { paramb = ((Field)localObject).get(paramb); return paramb; } catch (NullPointerException paramb) { throw new IllegalArgumentException("Binder object is null.", paramb); } catch (IllegalArgumentException paramb) { throw new IllegalArgumentException("remoteBinder is the wrong class.", paramb); } catch (IllegalAccessException paramb) { throw new IllegalArgumentException("Could not access the field in remoteBinder.", paramb); } } throw new IllegalArgumentException("The concrete class implementing IObjectWrapper must have exactly one declared *private* field for the wrapped object. Preferably, this is an instance of the ObjectWrapper<T> class."); } throw new IllegalArgumentException("The concrete class implementing IObjectWrapper must have exactly *one* declared private field for the wrapped object. Preferably, this is an instance of the ObjectWrapper<T> class."); } } /* Location: * Qualified Name: com.google.android.m4b.maps.bv.d * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
badaf0ee907e53979c20487d43a77e9dc3ed4ec6
4a4ec1ed1980cfeef63458335361278b1747233c
/flutter_1/android/app/src/main/java/com/shui/flutter_1/MainActivity.java
621a64132979a22ea6ecd192693345fa012caa9a
[]
no_license
shuile/Flutter
451903ee38ce5b819e315cc453e48de791422618
47f19f57b42b8a7f42c9153467feea23654fa9ef
refs/heads/master
2020-07-04T09:50:15.463740
2020-04-06T12:23:54
2020-04-06T12:23:54
202,247,021
0
0
null
null
null
null
UTF-8
Java
false
false
363
java
package com.shui.flutter_1; import android.os.Bundle; import io.flutter.app.FlutterActivity; import io.flutter.plugins.GeneratedPluginRegistrant; public class MainActivity extends FlutterActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); GeneratedPluginRegistrant.registerWith(this); } }
[ "chenyiting1995@gmail.com" ]
chenyiting1995@gmail.com
f97f8244f41e53b1609d7f13f6b8b6e125438b7c
e9124854d2bb3a40f6642858f3777e89a88b1d54
/custom/toint/tointbackoffice/src/org/tointbackoffice/YacceleratorbackofficeStandalone.java
e03414ba464533f3787bbfe6136a444a51bfdd52
[]
no_license
Prashanth-techouts/Toint
9bcba94fd0422f20131c24cd9e0ec19e789941d6
dbd466fae6303a6c796ffd52f169119a4a7ee134
refs/heads/master
2023-09-03T02:20:49.827317
2021-10-22T10:48:30
2021-10-22T10:48:30
419,990,956
0
0
null
null
null
null
UTF-8
Java
false
false
1,582
java
/* * Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. */ package org.tointbackoffice; import de.hybris.platform.core.Registry; import de.hybris.platform.jalo.JaloSession; import de.hybris.platform.util.RedeployUtilities; import de.hybris.platform.util.Utilities; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Demonstration of how to write a standalone application that can be run directly from within eclipse or from the * commandline.<br> * To run this from commandline, just use the following command:<br> * <code> * java -jar bootstrap/bin/ybootstrap.jar "new org.tointbackoffice.YacceleratorbackofficeStandalone().run();" * </code> From eclipse, just run as Java Application. Note that you maybe need to add all other projects like * ext-commerce, ext-pim to the Launch configuration classpath. */ public class YacceleratorbackofficeStandalone { private static final Logger LOG = LoggerFactory.getLogger(YacceleratorbackofficeStandalone.class); /** * Main class to be able to run it directly as a java program. * * @param args * the arguments from commandline */ public static void main(final String[] args) { new YacceleratorbackofficeStandalone().run(); } public void run() { Registry.activateStandaloneMode(); Registry.activateMasterTenant(); final JaloSession jaloSession = JaloSession.getCurrentSession(); LOG.info("Session ID: {}", jaloSession.getSessionID()); LOG.info("User: {}", jaloSession.getUser()); Utilities.printAppInfo(); RedeployUtilities.shutdown(); } }
[ "prashanth.g@techouts.com" ]
prashanth.g@techouts.com
5269d94b4b2803133950973d8a78edbc2d37296d
a33aac97878b2cb15677be26e308cbc46e2862d2
/data/libgdx/Array_contains.java
ce24bb48bcbb12f312660e02154c8b7e9051cd2b
[]
no_license
GabeOchieng/ggnn.tensorflow
f5d7d0bca52258336fc12c9de6ae38223f28f786
7c62c0e8427bea6c8bec2cebf157b6f1ea70a213
refs/heads/master
2022-05-30T11:17:42.278048
2020-05-02T11:33:31
2020-05-02T11:33:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
570
java
/** * Returns if this array contains value. * @param value May be null. * @param identity If true, == comparison will be used. If false, .equals() comparison will be used. * @return true if array contains value, false if it doesn't */ public boolean contains(T value, boolean identity) { T[] items = this.items; int i = size - 1; if (identity || value == null) { while (i >= 0) if (items[i--] == value) return true; } else { while (i >= 0) if (value.equals(items[i--])) return true; } return false; }
[ "bdqnghi@gmail.com" ]
bdqnghi@gmail.com
1a18a0d26d2809d301202389163ee2683db4cd0e
f82c3317d83f6fa3108141729a9756b85c13a397
/config-server-git/src/test/java/com/winter/ConfigServerGitApplicationTests.java
975b1a006ca57a58fb2d07a0cd2a01dc29ddde23
[]
no_license
WinterChenS/spring-cloud
bc7c09a50560d3c506c78e6cd18e7a6c8f630d8a
362e08868cf651ea21a91da94e888cdf42a5b4f5
refs/heads/master
2021-05-15T17:24:27.293984
2017-10-19T06:36:16
2017-10-19T06:36:16
107,507,515
1
0
null
null
null
null
UTF-8
Java
false
false
336
java
package com.winter; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class ConfigServerGitApplicationTests { @Test public void contextLoads() { } }
[ "1085143002@qq.com" ]
1085143002@qq.com
658729ecf3faffb817a191b2102bbb250f5eee8d
c8c59aafc5811b12fc3f888a75fa62dfc78084d8
/src/main/java/org/valesz/crypt/core/atbas/AtbasOutput.java
5208e7a7731aea7a5462dba1e66ee5b4705e0a54
[]
no_license
Cajova-Houba/BIT-sifry
9f0010cd5d3e14082a7514a6d1c501c2532ca9c9
d7eacf21669ae0d227d91a596fe7ef9ac4fe4afe
refs/heads/master
2021-01-22T20:34:26.903748
2017-05-17T11:32:29
2017-05-17T11:32:29
85,330,974
0
0
null
null
null
null
UTF-8
Java
false
false
385
java
package org.valesz.crypt.core.atbas; import org.valesz.crypt.core.EncryptionMethodOutput; /** * Created by Zdenek Vales on 17.4.2017. */ public class AtbasOutput implements EncryptionMethodOutput { private final String openText; public AtbasOutput(String openText) { this.openText = openText; } public String getText() { return openText; } }
[ "tkmushroomer@gmail.com" ]
tkmushroomer@gmail.com
00cf87b7c008335badd439b4309fa1a87e4ecc38
8f322f02a54dd5e012f901874a4e34c5a70f5775
/src/main/java/PTUCharacterCreator/Feats/Cute_Cuddle_Rank_2.java
6e077a1ba421c1bb0e442dabcb254087e530a83a
[]
no_license
BMorgan460/PTUCharacterCreator
3514a4040eb264dec69aee90d95614cb83cb53d8
e55f159587f2cb8d6d7b456e706f910ba5707b14
refs/heads/main
2023-05-05T08:26:04.277356
2021-05-13T22:11:25
2021-05-13T22:11:25
348,419,608
0
0
null
null
null
null
UTF-8
Java
false
false
694
java
package PTUCharacterCreator.Feats; import PTUCharacterCreator.Trainer; import PTUCharacterCreator.Feature; public class Cute_Cuddle_Rank_2 extends Feature { { name = "Cute Cuddle Rank 2"; tags = "[Ranked 2]"; frequency = "X AP - Special"; effect = "Your Pokemon with at least 3d6 in their Cute Stat from Poffins may activate Cute Cuddle as a Standard Action to perform one of the following Moves. They must still follow frequency limits as usual for these Moves. X is the Rank of the chosen Move. Rank 2: Teeter Dance, Attract"; prereqs.put("Charm", 5); } public Cute_Cuddle_Rank_2(){} @Override public boolean checkPrereqs(Trainer t) { return t.checkSkillRank("Charm",5); } }
[ "alaskablake460@gmail.com" ]
alaskablake460@gmail.com
ddaf2df529ef43c9ca148dc889830c922ddd5380
d95553f04ce6f1383b4646ed7fd63c7d6de6fa1a
/src/main/java/ch/stoeoeoe/demo/config/JacksonConfiguration.java
b1d07910a3b32b5ab49969f6f0ca1239903c151c
[]
no_license
wangxinxx/flowableSimpleDemoApplication
fb7a246d4db230e622080cac4967a52e047693b8
687f5e11d6aa120ff0cb3350230f799d699c134b
refs/heads/master
2020-05-27T05:17:34.286435
2018-06-26T17:07:03
2018-06-26T17:07:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,230
java
package ch.stoeoeoe.demo.config; import com.fasterxml.jackson.datatype.hibernate5.Hibernate5Module; import com.fasterxml.jackson.module.afterburner.AfterburnerModule; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.zalando.problem.ProblemModule; import org.zalando.problem.validation.ConstraintViolationProblemModule; @Configuration public class JacksonConfiguration { /* * Support for Hibernate types in Jackson. */ @Bean public Hibernate5Module hibernate5Module() { return new Hibernate5Module(); } /* * Jackson Afterburner module to speed up serialization/deserialization. */ @Bean public AfterburnerModule afterburnerModule() { return new AfterburnerModule(); } /* * Module for serialization/deserialization of RFC7807 Problem. */ @Bean ProblemModule problemModule() { return new ProblemModule(); } /* * Module for serialization/deserialization of ConstraintViolationProblem. */ @Bean ConstraintViolationProblemModule constraintViolationProblemModule() { return new ConstraintViolationProblemModule(); } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
ba371dcc5cce0535dd282d73e2fe2cbeb74a00cf
8ccd1c071b19388f1f2e92c5e5dbedc78fead327
/src/main/java/ohos/com/sun/org/apache/xalan/internal/xsltc/compiler/CastCall.java
ea5927dcbe943781427bfff298bc4bcd6342c4f5
[]
no_license
yearsyan/Harmony-OS-Java-class-library
d6c135b6a672c4c9eebf9d3857016995edeb38c9
902adac4d7dca6fd82bb133c75c64f331b58b390
refs/heads/main
2023-06-11T21:41:32.097483
2021-06-24T05:35:32
2021-06-24T05:35:32
379,816,304
6
3
null
null
null
null
UTF-8
Java
false
false
2,834
java
package ohos.com.sun.org.apache.xalan.internal.xsltc.compiler; import java.util.Vector; import ohos.com.sun.org.apache.bcel.internal.generic.CHECKCAST; import ohos.com.sun.org.apache.bcel.internal.generic.ConstantPoolGen; import ohos.com.sun.org.apache.bcel.internal.generic.InstructionList; import ohos.com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator; import ohos.com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg; import ohos.com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator; import ohos.com.sun.org.apache.xalan.internal.xsltc.compiler.util.ObjectType; import ohos.com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type; import ohos.com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError; final class CastCall extends FunctionCall { private String _className; private Expression _right; public CastCall(QName qName, Vector vector) { super(qName, vector); } @Override // ohos.com.sun.org.apache.xalan.internal.xsltc.compiler.FunctionCall, ohos.com.sun.org.apache.xalan.internal.xsltc.compiler.Expression, ohos.com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode public Type typeCheck(SymbolTable symbolTable) throws TypeCheckError { if (argumentCount() == 2) { Expression argument = argument(0); if (argument instanceof LiteralExpr) { this._className = ((LiteralExpr) argument).getValue(); this._type = Type.newObjectType(this._className); this._right = argument(1); Type typeCheck = this._right.typeCheck(symbolTable); if (typeCheck == Type.Reference || (typeCheck instanceof ObjectType)) { return this._type; } throw new TypeCheckError(new ErrorMsg("DATA_CONVERSION_ERR", typeCheck, this._type, this)); } throw new TypeCheckError(new ErrorMsg(ErrorMsg.NEED_LITERAL_ERR, (Object) getName(), (SyntaxTreeNode) this)); } throw new TypeCheckError(new ErrorMsg(ErrorMsg.ILLEGAL_ARG_ERR, (Object) getName(), (SyntaxTreeNode) this)); } @Override // ohos.com.sun.org.apache.xalan.internal.xsltc.compiler.FunctionCall, ohos.com.sun.org.apache.xalan.internal.xsltc.compiler.Expression, ohos.com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode public void translate(ClassGenerator classGenerator, MethodGenerator methodGenerator) { ConstantPoolGen constantPool = classGenerator.getConstantPool(); InstructionList instructionList = methodGenerator.getInstructionList(); this._right.translate(classGenerator, methodGenerator); instructionList.append(new CHECKCAST(constantPool.addClass(this._className))); } }
[ "yearsyan@gmail.com" ]
yearsyan@gmail.com
782f6ac1b2519ae5fd0b86c77519ed79686b742c
a4ac6d6667571a50f13e2243adbbdd2237dea0ec
/TYJP/Programming/src/com/numbertheory/Q21.java
6e923a1fd1693294bf3e9f91a94a30df7d4c8217
[]
no_license
SHAIKTOUSIF/Test-Repository
2d70ca35c66450cc974780ca0ba343bf867a45a7
c6a7167de05aac31f083bd691b793b839145d6d3
refs/heads/master
2020-07-05T17:55:50.874800
2020-05-15T06:54:44
2020-05-15T06:54:44
202,719,646
1
0
null
null
null
null
UTF-8
Java
false
false
597
java
//21. Develop a program to find out given number is a prime or not? package com.numbertheory; import java.util.Scanner; public class Q21 { public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.println("Enter the Number To Check It is Prime or Not"); int n=sc.nextInt(); //int n=15; boolean isPrime=true; int i=3; for(int j=2;j<n;j++) { if(n%j==0) { isPrime=false; break; } i++; }if(isPrime==false) { System.out.println("Not a Prime Number"); } else { System.out.println("It is prime number"); } } }
[ "tousif@LAPTOP-P04MERIM" ]
tousif@LAPTOP-P04MERIM
dc860186b125e1dac84152f36e678ed24de72ebf
847e2e8fa1c43eff5dee99c086d8280230b9cabc
/fluorite-aop/src/main/java/org/zy/fluorite/aop/aspectj/annotation/Aspect.java
3dea34d57d3ca370e51a583fb1a15987737852a6
[]
no_license
azurite-Y/Fluorite
fc4baa6a6f89d6efa22c07ed135d00335d06681b
313e5e14d15deeb56575d4a561da1496eb72616f
refs/heads/master
2023-01-24T20:34:59.422279
2020-12-10T04:15:55
2020-12-10T04:15:55
269,019,237
0
0
null
null
null
null
UTF-8
Java
false
false
496
java
package org.zy.fluorite.aop.aspectj.annotation; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * @DateTime 2020年7月5日 下午10:54:43; * @author zy(azurite-Y); * @Description 标记一个类为切面类。 */ @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface Aspect {}
[ "15969413461@163.com" ]
15969413461@163.com
b2915598a288708008cad3ef29a40822e31eb512
d7d7b0c25a923a699ffa579e1bab546435443302
/NGServer/NettyTransfers/src/main/java/net/transfer/client/HeaderExchanger.java
8c8870f2f15e02a4f73d5667107354926d4a3cc5
[]
no_license
github188/test-3
9cd2417319161a014df8b54aa68579843ade8885
92c8b20ba19185fca1e0293fe7208102b338a9ca
refs/heads/master
2020-03-15T09:36:37.329325
2017-12-18T02:40:21
2017-12-18T02:40:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
442
java
package net.transfer.client; public class HeaderExchanger implements Exchanger { public ExchangerServer bind(BindTicket ticket,ExchangerHandler handler) throws RemotingException { return new HeaderExchangeServer(Transporters.bind(ticket,handler)); } public ExchangerClient connect(ConnectTicket ticket,ExchangerHandler handler) throws RemotingException { return new HeaderExchangeClient(Transporters.connect(ticket,handler)); } }
[ "645236219@qq.com" ]
645236219@qq.com
e0c60959d4693664535960f02a6aecc3657ebc5a
f65d8efd8488c3f26ec272067534453916bb433b
/algorithm-study/src/main/java/org/woodwhale/code/chapter_4_recursionanddp/Problem_05_LIS.java
3cc5f843cec4f4a2467b0be58028563b6d5ce5f3
[ "WTFPL" ]
permissive
woodwhales/woodwhales-study
3c63d08e7aff503484905ea857ba389d5ee972d6
d8b95c559d3223b54211418bce78b9d9d41f9b08
refs/heads/master
2023-03-04T16:04:59.516245
2022-08-21T07:16:20
2022-08-21T07:16:20
184,915,908
2
3
WTFPL
2023-03-01T03:42:52
2019-05-04T16:00:32
Java
UTF-8
Java
false
false
1,882
java
package org.woodwhale.code.chapter_4_recursionanddp; public class Problem_05_LIS { public static int[] lis1(int[] arr) { if (arr == null || arr.length == 0) { return null; } int[] dp = getdp1(arr); return generateLIS(arr, dp); } public static int[] getdp1(int[] arr) { int[] dp = new int[arr.length]; for (int i = 0; i < arr.length; i++) { dp[i] = 1; for (int j = 0; j < i; j++) { if (arr[i] > arr[j]) { dp[i] = Math.max(dp[i], dp[j] + 1); } } } return dp; } public static int[] generateLIS(int[] arr, int[] dp) { int len = 0; int index = 0; for (int i = 0; i < dp.length; i++) { if (dp[i] > len) { len = dp[i]; index = i; } } int[] lis = new int[len]; lis[--len] = arr[index]; for (int i = index; i >= 0; i--) { if (arr[i] < arr[index] && dp[i] == dp[index] - 1) { lis[--len] = arr[i]; index = i; } } return lis; } public static int[] lis2(int[] arr) { if (arr == null || arr.length == 0) { return null; } int[] dp = getdp2(arr); return generateLIS(arr, dp); } public static int[] getdp2(int[] arr) { int[] dp = new int[arr.length]; int[] ends = new int[arr.length]; ends[0] = arr[0]; dp[0] = 1; int right = 0; int l = 0; int r = 0; int m = 0; for (int i = 1; i < arr.length; i++) { l = 0; r = right; while (l <= r) { m = (l + r) / 2; if (arr[i] > ends[m]) { l = m + 1; } else { r = m - 1; } } right = Math.max(right, l); ends[l] = arr[i]; dp[i] = l + 1; } return dp; } // for test public static void printArray(int[] arr) { for (int i = 0; i != arr.length; i++) { System.out.print(arr[i] + " "); } System.out.println(); } public static void main(String[] args) { int[] arr = { 2, 1, 5, 3, 6, 4, 8, 9, 7 }; printArray(arr); printArray(lis1(arr)); printArray(lis2(arr)); } }
[ "woodwhales@163.com" ]
woodwhales@163.com
70df0924feeb3b0a8b97064697ba6024243cf979
2f78662326a50972673a74af2f650df927cbe0fc
/designpattern/src/main/java/com/yuruiyin/designpattern/state/TvController.java
efd93806ee5efd5b0e9a2080d157217923cac780
[]
no_license
MatadorC/AndroidDesignPattern
e8dbca9682d3597b2528902f4aa884bfb8648f47
14f630e445c938d94754f9e7425b6d7922e44f5d
refs/heads/master
2021-09-20T03:21:16.503493
2018-08-02T12:17:56
2018-08-02T12:17:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,221
java
package com.yuruiyin.designpattern.state; /** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2018</p> * <P>Company: 17173</p> * * @author yuruiyin * @version 2018/7/27 */ public class TvController implements PowerController { private TvState mTvState; public void setTvState(TvState tvState) { this.mTvState = tvState; } @Override public void powerOn() { if (mTvState != null && mTvState instanceof PowerOnState) { System.out.println("已处于开机状态"); return; } setTvState(new PowerOnState()); System.out.println("开机啦!"); } @Override public void powerOff() { if (mTvState != null && mTvState instanceof PowerOffState) { System.out.println("已处于关机状态"); return; } setTvState(new PowerOffState()); System.out.println("关机啦!"); } public void nextChannel() { mTvState.nextChannel(); } public void preChannel() { mTvState.preChannel(); } public void turnUp() { mTvState.turnUp(); } public void turnDown() { mTvState.turnDown(); } }
[ "yuruiyin@cyou-inc.com" ]
yuruiyin@cyou-inc.com
11d15e36af8ad23604ffc79596cf13003e72a51f
8e25e486dbcd83a0fe0d41ae5657465f225760a6
/src/main/java/PointAtOffer/Q38_FindPath.java
25a66e3f4b77a0b574cc2ccb1e8b8ca0901d400c
[]
no_license
Maecenas/PointAtOffer
1ec50a5559963ae1b5e3cd7d63035db4343db855
6ed162915646418c4278992021455985c5e6fa1f
refs/heads/master
2020-05-15T03:54:49.425595
2019-08-27T06:50:14
2019-08-27T06:50:14
182,075,387
4
0
null
null
null
null
UTF-8
Java
false
false
947
java
package PointAtOffer; import PointAtOffer.utils.TreeNode; import java.util.ArrayList; import java.util.List; public class Q38_FindPath { public static List<List<Integer>> findPath(TreeNode<Integer> root, int target) { if (root == null) return new ArrayList<>(); List<List<Integer>> res = new ArrayList<>(); backtracking(root, target, res, new ArrayList<>()); return res; } private static void backtracking(final TreeNode<Integer> node, int target, final List<List<Integer>> res, final List<Integer> path) { if (node == null) return; path.add(node.val); target -= node.val; if (target == 0 && node.left == null && node.right == null) { res.add(new ArrayList<>(path)); } else { backtracking(node.left, target, res, path); backtracking(node.right, target, res, path); } path.remove(path.size() - 1); } }
[ "lx70716@gmail.com" ]
lx70716@gmail.com
7dfc3a26e98405cc565cfdf7f5926dd1e21c5086
bbcd1ca59601057feaca183ef534028853d9300e
/lwh-gl/gl-product/src/main/java/com/lwhtarena/glmall/product/exception/GulimallExceptionControllerAdvice.java
57ab07842fd17cd71fe516e41b150e5dc6592863
[]
no_license
hkkkkq/cloud
214f95e1c0a07af99339219119b7200ff6b8056f
ee21c997ed02ec69ff5b97c78851894c5c25301b
refs/heads/master
2023-01-01T05:03:44.237792
2020-10-22T16:32:56
2020-10-22T16:32:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,038
java
package com.lwhtarena.glmall.product.exception; import com.lwhtarena.common.exception.BizCodeEnume; import com.lwhtarena.common.utils.R; import lombok.extern.slf4j.Slf4j; import org.springframework.validation.BindingResult; import org.springframework.web.bind.MethodArgumentNotValidException; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.RestControllerAdvice; import java.util.HashMap; import java.util.Map; /** * @author liwh * @Title: GulimallExceptionControllerAdvice * @Package com.lwhtarena.glmall.product.exception * @Description: 集中处理所有异常 * @ResponseBody + @ControllerAdvice = @ControllerAdvice * @Version 1.0.0 * @date 2020/7/28 12:47 */ //@ResponseBody //@ControllerAdvice(basePackages = "com.lwhtarena.glmall.product.controller") @Slf4j @RestControllerAdvice(basePackages = "com.lwhtarena.glmall.product.controller") public class GulimallExceptionControllerAdvice { /** * 精确匹配 * @param e * @return */ @ExceptionHandler(value= MethodArgumentNotValidException.class) public R handleVaildException(MethodArgumentNotValidException e){ log.error("数据校验出现问题{},异常类型:{}",e.getMessage(),e.getClass()); BindingResult bindingResult = e.getBindingResult(); Map<String,String> errorMap = new HashMap<>(); bindingResult.getFieldErrors().forEach((fieldError)->{ errorMap.put(fieldError.getField(),fieldError.getDefaultMessage()); }); return R.error(BizCodeEnume.VAILD_EXCEPTION.getCode(),BizCodeEnume.VAILD_EXCEPTION.getMsg()).put("data",errorMap); } /** * 匹配不了的异常,全往这边抛出 * @param throwable * @return */ @ExceptionHandler(value = Throwable.class) public R handleException(Throwable throwable){ log.error("错误:",throwable); return R.error(BizCodeEnume.UNKNOW_EXCEPTION.getCode(),BizCodeEnume.UNKNOW_EXCEPTION.getMsg()); } }
[ "lwhtarena@163.com" ]
lwhtarena@163.com
e1977c2d10e4ec2f1f937084796da07383fa8771
755f880331c011a2f3685146cae37d74cdf42f92
/core/applib/src/main/java/org/apache/isis/applib/types/TargetClassType.java
914e1400eb94a6311ca90a0e70d9f9222c854e0f
[ "Apache-2.0" ]
permissive
frankydee/isis
376ea525e9c86f389b6630689291c6b78e0d2e29
84a55cf0e152f304a807bfc125c44a529cab910c
refs/heads/master
2020-03-18T08:28:34.051161
2018-05-22T13:42:21
2018-05-22T13:42:21
108,916,012
0
0
Apache-2.0
2018-05-23T04:04:04
2017-10-30T22:36:59
Java
UTF-8
Java
false
false
1,433
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.isis.applib.types; import java.sql.Timestamp; import java.util.UUID; import org.apache.isis.applib.services.bookmark.Bookmark; import org.apache.isis.applib.services.command.Command; /** * A user-friendly name of a class, as per {@link Command#getTargetClass()}, {@link org.apache.isis.applib.services.audit.AuditerService#audit(UUID, int, String, Bookmark, String, String, String, String, String, Timestamp)}. */ public class TargetClassType { private TargetClassType() {} public static class Meta { public static final int MAX_LEN = 50; private Meta() {} } }
[ "dan@haywood-associates.co.uk" ]
dan@haywood-associates.co.uk
5699c86d3932f7c8dcb064d625e74eff5ded8762
dccaf61ebcb7f9d85f4ec127439768b9809419ec
/common/src/main/java/x/common/component/network/HttpStatus.java
814559c76e05eb8a5eb97caf775f8d081654115f
[]
no_license
ccolorcat/XArchitecture
9e9f7a4c8dcae5a4f1ae1b402292b5afb163facf
d827e96938454140b88351a9a23d463cb225b4be
refs/heads/master
2023-03-18T15:09:36.846331
2021-03-08T03:52:58
2021-03-08T03:52:58
344,747,305
0
0
null
null
null
null
UTF-8
Java
false
false
706
java
package x.common.component.network; /** * Author: cxx * Date: 2020-07-21 * GitHub: https://github.com/ccolorcat */ public final class HttpStatus { public static final int STATUS_UNKNOWN = -70; public static final String MSG_UNKNOWN = "unknown"; public static final int STATUS_EXECUTED = -80; public static final String MSG_EXECUTED = "already executed"; public static final int STATUS_CANCELED = -90; public static final String MSG_CANCELED = "canceled"; public static final int STATUS_CONNECTION_ERROR = -100; public static final String MSG_CONNECTION_ERROR = "connection error"; private HttpStatus() { throw new AssertionError("no instance"); } }
[ "xx.ch@outlook.com" ]
xx.ch@outlook.com
52e1aae698f972eea048cf07e45bcafe4d24d157
deb3a451da04b11f413425b93dea69d14f777ab2
/src/com/javarush/test/level14/lesson06/home01/UkrainianHen.java
5054f4ada67b67f3097f19f59c8a01238e967410
[]
no_license
kelebro13/JavaRushHomeWork
59d1cd8c9aad715eb518b26d76b4e5a125308caa
5ae4cf7cdeb5bbb97bdbda8832fb41faab370434
refs/heads/master
2020-09-22T08:25:56.755170
2016-08-17T12:26:34
2016-08-17T12:26:34
65,905,504
0
0
null
null
null
null
WINDOWS-1251
Java
false
false
281
java
package com.javarush.test.level14.lesson06.home01; /** * Created by DNS on 22.09.2015. */ public class UkrainianHen extends Hen { public int getCountOfEggsPerMonth(){ return 1200; } public String getDescription(){ return "Я курица."; } }
[ "tgumerov@gmail.com" ]
tgumerov@gmail.com
75673c68ea081460c1811743e6b0a1c270a510a9
a355888f7e0634ea2324f30aee4af68c587ad3c7
/src/main/java/org/gridgain/spring/SpringWorkshopApplication.java
e1c2a439b15bb4aefd86d92dfff6d09f4811fb0e
[]
no_license
GridGain-Demos/ignite-spring-workshop
519b6b543fa67bf4cf0d390b1f6d04a931674b06
9d9b2c555da4fac2feb8bbe309ff6e7dabf04621
refs/heads/master
2023-03-21T00:48:04.014151
2021-03-21T11:59:55
2021-03-21T11:59:55
349,152,034
2
1
null
null
null
null
UTF-8
Java
false
false
449
java
package org.gridgain.spring; import org.apache.ignite.springdata22.repository.config.EnableIgniteRepositories; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication @EnableIgniteRepositories public class SpringWorkshopApplication { public static void main(String[] args) { SpringApplication.run(SpringWorkshopApplication.class, args); } }
[ "samvimes@yandex.ru" ]
samvimes@yandex.ru
0835a9e678cb86278e6dba769951bae3ec5c8816
4fa6bf128efda662e894d89a0f441ea615089941
/spring-core/src/main/java/org/springframework/core/task/SyncTaskExecutor.java
50ab985893a4f461a8f561cc017e376abd9230c5
[ "Apache-2.0" ]
permissive
Donaldhan/spring-framework-4.3.x
ac9d9b7258779c409dfb6181bb1effbbba1a2b42
e550e78198916426acba43c3555518bf349c7e49
refs/heads/master
2023-02-20T18:43:19.308759
2021-01-25T06:54:44
2021-01-25T06:54:44
272,670,929
0
0
null
null
null
null
UTF-8
Java
false
false
2,195
java
/* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.core.task; import java.io.Serializable; import org.springframework.util.Assert; /** * {@link TaskExecutor} implementation that executes each task <i>synchronously</i> * in the calling thread. * 任务执行器在调用线程中同步执行任务的实现。 * <p>Mainly intended for testing scenarios. * 主要用于测试场景。 * <p>Execution in the calling thread does have the advantage of participating * in it's thread context, for example the thread context class loader or the * thread's current transaction association. That said, in many cases, * asynchronous execution will be preferable: choose an asynchronous * {@code TaskExecutor} instead for such scenarios. * 在调用线程中执行的好处,在于可以参与所属线程的上下文,比如线程上下文类加载器,或者 * 线程当前关联事务。也就是说,在大多数场景中,异步执行会更好:这种情况下,选择异步任务执行器。 * @author Juergen Hoeller * @since 2.0 * @see SimpleAsyncTaskExecutor */ @SuppressWarnings("serial") public class SyncTaskExecutor implements TaskExecutor, Serializable { /** * Executes the given {@code task} synchronously, through direct * invocation of it's {@link Runnable#run() run()} method. * 通知直接调用线程的run方法,同步执行给定的任务。 * @throws IllegalArgumentException if the given {@code task} is {@code null} */ @Override public void execute(Runnable task) { Assert.notNull(task, "Runnable must not be null"); task.run(); } }
[ "shaoqinghan@aliyun.com" ]
shaoqinghan@aliyun.com
2ac54b446bd0bfdceb85e1230216a51d3d03cf8e
41bac86d728e5f900e3d60b5a384e7f00c966f5b
/communote/persistence/src/main/java/com/communote/server/core/blog/MailBasedPostingManagement.java
ba89f295dcb92391c6f9b72d3e73c548299a8c15
[ "Apache-2.0" ]
permissive
Communote/communote-server
f6698853aa382a53d43513ecc9f7f2c39f527724
e6a3541054baa7ad26a4eccbbdd7fb8937dead0c
refs/heads/master
2021-01-20T19:13:11.466831
2019-02-02T18:29:16
2019-02-02T18:29:16
61,822,650
27
4
Apache-2.0
2018-12-08T19:19:06
2016-06-23T17:06:40
Java
UTF-8
Java
false
false
422
java
package com.communote.server.core.blog; /** * * @author Communote GmbH - <a href="http://www.communote.com/">http://www.communote.com/</a> */ public interface MailBasedPostingManagement { /** * <p> * Creates a UserTaggedPost from an email message. * </p> */ public void createNoteFromMail(javax.mail.Message message, String senderEmail, java.util.Set<String> blogNameIds); }
[ "ronny.winkler@communote.com" ]
ronny.winkler@communote.com
8a30391f554b27803462c3005c61ec8a40df144d
aa3ba2ad769e595f64d42d321e3d407c2622e20d
/src/main/java/com/praxar/repository/AuthorityRepository.java
cba72431c3e5a0af6a7d792f859197703c171851
[]
no_license
praxem/sapp
07e6642758b29503744d5215158898ae2d1c7661
e5b83e55ce51f875d54a5a14ca98a3bc8471882e
refs/heads/master
2022-12-25T14:34:42.477584
2020-02-05T21:13:33
2020-02-05T21:13:33
238,546,743
0
0
null
2022-12-16T04:43:50
2020-02-05T20:55:15
Java
UTF-8
Java
false
false
286
java
package com.praxar.repository; import com.praxar.domain.Authority; import org.springframework.data.jpa.repository.JpaRepository; /** * Spring Data JPA repository for the {@link Authority} entity. */ public interface AuthorityRepository extends JpaRepository<Authority, String> { }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
3eeab0cf83b2e252b3d410e321d0ae91078b71b4
bcaf346cb544a1947b8007ddc4f9bc41c01625b5
/src/main/java/com/mugua/common/config/MyWebAppConfigurer.java
35e96ac69bf29c287a2a4fced8157d7d8fb6debd
[]
no_license
wangshuangchao/kamang-server
8a8441da25d7b1660128d4bbcbd4898d8fede55d
2ca46170dcf652abbdbdd3631f7057272c622f7a
refs/heads/master
2020-04-05T19:59:44.306582
2018-11-12T05:23:08
2018-11-12T05:23:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
764
java
package com.mugua.common.config; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; import com.mugua.common.interceptor.ErrorInterceptor; @Configuration public class MyWebAppConfigurer extends WebMvcConfigurerAdapter { @Override public void addInterceptors(InterceptorRegistry registry) { // 多个拦截器组成一个拦截器链 // addPathPatterns 用于添加拦截规则 // excludePathPatterns 用户排除拦截 registry.addInterceptor(new ErrorInterceptor()).addPathPatterns("/**"); super.addInterceptors(registry); } }
[ "286958067@qq.com" ]
286958067@qq.com
82e1d85bebc8bfff5aa83f510409e7919a13f1c4
13f6652c77abd41d4bc944887e4b94d8dff40dde
/archstudio/src/archstudio/comp/archipelago/AbstractMappingLogic.java
483550156eebe232a2868b5866b3cfd333a80d4a
[]
no_license
isr-uci-edu/ArchStudio3
5bed3be243981d944577787f3a47c7a94c8adbd3
b8aeb7286ea00d4b6c6a229c83b0ee0d1c9b2960
refs/heads/master
2021-01-10T21:01:43.330204
2014-05-31T16:15:53
2014-05-31T16:15:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
614
java
package archstudio.comp.archipelago; import edu.uci.ics.bna.*; import edu.uci.ics.xarchutils.*; import archstudio.comp.xarchtrans.*; public abstract class AbstractMappingLogic implements MappingLogic{ protected BNAModel[] bnaModels; protected XArchFlatTransactionsInterface xarch; public AbstractMappingLogic(BNAModel[] bnaModels, XArchFlatTransactionsInterface xarch){ this.bnaModels = bnaModels; this.xarch = xarch; } public void handleXArchFlatEvent(XArchFlatEvent evt){ } public void handleXArchFileEvent(XArchFileEvent evt){ } public void bnaModelChanged(BNAModelEvent evt){ } }
[ "sahendrickson@gmail.com" ]
sahendrickson@gmail.com
376732f505810d627452649eb385d4fde6728858
e0b11a101c6ef411b5b281d3e6a09242bdef96cc
/day15 秒杀总结&限流&简历&企业中的日常流量数据/代码/qf-big-data-seckill/web/src/main/java/com/qf/bigdata/view/web/ViewWebApplication.java
564e02e29ae934463aaa06d4ced958198cf286ce
[]
no_license
lei720/phase-4
9bf26ef8877eebf1d8fa70998807a087ece73b57
3a9cb4d27a3cc7e1f907b29b941ce1e4e3d9ac3d
refs/heads/main
2023-08-18T17:59:23.504331
2021-10-16T06:08:37
2021-10-16T06:08:37
417,735,056
0
0
null
2021-10-16T06:07:07
2021-10-16T06:07:07
null
UTF-8
Java
false
false
415
java
package com.qf.bigdata.view.web; import com.alibaba.dubbo.config.spring.context.annotation.EnableDubbo; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication //@EnableDubbo public class ViewWebApplication { public static void main(String[] args) { SpringApplication.run(ViewWebApplication.class, args); } }
[ "790165133@qq.com" ]
790165133@qq.com
a3e2bea35eeb1b110a4d3dc500dcdced6141dc67
723d372f73b84e4df3f664a2a3a08cd694af9dab
/src/org/openrdf/query/algebra/evaluation/federation/ServiceJoinConversionIteration.java
755913d7d5c6d907b571926588f4bfca34b449ff
[]
no_license
Thanx7/bookstore
f0a901d9abc1d203111e0cc866064d4fedd95ba8
53d5b591fceb8b1a28d1426bf1a24da99d81defb
refs/heads/master
2020-06-02T20:48:48.529800
2014-08-26T14:02:39
2014-08-26T14:02:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,030
java
/* * Copyright fluid Operations AG (http://www.fluidops.com/) (c) 2011. * * Licensed under the Aduna BSD-style license. */ package org.openrdf.query.algebra.evaluation.federation; import java.util.Iterator; import java.util.List; import info.aduna.iteration.CloseableIteration; import info.aduna.iteration.ConvertingIteration; import org.openrdf.query.Binding; import org.openrdf.query.BindingSet; import org.openrdf.query.QueryEvaluationException; import org.openrdf.query.algebra.evaluation.QueryBindingSet; /** * Inserts original bindings into the result, uses ?__rowIdx to resolve original * bindings. See {@link ServiceJoinIterator} and {@link SPARQLFederatedService}. * * @author Andreas Schwarte */ public class ServiceJoinConversionIteration extends ConvertingIteration<BindingSet, BindingSet, QueryEvaluationException> { protected final List<BindingSet> bindings; public ServiceJoinConversionIteration( CloseableIteration<BindingSet, QueryEvaluationException> iter, List<BindingSet> bindings) { super(iter); this.bindings = bindings; } @Override protected BindingSet convert(BindingSet bIn) throws QueryEvaluationException { // overestimate the capacity QueryBindingSet res = new QueryBindingSet(bIn.size() + bindings.size()); int bIndex = -1; Iterator<Binding> bIter = bIn.iterator(); while (bIter.hasNext()) { Binding b = bIter.next(); String name = b.getName(); if (name.equals("__rowIdx")) { bIndex = Integer.parseInt(b.getValue().stringValue()); continue; } res.addBinding(b.getName(), b.getValue()); } // should never occur: in such case we would have to create the cross product (which // is dealt with in another place) if (bIndex == -1) throw new QueryEvaluationException("Invalid join. Probably this is due to non-standard behavior of the SPARQL endpoint. " + "Please report to the developers."); res.addAll(bindings.get(bIndex)); return res; } }
[ "Aliaksandr_Doubeikovsky@epam.com" ]
Aliaksandr_Doubeikovsky@epam.com
4e9b66f774d16ded4071bb166426e9789e426ccd
ffeaf567e9b1aadb4c00d95cd3df4e6484f36dcd
/Talagram/org/telegram/ui/Adapters/-$$Lambda$MentionsAdapter$RtUwcbbmysCllxWaHytbPO9oFzY.java
a6153d408952f2824b0574fbb78be51690d011bb
[]
no_license
danielperez9430/Third-party-Telegram-Apps-Spy
dfe541290c8512ca366e401aedf5cc5bfcaa6c3e
f6fc0f9c677bd5d5cd3585790b033094c2f0226d
refs/heads/master
2020-04-11T23:26:06.025903
2018-12-18T10:07:20
2018-12-18T10:07:20
162,166,647
0
0
null
null
null
null
UTF-8
Java
false
false
615
java
package org.telegram.ui.Adapters; import android.util.SparseArray; import java.util.ArrayList; import java.util.Comparator; import org.telegram.tgnet.TLRPC$User; public final class -$$Lambda$MentionsAdapter$RtUwcbbmysCllxWaHytbPO9oFzY implements Comparator { public -$$Lambda$MentionsAdapter$RtUwcbbmysCllxWaHytbPO9oFzY(SparseArray arg1, ArrayList arg2) { super(); this.f$0 = arg1; this.f$1 = arg2; } public final int compare(Object arg3, Object arg4) { return MentionsAdapter.lambda$searchUsernameOrHashtag$5(this.f$0, this.f$1, ((User)arg3), ((User)arg4)); } }
[ "dpefe@hotmail.es" ]
dpefe@hotmail.es
89ba3279dc3258fc53843c01afa815c036e2e9e9
425ac2b3d2ba036202c1dc72c561d3a904df33ad
/api/cas-server-core-api-configuration-model/src/main/java/org/apereo/cas/configuration/model/support/scim/ScimProperties.java
7f875ca40edb9991d30e8d2ab7fa3a06c1694773
[ "LicenseRef-scancode-free-unknown", "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
fogbeam/cas_mirror
fee69b4b1a7bf5cac87da75b209edc3cc3c1d5d6
b7daea814f1238e95a6674663b2553555a5b2eed
refs/heads/master
2023-01-07T08:34:26.200966
2021-08-12T19:14:41
2021-08-12T19:14:41
41,710,765
1
2
Apache-2.0
2022-12-27T15:39:03
2015-09-01T01:53:24
Java
UTF-8
Java
false
false
1,355
java
package org.apereo.cas.configuration.model.support.scim; import org.apereo.cas.configuration.support.RequiredProperty; import org.apereo.cas.configuration.support.RequiresModule; import lombok.Getter; import lombok.Setter; import lombok.experimental.Accessors; import java.io.Serializable; /** * This is {@link ScimProperties}. * * @author Misagh Moayyed * @since 5.1.0 */ @RequiresModule(name = "cas-server-support-scim") @Getter @Setter @Accessors(chain = true) public class ScimProperties implements Serializable { private static final long serialVersionUID = 7943229230342691009L; /** * Decide whether scim should be enabled. */ private boolean enabled = true; /** * Indicate what version of the scim protocol is and should be used. */ private long version = 2; /** * The SCIM provisioning target URI. */ @RequiredProperty private String target; /** * Authenticate into the SCIM server/service via a pre-generated OAuth token. */ @RequiredProperty private String oauthToken; /** * Authenticate into the SCIM server with a pre-defined username. */ @RequiredProperty private String username; /** * Authenticate into the SCIM server with a pre-defined password. */ @RequiredProperty private String password; }
[ "mm1844@gmail.com" ]
mm1844@gmail.com
069f084c02b1cfb0931a85ac531805f44415ec8b
e7a4d6068f276af6e17f0209d85b9496aacd2f5c
/code/spring-security-parent/csrf-1/src/main/java/com/zync/security/csrf1/Csrf1Application.java
ff4a790cfcbf4cb5b2d9d52d55aa9840155a972c
[ "Apache-2.0" ]
permissive
luocong2013/study
be8e3d1b658e84734b02d64cf8506da80cf69747
7b2243a7e921671675d96d0b753c882762c5556f
refs/heads/master
2023-08-30T22:52:11.857988
2023-08-10T08:11:48
2023-08-10T08:11:48
148,992,527
0
1
Apache-2.0
2023-07-23T14:22:38
2018-09-16T12:16:22
HTML
UTF-8
Java
false
false
353
java
package com.zync.security.csrf1; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; /** * @author luocong */ @SpringBootApplication public class Csrf1Application { public static void main(String[] args) { SpringApplication.run(Csrf1Application.class, args); } }
[ "luocong2013@outlook.com" ]
luocong2013@outlook.com
00a96cbc8abb5e6f07ac9a82279b949752d3a23c
3b22a684e1540d58d07bc6a12ab09584884c273d
/hybris/bin/platform/bootstrap/gensrc/de/hybris/platform/core/model/type/MapTypeModel.java
300891a7eb92a0f919604b281ea81cb9d78654cb
[]
no_license
ScottGledhill/HYB
955221b824b8f0d1b0e584d3f80c2e48bc0c19d9
0c91735fe889bc47878c851445220dbcae7ca281
refs/heads/master
2021-07-25T20:00:36.924559
2017-10-27T14:17:02
2017-10-27T14:17:02
108,548,668
0
0
null
null
null
null
UTF-8
Java
false
false
5,381
java
/* * ---------------------------------------------------------------- * --- WARNING: THIS FILE IS GENERATED AND WILL BE OVERWRITTEN! --- * --- Generated at 27-Oct-2017 13:57:00 --- * ---------------------------------------------------------------- * * [y] hybris Platform * * Copyright (c) 2000-2016 SAP SE * All rights reserved. * * This software is the confidential and proprietary information of SAP * Hybris ("Confidential Information"). You shall not disclose such * Confidential Information and shall use it only in accordance with the * terms of the license agreement you entered into with SAP Hybris. * */ package de.hybris.platform.core.model.type; import de.hybris.bootstrap.annotations.Accessor; import de.hybris.platform.core.model.ItemModel; import de.hybris.platform.core.model.type.TypeModel; import de.hybris.platform.servicelayer.model.ItemModelContext; /** * Generated model class for type MapType first defined at extension core. */ @SuppressWarnings("all") public class MapTypeModel extends TypeModel { /**<i>Generated model type code constant.</i>*/ public final static String _TYPECODE = "MapType"; /** <i>Generated constant</i> - Attribute key of <code>MapType.argumentType</code> attribute defined at extension <code>core</code>. */ public static final String ARGUMENTTYPE = "argumentType"; /** <i>Generated constant</i> - Attribute key of <code>MapType.returntype</code> attribute defined at extension <code>core</code>. */ public static final String RETURNTYPE = "returntype"; /** * <i>Generated constructor</i> - Default constructor for generic creation. */ public MapTypeModel() { super(); } /** * <i>Generated constructor</i> - Default constructor for creation with existing context * @param ctx the model context to be injected, must not be null */ public MapTypeModel(final ItemModelContext ctx) { super(ctx); } /** * <i>Generated constructor</i> - Constructor with all mandatory attributes. * @deprecated Since 4.1.1 Please use the default constructor without parameters * @param _argumentType initial attribute declared by type <code>MapType</code> at extension <code>core</code> * @param _code initial attribute declared by type <code>Type</code> at extension <code>core</code> * @param _generate initial attribute declared by type <code>TypeManagerManaged</code> at extension <code>core</code> * @param _returntype initial attribute declared by type <code>MapType</code> at extension <code>core</code> */ @Deprecated public MapTypeModel(final TypeModel _argumentType, final String _code, final Boolean _generate, final TypeModel _returntype) { super(); setArgumentType(_argumentType); setCode(_code); setGenerate(_generate); setReturntype(_returntype); } /** * <i>Generated constructor</i> - for all mandatory and initial attributes. * @deprecated Since 4.1.1 Please use the default constructor without parameters * @param _argumentType initial attribute declared by type <code>MapType</code> at extension <code>core</code> * @param _code initial attribute declared by type <code>Type</code> at extension <code>core</code> * @param _generate initial attribute declared by type <code>TypeManagerManaged</code> at extension <code>core</code> * @param _owner initial attribute declared by type <code>Item</code> at extension <code>core</code> * @param _returntype initial attribute declared by type <code>MapType</code> at extension <code>core</code> */ @Deprecated public MapTypeModel(final TypeModel _argumentType, final String _code, final Boolean _generate, final ItemModel _owner, final TypeModel _returntype) { super(); setArgumentType(_argumentType); setCode(_code); setGenerate(_generate); setOwner(_owner); setReturntype(_returntype); } /** * <i>Generated method</i> - Getter of the <code>MapType.argumentType</code> attribute defined at extension <code>core</code>. * @return the argumentType */ @Accessor(qualifier = "argumentType", type = Accessor.Type.GETTER) public TypeModel getArgumentType() { return getPersistenceContext().getPropertyValue(ARGUMENTTYPE); } /** * <i>Generated method</i> - Getter of the <code>MapType.returntype</code> attribute defined at extension <code>core</code>. * @return the returntype */ @Accessor(qualifier = "returntype", type = Accessor.Type.GETTER) public TypeModel getReturntype() { return getPersistenceContext().getPropertyValue(RETURNTYPE); } /** * <i>Generated method</i> - Initial setter of <code>MapType.argumentType</code> attribute defined at extension <code>core</code>. Can only be used at creation of model - before first save. * * @param value the argumentType */ @Accessor(qualifier = "argumentType", type = Accessor.Type.SETTER) public void setArgumentType(final TypeModel value) { getPersistenceContext().setPropertyValue(ARGUMENTTYPE, value); } /** * <i>Generated method</i> - Initial setter of <code>MapType.returntype</code> attribute defined at extension <code>core</code>. Can only be used at creation of model - before first save. * * @param value the returntype */ @Accessor(qualifier = "returntype", type = Accessor.Type.SETTER) public void setReturntype(final TypeModel value) { getPersistenceContext().setPropertyValue(RETURNTYPE, value); } }
[ "ScottGledhill@hotmail.co.uk" ]
ScottGledhill@hotmail.co.uk
abacb97a45b3fc2175dc0ab2af8afbf363c4f969
94dafb3bf3b6919bf4fcb3d460173077bfa29676
/platform/src/main/java/com/wdcloud/lms/business/strategy/modulecontentmove/ModuleContentMoveStrategy.java
5ed731c859ef35b2b2bceec49c7d66b52e7003ac
[]
no_license
Miaosen1202/1126Java
b0fbe58e51b821b1ec8a8ffcfb24b21d578f1b5f
7c896cffa3c51a25658b76fbef76b83a8963b050
refs/heads/master
2022-06-24T12:33:14.369136
2019-11-26T05:49:55
2019-11-26T05:49:55
224,112,546
0
0
null
2021-02-03T19:37:54
2019-11-26T05:48:48
Java
UTF-8
Java
false
false
627
java
package com.wdcloud.lms.business.strategy.modulecontentmove; import com.wdcloud.lms.base.enums.MoveStrategyEnum; import com.wdcloud.lms.business.strategy.Strategy; /** * @author 赵秀非 */ @SuppressWarnings({"JavaDoc", "SpringJavaAutowiredFieldsWarningInspection"}) public interface ModuleContentMoveStrategy extends Strategy { /** * 本组移动或跨组移动 * * @param id moduleId * @param targetModuleId 目标moduleId * @param targetItemId 目标itemId */ void move(Long sourceModuleId, Long targetModuleId, Long targetItemId); MoveStrategyEnum support(); }
[ "miaosen1202@163.com" ]
miaosen1202@163.com
eb9f64825a2fbdf1419cd81448614a5e3ae76e43
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
/Code Snippet Repository/Hibernate/Hibernate2482.java
38cc76565eb6f6c54d9a6f9143e5ef54def608d4
[]
no_license
saber13812002/DeepCRM
3336a244d4852a364800af3181e03e868cf6f9f5
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
refs/heads/master
2023-03-16T00:08:06.473699
2018-04-18T05:29:50
2018-04-18T05:29:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
256
java
public void clear() { if ( managedToMergeEntitiesXref != null ) { managedToMergeEntitiesXref.clear(); managedToMergeEntitiesXref = null; } if ( countsByEntityName != null ) { countsByEntityName.clear(); countsByEntityName = null; } }
[ "Qing.Mi@my.cityu.edu.hk" ]
Qing.Mi@my.cityu.edu.hk
91084bdf5c87f023bdef983bf1aaeae26e5d6a2f
2c42ff8e677790139f972934d0604ed9baf61930
/JavaIdea/handwrite/src/main/java/com/cxz/Service/IUserRoleService.java
1a66d36ac931c1380120f18a9394520734cdaf0c
[]
no_license
DukeTiny/education
ee845c0e5b0d171337c6f52052e054379e1ddc1b
8ec8aaec07897ca93d16b08a7ef431beb680eaf3
refs/heads/master
2022-12-25T03:46:06.741009
2019-10-15T17:11:04
2019-10-15T17:11:04
215,351,747
0
0
null
2022-12-16T09:59:04
2019-10-15T16:56:27
TSQL
UTF-8
Java
false
false
138
java
package com.cxz.Service; import com.cxz.domain.User_Role_Key; public interface IUserRoleService { void save(User_Role_Key urk); }
[ "329087464@qq.com" ]
329087464@qq.com
89059e4dbb53ac6ca6cc2558400d1bdc377658e5
94228df04c8d71ef72d0278ed049e9eac43566bc
/modules/materialsummary/materialsummary-api/src/main/java/com/bjike/goddess/materialsummary/api/InStockAreaYearSumAPI.java
27111163e715c4bc7f0a9660595453e2eca88c01
[]
no_license
yang65700/goddess-java
b1c99ac4626c29651250969d58d346b7a13eb9ad
3f982a3688ee7c97d8916d9cb776151b5af8f04f
refs/heads/master
2021-04-12T11:10:39.345659
2017-09-12T02:32:51
2017-09-12T02:32:51
126,562,737
0
0
null
2018-03-24T03:33:53
2018-03-24T03:33:53
null
UTF-8
Java
false
false
2,082
java
package com.bjike.goddess.materialsummary.api; import com.bjike.goddess.common.api.exception.SerException; import com.bjike.goddess.materialsummary.bo.InStockAreaYearSumBO; import com.bjike.goddess.materialsummary.dto.InStockAreaYearSumDTO; import com.bjike.goddess.materialsummary.to.InStockAreaYearSumTO; import java.util.List; /** * 入库地区年汇总业务接口 * * @Author: [ sunfengtao ] * @Date: [ 2017-05-22 11:11 ] * @Description: [ 入库地区年汇总业务接口 ] * @Version: [ v1.0.0 ] * @Copy: [ com.bjike ] */ public interface InStockAreaYearSumAPI { /** * 根据id查询入库地区年汇总 * * @param id 入库地区年汇总唯一标识 * @return class InStockAreaYearSumBO * @throws SerException */ InStockAreaYearSumBO findById(String id) throws SerException; /** * 计算总条数 * * @param dto 入库地区年汇总dto * @throws SerException */ Long count(InStockAreaYearSumDTO dto) throws SerException; /** * 分页查询入库地区年汇总 * * @param dto 入库地区年汇总dto * @return class InStockAreaYearSumBO * @throws SerException */ List<InStockAreaYearSumBO> list(InStockAreaYearSumDTO dto) throws SerException; /** * 保存入库地区年汇总 * * @param to 入库地区年汇总to * @return class InStockAreaYearSumBO * @throws SerException */ InStockAreaYearSumBO save(InStockAreaYearSumTO to) throws SerException; /** * 根据id删除入库地区年汇总 * * @param id 入库地区年汇总唯一标识 * @throws SerException */ void remove(String id) throws SerException; /** * 更新入库地区年汇总 * * @param to 入库地区年汇总to * @throws SerException */ void update(InStockAreaYearSumTO to) throws SerException; /** * 汇总 * * @return class InStockAreaYearSumBO * @throws SerException */ List<InStockAreaYearSumBO> summary() throws SerException; }
[ "sunfengtao_aj@163.com" ]
sunfengtao_aj@163.com
2c5bbb63301154455fed79729bc2aecdfd2a574c
f123c92704e5aa15dfd2e3ab0ecb3c7dfb8b87f2
/LOTR/src/main/java/lotr/common/block/LOTRBlockThatchFloor.java
362b592b96a334e0171a50d19f119545764b85d2
[]
no_license
Myrninvollo/LOTR-Minecraft-Mod
2dcaabb659bfc10b41332f975209f2f8cd7e3f55
97843fd05ae9fc7a7f61021fbe288db0f0b4298b
refs/heads/master
2020-12-30T22:58:22.274461
2014-10-12T19:06:55
2014-10-12T19:06:55
24,939,635
1
1
null
2014-10-12T19:06:55
2014-10-08T12:30:52
null
UTF-8
Java
false
false
1,299
java
package lotr.common.block; import lotr.common.LOTRCreativeTabs; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; public class LOTRBlockThatchFloor extends Block { public LOTRBlockThatchFloor() { super(Material.carpet); setHardness(0.2F); setStepSound(Block.soundTypeGrass); setCreativeTab(LOTRCreativeTabs.tabDeco); setBlockBounds(0F, 0F, 0F, 1F, 0.0625F, 1F); } @Override public boolean isOpaqueCube() { return false; } @Override public boolean renderAsNormalBlock() { return false; } @Override public boolean canBlockStay(World world, int i, int j, int k) { return world.getBlock(i, j - 1, k).isSideSolid(world, i, j - 1, k, ForgeDirection.UP); } @Override public boolean canPlaceBlockAt(World world, int i, int j, int k) { return canBlockStay(world, i, j, k); } @Override public void onNeighborBlockChange(World world, int i, int j, int k, Block block) { if (!canBlockStay(world, i, j, k)) { dropBlockAsItem(world, i, j, k, world.getBlockMetadata(i, j, k), 0); world.setBlockToAir(i, j, k); } } }
[ "jakegerzimbke@live.co.uk" ]
jakegerzimbke@live.co.uk
6131adf4dcb47b4df375fbe445bcc0230dad90d4
d7713ec38f22ef3a72873bbc814c663f9901a331
/bboss_security/src/main/java/codec/asn1/ASN1RegisteredType.java
5aa8d61410c2542b47adefa3dc20eb8b8d2b229e
[ "Apache-2.0" ]
permissive
besom/bbossgroups-mvn
3a658b4786ca3965a20c484f2f27bb1f56f43431
364defa5bc5fc52e9ac5bc25e491720f697529c6
refs/heads/master
2021-01-15T12:50:42.427585
2014-12-16T03:21:01
2014-12-16T03:21:01
27,861,629
1
1
null
2016-03-09T18:35:23
2014-12-11T08:33:46
Java
UTF-8
Java
false
false
4,637
java
/* ======================================================================== * * This file is part of CODEC, which is a Java package for encoding * and decoding ASN.1 data structures. * * Author: Fraunhofer Institute for Computer Graphics Research IGD * Department A8: Security Technology * Fraunhoferstr. 5, 64283 Darmstadt, Germany * * Rights: Copyright (c) 2004 by Fraunhofer-Gesellschaft * zur Foerderung der angewandten Forschung e.V. * Hansastr. 27c, 80686 Munich, Germany. * * ------------------------------------------------------------------------ * * The software package is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of the * License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software package; if not, write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA or obtain a copy of the license at * http://www.fsf.org/licensing/licenses/lgpl.txt. * * ------------------------------------------------------------------------ * * The CODEC library can solely be used and distributed according to * the terms and conditions of the GNU Lesser General Public License for * non-commercial research purposes and shall not be embedded in any * products or services of any user or of any third party and shall not * be linked with any products or services of any user or of any third * party that will be commercially exploited. * * The CODEC library has not been tested for the use or application * for a determined purpose. It is a developing version that can * possibly contain errors. Therefore, Fraunhofer-Gesellschaft zur * Foerderung der angewandten Forschung e.V. does not warrant that the * operation of the CODEC library will be uninterrupted or error-free. * Neither does Fraunhofer-Gesellschaft zur Foerderung der angewandten * Forschung e.V. warrant that the CODEC library will operate and * interact in an uninterrupted or error-free way together with the * computer program libraries of third parties which the CODEC library * accesses and which are distributed together with the CODEC library. * * Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. * does not warrant that the operation of the third parties's computer * program libraries themselves which the CODEC library accesses will * be uninterrupted or error-free. * * Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. * shall not be liable for any errors or direct, indirect, special, * incidental or consequential damages, including lost profits resulting * from the combination of the CODEC library with software of any user * or of any third party or resulting from the implementation of the * CODEC library in any products, systems or services of any user or * of any third party. * * Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. * does not provide any warranty nor any liability that utilization of * the CODEC library will not interfere with third party intellectual * property rights or with any other protected third party rights or will * cause damage to third parties. Fraunhofer Gesellschaft zur Foerderung * der angewandten Forschung e.V. is currently not aware of any such * rights. * * The CODEC library is supplied without any accompanying services. * * ======================================================================== */ package codec.asn1; /** * This class represents an ASN.1 type that is officially registered. In other * words, this type is associated with a unique OID. * * @author Volker Roth * @version "$Id: ASN1RegisteredType.java,v 1.3 2004/08/06 15:14:52 flautens Exp $" */ public interface ASN1RegisteredType extends ASN1Type { /** * This method returns the official OID that identifies this ASN.1 type. * * @return The official ASN.1 OID of this type. */ public ASN1ObjectIdentifier getOID(); }
[ "gaotang@192.168.1.103" ]
gaotang@192.168.1.103
79407a613e381edc169640349ce944c18c19e2c9
a96ce2d9214838bf145a971df874304e3f8c4913
/oes-common/oes-common-core/src/main/java/com/oes/common/core/constant/RegexpConstant.java
11c4082c95904d24188c9c238c8dcb4243002eec
[ "Apache-2.0" ]
permissive
YunShiTiger/OES-Cloud-Testing-Platform
3f22dfa4621907c009894d81e7b2d5a2e5e3a0ef
19205107db6d74e5f8a521ec041799ee51ce2765
refs/heads/master
2023-03-06T10:21:47.850862
2020-11-06T02:20:40
2020-11-06T02:20:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
540
java
package com.oes.common.core.constant; /** * 常用正则表达式常量 * * @author chachae * @since 2020/04/30 14:21 */ public interface RegexpConstant { /** * 移动电话(国内) */ String MOBILE_REG = "^(?:(?:\\+|00)86)?1[3-9]\\d{9}$"; /** * 身份证(1代 / 2代) */ String ID_CARD_REG = "(^\\d{8}(0\\d|10|11|12)([0-2]\\d|30|31)\\d{3}$)|(^\\d{6}(18|19|20)\\d{2}(0[1-9]|10|11|12)([0-2]\\d|30|31)\\d{3}(\\d|X|x)$)"; /** * 包含中文 */ String CONTAINS_CHINESE = "^[\\u4E00-\\u9FA5]+$"; }
[ "chenyuexin1998@gmail.com" ]
chenyuexin1998@gmail.com
c556ed4dfe659245ea34840d8e7b2b6b44b9867c
eb10687e3b707dfe3797159a8834d4cc37e2d86b
/Next Permutation.java
0bf7db2cca51ca8be4ca1c9bf86b901a44677e8f
[]
no_license
zhibolau/lintCodeOfZhiboLiu
7d7bae649b9d8e0e96c82232fe60cc220c5e8636
7fc0a70dcfd6ee7025cd5dab48d2aca4ad4d17b2
refs/heads/master
2021-01-21T04:55:15.148585
2016-06-28T20:07:52
2016-06-28T20:07:52
51,408,069
0
0
null
null
null
null
UTF-8
Java
false
false
2,206
java
找到下一个升序的!!!!!!permutation public class Solution { /** * @param nums: A list of integers * @return: A list of integers that's next permuation */ public ArrayList<Integer> nextPermuation(ArrayList<Integer> nums) { // write your code if (nums == null || nums.size() == 0) { return nums; } for (int i = nums.size() - 2; i >= 0; i--) { for (int j = nums.size() - 1; j >= i; j--) { if (nums.get(j) > nums.get(i)) { swap(nums, i, j); reverse(nums, i + 1, nums.size() - 1); return nums; } } } reverse(nums, 0, nums.size() - 1); return nums; } private void swap(ArrayList<Integer> nums, int i, int j) { int temp = nums.get(i); nums.set(i, nums.get(j)); nums.set(j, temp); } private void reverse(ArrayList<Integer> nums, int left, int right) { while (left < right) { swap(nums, left++, right--); } } } public class Solution { /** * @param nums: an array of integers * @return: return nothing (void), do not return anything, modify nums in-place instead */ public int[] nextPermutation(int[] nums) { int len = nums.length; if (nums == null || len == 0) { return nums; } for (int i = len - 2; i >= 0; i--) {//根据题的例子 倒数第二个数 要是小于最后那个数 就swap他俩 再reverse //此处reverse不是全部reverse 是局部的 注意!!!!!!! for (int j = len - 1; j >= i; j--) {// j得大于等于i!!!!!!!!!!!!!! if (nums[j] > nums[i]) { swap(nums, i, j); reverse(nums, i + 1, len - 1); return nums; } } } reverse(nums, 0, len - 1);// 否则 全部reverse return nums; } private void swap(int[] nums, int i, int j) { int temp = nums[i]; nums[i] = nums[j]; nums[j] = temp; } private void reverse(int[] nums, int left, int right) { while (left < right) { swap(nums, left++, right--);// 别忘记更新left right!!!!!!!!!!! } } }
[ "zhibolau@gmail.com" ]
zhibolau@gmail.com
f57e4c1280656ce9f71957afd00f1c887e67130c
d52fc86965764314eef5dc62cfca769c5ac4aac4
/pj4w/pj4w05session/src/main/java/learn/ee/pj4w05session/ActivityServlet.java
5b8462403e37f9463fa8e42f73553f9d121f3b8d
[]
no_license
dpopkov/learnee
8980381fb0469e027fbea828b00a7b3b97fd38da
a4bea58ef59117e979cf2b23a1c706e1e554ecd7
refs/heads/master
2022-12-21T14:31:36.103328
2020-10-19T23:52:44
2020-10-19T23:52:44
231,949,360
0
0
null
2022-12-16T15:51:48
2020-01-05T17:03:46
Java
UTF-8
Java
false
false
2,157
java
package learn.ee.pj4w05session; import learn.ee.pj4w.PageVisit; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import java.io.IOException; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.ArrayList; import java.util.Collections; import java.util.List; @WebServlet( name = "storeServlet", urlPatterns = "/do/*" ) public class ActivityServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { recordSessionActivity(req); viewSessionActivity(req, resp); } private void recordSessionActivity(HttpServletRequest req) { HttpSession session = req.getSession(); if (session.getAttribute("activity") == null) { session.setAttribute("activity", Collections.synchronizedList(new ArrayList<PageVisit>())); } @SuppressWarnings("unchecked") List<PageVisit> visits = (List<PageVisit>) session.getAttribute("activity"); if (!visits.isEmpty()) { PageVisit last = visits.get(visits.size() - 1); last.setLeftTimestamp(System.currentTimeMillis()); } PageVisit now = new PageVisit(); now.setEnteredTimestamp(System.currentTimeMillis()); if (req.getQueryString() == null) { now.setRequest(req.getRequestURL().toString()); } else { now.setRequest(req.getRequestURL() + "?" + req.getQueryString()); } try { now.setIpAddress(InetAddress.getByName(req.getRemoteAddr())); } catch (UnknownHostException e) { e.printStackTrace(); } visits.add(now); } private void viewSessionActivity(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { req.getRequestDispatcher("/WEB-INF/jsp/view/viewSessionActivity.jsp").forward(req, resp); } }
[ "pkvdenis@gmail.com" ]
pkvdenis@gmail.com
3e9b7d296803ed86cb4dc695c520794aad342172
6c75d64557f71f20291e4191d4081c0c3e4795e8
/Proyectos/upcdew-deportivoapp/src/java/com/upc/deportivo/services/ExamenFisicoService.java
f3ce3d9180330fdc6ce02773dbe3473d5f944186
[]
no_license
andrepin29/faces
afbbc1780f9d4cbaaf50f736c002ce25af27d5cc
fbba871b35da47d898888ed9d1bc4c21eb796a8c
refs/heads/master
2020-03-27T18:42:37.404212
2017-06-15T17:54:47
2017-06-15T17:54:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
887
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.upc.deportivo.services; import com.upc.deportivo.model.ExamenFisicoBean; import java.util.List; /** * * @author USUARIO */ public interface ExamenFisicoService { public List<ExamenFisicoBean> agregarExamenFisico(ExamenFisicoBean examenFisicos); public List<ExamenFisicoBean> eliminarExamenFisico(ExamenFisicoBean examenFisicos); public List<ExamenFisicoBean> modificarExamenFisico(ExamenFisicoBean examenFisicos); public ExamenFisicoBean obtenerExamenFisico(); public List<ExamenFisicoBean> getExamenFisicosImplement(ExamenFisicoBean examenFisicos); public void setExamenFisicosImplement(List<ExamenFisicoBean> examenFisicos); public List<ExamenFisicoBean> BuscarExamenFisico(String nombreJugador); public void deshabilitarBolean(); }
[ "jose.diaz@joedayz.pe" ]
jose.diaz@joedayz.pe
8dd4129ffe25847b591668157a0875d0728af2ae
c1752f0b3a57ed2fea04c203aacde6ea16cddc6c
/src/main/java/com/test/myapp/config/LoggingConfiguration.java
3d724e76f636947d5f45d8de056670ac8d5b7660
[]
no_license
satishtamilan/jhipster-sample-tsb
09a1db1b7efcf0fe04d3965b9572d3802de75608
4f9a409da32d420ee91b9f0af161cc80c15b8491
refs/heads/main
2023-03-10T03:28:32.003784
2021-02-25T06:48:56
2021-02-25T06:48:56
331,312,581
0
0
null
2021-02-25T06:48:57
2021-01-20T13:18:27
Java
UTF-8
Java
false
false
2,316
java
package com.test.myapp.config; import static io.github.jhipster.config.logging.LoggingUtils.*; import ch.qos.logback.classic.LoggerContext; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import io.github.jhipster.config.JHipsterProperties; import java.util.HashMap; import java.util.Map; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.ObjectProvider; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.info.BuildProperties; import org.springframework.cloud.context.config.annotation.RefreshScope; import org.springframework.context.annotation.Configuration; /* * Configures the console and Logstash log appenders from the app properties */ @Configuration @RefreshScope public class LoggingConfiguration { public LoggingConfiguration( @Value("${spring.application.name}") String appName, @Value("${server.port}") String serverPort, JHipsterProperties jHipsterProperties, ObjectProvider<BuildProperties> buildProperties, ObjectMapper mapper ) throws JsonProcessingException { LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); Map<String, String> map = new HashMap<>(); map.put("app_name", appName); map.put("app_port", serverPort); buildProperties.ifAvailable(it -> map.put("version", it.getVersion())); String customFields = mapper.writeValueAsString(map); JHipsterProperties.Logging loggingProperties = jHipsterProperties.getLogging(); JHipsterProperties.Logging.Logstash logstashProperties = loggingProperties.getLogstash(); if (loggingProperties.isUseJsonFormat()) { addJsonConsoleAppender(context, customFields); } if (logstashProperties.isEnabled()) { addLogstashTcpSocketAppender(context, customFields, logstashProperties); } if (loggingProperties.isUseJsonFormat() || logstashProperties.isEnabled()) { addContextListener(context, customFields, loggingProperties); } if (jHipsterProperties.getMetrics().getLogs().isEnabled()) { setMetricsMarkerLogbackFilter(context, loggingProperties.isUseJsonFormat()); } } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
dd3b68dcbeffce1c464afd37bb4b9225f2c80a13
447bb4d469c77f97eb5c7a86d961787dac39ad98
/parttern/src/main/java/com/lkf/parttern/proxy/dynamic/jdk/JDKAccountProxyFactoryTest.java
d59bceb970c07d5ad88dc057f7da91276285df0f
[]
no_license
liukaifeng/lkf-java
ceb90c865f94d39f23d694d7eb45204f4ff49752
619f3483ad8bae05a15d40d6cf2307c67f41d16e
refs/heads/master
2022-12-24T15:53:32.346122
2020-03-17T00:49:39
2020-03-17T00:49:39
124,631,758
0
0
null
null
null
null
UTF-8
Java
false
false
500
java
package com.lkf.parttern.proxy.dynamic.jdk; import com.lkf.parttern.proxy.dynamic.Account; import com.lkf.parttern.proxy.dynamic.AccountImpl; /** * jdk动态代理测试 */ public class JDKAccountProxyFactoryTest { public static void main(String[] args) { Account account = (Account) new JDKAccountProxyFactory().bind(new AccountImpl()); account.queryAccountBalance(); System.out.println("***************************"); account.updateAccountBalance(); } }
[ "kaifeng_5liu@163.com" ]
kaifeng_5liu@163.com
a1b3695633446668b712197de72b8dcbb9d05006
0c1b924ff160b769b53facdb084aa0f19e23cd69
/rt-gateway-impl-ctp/src/main/java/xyz/redtorch/gateway/ctp/x64v6v3v11v/api/CThostFtdcSyncDepositField.java
657e145d7e401fa8693ecaeafeebb293a558f6f0
[ "MIT" ]
permissive
whitespur/redtorch
c602eac6b945e26b7d2657b43059dd8480b9453a
50798769e8f57120a6ab6e7cd462ba21555f425b
refs/heads/master
2020-08-14T14:12:54.502219
2019-11-19T10:12:32
2019-11-19T10:12:32
215,182,016
0
0
MIT
2019-10-15T01:51:55
2019-10-15T01:51:54
null
UTF-8
Java
false
false
2,810
java
/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 4.0.0 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ package xyz.redtorch.gateway.ctp.x64v6v3v11v.api; public class CThostFtdcSyncDepositField { private transient long swigCPtr; protected transient boolean swigCMemOwn; protected CThostFtdcSyncDepositField(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } protected static long getCPtr(CThostFtdcSyncDepositField obj) { return (obj == null) ? 0 : obj.swigCPtr; } @SuppressWarnings("deprecation") protected void finalize() { delete(); } public synchronized void delete() { if (swigCPtr != 0) { if (swigCMemOwn) { swigCMemOwn = false; jctpv6v3v11x64apiJNI.delete_CThostFtdcSyncDepositField(swigCPtr); } swigCPtr = 0; } } public void setDepositSeqNo(String value) { jctpv6v3v11x64apiJNI.CThostFtdcSyncDepositField_DepositSeqNo_set(swigCPtr, this, value); } public String getDepositSeqNo() { return jctpv6v3v11x64apiJNI.CThostFtdcSyncDepositField_DepositSeqNo_get(swigCPtr, this); } public void setBrokerID(String value) { jctpv6v3v11x64apiJNI.CThostFtdcSyncDepositField_BrokerID_set(swigCPtr, this, value); } public String getBrokerID() { return jctpv6v3v11x64apiJNI.CThostFtdcSyncDepositField_BrokerID_get(swigCPtr, this); } public void setInvestorID(String value) { jctpv6v3v11x64apiJNI.CThostFtdcSyncDepositField_InvestorID_set(swigCPtr, this, value); } public String getInvestorID() { return jctpv6v3v11x64apiJNI.CThostFtdcSyncDepositField_InvestorID_get(swigCPtr, this); } public void setDeposit(double value) { jctpv6v3v11x64apiJNI.CThostFtdcSyncDepositField_Deposit_set(swigCPtr, this, value); } public double getDeposit() { return jctpv6v3v11x64apiJNI.CThostFtdcSyncDepositField_Deposit_get(swigCPtr, this); } public void setIsForce(int value) { jctpv6v3v11x64apiJNI.CThostFtdcSyncDepositField_IsForce_set(swigCPtr, this, value); } public int getIsForce() { return jctpv6v3v11x64apiJNI.CThostFtdcSyncDepositField_IsForce_get(swigCPtr, this); } public void setCurrencyID(String value) { jctpv6v3v11x64apiJNI.CThostFtdcSyncDepositField_CurrencyID_set(swigCPtr, this, value); } public String getCurrencyID() { return jctpv6v3v11x64apiJNI.CThostFtdcSyncDepositField_CurrencyID_get(swigCPtr, this); } public CThostFtdcSyncDepositField() { this(jctpv6v3v11x64apiJNI.new_CThostFtdcSyncDepositField(), true); } }
[ "sun0x00@gmail.com" ]
sun0x00@gmail.com
70495013b91764b770938e1968c2d9dc98875769
a0b2b206342f100b357a0e1d75ab484b6200d3f0
/Base/ACB16/src/week1/day1/FirstProgram.java
c2b4ec171f2b1a63e8a4452eab9b157c87268ef9
[]
no_license
gorobec/ArtCode
e39f0f497c2d2a699c41f9034c1ba7bc3c1aef6c
b4cb68761e563d18129168cb170e14c197e3b409
refs/heads/master
2020-04-12T02:25:10.439015
2018-03-11T18:19:55
2018-03-11T18:19:55
59,116,256
0
5
null
2017-05-27T12:28:28
2016-05-18T13:05:42
Java
UTF-8
Java
false
false
188
java
package week1.day1; /** * Created by gorobec on 21.05.16. */ public class FirstProgram { public static void main(String[] args){ System.out.println("Hello world!"); } }
[ "yevhenijvorobiei@gmail.com" ]
yevhenijvorobiei@gmail.com
d02dd3e3e753cfeddbf0646c90b67dbac50457d8
f3bfc15013a872d103b9f80dca9aa576fb02c653
/app/src/main/java/com/skubit/comics/activities/SeriesActivity.java
41557ee52ba1685395176916d2265e3d326848a4
[ "Apache-2.0" ]
permissive
skubit/skubit-comics
1ec0f9e94dfa19b4aab0da17f77e0948e32fafeb
7b798b741a3f17df303704911f563070f666eec2
refs/heads/master
2016-09-07T19:01:48.669148
2015-09-21T01:43:54
2015-09-21T01:43:54
31,020,446
0
0
null
null
null
null
UTF-8
Java
false
false
2,770
java
package com.skubit.comics.activities; import com.skubit.comics.BuildConfig; import com.skubit.comics.R; import com.skubit.comics.SeriesFilter; import com.skubit.comics.UiState; import com.skubit.comics.fragments.SeriesFragment; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.ActionBarActivity; import android.support.v7.widget.Toolbar; import android.view.MenuItem; import android.widget.Toast; public class SeriesActivity extends ActionBarActivity { private Toolbar toolbar; private SeriesFilter mSeriesFilter; public static Intent newInstance(SeriesFilter filter) { Intent i = new Intent(); i.putExtra("com.skubit.comics.SERIES_FILTER", filter); i.setClassName(BuildConfig.APPLICATION_ID, SeriesActivity.class.getName()); return i; } @Override public void onBackPressed() { super.onBackPressed(); overridePendingTransition(R.anim.none, R.anim.push_out_right); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_series); toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); getSupportActionBar().setDisplayShowHomeEnabled(true); getSupportActionBar().setDisplayShowTitleEnabled(true); getSupportActionBar().setHomeAsUpIndicator(R.drawable.ic_arrow_back_black_24dp); if (getIntent().getExtras() != null) { mSeriesFilter = getIntent().getParcelableExtra("com.skubit.comics.SERIES_FILTER"); if (mSeriesFilter.hasCreator()) { setTitle(mSeriesFilter.creator); } else if (mSeriesFilter.hasGenre()) { setTitle(mSeriesFilter.genre); } else if (mSeriesFilter.hasPublisher()) { setTitle(mSeriesFilter.publisher); } else if (mSeriesFilter.hasSeries()) { setTitle(mSeriesFilter.series); } else { setTitle("Unknown"); } getFragmentManager().beginTransaction() .replace(R.id.container, SeriesFragment.newInstance(mSeriesFilter), UiState.SERIES) .commit(); } else { Toast.makeText(this, "SeriesActivity Intent is null", Toast.LENGTH_SHORT).show(); } } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: finish(); overridePendingTransition(R.anim.none, R.anim.push_out_right); return true; } return super.onOptionsItemSelected(item); } }
[ "shane.isbell@gmail.com" ]
shane.isbell@gmail.com
9823e295d3e498da428b4e8810fea63fc0a6f276
ac49244469fb2c8a4db498a3bf3d0077f5724da4
/yass-ijk/src/main/java/com/ijk/application/Settings.java
0cdd641e5bdc35398cf367f1a8fcde7b06d4659e
[]
no_license
wxyass/YassIjkPlayer
151735f2669bf18864cf873bb706d9454432ab4c
0707c403cda627f8c95f39265872635916f0dcce
refs/heads/master
2020-03-28T10:40:39.230557
2018-09-10T09:43:53
2018-09-10T09:43:53
148,133,280
0
0
null
null
null
null
UTF-8
Java
false
false
4,202
java
/* * Copyright (C) 2015 Bilibili * Copyright (C) 2015 Zhang Rui <bbcallen@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.ijk.application; import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager; import com.ijk.R; public class Settings { private Context mAppContext; private SharedPreferences mSharedPreferences; public static final int PV_PLAYER__Auto = 0; public static final int PV_PLAYER__AndroidMediaPlayer = 1; public static final int PV_PLAYER__IjkMediaPlayer = 2; public static final int PV_PLAYER__IjkExoMediaPlayer = 3; public Settings(Context context) { mAppContext = context.getApplicationContext(); mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(mAppContext); } public boolean getEnableBackgroundPlay() { String key = mAppContext.getString(R.string.pref_key_enable_background_play); return mSharedPreferences.getBoolean(key, false); } public int getPlayer() { String key = mAppContext.getString(R.string.pref_key_player); String value = mSharedPreferences.getString(key, ""); try { return Integer.valueOf(value).intValue(); } catch (NumberFormatException e) { return 0; } } public boolean getUsingMediaCodec() { String key = mAppContext.getString(R.string.pref_key_using_media_codec); return mSharedPreferences.getBoolean(key, false); } public boolean getUsingMediaCodecAutoRotate() { String key = mAppContext.getString(R.string.pref_key_using_media_codec_auto_rotate); return mSharedPreferences.getBoolean(key, false); } public boolean getMediaCodecHandleResolutionChange() { String key = mAppContext.getString(R.string.pref_key_media_codec_handle_resolution_change); return mSharedPreferences.getBoolean(key, false); } public boolean getUsingOpenSLES() { String key = mAppContext.getString(R.string.pref_key_using_opensl_es); return mSharedPreferences.getBoolean(key, false); } public String getPixelFormat() { String key = mAppContext.getString(R.string.pref_key_pixel_format); return mSharedPreferences.getString(key, ""); } public boolean getEnableNoView() { String key = mAppContext.getString(R.string.pref_key_enable_no_view); return mSharedPreferences.getBoolean(key, false); } public boolean getEnableSurfaceView() { String key = mAppContext.getString(R.string.pref_key_enable_surface_view); return mSharedPreferences.getBoolean(key, false); } public boolean getEnableTextureView() { String key = mAppContext.getString(R.string.pref_key_enable_texture_view); return mSharedPreferences.getBoolean(key, false); } public boolean getEnableDetachedSurfaceTextureView() { String key = mAppContext.getString(R.string.pref_key_enable_detached_surface_texture); return mSharedPreferences.getBoolean(key, false); } public boolean getUsingMediaDataSource() { String key = mAppContext.getString(R.string.pref_key_using_mediadatasource); return mSharedPreferences.getBoolean(key, false); } public String getLastDirectory() { String key = mAppContext.getString(R.string.pref_key_last_directory); return mSharedPreferences.getString(key, "/"); } public void setLastDirectory(String path) { String key = mAppContext.getString(R.string.pref_key_last_directory); mSharedPreferences.edit().putString(key, path).apply(); } }
[ "wxyass@gmail.com" ]
wxyass@gmail.com
1b5267f629e42db51e4c11f6662fc0f6a5e8f0a0
088acc114720d0bcfc96bd0f12f56bf6c26a8a04
/src/org/apache/el/parser/AstDiv.java
780dc971beb7e2584859a935433449a508336c27
[]
no_license
yuexiaoguang/tomcat8.5
acbc70727b57c814bae88f8505d5992a19500dec
d0cc064df71f7760851ff9b4c9accae26323e52a
refs/heads/master
2020-05-27T19:40:47.172022
2019-05-27T03:20:51
2019-05-27T03:20:51
188,763,583
1
2
null
null
null
null
UTF-8
Java
false
false
513
java
package org.apache.el.parser; import javax.el.ELException; import org.apache.el.lang.ELArithmetic; import org.apache.el.lang.EvaluationContext; public final class AstDiv extends ArithmeticNode { public AstDiv(int id) { super(id); } @Override public Object getValue(EvaluationContext ctx) throws ELException { Object obj0 = this.children[0].getValue(ctx); Object obj1 = this.children[1].getValue(ctx); return ELArithmetic.divide(obj0, obj1); } }
[ "yuexiaoguang@vortexinfo.cn" ]
yuexiaoguang@vortexinfo.cn
5df632cd3a7b05669298615b5518711c5f5098ca
f43d5de70d14179639192e091c923ccd27112faa
/src/com/codeHeap/generics/reflectionFactory/factoryConstraint/StringFactory.java
bd1a3c88422b4c92fb5c173d26462aa0ac605eaf
[]
no_license
basumatarau/trainingJavaCore
2c80d02d539fc6e2e599f6e9240e8f6543ef1bdf
1efc944b77b1ac7aea44bee89b84daa843670630
refs/heads/master
2020-04-04T23:13:47.929352
2019-01-09T09:51:35
2019-01-09T09:51:35
156,351,368
0
0
null
null
null
null
UTF-8
Java
false
false
365
java
package com.codeHeap.generics.reflectionFactory.factoryConstraint; public class StringFactory implements IFacotory<String>{ @Override public String create(Object... args) { StringBuilder result = new StringBuilder(); for (Object arg : args) { result.append(arg).append(", "); } return result.toString(); } }
[ "basumatarau@gmail.com" ]
basumatarau@gmail.com
8974bf46363d418cebc477b15a040c6e8dc17374
f6899a2cf1c10a724632bbb2ccffb7283c77a5ff
/glassfish-3.0/deployment/dol/src/main/java/com/sun/enterprise/deployment/node/runtime/ServiceRefPortInfoRuntimeNode.java
cc5fe4567af073a3ba2bb20ac104b26836140787
[]
no_license
Appdynamics/OSS
a8903058e29f4783e34119a4d87639f508a63692
1e112f8854a25b3ecf337cad6eccf7c85e732525
refs/heads/master
2023-07-22T03:34:54.770481
2021-10-28T07:01:57
2021-10-28T07:01:57
19,390,624
2
13
null
2023-07-08T02:26:33
2014-05-02T22:42:20
null
UTF-8
Java
false
false
7,274
java
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common Development * and Distribution License("CDDL") (collectively, the "License"). You * may not use this file except in compliance with the License. You can obtain * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific * language governing permissions and limitations under the License. * * When distributing the software, include this License Header Notice in each * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt. * Sun designates this particular file as subject to the "Classpath" exception * as provided by Sun in the GPL Version 2 section of the License file that * accompanied this code. If applicable, add the following below the License * Header, with the fields enclosed by brackets [] replaced by your own * identifying information: "Portions Copyrighted [year] * [name of copyright owner]" * * Contributor(s): * * If you wish your version of this file to be governed by only the CDDL or * only the GPL Version 2, indicate your decision by adding "[Contributor] * elects to include this software in this distribution under the [CDDL or GPL * Version 2] license." If you don't indicate a single choice of license, a * recipient has the option to distribute your version of this file under * either the CDDL, the GPL Version 2 or to extend the choice of license to * its licensees as provided above. However, if you add GPL Version 2 code * and therefore, elected the GPL Version 2 license, then the option applies * only if the new code is made subject to such option by the copyright * holder. */ package com.sun.enterprise.deployment.node.runtime; import com.sun.enterprise.deployment.NameValuePairDescriptor; import com.sun.enterprise.deployment.ServiceRefPortInfo; import com.sun.enterprise.deployment.node.DeploymentDescriptorNode; import com.sun.enterprise.deployment.node.NameValuePairNode; import com.sun.enterprise.deployment.node.XMLElement; import com.sun.enterprise.deployment.node.runtime.common.MessageSecurityBindingNode; import com.sun.enterprise.deployment.runtime.common.MessageSecurityBindingDescriptor; import com.sun.enterprise.deployment.xml.WebServicesTagNames; import org.w3c.dom.Node; import javax.xml.namespace.QName; import java.util.Iterator; import java.util.Map; import java.util.Set; /** * This node is responsible for handling runtime info for * a service reference wsdl port. * * @author Kenneth Saks * @version */ public class ServiceRefPortInfoRuntimeNode extends DeploymentDescriptorNode { private String namespaceUri; public ServiceRefPortInfoRuntimeNode() { super(); registerElementHandler (new XMLElement(WebServicesTagNames.STUB_PROPERTY), NameValuePairNode.class, "addStubProperty"); registerElementHandler (new XMLElement(WebServicesTagNames.CALL_PROPERTY), NameValuePairNode.class, "addCallProperty"); registerElementHandler(new XMLElement(WebServicesTagNames.MESSAGE_SECURITY_BINDING), MessageSecurityBindingNode.class, "setMessageSecurityBinding"); } /** * all sub-implementation of this class can use a dispatch table to map xml element to * method name on the descriptor class for setting the element value. * * @return the map with the element name as a key, the setter method as a value */ protected Map getDispatchTable() { Map table = super.getDispatchTable(); table.put(WebServicesTagNames.SERVICE_ENDPOINT_INTERFACE, "setServiceEndpointInterface"); return table; } /** * receives notiification of the value for a particular tag * * @param element the xml element * @param value it's associated value */ public void setElementValue(XMLElement element, String value) { String name = element.getQName(); if (WebServicesTagNames.NAMESPACE_URI.equals(name)) { namespaceUri = value; } else if (WebServicesTagNames.LOCAL_PART.equals(name)) { ServiceRefPortInfo desc = (ServiceRefPortInfo) getDescriptor(); QName wsdlPort = new QName(namespaceUri, value); desc.setWsdlPort(wsdlPort); namespaceUri = null; } else super.setElementValue(element, value); } /** * write the descriptor class to a DOM tree and return it * * @param parent node for the DOM tree * @param node name for the descriptor * @param the descriptor to write * @return the DOM tree top node */ public Node writeDescriptor(Node parent, String nodeName, ServiceRefPortInfo desc) { Node serviceRefPortInfoRuntimeNode = super.writeDescriptor(parent, nodeName, desc); appendTextChild(serviceRefPortInfoRuntimeNode, WebServicesTagNames.SERVICE_ENDPOINT_INTERFACE, desc.getServiceEndpointInterface()); QName port = desc.getWsdlPort(); if( port != null ) { Node wsdlPortNode = appendChild(serviceRefPortInfoRuntimeNode, WebServicesTagNames.WSDL_PORT); appendTextChild(wsdlPortNode, WebServicesTagNames.NAMESPACE_URI, port.getNamespaceURI()); appendTextChild(wsdlPortNode, WebServicesTagNames.LOCAL_PART, port.getLocalPart()); } // stub-property* NameValuePairNode nameValueNode = new NameValuePairNode(); Set stubProperties = desc.getStubProperties(); for(Iterator iter = stubProperties.iterator(); iter.hasNext();) { NameValuePairDescriptor next = (NameValuePairDescriptor)iter.next(); nameValueNode.writeDescriptor (serviceRefPortInfoRuntimeNode, WebServicesTagNames.STUB_PROPERTY, next); } // call-property* for(Iterator iter = desc.getCallProperties().iterator(); iter.hasNext();) { NameValuePairDescriptor next = (NameValuePairDescriptor)iter.next(); nameValueNode.writeDescriptor (serviceRefPortInfoRuntimeNode, WebServicesTagNames.CALL_PROPERTY, next); } // message-security-binding MessageSecurityBindingDescriptor messageSecBindingDesc = desc.getMessageSecurityBinding(); if (messageSecBindingDesc != null) { MessageSecurityBindingNode messageSecBindingNode = new MessageSecurityBindingNode(); messageSecBindingNode.writeDescriptor(serviceRefPortInfoRuntimeNode, WebServicesTagNames.MESSAGE_SECURITY_BINDING, messageSecBindingDesc); } return serviceRefPortInfoRuntimeNode; } }
[ "ddimalanta@appdynamics.com" ]
ddimalanta@appdynamics.com
6cb88d9dca9aa7427b4c93f5693b11dd00239f8a
57edb737df8e9de3822d4f08d0de81f028403209
/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/JsonViewRequestBodyAdvice.java
4e2495e26a2b2fd7aebed315376d63d2fd5c78d1
[ "Apache-2.0" ]
permissive
haoxianrui/spring-framework
20d904fffe7ddddcd7d78445537f66e0b4cf65f5
e5163351c47feb69483e79fa782eec3e4d8613e8
refs/heads/master
2023-05-25T14:27:18.935575
2020-10-23T01:04:05
2020-10-23T01:04:05
260,652,424
1
1
null
null
null
null
UTF-8
Java
false
false
3,082
java
/* * Copyright 2002-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.web.servlet.mvc.method.annotation; import java.io.IOException; import java.lang.reflect.Type; import com.fasterxml.jackson.annotation.JsonView; import org.springframework.core.MethodParameter; import org.springframework.http.HttpInputMessage; import org.springframework.http.converter.HttpMessageConverter; import org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter; import org.springframework.http.converter.json.MappingJacksonInputMessage; import org.springframework.util.Assert; /** * A {@link RequestBodyAdvice} implementation that adds support for Jackson's * {@code @JsonView} annotation declared on a Spring MVC {@code @HttpEntity} * or {@code @RequestBody} method parameter. * * <p>The deserialization view specified in the annotation will be passed in to the * {@link org.springframework.http.converter.json.MappingJackson2HttpMessageConverter} * which will then use it to deserialize the request body with. * * <p>Note that despite {@code @JsonView} allowing for more than one class to * be specified, the use for a request body advice is only supported with * exactly one class argument. Consider the use of a composite interface. * * @author Sebastien Deleuze * @see com.fasterxml.jackson.annotation.JsonView * @see com.fasterxml.jackson.databind.ObjectMapper#readerWithView(Class) * @since 4.2 */ public class JsonViewRequestBodyAdvice extends RequestBodyAdviceAdapter { @Override public boolean supports(MethodParameter methodParameter, Type targetType, Class<? extends HttpMessageConverter<?>> converterType) { return (AbstractJackson2HttpMessageConverter.class.isAssignableFrom(converterType) && methodParameter.getParameterAnnotation(JsonView.class) != null); } @Override public HttpInputMessage beforeBodyRead(HttpInputMessage inputMessage, MethodParameter methodParameter, Type targetType, Class<? extends HttpMessageConverter<?>> selectedConverterType) throws IOException { JsonView ann = methodParameter.getParameterAnnotation(JsonView.class); Assert.state(ann != null, "No JsonView annotation"); Class<?>[] classes = ann.value(); if (classes.length != 1) { throw new IllegalArgumentException( "@JsonView only supported for request body advice with exactly 1 class argument: " + methodParameter); } return new MappingJacksonInputMessage(inputMessage.getBody(), inputMessage.getHeaders(), classes[0]); } }
[ "1490493387@qq.com" ]
1490493387@qq.com
8a385bd1e0ab0dc0f6f580ac64099995fec0e264
f0d25d83176909b18b9989e6fe34c414590c3599
/app/src/main/java/com/google/android/gms/location/places/zzh.java
56cbe90f3515efeae2815adbeac2fc6dfd6b0166
[]
no_license
lycfr/lq
e8dd702263e6565486bea92f05cd93e45ef8defc
123914e7c0d45956184dc908e87f63870e46aa2e
refs/heads/master
2022-04-07T18:16:31.660038
2020-02-23T03:09:18
2020-02-23T03:09:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,502
java
package com.google.android.gms.location.places; import android.os.Parcel; import android.os.Parcelable; import com.google.android.gms.common.internal.safeparcel.zzb; import java.util.ArrayList; import java.util.List; public final class zzh implements Parcelable.Creator<PlaceFilter> { public final /* synthetic */ Object createFromParcel(Parcel parcel) { int zzd = zzb.zzd(parcel); boolean z = false; ArrayList<zzo> arrayList = null; ArrayList<String> arrayList2 = null; ArrayList<Integer> arrayList3 = null; while (parcel.dataPosition() < zzd) { int readInt = parcel.readInt(); switch (65535 & readInt) { case 1: arrayList3 = zzb.zzB(parcel, readInt); break; case 3: z = zzb.zzc(parcel, readInt); break; case 4: arrayList = zzb.zzc(parcel, readInt, zzo.CREATOR); break; case 6: arrayList2 = zzb.zzC(parcel, readInt); break; default: zzb.zzb(parcel, readInt); break; } } zzb.zzF(parcel, zzd); return new PlaceFilter((List<Integer>) arrayList3, z, (List<String>) arrayList2, (List<zzo>) arrayList); } public final /* synthetic */ Object[] newArray(int i) { return new PlaceFilter[i]; } }
[ "quyenlm.vn@gmail.com" ]
quyenlm.vn@gmail.com
dc327be64ff2b8f10b243c283b1999c8fb8f440e
51aef8e206201568d04fb919bf54a3009c039dcf
/trunk/src/com/jmex/audio/openal/OpenALPropertyTool.java
fc582fa6939f87b3646965af546788d5a41439c6
[]
no_license
lihak/fairytale-soulfire-svn-to-git
0b8bdbfcaf774f13fc3d32cc3d3a6fae64f29c81
a85eb3fc6f4edf30fef9201902fcdc108da248e4
refs/heads/master
2021-02-11T15:25:47.199953
2015-12-28T14:48:14
2015-12-28T14:48:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,069
java
/* * Copyright (c) 2003-2008 jMonkeyEngine * 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 'jMonkeyEngine' 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 com.jmex.audio.openal; import org.lwjgl.openal.AL10; import com.jmex.audio.player.AudioPlayer; /** * OpenAL utility class - used for keeping code access to openal properties in a * single location. * * @author Joshua Slack * @version $Id: OpenALPropertyTool.java,v 1.4 2007/08/18 02:58:34 renanse Exp $ */ public class OpenALPropertyTool { public static void applyProperties(AudioPlayer player, OpenALSource source) { applyChannelVolume(source, player.getVolume()); applyChannelPitch(source, player.getPitch()); applyChannelMaxVolume(source, player.getMaxVolume()); applyChannelMinVolume(source, player.getMinVolume()); applyChannelRolloff(source, player.getRolloff()); applyChannelMaxAudibleDistance(source, player.getMaxDistance()); applyChannelReferenceDistance(source, player.getRefDistance()); } public static void applyChannelVolume(OpenALSource source, float volume) { if (source != null) AL10.alSourcef(source.getId(), AL10.AL_GAIN, volume); } public static void applyChannelMaxVolume(OpenALSource source, float maxVolume) { if (source != null) AL10.alSourcef(source.getId(), AL10.AL_MAX_GAIN, maxVolume); } public static void applyChannelMinVolume(OpenALSource source, float minVolume) { if (source != null) AL10.alSourcef(source.getId(), AL10.AL_MIN_GAIN, minVolume); } public static void applyChannelRolloff(OpenALSource source, float rolloff) { if (source != null) AL10.alSourcef(source.getId(), AL10.AL_ROLLOFF_FACTOR, rolloff); } public static void applyChannelMaxAudibleDistance(OpenALSource source, float maxDistance) { if (source != null) AL10.alSourcef(source.getId(), AL10.AL_MAX_DISTANCE, maxDistance); } public static void applyChannelReferenceDistance(OpenALSource source, float refDistance) { if (refDistance == 0) refDistance = 0.0000000001f; // 0 causes issues on some cards and the open al spec shows this value used in division if (source != null) AL10.alSourcef(source.getId(), AL10.AL_REFERENCE_DISTANCE, refDistance); } public static void applyChannelPitch(OpenALSource source, float pitch) { if (source != null) AL10.alSourcef(source.getId(), AL10.AL_PITCH, pitch); } }
[ "you@example.com" ]
you@example.com
27c5dff81576a36df4328292963f895d8fd6bd30
4c10b7aaf7d867f47a0626d91a76f54df9193bfb
/performance-counter/src/main/java/com/cxy/performancecounter/v1/metricsStorage/RedisMetricsStorage.java
72715714b3a2dcf935c168da74f439a0b1d6f325
[]
no_license
currynice/demo
390d8ec7d9094a9f5cc57fae3a8f7a5b41b7f9ae
b13617c15dc1bf61589aca83d462aada70fd4855
refs/heads/master
2023-08-08T18:51:37.488014
2022-04-19T07:36:44
2022-04-19T07:36:44
198,806,075
0
0
null
null
null
null
UTF-8
Java
false
false
3,398
java
package com.cxy.performancecounter.v1.metricsStorage; import com.cxy.performancecounter.utils.SpringCtxUtil; import com.cxy.performancecounter.v1.api.RequestInfo; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.ZSetOperations; import java.io.IOException; import java.util.*; /** * Description: todo </br> * Date: 2021/4/10 12:30 * * @author :cxy </br> * @version : 1.0 </br> */ public class RedisMetricsStorage implements MetricsStorage { //业务前缀 private static final String Business_Prefix = "api@"; @Override public void saveRequestInfo(RequestInfo requestInfo) { //zadd String apiName = requestInfo.getApiName(); ZSetOperations<String,Object> zSetOperations = SpringCtxUtil.getBean(ZSetOperations.class); ObjectMapper objectMapper = new ObjectMapper(); try { String value = objectMapper.writeValueAsString(requestInfo); zSetOperations.add(Business_Prefix+apiName,value,requestInfo.getTimestamp()); } catch (JsonProcessingException e) { e.printStackTrace(); } } //todo @Override public List<RequestInfo> getRequestInfos(String apiName, long startTimestamp, long endTimestamp) { //... ObjectMapper objectMapper = new ObjectMapper(); List<RequestInfo> requestInfos = new ArrayList<>(); ZSetOperations<String,Object> zSetOperations = SpringCtxUtil.getBean(ZSetOperations.class); Set<Object> datas = zSetOperations.range(Business_Prefix+apiName, startTimestamp, endTimestamp); if(datas==null){ return requestInfos; } for (Object obj : datas) { RequestInfo requestInfo = null; try { requestInfo = objectMapper.readValue((String) obj, RequestInfo.class); } catch (IOException e) { e.printStackTrace(); } requestInfos.add(requestInfo); } return requestInfos; } @Override public Map<String, List<RequestInfo>> getRequestInfos(long startTimestamp, long endTimestamp) { Map<String, List<RequestInfo>> map = new LinkedHashMap<>(); ObjectMapper objectMapper = new ObjectMapper(); RedisTemplate<String,Object> redisTemplate = SpringCtxUtil.getBean(RedisTemplate.class); //todo : change to scan Set<String> keyset = redisTemplate.keys(Business_Prefix+"*"); if(null==keyset){ return map; } ZSetOperations<String,Object> zSetOperations = SpringCtxUtil.getBean(ZSetOperations.class); for (String key : keyset) { Set<Object> datas = zSetOperations.rangeByScore(key, startTimestamp, endTimestamp); List<RequestInfo> requestInfos = new ArrayList<>(); for (Object obj : datas) { RequestInfo requestInfo = null; try { requestInfo = objectMapper.readValue((String) obj, RequestInfo.class); } catch (IOException e) { e.printStackTrace(); } requestInfos.add(requestInfo); } map.put(key, requestInfos); } return map; } }
[ "694975984@qq.com" ]
694975984@qq.com
d120755598b9f744edf25e85f1420ccbf756012b
6de2301bbc9048d1a363d44231273f3db9da4ec6
/bitcamp-java-basic/src/step05/Exam02_1.java
33cb8e291d0bb871770dbcf6a04da749c4ff5e1f
[]
no_license
sunghyeondong/bitcamp
5265d207306adec04223dd0e0d958661334731fa
c4a7d0ba01b0d6b684c67004e6c487b61c6656d6
refs/heads/master
2021-01-24T10:28:52.267015
2018-10-24T01:32:45
2018-10-24T01:32:45
123,054,630
0
0
null
null
null
null
UTF-8
Java
false
false
1,059
java
// 흐름 제어문 - switch 사용 전 package step05; import java.util.Scanner; public class Exam02_1 { public static void main(String[] args) { Scanner keyScan = new Scanner(System.in); System.out.println("[지원부서]"); System.out.println("1. S/W개발"); System.out.println("2. 일반관리"); System.out.println("3. 시설경비"); System.out.print("지원 분야의 번호를 입력하세요? "); int no = keyScan.nextInt(); System.out.println("제출하실 서류는 다음과 같습니다."); if (no == 1) { System.out.println("정보처리자격증"); System.out.println("졸업증명서"); System.out.println("이력서"); } else if (no == 2) { System.out.println("졸업증명서"); System.out.println("이력서"); } else if (no == 3) { System.out.println("이력서"); } else { System.out.println("올바른 번호를 입력하세요!"); } } }
[ "tjdgusehd0@naver.com" ]
tjdgusehd0@naver.com
bf78348762e45a4a395122681b008f1c37b1c792
695cfdd237fe6ee11bb7be5648dfb4d50743ce26
/app/src/main/java/com/kissasianapp/kissasian/ka_adapter/CountryAdapter.java
61a387d8e7069746d3728185ee2e551446670d56
[]
no_license
fandofastest/KISSAPP
e7a93a3c6e7fba6a14b93d6091bbedc29ed8f84b
a950b47b5aca8f867ef1b152472c16e01a7c8ba8
refs/heads/master
2020-12-28T18:50:34.291254
2020-04-24T16:35:35
2020-04-24T16:35:35
238,448,169
0
0
null
null
null
null
UTF-8
Java
false
false
2,724
java
package com.kissasianapp.kissasian.ka_adapter; import android.content.Context; import android.content.Intent; import androidx.cardview.widget.CardView; import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.kissasianapp.kissasian.ItemMovieActivity; import com.kissasianapp.kissasian.R; import com.kissasianapp.kissasian.ka_model.CommonModels; import java.util.ArrayList; import java.util.List; public class CountryAdapter extends RecyclerView.Adapter<CountryAdapter.OriginalViewHolder> { private List<CommonModels> items = new ArrayList<>(); private Context ctx; private String type; private int c=0; public CountryAdapter(Context context, List<CommonModels> items,String type) { this.items = items; ctx = context; this.type=type; } @Override public CountryAdapter.OriginalViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { CountryAdapter.OriginalViewHolder vh; View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.card_country, parent, false); vh = new CountryAdapter.OriginalViewHolder(v); return vh; } @Override public void onBindViewHolder(CountryAdapter.OriginalViewHolder holder, final int position) { final CommonModels obj = items.get(position); holder.name.setText(obj.getTitle()); holder.lyt_parent.setCardBackgroundColor(ctx.getResources().getColor(getColor())); holder.lyt_parent.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent=new Intent(ctx, ItemMovieActivity.class); intent.putExtra("id",obj.getId()); intent.putExtra("title",obj.getTitle()); intent.putExtra("type",type); ctx.startActivity(intent); } }); } @Override public int getItemCount() { return items.size(); } public class OriginalViewHolder extends RecyclerView.ViewHolder { public TextView name; private CardView lyt_parent; public OriginalViewHolder(View v) { super(v); name = v.findViewById(R.id.name); lyt_parent=v.findViewById(R.id.lyt_parent); } } private int getColor(){ int colorList[] = {R.color.red_400,R.color.blue_400,R.color.indigo_400,R.color.orange_400,R.color.light_green_400,R.color.blue_grey_400}; if (c>=6){ c=0; } int color = colorList[c]; c++; return color; } }
[ "fandofast@gmail.com" ]
fandofast@gmail.com
74919bf29098c6fb78158a9e65e356e52651ff3c
70047d3a1bd84fbe2c2771f6ad3e17566b25e6c6
/ButtonEventTest1/app/src/main/java/cse/mobile/buttoneventtest1/MainActivity.java
87947a991cf18b629e212bbeaef94f070753c055
[]
no_license
jeon9825/grade3_MobileProgramming
2eee3255eb374b064b1fe596e5ccdc879b4f597c
184a3a8f7ed7b86ba9c803befe2179bb820e6bec
refs/heads/master
2020-07-17T05:55:36.400604
2020-02-19T05:42:57
2020-02-19T05:42:57
205,961,417
0
0
null
null
null
null
UTF-8
Java
false
false
1,672
java
package cse.mobile.buttoneventtest1; import androidx.appcompat.app.AppCompatActivity; import android.content.Context; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.Toast; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Button button = findViewById(R.id.button); /* * 첫번째 방법 ButtonClickListener buttonClickListener = new ButtonClickListener(); button.setOnClickListener(buttonClickListener); */ /* * 두번째 방법 button.setOnClickListener(mButtonClickListener); */ /* * 세번째 방법 button.setOnClickListener(new ButtonClickListener()); */ // 네번째 방법 button.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View v) { Toast.makeText(getApplicationContext(),"버튼눌림",Toast.LENGTH_SHORT).show(); } }); } class ButtonClickListener implements View.OnClickListener{ @Override public void onClick(View view) { Toast.makeText(getApplicationContext(),"버튼눌림",Toast.LENGTH_SHORT).show(); } } View.OnClickListener mButtonClickListener = new View.OnClickListener() { @Override public void onClick(View v) { Toast.makeText(getApplicationContext(),"버튼눌림",Toast.LENGTH_SHORT).show(); } }; }
[ "jeon9825@naver.com" ]
jeon9825@naver.com
4a8445d4ec0b162a9c5d8f55be1860b43cfc9800
d4e56ef19d4aa3634e56435e4bb82651112029a7
/src/main/java/com/dts/discover/jsearch/exception/KeyNotFoundException.java
204b7bdaec1562cf511d3e20b10c7a76a3f9b0ec
[]
no_license
duminda-kt/command-line-search-app
2dfad3d6ae9a60093f5d9a049b3b8fb9811294cf
00f447e0f33e109ce9e0b692d7aa235a53d19eda
refs/heads/main
2023-05-28T19:34:45.266720
2021-06-22T08:55:37
2021-06-22T08:55:37
379,155,945
0
0
null
null
null
null
UTF-8
Java
false
false
191
java
package com.dts.discover.jsearch.exception; public class KeyNotFoundException extends Exception { public KeyNotFoundException(String errorMessage) { super(errorMessage); } }
[ "=" ]
=
67df61d2b77f6b56a20b58f4bceb72c3dcec8ea5
3b8690b659fffe81298f91d39c4d5e38e8ffea15
/wc18-back/wc18-domain/src/main/java/com/github/mjeanroy/wc18/domain/models/Rank.java
468ace2bd99982477c8c28801b09b21af3c959d2
[]
no_license
mjeanroy/wc18
ce0a6924d5a193e0d2c1ed5ef98d7e7d08d00fdf
aea9e8a0ddf3ef4ad67dbbde6fac84a421707068
refs/heads/master
2020-03-21T03:53:49.338315
2018-09-19T14:28:26
2018-09-19T15:08:28
138,079,874
2
0
null
null
null
null
UTF-8
Java
false
false
2,408
java
/** * The MIT License (MIT) * * Copyright (c) 2018 Mickael Jeanroy * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package com.github.mjeanroy.wc18.domain.models; public class Rank { /** * The identifier. */ private final String id; /** * The user. */ private final User user; /** * Number of points won by user. */ private final int score; /** * The percentage of good pronostics. */ private final int percentGood; /** * The percentage of perfect pronostics. */ private final int percentPerfect; // Default constructor. public Rank(User user, int score, int percentGood, int percentPerfect) { this.id = user.getId(); this.user = user; this.score = score; this.percentGood = percentGood; this.percentPerfect = percentPerfect; } /** * Get {@link #id} * * @return {@link #id} */ public String getId() { return id; } /** * Get {@link #user} * * @return {@link #user} */ public User getUser() { return user; } /** * Get {@link #score} * * @return {@link #score} */ public int getScore() { return score; } /** * Get {@link #percentGood} * * @return {@link #percentGood} */ public int getPercentGood() { return percentGood; } /** * Get {@link #percentPerfect} * * @return {@link #percentPerfect} */ public int getPercentPerfect() { return percentPerfect; } }
[ "mickael.jeanroy@gmail.com" ]
mickael.jeanroy@gmail.com
3ad6e01e448af225addf2256bd254d6d91157c52
32fa24f0dcbd39aa954811915659c977ee0caa2e
/src/gribbit/route/RouteHandler.java
8715775de2eb29ada48fc5f761983d93fe8f5e9c
[ "Apache-2.0" ]
permissive
lukehutch/gribbit
7e94371795b4b46c21400c3821c7d11d76e20cb8
ceb56aacfa4115f8f4fdb2de63b01c0be2481fce
refs/heads/master
2021-01-10T18:31:38.627925
2016-03-08T10:46:39
2016-03-08T10:46:39
27,955,179
1
0
null
null
null
null
UTF-8
Java
false
false
1,451
java
/** * This file is part of the Gribbit Web Framework. * * https://github.com/lukehutch/gribbit * * @author Luke Hutchison * * -- * * @license Apache 2.0 * * Copyright 2015 Luke Hutchison * * 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 gribbit.route; import gribbit.auth.User; import io.vertx.ext.web.RoutingContext; import io.vertx.ext.web.Session; /** * A route handler. Override the public default get() method with optional params to accept URL params, and/or the * public default post() method with one optional param of type DataModel to populate the DataModel values from POST * param values. Note: you should normally subclass RouteHandlerAuthNotRequired, RouteHandlerAuthRequired or * RouteHandlerAuthAndValidatedEmailRequired, and not RouteHandler itself. */ public abstract class RouteHandler { public RoutingContext routingContext; public Session session; public User user; }
[ "luke.hutch@gmail.com" ]
luke.hutch@gmail.com
db2f1f81b139d41570260bf8621a8e3e52c49b4c
95ffdbacafb9255d9dfe8c5caa84c5d324025848
/zpoi/src/org/zkoss/poi/hssf/record/chart/SheetPropertiesRecord.java
cb3088a4275f1346cb760c12b2d3917e83893874
[ "MIT" ]
permissive
dataspread/dataspread-web
2143f3451c141a4857070a67813208c8f2da50dc
2d07f694c7419473635e355202be11396023f915
refs/heads/master
2023-01-12T16:12:47.862760
2021-05-09T02:30:42
2021-05-09T02:30:42
88,792,776
139
34
null
2023-01-06T01:36:17
2017-04-19T21:32:30
Java
UTF-8
Java
false
false
7,133
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.zkoss.poi.hssf.record.chart; import org.zkoss.poi.hssf.record.RecordInputStream; import org.zkoss.poi.hssf.record.StandardRecord; import org.zkoss.poi.util.BitField; import org.zkoss.poi.util.BitFieldFactory; import org.zkoss.poi.util.HexDump; import org.zkoss.poi.util.LittleEndianOutput; /** * Describes a chart sheet properties record. SHTPROPS (0x1044) <p/> * * (As with all chart related records, documentation is lacking. * See {@link ChartRecord} for more details) * * @author Glen Stampoultzis (glens at apache.org) */ public final class SheetPropertiesRecord extends StandardRecord { public final static short sid = 0x1044; private static final BitField chartTypeManuallyFormatted = BitFieldFactory.getInstance(0x01); private static final BitField plotVisibleOnly = BitFieldFactory.getInstance(0x02); private static final BitField doNotSizeWithWindow = BitFieldFactory.getInstance(0x04); private static final BitField defaultPlotDimensions = BitFieldFactory.getInstance(0x08); private static final BitField autoPlotArea = BitFieldFactory.getInstance(0x10); private int field_1_flags; private int field_2_empty; public final static byte EMPTY_NOT_PLOTTED = 0; public final static byte EMPTY_ZERO = 1; public final static byte EMPTY_INTERPOLATED = 2; public SheetPropertiesRecord() { // fields uninitialised } public SheetPropertiesRecord(RecordInputStream in) { field_1_flags = in.readUShort(); field_2_empty = in.readUShort(); } public String toString() { StringBuffer buffer = new StringBuffer(); buffer.append("[SHTPROPS]\n"); buffer.append(" .flags = ").append(HexDump.shortToHex(field_1_flags)).append('\n'); buffer.append(" .chartTypeManuallyFormatted= ").append(isChartTypeManuallyFormatted()).append('\n'); buffer.append(" .plotVisibleOnly = ").append(isPlotVisibleOnly()).append('\n'); buffer.append(" .doNotSizeWithWindow = ").append(isDoNotSizeWithWindow()).append('\n'); buffer.append(" .defaultPlotDimensions = ").append(isDefaultPlotDimensions()).append('\n'); buffer.append(" .autoPlotArea = ").append(isAutoPlotArea()).append('\n'); buffer.append(" .empty = ").append(HexDump.shortToHex(field_2_empty)).append('\n'); buffer.append("[/SHTPROPS]\n"); return buffer.toString(); } public void serialize(LittleEndianOutput out) { out.writeShort(field_1_flags); out.writeShort(field_2_empty); } protected int getDataSize() { return 2 + 2; } public short getSid() { return sid; } public Object clone() { SheetPropertiesRecord rec = new SheetPropertiesRecord(); rec.field_1_flags = field_1_flags; rec.field_2_empty = field_2_empty; return rec; } /** * Get the flags field for the SheetProperties record. */ public int getFlags() { return field_1_flags; } /** * Get the empty field for the SheetProperties record. * * @return One of * EMPTY_NOT_PLOTTED * EMPTY_ZERO * EMPTY_INTERPOLATED */ public int getEmpty() { return field_2_empty; } /** * Set the empty field for the SheetProperties record. * * @param empty * One of * EMPTY_NOT_PLOTTED * EMPTY_ZERO * EMPTY_INTERPOLATED */ public void setEmpty(byte empty) { this.field_2_empty = empty; } /** * Sets the chart type manually formatted field value. * Has the chart type been manually formatted? */ public void setChartTypeManuallyFormatted(boolean value) { field_1_flags = chartTypeManuallyFormatted.setBoolean(field_1_flags, value); } /** * Has the chart type been manually formatted? * @return the chart type manually formatted field value. */ public boolean isChartTypeManuallyFormatted() { return chartTypeManuallyFormatted.isSet(field_1_flags); } /** * Sets the plot visible only field value. * Only show visible cells on the chart. */ public void setPlotVisibleOnly(boolean value) { field_1_flags = plotVisibleOnly.setBoolean(field_1_flags, value); } /** * Only show visible cells on the chart. * @return the plot visible only field value. */ public boolean isPlotVisibleOnly() { return plotVisibleOnly.isSet(field_1_flags); } /** * Sets the do not size with window field value. * Do not size the chart when the window changes size */ public void setDoNotSizeWithWindow(boolean value) { field_1_flags = doNotSizeWithWindow.setBoolean(field_1_flags, value); } /** * Do not size the chart when the window changes size * @return the do not size with window field value. */ public boolean isDoNotSizeWithWindow() { return doNotSizeWithWindow.isSet(field_1_flags); } /** * Sets the default plot dimensions field value. * Indicates that the default area dimensions should be used. */ public void setDefaultPlotDimensions(boolean value) { field_1_flags = defaultPlotDimensions.setBoolean(field_1_flags, value); } /** * Indicates that the default area dimensions should be used. * @return the default plot dimensions field value. */ public boolean isDefaultPlotDimensions() { return defaultPlotDimensions.isSet(field_1_flags); } /** * Sets the auto plot area field value. * ?? */ public void setAutoPlotArea(boolean value) { field_1_flags = autoPlotArea.setBoolean(field_1_flags, value); } /** * ?? * @return the auto plot area field value. */ public boolean isAutoPlotArea() { return autoPlotArea.isSet(field_1_flags); } }
[ "mangeshbendre@gmail.com" ]
mangeshbendre@gmail.com
03ec6017f66aa179532cb2c68c86a1afd1b181a5
0dad344de42e0d2e8b939d46ceb457206f6d9ca1
/app/src/main/java/com/jx372/gugudanfighter/HelpActivity.java
b555108aa54c8fe388fffca26d0382cceef7b797
[]
no_license
shruddnr12/GuGuDanFighter
8ae1a414a6059dbadf9aba01d1dcfe62b91be174
96f50a2b54cf221a004c7e5177ef73816b92dd93
refs/heads/master
2021-01-01T18:32:47.323526
2017-07-25T08:34:40
2017-07-25T08:34:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
337
java
package com.jx372.gugudanfighter; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; public class HelpActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_help); } }
[ "kickscar@gmail.com" ]
kickscar@gmail.com
ae8087bd1e456aea844e605cd0be97b25bfd4751
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/sgw-20180511/src/main/java/com/aliyun/sgw20180511/models/OpenSgwServiceResponse.java
6570dd024ea09e229eca5fafad4620c753814e65
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
1,052
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.sgw20180511.models; import com.aliyun.tea.*; public class OpenSgwServiceResponse extends TeaModel { @NameInMap("headers") @Validation(required = true) public java.util.Map<String, String> headers; @NameInMap("body") @Validation(required = true) public OpenSgwServiceResponseBody body; public static OpenSgwServiceResponse build(java.util.Map<String, ?> map) throws Exception { OpenSgwServiceResponse self = new OpenSgwServiceResponse(); return TeaModel.build(map, self); } public OpenSgwServiceResponse setHeaders(java.util.Map<String, String> headers) { this.headers = headers; return this; } public java.util.Map<String, String> getHeaders() { return this.headers; } public OpenSgwServiceResponse setBody(OpenSgwServiceResponseBody body) { this.body = body; return this; } public OpenSgwServiceResponseBody getBody() { return this.body; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
b284a5c4ede63ecd5a1ad3200daa0a96a0c151ff
fc9f781dcf4907114f884e33b634eb8d0f6ddd5a
/ActiSoftWeb/src/java/Agenda/AgendaList.java
cdb0cbf242bce426268a77574e8ab9114b7f5e7d
[]
no_license
Dgiulian/ActiSoft
c3517fa09c0179764cde2e23405273f4c4d71554
7f9b50772b2bde1ed905cb0c899356d8b0a04e83
refs/heads/master
2021-05-01T15:22:57.506495
2020-10-10T00:35:35
2020-10-10T00:35:35
50,962,477
0
0
null
null
null
null
UTF-8
Java
false
false
3,768
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package Agenda; import bd.Agenda; import com.google.gson.Gson; import java.io.IOException; import java.io.PrintWriter; import java.util.HashMap; import java.util.List; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import transaccion.TAgenda; import utils.BaseException; import utils.JsonRespuesta; import utils.Parser; /** * * @author Diego */ public class AgendaList extends HttpServlet { /** * Processes requests for both HTTP * <code>GET</code> and * <code>POST</code> methods. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("application/json;charset=UTF-8"); PrintWriter out = response.getWriter(); String pagNro = request.getParameter("pagNro"); Integer id_usuario = Parser.parseInt(request.getParameter("id_usuario")); HashMap<String,String> mapFiltro = new HashMap<String,String>(); Integer page = (pagNro!=null)?Integer.parseInt(pagNro):0; JsonRespuesta jr = new JsonRespuesta(); try { List<Agenda> lista; TAgenda tr = new TAgenda(); if(id_usuario!=0) mapFiltro.put("id_usuario",id_usuario.toString()); lista = tr.getListFiltro(mapFiltro); if (lista != null) { jr.setTotalRecordCount(lista.size()); } else { jr.setTotalRecordCount(0); } jr.setResult("OK"); jr.setRecords(lista); if(id_usuario!=0) throw new BaseException("ERROR","No se encontr&oacute; el usuario"); } catch(BaseException ex){ jr.setResult(ex.getResult()); jr.setMessage(ex.getMessage()); } finally { String jsonResult = new Gson().toJson(jr); out.print(jsonResult); out.close(); } } // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code."> /** * Handles the HTTP * <code>GET</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** * Handles the HTTP * <code>POST</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** * Returns a short description of the servlet. * * @return a String containing servlet description */ @Override public String getServletInfo() { return "Short description"; }// </editor-fold> }
[ "giuliani.diego@gmail.com" ]
giuliani.diego@gmail.com
7b4ef67a1b5cfb0441959c6eddf57be5cf29f213
55d22fdfec53708213ed7a13f2557c4e1b4803c9
/pojo/src/main/java/net/sf/mmm/util/pojo/descriptor/api/accessor/PojoPropertyAccessorIndexedNonArg.java
86c59bc23f8dfe7298016c21af59db4980047e0b
[ "Apache-2.0" ]
permissive
m-m-m/util
981f66f58a99b49c1ea458d7d12db3156bfc33ed
0b6d40b1976f9fa2f32b1a7ff03821eef939b301
refs/heads/master
2021-06-15T16:04:47.825146
2021-03-01T15:38:37
2021-03-01T15:38:37
4,889,980
2
2
Apache-2.0
2020-10-13T10:21:28
2012-07-04T19:08:14
Java
UTF-8
Java
false
false
1,505
java
/* Copyright (c) The m-m-m Team, Licensed under the Apache License, Version 2.0 * http://www.apache.org/licenses/LICENSE-2.0 */ package net.sf.mmm.util.pojo.descriptor.api.accessor; import net.sf.mmm.util.reflect.api.ReflectionException; /** * This is the interface for a {@link PojoPropertyAccessor property-accessor} that allows to {@link #invoke(Object, int) * perform something} (e.g. get or remove) for a given {@code index} of an indexed property. * * @author Joerg Hohwiller (hohwille at users.sourceforge.net) * @since 1.1.0 */ public interface PojoPropertyAccessorIndexedNonArg extends PojoPropertyAccessor { @Override PojoPropertyAccessorIndexedNonArgMode getMode(); /** * This method invokes the according property-method of {@code pojoInstance} with the given arguments. <br> * * @param pojoInstance is the instance of the POJO where to access the property. Has to be an instance of the * {@link net.sf.mmm.util.pojo.descriptor.api.PojoDescriptor#getPojoClass() type} from where this accessor was * created for. * @param index is the position in the indexed property (e.g. where to get or remove an item). * @return the result of the invocation. Will be {@code null} if void (e.g. remove method). * @throws ReflectionException if the underlying {@link PojoPropertyAccessor#getAccessibleObject() accessor} caused an * error during reflection. */ Object invoke(Object pojoInstance, int index) throws ReflectionException; }
[ "hohwille@users.sourceforge.net" ]
hohwille@users.sourceforge.net
3990cb277de450398458c0f2398610d6c869de71
86a4f4a2dc3f38c0b3188d994950f4c79f036484
/src/android/support/v7/media/RegisteredMediaRouteProviderWatcher.java
439f583aaf6fb7241e77a4d30733200b532cf6c2
[]
no_license
reverseengineeringer/com.cbs.app
8f6f3532f119898bfcb6d7ddfeb465eae44d5cd4
7e588f7156f36177b0ff8f7dc13151c451a65051
refs/heads/master
2021-01-10T05:08:31.000287
2016-03-19T20:39:17
2016-03-19T20:39:17
54,283,808
0
0
null
null
null
null
UTF-8
Java
false
false
5,098
java
package android.support.v7.media; import android.content.BroadcastReceiver; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.content.pm.ServiceInfo; import android.os.Handler; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; final class RegisteredMediaRouteProviderWatcher { private final Callback mCallback; private final Context mContext; private final Handler mHandler; private final PackageManager mPackageManager; private final ArrayList<RegisteredMediaRouteProvider> mProviders = new ArrayList(); private boolean mRunning; private final BroadcastReceiver mScanPackagesReceiver = new BroadcastReceiver() { public void onReceive(Context paramAnonymousContext, Intent paramAnonymousIntent) { RegisteredMediaRouteProviderWatcher.this.scanPackages(); } }; private final Runnable mScanPackagesRunnable = new Runnable() { public void run() { RegisteredMediaRouteProviderWatcher.this.scanPackages(); } }; public RegisteredMediaRouteProviderWatcher(Context paramContext, Callback paramCallback) { mContext = paramContext; mCallback = paramCallback; mHandler = new Handler(); mPackageManager = paramContext.getPackageManager(); } private int findProvider(String paramString1, String paramString2) { int j = mProviders.size(); int i = 0; while (i < j) { if (((RegisteredMediaRouteProvider)mProviders.get(i)).hasComponentName(paramString1, paramString2)) { return i; } i += 1; } return -1; } private void scanPackages() { if (!mRunning) {} label38: label272: label273: for (;;) { return; Object localObject1 = new Intent("android.media.MediaRouteProviderService"); localObject1 = mPackageManager.queryIntentServices((Intent)localObject1, 0).iterator(); int i = 0; int j; while (((Iterator)localObject1).hasNext()) { Object localObject2 = nextserviceInfo; if (localObject2 == null) { break label272; } int k = findProvider(packageName, name); if (k < 0) { localObject2 = new RegisteredMediaRouteProvider(mContext, new ComponentName(packageName, name)); ((RegisteredMediaRouteProvider)localObject2).start(); mProviders.add(i, localObject2); mCallback.addProvider((MediaRouteProvider)localObject2); i += 1; } else { if (k < i) { break label272; } localObject2 = (RegisteredMediaRouteProvider)mProviders.get(k); ((RegisteredMediaRouteProvider)localObject2).start(); ((RegisteredMediaRouteProvider)localObject2).rebindIfDisconnected(); localObject2 = mProviders; j = i + 1; Collections.swap((List)localObject2, k, i); i = j; } } for (;;) { break label38; if (i >= mProviders.size()) { break label273; } j = mProviders.size() - 1; while (j >= i) { localObject1 = (RegisteredMediaRouteProvider)mProviders.get(j); mCallback.removeProvider((MediaRouteProvider)localObject1); mProviders.remove(localObject1); ((RegisteredMediaRouteProvider)localObject1).stop(); j -= 1; } break; } } } public final void start() { if (!mRunning) { mRunning = true; IntentFilter localIntentFilter = new IntentFilter(); localIntentFilter.addAction("android.intent.action.PACKAGE_ADDED"); localIntentFilter.addAction("android.intent.action.PACKAGE_REMOVED"); localIntentFilter.addAction("android.intent.action.PACKAGE_CHANGED"); localIntentFilter.addAction("android.intent.action.PACKAGE_REPLACED"); localIntentFilter.addAction("android.intent.action.PACKAGE_RESTARTED"); localIntentFilter.addDataScheme("package"); mContext.registerReceiver(mScanPackagesReceiver, localIntentFilter, null, mHandler); mHandler.post(mScanPackagesRunnable); } } public final void stop() { if (mRunning) { mRunning = false; mContext.unregisterReceiver(mScanPackagesReceiver); mHandler.removeCallbacks(mScanPackagesRunnable); int i = mProviders.size() - 1; while (i >= 0) { ((RegisteredMediaRouteProvider)mProviders.get(i)).stop(); i -= 1; } } } public static abstract interface Callback { public abstract void addProvider(MediaRouteProvider paramMediaRouteProvider); public abstract void removeProvider(MediaRouteProvider paramMediaRouteProvider); } } /* Location: * Qualified Name: android.support.v7.media.RegisteredMediaRouteProviderWatcher * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
a89377381deb228e15b8eed97994b098b1e589a6
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/sgw-20180511/src/main/java/com/aliyun/sgw20180511/models/ReportGatewayUsageResponse.java
54ca83c382ea1721437b1d7733fd0def6cb34589
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
1,088
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.sgw20180511.models; import com.aliyun.tea.*; public class ReportGatewayUsageResponse extends TeaModel { @NameInMap("headers") @Validation(required = true) public java.util.Map<String, String> headers; @NameInMap("body") @Validation(required = true) public ReportGatewayUsageResponseBody body; public static ReportGatewayUsageResponse build(java.util.Map<String, ?> map) throws Exception { ReportGatewayUsageResponse self = new ReportGatewayUsageResponse(); return TeaModel.build(map, self); } public ReportGatewayUsageResponse setHeaders(java.util.Map<String, String> headers) { this.headers = headers; return this; } public java.util.Map<String, String> getHeaders() { return this.headers; } public ReportGatewayUsageResponse setBody(ReportGatewayUsageResponseBody body) { this.body = body; return this; } public ReportGatewayUsageResponseBody getBody() { return this.body; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
ace526e0abc87d86905d3dd128e31663c9a35c1e
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.assistant-base/sources/X/HH.java
74a954ff345055dae8c567f46401a9dcaf7fb16e
[]
no_license
phwd/quest-tracker
286e605644fc05f00f4904e51f73d77444a78003
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
refs/heads/main
2023-03-29T20:33:10.959529
2021-04-10T22:14:11
2021-04-10T22:14:11
357,185,040
4
2
null
2021-04-12T12:28:09
2021-04-12T12:28:08
null
UTF-8
Java
false
false
588
java
package X; import android.content.SharedPreferences; public final class HH { public static final ZW A02; public static final ZW A03; public static final ZW A04; public final boolean A00 = true; public final SharedPreferences A01; public HH(SharedPreferences sharedPreferences) { this.A01 = sharedPreferences; } static { ZW zw = HL.A0C; ZW zw2 = new ZW(zw, "papaya/", zw.A00); A03 = zw2; A02 = new ZW(zw2, "client_id_key", zw2.A00); ZW zw3 = A03; A04 = new ZW(zw3, "store_path", zw3.A00); } }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
e29789908517f68b74ecb78be1ef4a36c14e9c18
eca4a253fe0eba19f60d28363b10c433c57ab7a1
/server/openjacob.engine/java/de/tif/jacob/screen/IBrowserCellRenderer.java
55bc61c31f9f9bf9c4508437d5593abd17f7f967
[]
no_license
freegroup/Open-jACOB
632f20575092516f449591bf6f251772f599e5fc
84f0a6af83876bd21c453132ca6f98a46609f1f4
refs/heads/master
2021-01-10T11:08:03.604819
2015-05-25T10:25:49
2015-05-25T10:25:49
36,183,560
0
0
null
null
null
null
UTF-8
Java
false
false
974
java
/* * Created on 23.01.2010 * */ package de.tif.jacob.screen; import de.tif.jacob.core.data.IDataBrowserRecord; import de.tif.jacob.screen.impl.html.ClientContext; public abstract class IBrowserCellRenderer { /** * Return the HTML content (the part between the <b>TD</b> tag) of the cell. * * @param context * @param record the related record * @param row the current row index. Can be used for even/odd rendering (zebra) * @param cellContent The raw content to render. This has may be filtered by a UI filterCell Method. * @return * @since 2.10 */ public String renderCell(IClientContext context,IBrowser browser, IDataBrowserRecord record, int row, String cellContent) { return cellContent; } /** * Return the width of the cell/column or <b>0</b> if the engine should calculate * the best width. * * @param context * @return */ public int getCellWidth(ClientContext context) { return 0; } }
[ "a.herz@freegroup.de" ]
a.herz@freegroup.de
28d5ec178fcebd6f4b7c85920d86de14f6a2d54c
fd0b60a9bf20a1c7a4c9ac4db881079148aee247
/src/edu/stanford/bmir/protege/web/client/ui/hierarchy/HierarchyNodePath.java
4d4e5a553b3bf7547e325cceac8c6d70a798fb1a
[]
no_license
irirnelnistor/webprotege
7c5015c114d2655e143b455113c83189513835a2
de0b3d2f3bc8c0e8da34ca1a5f7d295e807fd71f
refs/heads/master
2020-04-01T16:37:33.692931
2013-10-17T20:42:54
2013-10-17T20:42:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
604
java
package edu.stanford.bmir.protege.web.client.ui.hierarchy; import java.io.Serializable; import java.util.ArrayList; import java.util.List; /** * Author: Matthew Horridge<br> * Stanford University<br> * Bio-Medical Informatics Research Group<br> * Date: 12/06/2012 */ public class HierarchyNodePath implements Serializable { private List<HierarchyNode> path; private HierarchyNodePath() { } public HierarchyNodePath(List<HierarchyNode> path) { this.path = new ArrayList<HierarchyNode>(path); } public List<HierarchyNode> getPath() { return path; } }
[ "matthew.horridge@stanford.edu" ]
matthew.horridge@stanford.edu
5de23c5e29518387c89487e2e0c7d6d16ea75f71
5de04d8bb9e6e033246c52b034e4d38ce2de08e3
/hystrix/src/main/java/com/doze/HystrixApplication.java
81f642a04009f1a292f652626f02090cb50eec9b
[]
no_license
ishbn/SpringCloudDemo
a5933e37243e3e4a4c231b9497685caccd184311
793641fabbd906d960c9f0ac7ca3799987904f2b
refs/heads/master
2023-08-05T06:25:32.149452
2019-08-27T16:33:16
2019-08-27T16:33:16
204,493,054
0
0
null
null
null
null
UTF-8
Java
false
false
735
java
package com.doze; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker; import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard; import org.springframework.cloud.openfeign.EnableFeignClients; /** * @BelongsProject: clouddemo * @BelongsPackage: com.doze * @Author: hbn * @CreateTime: 2019-08-26 17:09 * @Description: */ @SpringBootApplication @EnableFeignClients @EnableCircuitBreaker @EnableHystrixDashboard public class HystrixApplication { public static void main(String[] args) { SpringApplication.run(HystrixApplication.class,args); } }
[ "l" ]
l
332479301a69d2cda6208f373ee0800b8b69d80f
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
/Code Snippet Repository/Spring/Spring404.java
c2cceb3ef6ee4a24b76cd6132e6fb68245da0f06
[]
no_license
saber13812002/DeepCRM
3336a244d4852a364800af3181e03e868cf6f9f5
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
refs/heads/master
2023-03-16T00:08:06.473699
2018-04-18T05:29:50
2018-04-18T05:29:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
983
java
@Test public void testDynamicAndStaticMethodMatcherIntersection() throws Exception { MethodMatcher mm1 = MethodMatcher.TRUE; MethodMatcher mm2 = new TestDynamicMethodMatcherWhichMatches(); MethodMatcher intersection = MethodMatchers.intersection(mm1, mm2); assertTrue("Intersection is a dynamic matcher", intersection.isRuntime()); assertTrue("2Matched setAge method", intersection.matches(ITESTBEAN_SETAGE, TestBean.class)); assertTrue("3Matched setAge method", intersection.matches(ITESTBEAN_SETAGE, TestBean.class, new Integer(5))); // Knock out dynamic part intersection = MethodMatchers.intersection(intersection, new TestDynamicMethodMatcherWhichDoesNotMatch()); assertTrue("Intersection is a dynamic matcher", intersection.isRuntime()); assertTrue("2Matched setAge method", intersection.matches(ITESTBEAN_SETAGE, TestBean.class)); assertFalse("3 - not Matched setAge method", intersection.matches(ITESTBEAN_SETAGE, TestBean.class, new Integer(5))); }
[ "Qing.Mi@my.cityu.edu.hk" ]
Qing.Mi@my.cityu.edu.hk
5f9fc15c5773a4791b99f3c1eb082f1842c22669
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_fc78cf9170f8545bd35e05daaa74e7e14d1e261b/DefaultResourceLocator/2_fc78cf9170f8545bd35e05daaa74e7e14d1e261b_DefaultResourceLocator_t.java
c73e093e66fda3fe386e086090f4d3d30ffd4408
[]
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
2,953
java
/* * GeoTools - The Open Source Java GIS Toolkit * http://geotools.org * * (C) 2005-2008, Open Source Geospatial Foundation (OSGeo) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; * version 2.1 of the License. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ package org.geotools.styling; import java.io.File; import java.net.MalformedURLException; import java.net.URL; import org.geotools.data.DataUtilities; /** * Default locator for online resources. Searches by absolute URL, relative * path w.r.t. to SLD document or classpath. * * @author Jan De Moerloose * */ public class DefaultResourceLocator implements ResourceLocator { URL sourceUrl; private static final java.util.logging.Logger LOGGER = org.geotools.util.logging.Logging .getLogger("org.geotools.styling"); public void setSourceUrl(URL sourceUrl) { this.sourceUrl = sourceUrl; } public URL locateResource(String uri) { URL url = null; try { url = new URL(uri); //url is valid, check if it is relative File f = DataUtilities.urlToFile(url); if (f != null && !f.isAbsolute()) { //ok, relative url, if the file exists when we are ok if (!f.exists() && sourceUrl != null) { URL relativeUrl = makeRelativeURL(f.getPath()); if (relativeUrl != null) { f = DataUtilities.urlToFile(relativeUrl); if (f.exists()) { //bingo! url = relativeUrl; } } } } } catch (MalformedURLException mfe) { LOGGER.fine("Looks like " + uri + " is a relative path.."); if (sourceUrl != null) { url = makeRelativeURL(uri); } if (url == null) { url = getClass().getResource(uri); if (url == null) LOGGER.warning("can't parse " + uri + " as a java resource present in the classpath"); } } return url; } URL makeRelativeURL(String uri) { try { return new URL(sourceUrl, uri); } catch (MalformedURLException e) { LOGGER.warning("can't parse " + uri + " as relative to" + sourceUrl.toExternalForm()); } return null; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
e852d7e1d877f9438a6193479a57454c9b278408
87901d9fd3279eb58211befa5357553d123cfe0c
/bin/platform/bootstrap/gensrc/de/hybris/platform/btg/model/BTGConditionModel.java
95e3dc0cd754c7e9343d57b1ab6d87d54c603d67
[]
no_license
prafullnagane/learning
4d120b801222cbb0d7cc1cc329193575b1194537
02b46a0396cca808f4b29cd53088d2df31f43ea0
refs/heads/master
2020-03-27T23:04:17.390207
2014-02-27T06:19:49
2014-02-27T06:19:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,257
java
/* * ---------------------------------------------------------------- * --- WARNING: THIS FILE IS GENERATED AND WILL BE OVERWRITTEN! --- * --- Generated at Dec 13, 2013 6:34:48 PM --- * ---------------------------------------------------------------- * * [y] hybris Platform * * Copyright (c) 2000-2011 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with hybris. * */ package de.hybris.platform.btg.model; import de.hybris.platform.btg.enums.BTGConditionEvaluationScope; import de.hybris.platform.btg.model.BTGConditionResultModel; import de.hybris.platform.btg.model.BTGItemModel; import de.hybris.platform.btg.model.BTGRuleModel; import de.hybris.platform.catalog.model.CatalogVersionModel; import de.hybris.platform.core.model.ItemModel; import de.hybris.platform.servicelayer.model.ItemModelContext; import java.util.Collection; /** * Generated model class for type BTGCondition first defined at extension btg. */ @SuppressWarnings("all") public class BTGConditionModel extends BTGItemModel { /**<i>Generated model type code constant.</i>*/ public final static String _TYPECODE = "BTGCondition"; /**<i>Generated relation code constant for relation <code>BTGRuleToBTGConditionsRelation</code> defining source attribute <code>rule</code> in extension <code>btg</code>.</i>*/ public final static String _BTGRULETOBTGCONDITIONSRELATION = "BTGRuleToBTGConditionsRelation"; /** <i>Generated constant</i> - Attribute key of <code>BTGCondition.rule</code> attribute defined at extension <code>btg</code>. */ public static final String RULE = "rule"; /** <i>Generated constant</i> - Attribute key of <code>BTGCondition.results</code> attribute defined at extension <code>btg</code>. */ public static final String RESULTS = "results"; /** <i>Generated constant</i> - Attribute key of <code>BTGCondition.beanId</code> attribute defined at extension <code>btg</code>. */ public static final String BEANID = "beanId"; /** <i>Generated constant</i> - Attribute key of <code>BTGCondition.evaluationScope</code> attribute defined at extension <code>btg</code>. */ public static final String EVALUATIONSCOPE = "evaluationScope"; /** <i>Generated variable</i> - Variable of <code>BTGCondition.rule</code> attribute defined at extension <code>btg</code>. */ private BTGRuleModel _rule; /** <i>Generated variable</i> - Variable of <code>BTGCondition.results</code> attribute defined at extension <code>btg</code>. */ private Collection<BTGConditionResultModel> _results; /** <i>Generated variable</i> - Variable of <code>BTGCondition.beanId</code> attribute defined at extension <code>btg</code>. */ private String _beanId; /** <i>Generated variable</i> - Variable of <code>BTGCondition.evaluationScope</code> attribute defined at extension <code>btg</code>. */ private BTGConditionEvaluationScope _evaluationScope; /** * <i>Generated constructor</i> - Default constructor for generic creation. */ public BTGConditionModel() { super(); } /** * <i>Generated constructor</i> - Default constructor for creation with existing context * @param ctx the model context to be injected, must not be null */ public BTGConditionModel(final ItemModelContext ctx) { super(ctx); } /** * <i>Generated constructor</i> - Constructor with all mandatory attributes. * @deprecated Since 4.1.1 Please use the default constructor without parameters * @param _catalogVersion initial attribute declared by type <code>BTGItem</code> at extension <code>btg</code> * @param _uid initial attribute declared by type <code>BTGItem</code> at extension <code>btg</code> */ @Deprecated public BTGConditionModel(final CatalogVersionModel _catalogVersion, final String _uid) { super(); setCatalogVersion(_catalogVersion); setUid(_uid); } /** * <i>Generated constructor</i> - for all mandatory and initial attributes. * @deprecated Since 4.1.1 Please use the default constructor without parameters * @param _catalogVersion initial attribute declared by type <code>BTGItem</code> at extension <code>btg</code> * @param _owner initial attribute declared by type <code>Item</code> at extension <code>core</code> * @param _uid initial attribute declared by type <code>BTGItem</code> at extension <code>btg</code> */ @Deprecated public BTGConditionModel(final CatalogVersionModel _catalogVersion, final ItemModel _owner, final String _uid) { super(); setCatalogVersion(_catalogVersion); setOwner(_owner); setUid(_uid); } /** * <i>Generated method</i> - Getter of the <code>BTGCondition.beanId</code> attribute defined at extension <code>btg</code>. * @return the beanId */ public String getBeanId() { return _beanId = getPersistenceContext().getValue(BEANID, _beanId); } /** * <i>Generated method</i> - Getter of the <code>BTGCondition.evaluationScope</code> attribute defined at extension <code>btg</code>. * @return the evaluationScope */ public BTGConditionEvaluationScope getEvaluationScope() { return _evaluationScope = getPersistenceContext().getValue(EVALUATIONSCOPE, _evaluationScope); } /** * <i>Generated method</i> - Getter of the <code>BTGCondition.results</code> attribute defined at extension <code>btg</code>. * Consider using FlexibleSearchService::searchRelation for pagination support of large result sets. * @return the results */ public Collection<BTGConditionResultModel> getResults() { return _results = getPersistenceContext().getValue(RESULTS, _results); } /** * <i>Generated method</i> - Getter of the <code>BTGCondition.rule</code> attribute defined at extension <code>btg</code>. * @return the rule */ public BTGRuleModel getRule() { return _rule = getPersistenceContext().getValue(RULE, _rule); } /** * <i>Generated method</i> - Setter of <code>BTGCondition.beanId</code> attribute defined at extension <code>btg</code>. * * @param value the beanId */ public void setBeanId(final String value) { _beanId = getPersistenceContext().setValue(BEANID, value); } /** * <i>Generated method</i> - Setter of <code>BTGCondition.evaluationScope</code> attribute defined at extension <code>btg</code>. * * @param value the evaluationScope */ public void setEvaluationScope(final BTGConditionEvaluationScope value) { _evaluationScope = getPersistenceContext().setValue(EVALUATIONSCOPE, value); } /** * <i>Generated method</i> - Setter of <code>BTGCondition.results</code> attribute defined at extension <code>btg</code>. * * @param value the results */ public void setResults(final Collection<BTGConditionResultModel> value) { _results = getPersistenceContext().setValue(RESULTS, value); } /** * <i>Generated method</i> - Setter of <code>BTGCondition.rule</code> attribute defined at extension <code>btg</code>. * * @param value the rule */ public void setRule(final BTGRuleModel value) { _rule = getPersistenceContext().setValue(RULE, value); } }
[ "admin1@neev31.(none)" ]
admin1@neev31.(none)
8802af1784478505eaf176879548bd2ea69d23f1
93b0beab85ffb1e6e4ebd4a2129aea3c72851567
/ppdai-sms/ac-sms-api/ac-sms-admin/src/main/java/com/ppdai/ac/sms/contract/model/vo/TemplateApproveVo.java
613e01f3eb4d866ccc958bec69c9803a373e1c16
[]
no_license
qqbenst/sms
3d60a06d846bbe57fdae366513252c7ef2888fc2
6cda716eea98aae84ace153a8b1b82e886509fb4
refs/heads/master
2021-12-22T10:11:56.962033
2017-10-12T14:39:27
2017-10-12T14:39:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,251
java
package com.ppdai.ac.sms.contract.model.vo; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.annotations.ApiModelProperty; import java.sql.Date; import java.sql.Timestamp; /** * Created by wangxiaomei02 on 2017/5/10. * 模板审批列表页 * */ public class TemplateApproveVo { @JsonProperty("departmentId") private int departmentId; @JsonProperty("applicantEmail") private String applicantEmail; @JsonProperty("content") private String content; @JsonProperty("maxCount") private int maxCount; @JsonProperty("totalMaxCount") private int totalMaxCount; @JsonProperty("intervalTime") private int intervalTime; @JsonProperty("templateId") private int templateId; @JsonProperty("title") private String title; @JsonProperty("applicant") private String applicant; @JsonProperty("applyTime") private Timestamp applyTime; @JsonProperty("businessId") private int businessId; @JsonProperty("messageKind") private int messageKind; @JsonProperty("callerId") private int callerId; @JsonProperty("reason") private String reason; @JsonProperty("approveStatus") private int approveStatus; public String getReason() { return reason; } public void setReason(String reason) { this.reason = reason; } public int getMaxCount() { return maxCount; } public void setMaxCount(int maxCount) { this.maxCount = maxCount; } @ApiModelProperty(value = "部门") public int getDepartmentId() { return departmentId; } public void setDepartmentId(int departmentId) { this.departmentId = departmentId; } @ApiModelProperty(value = "申请人邮箱") public String getApplicantEmail() { return applicantEmail; } public void setApplicantEmail(String applicantEmail) { this.applicantEmail = applicantEmail; } @ApiModelProperty(value = "模板内容") public String getContent() { return content; } public void setContent(String content) { this.content = content; } @ApiModelProperty(value = "单日限制条数") public int getTotalMaxCount() { return totalMaxCount; } public void setTotalMaxCount(int totalMaxCount) { this.totalMaxCount = totalMaxCount; } @ApiModelProperty(value = "间隔时间") public int getIntervalTime() { return intervalTime; } public void setIntervalTime(int intervalTime) { this.intervalTime = intervalTime; } @ApiModelProperty(value = "模板状态") public int getApproveStatus() { return approveStatus; } public void setApproveStatus(int approveStatus) { this.approveStatus = approveStatus; } @ApiModelProperty(value = "标题") public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } @ApiModelProperty(value = "申请人") public String getApplicant() { return applicant; } public void setApplicant(String applicant) { this.applicant = applicant; } @ApiModelProperty(value = "申请时间") public Timestamp getApplyTime() { return applyTime; } public void setApplyTime(Timestamp applyTime) { this.applyTime = applyTime; } @ApiModelProperty(value = "业务类型") public int getBusinessId() { return businessId; } public void setBusinessId(int businessId) { this.businessId = businessId; } @ApiModelProperty(value = "模板类型") public int getMessageKind() { return messageKind; } public void setMessageKind(int messageKind) { this.messageKind = messageKind; } @ApiModelProperty(value = "接入方") public int getCallerId() { return callerId; } public void setCallerId(int callerId) { this.callerId = callerId; } @ApiModelProperty(value = "模板id") public int getTemplateId() { return templateId; } public void setTemplateId(int templateId) { this.templateId = templateId; } }
[ "442620332@qq.com" ]
442620332@qq.com
9c077cf2f4e293b7baa2d99e11fb4ec331ce058d
cc49ac5e8006e6ab9b258358073f85c984eb74db
/e3-common/src/main/java/cn/e3mall/common/pojo/EasyUIDataGridResult.java
ffe3a21b287d4ce7178de1ec844112de4f8c438f
[]
no_license
Lin-Js1/e3mall
9da94a34c371be58c57e7348ea13ccfae3a087b3
27113c2c8ad1c14681bc12e2dde212fe63a56571
refs/heads/master
2022-12-17T12:12:13.230499
2020-02-03T13:48:20
2020-02-03T13:48:20
236,494,544
0
0
null
2022-12-16T07:16:32
2020-01-27T13:18:02
JavaScript
UTF-8
Java
false
false
453
java
package cn.e3mall.common.pojo; import java.io.Serializable; import java.util.List; public class EasyUIDataGridResult implements Serializable { private long total; private List rows; public long getTotal() { return total; } public void setTotal(long total) { this.total = total; } public List getRows() { return rows; } public void setRows(List rows) { this.rows = rows; } }
[ "zhangsan@qq.com" ]
zhangsan@qq.com
234c54867c6d9a9c2e85d35cff92e137f962b029
0b666255a6945aa84281e5f64f6ccaab45c4ca13
/cmsv2.0.0/src/com/app/cms/dao/main/CmsModelDao.java
892ebdc18445dd2329207ca1ea05a45b3ece6d54
[]
no_license
zhangygit/cmsv2.0.0
a8cdc77ceb99b50bdf5b8ac7c99244c3ecc7e43a
d54ae6bc9855860c7d447629d31d22e2c9417d31
refs/heads/master
2021-01-17T21:28:52.841407
2014-08-25T02:13:00
2014-08-25T02:13:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
507
java
package com.app.cms.dao.main; import java.util.List; import com.app.cms.entity.main.CmsModel; import com.app.common.hibernate3.Updater; public interface CmsModelDao { public List<CmsModel> getList(boolean containDisabled,Boolean hasContent); public CmsModel getDefModel(); public CmsModel findById(Integer id); public CmsModel findByPath(String path); public CmsModel save(CmsModel bean); public CmsModel updateByUpdater(Updater<CmsModel> updater); public CmsModel deleteById(Integer id); }
[ "17909328@163.com" ]
17909328@163.com
35338203956f028affbf5be7808b556a4389b342
87c3770b7bbcc2c3c6f2ce53c19535bfb2bf267d
/src/com/ashish/exception/NestedTry.java
5beb4c47bbd97de7f50fc19db5dd4234bbfe75be
[]
no_license
ashgit1/ASH_UCF_L2.2
6abe8e81a257456b40bff6f303d963f21602e93c
421de6e8e64a52776f11f0bfcbe0e43da3fd4782
refs/heads/master
2021-01-17T13:12:07.840398
2017-10-10T17:33:49
2017-10-10T17:33:49
42,356,588
0
0
null
null
null
null
UTF-8
Java
false
false
533
java
package com.ashish.exception; public class NestedTry { public static void main(String[] args) { try { try { System.out.println("going to divide"); int b = 39 / 0; } catch (ArithmeticException e) { System.out.println(e); } try { int a[] = new int[5]; a[5] = 4; } catch (ArrayIndexOutOfBoundsException e) { System.out.println(e); } System.out.println("other statement"); } catch (Exception e) { System.out.println("handeled"); } System.out.println("normal flow.."); } }
[ "adoreashish@gmail.com" ]
adoreashish@gmail.com
e023f897fa6efcbab9637bbccf95b2fb4e633a55
263d8b865886a2b9e2964c5a20867b8e391ad002
/src/main/java/pl/travel360/dto/OfferDto.java
412058019fcd89153a14fd95d556d5764e14f041
[]
no_license
rimmugygr/Travel-Office-Project
b6737a4fba044b419946b5fd6cfe8e7115975097
f00f4235dbc14fb5d9d46b1be2831e0c2292eaa4
refs/heads/master
2023-08-13T14:46:33.377108
2020-08-19T08:48:34
2020-08-19T08:48:34
288,237,276
0
0
null
null
null
null
UTF-8
Java
false
false
473
java
package pl.travel360.dto; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.*; import java.time.LocalDate; @Data @AllArgsConstructor(staticName = "of") @Builder @Setter @Getter public class OfferDto { private Long id; private Long cityId; private Long price; private String name; private String description; @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "dd-MM-yyyy") private LocalDate date; private Long day; }
[ "rimmugygr@gmail.com" ]
rimmugygr@gmail.com
38d93788ef668c583deca8a6434c8aa999930a87
850657257217e3bacf8e6842249e42de6f0a3dde
/app/src/main/java/com/v/gyyx/areaLogWeb2/imodelImpl.java
2b23d06cae2ebe865cf2d89fa2e9f2c4f117a298
[]
no_license
zhangqifan1/GYYX
c7b2e49873313fcc9bc1b9062f6d0a8b2f2d8170
32a0f7ed927cf709c1823525b234edd90a68f714
refs/heads/master
2021-09-01T09:19:34.357187
2017-12-26T06:51:59
2017-12-26T06:51:59
115,294,548
0
0
null
null
null
null
UTF-8
Java
false
false
1,852
java
package com.v.gyyx.areaLogWeb2; import android.content.Context; import com.google.gson.Gson; import com.v.gyyx.Const; import com.v.gyyx.beans.YouKeBean; import com.v.gyyx.utils.CallServer; import com.v.gyyx.utils.DialogUtils; import com.v.gyyx.utils.ToastUtils; import com.yanzhenjie.nohttp.NoHttp; import com.yanzhenjie.nohttp.RequestMethod; import com.yanzhenjie.nohttp.rest.CacheMode; import com.yanzhenjie.nohttp.rest.Request; import com.yanzhenjie.nohttp.rest.Response; import com.yanzhenjie.nohttp.rest.SimpleResponseListener; /** * Created by Administrator on 2017/12/15. */ public class imodelImpl implements imodel { @Override public void request(Object o, final CallBack3 callBack, final Context context) { Request<String> req = NoHttp.createStringRequest(Const.YouKe_POST, RequestMethod.POST); req.add("deviceId",Const.Device_ID); req.setCancelSign(o); //设置失败 读缓存 req.setCacheMode(CacheMode.REQUEST_NETWORK_FAILED_READ_CACHE); CallServer.getInstance().request(0, req, new SimpleResponseListener<String>() { @Override public void onStart(int what) { DialogUtils.showRoundProcessDialog(context); } @Override public void onSucceed(int what, Response<String> response) { String s = response.get(); YouKeBean youKeBean = new Gson().fromJson(s, YouKeBean.class); callBack.setYoukeBean(youKeBean); } @Override public void onFailed(int what, Response<String> response) { ToastUtils.Toast("大家都看到了啊,是他先没网了"); } @Override public void onFinish(int what) { DialogUtils.disMissDialog(); } }); } }
[ "852780161@qq.com" ]
852780161@qq.com
2e00b5289c123b4320accd4694237e975de5f416
997d2bac220050eda2ad492decf0dfd097800a19
/day14-code/src/com/itheima/ListAndSet/demo05Collections/Person.java
ad7c3b180a4762626ce87b4fe323fac051816ea7
[]
no_license
WXCD-LYY/lyynb
87c6fabcd7f37cea0ded31f760ec374d67844671
84f2a20c7f366cb1f55db2432cf8377a9170f45a
refs/heads/master
2023-03-05T14:30:06.936278
2021-02-06T05:27:53
2021-02-06T05:27:53
336,455,074
0
0
null
null
null
null
UTF-8
Java
false
false
1,052
java
package com.itheima.ListAndSet.demo05Collections; public class Person implements Comparable<Person>{ private String name; private int age; public Person() { } public Person(String name, int age) { this.name = name; this.age = age; } @Override public String toString() { return "Person{" + "name='" + name + '\'' + ", age=" + age + '}'; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } // 重写排序的规则 @Override public int compareTo(Person o) { // return 0; // 认为元素都是相同的 // 自定义比较的规则,比较两个人的年龄(this,参数Person) return this.getAge() - o.getAge(); // 年龄升序排序 // return o.getAge() - this.getAge(); // 年龄降序排序 } }
[ "13222762017@163.com" ]
13222762017@163.com
3d6cd5b59f420e54e3f5dbd4ac8b8be1bfaaf914
b5f57690fb2dd5860afbe1defd1ae25fae688a1f
/rpclearn/src/com/rpclearn/rpc/RpcProvider.java
fae17bc9d5c9e25a2e21725749152fb6c9f513e2
[]
no_license
zhangxinzhou/demos
a117f94e737308029dea9e4947d36b99af37c10f
a9de4fbf5b79c2d356009d8da00a1d4199b7eeb8
refs/heads/master
2022-01-31T12:48:55.485187
2019-05-17T13:04:01
2019-05-17T13:04:01
87,510,766
0
0
null
null
null
null
UTF-8
Java
false
false
504
java
package com.rpclearn.rpc; import com.rpclearn.core.RpcFramework; import com.rpclearn.service.HelloService; /** * 引用服务 * @author Administrator * */ public class RpcProvider { public static void main(String[] args) throws Exception { HelloService service=RpcFramework.refer(HelloService.class, "127.0.0.1", 1234); for (int i = 0; i < Integer.MAX_VALUE; i++) { String hello=service.hello("world "+i); System.out.println(hello); Thread.sleep(1000); } } }
[ "aabbcc5050@qq.com" ]
aabbcc5050@qq.com
d61ea2f117d62fa41e2bc8934fd394d42d6d0655
776f7a8bbd6aac23678aa99b72c14e8dd332e146
/src/rx/Observable$14$1.java
f44796e665a2761206351a956fe6b0fa3c1da95b
[]
no_license
arvinthrak/com.nianticlabs.pokemongo
aea656acdc6aa419904f02b7331f431e9a8bba39
bcf8617bafd27e64f165e107fdc820d85bedbc3a
refs/heads/master
2020-05-17T15:14:22.431395
2016-07-21T03:36:14
2016-07-21T03:36:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
355
java
package rx; import rx.functions.Func1; class Observable$14$1 implements Func1<Notification<?>, Void> { Observable$14$1(Observable.14 param14) {} public Void call(Notification<?> paramNotification) { return null; } } /* Location: * Qualified Name: rx.Observable.14.1 * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
cce457cd48524a629728a82f9ca839ee1af4a48d
e315c2bb2ea17cd8388a39aa0587e47cb417af0a
/configGenerale/tn/com/smartsoft/configGenerale/devises/devise/presentation/model/DeviseModel.java
f7b2ff3be932afa42740eb2d19e776efc89aa1ff
[]
no_license
wissem007/badges
000536a40e34e20592fe6e4cb2684d93604c44c9
2064bd07b52141cf3cff0892e628cc62b4f94fdc
refs/heads/master
2020-12-26T14:06:11.693609
2020-01-31T23:40:07
2020-01-31T23:40:07
237,530,008
0
0
null
null
null
null
UTF-8
Java
false
false
452
java
package tn.com.smartsoft.configGenerale.devises.devise.presentation.model; import java.util.List; import tn.com.smartsoft.framework.presentation.model.GenericEntiteModel; public class DeviseModel extends GenericEntiteModel { /** * */ private static final long serialVersionUID = 1L; /*private List listPays; public List getListPays() { return listPays; } public void setListPays(List listPays) { this.listPays = listPays; }*/ }
[ "alouiwiss@gmail.com" ]
alouiwiss@gmail.com
cb5e5713ae4d590c9dbb07bee31b4d0d56e2ad9f
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MATH-60b-5-24-PESA_II-WeightedSum:TestLen:CallDiversity/org/apache/commons/math/distribution/NormalDistributionImpl_ESTest.java
5a5316857103e043bdb761a9cf2652e7bc797477
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
587
java
/* * This file was automatically generated by EvoSuite * Sun Jan 19 18:15:26 UTC 2020 */ package org.apache.commons.math.distribution; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class NormalDistributionImpl_ESTest extends NormalDistributionImpl_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
9d347491d72b4e8e35c22a5bf4ac494efda3efeb
9c6755241eafce525184949f8c5dd11d2e6cefd1
/src/leetcode/algorithms/MaxScoreIndices.java
695b2541fd07f1754f1fa6e98eac361274ae066b
[]
no_license
Baltan/leetcode
782491c3281ad04efbe01dd0dcba2d9a71637a31
0951d7371ab93800e04429fa48ce99c51284d4c4
refs/heads/master
2023-08-17T00:47:41.880502
2023-08-16T16:04:32
2023-08-16T16:04:32
172,838,932
13
3
null
null
null
null
UTF-8
Java
false
false
2,161
java
package leetcode.algorithms; import java.util.ArrayList; import java.util.List; /** * Description: 2155. All Divisions With the Highest Score of a Binary Array * * @author Baltan * @date 2022/1/31 12:58 */ public class MaxScoreIndices { public static void main(String[] args) { System.out.println(maxScoreIndices(new int[]{0, 0, 1, 0})); System.out.println(maxScoreIndices(new int[]{0, 0, 0})); System.out.println(maxScoreIndices(new int[]{1, 1})); } public static List<Integer> maxScoreIndices(int[] nums) { List<Integer> result = new ArrayList<>(); /** * 假设当i为0的时候,即左子数组为空数组,右子数组为nums自身时,所求和为0(等于任意值x都可) */ int sum = 0; /** * 假设当i为0时就是所求和的最大值状态 */ int max = 0; /** * 从左向右逐一将nums中的每个元素从右子数组移出放进左子数组中,如果元素是0,会使得左子数组中0的个数加1,右子数组中1的个 * 数不变,从而所求和sum加1;反之如果元素是1,会使得左子数组中0的个数不变,右子数组中1的个数减1,从而所求和sum减1。通过 * 以上操作可以获得所求和为最大值时的状态 */ for (int i = 0; i < nums.length; i++) { sum += nums[i] == 0 ? 1 : -1; max = Math.max(max, sum); } /** * 重新将i初始化为0,即左子数组为空数组,右子数组为nums自身时 */ sum = 0; /** * 先判断当前初始化状态能否使所求和达到最大值 */ if (max == sum) { result.add(0); } /** * 从左向右逐一将nums中的每个元素从右子数组移出放进左子数组中,判断能否使所求和达到最大值 */ for (int i = 0; i < nums.length; i++) { sum += nums[i] == 0 ? 1 : -1; if (max == sum) { result.add(i + 1); } } return result; } }
[ "617640006@qq.com" ]
617640006@qq.com
5f30c6bb6e947dfa49d663717a390590cdd9abee
5a4e85cda26bdeb4a9a0334b34d8f8f9d6d0b76a
/src/org/dav/service/settings/ViewSettings.java
decd3d0b8069f2c0f35669906cbd41c50da0f173
[]
no_license
ADolodarenko/DAVService
cb7fe2485719f98e5dd648aa638e68c45dde0926
dabe59bea588be0bc76983d3c2d47e74769fcdda
refs/heads/master
2020-04-01T01:49:55.915494
2019-08-12T14:43:42
2019-08-12T14:43:42
152,754,309
0
0
null
null
null
null
UTF-8
Java
false
false
3,817
java
package org.dav.service.settings; import org.dav.service.settings.parameter.ParameterHeader; import org.dav.service.util.Constants; import org.dav.service.util.ResourceManager; import java.awt.*; import java.util.Locale; public class ViewSettings extends TransmissiveSettings { private static final int PARAM_COUNT = 1; private boolean mainWindowMaximized; private Point mainWindowPosition; private Dimension mainWindowSize; private Dimension mainWindowPreferredSize; public ViewSettings(ResourceManager resourceManager, Dimension mainWindowPreferredSize) throws Exception { super(resourceManager); headers = new ParameterHeader[PARAM_COUNT]; headers[0] = new ParameterHeader(Constants.KEY_PARAM_APP_LOCALE, Locale.class, resourceManager.getCurrentLocale()); this.mainWindowPreferredSize = mainWindowPreferredSize; mainWindowMaximized = false; mainWindowPosition = new Point(0, 0); mainWindowSize = new Dimension(this.mainWindowPreferredSize); init(); } @Override public void load() throws Exception { super.load(); loadMainWindowMaximized(); loadMainWindowPosition(); loadMainWindowSize(); } @Override public void save() throws Exception { SettingsManager.setStringValue(headers[0].getKeyString(), getAppLocale().toString()); SettingsManager.setStringValue(Constants.KEY_PARAM_MAIN_WIN_MAXIMIZED, String.valueOf(mainWindowMaximized)); SettingsManager.setIntValue(Constants.KEY_PARAM_MAIN_WIN_X, mainWindowPosition.x); SettingsManager.setIntValue(Constants.KEY_PARAM_MAIN_WIN_Y, mainWindowPosition.y); SettingsManager.setIntValue(Constants.KEY_PARAM_MAIN_WIN_WIDTH, mainWindowSize.width); SettingsManager.setIntValue(Constants.KEY_PARAM_MAIN_WIN_HEIGHT, mainWindowSize.height); SettingsManager.saveSettings(resourceManager.getConfig()); } private void loadMainWindowMaximized() { String maximizedString = SettingsManager.getStringValue(Constants.KEY_PARAM_MAIN_WIN_MAXIMIZED); if (Constants.MESS_TRUE.equalsIgnoreCase(maximizedString)) mainWindowMaximized = true; else mainWindowMaximized = false; } private void loadMainWindowPosition() { int x = 0; if (SettingsManager.hasValue(Constants.KEY_PARAM_MAIN_WIN_X)) x = SettingsManager.getIntValue(Constants.KEY_PARAM_MAIN_WIN_X, x); int y = 0; if (SettingsManager.hasValue(Constants.KEY_PARAM_MAIN_WIN_Y)) y = SettingsManager.getIntValue(Constants.KEY_PARAM_MAIN_WIN_Y, y); mainWindowPosition = new Point(x, y); } private void loadMainWindowSize() { int width = 0; if (SettingsManager.hasValue(Constants.KEY_PARAM_MAIN_WIN_WIDTH)) width = SettingsManager.getIntValue(Constants.KEY_PARAM_MAIN_WIN_WIDTH, width); int height = 0; if (SettingsManager.hasValue(Constants.KEY_PARAM_MAIN_WIN_HEIGHT)) height = SettingsManager.getIntValue(Constants.KEY_PARAM_MAIN_WIN_HEIGHT, height); if (width > 0 && height > 0) mainWindowSize = new Dimension(width, height); else mainWindowSize = mainWindowPreferredSize; } public Locale getAppLocale() { return ((Locale) paramMap.get(headers[0].getKeyString()).getValue()); } public boolean isMainWindowMaximized() { return mainWindowMaximized; } public Point getMainWindowPosition() { return mainWindowPosition; } public Dimension getMainWindowSize() { return mainWindowSize; } public void setMainWindowMaximized(boolean mainWindowMaximized) { this.mainWindowMaximized = mainWindowMaximized; } public void setMainWindowPosition(Point mainWindowPosition) { this.mainWindowPosition = mainWindowPosition; } public void setMainWindowSize(Dimension mainWindowSize) { this.mainWindowSize = mainWindowSize; } }
[ "adolodar@gmail.com" ]
adolodar@gmail.com
c2d9d3690620556224eb1811fc30f83bd41f9ff1
ce42321cfdce9451b8249605c317ca412fcdbb56
/src/me/maxwin/view/XListViewFooter.java
fd51fd04c07239453296c1e36ee47ea530e9b181
[]
no_license
droison/Qdaily
8656d10562d2e91f520cd2ed8ea8580b7778bbab
ae26718ddbe5fcb80b5d7582f9747e86e066c4d6
refs/heads/master
2016-09-06T17:23:25.261972
2014-09-11T15:38:50
2014-09-11T15:38:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,914
java
/** * @file XFooterView.java * @create Mar 31, 2012 9:33:43 PM * @author Maxwin * @description XListView's footer */ package me.maxwin.view; import com.qdaily.ui.R; import android.content.Context; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; import android.widget.LinearLayout; import android.widget.TextView; public class XListViewFooter extends LinearLayout { public final static int STATE_NORMAL = 0; public final static int STATE_READY = 1; public final static int STATE_LOADING = 2; private Context mContext; private View mContentView; private View mProgressBar; private TextView mHintView; public XListViewFooter(Context context) { super(context); initView(context); } public XListViewFooter(Context context, AttributeSet attrs) { super(context, attrs); initView(context); } public void setState(int state) { mHintView.setVisibility(View.INVISIBLE); mProgressBar.setVisibility(View.INVISIBLE); mHintView.setVisibility(View.INVISIBLE); if (state == STATE_READY) { mHintView.setVisibility(View.VISIBLE); mHintView.setText(R.string.xlistview_footer_hint_ready); } else if (state == STATE_LOADING) { mProgressBar.setVisibility(View.VISIBLE); } else { mHintView.setVisibility(View.VISIBLE); mHintView.setText(R.string.xlistview_footer_hint_normal); } } public void setBottomMargin(int height) { if (height < 0) return; LayoutParams lp = (LayoutParams) mContentView.getLayoutParams(); lp.bottomMargin = height; mContentView.setLayoutParams(lp); } public int getBottomMargin() { LayoutParams lp = (LayoutParams) mContentView.getLayoutParams(); return lp.bottomMargin; } /** * normal status */ public void normal() { mHintView.setVisibility(View.VISIBLE); mProgressBar.setVisibility(View.GONE); } /** * loading status */ public void loading() { mHintView.setVisibility(View.GONE); mProgressBar.setVisibility(View.VISIBLE); } /** * hide footer when disable pull load more */ public void hide() { LayoutParams lp = (LayoutParams) mContentView.getLayoutParams(); lp.height = 0; mContentView.setLayoutParams(lp); } /** * show footer */ public void show() { LayoutParams lp = (LayoutParams) mContentView.getLayoutParams(); lp.height = LayoutParams.WRAP_CONTENT; mContentView.setLayoutParams(lp); } private void initView(Context context) { mContext = context; LinearLayout moreView = (LinearLayout) LayoutInflater.from(mContext).inflate(R.layout.xlistview_footer, null); addView(moreView); moreView.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); mContentView = moreView.findViewById(R.id.xlistview_footer_content); mProgressBar = moreView.findViewById(R.id.xlistview_footer_progressbar); mHintView = (TextView) moreView.findViewById(R.id.xlistview_footer_hint_textview); } }
[ "chaisong.cn@gmail.com" ]
chaisong.cn@gmail.com
68a7e1dec760df2f623c4a8509a9fe35e5fbb65b
139960e2d7d55e71c15e6a63acb6609e142a2ace
/mobile_app1/module1105/src/main/java/module1105packageJava0/Foo159.java
5df6319bbf5ed05649642ac5a13e985b8866b9a6
[ "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
416
java
package module1105packageJava0; import java.lang.Integer; public class Foo159 { Integer int0; public void foo0() { new module1105packageJava0.Foo158().foo6(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } public void foo5() { foo4(); } public void foo6() { foo5(); } }
[ "oliviern@uber.com" ]
oliviern@uber.com
8382da8f03743fcc1783cbe676ea25369d8810e5
4b954dbad1d42681157eee475d6cd1fa57628e1d
/module4/bai_7_spring_data_jpa/bai_tap/blog_manager/src/main/java/com/blog/controller/BlogController.java
6a358f2d8b8cc95c7f1ae6a95e30ea73077c3021
[]
no_license
hongson2410/C1020G1-PhamHongSon
c5466a068154f7cfcfb6a2c0c2f47bd90ff9f7ab
ae10660a5de6d9c3018a64f238dd34897f6ad2c2
refs/heads/main
2023-04-11T10:55:26.730907
2021-04-18T10:20:00
2021-04-18T10:20:00
307,275,086
0
0
null
null
null
null
UTF-8
Java
false
false
3,201
java
package com.blog.controller; import com.blog.model.Blog; import com.blog.model.Category; import com.blog.service.impl.BlogServiceImpl; import com.blog.service.impl.CategoryServiceImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Pageable; import org.springframework.data.web.PageableDefault; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.mvc.support.RedirectAttributes; import java.util.Date; @Controller public class BlogController { @Autowired BlogServiceImpl blogService; @Autowired CategoryServiceImpl categoryService; @ModelAttribute("categories") public Iterable<Category> categories(Pageable pageable) { return categoryService.findAllCategory(pageable); } @GetMapping("/") public String showHome(@PageableDefault(size = 5) Pageable pageable, Model model) { model.addAttribute("blogList", blogService.findAll(pageable)); return "home"; } @GetMapping("search_name") public String searchByName(@PageableDefault(size = 5) Pageable pageable, Model model, @RequestParam(name = "nameBlog") String blogName) { model.addAttribute("blogList", blogService.findByBlogNameContaining(pageable, blogName)); return "search"; } @GetMapping("search_category") public String searchByCategory(@PageableDefault(size = 5) Pageable pageable, Model model, @RequestParam(name = "id") Integer id) { model.addAttribute("blogList", blogService.findByCategory(pageable, id)); return "search"; } @GetMapping("create") public String showFormCreate(Model model) { model.addAttribute("blog", new Blog()); return "create"; } @PostMapping("create") public String createBlog(@ModelAttribute Blog blog, RedirectAttributes redirectAttributes) { blog.setDateUpdate(new Date()); blogService.save(blog); redirectAttributes.addFlashAttribute("message", "New blog created successfully"); return "redirect:/"; } @GetMapping("edit/{id}") public String showFormEdit(@PathVariable Integer id, Model model) { model.addAttribute("blog", blogService.findById(id)); return "edit"; } @PostMapping("edit") public String editBlog(@ModelAttribute Blog blog, RedirectAttributes redirectAttributes) { blog.setDateUpdate(new Date()); blogService.save(blog); redirectAttributes.addFlashAttribute("message", "This blog edit successfully"); return "redirect:/"; } @PostMapping("delete") public String deleteBlog(@ModelAttribute(name = "id") Integer id, RedirectAttributes redirectAttributes) { blogService.deleteById(id); redirectAttributes.addFlashAttribute("message", "This blog delete successfully"); return "redirect:/"; } @GetMapping("view/{id}") public String showBlog(@PathVariable Integer id, Model model) { model.addAttribute("blog", blogService.findById(id)); return "view"; } }
[ "phamhongson2410@gmail.com" ]
phamhongson2410@gmail.com
831cb70b0614250f83fcb6e96cc6bc93f22a379b
cf0f34937b476ecde5ebcca7e2119bcbb27cfbf2
/src/com/huateng/struts/query/action/T50905Action.java
6cb24bc8550bc69e29a67b4ac480e4516ef043da
[]
no_license
Deron84/xxxTest
b5f38cc2dfe3fe28b01634b58b1236b7ec5b4854
302b807f394e31ac7350c5c006cb8dc334fc967f
refs/heads/master
2022-02-01T03:32:54.689996
2019-07-23T11:04:09
2019-07-23T11:04:09
198,212,201
0
0
null
null
null
null
UTF-8
Java
false
false
3,995
java
package com.huateng.struts.query.action; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import java.util.List; import com.huateng.common.StringUtil; import com.huateng.struts.query.BaseExcelQueryAction; import com.huateng.struts.query.ExcelName; import com.huateng.struts.query.QueryExcelUtil; import com.huateng.system.util.InformationUtil; /** * project JSBConsole date 2013-4-22 * * @author 高浩 */ public class T50905Action extends BaseExcelQueryAction { @Override protected void deal() { year = mon.substring(0, 4); String yearStart = year +"0101"; String monStart = mon + "01"; int m = Integer.valueOf(mon.substring(4, 6)); int y = Integer.valueOf(year); String monEnd = getMonEnd(m,y,mon); c = sheet.getRow(1).getCell(1); if(c == null){ sheet.getRow(1).createCell(1); } if(sheet.getRow(1).getCell(4) == null){ sheet.getRow(1).createCell(4); } String wheresql = " where CONN_TYPE = 'J' and DATE_SETTLMT_8 >= '"+ monStart +"' and DATE_SETTLMT_8 <= '"+ monEnd +"' "; if(!StringUtil.isNull(mon)){ c.setCellValue(mon); } String sql = "select (case MCHT_FLAG1 when '0' then '收款商户' " + "when '1' then '老板通商户' " + "when '2' then '分期商户' " + "when '3' then '财务转账商户' " + "when '4' then '项目形式商户' " + "when '5' then '积分业务' " + "when '6' then '其他业务' " + "when '7' then '固话POS商户' end) mchtTp," + "thNum,allNum,round(thNum*100/allNum,2) per " + "from (select MCHT_FLAG1," + "sum(case when STLM_FLAG in('0','7','A','D','9','8') then 0 else 1 end) thNum," + "count(1) allNum " + "from (select * from BTH_GC_TXN_SUCC " + "union all " + "select * from BTH_GC_TXN_SUCC_HIS) a " + "left outer join TBL_MCHT_BASE_INF b on(a.CARD_ACCP_ID=b.MCHT_NO) "; sql += wheresql; sql += " group by MCHT_FLAG1 order by MCHT_FLAG1)"; int rowNum =3, cellNum = 0,columnNum = 4; fillData(sql, rowNum, cellNum, columnNum); } // /*对账平结果标志*/ // #define STLM_FLG_OK "0" /*-- 对账结果平*/ // #define STLM_FLG_SUSPICIOUS_OK "A" /*-- CUPS可疑交易对平;*/ // // /*对账不平结果标志 */ // #define STLM_CUP_FLG_POSP "1" /*-- POSP有,CUPS没有*/ // #define STLM_CUP_FLG_CUPS "2" /*-- POSP无,CUPS有*/ // #define STLM_CUP_FLG_DISTRUST "3" /*-- POSP与CUPS金额不一致;*/ // #define STLM_HOST_FLG_POSP "4" /*-- POSP有,HOST没有;*/ // #define STLM_HOST_FLG_HOST "5" /*-- POSP无, HOST有;*/ // #define STLM_HOST_FLG_DISTRUST "6" /*-- POSP与HOST金额不一致;*/ // #define STLM_UPD_FLG_POSP "R" /*-- POSP有,UPD没有;*/ // #define STLM_UPD_FLG_UPD "S" /*-- POSP无,UPD有;*/ // #define STLM_UPD_FLG_DISTRUST "T" /*-- POSP与UPD金额不一致;*/ // #define STLM_CUP_FLG_SUSPICIOUS "7" /*-- CUPS可疑交易;*/ // #define STLM_OFF_FLG_AMT 'Z' /*脱机交易中标志两者金额不同*/ // #define STLM_OFF_FLG_HEART 'W' /*脱机交易中标志是本地端有的*/ // #define STLM_OFF_FLG_CUPS 'X' /*脱机交易中标志是银联端有的*/ // #define STLM_FLG_NOCHK "8" /*-- 导入未核对交易;*/ // #define STLM_FLG_RVSL "9" /* 银联冲正及原交易交易标志;*/ // #define STLM_FLG_DEL "D" /* 清理数据标志 */ private String year; private String mon; private String brhId; public String getMon() { return mon; } public void setMon(String mon) { this.mon = mon; } public String getBrhId() { return brhId; } public void setBrhId(String brhId) { this.brhId = brhId; } @Override protected String getFileKey() { return ExcelName.EN_55; } @Override public String getMsg() { return msg; } @Override public boolean isSuccess() { return success; } }
[ "weijx@inspur.com" ]
weijx@inspur.com
6abaff0a880bc9322c4281d3e10b3cdb6885d57f
f2d85e3f5d6dcac0a7b18cbfef6d6b7c62ab570a
/rdma-based-storm/examples/storm-redis-examples/src/main/java/org/apache/storm/redis/trident/WordCountStoreMapper.java
58df150c4b146c7e2ca96fc5ab910e16d0e5e72b
[ "Apache-2.0", "MIT", "BSD-3-Clause", "BSD-2-Clause", "GPL-1.0-or-later" ]
permissive
dke-knu/i2am
82bb3cf07845819960f1537a18155541a1eb79eb
0548696b08ef0104b0c4e6dec79c25300639df04
refs/heads/master
2023-07-20T01:30:07.029252
2023-07-07T02:00:59
2023-07-07T02:00:59
71,136,202
8
14
Apache-2.0
2023-07-07T02:00:31
2016-10-17T12:29:48
Java
UTF-8
Java
false
false
1,498
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.storm.redis.trident; import org.apache.storm.tuple.ITuple; import org.apache.storm.redis.common.mapper.RedisDataTypeDescription; import org.apache.storm.redis.common.mapper.RedisStoreMapper; public class WordCountStoreMapper implements RedisStoreMapper { @Override public RedisDataTypeDescription getDataTypeDescription() { return new RedisDataTypeDescription(RedisDataTypeDescription.RedisDataType.HASH, "test"); } @Override public String getKeyFromTuple(ITuple tuple) { return "test_" + tuple.getString(0); } @Override public String getValueFromTuple(ITuple tuple) { return tuple.getInteger(1).toString(); } }
[ "wnghd9999@naver.com" ]
wnghd9999@naver.com
2ddc904dd70e046ab5c8c82f9221bc020e71b1bd
138e198af877de7ae0adccc5207d70c282952ee1
/SearchHandlerThread/app/src/main/java/com/example/asus1/searchhandlerthread/DownLoadThread.java
006cd9e1172158bb4bab39433d1adb8b6ead5af2
[]
no_license
brice-liu/PracticeEveryDay
f8967f5881f2ae1a589910911544d84e78b2e255
9cab30c08da76585c4fc2c54feb035bd90f4dd91
refs/heads/master
2021-10-14T09:44:00.483488
2019-02-04T08:07:04
2019-02-04T08:07:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,412
java
package com.example.asus1.searchhandlerthread; import android.os.Bundle; import android.os.Handler; import android.os.HandlerThread; import android.os.Message; import android.os.SystemClock; import android.text.format.DateUtils; import java.util.Arrays; import java.util.List; public class DownLoadThread extends HandlerThread implements Handler.Callback { private final String TAG = this.getClass().getSimpleName(); private final String KEY_URL = "url"; public static final int TYPE_START = 1; public static final int TYPE_FINISHED = 2; private Handler mWorkHandler; private Handler mUIHandler; private List<String> mDownLoadUrlList; public DownLoadThread(String name) { super(name); } @Override protected void onLooperPrepared() { super.onLooperPrepared(); mWorkHandler = new Handler(getLooper(),this); if (mUIHandler == null) { throw new IllegalArgumentException("Not set UIHandler!"); } for(String url:mDownLoadUrlList){ Message message = mWorkHandler.obtainMessage(); Bundle bundle = new Bundle(); bundle.putString(KEY_URL,url); message.setData(bundle); mWorkHandler.sendMessage(message); } } public void setDownloadUrls(String... urls) { mDownLoadUrlList = Arrays.asList(urls); } public Handler getUIHandler() { return mUIHandler; } //注入主线程 Handler public DownLoadThread setUIHandler(final Handler UIHandler) { mUIHandler = UIHandler; return this; } @Override public boolean handleMessage(Message msg) { if(msg == null || msg.getData() == null){ return false; } String url = (String)msg.getData().get(KEY_URL); //开始下载 Message startMessage = mUIHandler.obtainMessage(TYPE_START, "\n 开始下载 @"+System.currentTimeMillis()+"\n"+url); mUIHandler.sendMessage(startMessage); SystemClock.sleep(2000); Message finishMessage = mUIHandler.obtainMessage(TYPE_FINISHED, "\n 下载完成 @"+System.currentTimeMillis()+"\n"+url); mUIHandler.sendMessage(finishMessage); return true; } @Override public boolean quitSafely() { mUIHandler = null; return super.quitSafely(); } }
[ "273104241@qq.com" ]
273104241@qq.com
aa9315f43c704d8ff70b47639f1cb376467a31d8
df134b422960de6fb179f36ca97ab574b0f1d69f
/net/minecraft/server/v1_16_R2/LootEntryAlternatives.java
2114862c03e1e3fef27aab6f32bcc0f722241cd3
[]
no_license
TheShermanTanker/NMS-1.16.3
bbbdb9417009be4987872717e761fb064468bbb2
d3e64b4493d3e45970ec5ec66e1b9714a71856cc
refs/heads/master
2022-12-29T15:32:24.411347
2020-10-08T11:56:16
2020-10-08T11:56:16
302,324,687
0
1
null
null
null
null
UTF-8
Java
false
false
2,732
java
/* */ package net.minecraft.server.v1_16_R2; /* */ /* */ import com.google.common.collect.Lists; /* */ import java.util.List; /* */ import java.util.function.Consumer; /* */ import org.bukkit.craftbukkit.libs.org.apache.commons.lang3.ArrayUtils; /* */ /* */ public class LootEntryAlternatives /* */ extends LootEntryChildrenAbstract /* */ { /* */ LootEntryAlternatives(LootEntryAbstract[] var0, LootItemCondition[] var1) { /* 12 */ super(var0, var1); /* */ } /* */ /* */ /* */ public LootEntryType a() { /* 17 */ return LootEntries.f; /* */ } /* */ /* */ /* */ protected LootEntryChildren a(LootEntryChildren[] var0) { /* 22 */ switch (var0.length) { /* */ case 0: /* 24 */ return a; /* */ case 1: /* 26 */ return var0[0]; /* */ case 2: /* 28 */ return var0[0].b(var0[1]); /* */ } /* 30 */ return (var1, var2) -> { /* */ for (LootEntryChildren var6 : var0) { /* */ if (var6.expand(var1, var2)) { /* */ return true; /* */ } /* */ } /* */ return false; /* */ }; /* */ } /* */ /* */ /* */ /* */ public void a(LootCollector var0) { /* 43 */ super.a(var0); /* */ /* 45 */ for (int var1 = 0; var1 < this.c.length - 1; var1++) { /* 46 */ if (ArrayUtils.isEmpty((Object[])(this.c[var1]).d)) /* 47 */ var0.a("Unreachable entry!"); /* */ } /* */ } /* */ /* */ public static class a /* */ extends LootEntryAbstract.a<a> { /* 53 */ private final List<LootEntryAbstract> a = Lists.newArrayList(); /* */ /* */ public a(LootEntryAbstract.a<?>... var0) { /* 56 */ for (LootEntryAbstract.a<?> var4 : var0) { /* 57 */ this.a.add(var4.b()); /* */ } /* */ } /* */ /* */ /* */ protected a d() { /* 63 */ return this; /* */ } /* */ /* */ /* */ public a a(LootEntryAbstract.a<?> var0) { /* 68 */ this.a.add(var0.b()); /* 69 */ return this; /* */ } /* */ /* */ /* */ public LootEntryAbstract b() { /* 74 */ return new LootEntryAlternatives(this.a.<LootEntryAbstract>toArray(new LootEntryAbstract[0]), f()); /* */ } /* */ } /* */ /* */ public static a a(LootEntryAbstract.a<?>... var0) { /* 79 */ return new a(var0); /* */ } /* */ } /* Location: C:\Users\Josep\Downloads\Decompile Minecraft\tuinity-1.16.3.jar!\net\minecraft\server\v1_16_R2\LootEntryAlternatives.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "tanksherman27@gmail.com" ]
tanksherman27@gmail.com
549eb4d9aa557cf1216836d76607e1df7a4a7d3b
602f6f274fe6d1d0827a324ada0438bc0210bc39
/spring-framework/src/main/java/org/springframework/web/portlet/handler/PortletModeParameterHandlerMapping.java
476e04b1fea6a2ff3fde0e0271d3df749f5e57f0
[ "Apache-2.0" ]
permissive
1091643978/spring
c5db27b126261adf256415a0c56c4e7fbea3546e
c832371e96dffe8af4e3dafe9455a409bfefbb1b
refs/heads/master
2020-08-27T04:26:22.672721
2019-10-31T05:31:59
2019-10-31T05:31:59
217,243,879
0
0
Apache-2.0
2019-10-24T07:58:34
2019-10-24T07:58:31
null
UTF-8
Java
false
false
8,182
java
/* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.web.portlet.handler; import java.util.HashSet; import java.util.Map; import java.util.Set; import javax.portlet.PortletMode; import javax.portlet.PortletRequest; import org.springframework.beans.BeansException; import org.springframework.util.Assert; /** * Implementation of the {@link org.springframework.web.portlet.HandlerMapping} * interface to map from the current PortletMode and a request parameter to * request handler beans. The mapping consists of two levels: first the * PortletMode and then the parameter value. In order to be mapped, * both elements must match the mapping definition. * * <p>This is a combination of the methods used in {@link PortletModeHandlerMapping PortletModeHandlerMapping} * and {@link ParameterHandlerMapping ParameterHandlerMapping}. Unlike * those two classes, this mapping cannot be initialized with properties since it * requires a two-level map. * * <p>The default name of the parameter is "action", but can be changed using * {@link #setParameterName setParameterName()}. * * <p>By default, the same parameter value may not be used in two different portlet * modes. This is so that if the portal itself changes the portlet mode, the request * will no longer be valid in the mapping. This behavior can be changed with * {@link #setAllowDuplicateParameters setAllowDupParameters()}. * * <p>The bean configuration for this mapping will look somthing like this: * * <pre class="code"> * &lt;bean id="portletModeParameterHandlerMapping" class="org.springframework.web.portlet.handler.PortletModeParameterHandlerMapping"&gt; * &lt;property name="portletModeParameterMap"&gt; * &lt;map&gt; * &lt;entry key="view"&gt; &lt;!-- portlet mode: view --&gt; * &lt;map&gt; * &lt;entry key="add"&gt;&lt;ref bean="addItemHandler"/&gt;&lt;/entry&gt; * &lt;entry key="edit"&gt;&lt;ref bean="editItemHandler"/&gt;&lt;/entry&gt; * &lt;entry key="delete"&gt;&lt;ref bean="deleteItemHandler"/&gt;&lt;/entry&gt; * &lt;/map&gt; * &lt;/entry&gt; * &lt;entry key="edit"&gt; &lt;!-- portlet mode: edit --&gt; * &lt;map&gt; * &lt;entry key="prefs"&gt;&lt;ref bean="preferencesHandler"/&gt;&lt;/entry&gt; * &lt;entry key="resetPrefs"&gt;&lt;ref bean="resetPreferencesHandler"/&gt;&lt;/entry&gt; * &lt;/map&gt; * &lt;/entry&gt; * &lt;/map&gt; * &lt;/property&gt; * &lt;/bean&gt;</pre> * * <p>This mapping can be chained ahead of a {@link PortletModeHandlerMapping PortletModeHandlerMapping}, * which can then provide defaults for each mode and an overall default as well. * * <p>Thanks to Rainer Schmitz and Yujin Kim for suggesting this mapping strategy! * * @author John A. Lewis * @author Juergen Hoeller * @since 2.0 * @see ParameterMappingInterceptor */ public class PortletModeParameterHandlerMapping extends AbstractMapBasedHandlerMapping<PortletModeParameterLookupKey> { /** * Default request parameter name to use for mapping to handlers: "action". */ public final static String DEFAULT_PARAMETER_NAME = "action"; private String parameterName = DEFAULT_PARAMETER_NAME; private Map<String, Map<String, ?>> portletModeParameterMap; private boolean allowDuplicateParameters = false; private final Set<String> parametersUsed = new HashSet<String>(); /** * Set the name of the parameter used for mapping to handlers. * <p>Default is "action". */ public void setParameterName(String parameterName) { Assert.hasText(parameterName, "'parameterName' must not be empty"); this.parameterName = parameterName; } /** * Set a Map with portlet mode names as keys and another Map as values. * The sub-map has parameter names as keys and handler bean or bean names as values. * <p>Convenient for population with bean references. * @param portletModeParameterMap two-level map of portlet modes and parameters to handler beans */ public void setPortletModeParameterMap(Map<String, Map<String, ?>> portletModeParameterMap) { this.portletModeParameterMap = portletModeParameterMap; } /** * Set whether to allow duplicate parameter values across different portlet modes. * Default is "false". * <p>Doing this is dangerous because the portlet mode can be changed by the * portal itself and the only way to see that is a rerender of the portlet. * If the same parameter value is legal in multiple modes, then a change in * mode could result in a matched mapping that is not intended and the user * could end up in a strange place in the application. */ public void setAllowDuplicateParameters(boolean allowDuplicateParameters) { this.allowDuplicateParameters = allowDuplicateParameters; } /** * Calls the {@code registerHandlers} method in addition * to the superclass's initialization. * @see #registerHandlers */ @Override public void initApplicationContext() throws BeansException { super.initApplicationContext(); registerHandlersByModeAndParameter(this.portletModeParameterMap); } /** * Register all handlers specified in the Portlet mode map for the corresponding modes. * @param portletModeParameterMap Map with mode names as keys and parameter Maps as values */ protected void registerHandlersByModeAndParameter(Map<String, Map<String, ?>> portletModeParameterMap) { Assert.notNull(portletModeParameterMap, "'portletModeParameterMap' must not be null"); for (Map.Entry<String, Map<String, ?>> entry : portletModeParameterMap.entrySet()) { PortletMode mode = new PortletMode(entry.getKey()); registerHandler(mode, entry.getValue()); } } /** * Register all handlers specified in the given parameter map. * @param parameterMap Map with parameter names as keys and handler beans or bean names as values */ protected void registerHandler(PortletMode mode, Map<String, ?> parameterMap) { for (Map.Entry<String, ?> entry : parameterMap.entrySet()) { registerHandler(mode, entry.getKey(), entry.getValue()); } } /** * Register the given handler instance for the given PortletMode and parameter value, * under an appropriate lookup key. * @param mode the PortletMode for which this mapping is valid * @param parameter the parameter value to which this handler is mapped * @param handler the handler instance bean * @throws BeansException if the handler couldn't be registered * @throws IllegalStateException if there is a conflicting handler registered * @see #registerHandler(Object, Object) */ protected void registerHandler(PortletMode mode, String parameter, Object handler) throws BeansException, IllegalStateException { // Check for duplicate parameter values across all portlet modes. if (!this.allowDuplicateParameters && this.parametersUsed.contains(parameter)) { throw new IllegalStateException( "Duplicate entries for parameter [" + parameter + "] in different Portlet modes"); } this.parametersUsed.add(parameter); registerHandler(new PortletModeParameterLookupKey(mode, parameter), handler); } /** * Returns a lookup key that combines the current PortletMode and the current * value of the specified parameter. * @see PortletRequest#getPortletMode() * @see #setParameterName */ @Override protected PortletModeParameterLookupKey getLookupKey(PortletRequest request) throws Exception { PortletMode mode = request.getPortletMode(); String parameter = request.getParameter(this.parameterName); return new PortletModeParameterLookupKey(mode, parameter); } }
[ "784990655@qq.com" ]
784990655@qq.com
4dcf122cbd01a69b4c9ec1569d8b92ee2271d912
ba2eef5e3c914673103afb944dd125a9e846b2f6
/AL-Game/data/scripts/system/handlers/quest/rider_quests/_24013PoisonIntheWaters.java
49085adce6eae3751508b0274b2b8eed6ce61055
[]
no_license
makifgokce/Aion-Server-4.6
519d1d113f483b3e6532d86659932a266d4da2f8
0a6716a7aac1f8fe88780aeed68a676b9524ff15
refs/heads/master
2022-10-07T11:32:43.716259
2020-06-10T20:14:47
2020-06-10T20:14:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,467
java
/** * This file is part of Aion-Lightning <aion-lightning.org>. * * Aion-Lightning is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Aion-Lightning is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Aion-Lightning. * If not, see <http://www.gnu.org/licenses/>. */ package quest.rider_quests; import com.aionemu.gameserver.model.DialogAction; import com.aionemu.gameserver.model.gameobjects.Item; import com.aionemu.gameserver.model.gameobjects.player.Player; import com.aionemu.gameserver.questEngine.handlers.HandlerResult; import com.aionemu.gameserver.questEngine.handlers.QuestHandler; import com.aionemu.gameserver.questEngine.model.QuestEnv; import com.aionemu.gameserver.questEngine.model.QuestState; import com.aionemu.gameserver.questEngine.model.QuestStatus; import com.aionemu.gameserver.world.zone.ZoneName; /** * @author pralinka */ public class _24013PoisonIntheWaters extends QuestHandler { private final static int questId = 24013; private final static int[] mobs = { 210455, 210456, 214039, 210458, 214032 }; public _24013PoisonIntheWaters() { super(questId); } @Override public void register() { qe.registerOnEnterZoneMissionEnd(questId); qe.registerOnLevelUp(questId); qe.registerQuestNpc(203631).addOnTalkEvent(questId); qe.registerQuestNpc(203621).addOnTalkEvent(questId); for (int mob : mobs) { qe.registerQuestNpc(mob).addOnKillEvent(questId); } qe.registerQuestItem(182215359, questId); } @Override public boolean onDialogEvent(QuestEnv env) { final Player player = env.getPlayer(); final QuestState qs = player.getQuestStateList().getQuestState(questId); if (qs == null) { return false; } final int var = qs.getQuestVarById(0); int targetId = env.getTargetId(); if (qs.getStatus() == QuestStatus.START) { switch (targetId) { case 203631: { // Nokir switch (env.getDialog()) { case QUEST_SELECT: { if (var == 0) { return sendQuestDialog(env, 1011); } } case SELECT_ACTION_1012: { playQuestMovie(env, 63); return sendQuestDialog(env, 1012); } case SETPRO1: { return defaultCloseDialog(env, 0, 1); // 1 } default: break; } break; } case 203621: { // Shania switch (env.getDialog()) { case QUEST_SELECT: { if (var == 1) { return sendQuestDialog(env, 1352); } } case SETPRO2: { giveQuestItem(env, 182215359, 1); return defaultCloseDialog(env, 1, 2); // 2 } default: break; } break; } } } else if (qs.getStatus() == QuestStatus.REWARD) { if (targetId == 203631) { // Nokir if (env.getDialog() == DialogAction.QUEST_SELECT) { return sendQuestDialog(env, 2375); } else { return sendQuestEndDialog(env); } } } return false; } @Override public boolean onKillEvent(QuestEnv env) { Player player = env.getPlayer(); QuestState qs = player.getQuestStateList().getQuestState(questId); if (qs == null) { return false; } int var = qs.getQuestVarById(0); if (var >= 3 && var < 7) { qs.setQuestVarById(0, var + 1); updateQuestStatus(env); return true; } else if (var == 7) { qs.setStatus(QuestStatus.REWARD); updateQuestStatus(env); return true; } return false; } @Override public HandlerResult onItemUseEvent(QuestEnv env, Item item) { Player player = env.getPlayer(); if (player.isInsideZone(ZoneName.get("DF1A_ITEMUSEAREA_Q2016"))) { return HandlerResult.fromBoolean(useQuestItem(env, item, 2, 3, false)); // 3 } return HandlerResult.FAILED; } @Override public boolean onZoneMissionEndEvent(QuestEnv env) { return defaultOnZoneMissionEndEvent(env); } @Override public boolean onLvlUpEvent(QuestEnv env) { return defaultOnLvlUpEvent(env, 24010, true); } }
[ "Falke_34@080676fd-0f56-412f-822c-f8f0d7cea3b7" ]
Falke_34@080676fd-0f56-412f-822c-f8f0d7cea3b7