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
8062a1eb1455992830ff92ce4ca169a56dbb0eff
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MATH-85b-1-16-NSGA_II-WeightedSum:TestLen:CallDiversity/org/apache/commons/math/analysis/solvers/UnivariateRealSolverUtils_ESTest_scaffolding.java
54a85b31f62ab2bec2c9228fa622f60b91c7b2bf
[]
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
470
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Thu Apr 02 05:09:50 UTC 2020 */ package org.apache.commons.math.analysis.solvers; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class UnivariateRealSolverUtils_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
1fe0fd529e6a5ea830f06d2e8417f4f660be704b
c69042a34129e8a8a1be6544083995baca7dc5a2
/config-file/src/test/java/io/confound/config/file/ResourcesConfigurationManagerTest.java
e4e35d71e6ec434d846fd6cff1ded156d3720371
[]
no_license
globalmentor/confound
f8bcf103c9a7d2bfb7315c9cd3753cf484b7ae67
281454e10e02b2931c621105652d5e7f6c6ee1d4
refs/heads/main
2022-11-10T01:19:32.374397
2022-10-30T22:07:28
2022-10-30T22:09:56
184,290,407
0
0
null
null
null
null
UTF-8
Java
false
false
2,297
java
/* * Copyright © 2018 GlobalMentor, Inc. <https://www.globalmentor.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 * * 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 io.confound.config.file; import java.io.*; import org.junit.jupiter.api.*; import static com.globalmentor.io.Filenames.*; import static org.hamcrest.MatcherAssert.*; import static org.hamcrest.Matchers.*; import io.confound.config.Configuration; /** * Tests of {@link ResourcesConfigurationManager}. * @author Garret Wilson */ public class ResourcesConfigurationManagerTest { /** The base name of the test configuration file in the Java test resources. */ public static final String CONFIG_RESOURCE_BASE_NAME = "configuration"; /** The name of the test configuration file in the Java test resources. */ public static final String CONFIG_RESOURCE_NAME = addExtension(CONFIG_RESOURCE_BASE_NAME, TestConfigurationFileFormat.FILENAME_EXTENSION); /** @throws IOException if there was an error preparing or loading the configuration. */ @Test public void testConfigResourceName() throws IOException { final Configuration configuration = new ResourcesConfigurationManager.Builder().fileFormat(new TestConfigurationFileFormat()).contextClass(getClass()) .resourceName(CONFIG_RESOURCE_NAME).buildConfiguration(); assertThat(configuration.getString("test"), is("resources")); } /** @throws IOException if there was an error preparing or loading the configuration. */ @Test public void testConfigResourceBaseName() throws IOException { final Configuration configuration = new ResourcesConfigurationManager.Builder().fileFormat(new TestConfigurationFileFormat()).contextClass(getClass()) .resourceBaseName(CONFIG_RESOURCE_BASE_NAME).buildConfiguration(); assertThat(configuration.getString("test"), is("resources")); } }
[ "garret@globalmentor.com" ]
garret@globalmentor.com
02d820cd68221f44fc3c847edc21a8e6a51bee80
b1c7d854d6a2257330b0ea137c5b4e24b2e5078d
/com/google/android/gms/internal/zzfw.java
e684fd4b7acd0b74b1ac0d80680e7c15935303fc
[]
no_license
nayebare/mshiriki_android_app
45fd0061332f5253584b351b31b8ede2f9b56387
7b6b729b5cbc47f109acd503b57574d48511ee70
refs/heads/master
2020-06-21T20:01:59.725854
2017-06-12T13:55:51
2017-06-12T13:55:51
94,205,275
1
1
null
2017-06-13T11:22:51
2017-06-13T11:22:51
null
UTF-8
Java
false
false
1,873
java
package com.google.android.gms.internal; import android.content.Context; import android.content.SharedPreferences; import android.os.ConditionVariable; import android.support.annotation.Nullable; import com.google.android.gms.ads.internal.zzv; import com.google.android.gms.common.zze; @zzmb public class zzfw { private final ConditionVariable zzAM; @Nullable private SharedPreferences zzAN; private final Object zzrN; private volatile boolean zztW; public zzfw() { this.zzrN = new Object(); this.zzAM = new ConditionVariable(); this.zztW = false; this.zzAN = null; } public void initialize(Context context) { if (!this.zztW) { synchronized (this.zzrN) { if (this.zztW) { return; } try { Context remoteContext = zze.getRemoteContext(context); if (remoteContext == null) { return; } this.zzAN = zzv.zzcT().zzm(remoteContext); this.zztW = true; this.zzAM.open(); } finally { this.zzAM.open(); } } } } public <T> T zzd(zzft<T> com_google_android_gms_internal_zzft_T) { if (this.zzAM.block(5000)) { if (!this.zztW) { synchronized (this.zzrN) { if (this.zztW) { } else { T zzfm = com_google_android_gms_internal_zzft_T.zzfm(); return zzfm; } } } return zzpv.zzb(new 1(this, com_google_android_gms_internal_zzft_T)); } throw new IllegalStateException("Flags.initialize() was not called!"); } }
[ "cwanziguya@gmail.com" ]
cwanziguya@gmail.com
88e968547734dd47d9136980cde45b8b43896eb0
d19dc7e85ccddd789add06e741e8e0865fce9a76
/lianxiti/src/threadpool/lambda/Student.java
457ed26d43e4c96ce1f45e3163a823dbc50514b9
[]
no_license
sjtuwyf/java-basic-code
6cd7b812cf1e221077c551368b3260ea6d2c9ae2
51047c659f66099937e095597c7e71cf726f1ff0
refs/heads/main
2023-03-31T13:32:59.573720
2021-04-04T04:07:41
2021-04-04T04:07:41
342,221,770
0
0
null
null
null
null
UTF-8
Java
false
false
678
java
package threadpool.lambda; public class Student { private String name; private int score; @Override public String toString() { return "Student{" + "name='" + name + '\'' + ", score=" + score + '}'; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getScore() { return score; } public void setScore(int score) { this.score = score; } public Student() { } public Student(String name, int score) { this.name = name; this.score = score; } }
[ "sjtuwyf@126.com" ]
sjtuwyf@126.com
4ae49abf655fc94bb5941a73fd4e8872003a2bfc
0f1f7332b8b06d3c9f61870eb2caed00aa529aaa
/ebean/tags/v2.2.0/core/src/test/java/com/avaje/tests/idkeys/TestPropertyChangeSupport.java
bfc973da535ee4e84a27d0094c73b3e47a598775
[]
no_license
rbygrave/sourceforge-ebean
7e52e3ef439ed64eaf5ce48e0311e2625f7ee5ed
694274581a188be664614135baa3e4697d52d6fb
refs/heads/master
2020-06-19T10:29:37.011676
2019-12-17T22:09:29
2019-12-17T22:09:29
196,677,514
1
0
null
2019-12-17T22:07:13
2019-07-13T04:21:16
Java
UTF-8
Java
false
false
5,648
java
package com.avaje.tests.idkeys; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import com.avaje.ebean.Transaction; import com.avaje.ebean.bean.EntityBean; import com.avaje.tests.idkeys.db.AuditLog; import com.avaje.tests.lib.EbeanTestCase; /** * Test various aspects of the PropertyChangeSupport */ public class TestPropertyChangeSupport extends EbeanTestCase implements PropertyChangeListener { private int nuofEvents = 0; private List<PropertyChangeEvent> pces = new ArrayList<PropertyChangeEvent>(); private PropertyChangeEvent lastPce; public void propertyChange(PropertyChangeEvent evt) { nuofEvents++; lastPce = evt; pces.add(evt); } /** * Test the core property change functionality */ public void testPropertyChange() throws SQLException { resetEvent(); AuditLog al = new AuditLog(); assertTrue("is EntityBean check", al instanceof EntityBean); addListener(al, this); // test if we get property notification about simple property changes al.setDescription("ABC"); assertNotNull(lastPce); assertEquals(1, nuofEvents); assertEquals("description", lastPce.getPropertyName()); assertNull(lastPce.getOldValue()); assertEquals("ABC", lastPce.getNewValue()); al.setDescription("DEF"); assertNotNull(lastPce); assertEquals(2, nuofEvents); assertEquals("description", lastPce.getPropertyName()); assertEquals("ABC", lastPce.getOldValue()); assertEquals("DEF", lastPce.getNewValue()); resetEvent(); // test if we get change notification if EBean assigns an id to the bean getServer().save(al); assertNotNull(lastPce); assertEquals("id", lastPce.getPropertyName()); assertNull(lastPce.getOldValue()); assertNotNull(lastPce.getNewValue()); String prevLogDesc = al.getDescription(); resetEvent(); // simulate external change and test if we get change notification when we refresh the entity Transaction tx = getServer().beginTransaction(); PreparedStatement pstm = tx.getConnection().prepareStatement("update audit_log set description = ? where id = ?"); pstm.setString(1, "GHI"); pstm.setLong(2, al.getId()); int updated = pstm.executeUpdate(); pstm.close(); assertEquals(1, updated); tx.commit(); assertNull(lastPce); assertEquals(0, nuofEvents); getServer().refresh(al); assertEquals("GHI", al.getDescription()); assertNotNull(lastPce); assertEquals(1, nuofEvents); assertEquals("description", lastPce.getPropertyName()); assertEquals(prevLogDesc, lastPce.getOldValue()); assertNotNull("GHI", lastPce.getNewValue()); // check if we fire with the real new value which might be a modified version of what we passed to the set method resetEvent(); al.setModifiedDescription("MODIFIED_VALUE"); assertNotNull(lastPce); assertEquals(1, nuofEvents); assertEquals("modifiedDescription", lastPce.getPropertyName()); assertEquals(null, lastPce.getOldValue()); assertNotNull("_MODIFIED_VALUE_", lastPce.getNewValue()); } /** * check if * <ul> * <li>updating a lazy loaded property fires two events</li> * </ul> */ public void testPartialLoad() throws SQLException { AuditLog log = new AuditLog(); log.setDescription("log"); getServer().save(log); assertNotNull(log.getId()); resetEvent(); List<AuditLog> logs = getServer().find(AuditLog.class) .where().eq("id", log.getId()) .select("id") .findList(); assertNotNull(logs); assertEquals(1, logs.size()); AuditLog logLazy = logs.get(0); addListener(logLazy, this); // this will lazy load and update the property logLazy.setDescription("updated log"); // which should result in one PCE events assertEquals(1, pces.size()); // test for the acutal update of the value PropertyChangeEvent propertyChangeEvent = pces.get(0); assertEquals("description", propertyChangeEvent.getPropertyName()); assertEquals("log", propertyChangeEvent.getOldValue()); assertEquals("updated log", propertyChangeEvent.getNewValue()); } private void resetEvent() { lastPce = null; nuofEvents = 0; pces.clear(); } private static void addListener(AuditLog al, PropertyChangeListener listener) { try { Method apcs = al.getClass().getMethod("addPropertyChangeListener", PropertyChangeListener.class); apcs.invoke(al, listener); } catch (NoSuchMethodException e) { throw new RuntimeException(e); } catch (IllegalAccessException e) { throw new RuntimeException(e); } catch (InvocationTargetException e) { throw new RuntimeException(e); } } }
[ "208973+rbygrave@users.noreply.github.com" ]
208973+rbygrave@users.noreply.github.com
92628cc06816d1117e38b60275b728ef478cfbcc
e96172bcad99d9fddaa00c25d00a319716c9ca3a
/plugin/src/test/resources/codeInsight/daemonCodeAnalyzer/genericsHighlighting/WideningCastToTypeParam.java
7615d72908e3759b8c1455cf68011509c03cf932
[ "Apache-2.0" ]
permissive
consulo/consulo-java
8c1633d485833651e2a9ecda43e27c3cbfa70a8a
a96757bc015eff692571285c0a10a140c8c721f8
refs/heads/master
2023-09-03T12:33:23.746878
2023-08-29T07:26:25
2023-08-29T07:26:25
13,799,330
5
4
Apache-2.0
2023-01-03T08:32:23
2013-10-23T09:56:39
Java
UTF-8
Java
false
false
1,510
java
import java.lang.Double; interface IConverter<C> { } abstract class AbstractNumberConverter<N extends Number> implements IConverter<N> { } class DoubleConverter extends AbstractNumberConverter<Double> { } public class Test { public static <C> IConverter<C> getConverter(Class<C> type) { return (IConverter<C>)new DoubleConverter() { }; } public static <C extends String> IConverter<C> getConverter1(Class<C> type) { return <error descr="Inconvertible types; cannot cast 'DoubleConverter' to 'IConverter<C>'">(IConverter<C>)new DoubleConverter() { }</error>; } public static <C extends Double> IConverter<C> getConverter2(Class<C> type) { return (IConverter<C>)new DoubleConverter() { }; } public static void main(String[] args) { IConverter<String> converter = getConverter(String.class); IConverter<String> converter1 = getConverter1(String.class); IConverter<String> converter2 = <error descr="Inferred type 'java.lang.String' for type parameter 'C' is not within its bound; should extend 'java.lang.Double'">getConverter2(String.class)</error>; } } class Z { } class TestNonNarrowingConversion<T extends Z> { public TestNonNarrowingConversion(T u) { } public T z = null; public int a() { <error descr="Incompatible types. Found: 'TestNonNarrowingConversion<Z>', required: 'TestNonNarrowingConversion<T>'">TestNonNarrowingConversion<T> x = new TestNonNarrowingConversion<Z>(new Z());</error> return 1; } }
[ "vistall.valeriy@gmail.com" ]
vistall.valeriy@gmail.com
b3170678263cba0e10996f885f03401ddf0e18ed
5fe70f7634032cb77cc57cba778d18d47a764b6c
/openbp-server/src/main/java/org/openbp/server/engine/script/ScriptUtil.java
fe12f4f407e2627d0ca9c11b3eb738f0294cf3ec
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
cleancode1116/OpenBP
cab222b3e336f1c81d6bc832e3c0d53244c13746
460a09c2f396ed1f77add70637644d254326d350
refs/heads/master
2020-07-11T06:07:24.821569
2016-11-18T07:43:22
2016-11-18T07:43:22
74,003,934
0
0
null
null
null
null
UTF-8
Java
false
false
5,063
java
/* * Copyright 2007 skynamics AG * * 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.openbp.server.engine.script; import org.openbp.core.engine.ExpressionConstants; /** * Script-related utility methods. * * @author Heiko Erhardt */ public final class ScriptUtil { /** * Maximum number of characters to collect for a toString value. * (used by the expression parser) */ public static final int MAX_TOSTRINGVALUE_LENGTH = 100; /** * Private constructor prevents instantiation. */ private ScriptUtil() { } /** * Determines if the expression is a constant expression. * * @param expression Expression to evaluate * @return * true The expression consists of constants only and can be executed without * an expression parser.<br> * false We will need an expression parser to evaluate the expression. */ public static boolean isConstantExpression(String expression) { if (expression != null) { if (expression.equals("true") || expression.equals("false") || expression.equals("java.lang.Boolean.TRUE") || expression.equals("java.lang.Boolean.FALSE")) { return true; } char c = expression.charAt(0); // String constant? if (c == '"') { return isStringConstant(expression, '"'); } if (c == '\'') { return isStringConstant(expression, '\''); } // String or number constant? if (Character.isDigit(c)) { return isNumericConstant(expression); } } return false; } /** * Determines the value of a simple constant expression. * Make sure to call this method only if you are sure that the expression is really * a simple constant (see the {@link #isConstantExpression} method). * * @param expression Expression to evaluate * @return The expression value or null */ public static Object getConstantExpressionValue(String expression) { if (expression != null) { if (expression.equals("true") || expression.equals("java.lang.Boolean.TRUE")) { return Boolean.TRUE; } if (expression.equals("false") || expression.equals("java.lang.Boolean.FALSE")) { return Boolean.FALSE; } char c = expression.charAt(0); // String constant? if (c == '"' || c == '\'') { return expression.substring(1, expression.length() - 1); } // String or number constant? if (Character.isDigit(c)) { return Integer.valueOf(expression); } } return null; } /** * Creates a name for a map element from the key value. * * @param key Key value of the map * @param includeParens * true Include parenthesis ("[]") in the name<br> * false Do not include parenthesis * * @return Name (usually "[key]") */ public static String createMapElementName(Object key, boolean includeParens) { StringBuilder ident = new StringBuilder(); if (includeParens) ident.append('['); if (key != null) { String tmp = key.toString(); // To prevent conflicts with expr. separator tmp = tmp.replace(ExpressionConstants.MEMBER_OPERATOR_CHAR, '-'); if (tmp.length() > MAX_TOSTRINGVALUE_LENGTH) { ident.append(tmp.substring(0, MAX_TOSTRINGVALUE_LENGTH)); ident.append("..."); } else { ident.append(tmp); } } else { ident.append("null"); } if (includeParens) ident.append(']'); return ident.toString(); } ////////////////////////////////////////////////// // @@ Helpers ////////////////////////////////////////////////// /** * Determines if the expression is a string constant. * * @param expression Expression to check * @param delimiter String delimiter character * @nowarn */ private static boolean isStringConstant(String expression, char delimiter) { int len = expression.length(); if (expression.charAt(0) != delimiter || expression.charAt(len - 1) != delimiter) return false; --len; for (int i = 1; i < len; ++i) { if (expression.charAt(i) == delimiter) return false; } return true; } /** * Determines if the expression is a numeric constant. * * @param expression Expression to check * @nowarn */ private static boolean isNumericConstant(String expression) { int len = expression.length(); for (int i = 0; i < len; ++i) { if (!Character.isDigit(expression.charAt(i))) return false; } return true; } }
[ "stephan@blackbuild.com" ]
stephan@blackbuild.com
e984bf50a6cfc19b9e2952c23769ba60b74da457
e7bb45a13209049f669a3220dd0815c15eab473a
/springboot-utils/src/main/java/com/bo/springboot/practice/comparator/code/Employee.java
567cf6985c055fb461244d2ca22956d628a34fe5
[]
no_license
Nobodylesszb/middle-ware-boot
75f2a945a5772f16dfe973658d891af332292045
5fd0f24dcd9a7914d47703c9dea20a2381cba907
refs/heads/master
2023-03-05T17:44:07.960000
2022-05-05T03:16:41
2022-05-05T03:16:41
247,861,475
1
0
null
2023-02-22T07:43:19
2020-03-17T02:30:50
Java
UTF-8
Java
false
false
290
java
package com.bo.springboot.practice.comparator.code; import lombok.AllArgsConstructor; import lombok.Data; @Data @AllArgsConstructor class Employee { private String name; private int age; private double salary; private long mobile; // constructors, getters & setters }
[ "nobodylesszb@163.com" ]
nobodylesszb@163.com
e002d15d737c1191c1daa415b47b44fee17302e2
8d8fb4dfd7be299076651e02d26eba6cd879428c
/newrelic-agent/src/test/java/com/newrelic/agent/attributes/DefaultDestinationPredicateTest.java
fbd339cadafb89b1e6d89e7f169eaf549fbbf246
[ "Apache-2.0" ]
permissive
newrelic/newrelic-java-agent
db6dd20f6ba3f43909b004ce4a058f589dd4b017
eb298ecd8d31f93622388aa12d3ba1e68a58f912
refs/heads/main
2023-08-31T05:14:44.428903
2023-08-29T10:37:35
2023-08-30T18:08:38
275,016,355
177
150
Apache-2.0
2023-09-11T14:50:06
2020-06-25T21:13:42
Java
UTF-8
Java
false
false
6,890
java
/* * * * Copyright 2020 New Relic Corporation. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * */ package com.newrelic.agent.attributes; import com.google.common.collect.Sets; import org.junit.Assert; import org.junit.Test; import java.util.HashSet; import java.util.Set; public class DefaultDestinationPredicateTest { private static final String DEST = "test"; @Test public void testAllEmpty() { Set<String> exclude = new HashSet<>(); Set<String> include = new HashSet<>(); Set<String> defaultExclude = new HashSet<>(); Set<String> mandatoryExclude = new HashSet<>(); DefaultDestinationPredicate pred = new DefaultDestinationPredicate(DEST, exclude, include, defaultExclude, mandatoryExclude); Assert.assertTrue(pred.apply("request")); Assert.assertTrue(pred.apply("message.parameters.foo")); Assert.assertTrue(pred.apply("jvm.thread_id")); Assert.assertTrue(pred.apply("nospecified")); } @Test public void testMandatoryWinsOverInclude() { Set<String> exclude = new HashSet<>(); Set<String> include = Sets.newHashSet("request", "message.parameters.*", "jvm.thread_id"); Set<String> defaultExclude = new HashSet<>(); Set<String> mandatoryExclude = Sets.newHashSet("request", "message.parameters.*", "jvm*"); DefaultDestinationPredicate pred = new DefaultDestinationPredicate(DEST, exclude, include, defaultExclude, mandatoryExclude); Assert.assertFalse(pred.apply("request")); Assert.assertFalse(pred.apply("message.parameters.foo")); Assert.assertFalse(pred.apply("jvm.thread_id")); Assert.assertTrue(pred.apply("nospecified")); } @Test public void testIncludeWinsOverDefaultExclude() { Set<String> exclude = new HashSet<>(); Set<String> include = Sets.newHashSet("request", "message.parameters.*", "jvm.thread_id"); Set<String> defaultExclude = Sets.newHashSet("request", "message.parameters.*", "jvm*"); Set<String> mandatoryExclude = new HashSet<>(); DefaultDestinationPredicate pred = new DefaultDestinationPredicate(DEST, exclude, include, defaultExclude, mandatoryExclude); Assert.assertTrue(pred.apply("request")); Assert.assertTrue(pred.apply("message.parameters.foo")); Assert.assertTrue(pred.apply("jvm.thread_id")); Assert.assertTrue(pred.apply("nospecified")); } @Test public void testExcludeWinsOverInclude() { Set<String> exclude = Sets.newHashSet("request", "message.parameters.*", "jvm*"); Set<String> include = Sets.newHashSet("request", "message.parameters.*", "jvm.thread_id"); Set<String> defaultExclude = new HashSet<>(); Set<String> mandatoryExclude = new HashSet<>(); DefaultDestinationPredicate pred = new DefaultDestinationPredicate(DEST, exclude, include, defaultExclude, mandatoryExclude); Assert.assertFalse(pred.apply("request")); Assert.assertFalse(pred.apply("message.parameters.foo")); // more specific wins over less Assert.assertTrue(pred.apply("jvm.thread_id")); Assert.assertTrue(pred.apply("nospecified")); } @Test public void testMandatoryWinsOverAll() { Set<String> exclude = Sets.newHashSet("request", "message.parameters.*", "jvm*"); Set<String> include = Sets.newHashSet("request", "message.parameters.*", "jvm.thread_id"); Set<String> defaultExclude = Sets.newHashSet("request", "message.parameters.*", "jvm*"); Set<String> mandatoryExclude = Sets.newHashSet("request", "message.parameters.*", "jvm*"); DefaultDestinationPredicate pred = new DefaultDestinationPredicate(DEST, exclude, include, defaultExclude, mandatoryExclude); Assert.assertFalse(pred.apply("request")); Assert.assertFalse(pred.apply("message.parameters.foo")); Assert.assertFalse(pred.apply("jvm.thread_id")); Assert.assertTrue(pred.apply("nospecified")); } @Test public void isPotentialConfigMatchNoIncludeExcludes() { Set<String> exclude = new HashSet<>(); Set<String> include = new HashSet<>(); Set<String> defaultExclude = Sets.newHashSet("request*"); Set<String> mandatoryExclude = new HashSet<>(); DefaultDestinationPredicate pred = new DefaultDestinationPredicate(DEST, exclude, include, defaultExclude, mandatoryExclude); Assert.assertFalse(pred.isPotentialConfigMatch("request.parameters.*")); defaultExclude.clear(); mandatoryExclude = Sets.newHashSet("request*"); pred = new DefaultDestinationPredicate(DEST, exclude, include, defaultExclude, mandatoryExclude); Assert.assertFalse(pred.isPotentialConfigMatch("request.parameters.*")); } @Test public void isPotentialConfigMatchExcludes() { Set<String> exclude = Sets.newHashSet("request.parameters.*"); Set<String> include = new HashSet<>(); Set<String> defaultExclude = new HashSet<>(); Set<String> mandatoryExclude = new HashSet<>(); DefaultDestinationPredicate pred = new DefaultDestinationPredicate(DEST, exclude, include, defaultExclude, mandatoryExclude); Assert.assertFalse(pred.isPotentialConfigMatch("request.parameters.*")); } @Test public void isPotentialConfigMatchIncludes() { Set<String> exclude = new HashSet<>(); Set<String> include = Sets.newHashSet("request.parameters.*", "bar", "tada", "hello", "random", "bear", "foo"); Set<String> defaultExclude = new HashSet<>(); Set<String> mandatoryExclude = new HashSet<>(); DefaultDestinationPredicate pred = new DefaultDestinationPredicate(DEST, exclude, include, defaultExclude, mandatoryExclude); Assert.assertTrue(pred.isPotentialConfigMatch("request.parameters.")); include = Sets.newHashSet("r*", "bar", "tada", "hello", "random", "bear", "foo"); pred = new DefaultDestinationPredicate(DEST, exclude, include, defaultExclude, mandatoryExclude); Assert.assertTrue(pred.isPotentialConfigMatch("request.parameters.")); include = Sets.newHashSet("request.parameters.foo", "bar", "tada", "hello", "random", "bear", "foo"); pred = new DefaultDestinationPredicate(DEST, exclude, include, defaultExclude, mandatoryExclude); Assert.assertTrue(pred.isPotentialConfigMatch("request.parameters.")); include = Sets.newHashSet("recent.parameters", "bar", "tada", "hello", "random", "bear", "foo"); pred = new DefaultDestinationPredicate(DEST, exclude, include, defaultExclude, mandatoryExclude); Assert.assertFalse(pred.isPotentialConfigMatch("request.parameters.")); } }
[ "49817386+jeffalder@users.noreply.github.com" ]
49817386+jeffalder@users.noreply.github.com
01d30a1c7e01202c268b7880370ec555efcf9e6f
b6df412c0b5f5451185bf427b00c282dc07e7ec5
/src/main/java/com/axellience/vuegwtdemo/client/components/todolist/TodoComponent.java
9f84aed0638e13d0f08978dbd8d48dafa4443038
[ "MIT" ]
permissive
ldauvilaire/vue-gwt-demo
b5bf1d84afef23344c20478fa3a2e4e3e917e62c
65f2620a703aaed2db05db015da90633e43adb62
refs/heads/master
2020-03-18T08:33:42.765790
2018-04-06T10:05:37
2018-04-06T10:05:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
903
java
package com.axellience.vuegwtdemo.client.components.todolist; import com.axellience.vuegwt.core.client.component.VueComponent; import com.axellience.vuegwt.core.annotations.component.Component; import com.axellience.vuegwt.core.annotations.component.Computed; import com.axellience.vuegwt.core.annotations.component.Prop; import jsinterop.annotations.JsMethod; import jsinterop.annotations.JsProperty; /** * Display a Todo */ @Component public class TodoComponent extends VueComponent { @Prop @JsProperty Todo todo; /** * Emit an event when we want to delete the todo */ @JsMethod public void removeTodo() { this.$emit("removeTodo", todo); } @Computed public boolean getIsDoneTodo() { return this.todo.isDone(); } @Computed public void setIsDoneTodo(boolean isDone) { this.todo.setDone(isDone); } }
[ "adrien.baron@axellience.com" ]
adrien.baron@axellience.com
a2732cda03625e06200557e446602ddf433dfb7b
68a19507f18acff18aa4fa67d6611f5b8ac8913c
/pl-cms/cms/pl-cms-pojo/src/main/java/pl/cms/pojo/command/lunbo/ModifyLunboCommand.java
abbc3e449dbe645994fc7485b35cc0207c8305cb
[]
no_license
ksksks2222/pl-workspace
cf0d0be2dfeaa62c0d4d5437f85401f60be0eadd
6146e3e3c2384c91cac459d25b27ffeb4f970dcd
refs/heads/master
2021-09-13T08:59:17.177105
2018-04-27T09:46:42
2018-04-27T09:46:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,391
java
package pl.cms.pojo.command.lunbo; import org.apache.commons.lang.StringUtils; import com.alibaba.fastjson.JSON; import hg.common.util.file.FdfsFileInfo; import pl.cms.pojo.command.AdminBaseCommand; /** * * @类功能说明:添加广告图 * @类修改者: * @修改日期: * @修改说明: * @公司名称:浙江汇购科技有限公司 * @部门:技术部 * @作者:yuxx * @创建时间:2015年3月11日下午3:55:47 * */ @SuppressWarnings("serial") public class ModifyLunboCommand extends AdminBaseCommand { private String lunboId; private String title; private String url; private String imageId; private String imageUrl; private String positionId; private Boolean isShow; private String titleImageFileInfoJSON; private FdfsFileInfo titleImageFileInfo; public String getLunboId() { return lunboId; } public void setLunboId(String lunboId) { this.lunboId = lunboId; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getImageId() { return imageId; } public void setImageId(String imageId) { this.imageId = imageId; } public String getPositionId() { return positionId; } public void setPositionId(String positionId) { this.positionId = positionId; } public Boolean getIsShow() { return isShow; } public void setIsShow(Boolean isShow) { this.isShow = isShow; } public String getImageUrl() { return imageUrl; } public void setImageUrl(String imageUrl) { this.imageUrl = imageUrl; } public String getTitleImageFileInfoJSON() { return titleImageFileInfoJSON; } public void setTitleImageFileInfoJSON(String titleImageFileInfoJSON) { this.titleImageFileInfoJSON = titleImageFileInfoJSON; } public FdfsFileInfo getTitleImageFileInfo() { if (titleImageFileInfo == null && StringUtils.isNotBlank(titleImageFileInfoJSON)) { setTitleImageFileInfo(JSON.parseObject(titleImageFileInfoJSON, FdfsFileInfo.class)); } return titleImageFileInfo; } public void setTitleImageFileInfo(FdfsFileInfo titleImageFileInfo) { this.titleImageFileInfo = titleImageFileInfo; } }
[ "cangsong6908@gmail.com" ]
cangsong6908@gmail.com
7e3cede167649d69fdee8b01e5ceb936e1b928ef
1abb500dd743e1c47376ea95dfdbc2f371b87e5e
/src/main/java/com/alibaba/tamper/process/script/lifecyle/DisposableScript.java
40cbde1f05bfa1d773ad99012580ffac799a6f25
[ "Apache-2.0" ]
permissive
sdgdsffdsfff/tamper
693985c9536926125cec15fc4c3328e1a8fe6706
9cc7a59afdd5c20886ac4fc4dbd7ca60f0f9dfc7
refs/heads/master
2021-01-15T10:51:29.051669
2020-02-15T05:49:43
2020-02-15T05:49:43
63,648,813
0
0
Apache-2.0
2020-02-15T05:49:45
2016-07-19T01:21:15
Java
UTF-8
Java
false
false
278
java
package com.alibaba.tamper.process.script.lifecyle; /** * 支持Disposable的script接口,在一次Mapping完成后进行回调,完成数据清理动作 * * @author jianghang 2011-11-23 下午04:39:37 */ public interface DisposableScript { public void dispose(); }
[ "jianghang115@gmail.com" ]
jianghang115@gmail.com
c496b3f00f7ea9c21c2d691c5150d61bb2e40323
7b1f3549c7358604f363e77b816f739aa01401c9
/testsuite/src/domts/level1/core/Element_Replace_Existing_Attribute_Test.java
71886e6e3e4b3051039e52b55d00f410cc3e6a80
[ "MIT", "W3C" ]
permissive
benravago/fx.html
a3d0123d17e9e51f700af19c0e17834307317534
a7ca6eb0554342b96eec94ca4ba8cb5594b44442
refs/heads/master
2023-02-05T19:55:59.647388
2020-12-19T20:38:33
2020-12-19T20:38:33
319,398,458
0
0
null
null
null
null
UTF-8
Java
false
false
1,648
java
package domts.level1.core; import org.w3c.dom.*; import java.util.*; import org.junit.jupiter.api.*; import static org.junit.jupiter.api.Assertions.*; /** * The "setAttributeNode(newAttr)" method adds a new * attribute to the Element. If the "newAttr" Attr node is * already present in this element, it should replace the * existing one. * * Retrieve the last child of the third employee and add a * new attribute node by invoking the "setAttributeNode(new * Attr)" method. The new attribute node to be added is * "street", which is already present in this element. The * method should replace the existing Attr node with the * new one. This test uses the "createAttribute(name)" * method from the Document interface. * @author NIST * @author Mary Brady */ @Disabled("fx") class Element_Replace_Existing_Attribute_Test extends domts.DOMTestCase { @BeforeEach void setup() { // check if loaded documents are supported for content type String contentType = getContentType(); preload(contentType, "staff", true); } @Test @DisplayName("http://www.w3.org/2001/DOM_Test_Suite/level1/core/elementreplaceexistingattribute") void run() throws Throwable { Document doc; NodeList elementList; Element testEmployee; Attr newAttribute; String name; Attr setAttr; doc = (Document) load("staff", true); elementList = doc.getElementsByTagName("address"); testEmployee = (Element) elementList.item(2); newAttribute = doc.createAttribute("street"); setAttr = testEmployee.setAttributeNode(newAttribute); name = testEmployee.getAttribute("street"); assertEquals("", name, "elementReplaceExistingAttributeAssert"); } }
[ "ben.ravago@aol.com" ]
ben.ravago@aol.com
9f91a88bb6b345bbdde743d449bc1c6a27f88697
44325906adf8cbc19166a2113d80251d267bdcb5
/biomixer/src/org/thechiselgroup/biomixer/client/core/ui/dialog/Dialog.java
9874714e6826fca8d7435a5cb0f6888e0f58969d
[ "Apache-2.0", "BSD-3-Clause", "MIT", "LicenseRef-scancode-public-domain" ]
permissive
cts2/biomixer
649a89c49f35abd02c9c9147deab5d8d580870f2
9d9b4207adf4e60d321ba9e027178b56d6d44492
refs/heads/master
2021-01-16T20:11:26.352747
2012-03-12T19:17:21
2012-03-12T19:17:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,415
java
/******************************************************************************* * Copyright 2009, 2010 Lars Grammel * * 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.thechiselgroup.biomixer.client.core.ui.dialog; import com.google.gwt.user.client.ui.Widget; /** * Default dialog that displays a title, has a custom content, and an OK and * Cancel button. The OK and cancel buttons both close the window after being * pressed. * * @author Lars Grammel */ public interface Dialog { void cancel(); Widget getContent(); String getHeader(); String getOkayButtonLabel(); String getWindowTitle(); void handleException(Exception ex); public void init(DialogCallback callback); void okay() throws Exception; }
[ "lars.grammel@gmail.com" ]
lars.grammel@gmail.com
76725e5fa0a8be387dc7ef2baf5e32595112c1f4
fd34bc57a54757fd6c29980347eb0a22213f5430
/abaco/gwt/src/main/java/it/mate/abaco/client/places/AppHistoryObserver.java
6d9de2937d13c07eb3214a05cda6d0e6fe4ce5b2
[]
no_license
urazovm/marcelatelab
7b64c1c3f6bad786590964e5115d811787bc91a2
b9e264ecb4fe99b8966a8e4babc588b4aec4725f
refs/heads/master
2021-06-01T06:25:35.860311
2016-04-29T12:22:07
2016-04-29T12:22:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
750
java
package it.mate.abaco.client.places; import com.google.gwt.place.shared.Place; import com.google.web.bindery.event.shared.EventBus; import com.google.web.bindery.event.shared.HandlerRegistration; import com.googlecode.mgwt.mvp.client.history.HistoryHandler; import com.googlecode.mgwt.mvp.client.history.HistoryObserver; public class AppHistoryObserver implements HistoryObserver { public void onPlaceChange(Place place, HistoryHandler handler) { } public void onHistoryChanged(Place place, HistoryHandler handler) { } public void onAppStarted(Place place, HistoryHandler historyHandler) { } public HandlerRegistration bind(EventBus eventBus, HistoryHandler historyHandler) { return null; } }
[ "demarco.m73@gmail.com" ]
demarco.m73@gmail.com
b0c0874ae17246b939babd1ce1a6983a24565455
cee6d0534a4b4fda056cacd1738fc7c22223ef06
/src/main/java/by/distributionnetwork/web/rest/UserJWTController.java
570c940594e208d56be256fb394150d280676b7a
[]
no_license
Topolev/DistributionNetwork_2017_05_31
54c0fac9ba8dbdd916dfec27b8348c60d7751840
a083f2bf9a64e7bbfe10ad2ea254c04c35f1d7a2
refs/heads/master
2021-01-23T01:40:32.544847
2017-05-31T15:52:36
2017-05-31T15:52:42
92,882,438
0
0
null
null
null
null
UTF-8
Java
false
false
3,051
java
package by.distributionnetwork.web.rest; import by.distributionnetwork.security.jwt.JWTConfigurer; import by.distributionnetwork.security.jwt.TokenProvider; import by.distributionnetwork.web.rest.vm.LoginVM; import com.codahale.metrics.annotation.Timed; import com.fasterxml.jackson.annotation.JsonProperty; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.Authentication; import org.springframework.security.core.AuthenticationException; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; import java.util.Collections; /** * Controller to authenticate users. */ @RestController @RequestMapping("/api") public class UserJWTController { private final Logger log = LoggerFactory.getLogger(UserJWTController.class); private final TokenProvider tokenProvider; private final AuthenticationManager authenticationManager; public UserJWTController(TokenProvider tokenProvider, AuthenticationManager authenticationManager) { this.tokenProvider = tokenProvider; this.authenticationManager = authenticationManager; } @PostMapping("/authenticate") @Timed public ResponseEntity authorize(@Valid @RequestBody LoginVM loginVM, HttpServletResponse response) { UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(loginVM.getUsername(), loginVM.getPassword()); try { Authentication authentication = this.authenticationManager.authenticate(authenticationToken); SecurityContextHolder.getContext().setAuthentication(authentication); boolean rememberMe = (loginVM.isRememberMe() == null) ? false : loginVM.isRememberMe(); String jwt = tokenProvider.createToken(authentication, rememberMe); response.addHeader(JWTConfigurer.AUTHORIZATION_HEADER, "Bearer " + jwt); return ResponseEntity.ok(new JWTToken(jwt)); } catch (AuthenticationException ae) { log.trace("Authentication exception trace: {}", ae); return new ResponseEntity<>(Collections.singletonMap("AuthenticationException", ae.getLocalizedMessage()), HttpStatus.UNAUTHORIZED); } } /** * Object to return as body in JWT Authentication. */ static class JWTToken { private String idToken; JWTToken(String idToken) { this.idToken = idToken; } @JsonProperty("id_token") String getIdToken() { return idToken; } void setIdToken(String idToken) { this.idToken = idToken; } } }
[ "i.topolev.vladimir@gmail.com" ]
i.topolev.vladimir@gmail.com
9fe1cf9a9adc370f8e59be31c65230f2fb911b03
bb45ca5f028b841ca0a08ffef60cedc40090f2c1
/app/src/main/java/com/tencent/smtt/sdk/WebChromeClient.java
47dc3a115b968d1dd173a5680dcb02bc194d3025
[]
no_license
tik5213/myWorldBox
0d248bcc13e23de5a58efd5c10abca4596f4e442
b0bde3017211cc10584b93e81cf8d3f929bc0a45
refs/heads/master
2020-04-12T19:52:17.559775
2017-08-14T05:49:03
2017-08-14T05:49:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,131
java
package com.tencent.smtt.sdk; import android.graphics.Bitmap; import android.net.Uri; import android.os.Message; import android.view.View; import com.tencent.smtt.export.external.interfaces.ConsoleMessage; import com.tencent.smtt.export.external.interfaces.GeolocationPermissionsCallback; import com.tencent.smtt.export.external.interfaces.IX5WebChromeClient.CustomViewCallback; import com.tencent.smtt.export.external.interfaces.JsPromptResult; import com.tencent.smtt.export.external.interfaces.JsResult; import com.tencent.smtt.sdk.WebStorage.QuotaUpdater; public class WebChromeClient { public Bitmap getDefaultVideoPoster() { return null; } public View getVideoLoadingProgressView() { return null; } public void getVisitedHistory(ValueCallback<String[]> valueCallback) { } public void onCloseWindow(WebView webView) { } public boolean onConsoleMessage(ConsoleMessage consoleMessage) { return false; } public boolean onCreateWindow(WebView webView, boolean z, boolean z2, Message message) { return false; } public void onExceededDatabaseQuota(String str, String str2, long j, long j2, long j3, QuotaUpdater quotaUpdater) { quotaUpdater.updateQuota(j2); } public void onGeolocationPermissionsHidePrompt() { } public void onGeolocationPermissionsShowPrompt(String str, GeolocationPermissionsCallback geolocationPermissionsCallback) { geolocationPermissionsCallback.invoke(str, true, true); } public void onHideCustomView() { } public boolean onJsAlert(WebView webView, String str, String str2, JsResult jsResult) { return false; } public boolean onJsBeforeUnload(WebView webView, String str, String str2, JsResult jsResult) { return false; } public boolean onJsConfirm(WebView webView, String str, String str2, JsResult jsResult) { return false; } public boolean onJsPrompt(WebView webView, String str, String str2, String str3, JsPromptResult jsPromptResult) { return false; } public boolean onJsTimeout() { return true; } public void onProgressChanged(WebView webView, int i) { } public void onReachedMaxAppCacheSize(long j, long j2, QuotaUpdater quotaUpdater) { quotaUpdater.updateQuota(j2); } public void onReceivedIcon(WebView webView, Bitmap bitmap) { } public void onReceivedTitle(WebView webView, String str) { } public void onReceivedTouchIconUrl(WebView webView, String str, boolean z) { } public void onRequestFocus(WebView webView) { } public void onShowCustomView(View view, int i, CustomViewCallback customViewCallback) { } public void onShowCustomView(View view, CustomViewCallback customViewCallback) { } public boolean onShowFileChooser(WebView webView, ValueCallback<Uri[]> valueCallback, FileChooserParams fileChooserParams) { return false; } public void openFileChooser(ValueCallback<Uri> valueCallback, String str, String str2) { valueCallback.onReceiveValue(null); } }
[ "18631616220@163.com" ]
18631616220@163.com
7b94f7cba4292022a1c0e22e3ee40dd004cdf8e0
dd34d5cbb802b25d82efa128b8a28ebfa624e55a
/logging/jboss/src/main/java/io/quarkus/ts/logging/jboss/LogResource.java
355e49bd9c29a03d2d9ebc091f46c1518ce7bf06
[]
no_license
penehyba/quarkus-test-suite
1eb1df63d2c602d1aaeb8edf5871534bc6b83157
4de8c58928c11a76ce5439fbc7def1943e76f5df
refs/heads/main
2023-08-14T05:21:45.140141
2021-10-06T06:34:32
2021-10-06T09:34:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,658
java
package io.quarkus.ts.logging.jboss; import javax.inject.Inject; import javax.ws.rs.GET; import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.QueryParam; import org.jboss.logging.Logger; import io.quarkus.arc.log.LoggerName; @Path("/log") public class LogResource { public static final String CUSTOM_CATEGORY = "foo"; private static final Logger LOG = Logger.getLogger(LogResource.class); @Inject Logger log; @LoggerName(CUSTOM_CATEGORY) Logger customCategoryLog; @POST @Path("/static/{level}") public void addLogMessageInStaticLogger(@PathParam("level") String level, @QueryParam("message") String message) { addLogMessage(LOG, level, message); } @POST @Path("/field/{level}") public void addLogMessageInFieldLogger(@PathParam("level") String level, @QueryParam("message") String message) { addLogMessage(log, level, message); } @POST @Path("/field-with-custom-category/{level}") public void addLogMessageInFieldWithCustomCategoryLogger(@PathParam("level") String level, @QueryParam("message") String message) { addLogMessage(customCategoryLog, level, message); } @GET public void logExample() { LOG.fatal("Fatal log example"); LOG.error("Error log example"); LOG.warn("Warn log example"); LOG.info("Info log example"); LOG.debug("Debug log example"); LOG.trace("Trace log example"); } private void addLogMessage(Logger logger, String level, String message) { logger.log(Logger.Level.valueOf(level), message); } }
[ "josecarvajalhilario@gmail.com" ]
josecarvajalhilario@gmail.com
cde952a16c41a61ad67e0b50fc135cf193adc81f
8c5b3ac1b15385f63d9d47487427ce4da5c2b0bf
/src/main/java/com/ariescat/seckill/redis/key/SeckillKeyPrefix.java
3e2b3d0d52104dd6cbf043a2493e32a68a0badf7
[]
no_license
Ariescat/Metis-Seckill
deda09028980e88b1f05b99e47238e7d3fb3b6bb
5b7927da82e74a461a7a6bea816b76be357b4c01
refs/heads/main
2023-07-31T22:43:14.159156
2021-09-26T05:03:28
2021-09-26T05:03:28
405,380,494
0
0
null
null
null
null
UTF-8
Java
false
false
652
java
package com.ariescat.seckill.redis.key; import com.ariescat.seckill.redis.key.base.BaseKeyPrefix; public class SeckillKeyPrefix extends BaseKeyPrefix { private SeckillKeyPrefix(String prefix) { super(prefix); } private SeckillKeyPrefix(int expireSeconds, String prefix) { super(expireSeconds, prefix); } public static SeckillKeyPrefix isGoodsOver = new SeckillKeyPrefix("isGoodsOver"); public static SeckillKeyPrefix seckillPath = new SeckillKeyPrefix(60, "seckillPath"); // 验证码5分钟有效 public static SeckillKeyPrefix seckillVerifyCode = new SeckillKeyPrefix(300, "seckillVerifyCode"); }
[ "1275563227@qq.com" ]
1275563227@qq.com
1312d24971580b64a94074e560fc5ad9dba3d960
85c8a4b7df9d5bcc2918724e34708a6c28556b14
/back-service/src/main/java/com/chenyifaer/back/entity/po/ShopReturnOrdersPO.java
2515075176f771f3e3e393946bc70e6d1620f183
[]
no_license
wudonghe1996/chenyifaer-shop
9b38f59a81bc08a129ad15aa4d838ebea66c0c9b
ca51946af31dec7b154c5b0de685c1408761ccdd
refs/heads/master
2022-06-24T06:17:07.753068
2020-05-09T03:58:27
2020-05-09T03:58:27
178,018,127
1
1
null
2022-06-17T02:05:40
2019-03-27T15:02:41
Java
UTF-8
Java
false
false
2,897
java
package com.chenyifaer.back.entity.po; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.extension.activerecord.Model; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; import java.io.Serializable; import java.math.BigDecimal; import java.time.LocalDateTime; /** * <p> * 订单管理 - 退单表 * </p> * * @author wudh * @since 2019-04-26 */ @Data @EqualsAndHashCode(callSuper = false) @Accessors(chain = true) @TableName("t_shop_return_orders") @ApiModel(value="ShopReturnOrdersPO对象", description="订单管理 - 退单表") public class ShopReturnOrdersPO extends Model<ShopReturnOrdersPO> { private static final long serialVersionUID = 1L; @ApiModelProperty(value = "主键") @TableId(value = "return_orders_id", type = IdType.AUTO) private Integer returnOrdersId; @ApiModelProperty(value = "订单ID") private Integer ordersId; @ApiModelProperty(value = "商品ID") private Integer goodsId; @ApiModelProperty(value = "用户ID") private Integer userId; @ApiModelProperty(value = "退单流水号") private String returnFlowNumber; @ApiModelProperty(value = "快递公司名称") private String expressName; @ApiModelProperty(value = "快递单号") private String expressNumber; @ApiModelProperty(value = "退单商品价格") private BigDecimal returnGoodsPrice; @ApiModelProperty(value = "运费") private BigDecimal expressPrice; @ApiModelProperty(value = "退单价格") private BigDecimal returnOrdersPrice; @ApiModelProperty(value = "退货类型(1:退货退款 2:仅退款)") private Integer returnType; @ApiModelProperty(value = "商品状态(1:已收到货 2:未收到货)") private Integer goodsType; @ApiModelProperty(value = "状态(0:待审核 1:审核通过 2:退货中 3:退货成功 4:退货失败)") private Integer status; @ApiModelProperty(value = "退单备注") private String returnRemark; @ApiModelProperty(value = "审核失败备注") private String checkFailRemark; @ApiModelProperty(value = "创建时间") private LocalDateTime createTime; @ApiModelProperty(value = "审核通过时间") private LocalDateTime checkTime; @ApiModelProperty(value = "审核人ID") private Integer checkUserId; @ApiModelProperty(value = "审核失败时间") private LocalDateTime checkFailTime; @ApiModelProperty(value = "退货成功时间") private LocalDateTime returnSuccessTime; @Override protected Serializable pkVal() { return this.returnOrdersId; } }
[ "1044717927@qq.com" ]
1044717927@qq.com
0b1f59232013beee113c5452132278756f13933c
03ee2cecdca9052c76d1ae94a7f094ff3834bc64
/liquigraph-core/src/main/java/org/liquigraph/core/model/predicates/ExecutionContextsMatchAnyContext.java
67fe72fcae87334b035d742cea033fd9eab975d7
[ "Apache-2.0" ]
permissive
kudzai/liquigraph
1ef98697c633e0f4f292608cfba1bad196619508
3614a222ac3ba0e1e13f63e82466dffa7ee15cad
refs/heads/master
2020-04-06T04:57:11.686360
2015-10-06T19:59:57
2015-10-06T19:59:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
718
java
package org.liquigraph.core.model.predicates; import com.google.common.base.Optional; import com.google.common.base.Predicate; import java.util.Collection; public class ExecutionContextsMatchAnyContext implements Predicate<String> { private final Optional<Collection<String>> contexts; private ExecutionContextsMatchAnyContext(Optional<Collection<String>> contexts) { this.contexts = contexts; } public static Predicate<String> BY_ANY_CONTEXT(Optional<Collection<String>> contexts) { return new ExecutionContextsMatchAnyContext(contexts); } @Override public boolean apply(String input) { return !contexts.isPresent() || contexts.get().contains(input); } }
[ "florent.biville@gmail.com" ]
florent.biville@gmail.com
ae65413674acb07ed09b54ba4a99e7ff8eb996ac
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_218/Testnull_21785.java
49a73c9d8351b888b8ed0bde474c05f001b563b1
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
308
java
package org.gradle.test.performancenull_218; import static org.junit.Assert.*; public class Testnull_21785 { private final Productionnull_21785 production = new Productionnull_21785("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
c801abcf7e74d09c4db12bc8354be395aed9bea4
5dcd871bfeb7d7cc62b1ded3a1aaf43f6304b49b
/src/main/java/org/apache/ibatis/transaction/jdbc/JdbcTransactionFactory.java
b8fbd5962f129ec9128924b69a9feafd74116d16
[ "Apache-2.0", "BSD-3-Clause" ]
permissive
zhihui-wu/Mybatis-3.5.4--
01e620d05bf13d97a8c0f8c63b1a6f27a60097d2
a6b5668ac153e57780e1e653862755c7f8820779
refs/heads/master
2022-09-28T22:19:25.165724
2020-01-02T06:13:20
2020-01-02T06:13:20
229,001,847
2
1
Apache-2.0
2022-09-08T01:04:49
2019-12-19T07:43:05
Java
UTF-8
Java
false
false
1,409
java
/** * Copyright ${license.git.copyrightYears} 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.apache.ibatis.transaction.jdbc; import java.sql.Connection; import javax.sql.DataSource; import org.apache.ibatis.session.TransactionIsolationLevel; import org.apache.ibatis.transaction.Transaction; import org.apache.ibatis.transaction.TransactionFactory; /** * Creates {@link JdbcTransaction} instances. * * @author Clinton Begin * * @see JdbcTransaction */ public class JdbcTransactionFactory implements TransactionFactory { @Override public Transaction newTransaction(Connection conn) { return new JdbcTransaction(conn); } @Override public Transaction newTransaction(DataSource ds, TransactionIsolationLevel level, boolean autoCommit) { return new JdbcTransaction(ds, level, autoCommit); } }
[ "1449553037@qq.com" ]
1449553037@qq.com
d83a85a6ac97f350182b451d275b44af7fff1530
3af5a56ef515d2ac92af8d602ca947f662ba0492
/bitcamp-java/src/main/java/com/eomcs/oop/ex01/Exam01_2.java
8c054ea1be7053d8ee3a509b8fe268bc408dfcfe
[]
no_license
asdzxc9395/bitcamp-study-_-
1b51f67b1dab3140f576923529128970831778c2
2aaa10af371521669d12e20e997d47bf036bcfcf
refs/heads/master
2020-09-23T12:38:27.319881
2020-02-04T10:24:32
2020-02-04T10:24:32
225,501,860
0
0
null
null
null
null
UTF-8
Java
false
false
4,077
java
// 클래스 - 사용 후 package com.eomcs.oop.ex01; public class Exam01_2 { public static void main(String[] args) { // 여러 개의 변수(메모리)를 묶어서 한 사람의 성적 정보를 저장하라! // => 밥, 국, 반찬1, 반찬2, 반찬3 을 쟁반에 담아서 가져오는 상황. // 다양한 타입의 메모리를 묶어서 // Score라는 새로운 형태의 메모리를 만들 수 있는 설계도. // => 개발자가 새롭게 정의한 데이터 타입이다. // => "사용자 정의 데이터 타입" 이라 부른다. // => 다음과 같이 클래스 문법을 사용하여 설계도를 정의한다. class Score { String name; int kor; int eng; int math; int sum; float aver; } // 개발자가 새롭게 정의한 메모리 설계도에 따라 메모리를 준비한다. // Score s; //??? // >> 이 선언은 설계도에 따라 메모리를 준비시키는 명령이 아니다!! // >> Score 설계도에 따라 만든 메모리의 주소를 저장할 변수를 만드는 명령이다. // >> 이렇게 메모리의 주소를 저장하는 변수를 "래퍼런스"라 부른다. // >> int와 같은 primitive data type인 경우, // 위와 같이 그냥 변수를 선언하면 되지만, // 클래스로 설게한 메모리는 이런 방식으로 만들수 없다. // class 문법으로 설계한 메모리 준비하기 // >> new 클래스명 (); // s = new Score(); // Score 설계도에 따라 메모리를 생성(사용할 수 있도록 확보)한다. // >> 이렇게 설계도에 따라 준비된 메모리를 "인스턴스"라 부른다. // => 확보된 메모리를 사용하려면 주소를 보관할 필요가 있다. // => 위에서 준비한 래퍼런스(s)에 주소를 보관한다. // 클래스 설계도에 따라 만든 메모리에 값을 집어 넣기 // => 주소를 이용하여 메모리에 접근한다. // s.name = "홍길동"; // s에 저장된 주소로 찾아가서 name 항목에 값 저장 s.kor = 100; // s에 저장된 주소로 찾아가서 kor 항목에 값 저장 s.eng = 90; s.math = 80; s.sum = s.kor + s.eng + s.math; s.aver = s.sum / 3; // s에 저장된 주소로 찾아가서 name 항목의 값 // => 위의 말을 줄여서 "s가 가리키는 메모리의 name 항목의 값" // => 다른 전문적인 용어로 "s가 가리키는 인스턴스의 name 값" // => 다시 줄여서 "s 인스턴스의 name 값" // => 다른 말로 "s 객체의 name 값" System.out.printf("이름: %s\n", s.name); System.out.printf("국어: %d\n", s.kor); System.out.printf("영어: %d\n", s.eng); System.out.printf("수학: %d\n", s.math); System.out.printf("합계: %d\n", s.sum); System.out.printf("평균: %.1f\n", s.aver); } } // 클래스(class) // - 여러 타입을 묶어서 사용자 정의 데이터 타입을 만드는 문법이다. // - 관련된 기능(메서드, 함수)을 관리하기 편하게 묶는 문법이다. // - 클래스는 다양한 타입의 문법을 묶을수 있다. // // 배열(array) // - 단일한 타입의 메모리를 묶는 문법이다. // // primitive 변수와 레퍼런스 // - primitive type(byte, short, int, long, float, double, boolean, char)의 // 메모리를 만들 때 변수 선언 만으로 완료된다. // 변수 이름이 곧 메모리를 가리키는 이름이 된다. // 예) int age; // - class(사용자 정의 데이터 타입)로 메모리를 만들 때는 // 반드시 new 명령을 사용해야 한다. // - 메모리를 만든 후에는 그 주소를 변수에 저장해서 메모리를 사용한다. // 예) Score s; <==== 메모리의 주소를 저장하는 변수 // s = new Score(); <=== 메모리를 확보한 후 그 주소를 s에 저장. // // 인스턴스의 항목 접근하기 // - 문법 // 레퍼런스명.항목명 = 값; // 예) Score s = new Score(); // s.name = "홍길동";
[ "asdzxc9395@naver.com" ]
asdzxc9395@naver.com
c50bc621ecbcb1770e01c21fce64a7e8b0b90430
5cfc8fad73ef87304148c129ebc6a64b2b957596
/ocr/src/main/java/com/chineseall/config/WebConfig.java
2e88bd46516c61cce3ea1a93198fa8afc4c3dd44
[]
no_license
zacky1230/cbdb
7436cad9b6240a017fa2beed037ab62466f1b719
9290047a5429ba5c10cfb07c98b4c50d79239a7d
refs/heads/master
2020-03-25T03:52:15.372305
2018-10-26T07:49:15
2018-10-26T07:49:15
143,364,491
1
0
null
null
null
null
UTF-8
Java
false
false
2,528
java
package com.chineseall.config; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; import org.springframework.web.servlet.HandlerInterceptor; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import java.util.Enumeration; /** * @author gy1zc3@gmail.com * Created by zacky on 15:53. */ @Component public class WebConfig implements HandlerInterceptor { private Logger logger = LoggerFactory.getLogger("WebConfig"); @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { // HttpSession session = request.getSession(); // if (session.getAttribute(WebSecurityConfig.SESSION_KEY) != null) { if (true) { logger.info("[preHandle][" + request + "]" + "[" + request.getMethod() + "]" + request.getRequestURI() + getParameters(request)); return true; } String url = "/login"; response.sendRedirect(url); return false; } private String getParameters(HttpServletRequest request) { StringBuffer posted = new StringBuffer(); Enumeration<?> e = request.getParameterNames(); if (e != null) { posted.append("?"); } while (e.hasMoreElements()) { if (posted.length() > 1) { posted.append("&"); } String curr = (String) e.nextElement(); posted.append(curr + "="); if (curr.contains("password") || curr.contains("pass") || curr.contains("pwd")) { posted.append("*****"); } else { posted.append(request.getParameter(curr)); } } String ip = request.getHeader("X-FORWARDED-FOR"); String ipAddr = (ip == null) ? getRemoteAddr(request) : ip; if (ipAddr != null && !ipAddr.equals("")) { posted.append("&_psip=" + ipAddr); } return posted.toString(); } private String getRemoteAddr(HttpServletRequest request) { String ipFromHeader = request.getHeader("X-FORWARDED-FOR"); if (ipFromHeader != null && ipFromHeader.length() > 0) { logger.debug("ip from proxy - X-FORWARDED-FOR : " + ipFromHeader); return ipFromHeader; } return request.getRemoteAddr(); } }
[ "zachary31@outlook.com" ]
zachary31@outlook.com
ae8ea162bd2138c6e2e4e5c00d6e99f0a999d3f5
ddce8edc4ae450530fdae1bc22748d262ef2f0a8
/src/main/java/com/fujitsu/isuzu/service/DataIdService.java
bfbde633d216739aba85f2bd39a3693b41ba2ade
[]
no_license
fujitsu-nikhil/isuzu-sample
7f309c101b53fb12704ba0a240f01b21a9cd9dc2
e76124d15db819b52cf3a382e040d361f523678a
refs/heads/master
2020-05-24T00:31:09.483754
2019-05-16T11:53:14
2019-05-16T11:53:14
187,017,368
0
0
null
null
null
null
UTF-8
Java
false
false
772
java
package com.fujitsu.isuzu.service; import com.fujitsu.isuzu.domain.DataId; import java.util.List; import java.util.Optional; /** * Service Interface for managing {@link DataId}. */ public interface DataIdService { /** * Save a dataId. * * @param dataId the entity to save. * @return the persisted entity. */ DataId save(DataId dataId); /** * Get all the dataIds. * * @return the list of entities. */ List<DataId> findAll(); /** * Get the "id" dataId. * * @param id the id of the entity. * @return the entity. */ Optional<DataId> findOne(Long id); /** * Delete the "id" dataId. * * @param id the id of the entity. */ void delete(Long id); }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
3636727e9fd255023bffcfa0512212b5cf5c9860
38bc357b474f565738db2543707304a533bcece2
/src/test/java/just/niubi/httprequest/EncodeTest.java
6dc8fb3001d158dea1cb6941e27ded5b162e421b
[ "MIT", "JSON" ]
permissive
Menpen/NiuBi
be2cf3598512cfd14e376c1c9ee191fb8f521bc7
54309eed631289f52ba502025c225fd190a5404d
refs/heads/master
2020-03-13T18:39:30.796831
2017-05-24T06:23:55
2017-05-24T06:23:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,679
java
/* * Copyright (c) 2014 Kevin Sawicki <kevinsawicki@gmail.com> * * 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 just.niubi.httprequest; import static org.junit.Assert.assertEquals; import static just.niubi.http.HttpRequest.*; import just.niubi.http.HttpRequest; import org.junit.Test; /** * Unit tests of URL encoding done by {@link HttpRequest} */ public class EncodeTest { /** * Verify encoding of URLs */ @Test public void encode() { assertEquals("http://google.com", HttpRequest.encode("http://google.com")); assertEquals("https://google.com", HttpRequest.encode("https://google.com")); assertEquals("http://google.com/a", HttpRequest.encode("http://google.com/a")); assertEquals("http://google.com/a/", HttpRequest.encode("http://google.com/a/")); assertEquals("http://google.com/a/b", HttpRequest.encode("http://google.com/a/b")); assertEquals("http://google.com/a?", HttpRequest.encode("http://google.com/a?")); assertEquals("http://google.com/a?b=c", HttpRequest.encode("http://google.com/a?b=c")); assertEquals("http://google.com/a?b=c%20d", HttpRequest.encode("http://google.com/a?b=c d")); assertEquals("http://google.com/a%20b", HttpRequest.encode("http://google.com/a b")); assertEquals("http://google.com/a.b", HttpRequest.encode("http://google.com/a.b")); assertEquals("http://google.com/%E2%9C%93?a=b", HttpRequest.encode("http://google.com/\u2713?a=b")); assertEquals("http://google.com/a%5Eb", HttpRequest.encode("http://google.com/a^b")); assertEquals("http://google.com/%25", HttpRequest.encode("http://google.com/%")); assertEquals("http://google.com/a.b?c=d.e", HttpRequest.encode("http://google.com/a.b?c=d.e")); assertEquals("http://google.com/a.b?c=d/e", HttpRequest.encode("http://google.com/a.b?c=d/e")); assertEquals("http://google.com/a?%E2%98%91", HttpRequest.encode("http://google.com/a?\u2611")); assertEquals("http://google.com/a?b=%E2%98%90", HttpRequest.encode("http://google.com/a?b=\u2610")); assertEquals("http://google.com/a?b=c%2Bd&e=f%2Bg", HttpRequest.encode("http://google.com/a?b=c+d&e=f+g")); assertEquals("http://google.com/+", HttpRequest.encode("http://google.com/+")); assertEquals("http://google.com/+?a=b%2Bc", HttpRequest.encode("http://google.com/+?a=b+c")); } /** * Encoding malformed URI */ @Test(expected = HttpRequestException.class) public void encodeMalformedUri() { HttpRequest.encode("\\m/"); } }
[ "biezhi.me@gmail.com" ]
biezhi.me@gmail.com
9af0280869980e34d01670c3d9ced9182b0d1a95
acf83e1dfae28aa85325922a3e9a2eb59dc93955
/src/main/java/org/apache/camel/salesforce/dto/FeedLike.java
27acc9a87ba06b85d006af8a6ccfd678ace4584f
[ "Apache-2.0" ]
permissive
anandlalvb/JBoss_Fuse_Salesforce
f00820609ea096dcc52b435950300bd3d9e411c6
40d2f48c255633c5408dadc313092bb47039407a
refs/heads/master
2020-03-28T11:17:57.566856
2018-09-20T01:13:42
2018-09-20T01:13:42
148,199,022
0
0
null
null
null
null
UTF-8
Java
false
false
4,428
java
/* * Salesforce DTO generated by camel-salesforce-maven-plugin * Generated on: Thu Sep 06 16:51:28 IST 2018 */ package org.apache.camel.salesforce.dto; import java.util.ArrayList; import java.util.List; import javax.annotation.Generated; import com.thoughtworks.xstream.annotations.XStreamAlias; import org.apache.camel.component.salesforce.api.dto.AbstractDescribedSObjectBase; import org.apache.camel.component.salesforce.api.dto.ChildRelationShip; import org.apache.camel.component.salesforce.api.dto.InfoUrls; import org.apache.camel.component.salesforce.api.dto.NamedLayoutInfo; import org.apache.camel.component.salesforce.api.dto.RecordTypeInfo; import org.apache.camel.component.salesforce.api.dto.SObjectDescription; import org.apache.camel.component.salesforce.api.dto.SObjectDescriptionUrls; import org.apache.camel.component.salesforce.api.dto.SObjectField; import com.fasterxml.jackson.annotation.JsonProperty; /** * Salesforce DTO for SObject FeedLike */ @Generated("org.apache.camel.maven.CamelSalesforceMojo") @XStreamAlias("FeedLike") public class FeedLike extends AbstractDescribedSObjectBase { private static final SObjectDescription DESCRIPTION = createSObjectDescription(); // FeedItemId private String FeedItemId; @JsonProperty("FeedItemId") public String getFeedItemId() { return this.FeedItemId; } @JsonProperty("FeedItemId") public void setFeedItemId(String FeedItemId) { this.FeedItemId = FeedItemId; } // FeedEntityId private String FeedEntityId; @JsonProperty("FeedEntityId") public String getFeedEntityId() { return this.FeedEntityId; } @JsonProperty("FeedEntityId") public void setFeedEntityId(String FeedEntityId) { this.FeedEntityId = FeedEntityId; } // InsertedById private String InsertedById; @JsonProperty("InsertedById") public String getInsertedById() { return this.InsertedById; } @JsonProperty("InsertedById") public void setInsertedById(String InsertedById) { this.InsertedById = InsertedById; } @Override public final SObjectDescription description() { return DESCRIPTION; } private static SObjectDescription createSObjectDescription() { final SObjectDescription description = new SObjectDescription(); final List<SObjectField> fields1 = new ArrayList<>(); description.setFields(fields1); final SObjectField sObjectField1 = createField("Id", "Feed Like ID", "id", "tns:ID", 18, false, false, false, false, false, false, true); fields1.add(sObjectField1); final SObjectField sObjectField2 = createField("FeedItemId", "Feed Item ID", "reference", "tns:ID", 18, false, true, false, false, false, false, false); fields1.add(sObjectField2); final SObjectField sObjectField3 = createField("FeedEntityId", "Feed Item ID", "reference", "tns:ID", 18, false, true, false, false, false, false, false); fields1.add(sObjectField3); final SObjectField sObjectField4 = createField("CreatedById", "Created By ID", "reference", "tns:ID", 18, false, false, false, false, false, false, false); fields1.add(sObjectField4); final SObjectField sObjectField5 = createField("CreatedDate", "Created Date", "datetime", "xsd:dateTime", 0, false, false, false, false, false, false, false); fields1.add(sObjectField5); final SObjectField sObjectField6 = createField("IsDeleted", "Deleted", "boolean", "xsd:boolean", 0, false, false, false, false, false, false, false); fields1.add(sObjectField6); final SObjectField sObjectField7 = createField("InsertedById", "InsertedBy ID", "reference", "tns:ID", 18, false, false, false, false, false, false, false); fields1.add(sObjectField7); description.setLabelPlural("Feed Likes"); description.setLabel("Feed Like"); final SObjectDescriptionUrls sObjectDescriptionUrls1 = new SObjectDescriptionUrls(); sObjectDescriptionUrls1.setDescribe("/services/data/v34.0/sobjects/FeedLike/describe"); sObjectDescriptionUrls1.setSobject("/services/data/v34.0/sobjects/FeedLike"); sObjectDescriptionUrls1.setRowTemplate("/services/data/v34.0/sobjects/FeedLike/{ID}"); description.setUrls(sObjectDescriptionUrls1); description.setName("FeedLike"); return description; } }
[ "anandlalvb@gmail.com" ]
anandlalvb@gmail.com
9ae3d21705abedbf966577d5b92218101c0a31b7
94029b5cf7ec5aa90d7d11391d246a67d0a74b5c
/Module 2_Code/Chapter9/java/AsteroidsActivity.java
9358e90548634176c9950e99ec9c5c779ce3c6ba
[ "MIT" ]
permissive
PacktPublishing/Android-Game-Programming
a2cc11d238a40132239dd25cd8bfcfa1df31d01b
00a595b13c4d6bcc6d2d51e7c7e9281d50946ae7
refs/heads/master
2023-02-07T00:56:22.242351
2023-01-30T08:14:19
2023-01-30T08:14:19
68,189,396
24
15
null
null
null
null
UTF-8
Java
false
false
1,004
java
package com.gamecodeschool.c9asteroids; import android.app.Activity; import android.graphics.Point; import android.opengl.GLSurfaceView; import android.os.Bundle; import android.view.Display; public class AsteroidsActivity extends Activity { private GLSurfaceView asteroidsView; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Get a Display object to access screen details Display display = getWindowManager().getDefaultDisplay(); // Load the resolution into a Point object Point resolution = new Point(); display.getSize(resolution); asteroidsView = new AsteroidsView(this, resolution.x, resolution.y); setContentView(asteroidsView); } @Override protected void onPause() { super.onPause(); asteroidsView.onPause(); } @Override protected void onResume() { super.onResume(); asteroidsView.onResume(); } }
[ "sushantn@packt.com" ]
sushantn@packt.com
21876c98b475f85b47c94bcaef6b3bdba602f1be
59ae3a253219275f9535cc4c8647633ef0887aaf
/Extra Credit/Extra Credit/advCS_indstudy/worksheets_activities/09.recursion.10/RecursionWorkSheet2KEY.java
52db6b1e669bf41973e3f26082d9024ec13d35c4
[]
no_license
tfbninja/APCS_Extra_Credit
1c8799cd8d84ab445572987963d562dddbf90168
c7b0d220da840d379bf57f4509a3b43798a7e2ee
refs/heads/master
2020-05-18T02:50:42.559036
2019-04-30T19:02:59
2019-04-30T19:02:59
184,128,471
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
760
java
//© A+ Computer Science - www.apluscompsci.com //recursion worksheet key import java.util.*; import static java.util.Collections.*; import static java.lang.System.*; public class RecursionWorkSheet2KEY { /* static void fun(int x) { if(x>=1){ out.print(x); fun(x-1); } } static void fun(int x) { if(x<1){ out.print(x); }else{ out.print(x); fun(x-1); } } static int fun(int x) { if (x<1) return x; else return x + fun(x-2); } */ static int fun( int x, int y) { if( y == 2) return y; else return fun( x, y - 1) + x; } public static void main(String[] args) { //fun(5); //System.out.println(fun(8)); System.out.println(fun(5,5)); } }
[ "tfbninja@users.noreply.github.com" ]
tfbninja@users.noreply.github.com
1d9bb7b36d9e5ada0561348e8546bef4a3f33022
046f8ad87afcb77957a0cc7aa94080214d04c5cc
/Chp. 17 - More Problems (Hard)/_17_21_Volume_of_Histogram/VolumeOfHistogram.java
d7befa717312de6c4f9767136a4da5cbd240618c
[]
no_license
sindhu819/Cracking-the-Coding-Interview_solutions
7336901d773a0e4b88febac4d01b73f486d36487
23b0d5533449a4fa995e445cad026f13d489517a
refs/heads/master
2020-09-11T12:36:49.758028
2019-08-18T22:19:11
2019-08-18T22:19:11
222,066,798
0
1
null
2019-11-16T08:03:01
2019-11-16T08:03:01
null
UTF-8
Java
false
false
1,237
java
package _17_21_Volume_of_Histogram; // Main idea: For each index, 2 walls (the tallest wall anywhere to the left, and to the right), together // determine the amount of water the index will hold. We can calculate this iteratively. public class VolumeOfHistogram { public static int computeHistogramVolume(int[] height) { if (height == null || height.length <= 1) { return 0; } int size = height.length; // Calculate left maxes int[] leftMax = new int[size]; leftMax[0] = height[0]; for (int i = 1; i < size; i++) { leftMax[i] = Math.max(leftMax[i - 1], height[i]); } // Calculate right maxes int[] rightMax = new int[size]; rightMax[size - 1] = height[size - 1]; for (int i = size - 2; i >= 0; i--) { rightMax[i] = Math.max(rightMax[i + 1], height[i]); } // Calculate amount of water that can be stored above each spot on histogram int water = 0; for (int i = 1; i < size - 1; i++) { water += Math.min(leftMax[i], rightMax[i]) - height[i]; } return water; } } // Time Complexity: O(n) // Space Complexity: O(n)
[ "9rodney@gmail.com" ]
9rodney@gmail.com
eaa28b715fd91ac4adf71e5e18595ca80218d2de
b357cc8e82ef87548fe9c3b3f2ceb80693f225f3
/main/ip/test/boofcv/alg/filter/convolve/TestConvolveDownNormalized.java
8ca3eb17551a9a72788175a2495e524fc2fe722e
[ "Apache-2.0", "LicenseRef-scancode-takuya-ooura" ]
permissive
riskiNova/BoofCV
7806ef07586e28fbffd17537e741a71b11f0b381
16fff968dbbe07af4a9cb14395a89cde18ffb72e
refs/heads/master
2020-06-16T17:32:36.492220
2016-06-13T17:16:27
2016-06-13T17:16:27
75,079,845
1
0
null
2016-11-29T12:34:19
2016-11-29T12:34:19
null
UTF-8
Java
false
false
1,526
java
/* * Copyright (c) 2011-2013, Peter Abeles. All Rights Reserved. * * This file is part of BoofCV (http://boofcv.org). * * 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 boofcv.alg.filter.convolve; import boofcv.alg.filter.convolve.down.CompareToStandardConvolveDownNormalized; import org.junit.Test; /** * @author Peter Abeles */ public class TestConvolveDownNormalized { @Test public void compareToStandard() { CompareToStandardConvolveDownNormalized test = new CompareToStandardConvolveDownNormalized(ConvolveDownNormalized.class); test.setSkip(2); for( int i = 0; i < 2; i++ ) { test.setImageDimension(15+i,20+i); // convolve with different kernel sizes relative to the skip amount test.setKernelRadius(1); test.performTests(9); test.setKernelRadius(2); test.performTests(9); test.setKernelRadius(3); test.performTests(9); // now try a pathological case where the kernel is larger than the image test.setKernelRadius(10); test.performTests(9); } } }
[ "peter.abeles@gmail.com" ]
peter.abeles@gmail.com
fea6c3d360808dbd655c6b85f3759072a223aa33
e55d6023fdd2639781d00340faa13e0a14fedd6b
/service.impl/src/main/java/com/hack23/cia/service/impl/action/common/BusinessService.java
6e77cb75f2ec82aa24d8865c5fcb4259e2e5cd67
[ "Apache-2.0" ]
permissive
renovate-tests/cia
0579594de04b76bc6d23d38622e77bd9b641c7d7
4b340ef8afa17cffb5ffe6a5607428a5ce8c70d1
refs/heads/master
2020-05-24T04:53:39.941847
2019-05-16T18:20:25
2019-05-16T18:20:25
187,101,527
0
0
Apache-2.0
2019-05-16T21:14:50
2019-05-16T21:08:43
Java
UTF-8
Java
false
false
1,325
java
/* * Copyright 2010-2019 James Pether Sörling * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * $Id$ * $HeadURL$ */ package com.hack23.cia.service.impl.action.common; import com.hack23.cia.service.api.action.common.ServiceRequest; import com.hack23.cia.service.api.action.common.ServiceResponse; /** * The Interface BusinessService. * * @param <T> * the generic type * @param <V> * the value type */ public interface BusinessService<T extends ServiceRequest,V extends ServiceResponse> { /** * Gets the supported service. * * @return the supported service */ Class<? extends ServiceRequest> getSupportedService(); /** * Process service. * * @param serviceRequest * the service request * @return the v */ V processService(T serviceRequest); }
[ "pether.sorling@gmail.com" ]
pether.sorling@gmail.com
06a31b4290df0ae7a50c2de665755ff61a78287e
ec83dcad676429272fea325217a7209d43c7e1eb
/src/main/java/com/vasit/gateway/GatewayApp.java
e0231b55ec147bfb795ae440713953ff206743f4
[]
no_license
juntong/gateway
22102333c15c1098caae3a526d4af8c106c9712f
a126abdfa0a11ee3597c9d5aa2300887b9cc9bc6
refs/heads/main
2023-04-15T13:44:47.828373
2021-04-19T03:46:24
2021-04-19T03:46:24
359,320,652
0
0
null
null
null
null
UTF-8
Java
false
false
4,425
java
package com.vasit.gateway; import com.vasit.gateway.config.ApplicationProperties; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.Arrays; import java.util.Collection; import java.util.Optional; import javax.annotation.PostConstruct; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.core.env.Environment; import tech.jhipster.config.DefaultProfileUtil; import tech.jhipster.config.JHipsterConstants; @SpringBootApplication @EnableConfigurationProperties({ ApplicationProperties.class }) public class GatewayApp { private static final Logger log = LoggerFactory.getLogger(GatewayApp.class); private final Environment env; public GatewayApp(Environment env) { this.env = env; } /** * Initializes gateway. * <p> * Spring profiles can be configured with a program argument --spring.profiles.active=your-active-profile * <p> * You can find more information on how profiles work with JHipster on <a href="https://www.jhipster.tech/profiles/">https://www.jhipster.tech/profiles/</a>. */ @PostConstruct public void initApplication() { Collection<String> activeProfiles = Arrays.asList(env.getActiveProfiles()); if ( activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_PRODUCTION) ) { log.error( "You have misconfigured your application! It should not run " + "with both the 'dev' and 'prod' profiles at the same time." ); } if ( activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_CLOUD) ) { log.error( "You have misconfigured your application! It should not " + "run with both the 'dev' and 'cloud' profiles at the same time." ); } } /** * Main method, used to run the application. * * @param args the command line arguments. */ public static void main(String[] args) { SpringApplication app = new SpringApplication(GatewayApp.class); DefaultProfileUtil.addDefaultProfile(app); Environment env = app.run(args).getEnvironment(); logApplicationStartup(env); } private static void logApplicationStartup(Environment env) { String protocol = Optional.ofNullable(env.getProperty("server.ssl.key-store")).map(key -> "https").orElse("http"); String serverPort = env.getProperty("server.port"); String contextPath = Optional .ofNullable(env.getProperty("server.servlet.context-path")) .filter(StringUtils::isNotBlank) .orElse("/"); String hostAddress = "localhost"; try { hostAddress = InetAddress.getLocalHost().getHostAddress(); } catch (UnknownHostException e) { log.warn("The host name could not be determined, using `localhost` as fallback"); } log.info( "\n----------------------------------------------------------\n\t" + "Application '{}' is running! Access URLs:\n\t" + "Local: \t\t{}://localhost:{}{}\n\t" + "External: \t{}://{}:{}{}\n\t" + "Profile(s): \t{}\n----------------------------------------------------------", env.getProperty("spring.application.name"), protocol, serverPort, contextPath, protocol, hostAddress, serverPort, contextPath, env.getActiveProfiles() ); String configServerStatus = env.getProperty("configserver.status"); if (configServerStatus == null) { configServerStatus = "Not found or not setup for this application"; } log.info( "\n----------------------------------------------------------\n\t" + "Config Server: \t{}\n----------------------------------------------------------", configServerStatus ); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
dcf24ab2022f2cda370d64fc81b0c866f19999c7
0629ce5b178cc5e912b1714fd6738212e08f74b3
/mobile/src/main/java/com/jkrm/fupin/api/RequestParamInterceptor.java
da8b806d2b2cf0a50a0fe2a0930dd4aa8597758c
[]
no_license
suntinghui/FupinAll
6466de944dba26aad9044bd340270e1af9de375a
a4c35ca5687c6443f9ad12ab3154d51d5d5e2b79
refs/heads/master
2020-04-12T02:11:44.658192
2019-03-07T08:11:25
2019-03-07T08:11:25
162,241,280
0
0
null
null
null
null
UTF-8
Java
false
false
1,746
java
package com.jkrm.fupin.api; import android.util.Log; import com.jkrm.fupin.base.MyApp; import com.jkrm.fupin.constants.MyConstants; import com.jkrm.fupin.util.APPUtils; import com.jkrm.fupin.util.SharePreferencesUtil; import java.io.IOException; import okhttp3.HttpUrl; import okhttp3.Interceptor; import okhttp3.Request; import okhttp3.Response; /** * 请求信息拦截 */ public class RequestParamInterceptor implements Interceptor { private static final String TAG = "RequestParamInterceptor"; @Override public Response intercept(Chain chain) throws IOException { Log.d("RequestParamInterceptor", "RequestParamInterceptor_" + System.currentTimeMillis()); Request oldRequest = chain.request(); // 添加新的参数 HttpUrl.Builder authorizedUrlBuilder = oldRequest.url() .newBuilder() .scheme(oldRequest.url().scheme()) .host(oldRequest.url().host()); String token = SharePreferencesUtil.getString(MyConstants.SharedPrefrenceKey.USER_INFO_XML, MyConstants.SharedPrefrenceKey.USER_INFO_TOKEN, ""); String version = APPUtils.getAppVersionInfo(MyApp.getInstance(), APPUtils.TYPE_VERSION.TYPE_VERSION_NAME); // 新的请求 Request newRequest = oldRequest.newBuilder() .addHeader("Authorization", token) .addHeader("current_version", version) .addHeader("os_type","1") //1表示Android .method(oldRequest.method(), oldRequest.body()) .url(authorizedUrlBuilder.build()) .build(); Log.d(TAG, newRequest.toString()); //响应信息拦截 return chain.proceed(newRequest); } }
[ "tinghuisun@163.com" ]
tinghuisun@163.com
f4349df3de9def884433494fd980fa1b46d6c9eb
349cf43ac64952d40a277981642038d30a1fba01
/codemodel/src/main/java/org/hisrc/jscm/codemodel/statement/impl/StatementGeneratorImpl.java
c81390695335e1cc4acedc2331f7399ee4078997
[ "BSD-2-Clause" ]
permissive
highsource/javascript-codemodel
5ea9d67f1889c7fa8594ba4bfd6ec43ab757262d
7813dbbc74b606214a91df92742899ccd66c1717
refs/heads/master
2023-08-31T23:36:48.642935
2015-04-04T08:03:05
2015-04-04T08:03:05
26,062,088
7
2
null
null
null
null
UTF-8
Java
false
false
5,874
java
package org.hisrc.jscm.codemodel.statement.impl; import org.hisrc.jscm.codemodel.JSCodeModel; import org.hisrc.jscm.codemodel.expression.JSAssignmentExpression; import org.hisrc.jscm.codemodel.expression.JSExpression; import org.hisrc.jscm.codemodel.expression.JSLeftHandSideExpression; import org.hisrc.jscm.codemodel.lang.Validate; import org.hisrc.jscm.codemodel.statement.JSBlock; import org.hisrc.jscm.codemodel.statement.JSBreakStatement; import org.hisrc.jscm.codemodel.statement.JSContinueStatement; import org.hisrc.jscm.codemodel.statement.JSDebuggerStatement; import org.hisrc.jscm.codemodel.statement.JSDoWhileStatement; import org.hisrc.jscm.codemodel.statement.JSEmptyStatement; import org.hisrc.jscm.codemodel.statement.JSExpressionStatement; import org.hisrc.jscm.codemodel.statement.JSForInStatement; import org.hisrc.jscm.codemodel.statement.JSForStatement; import org.hisrc.jscm.codemodel.statement.JSForVarInStatement; import org.hisrc.jscm.codemodel.statement.JSForVarStatement; import org.hisrc.jscm.codemodel.statement.JSIfStatement; import org.hisrc.jscm.codemodel.statement.JSLabelledStatement; import org.hisrc.jscm.codemodel.statement.JSLabelledStatement.JSLabel; import org.hisrc.jscm.codemodel.statement.JSTryStatement.Try; import org.hisrc.jscm.codemodel.statement.JSReturnStatement; import org.hisrc.jscm.codemodel.statement.JSStatement; import org.hisrc.jscm.codemodel.statement.JSStatementGenerator; import org.hisrc.jscm.codemodel.statement.JSSwitchStatement; import org.hisrc.jscm.codemodel.statement.JSThrowStatement; import org.hisrc.jscm.codemodel.statement.JSTryStatement; import org.hisrc.jscm.codemodel.statement.JSVariableStatement; import org.hisrc.jscm.codemodel.statement.JSWhileStatement; import org.hisrc.jscm.codemodel.statement.JSWithStatement; public abstract class StatementGeneratorImpl implements JSStatementGenerator { private final JSCodeModel codeModel; public StatementGeneratorImpl(JSCodeModel codeModel) { Validate.notNull(codeModel); this.codeModel = codeModel; } public JSCodeModel getCodeModel() { return codeModel; } protected abstract <S extends JSStatement> S add(S statement); @Override public JSBlock block() { return add(new BlockImpl(getCodeModel())); } @Override public JSVariableStatement var(String name) { return add(new VariableStatementImpl(getCodeModel(), name)); } @Override public JSVariableStatement var(String name, JSAssignmentExpression expression) { return add(new VariableStatementImpl(getCodeModel(), name, expression)); } @Override public JSEmptyStatement empty() { return add(new EmptyStatementImpl(getCodeModel())); } @Override public JSExpressionStatement expression(JSExpression expression) { return add(new ExpressionStatementImpl(getCodeModel(), expression)); } @Override public JSIfStatement _if(JSExpression expression) { return add(new IfStatementImpl(getCodeModel(), expression)); } @Override public JSDoWhileStatement doWhile(JSExpression expression) { return add(new DoWhileStatementImpl(getCodeModel(), expression)); } @Override public JSWhileStatement _while(JSExpression expression) { return add(new WhileStatementImpl(getCodeModel(), expression)); } @Override public JSForStatement _for() { return add(new ForStatementImpl(getCodeModel())); } @Override public JSForStatement _for(JSExpression expression) { return add(new ForStatementImpl(getCodeModel(), expression)); } @Override public JSForInStatement forIn(JSLeftHandSideExpression expression, JSExpression _in) { return add(new ForInStatementImpl(getCodeModel(), expression, _in)); } @Override public JSForVarStatement forVar(String name) { return add(new ForVarStatementImpl(getCodeModel(), name)); } @Override public JSForVarStatement forVar(String name, JSAssignmentExpression expression) { return add(new ForVarStatementImpl(getCodeModel(), name, expression)); } @Override public JSForVarInStatement forVarIn(String name, JSExpression _in) { return add(new ForVarInStatementImpl(getCodeModel(), name, _in)); } @Override public JSContinueStatement _continue() { return add(new ContinueStatementImpl(getCodeModel())); } @Override public JSContinueStatement _continue(JSLabel label) { return add(new ContinueStatementImpl(getCodeModel(), label)); } @Override public JSBreakStatement _break() { return add(new BreakStatementImpl(getCodeModel())); } @Override public JSBreakStatement _break(JSLabel label) { return add(new BreakStatementImpl(getCodeModel(), label)); } @Override public JSReturnStatement _return() { return add(new ReturnStatementImpl(getCodeModel())); } @Override public JSReturnStatement _return(JSExpression expression) { return add(new ReturnStatementImpl(getCodeModel(), expression)); } @Override public JSWithStatement with(JSExpression expression) { return add(new WithStatementImpl(getCodeModel(), expression)); } @Override public JSLabelledStatement label(String name) { return add(new LabelledStatementImpl(getCodeModel(), name)); } @Override public JSSwitchStatement _switch(JSExpression expression) { return add(new SwitchStatementImpl(getCodeModel(), expression)); } @Override public JSThrowStatement _throw(JSExpression expression) { return add(new ThrowStatementImpl(getCodeModel(), expression)); } @Override public JSTryStatement tryCatch(String expression) { return add(new TryStatementImpl(getCodeModel(), expression, false)); } @Override public JSTryStatement tryFinally() { return add(new TryStatementImpl(getCodeModel(), null, true)); } @Override public JSTryStatement tryCatchFinally(String expression) { return add(new TryStatementImpl(getCodeModel(), expression, true)); } @Override public JSDebuggerStatement debugger() { return add(new DebuggerStatementImpl(getCodeModel())); } }
[ "aleksei.valikov@gmail.com" ]
aleksei.valikov@gmail.com
9f34c15c0a0ad5d9dceb6da8a08d79b2b56e3a2e
f72c5c691cb38114393ac5d06bc9d5e8194bdeb6
/Ajax/src/com/ht/servlet/postServlet.java
6c8666dca172755f881791aa71dd1fa5bebc1442
[]
no_license
ZedZhouZiBin/Javaweb
a3cb6a47c99b2f5fd6766b5579ad4f2e5c55cae8
0169feedc23522e27e7c4448a87846515b59c369
refs/heads/master
2021-09-09T13:03:36.237337
2018-03-16T11:49:54
2018-03-16T11:49:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,114
java
package com.ht.servlet; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @SuppressWarnings("serial") public class postServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doPost(request, response); } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { request.setCharacterEncoding("utf-8"); String studid=request.getParameter("studid"); String studname=request.getParameter("studname"); String sex=request.getParameter("sex"); String classname=request.getParameter("classname"); System.out.println("studid="+studid+",studname="+studname+",sex="+sex+",classname="+classname); response.setContentType("text/html;charset=utf-8"); PrintWriter out = response.getWriter(); out.println("�����ɹ�"); out.flush(); out.close(); } }
[ "1729340612@qq.com" ]
1729340612@qq.com
38161ea1a2fa2534fc725902f84d1adf1987347b
fa8d29ec1ad7898df59db9988feed99a5c178398
/org.mondo.generate.modular.project/src/Modularity/Unit.java
ef6c6dcdc68fb92181160a97a85cd2dccc0cbab4
[]
no_license
antoniogarmendia/EMF-Splitter
d40aa2ee1d70638c0637d0520946815b80a61e86
ceb33e26b964407b11f4ec80b7161bfec2f95d83
refs/heads/master
2021-04-06T12:23:28.791083
2018-05-17T17:08:40
2018-05-17T17:08:40
42,922,455
2
1
null
null
null
null
UTF-8
Java
false
false
1,309
java
/** */ package Modularity; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Unit</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * </p> * <ul> * <li>{@link Modularity.Unit#getExtension <em>Extension</em>}</li> * </ul> * * @see Modularity.ModularityPackage#getUnit() * @model * @generated */ public interface Unit extends Containee, IdentificableElement { /** * Returns the value of the '<em><b>Extension</b></em>' attribute. * The default value is <code>"figure"</code>. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Extension</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Extension</em>' attribute. * @see #setExtension(String) * @see Modularity.ModularityPackage#getUnit_Extension() * @model default="figure" required="true" * @generated */ String getExtension(); /** * Sets the value of the '{@link Modularity.Unit#getExtension <em>Extension</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Extension</em>' attribute. * @see #getExtension() * @generated */ void setExtension(String value); } // Unit
[ "antonio.agj@gmail.com" ]
antonio.agj@gmail.com
ad4160fb77e0aa9046813e853c2b7bd488556a26
f16f33505fc7849b431205a43a512d2f51e1436f
/google-cloud-billingbudgets/src/test/java/com/google/cloud/billing/budgets/v1beta1/BudgetServiceClientTest.java
f55eddd69c1e8402112a08bcd8aab36ec9f047d0
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
athakor/java-billingbudgets
94b733d7443eccb1c520879915f24a9d6136799e
0e19a80c574ac48c1ef95beb6b39d2ed46bef834
refs/heads/master
2020-12-03T04:41:11.958669
2020-02-04T20:26:09
2020-02-04T20:26:09
231,206,131
0
0
NOASSERTION
2020-01-01T11:12:18
2020-01-01T11:12:17
null
UTF-8
Java
false
false
2,199
java
/* * Copyright 2020 Google LLC * * 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 com.google.cloud.billing.budgets.v1beta1; import com.google.api.gax.core.NoCredentialsProvider; import com.google.api.gax.grpc.testing.LocalChannelProvider; import com.google.api.gax.grpc.testing.MockGrpcService; import com.google.api.gax.grpc.testing.MockServiceHelper; import java.io.IOException; import java.util.Arrays; import java.util.UUID; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; @javax.annotation.Generated("by GAPIC") public class BudgetServiceClientTest { private static MockBudgetService mockBudgetService; private static MockServiceHelper serviceHelper; private BudgetServiceClient client; private LocalChannelProvider channelProvider; @BeforeClass public static void startStaticServer() { mockBudgetService = new MockBudgetService(); serviceHelper = new MockServiceHelper( UUID.randomUUID().toString(), Arrays.<MockGrpcService>asList(mockBudgetService)); serviceHelper.start(); } @AfterClass public static void stopServer() { serviceHelper.stop(); } @Before public void setUp() throws IOException { serviceHelper.reset(); channelProvider = serviceHelper.createChannelProvider(); BudgetServiceSettings settings = BudgetServiceSettings.newBuilder() .setTransportChannelProvider(channelProvider) .setCredentialsProvider(NoCredentialsProvider.create()) .build(); client = BudgetServiceClient.create(settings); } @After public void tearDown() throws Exception { client.close(); } }
[ "chingor@google.com" ]
chingor@google.com
f0d6c56a109b8d96fb14473eb517b3e06ae2e696
1cf1c4e00c4b7b2972d8c0b32b02a17e363d31b9
/sources/com/google/android/gms/internal/ads/C1680to.java
5b46bf8b9b14820b438be15fb8f51a0ed0067c31
[]
no_license
rootmelo92118/analysis
4a66353c77397ea4c0800527afac85e06165fd48
a9cd8bb268f54c03630de8c6bdff86b0e068f216
refs/heads/main
2023-03-16T10:59:50.933761
2021-03-05T05:36:43
2021-03-05T05:36:43
344,705,815
0
0
null
null
null
null
UTF-8
Java
false
false
6,699
java
package com.google.android.gms.internal.ads; import android.content.Context; import android.support.annotation.Nullable; import android.text.TextUtils; import com.google.ads.mediation.AbstractAdViewAdapter; import com.google.android.gms.ads.internal.zzbv; import com.google.android.gms.ads.internal.zzc; import com.google.android.gms.ads.internal.zzv; import com.google.android.gms.common.internal.C0926p; import java.util.Arrays; import java.util.Collections; import java.util.List; import org.json.JSONException; import org.json.JSONObject; @C1598qn /* renamed from: com.google.android.gms.internal.ads.to */ public final class C1680to extends zzc implements C1710ur { /* renamed from: a */ private static C1680to f6560a; /* renamed from: b */ private boolean f6561b; /* renamed from: c */ private boolean f6562c; /* renamed from: d */ private final C1740vu f6563d; /* renamed from: e */ private final C1676tk f6564e = new C1676tk(this.zzbls, this.zzbma, this, this, this); /* renamed from: a */ public static C1680to m7968a() { return f6560a; } /* access modifiers changed from: protected */ public final boolean zza(zzwb zzwb, C1752wf wfVar, boolean z) { return false; } public C1680to(Context context, zzv zzv, zzwf zzwf, C1437ko koVar, zzbbi zzbbi) { super(context, zzwf, (String) null, koVar, zzbbi, zzv); f6560a = this; this.f6563d = new C1740vu(context, (String) null); } /* renamed from: a */ public final void mo12996a(zzavh zzavh) { C0926p.m1315b("loadAd must be called on the main UI thread."); if (TextUtils.isEmpty(zzavh.f7124b)) { C1772wz.m1630e("Invalid ad unit id. Aborting."); C1782xi.f6838a.post(new C1681tp(this)); return; } this.f6561b = false; this.zzbls.zzbsn = zzavh.f7124b; this.f6563d.mo13070a(zzavh.f7124b); super.zzb(zzavh.f7123a); } public final void zza(C1753wg wgVar, C1019ad adVar) { if (wgVar.f6728e != -2) { C1782xi.f6838a.post(new C1682tq(this, wgVar)); return; } this.zzbls.zzbsv = wgVar; if (wgVar.f6726c == null) { this.zzbls.zzbsv = m7969a(wgVar); } this.f6564e.mo12978c(); } @Nullable /* renamed from: a */ public final C1717uy mo12994a(String str) { return this.f6564e.mo12973a(str); } public final boolean zza(C1752wf wfVar, C1752wf wfVar2) { zzb(wfVar2, false); return C1676tk.m7931a(wfVar, wfVar2); } public final void pause() { this.f6564e.mo12979d(); } public final void resume() { this.f6564e.mo12980e(); } public final void destroy() { this.f6564e.mo12981f(); super.destroy(); } public final void setImmersiveMode(boolean z) { C0926p.m1315b("setImmersiveMode must be called on the main UI thread."); this.f6562c = z; } /* renamed from: b */ public final void mo12997b() { C0926p.m1315b("showAd must be called on the main UI thread."); if (!mo12998c()) { C1772wz.m1630e("The reward video has not loaded."); } else { this.f6564e.mo12976a(this.f6562c); } } /* renamed from: c */ public final boolean mo12998c() { C0926p.m1315b("isLoaded must be called on the main UI thread."); return this.zzbls.zzbsr == null && this.zzbls.zzbss == null && this.zzbls.zzbsu != null; } public final void onRewardedVideoAdOpened() { if (zzbv.zzmf().mo13075a(this.zzbls.zzsp)) { this.f6563d.mo13071a(true); } zza(this.zzbls.zzbsu, false); zzik(); } public final void onRewardedVideoStarted() { this.f6564e.mo12982g(); zzio(); } public final void onRewardedVideoCompleted() { this.f6564e.mo12983h(); zzip(); } public final void onRewardedVideoAdClosed() { if (zzbv.zzmf().mo13075a(this.zzbls.zzsp)) { this.f6563d.mo13071a(false); } zzii(); } /* access modifiers changed from: protected */ public final void zzii() { this.zzbls.zzbsu = null; super.zzii(); } public final void zzc(@Nullable zzawd zzawd) { zzawd a = this.f6564e.mo12974a(zzawd); if (zzbv.zzmf().mo13075a(this.zzbls.zzsp) && a != null) { zzbv.zzmf().mo13074a(this.zzbls.zzsp, zzbv.zzmf().mo13082e(this.zzbls.zzsp), this.zzbls.zzbsn, a.f7125a, a.f7126b); } zza(a); } public final void zzkh() { onAdClicked(); } public final void onRewardedVideoAdLeftApplication() { zzij(); } /* renamed from: a */ public final void mo12995a(Context context) { this.f6564e.mo12975a(context); } /* renamed from: a */ private static C1753wg m7969a(C1753wg wgVar) { C1753wg wgVar2 = wgVar; C1772wz.m8287a("Creating mediation ad response for non-mediated rewarded ad."); try { JSONObject a = C1659su.m7893a(wgVar2.f6725b); a.remove("impression_urls"); JSONObject jSONObject = new JSONObject(); jSONObject.put(AbstractAdViewAdapter.AD_UNIT_ID_PARAMETER, wgVar2.f6724a.f7034e); String jSONObject2 = jSONObject.toString(); C1420jy jyVar = new C1420jy(Arrays.asList(new C1419jx[]{new C1419jx(a.toString(), (String) null, Arrays.asList(new String[]{"com.google.ads.mediation.admob.AdMobAdapter"}), (String) null, (String) null, Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), jSONObject2, (String) null, Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), (String) null, (String) null, (String) null, (List<String>) null, (String) null, Collections.emptyList(), (String) null, -1)}), ((Long) bre.m6321e().mo12778a(C1557p.f5974bc)).longValue(), Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), false, "", -1, 0, 1, (String) null, 0, -1, -1, false); return new C1753wg(wgVar2.f6724a, wgVar2.f6725b, jyVar, wgVar2.f6727d, wgVar2.f6728e, wgVar2.f6729f, wgVar2.f6730g, wgVar2.f6731h, wgVar2.f6732i, (Boolean) null); } catch (JSONException e) { C1772wz.m1625b("Unable to generate ad state for non-mediated rewarded video.", e); return new C1753wg(wgVar2.f6724a, wgVar2.f6725b, (C1420jy) null, wgVar2.f6727d, 0, wgVar2.f6729f, wgVar2.f6730g, wgVar2.f6731h, wgVar2.f6732i, (Boolean) null); } } }
[ "rootmelo92118@gmail.com" ]
rootmelo92118@gmail.com
fc470a6fef7cf50e7b301625dcec513b89ef6a21
6dbae30c806f661bcdcbc5f5f6a366ad702b1eea
/Corpus/eclipse.pde.ui/3737.java
f71e41f27dca06989ea94058f21e1bd4cf211a88
[ "MIT" ]
permissive
SurfGitHub/BLIZZARD-Replication-Package-ESEC-FSE2018
d3fd21745dfddb2979e8ac262588cfdfe471899f
0f8f4affd0ce1ecaa8ff8f487426f8edd6ad02c0
refs/heads/master
2020-03-31T15:52:01.005505
2018-10-01T23:38:50
2018-10-01T23:38:50
152,354,327
1
0
MIT
2018-10-10T02:57:02
2018-10-10T02:57:02
null
UTF-8
Java
false
false
4,420
java
/******************************************************************************* * Copyright (c) 2005, 2015 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation * Benjamin Cabe <benjamin.cabe@anyware-tech.com> - bug 97149, bug 268363 *******************************************************************************/ package org.eclipse.pde.internal.ui.editor.product; import java.io.*; import java.util.ArrayList; import org.eclipse.core.filesystem.EFS; import org.eclipse.core.filesystem.IFileStore; import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.jface.text.IDocument; import org.eclipse.pde.core.*; import org.eclipse.pde.internal.core.AbstractModel; import org.eclipse.pde.internal.core.iproduct.IProductModel; import org.eclipse.pde.internal.core.product.ProductModel; import org.eclipse.pde.internal.core.product.WorkspaceProductModel; import org.eclipse.pde.internal.ui.PDEPlugin; import org.eclipse.pde.internal.ui.editor.PDEFormEditor; import org.eclipse.pde.internal.ui.editor.context.UTF8InputContext; import org.eclipse.text.edits.TextEdit; import org.eclipse.ui.*; public class ProductInputContext extends UTF8InputContext { //$NON-NLS-1$ public static final String CONTEXT_ID = "product-context"; public ProductInputContext(PDEFormEditor editor, IEditorInput input, boolean primary) { super(editor, input, primary); create(); } @Override public String getId() { return CONTEXT_ID; } @Override protected IBaseModel createModel(IEditorInput input) throws CoreException { IProductModel model = null; if (input instanceof IStorageEditorInput) { try { if (input instanceof IFileEditorInput) { IFile file = ((IFileEditorInput) input).getFile(); model = new WorkspaceProductModel(file, true); model.load(); } else if (input instanceof IStorageEditorInput) { InputStream is = new BufferedInputStream(((IStorageEditorInput) input).getStorage().getContents()); model = new ProductModel(); model.load(is, false); } } catch (CoreException e) { PDEPlugin.logException(e); return null; } } else if (input instanceof IURIEditorInput) { IFileStore store = EFS.getStore(((IURIEditorInput) input).getURI()); InputStream is = store.openInputStream(EFS.CACHE, new NullProgressMonitor()); model = new ProductModel(); model.load(is, false); } return model; } @Override protected void addTextEditOperation(ArrayList<TextEdit> ops, IModelChangedEvent event) { } @Override protected void flushModel(IDocument doc) { if (!(getModel() instanceof IEditable)) return; IEditable editableModel = (IEditable) getModel(); if (editableModel.isDirty() == false) return; try { StringWriter swriter = new StringWriter(); PrintWriter writer = new PrintWriter(swriter); editableModel.save(writer); writer.flush(); swriter.close(); String content = swriter.toString(); content = AbstractModel.fixLineDelimiter(content, (IFile) ((IModel) getModel()).getUnderlyingResource()); doc.set(content); } catch (IOException e) { PDEPlugin.logException(e); } } @Override public void doRevert() { fEditOperations.clear(); IProductModel model = (IProductModel) getModel(); try { InputStream is = ((IFile) model.getUnderlyingResource()).getContents(); model.reload(is, true); getEditor().doRevert(); } catch (CoreException e) { } } @Override protected String getPartitionName() { //$NON-NLS-1$ return "___prod_partition"; } }
[ "masudcseku@gmail.com" ]
masudcseku@gmail.com
4695da631de2000da4f6b87d725ebd291c19cb8b
7b82d70ba5fef677d83879dfeab859d17f4809aa
/tmp/sys/src/main/java/com/jun/plugin/utils2/bloomFilter/bitMap/LongMap.java
03d4864b7021906983a9b68efc20d3e9b4b4ccb9
[]
no_license
apollowesley/jun_test
fb962a28b6384c4097c7a8087a53878188db2ebc
c7a4600c3f0e1b045280eaf3464b64e908d2f0a2
refs/heads/main
2022-12-30T20:47:36.637165
2020-10-13T18:10:46
2020-10-13T18:10:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
943
java
package com.jun.plugin.utils2.bloomFilter.bitMap; /** * 过滤器BitMap在64位机器上.这个类能发生更好的效果.一般机器不建议使用 * @author loolly * */ public class LongMap implements BitMap { private static final long MAX = Long.MAX_VALUE; public LongMap() { longs = new long[93750000]; } public LongMap(int size) { longs = new long[size]; } private long[] longs = null; public void add(long i) { int r = (int) (i / BitMap.MACHINE64); int c = (int) (i % BitMap.MACHINE64); longs[r] = (int) (longs[r] | (1 << c)); } public boolean contains(long i) { int r = (int) (i / BitMap.MACHINE64); int c = (int) (i % BitMap.MACHINE64); if (((int) ((longs[r] >>> c)) & 1) == 1) { return true; } return false; } public void remove(long i) { int r = (int) (i / BitMap.MACHINE64); int c = (int) (i % BitMap.MACHINE64); longs[r] = (int) (longs[r] & (((1 << (c + 1)) - 1) ^ MAX)); } }
[ "wujun728@hotmail.com" ]
wujun728@hotmail.com
158c3d3529861e6a130c5c1a915825a8512284f9
0161ca99a5019b2f25e6a7960150ec243146c859
/app/src/main/java/com/auribises/gw2019android1/MainActivity.java
37892c2e18d8d7e98cffe8036ef362f7c90248cf
[]
no_license
ishantk/GW2019Android1
eff88c8bc81e4688dcac1fd71ea030e3d56bb6ec
4797eacf779850552df54c5a2bea5b80c3b5ffe2
refs/heads/master
2020-06-14T14:00:24.823673
2019-07-31T12:52:52
2019-07-31T12:52:52
195,021,454
5
5
null
null
null
null
UTF-8
Java
false
false
4,507
java
package com.auribises.gw2019android1; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.Toast; // MainActivity IS AN AppCompatActivity | Inheritance public class MainActivity extends AppCompatActivity { public final String TAG = "MainActivity"; // When object of activity is created by Android System @Override protected void onCreate(Bundle savedInstanceState) { // Overriding super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // Linking the Layout of Activity Log.i(TAG, "onCreate"); } // When object of activity is pushed into stack // Stack : BackStack or Task @Override protected void onStart() { super.onStart(); Log.i(TAG, "onStart"); } // When object of activity is visible as a rectangular screen @Override protected void onResume() { super.onResume(); Log.i(TAG, "onResume"); } // When your Activity is partially covered by some other UI Element or Activity @Override protected void onPause() { super.onPause(); Log.i(TAG, "onPause"); } // When user will press back button or programmer executes finish() function @Override protected void onDestroy() { super.onDestroy(); Log.i(TAG, "onDestroy"); } // When Your Activity is full covered by some other UI Element ot Activity @Override protected void onStop() { super.onStop(); Log.i(TAG, "onStop"); } public void clickHandler(View view){ Toast.makeText(this, "Button Clicked", Toast.LENGTH_SHORT).show(); // To navigate from 1 activity to other activity // Explicit Way // source to destination // Intent intent = new Intent(MainActivity.this, HomeActivity.class); // Implicit Way Intent intent = new Intent("com.auribises.gw2019android1.homeactivity"); startActivity(intent); } // Assignment : Create 5 Activities and on different menu clicks open different activities // Helps to Create Menu @Override public boolean onCreateOptionsMenu(Menu menu) { /* // Explicit Menu Creation // groupid, itemid, order, title menu.add(1, 101, 1, "All Music"); // We can make a menu item as an action item menu.add(1, 222, 1, "Artists").setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM); menu.add(1, 301, 1, "PlayLists"); menu.add(2, 401, 1, "Favourites"); menu.add(2, 501, 1, "Recently Played"); */ // Implicit Menu Creation getMenuInflater().inflate(R.menu.menu_main_activity, menu); return super.onCreateOptionsMenu(menu); } // Helps to know which menu we selected @Override public boolean onOptionsItemSelected(@NonNull MenuItem item) { int id = item.getItemId(); /* if(id == 101){ Toast.makeText(this, "You Selected All Music", Toast.LENGTH_SHORT).show(); }else if(id == 201){ Toast.makeText(this, "You Selected Artists", Toast.LENGTH_SHORT).show(); }*/ /* switch (id){ case 101: Toast.makeText(this, "You Selected All Music", Toast.LENGTH_SHORT).show(); break; case 222: Toast.makeText(this, "You Selected Artists", Toast.LENGTH_SHORT).show(); break; } */ switch (id) { case R.id.admin: Toast.makeText(this, "You Selected Admin", Toast.LENGTH_SHORT).show(); Intent intent = new Intent(MainActivity.this, HomeActivity.class); startActivity(intent); break; case R.id.hr: Toast.makeText(this, "You Selected HR", Toast.LENGTH_SHORT).show(); break; } return super.onOptionsItemSelected(item); } } // Activity Life Cycle :) // Sequence : Create > Start > Resume > Pause > Stop > Destroy // USE CASES: // User clicks on App Icon and launches A1 // A1: Cr St Re // From A1 User launches another A2 // A1: Pa St // A2: Cr St Re // In A2 user presses the back key // A1: St Re // A2: Pa St De
[ "er.ishant@gmail.com" ]
er.ishant@gmail.com
4e11e2e9780b74adab26a60b1b20efe7c97a3be2
85950018cc330c88de99283d3e2be52482e4bb24
/org.metaborg.spoofax.core/src/main/java/org/metaborg/spoofax/core/language/LanguageFileScanSelector.java
ed05785bb1dc3e38fbd3f608d4e60ee1acbc6f17
[ "LicenseRef-scancode-other-copyleft", "BSD-3-Clause", "GPL-1.0-or-later", "LGPL-2.0-or-later", "MIT", "AGPL-3.0-or-later", "Apache-2.0" ]
permissive
metaborg/spoofax
cb1b254ad7c79cfb5018da0affcf31dfa4b0fe26
eec0bb1589b010ccb5235278a23f0705e90db174
refs/heads/master
2023-07-18T10:30:50.169181
2023-07-10T12:25:06
2023-07-10T12:25:06
9,931,510
108
21
Apache-2.0
2023-01-17T12:14:26
2013-05-08T08:07:40
Java
UTF-8
Java
false
false
1,229
java
package org.metaborg.spoofax.core.language; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSelectInfo; import org.apache.commons.vfs2.FileSelector; import org.apache.commons.vfs2.FileSystemException; import org.metaborg.core.MetaborgConstants; public class LanguageFileScanSelector implements FileSelector { @Override public boolean includeFile(FileSelectInfo fileInfo) throws Exception { final FileObject file = fileInfo.getFile(); if(isLanguageSpecDirectory(file)) { return true; } return file.getName().getExtension().equals("spoofax-language"); } @Override public boolean traverseDescendents(FileSelectInfo fileInfo) throws Exception { final FileObject file = fileInfo.getFile(); // Do not traverse directory if the directory is a language specification with a component config file. This // directory will be selected instead. return !isLanguageSpecDirectory(file); } private boolean isLanguageSpecDirectory(FileObject file) throws FileSystemException { final FileObject configFile = file.resolveFile(MetaborgConstants.LOC_COMPONENT_CONFIG); return configFile.exists(); } }
[ "gabrielkonat@gmail.com" ]
gabrielkonat@gmail.com
7d6be8c853a17a2d0e96c97f7ed7ba53fa17647a
c1e32a67fb211785992a788c65ca88e6d6f2af93
/src/main/java/com/fz/serviceimpl/OrderItemsServiceImpl.java
fd49d58b24f3085a21ff10449ece41b6e2f5e929
[]
no_license
NDCFL/oneCard
92733f8d6266cb8cb563fc2aca4496e51010a589
37e8b463199365e231ee4bf09a7a3eca5e0f9b55
refs/heads/master
2021-08-23T01:53:32.694665
2017-12-02T09:27:31
2017-12-02T09:27:31
110,659,846
0
0
null
null
null
null
UTF-8
Java
false
false
1,310
java
package com.fz.serviceimpl; import com.fz.dao.OrderItemsDAO; import com.fz.service.OrderItemsService; import com.fz.vo.OrderItemsVo; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.List; @Service public class OrderItemsServiceImpl implements OrderItemsService { @Resource private OrderItemsDAO orderItemsDAO; @Override public OrderItemsVo queryById(Long id) { return orderItemsDAO.queryById(id); } @Override public void update(OrderItemsVo orderItemsVo) { orderItemsDAO.update(orderItemsVo); } @Override public void add(OrderItemsVo orderItemsVo) { orderItemsDAO.add(orderItemsVo); } @Override public void delete(Long id) { orderItemsDAO.delete(id); } @Override public List<OrderItemsVo> pagelist() { return orderItemsDAO.pagelist(); } @Override public int count(String userCard) { return orderItemsDAO.count(userCard); } @Override public List<OrderItemsVo> findList(String userCard) { return orderItemsDAO.findList(userCard); } @Override public List<OrderItemsVo> listPage(int startPage, int pageSize, String cardId) { return orderItemsDAO.listPage(startPage,pageSize,cardId); } }
[ "275300091@qq.com" ]
275300091@qq.com
bb0743b10ce0455bea727c4bcef809f468c58edc
963599f6f1f376ba94cbb504e8b324bcce5de7a3
/sources/p046io/reactivex/internal/schedulers/DisposeOnCancel.java
21fd2d150a7357b08dbf215f3ea4dc3a1613f893
[]
no_license
NikiHard/cuddly-pancake
563718cb73fdc4b7b12c6233d9bf44f381dd6759
3a5aa80d25d12da08fd621dc3a15fbd536d0b3d4
refs/heads/main
2023-04-09T06:58:04.403056
2021-04-20T00:45:08
2021-04-20T00:45:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,002
java
package p046io.reactivex.internal.schedulers; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import p046io.reactivex.disposables.Disposable; /* renamed from: io.reactivex.internal.schedulers.DisposeOnCancel */ final class DisposeOnCancel implements Future<Object> { /* renamed from: d */ final Disposable f6121d; public Object get() throws InterruptedException, ExecutionException { return null; } public Object get(long j, TimeUnit timeUnit) throws InterruptedException, ExecutionException, TimeoutException { return null; } public boolean isCancelled() { return false; } public boolean isDone() { return false; } DisposeOnCancel(Disposable disposable) { this.f6121d = disposable; } public boolean cancel(boolean z) { this.f6121d.dispose(); return false; } }
[ "a.amirovv@mail.ru" ]
a.amirovv@mail.ru
23623aa2c480fb990028fd7407dfb2d467070973
eaae18539fef63104faf926e88f4e39721cc313b
/src/Danylova/Practice1.1/Problem3nPlus1.java
d3d434986495c6095f3079f1e05e9210358a9c64
[]
no_license
anneteka/OKAlabs
e83977d9f58f93ce3c985584e45330b7d7d06b2b
44c1215cf90117ea15e8db0035adcab895a0a970
refs/heads/master
2020-04-09T15:10:40.869208
2018-12-20T22:05:53
2018-12-20T22:05:53
160,418,193
2
8
null
null
null
null
UTF-8
Java
false
false
836
java
import java.io.PrintWriter; import java.util.Scanner; public class Index { public static void main(String a[]) { Scanner in = new Scanner(System.in); PrintWriter out = new PrintWriter(System.out, true); while (in.hasNextInt()) { int n1 = in.nextInt(); int n2 = in.nextInt(); int maxNumber, number; maxNumber = 1; for (long i = n1; i <= n2; i++) { long i1; i1 = i; number = 1; while (i1 != 1) { if (i1 % 2 == 1) i1 = 3 * i1 + 1; else i1 /= 2; number++; } if (number > maxNumber) maxNumber = number; } out.printf("%d %d %d\n", n1, n2, maxNumber); } } }
[ "a.karlysheva@ukma.edu.ua" ]
a.karlysheva@ukma.edu.ua
298744ef15075583ec6e90829a943d993e89bf84
e0d52bbf5d1b657afb07795bf456e8e680302980
/Educ/CourseQuiz/src/course/wicket/quiz/item/EntityUpdateTablePage.java
39921645cb9cdece26e7a7803bede8dfea518cf4
[]
no_license
youp911/modelibra
acc391da16ab6b14616cd7bda094506a05414b0f
00387bd9f1f82df3b7d844650e5a57d2060a2ec7
refs/heads/master
2021-01-25T09:59:19.388394
2011-11-24T21:46:26
2011-11-24T21:46:26
42,008,889
0
0
null
null
null
null
UTF-8
Java
false
false
1,746
java
/* * Modelibra * * 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 course.wicket.quiz.item; import org.modelibra.wicket.view.View; import org.modelibra.wicket.view.ViewModel; import course.quiz.item.Items; /** * Entity update table page. * * @author Dzenan Ridjanovic * @version 2007-12-03 */ public class EntityUpdateTablePage extends org.modelibra.wicket.concept.EntityUpdateTablePage { private static final long serialVersionUID = 1176743181623L; /** * Constructs an entity update table page. * * @param viewModel * view model * @param view * view */ public EntityUpdateTablePage(final ViewModel viewModel, final View view) { super(getNewViewModel(viewModel), view); } /** * Gets a new view model. * * @param viewModel * view model * @return new view model */ private static ViewModel getNewViewModel(final ViewModel viewModel) { ViewModel newViewModel = new ViewModel(); newViewModel.copyPropertiesFrom(viewModel); Items items = (Items) viewModel.getEntities(); // items = items.getItemsOrderedBy????(true); newViewModel.setEntities(items); return newViewModel; } }
[ "dzenanr@c25eb2fc-9753-11de-83f8-39e71e4dc75d" ]
dzenanr@c25eb2fc-9753-11de-83f8-39e71e4dc75d
47a4e0f4f0ca92a69fe4b7edeb225d9d3ac5957e
d381092dd5f26df756dc9d0a2474b253b9e97bfb
/impe3/impe3-palette/src/main/java/com/isotrol/impe3/palette/html/StyleConfig.java
cddf6c6701519eaab497c42e4497209d3b0785d8
[]
no_license
isotrol-portal3/portal3
2d21cbe07a6f874fff65e85108dcfb0d56651aab
7bd4dede31efbaf659dd5aec72b193763bfc85fe
refs/heads/master
2016-09-15T13:32:35.878605
2016-03-07T09:50:45
2016-03-07T09:50:45
39,732,690
0
1
null
null
null
null
UTF-8
Java
false
false
1,247
java
/** * This file is part of Port@l * Port@l 3.0 - Portal Engine and Management System * Copyright (C) 2010 Isotrol, SA. http://www.isotrol.com * * Port@l 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. * * Port@l 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 Port@l. If not, see <http://www.gnu.org/licenses/>. */ package com.isotrol.impe3.palette.html; import com.isotrol.impe3.api.Configuration; import com.isotrol.impe3.api.Optional; import com.isotrol.impe3.api.metadata.Bundle; import com.isotrol.impe3.api.metadata.Name; /** * Style component Configuration. * @author Andres Rodriguez */ @Bundle public interface StyleConfig extends Configuration { /** Class attribute. */ @Name("classAtt") @Optional String classAtt(); }
[ "isotrol-portal@portal.isotrol.com" ]
isotrol-portal@portal.isotrol.com
9f49466380b26eaae115a3639fd5fc5d53c6973c
8f70fe0e87e308fe3dc8cfe9a515a315ed131d18
/src/test/java/com/sugarcrm/test/calendar/Calendar_20410.java
ef6459672a0f043a16a66d153f16000095b9c4b3
[]
no_license
mustaeenbasit/LKW-Walter_Automation
76fd02c34c766bc34a5c300e3f5943664c70d67b
a97f4feca8e51c21f3cef1949573a8e4909e7143
refs/heads/master
2020-04-09T17:54:32.252374
2018-12-05T09:49:29
2018-12-05T09:49:29
160,495,697
0
0
null
null
null
null
UTF-8
Java
false
false
4,758
java
package com.sugarcrm.test.calendar; import java.text.SimpleDateFormat; import java.util.Calendar; import org.junit.Assert; import org.junit.Test; import com.sugarcrm.candybean.datasource.FieldSet; import com.sugarcrm.sugar.VoodooControl; import com.sugarcrm.sugar.VoodooUtils; import com.sugarcrm.test.SugarTest; /** * @author Shagun Kaushik <skaushik@sugarcrm.com> */ public class Calendar_20410 extends SugarTest { String dayOfMonth, monthString, monthStringComplete, yearString, weekString; FieldSet customData = new FieldSet(); public void setup() throws Exception { customData = testData.get(testName).get(0); // Getting today's date Calendar cal = Calendar.getInstance(); SimpleDateFormat monthFormat = new SimpleDateFormat("MMM"); SimpleDateFormat monthFormatComplete = new SimpleDateFormat("MMMMM"); SimpleDateFormat yearFormat = new SimpleDateFormat("yyyy"); // Creating a future date dayOfMonth = String.valueOf(cal.get(Calendar.DAY_OF_MONTH)); cal.add(Calendar.MONTH, 1); cal.add(Calendar.YEAR, 1); cal.set(Calendar.DAY_OF_MONTH, 10); monthString = String.valueOf(monthFormat.format(cal.getTime())); monthStringComplete = String.valueOf(monthFormatComplete.format(cal.getTime())); yearString = String.valueOf(yearFormat.format(cal.getTime())); // Getting the first and the last days of the week of the future date Calendar first = (Calendar) cal.clone(); first.add(Calendar.DAY_OF_WEEK, first.getFirstDayOfWeek() - first.get(Calendar.DAY_OF_WEEK)); // and add six days to the first date to get last date Calendar last = (Calendar) first.clone(); last.add(Calendar.DAY_OF_YEAR, 6); // Getting the weekString in the required format i.e. "2015 August 2 - 2015 August 8" SimpleDateFormat df = new SimpleDateFormat("MMMMM d yyyy"); weekString = df.format(first.getTime()) + " - " + df.format(last.getTime()); sugar().login(); } /** * Verify the Calendars Goto Date - Shared view. * @throws Exception */ @Test public void Calendar_20410_execute() throws Exception { VoodooUtils.voodoo.log.info("Running " + testName + "..."); sugar().navbar.navToModule(sugar().calendar.moduleNamePlural); // TODO: VOOD-863: Need Library support for Calendar module VoodooControl sharedButton = new VoodooControl("button", "id", "shared-tab"); VoodooControl gotoDateButton = new VoodooControl("button", "id", "goto_date_trigger"); VoodooControl gotoDateContainer = new VoodooControl("div", "id", "container_goto_date_trigger"); VoodooControl todaySelectedDate = new VoodooControl("a", "css", "#goto_date_trigger_div td.today.selectable a"); VoodooControl calMonthYearLink = new VoodooControl("a", "class", "calnav"); VoodooControl monthHeaderOnPopUp = new VoodooControl("label", "css", "[for='goto_date_trigger_div_nav_month']"); VoodooControl monthDropDown = new VoodooControl("select", "id", "goto_date_trigger_div_nav_month"); VoodooControl yearField = new VoodooControl("input", "id", "goto_date_trigger_div_nav_year"); VoodooControl okButton = new VoodooControl("button", "id", "goto_date_trigger_div_nav_submit"); // Taking 10 as the default futureDate for any month VoodooControl futureDate = new VoodooControl("a", "css", "#goto_date_trigger_div_t .d10 a"); VoodooControl weekPageHeader = new VoodooControl("h3", "css", ".monthHeader div:nth-child(2) h3"); // Click on the "Shared" button and the "Goto Date" button. VoodooUtils.focusFrame("bwc-frame"); sharedButton.click(); gotoDateButton.click(); // Verify that a small calendar pop-up is displayed and the highlighted day is the current date. gotoDateContainer.assertVisible(true); todaySelectedDate.assertEquals(dayOfMonth, true); // Clicking the "Month Year" hyperlink on "Select Date" Calendar calMonthYearLink.click(); // Verifying that a pop-up that allows you to enter a month and year appears monthHeaderOnPopUp.assertEquals(customData.get("calendarText"), true); // Enter a Month and Year then click OK. monthDropDown.set(monthString); yearField.set(yearString); okButton.click(); // Verify that the "Select Date" calendar is updated with the selected month and year. VoodooUtils.waitForReady(); calMonthYearLink.assertContains(monthStringComplete + " " + yearString, true); // Clicking on a day to add a calendar entry futureDate.click(); VoodooUtils.waitForReady(); // Verify that the Calendar is still in "Shared" view mode Assert.assertEquals(sharedButton.getAttribute("value"), customData.get("value")); // Verify that the Calendar displays the week you have selected. weekPageHeader.assertEquals(weekString, true); VoodooUtils.voodoo.log.info(testName + " complete."); } public void cleanup() throws Exception {} }
[ "mustaeen.basit@ROLUSTECH.NET" ]
mustaeen.basit@ROLUSTECH.NET
b267a560d279c4d183ae7f15910346985be708ea
ef5110370485734e62d231f7b69943aa10cab3a2
/src/rest/ReservaService.java
3e5bc5cd14dde65ccba76d6f1d93ed94c0899b96
[]
no_license
mateodevia/It3_C-09_m.devia_f.velasquez
fd9bd8fd97bcd2ecde6ebcb8ec0c0298c5332ff6
f7f3848545216a0410f7bee63d7672ba1bf379bb
refs/heads/master
2020-03-14T09:12:20.999488
2018-05-21T02:45:27
2018-05-21T02:45:27
131,540,461
0
0
null
null
null
null
UTF-8
Java
false
false
4,131
java
package rest; import javax.servlet.ServletContext; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; import javax.ws.rs.GET; import javax.ws.rs.POST; import javax.ws.rs.PUT; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import exceptions.BusinessLogicException; import tm.AlohAndesTransactionManager; import vos.Reserva; @Path("reservas") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) public class ReservaService { /** * Atributo que usa la anotacion @Context para tener el ServletContext de la * conexion actual. */ @Context private ServletContext context; // ---------------------------------------------------------------------------------------------------------------------------------- // METODOS DE INICIALIZACION // ---------------------------------------------------------------------------------------------------------------------------------- /** * Metodo que retorna el path de la carpeta WEB-INF/ConnectionData en el deploy * actual dentro del servidor. * * @return path de la carpeta WEB-INF/ConnectionData en el deploy actual. */ private String getPath() { return context.getRealPath("WEB-INF/ConnectionData"); } private String doErrorMessage(Exception e) { return "{ \"ERROR\": \"" + e.getMessage() + "\"}"; } // ---------------------------- // SERVICIOS // --------------------------- @POST public Response postReserva(Reserva reserva, @QueryParam("token") Long token) { AlohAndesTransactionManager tm = new AlohAndesTransactionManager(getPath()); corregirDesfase(reserva); try { tm.registrarUnaReserva(reserva, token); return Response.status(200).entity(reserva).build(); } catch(BusinessLogicException e) { return Response.status(400).entity(doErrorMessage(e)).build(); } catch(Exception e) { return Response.status(500).entity(doErrorMessage(e)).build(); } } @PUT public Response deleteReserva(Reserva reserva, @QueryParam("token") Long token) { AlohAndesTransactionManager tm = new AlohAndesTransactionManager(getPath()); corregirDesfase(reserva); try { Double aPagar = tm.cancelarUnaReserva(reserva.getAlojamiento(), reserva.getFechaInicio(), reserva.getFechaCreacionOferta(), token); return Response.status(200).entity(aPagar).build(); } catch(BusinessLogicException e) { return Response.status(400).entity(doErrorMessage(e)).build(); } catch(Exception e) { return Response.status(500).entity(doErrorMessage(e)).build(); } } @GET public Response analizarOperacion(@QueryParam(value = "unidadTiempo") String unidadTiempo, @QueryParam(value = "tipoAl") String tipoAl) { System.out.println("LLEGOO 0"); AlohAndesTransactionManager tm = new AlohAndesTransactionManager(getPath()); System.out.println("LLEGOO 1"); try { return Response.status(200).entity(tm.analizarOperacion(unidadTiempo, tipoAl)).build(); } catch(BusinessLogicException e) { return Response.status(400).entity(doErrorMessage(e)).build(); } catch(Exception e) { return Response.status(500).entity(doErrorMessage(e)).build(); } } @DELETE public Response poblarTabla() { AlohAndesTransactionManager tm = new AlohAndesTransactionManager(getPath()); try { tm.poblarTabla(); return Response.status(200).entity("se poblo la tabla").build(); } catch(BusinessLogicException e) { return Response.status(400).entity(doErrorMessage(e)).build(); } catch(Exception e) { return Response.status(500).entity(doErrorMessage(e)).build(); } } @SuppressWarnings("deprecation") private void corregirDesfase(Reserva reserva) { System.out.println(reserva.getCliente()); //Para corregir el desfase de fechas. reserva.getFechaFin().setDate(reserva.getFechaFin().getDate()+1); reserva.getFechaInicio().setDate(reserva.getFechaInicio().getDate()+1); reserva.getFechaCreacionOferta().setDate(reserva.getFechaCreacionOferta().getDate()+1); } }
[ "=" ]
=
88e1ffc51639d4db79e0808b19903ec2a65ecea7
635162ba17786e6f366f712cb8c31ffb42633554
/project/securities-manager/src/main/java/cn/hzstk/securities/net/action/TigerDataAction.java
92f7d44b2fc0072fb88ad52b0536fc3c6ecea444
[]
no_license
macrogoal/wwh.stock
19aeed117f57acc1f22f3ed0caf34e481f00eb9c
8847a4bc6707dd881ea28133b621cf81431d845b
refs/heads/master
2020-04-17T05:51:47.771160
2018-04-04T06:21:15
2018-04-04T06:21:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
819
java
package cn.hzstk.securities.net.action; import cn.hzstk.securities.common.service.StkCommQtz; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import cn.hzstk.securities.common.action.MagicAction; import cn.hzstk.securities.net.domain.TigerData; import cn.hzstk.securities.net.service.TigerDataService; import org.springframework.web.bind.annotation.RequestMethod; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * * @description:TigerData action * @author: autoCode * @history: */ @Controller @RequestMapping("/net/tiger-data") @SuppressWarnings("serial") public class TigerDataAction extends MagicAction<TigerData,TigerDataService> { }
[ "wwzero@hotmail.com" ]
wwzero@hotmail.com
807e0559ec7625fb0271b9edb9597b6573bbe014
2288ae6f8133ce325062369bf33203ba3cea26fe
/src/service/basicFunctions/active/MsgService.java
d9a1d65f8b776c290d720317d22d4d9bc75d6c16
[]
no_license
Jinx009/pro_edu
9545e67e823da857917ff24b1e9768681ff946f6
b4076bce8d7761c7f88c950b75131fbc308b8102
refs/heads/master
2021-01-22T03:23:05.684214
2017-06-01T02:50:25
2017-06-01T02:50:25
92,376,694
0
2
null
2017-05-29T07:14:20
2017-05-25T07:21:18
JavaScript
UTF-8
Java
false
false
173
java
package service.basicFunctions.active; import database.models.active.Msg; public interface MsgService { public void send(); public void save(Msg msg); }
[ "jinxlovejinx@vip.qq.com" ]
jinxlovejinx@vip.qq.com
c34e82e0c536702613a9f59155d3d824dffaf014
b23404e272db01f2bf46320565c11b9e02cf0c61
/new/pps/src/main/java/ice/cn/joy/ggg/api/model/UACListResponseHolder.java
6204c05a984e14e149ed20390586dcc32901d296
[]
no_license
brucesq/brucedamon001
95ab98798f1c29d722a397681956c24ff4091385
92ab181f90005afffb354d10768921545912119c
refs/heads/master
2021-05-29T09:35:05.115101
2011-12-20T05:42:28
2011-12-20T05:42:28
32,131,555
0
1
null
null
null
null
UTF-8
Java
false
false
783
java
// ********************************************************************** // // Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved. // // This copy of Ice is licensed to you under the terms described in the // ICE_LICENSE file included in this distribution. // // ********************************************************************** // Ice version 3.4.0 package cn.joy.ggg.api.model; // <auto-generated> // // Generated from file `uac.ice' // // Warning: do not edit this file. // // </auto-generated> public final class UACListResponseHolder { public UACListResponseHolder() { } public UACListResponseHolder(UACListResponse value) { this.value = value; } public UACListResponse value; }
[ "quanzhi@8cf3193c-f4eb-11de-8355-bf90974c4141" ]
quanzhi@8cf3193c-f4eb-11de-8355-bf90974c4141
a8bf411f569b91f113f7690b52c8b58c7a99759e
af202bba3d5dcc261346666509ecffa3c59ef364
/nebula-dialect/src/main/java/org/hibernate/dialect/SQLServer2005Dialect.java
0ac908f9916165608586506512372e4a44020df1
[]
no_license
w20090905/nebula
daea528ac6193e5f081c2c9ef3f62c97c8d603c1
2fa1d50be45860fdc292612a860b08165ce653cc
refs/heads/master
2021-01-22T14:46:00.297852
2014-09-18T03:25:38
2014-09-18T03:25:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,650
java
/* * Hibernate, Relational Persistence for Idiomatic Java * * Copyright (c) 2010, Red Hat Inc. or third-party contributors as * indicated by the @author tags or express copyright attribution * statements applied by the authors. All third-party contributions are * distributed under license by Red Hat Inc. * * This copyrighted material is made available to anyone wishing to use, modify, * copy, or redistribute it subject to the terms and conditions of the GNU * Lesser General Public License, as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License * for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this distribution; if not, write to: * Free Software Foundation, Inc. * 51 Franklin Street, Fifth Floor * Boston, MA 02110-1301 USA */ package org.hibernate.dialect; //import java.sql.SQLException; import java.sql.Types; //import org.hibernate.JDBCException; import org.hibernate.LockMode; import org.hibernate.LockOptions; //import org.hibernate.QueryTimeoutException; //import org.hibernate.dialect.function.NoArgSQLFunction; //import org.hibernate.dialect.pagination.LimitHandler; //import org.hibernate.dialect.pagination.SQLServer2005LimitHandler; //import org.hibernate.engine.spi.RowSelection; //import org.hibernate.exception.LockTimeoutException; //import org.hibernate.exception.spi.SQLExceptionConversionDelegate; //import org.hibernate.internal.util.JdbcExceptionHelper; //import org.hibernate.type.StandardBasicTypes; /** * A dialect for Microsoft SQL 2005. (HHH-3936 fix) * * @author Yoryos Valotasios * @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com) */ @SuppressWarnings("deprecation") public class SQLServer2005Dialect extends SQLServerDialect { private static final int MAX_LENGTH = 8000; /** * Constructs a SQLServer2005Dialect */ public SQLServer2005Dialect() { // HHH-3965 fix // As per http://www.sql-server-helper.com/faq/sql-server-2005-varchar-max-p01.aspx // use varchar(max) and varbinary(max) instead of TEXT and IMAGE types registerColumnType( Types.BLOB, "varbinary(MAX)" ); registerColumnType( Types.VARBINARY, "varbinary(MAX)" ); registerColumnType( Types.VARBINARY, MAX_LENGTH, "varbinary($l)" ); registerColumnType( Types.LONGVARBINARY, "varbinary(MAX)" ); registerColumnType( Types.CLOB, "varchar(MAX)" ); registerColumnType( Types.LONGVARCHAR, "varchar(MAX)" ); registerColumnType( Types.VARCHAR, "varchar(MAX)" ); registerColumnType( Types.VARCHAR, MAX_LENGTH, "varchar($l)" ); registerColumnType( Types.BIGINT, "bigint" ); registerColumnType( Types.BIT, "bit" ); // registerFunction( "row_number", new NoArgSQLFunction( "row_number", StandardBasicTypes.INTEGER, true ) ); } // @Override // public LimitHandler buildLimitHandler(String sql, RowSelection selection) { // return new SQLServer2005LimitHandler( sql, selection ); // } @Override public String appendLockHint(LockOptions lockOptions, String tableName) { // NOTE : since SQLServer2005 the nowait hint is supported if ( lockOptions.getLockMode() == LockMode.UPGRADE_NOWAIT ) { return tableName + " with (updlock, rowlock, nowait)"; } final LockMode mode = lockOptions.getLockMode(); final boolean isNoWait = lockOptions.getTimeOut() == LockOptions.NO_WAIT; final String noWaitStr = isNoWait ? ", nowait" : ""; switch ( mode ) { case UPGRADE_NOWAIT: return tableName + " with (updlock, rowlock, nowait)"; case UPGRADE: case PESSIMISTIC_WRITE: case WRITE: return tableName + " with (updlock, rowlock" + noWaitStr + " )"; case PESSIMISTIC_READ: return tableName + " with (holdlock, rowlock" + noWaitStr + " )"; default: return tableName; } } // @Override // public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate() { // return new SQLExceptionConversionDelegate() { // @Override // public JDBCException convert(SQLException sqlException, String message, String sql) { // final String sqlState = JdbcExceptionHelper.extractSqlState( sqlException ); // final int errorCode = JdbcExceptionHelper.extractErrorCode( sqlException ); // if ( "HY008".equals( sqlState ) ) { // throw new QueryTimeoutException( message, sqlException, sql ); // } // if (1222 == errorCode ) { // throw new LockTimeoutException( message, sqlException, sql ); // } // return null; // } // }; // } }
[ "wangshilian@gmail.com" ]
wangshilian@gmail.com
c642067096ae732a570bf1a37ecbf84328797b72
9d9c8dae388a80a6e89fd1359d17b8c72fcffe13
/src/main/java/org/clarksnut/files/XmlFileModel.java
d0abb6cc830dd32550b61d736aff843aaa17861d
[ "Apache-2.0" ]
permissive
carlosthe19916/clarksnut
25d11186b018971f2665ff9c8890c914e8775769
8c3526e0fd664e97ee2e1c3cf17a49221e0e6438
refs/heads/master
2021-05-10T22:15:33.118671
2018-01-22T15:07:54
2018-01-22T15:07:54
115,136,904
0
0
null
2017-12-22T17:32:32
2017-12-22T17:32:31
null
UTF-8
Java
false
false
603
java
package org.clarksnut.files; import org.clarksnut.models.utils.ClarksnutModelUtils; import org.w3c.dom.Document; import org.xml.sax.SAXException; import javax.xml.parsers.ParserConfigurationException; import java.io.IOException; public interface XmlFileModel extends FileModel { Document getDocument(); static Document isXmlFile(FileModel file) { byte[] bytes = file.getFileAsBytes(); try { return ClarksnutModelUtils.toDocument(bytes); } catch (ParserConfigurationException | IOException | SAXException e) { return null; } } }
[ "carlosthe19916@gmail.com" ]
carlosthe19916@gmail.com
3aecdcdcf1578e43354246809fe71ead562e9ed1
f2a4093a0db21978cdab5da93fabe22ac4e0fa89
/Basic Exercises/Bai84.java
2c2ed10704232e20f574e82dda3ae218d4042fee
[]
no_license
hoangkiet1906/Java-Core-Exercise
1b1dec5de13738350362638f17b1d3906233c947
2a8212bbae38b7fafe5b79771a18545bfcbc3032
refs/heads/master
2023-05-10T09:42:46.164324
2021-06-02T06:23:18
2021-06-02T06:23:18
373,060,305
2
0
null
null
null
null
UTF-8
Java
false
false
354
java
import java.util.*; import java.io.*; public class Bai84 { public static void main(String[] args) { String string1 = "Python"; int slength = 3; if (slength > string1.length()) { slength = string1.length(); } String subpart = string1.substring(string1.length()-3); System.out.println(subpart + string1 + subpart); } }
[ "=" ]
=
dccb1a7bd015234d36cbf2818c7daba282b291ab
cdeee1295065d0ba965dd0c502973e9c3aa60618
/gameserver/data/scripts/quests/_106_ForgottenTruth.java
ee245bae86eae164b1f99a4493a6cb1f4456e1ed
[]
no_license
forzec/l-server
526b1957f289a4223942d3746143769c981a5508
0f39edf60a14095b269b4a87c1b1ac01c2eb45d8
refs/heads/master
2021-01-10T11:39:14.088518
2016-03-19T18:28:04
2016-03-19T18:28:04
54,065,298
5
0
null
null
null
null
UTF-8
Java
false
false
4,820
java
package quests; import org.mmocore.commons.util.Rnd; import org.mmocore.gameserver.model.base.Race; import org.mmocore.gameserver.model.instances.NpcInstance; import org.mmocore.gameserver.model.quest.Quest; import org.mmocore.gameserver.model.quest.QuestState; import org.mmocore.gameserver.network.l2.s2c.ExShowScreenMessage; import org.mmocore.gameserver.network.l2.s2c.ExShowScreenMessage.ScreenMessageAlign; public class _106_ForgottenTruth extends Quest { int ONYX_TALISMAN1 = 984; int ONYX_TALISMAN2 = 985; int ANCIENT_SCROLL = 986; int ANCIENT_CLAY_TABLET = 987; int KARTAS_TRANSLATION = 988; int ELDRITCH_DAGGER = 989; int ELDRITCH_STAFF = 2373; public _106_ForgottenTruth() { super(false); addStartNpc(30358); addTalkId(30133); addKillId(27070); addQuestItem(KARTAS_TRANSLATION, ONYX_TALISMAN1, ONYX_TALISMAN2, ANCIENT_SCROLL, ANCIENT_CLAY_TABLET); } @Override public String onEvent(String event, QuestState st, NpcInstance npc) { String htmltext = event; if(event.equals("tetrarch_thifiell_q0106_05.htm")) { st.giveItems(ONYX_TALISMAN1, 1); st.setCond(1); st.setState(STARTED); st.playSound(SOUND_ACCEPT); } return htmltext; } @Override public String onTalk(NpcInstance npc, QuestState st) { int npcId = npc.getNpcId(); String htmltext = "noquest"; int cond = st.getCond(); if(npcId == 30358) { if(cond == 0) { if(st.getPlayer().getRace() != Race.darkelf) { htmltext = "tetrarch_thifiell_q0106_00.htm"; st.exitCurrentQuest(true); } else if(st.getPlayer().getLevel() >= 10) htmltext = "tetrarch_thifiell_q0106_03.htm"; else { htmltext = "tetrarch_thifiell_q0106_02.htm"; st.exitCurrentQuest(true); } } else if(cond > 0 && (st.getQuestItemsCount(ONYX_TALISMAN1) > 0 || st.getQuestItemsCount(ONYX_TALISMAN2) > 0) && st.getQuestItemsCount(KARTAS_TRANSLATION) == 0) htmltext = "tetrarch_thifiell_q0106_06.htm"; else if(cond == 4 && st.getQuestItemsCount(KARTAS_TRANSLATION) > 0) { htmltext = "tetrarch_thifiell_q0106_07.htm"; st.takeItems(KARTAS_TRANSLATION, -1); if(st.getPlayer().isMageClass()) st.giveItems(ELDRITCH_STAFF, 1); else st.giveItems(ELDRITCH_DAGGER, 1); st.giveItems(ADENA_ID, 10266, false); st.getPlayer().addExpAndSp(24195, 2074); if(st.getPlayer().getClassId().getLevel() == 1 && !st.getPlayer().getVarB("p1q3")) { st.getPlayer().setVar("p1q3", "1", -1); // flag for helper st.getPlayer().sendPacket(new ExShowScreenMessage("Now go find the Newbie Guide.", 5000, ScreenMessageAlign.TOP_CENTER, true)); st.giveItems(1060, 100); // healing potion for(int item = 4412; item <= 4417; item++) st.giveItems(item, 10); // echo cry if(st.getPlayer().getClassId().isMage()) { st.playTutorialVoice("tutorial_voice_027"); st.giveItems(5790, 3000); // newbie sps } else { st.playTutorialVoice("tutorial_voice_026"); st.giveItems(5789, 6000); // newbie ss } } st.exitCurrentQuest(false); st.playSound(SOUND_FINISH); } } else if(npcId == 30133) if(cond == 1 && st.getQuestItemsCount(ONYX_TALISMAN1) > 0) { htmltext = "karta_q0106_01.htm"; st.takeItems(ONYX_TALISMAN1, -1); st.giveItems(ONYX_TALISMAN2, 1); st.setCond(2); } else if(cond == 2 && st.getQuestItemsCount(ONYX_TALISMAN2) > 0 && (st.getQuestItemsCount(ANCIENT_SCROLL) == 0 || st.getQuestItemsCount(ANCIENT_CLAY_TABLET) == 0)) htmltext = "karta_q0106_02.htm"; else if(cond == 3 && st.getQuestItemsCount(ANCIENT_SCROLL) > 0 && st.getQuestItemsCount(ANCIENT_CLAY_TABLET) > 0) { htmltext = "karta_q0106_03.htm"; st.takeItems(ONYX_TALISMAN2, -1); st.takeItems(ANCIENT_SCROLL, -1); st.takeItems(ANCIENT_CLAY_TABLET, -1); st.giveItems(KARTAS_TRANSLATION, 1); st.setCond(4); } else if(cond == 4 && st.getQuestItemsCount(KARTAS_TRANSLATION) > 0) htmltext = "karta_q0106_04.htm"; return htmltext; } @Override public String onKill(NpcInstance npc, QuestState st) { int npcId = npc.getNpcId(); if(npcId == 27070) if(st.getCond() == 2 && st.getQuestItemsCount(ONYX_TALISMAN2) > 0) if(Rnd.chance(20) && st.getQuestItemsCount(ANCIENT_SCROLL) == 0) { st.giveItems(ANCIENT_SCROLL, 1); st.playSound(SOUND_MIDDLE); } else if(Rnd.chance(10) && st.getQuestItemsCount(ANCIENT_CLAY_TABLET) == 0) { st.giveItems(ANCIENT_CLAY_TABLET, 1); st.playSound(SOUND_MIDDLE); } if(st.getQuestItemsCount(ANCIENT_SCROLL) > 0 && st.getQuestItemsCount(ANCIENT_CLAY_TABLET) > 0) st.setCond(3); return null; } }
[ "dmitry@0xffff" ]
dmitry@0xffff
6e09d818422374155ef290604b0e685f43bf90ac
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
/project_1_1/src/b/c/f/h/Calc_1_1_12575.java
d088007bc9ce38c867c7cc7f780937c52628b243
[]
no_license
chalstrick/bigRepo1
ac7fd5785d475b3c38f1328e370ba9a85a751cff
dad1852eef66fcec200df10083959c674fdcc55d
refs/heads/master
2016-08-11T17:59:16.079541
2015-12-18T14:26:49
2015-12-18T14:26:49
48,244,030
0
0
null
null
null
null
UTF-8
Java
false
false
134
java
package b.c.f.h; public class Calc_1_1_12575 { /** @return the sum of a and b */ public int add(int a, int b) { return a+b; } }
[ "christian.halstrick@sap.com" ]
christian.halstrick@sap.com
cc9c6b0914af17957f93f09be89b091df42344b8
794b7fc66b6be9482e280125fe6efd3e2e043d6c
/tzatziki-pdf/src/main/java/tzatziki/pdf/support/TagViewsFromDictionaryBuilder.java
6b5a41168c9f03a2362c59bf97273669523a29e8
[ "MIT" ]
permissive
Arnauld/tzatziki
5ca21554eadb21e62bb5f990916455fb1392bd16
408b5c84fc7ecca89b94db2624997ea7b194aad6
refs/heads/master
2023-03-15T18:10:22.670167
2018-05-15T11:33:18
2018-05-15T11:33:18
22,289,790
30
15
MIT
2018-05-15T10:06:20
2014-07-26T15:38:14
Java
UTF-8
Java
false
false
4,108
java
package tzatziki.pdf.support; import com.google.common.base.Function; import com.google.common.base.Optional; import com.google.common.base.Predicate; import com.google.common.base.Predicates; import org.apache.commons.lang3.StringUtils; import tzatziki.analysis.exec.support.TagView; import tzatziki.analysis.exec.support.TagViews; import tzatziki.analysis.tag.Tag; import tzatziki.analysis.tag.TagDictionary; import java.util.Comparator; /** * @author <a href="http://twitter.com/aloyer">@aloyer</a> */ public class TagViewsFromDictionaryBuilder { public static Function<Tag, String> DefaultTagViewLabelRenderer = new Function<Tag, String>() { @Override public String apply(Tag tag) { String description = tag.getDescription(); if (StringUtils.isBlank(description)) return tag.getTag(); else return tag.getTag() + " - " + description; } }; private Predicate<Tag> tagFilter = Predicates.alwaysTrue(); private Function<Tag, String> tagRenderer = DefaultTagViewLabelRenderer; private Comparator<TagView> sorter = TagViews.TagViewPerLabelSorter; private boolean displayEvenIfEmpty = true; /** * If no scenario is marked by this tag, when <code>hideWhenEmpty</code> is <code>true</code> * then the tag is not displayed in the summary, otherwise the tag is visible indicating that * it is not used. * * @return this for method chaining * @see #displayEvenIfEmpty() */ public TagViewsFromDictionaryBuilder hideWhenEmpty() { this.displayEvenIfEmpty = true; return this; } /** * @return this for method chaining * @see #hideWhenEmpty() */ public TagViewsFromDictionaryBuilder displayEvenIfEmpty() { this.displayEvenIfEmpty = false; return this; } /** * indicate how to format the tag label within the summary e.g. "@wip - Work in progress" * * @return this for method chaining * @see #DefaultTagViewLabelRenderer */ public TagViewsFromDictionaryBuilder tagRenderer(Function<Tag, String> tagRenderer) { this.tagRenderer = tagRenderer; return this; } /** * default implementation rely on {@link #tagRenderer} * * @param tag * @return the label for the specified tag * @see #tagRenderer(com.google.common.base.Function) * @see #DefaultTagViewLabelRenderer */ protected String format(Tag tag) { return tagRenderer.apply(tag); } /** * indicate whether or not a Tag should be displayed. * * @return this for method chaining */ public TagViewsFromDictionaryBuilder tagFilter(Predicate<Tag> tagFilter) { this.tagFilter = tagFilter; return this; } /** * default implementation rely on {@link #tagFilter} * * @param tag * @return <code>true</code> if the tag should be displayed, <code>false</code> otherwise * @see #tagFilter(com.google.common.base.Predicate) */ protected boolean filter(Tag tag) { return tagFilter.apply(tag); } protected Optional<TagView> createTagView(Tag tag) { if (filter(tag)) { return Optional.of(new TagView(format(tag), tag.getTag())); } return Optional.absent(); } /** * provide a way to sort tag view within the summary, this is usually done through the <code>TagView</code> * summary. * * @return this for method chaining */ public TagViewsFromDictionaryBuilder sorter(Comparator<TagView> sorter) { this.sorter = sorter; return this; } public Optional<TagViews> build(TagDictionary dictionary) { TagViews tagViews = new TagViews(displayEvenIfEmpty); for (Tag tag : dictionary.tags()) { Optional<TagView> tagViewOpt = createTagView(tag); if (tagViewOpt.isPresent()) tagViews.addAll(tagViewOpt.get()); } tagViews.sortViews(sorter); return Optional.of(tagViews); } }
[ "arnauld.loyer@gmail.com" ]
arnauld.loyer@gmail.com
25a028714aff2db029721ed9fd8885df450a8db9
d6e24726af19bf81c604b945225eb24f5c703db3
/.svn/pristine/a8/a8d3a345d050d1e97355a2b072ff4caed6c8c1d5.svn-base
223b1eb08c4ea55284eda82cecc3b8f953dbe617
[]
no_license
wangtao12138/charge-merchant
b29d3f639d2b3c60f8cf970765adafe63598e21a
742973f5bcbfe34a73044f347e5ead388f671012
refs/heads/master
2021-10-01T15:09:50.332136
2018-11-27T06:51:36
2018-11-27T06:51:36
159,288,483
0
0
null
null
null
null
UTF-8
Java
false
false
330
package cn.com.cdboost.charge.merchant.dto.param; import lombok.Getter; import lombok.Setter; @Setter @Getter public class ICCardListParam { private String cardId; private String projectGuid; private String oldProjectGuid; private String deviceNo; private String commNo; private Integer result; }
[ "770320215@qq.com" ]
770320215@qq.com
838e63d9eb82a6978123cd91c585a783fb30be68
50c317773fbe09e7ff1b918fcc6bbb50c61f2301
/vertigo-dynamo-impl/src/test/java/io/vertigo/dynamo/store/data/domain/car/MotorTypeEnum.java
d30136c155349ec80ef92abba9e3a0882466f56c
[ "Apache-2.0" ]
permissive
fconstantin/vertigo
459152d06d4ea4d5fed56601a9a66923a5af6e2e
dbc351501df230d755c7c0b3904a26a17bd79601
refs/heads/master
2020-03-26T16:49:55.782903
2018-06-28T16:19:03
2018-06-28T16:19:03
145,126,118
0
0
null
2018-08-17T13:48:59
2018-08-17T13:48:59
null
UTF-8
Java
false
false
1,365
java
/** * vertigo - simple java starter * * Copyright (C) 2013-2018, KleeGroup, direction.technique@kleegroup.com (http://www.kleegroup.com) * KleeGroup, Centre d'affaire la Boursidiere - BP 159 - 92357 Le Plessis Robinson Cedex - France * * 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 io.vertigo.dynamo.store.data.domain.car; import java.io.Serializable; import io.vertigo.dynamo.domain.model.MasterDataEnum; import io.vertigo.dynamo.domain.model.URI; import io.vertigo.dynamo.domain.util.DtObjectUtil; public enum MotorTypeEnum implements MasterDataEnum<MotorType> { essence("ESSENCE"), // diesel("DIESEL"); private final URI<MotorType> entityUri; private MotorTypeEnum(final Serializable id) { entityUri = DtObjectUtil.createURI(MotorType.class, id); } @Override public URI<MotorType> getEntityUri() { return entityUri; } }
[ "matthieu.laroche@telecom-bretagne.eu" ]
matthieu.laroche@telecom-bretagne.eu
be9569954844089a64a593fecfac482318b20c28
bc67bd70aaa83b0c8c902defbb928838f5e9b668
/java/2.x/tags/picocontainer-web-2.2/examples/jsf-webapp/src/java/org/picocontainer/web/samples/jsf/ListCheeseController.java
fa41fff24acfec4c33829c496fa2680eab152372
[ "BSD-3-Clause" ]
permissive
codehaus/picocontainer
b07475fe034384926579e2b4f6f25e68f057cae2
7be6b8b0eb33421dc7a755817628e06b79bd879d
refs/heads/master
2023-07-20T01:30:02.348980
2014-10-08T04:44:44
2014-10-08T04:44:44
36,501,409
2
2
null
null
null
null
UTF-8
Java
false
false
3,311
java
/***************************************************************************** * Copyright (C) PicoContainer Organization. All rights reserved. * * ------------------------------------------------------------------------- * * The software in this package is published under the terms of the BSD * * style license a copy of which has been included with this distribution in * * the LICENSE.txt file. * * * * Original code by Centerline Computers, Inc. * *****************************************************************************/ package org.picocontainer.web.samples.jsf; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import javax.faces.application.FacesMessage; import javax.faces.component.UIData; import javax.faces.context.FacesContext; import org.picocontainer.web.sample.model.Cheese; import org.picocontainer.web.sample.service.CheeseService; /** * ListCheeseController * @author Michael Rimov */ public class ListCheeseController implements Serializable { /** * The Cheese Service we handle. */ private final CheeseService service; /** * The list of cheeses last loaded. */ private List cheeses; /** * Data grid item that works with the data table * of cheeses. */ private UIData cheeseList; public ListCheeseController(CheeseService service) { this.service = service; } public List getCheeses() { if (cheeses == null) { cheeses = new ArrayList(service.getCheeses()); } return cheeses; } public int getNumCheeses() { return cheeses.size(); } /** * @return the cheeseList */ public UIData getCheeseList() { return cheeseList; } /** * @param cheeseList the cheeseList to set */ public void setCheeseList(UIData cheeseList) { this.cheeseList = cheeseList; } /** * Queries the UIData for the current row of data to get * the current cheese. * @return String for the cheese name. * @throws NullPointerException if the rowdata returns a null * Cheese. */ private String getSelectedCheeseName() { Cheese cheese = (Cheese) cheeseList.getRowData(); // make sure it still exists if (cheese == null) { throw new NullPointerException("cheese"); } return cheese.getName(); } public String removeCheese() { Cheese tempCheese = new Cheese(getSelectedCheeseName(), ""); Cheese storedCheese = service.find(tempCheese); if (storedCheese == null) { FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Cheese " + tempCheese.getName() + " Not Found!")); return "delete error"; } service.remove(storedCheese); FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Cheese Removed")); return "ok"; } }
[ "paul@ac66bb80-72f5-0310-8d68-9f556cfffb23" ]
paul@ac66bb80-72f5-0310-8d68-9f556cfffb23
e5d55dd522b2147e656df1b48a4b50b5163338c1
81dbe3c24de5e26af8c617a18121f150d760b8e2
/src/main/java/org/reactome/web/elv/client/common/data/model/StableIdentifier.java
4b742eee1a533467aa9d7bc34b8de95316593108
[]
no_license
PlantReactome/PathwayBrowser
02f07d807de317f00e1c0b2842656ea7d47c53e7
2c2ff233c53df9f57930dfe098579509365626f0
refs/heads/master
2020-04-05T22:43:29.961843
2016-12-01T02:15:57
2016-12-01T02:15:57
60,292,111
0
0
null
2016-06-02T19:37:18
2016-06-02T19:37:18
null
UTF-8
Java
false
false
1,703
java
package org.reactome.web.elv.client.common.data.model; import com.google.gwt.json.client.JSONObject; import org.reactome.web.elv.client.common.data.factory.FactoryUtils; import org.reactome.web.elv.client.common.data.factory.SchemaClass; /** * @author Antonio Fabregat <fabregat@ebi.ac.uk> * */ @SuppressWarnings("UnusedDeclaration") public class StableIdentifier extends DatabaseObject { private String identifier; private String identifierVersion; private ReferenceDatabase referenceDatabase; private String referenceDatabaseClass; public StableIdentifier(JSONObject jsonObject) { super(SchemaClass.STABLE_IDENTIFIER, jsonObject); if(jsonObject.containsKey("identifier")){ this.identifier = FactoryUtils.getStringValue(jsonObject, "identifier"); } if(jsonObject.containsKey("identifierVersion")){ this.identifierVersion = FactoryUtils.getStringValue(jsonObject, "identifierVersion"); } if(jsonObject.containsKey("referenceDatabase")){ this.referenceDatabase = (ReferenceDatabase) FactoryUtils.getDatabaseObject(jsonObject, "referenceDatabase"); } if(jsonObject.containsKey("referenceDatabaseClass")){ this.referenceDatabaseClass = FactoryUtils.getStringValue(jsonObject, "referenceDatabaseClass"); } } public String getIdentifier() { return identifier; } public String getIdentifierVersion() { return identifierVersion; } public ReferenceDatabase getReferenceDatabase() { return referenceDatabase; } public String getReferenceDatabaseClass() { return referenceDatabaseClass; } }
[ "fabregat.antonio@gmail.com" ]
fabregat.antonio@gmail.com
fbab58e5e7d6bab0b33d2aa3aaa19073b52c4833
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/5/5_6bed528e3bc3faa7c1def47bc1837fcf5de16a58/PortArrayAdapter/5_6bed528e3bc3faa7c1def47bc1837fcf5de16a58_PortArrayAdapter_t.java
912c67cdf55359a99efff2659dfa4745830610dc
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,629
java
package com.xargsgrep.portknocker.adapter; import java.util.List; import android.content.Context; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.View.OnFocusChangeListener; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.AdapterView.OnItemSelectedListener; import android.widget.ArrayAdapter; import android.widget.EditText; import android.widget.ImageButton; import android.widget.LinearLayout; import android.widget.Spinner; import android.widget.Toast; import com.xargsgrep.portknocker.R; import com.xargsgrep.portknocker.model.Port; import com.xargsgrep.portknocker.model.Port.Protocol; import com.xargsgrep.portknocker.utils.StringUtils; public class PortArrayAdapter extends ArrayAdapter<Port> { List<Port> ports; public PortArrayAdapter(Context context, List<Port> ports) { super(context, -1, ports); this.ports = ports; } @Override public int getCount() { return ports.size(); } @Override public Port getItem(int position) { return ports.get(position); } public List<Port> getPorts() { return ports; } @Override public View getView(int position, View convertView, ViewGroup parent) { View view = convertView; if (view == null) view = LayoutInflater.from(getContext()).inflate(R.layout.port_row, null); EditText portView = (EditText) view.findViewById(R.id.port_row_port); Spinner protocolSpinner = (Spinner) view.findViewById(R.id.port_row_protocol); ImageButton deleteButton = (ImageButton) view.findViewById(R.id.port_row_delete); ArrayAdapter<Protocol> protocolAdapter = new ArrayAdapter<Protocol>(getContext(), android.R.layout.simple_spinner_item, Protocol.values()); protocolAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); protocolSpinner.setAdapter(protocolAdapter); Port port = ports.get(position); portView.setText((port.getPort() > 0) ? new Integer(port.getPort()).toString() : ""); protocolSpinner.setSelection(port.getProtocol().ordinal()); final int fPosition = position; portView.setOnFocusChangeListener(new OnFocusChangeListener() { @Override public void onFocusChange(View view, boolean hasFocus) { if (!hasFocus) { String portStr = ((EditText) view).getText().toString(); ports.get(fPosition).setPort((StringUtils.isNotBlank(portStr)) ? Integer.parseInt(portStr) : -1); } } }); protocolSpinner.setOnItemSelectedListener(new OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { ports.get(fPosition).setProtocol(Protocol.values()[position]); } @Override public void onNothingSelected(AdapterView<?> parent) { } }); deleteButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { if (getCount() == 1) { Toast toast = Toast.makeText(getContext(), "Can't delete all ports!", Toast.LENGTH_SHORT); toast.setGravity(Gravity.CENTER_VERTICAL|Gravity.CENTER_HORIZONTAL, 0, 0); toast.show(); } else { LinearLayout parent = (LinearLayout) v.getParent(); EditText dPortView = (EditText) parent.findViewById(R.id.port_row_port); dPortView.setOnFocusChangeListener(null); remove(getItem(fPosition)); } } }); return view; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
25988f96988c11a92ce33735e7b2a9c754b1c7dd
3d3bb5649edaaaedc489bccfc4bddf479be85f94
/src/java/com/sift/financial/member/AddressElementsDAO.java
17d6fd58621809038c6ef68a2c8355bf82d7826c
[]
no_license
folaringbolahan/Easycoop
5d632adae2dd0c5ac80e03a73943ceb26953a6f2
41fa3506374153522bc2a75e4dd9344f37912313
refs/heads/master
2020-09-22T21:17:08.586559
2019-05-15T08:24:41
2019-05-15T08:24:41
225,322,165
0
0
null
null
null
null
UTF-8
Java
false
false
5,064
java
package com.sift.financial.member; import java.sql.Timestamp; import java.util.Date; import java.util.List; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.hibernate.LockMode; import org.springframework.context.ApplicationContext; import org.springframework.orm.hibernate3.support.HibernateDaoSupport; /** * A data access object (DAO) providing persistence and search support for * AddressElements entities. Transaction control of the save(), update() and * delete() operations can directly support Spring container-managed * transactions or they can be augmented to handle user-managed Spring * transactions. Each of these methods provides additional information for how * to configure it for the desired type of transaction control. * * @see com.sift.financial.member.AddressElements * @author MyEclipse Persistence Tools */ public class AddressElementsDAO extends HibernateDaoSupport { private static final Log log = LogFactory.getLog(AddressElementsDAO.class); // property constants public static final String ADDR_FIELD_NAME = "addrFieldName"; public static final String ACTIVE = "active"; public static final String DELETED = "deleted"; public static final String CREATED_BY = "createdBy"; public static final String LAST_MODIFIED_BY = "lastModifiedBy"; protected void initDao() { // do nothing } public void save(AddressElements transientInstance) { log.debug("saving AddressElements instance"); try { getHibernateTemplate().save(transientInstance); log.debug("save successful"); } catch (RuntimeException re) { log.error("save failed", re); throw re; } } public void delete(AddressElements persistentInstance) { log.debug("deleting AddressElements instance"); try { getHibernateTemplate().delete(persistentInstance); log.debug("delete successful"); } catch (RuntimeException re) { log.error("delete failed", re); throw re; } } public AddressElements findById(java.lang.Long id) { log.debug("getting AddressElements instance with id: " + id); try { AddressElements instance = (AddressElements) getHibernateTemplate() .get("com.sift.financial.member.AddressElements", id); return instance; } catch (RuntimeException re) { log.error("get failed", re); throw re; } } public List findByExample(AddressElements instance) { log.debug("finding AddressElements instance by example"); try { List results = getHibernateTemplate().findByExample(instance); log.debug("find by example successful, result size: " + results.size()); return results; } catch (RuntimeException re) { log.error("find by example failed", re); throw re; } } public List findByProperty(String propertyName, Object value) { log.debug("finding AddressElements instance with property: " + propertyName + ", value: " + value); try { String queryString = "from AddressElements as model where model." + propertyName + "= ?"; return getHibernateTemplate().find(queryString, value); } catch (RuntimeException re) { log.error("find by property name failed", re); throw re; } } public List findByAddrFieldName(Object addrFieldName) { return findByProperty(ADDR_FIELD_NAME, addrFieldName); } public List findByActive(Object active) { return findByProperty(ACTIVE, active); } public List findByDeleted(Object deleted) { return findByProperty(DELETED, deleted); } public List findByCreatedBy(Object createdBy) { return findByProperty(CREATED_BY, createdBy); } public List findByLastModifiedBy(Object lastModifiedBy) { return findByProperty(LAST_MODIFIED_BY, lastModifiedBy); } public List findAll() { log.debug("finding all AddressElements instances"); try { String queryString = "from AddressElements"; return getHibernateTemplate().find(queryString); } catch (RuntimeException re) { log.error("find all failed", re); throw re; } } public AddressElements merge(AddressElements detachedInstance) { log.debug("merging AddressElements instance"); try { AddressElements result = (AddressElements) getHibernateTemplate() .merge(detachedInstance); log.debug("merge successful"); return result; } catch (RuntimeException re) { log.error("merge failed", re); throw re; } } public void attachDirty(AddressElements instance) { log.debug("attaching dirty AddressElements instance"); try { getHibernateTemplate().saveOrUpdate(instance); log.debug("attach successful"); } catch (RuntimeException re) { log.error("attach failed", re); throw re; } } public void attachClean(AddressElements instance) { log.debug("attaching clean AddressElements instance"); try { getHibernateTemplate().lock(instance, LockMode.NONE); log.debug("attach successful"); } catch (RuntimeException re) { log.error("attach failed", re); throw re; } } public static AddressElementsDAO getFromApplicationContext( ApplicationContext ctx) { return (AddressElementsDAO) ctx.getBean("AddressElementsDAO"); } }
[ "Gbolahan.Folarin@GBOLAHAN-IT.africaprudentialregistrars.com" ]
Gbolahan.Folarin@GBOLAHAN-IT.africaprudentialregistrars.com
766bdf970a7a42a372f56e57b1ffdad1db124dbe
3a150dcec8c275da2fab46afab25bc2cf7d41a03
/src/main/java/net/minestom/server/map/MapManager.java
7f086aa2cab86c0a161b38b24d7d177d3bb7f6b9
[ "Apache-2.0" ]
permissive
ThuverX/Minestom
defe611e59b4803eafddb88a1f347de5901e0b02
825722ac4d60cd0501ca2d3a3bb98e0982c4db46
refs/heads/master
2022-11-22T00:42:02.589626
2020-07-28T16:31:29
2020-07-28T16:31:29
283,267,482
0
0
Apache-2.0
2020-07-28T16:25:48
2020-07-28T16:25:48
null
UTF-8
Java
false
false
373
java
package net.minestom.server.map; import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; public class MapManager { private Int2ObjectMap<MapHandle> objectMap = new Int2ObjectOpenHashMap<>(); public MapHandle getMap(int mapId) { return objectMap.computeIfAbsent(mapId, id -> new MapHandle(id)); } }
[ "themode@outlook.fr" ]
themode@outlook.fr
0d4602a5f4c1bbadb29ee319b58ae98e8eb877b5
54c1dcb9a6fb9e257c6ebe7745d5008d29b0d6b6
/app/src/main/java/com/qiyukf/unicorn/api/customization/input/ActionListProvider.java
8a9caef1ec1919ba7f31f846fdce54a27358c8f9
[]
no_license
rcoolboy/guilvN
3817397da465c34fcee82c0ca8c39f7292bcc7e1
c779a8e2e5fd458d62503dc1344aa2185101f0f0
refs/heads/master
2023-05-31T10:04:41.992499
2021-07-07T09:58:05
2021-07-07T09:58:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
218
java
package com.qiyukf.unicorn.api.customization.input; import com.qiyukf.unicorn.api.customization.action.BaseAction; import java.util.List; public interface ActionListProvider { List<BaseAction> getActionList(); }
[ "593746220@qq.com" ]
593746220@qq.com
d702f2f7c0e56432a7f47c4dc3bea72712687629
3ee1c41f1fc133d77ac2681842bc9eefebad38ae
/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationContrailV2VmInterfaceImplTest.java
3e69ed17c0c7d89fcff5038c4f119df1e8a73122
[ "Apache-2.0" ]
permissive
onapdemo/sdc
b225395934e07b36f96ba46ab04be533d755c521
3f1fee2ca76332b48e6f36662b32f2b5096c25e7
refs/heads/master
2020-03-17T21:17:00.804170
2018-05-21T06:47:17
2018-05-21T06:47:17
133,952,212
0
0
null
null
null
null
UTF-8
Java
false
false
4,605
java
/*- * ============LICENSE_START======================================================= * SDC * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ============LICENSE_END========================================================= */ package org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation; import static org.openecomp.sdc.translator.services.heattotosca.buildconsolidationdata.TestConstants.TEST_CONNECTIVITY_POSITIVE; import org.junit.Before; import org.junit.Test; import org.openecomp.sdc.translator.services.heattotosca.buildconsolidationdata.ConsolidationDataValidationType; import java.io.IOException; /** * @author Avrahamg * @since August 10, 2016 */ public class ResourceTranslationContrailV2VmInterfaceImplTest extends BaseResourceTranslationTest { @Override @Before public void setUp() throws IOException { // do not delete this function. it prevents the superclass setup from running } @Test public void testTranslateVMIWithGetResource() throws Exception { inputFilesPath = "/mock/services/heattotosca/contrailv2VMinterface/oneNet/inputfiles"; outputFilesPath = "/mock/services/heattotosca/contrailv2VMinterface/oneNet/expectedoutputfiles"; initTranslatorAndTranslate(); testTranslation(); validatePortTemplateConsolidationData(ConsolidationDataValidationType .VALIDATE_CONNECTIVITY, TEST_CONNECTIVITY_POSITIVE); } @Test public void testTranslateVMIWithListOfNetworks() throws Exception { inputFilesPath = "/mock/services/heattotosca/contrailv2VMinterface/listNet/inputfiles"; outputFilesPath = "/mock/services/heattotosca/contrailv2VMinterface/listNet/expectedoutputfiles"; initTranslatorAndTranslate(); testTranslation(); validatePortTemplateConsolidationData(ConsolidationDataValidationType .VALIDATE_CONNECTIVITY, TEST_CONNECTIVITY_POSITIVE); } @Test public void testMacAddressesValueMapOfListWithOneItem() throws IOException { inputFilesPath = "/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapOneItem/inputfiles"; outputFilesPath = "/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapOneItem/expectedoutputfiles"; initTranslatorAndTranslate(); testTranslation(); } @Test public void testMacAddressesValueMapOfListWithTwoItems() throws IOException { inputFilesPath = "/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapTwoItems/inputfiles"; outputFilesPath = "/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapTwoItems/expectedoutputfiles"; initTranslatorAndTranslate(); testTranslation(); } @Test public void testMacAddressesValueMapOfListWithStaticValue() throws IOException { inputFilesPath = "/mock/services/heattotosca/contrailv2VMinterface/macAddressStaticValue/inputfiles"; outputFilesPath = "/mock/services/heattotosca/contrailv2VMinterface/macAddressStaticValue/expectedoutputfiles"; initTranslatorAndTranslate(); testTranslation(); } @Test public void testMacAddressesValueNotList() throws IOException { inputFilesPath = "/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueNotAList/inputfiles"; outputFilesPath = "/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueNotAList/expectedoutputfiles"; initTranslatorAndTranslate(); testTranslation(); } @Test public void testMacAddressesValueInProperForm() throws IOException { inputFilesPath = "/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueInProperForm/inputfiles"; outputFilesPath = "/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueInProperForm/expectedoutputfiles"; initTranslatorAndTranslate(); testTranslation(); } }
[ "Sudhakar.reddy@amdocs.com" ]
Sudhakar.reddy@amdocs.com
fd34b4c5ffe3e40a616c82f8f31eacccfef4fc04
0eeea8f93b4f154db22e98a1b1a72ae5adba8dba
/src/cn/osworks/aos/system/dao/po/Act_id_userPO.java
695c7901c5fb1d42fb25731aebe2184b6f95ad90
[]
no_license
atguigu2020dfbb/aosyb
497dc3b79b3f73441338e97b2f7072644c984efb
16c031ac63cc30235ed114a8b0a4b8870ece2328
refs/heads/master
2023-01-10T08:16:20.744253
2020-11-16T08:16:35
2020-11-16T08:16:35
313,138,331
0
0
null
null
null
null
UTF-8
Java
false
false
2,129
java
package cn.osworks.aos.system.dao.po; import cn.osworks.aos.core.typewrap.PO; /** * <b>ACT_ID_USER[act_id_user]数据持久化对象</b> * <p> * 注意:此文件由AOS平台自动生成-禁止手工修改。 * </p> * * @author AHei * @date 2018-12-18 15:48:29 */ public class Act_id_userPO extends PO { private static final long serialVersionUID = 1L; /** * ID_ */ private String id_; /** * REV_ */ private Integer rev_; /** * FIRST_ */ private String first_; /** * LAST_ */ private String last_; /** * EMAIL_ */ private String email_; /** * PWD_ */ private String pwd_; /** * PICTURE_ID_ */ private String picture_id_; /** * ID_ * * @return id_ */ public String getId_() { return id_; } /** * REV_ * * @return rev_ */ public Integer getRev_() { return rev_; } /** * FIRST_ * * @return first_ */ public String getFirst_() { return first_; } /** * LAST_ * * @return last_ */ public String getLast_() { return last_; } /** * EMAIL_ * * @return email_ */ public String getEmail_() { return email_; } /** * PWD_ * * @return pwd_ */ public String getPwd_() { return pwd_; } /** * PICTURE_ID_ * * @return picture_id_ */ public String getPicture_id_() { return picture_id_; } /** * ID_ * * @param id_ */ public void setId_(String id_) { this.id_ = id_; } /** * REV_ * * @param rev_ */ public void setRev_(Integer rev_) { this.rev_ = rev_; } /** * FIRST_ * * @param first_ */ public void setFirst_(String first_) { this.first_ = first_; } /** * LAST_ * * @param last_ */ public void setLast_(String last_) { this.last_ = last_; } /** * EMAIL_ * * @param email_ */ public void setEmail_(String email_) { this.email_ = email_; } /** * PWD_ * * @param pwd_ */ public void setPwd_(String pwd_) { this.pwd_ = pwd_; } /** * PICTURE_ID_ * * @param picture_id_ */ public void setPicture_id_(String picture_id_) { this.picture_id_ = picture_id_; } }
[ "eclipse_user@atguigu.com" ]
eclipse_user@atguigu.com
9f4a6e28e18b27937d54a042c6668f09a9719c6b
f369814ddc07bb41bcde4f165815126e69dd4a71
/testing/fakedata/applib/src/main/java/org/apache/isis/testing/fakedata/applib/services/Booleans.java
3ae699cc699fc141622fbd796fdadff8e35fd9f8
[ "Apache-2.0" ]
permissive
fengluandll/isis
700f617fe21f1b5f4fb00ac32494198b3d20ad3a
e6959c8b64f73b9ea839d269fcf33e5d4e215d95
refs/heads/master
2022-10-01T16:54:33.391687
2020-06-12T06:54:12
2020-06-12T06:54:12
271,823,856
1
0
NOASSERTION
2020-06-12T14:56:41
2020-06-12T14:56:40
null
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.testing.fakedata.applib.services; public class Booleans extends AbstractRandomValueGenerator { public Booleans(final FakeDataService fakeDataService) { super(fakeDataService); } /** * Same as {@link #any()}. */ public boolean coinFlip() { return any(); } /** * Same as {@link #any()}. */ public boolean either() { return any(); } public boolean diceRollOf6() { return fake.ints().upTo(6) == 5; } public boolean any() { return fake.randomService.nextDouble() < 0.5; } }
[ "dan@haywood-associates.co.uk" ]
dan@haywood-associates.co.uk
1e5c9e6a7e23683be61907b2b467546e1c6dc1b3
82428498091f5b253a789f9b4caad1d58fbf8e78
/src/day12_JavaRecap/Scanner_Next.java
a9e8dc0cd6b97170720d0f45a878e2a45565667b
[]
no_license
Huri123/Spring2020B18_Java
c7136b967f4c45fe0b950ea744d457a6c5a1bdc2
424d3733cc9ecfd3bc288d96634e2b041a5cbdb8
refs/heads/master
2022-11-27T18:53:34.570757
2020-08-10T02:59:55
2020-08-10T02:59:55
286,362,312
0
0
null
null
null
null
UTF-8
Java
false
false
1,233
java
package day12_JavaRecap; // import PackageName.className; import java.util.Scanner; public class Scanner_Next { public static void main(String[] args) { Scanner input = new Scanner(System.in); // String str = scan.next(); // System.out.println(str); // next() only takes first word // 7921 JonesBranch Dr, McLean VA, 22034 String fullAddress = ""; System.out.println("Enter the number of the building: "); short Bnumber = input.nextShort(); fullAddress += Bnumber + " "; // fullAddress = fullAddress+Bnumber+" " System.out.println("Enter the Street Name: "); String streetName = input.next(); fullAddress += streetName + " "; System.out.println("Enter the type of the road"); String roadType = input.next(); fullAddress += roadType + ", "; System.out.println("Enter city name, state, zipcode"); String cityName = input.next(); fullAddress += cityName + " "; String state = input.next(); fullAddress += state + ", "; int zipCode = input.nextInt(); fullAddress += zipCode; System.out.println("Address is: " + fullAddress); } }
[ "hurioruc2019@gmail.com" ]
hurioruc2019@gmail.com
13143ef22e166d0397076e9b5a6eb9492faa4a74
fa68ebb9b6c7581ad2d9a131b24a38e0f81578fe
/src/test/java/test/com/pmrodrigues/android/allinshopping/services/TestProdutoService.java
06298802c00c7f912512b8bb9348c66b76a36d09
[]
no_license
marcelosrodrigues/allinshopping
99849d9d153aa8640beed75015cb08366dc9e08e
0a3d13793ee8ba185283708c204a019d06d45383
refs/heads/master
2016-09-06T07:07:03.938923
2015-01-16T18:51:30
2015-01-16T18:51:30
17,633,199
0
1
null
null
null
null
UTF-8
Java
false
false
1,957
java
package test.com.pmrodrigues.android.allinshopping.services; import com.pmrodrigues.android.allinshopping.MainActivity; import com.pmrodrigues.android.allinshopping.exceptions.IntegrationException; import com.pmrodrigues.android.allinshopping.integration.downloads.DownloadProdutos; import com.pmrodrigues.android.allinshopping.models.Produto; import com.pmrodrigues.android.allinshopping.repository.ImagemRepository; import com.pmrodrigues.android.allinshopping.repository.ProductRepository; import com.pmrodrigues.android.allinshopping.services.ProdutoService; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.robolectric.Robolectric; import org.robolectric.RobolectricTestRunner; import java.util.List; import java.util.ResourceBundle; import static org.junit.Assert.assertNotSame; @RunWith(RobolectricTestRunner.class) public class TestProdutoService { private ProdutoService service; private final ResourceBundle bundle = ResourceBundle.getBundle("json_message"); private final DownloadProdutos download = new DownloadProdutos("teste","teste"); private List<Produto> produtos; private ProductRepository repository; private ImagemRepository imageRepository; private MainActivity activity; @Before public void setup() throws IntegrationException { activity = Robolectric.buildActivity(MainActivity.class).create().get(); service = new ProdutoService(activity); repository = new ProductRepository(activity); imageRepository = new ImagemRepository(activity); Robolectric.getFakeHttpLayer().addPendingHttpResponse(200, bundle.getString("produto")); this.produtos = download.list(); } @Test public void save() { final Produto produto = produtos.get(0); service.save(produto); assertNotSame(0L , repository.count()); assertNotSame(produto.getImagens().size() , imageRepository.count()); } }
[ "marcelosrodrigues@globo.com" ]
marcelosrodrigues@globo.com
4164ff1457525e9d243be18c6a9d6be470bc4e86
097df92ce1bfc8a354680725c7d10f0d109b5b7d
/com/amazon/ws/emr/hadoop/fs/shaded/com/amazonaws/util/Md5Utils.java
73ea8bcf460f4e23238e06c7f614c65f6f6e6e6f
[]
no_license
cozos/emrfs-hadoop
7a1a1221ffc3aa8c25b1067cf07d3b46e39ab47f
ba5dfa631029cb5baac2f2972d2fdaca18dac422
refs/heads/master
2022-10-14T15:03:51.500050
2022-10-06T05:38:49
2022-10-06T05:38:49
233,979,996
2
2
null
2022-10-06T05:41:46
2020-01-15T02:24:16
Java
UTF-8
Java
false
false
2,339
java
package com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.util; import com.amazon.ws.emr.hadoop.fs.shaded.org.apache.commons.logging.Log; import com.amazon.ws.emr.hadoop.fs.shaded.org.apache.commons.logging.LogFactory; import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Md5Utils { private static final int SIXTEEN_K = 16384; public static byte[] computeMD5Hash(InputStream is) throws IOException { BufferedInputStream bis = new BufferedInputStream(is); try { MessageDigest messageDigest = MessageDigest.getInstance("MD5"); byte[] buffer = new byte['䀀']; int bytesRead; while ((bytesRead = bis.read(buffer, 0, buffer.length)) != -1) { messageDigest.update(buffer, 0, bytesRead); } return messageDigest.digest(); } catch (NoSuchAlgorithmException e) { throw new IllegalStateException(e); } finally { try { bis.close(); } catch (Exception e) { LogFactory.getLog(Md5Utils.class).debug("Unable to close input stream of hash candidate: " + e); } } } public static String md5AsBase64(InputStream is) throws IOException { return Base64.encodeAsString(computeMD5Hash(is)); } public static byte[] computeMD5Hash(byte[] input) { try { MessageDigest md = MessageDigest.getInstance("MD5"); return md.digest(input); } catch (NoSuchAlgorithmException e) { throw new IllegalStateException(e); } } public static String md5AsBase64(byte[] input) { return Base64.encodeAsString(computeMD5Hash(input)); } public static byte[] computeMD5Hash(File file) throws FileNotFoundException, IOException { return computeMD5Hash(new FileInputStream(file)); } public static String md5AsBase64(File file) throws FileNotFoundException, IOException { return Base64.encodeAsString(computeMD5Hash(file)); } } /* Location: * Qualified Name: com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.util.Md5Utils * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "Arwin.tio@adroll.com" ]
Arwin.tio@adroll.com
b3d37880e7b32c46cc29874966ec20fe79688202
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/JetBrains--intellij-community/4da7d7d94d990e15955ba14398d908997434816e/before/ChangeTo.java
fb59aeebdf9dd55645e1a6249611b86d01f2eb35
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
3,151
java
/* * Copyright 2000-2009 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.intellij.spellchecker.quickfixes; import com.intellij.codeInsight.lookup.LookupElement; import com.intellij.codeInsight.lookup.LookupElementBuilder; import com.intellij.codeInsight.lookup.LookupManager; import com.intellij.codeInspection.ProblemDescriptor; import com.intellij.codeInspection.ex.ProblemDescriptorImpl; import com.intellij.ide.util.EditSourceUtil; import com.intellij.openapi.actionSystem.Anchor; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.fileEditor.FileEditorManager; import com.intellij.openapi.fileEditor.OpenFileDescriptor; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.TextRange; import com.intellij.openapi.util.text.StringUtil; import com.intellij.pom.Navigatable; import com.intellij.psi.PsiElement; import com.intellij.spellchecker.util.SpellCheckerBundle; import org.jetbrains.annotations.NotNull; import java.util.ArrayList; import java.util.List; public class ChangeTo extends ShowSuggestions implements SpellCheckerQuickFix { public ChangeTo() { super(); } @NotNull public String getName() { return SpellCheckerBundle.message("change.to"); } @NotNull public String getFamilyName() { return SpellCheckerBundle.message("change.to"); } @NotNull public Anchor getPopupActionAnchor() { return Anchor.FIRST; } public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) { PsiElement element = descriptor.getPsiElement(); if (element == null) return; Navigatable navigatable = EditSourceUtil.getDescriptor(element); if (!(navigatable instanceof OpenFileDescriptor)) return; Editor editor = FileEditorManager.getInstance(project).openTextEditor((OpenFileDescriptor)navigatable, true); if (editor == null) { return; } TextRange textRange = ((ProblemDescriptorImpl)descriptor).getTextRange(); editor.getSelectionModel().setSelection(textRange.getStartOffset(), textRange.getEndOffset()); String word = editor.getSelectionModel().getSelectedText(); if (word == null || StringUtil.isEmpty(word)) { return; } List<LookupElement> lookupItems = new ArrayList<LookupElement>(); for (String variant : getSuggestions()) { lookupItems.add(LookupElementBuilder.create(variant)); } LookupElement[] items = new LookupElement[lookupItems.size()]; items = lookupItems.toArray(items); LookupManager lookupManager = LookupManager.getInstance(project); lookupManager.showLookup(editor, items); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
2a0dba4912aa75a4caeca323054e020f8b675266
ebb880c4d4495599495387d7e629efea5cbde127
/src/main/java/com/shangshufang/apiservice/entity/BusinessAnalyseLogEntity.java
e42c89de6a0a1a3f5e2fe73bb032f49bc6dbb8e2
[]
no_license
ShangShuFang/shangshufang.apiservice
18463052a2097cf1403b0da97e761ccba93dba43
3d86910238511e674b799623ff5d6e29fb437ddd
refs/heads/master
2021-06-27T19:52:49.113326
2021-03-05T08:13:01
2021-03-05T08:13:01
219,971,237
0
0
null
null
null
null
UTF-8
Java
false
false
540
java
package com.shangshufang.apiservice.entity; import lombok.Data; @Data public class BusinessAnalyseLogEntity extends BaseEntity { private int logID; private String cityIP; private String cityID; private String cityName; private String browser; private String portal; private String device; private String pageName; private String operationName; private String operationResult; private String operationType; private String memo; private int customerID; private String customerName; }
[ "johnny.q.zhang@outlook.com" ]
johnny.q.zhang@outlook.com
725d1a631fa36ee1dc5d45e79f0f1c5d5e43f4f5
821ed0666d39420d2da9362d090d67915d469cc5
/protocols/bgp/bgpio/src/test/java/org/onosproject/bgpio/types/attr/BgpPrefixAttrOpaqueDataTest.java
ac1e1d7c5146e5e6d22a19e8c6e753d944f89cf0
[ "Apache-2.0" ]
permissive
LenkayHuang/Onos-PNC-for-PCEP
03b67dcdd280565169f2543029279750da0c6540
bd7d201aba89a713f5ba6ffb473aacff85e4d38c
refs/heads/master
2021-01-01T05:19:31.547809
2016-04-12T07:25:13
2016-04-12T07:25:13
56,041,394
1
0
null
null
null
null
UTF-8
Java
false
false
1,487
java
/* * Copyright 2015 Open Networking Laboratory * * 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.onosproject.bgpio.types.attr; import org.junit.Test; import com.google.common.testing.EqualsTester; /** * Test for prefix attribute opaque data Tlv. */ public class BgpPrefixAttrOpaqueDataTest { private final byte[] array = new byte[] {0x01, 0x02, 0x03, 0x04}; private final byte[] array1 = new byte[] {0x01, 0x02, 0x03, 0x01}; private final BgpPrefixAttrOpaqueData isisData = BgpPrefixAttrOpaqueData .of(array); private final BgpPrefixAttrOpaqueData sameAsIsisData = BgpPrefixAttrOpaqueData .of(array); private final BgpPrefixAttrOpaqueData isisDiff = BgpPrefixAttrOpaqueData .of(array1); @Test public void basics() { new EqualsTester().addEqualityGroup(isisData, sameAsIsisData) .addEqualityGroup(isisDiff).testEquals(); } }
[ "826080529@qq.com" ]
826080529@qq.com
a0c634b2a2f530f7feb70fa08bd12187ae4b4ff9
450d2299c30eec353fcc6b0c578a84f9c1af77d5
/src/main/java/io/openmessaging/rocketmq/producer/AbstractOMSProducer.java
4670782404a522908c217feaa162148fbadd1ad0
[]
no_license
txazo/rocketmq
f9218b41fe4e2605e65ebcc72e1802e333fe97df
4b6fc93247dd33fd41db6901ed6acf474769f3b3
refs/heads/master
2021-07-06T06:47:57.618615
2017-09-30T04:46:52
2017-09-30T04:46:52
102,880,190
0
0
null
null
null
null
UTF-8
Java
false
false
6,019
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 io.openmessaging.rocketmq.producer; import io.openmessaging.*; import io.openmessaging.exception.OMSMessageFormatException; import io.openmessaging.exception.OMSNotSupportedException; import io.openmessaging.exception.OMSRuntimeException; import io.openmessaging.exception.OMSTimeOutException; import io.openmessaging.rocketmq.config.ClientConfig; import io.openmessaging.rocketmq.domain.BytesMessageImpl; import io.openmessaging.rocketmq.utils.BeanUtils; import org.apache.rocketmq.client.exception.MQBrokerException; import org.apache.rocketmq.client.exception.MQClientException; import org.apache.rocketmq.client.log.ClientLogger; import org.apache.rocketmq.client.producer.DefaultMQProducer; import org.apache.rocketmq.common.protocol.ResponseCode; import org.apache.rocketmq.remoting.exception.RemotingConnectException; import org.apache.rocketmq.remoting.exception.RemotingTimeoutException; import org.slf4j.Logger; import static io.openmessaging.rocketmq.utils.OMSUtil.buildInstanceName; abstract class AbstractOMSProducer implements ServiceLifecycle, MessageFactory { final static Logger log = ClientLogger.getLog(); final KeyValue properties; final DefaultMQProducer rocketmqProducer; private boolean started = false; final ClientConfig clientConfig; AbstractOMSProducer(final KeyValue properties) { this.properties = properties; this.rocketmqProducer = new DefaultMQProducer(); this.clientConfig = BeanUtils.populate(properties, ClientConfig.class); String accessPoints = clientConfig.getOmsAccessPoints(); if (accessPoints == null || accessPoints.isEmpty()) { throw new OMSRuntimeException("-1", "OMS AccessPoints is null or empty."); } this.rocketmqProducer.setNamesrvAddr(accessPoints.replace(',', ';')); this.rocketmqProducer.setProducerGroup(clientConfig.getRmqProducerGroup()); String producerId = buildInstanceName(); this.rocketmqProducer.setSendMsgTimeout(clientConfig.getOmsOperationTimeout()); this.rocketmqProducer.setInstanceName(producerId); this.rocketmqProducer.setMaxMessageSize(1024 * 1024 * 4); properties.put(PropertyKeys.PRODUCER_ID, producerId); } @Override public synchronized void startup() { if (!started) { try { this.rocketmqProducer.start(); } catch (MQClientException e) { throw new OMSRuntimeException("-1", e); } } this.started = true; } @Override public synchronized void shutdown() { if (this.started) { this.rocketmqProducer.shutdown(); } this.started = false; } OMSRuntimeException checkProducerException(String topic, String msgId, Throwable e) { if (e instanceof MQClientException) { if (e.getCause() != null) { if (e.getCause() instanceof RemotingTimeoutException) { return new OMSTimeOutException("-1", String.format("Send message to broker timeout, %dms, Topic=%s, msgId=%s", this.rocketmqProducer.getSendMsgTimeout(), topic, msgId), e); } else if (e.getCause() instanceof MQBrokerException || e.getCause() instanceof RemotingConnectException) { MQBrokerException brokerException = (MQBrokerException) e.getCause(); return new OMSRuntimeException("-1", String.format("Received a broker exception, Topic=%s, msgId=%s, %s", topic, msgId, brokerException.getErrorMessage()), e); } } // Exception thrown by local. else { MQClientException clientException = (MQClientException) e; if (-1 == clientException.getResponseCode()) { return new OMSRuntimeException("-1", String.format("Topic does not exist, Topic=%s, msgId=%s", topic, msgId), e); } else if (ResponseCode.MESSAGE_ILLEGAL == clientException.getResponseCode()) { return new OMSMessageFormatException("-1", String.format("A illegal message for RocketMQ, Topic=%s, msgId=%s", topic, msgId), e); } } } return new OMSRuntimeException("-1", "Send message to RocketMQ broker failed.", e); } protected void checkMessageType(Message message) { if (!(message instanceof BytesMessage)) { throw new OMSNotSupportedException("-1", "Only BytesMessage is supported."); } } @Override public BytesMessage createBytesMessageToTopic(final String topic, final byte[] body) { BytesMessage bytesMessage = new BytesMessageImpl(); bytesMessage.setBody(body); bytesMessage.headers().put(MessageHeader.TOPIC, topic); return bytesMessage; } @Override public BytesMessage createBytesMessageToQueue(final String queue, final byte[] body) { BytesMessage bytesMessage = new BytesMessageImpl(); bytesMessage.setBody(body); bytesMessage.headers().put(MessageHeader.QUEUE, queue); return bytesMessage; } }
[ "784990655@qq.com" ]
784990655@qq.com
50d96ec74520a2d38f77ceb15bc4ae73be580774
8227ef7a8506842cc2eac2ce72706efa1189f131
/apps/webapps/annonceur-webapp/src/main/java/fr/k2i/adbeback/webapp/bean/ChangePasswordBean.java
3f0fb971a80751d237091fbfd4e49f9e70efa527
[]
no_license
icudroid/addonf
a4fa46376cd259bb6b3d19c15e21592e1f4a93ce
442fba8e35592e94f7bd4a568c0c72078d13b33a
refs/heads/master
2021-01-11T08:51:33.154640
2018-01-16T14:36:49
2018-01-16T14:36:49
76,735,425
0
0
null
null
null
null
UTF-8
Java
false
false
401
java
package fr.k2i.adbeback.webapp.bean; import lombok.Data; import org.hibernate.validator.constraints.NotEmpty; import java.io.Serializable; /** * Created with IntelliJ IDEA. * User: dev * Date: 14/01/14 * Time: 21:39 * To change this template use File | Settings | File Templates. */ @Data public class ChangePasswordBean implements Serializable{ @NotEmpty private String password; }
[ "dimitri@d-kahn.net" ]
dimitri@d-kahn.net
edb796ac33cda5909632c9498813e44b63482ed1
c6ed09339ff21fa70f154f34328e869f0dd8e394
/java/spring/spring-web_async-sample/src/main/java/sample/service/AsyncService.java
61ea3fc83219d3d054930f4ca1e8a86b38e97ead
[]
no_license
fits/try_samples
f9b15b309a67f7274b505669db4486b17bd1678b
0986e22d78f35d57fe1dd94673b68a4723cb3177
refs/heads/master
2023-08-22T14:35:40.838419
2023-08-07T12:25:07
2023-08-07T12:25:07
642,078
30
19
null
2022-12-28T06:31:24
2010-05-02T02:23:55
Java
UTF-8
Java
false
false
505
java
package sample.service; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import java.util.concurrent.CompletableFuture; @Service public class AsyncService { @Async public CompletableFuture<String> exec() { try { Thread.sleep(2000); } catch (InterruptedException e) { e.printStackTrace(); } return CompletableFuture.completedFuture("async-sample: " + Thread.currentThread()); } }
[ "wadays_wozx@nifty.com" ]
wadays_wozx@nifty.com
3e80d14112350e747eeb65ec491b02826db7f446
c4c0bb558b4a273674a4ab2c18c7929c92fa583a
/old/es.uam.miso.modelado/src/branchDecision/BranchDecisionFactory.java
6846948855da4a2fd544d9470e5d2dc1dde8b8eb
[ "MIT" ]
permissive
vnmabus/ModellingBot
fb872a374dd8c1c235fa57e7b14f4fef8c91daba
85229f5998b9022d1ba8d028443023318cf7efe7
refs/heads/master
2020-04-18T18:31:21.143258
2018-12-11T15:48:09
2018-12-11T15:48:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,957
java
/** */ package branchDecision; import org.eclipse.emf.ecore.EFactory; /** * <!-- begin-user-doc --> * The <b>Factory</b> for the model. * It provides a create method for each non-abstract class of the model. * <!-- end-user-doc --> * @see branchDecision.BranchDecisionPackage * @generated */ public interface BranchDecisionFactory extends EFactory { /** * The singleton instance of the factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ BranchDecisionFactory eINSTANCE = branchDecision.impl.BranchDecisionFactoryImpl.init(); /** * Returns a new object of class '<em>Consensus</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Consensus</em>'. * @generated */ Consensus createConsensus(); /** * Returns a new object of class '<em>Round</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Round</em>'. * @generated */ Round createRound(); /** * Returns a new object of class '<em>Preference Ordering</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Preference Ordering</em>'. * @generated */ PreferenceOrdering createPreferenceOrdering(); /** * Returns a new object of class '<em>Order</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Order</em>'. * @generated */ Order createOrder(); /** * Returns a new object of class '<em>Admin Choice</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Admin Choice</em>'. * @generated */ AdminChoice createAdminChoice(); /** * Returns the package supported by this factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the package supported by this factory. * @generated */ BranchDecisionPackage getBranchDecisionPackage(); } //BranchDecisionFactory
[ "saraperezsoler@gmail.com" ]
saraperezsoler@gmail.com
7b1f3fc44b52a50c98893efc5ba74b131cf8fac7
563e39394d014c3e915d09d44a545646ac613f32
/ktv_landscape/src/main/java/com/beidousat/karaoke/widget/adapter/AdtHyun.java
56e17cb3e56d095a95dc80deaf0b9f3002c70472
[]
no_license
androidok/KTV
ca6378027e2382bf12af770ceaebec1221b53385
c9054e244e534187d135eaac9dc1b25f8d13b693
refs/heads/master
2022-04-02T11:33:27.193851
2020-01-02T09:07:35
2020-01-02T09:07:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,302
java
package com.beidousat.karaoke.widget.adapter; import android.content.Context; import android.support.annotation.NonNull; import android.support.v7.widget.RecyclerView; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.beidousat.karaoke.R; import com.beidousat.karaoke.VodApplication; import com.bestarmedia.libcommon.model.vod.play.Hyun; import com.bestarmedia.libwidget.image.RecyclerImageView; import com.bestarmedia.libwidget.util.GlideUtils; import java.util.ArrayList; import java.util.List; public class AdtHyun extends RecyclerView.Adapter<AdtHyun.ViewHolder> { private Context mContext; private LayoutInflater mInflater; private List<Hyun> mData = new ArrayList<>(); public AdtHyun(Context context) { mContext = context; mInflater = LayoutInflater.from(context); } public void setData(List<Hyun> data) { this.mData = data; } public static class ViewHolder extends RecyclerView.ViewHolder { private RecyclerImageView rvImage, rvSelected; private ViewHolder(View view) { super(view); } } @Override public int getItemCount() { return mData.size(); } @NonNull @Override public ViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) { View view = mInflater.inflate(R.layout.list_item_hyun, viewGroup, false); ViewHolder viewHolder = new ViewHolder(view); viewHolder.rvImage = view.findViewById(R.id.iv_image); viewHolder.rvSelected = view.findViewById(R.id.iv_image_selected); return viewHolder; } @Override public void onBindViewHolder(@NonNull ViewHolder holder, int position) { final Hyun hyun = mData.get(position); holder.rvSelected.setImageResource(VodApplication.getKaraokeController().getCoolScreenStatus().currentId == hyun.id ? R.drawable.play_scenes_s : 0); GlideUtils.LoadImage(mContext, !TextUtils.isEmpty(hyun.thumbnailUrl) ? hyun.thumbnailUrl : hyun.thumbnail, R.drawable.play_hyun_no, R.drawable.play_hyun_no, false, holder.rvImage); holder.itemView.setOnClickListener(v -> VodApplication.getKaraokeController().setCoolScreen(hyun.id, hyun.fileUrl)); } }
[ "40749627+lisimian0626@users.noreply.github.com" ]
40749627+lisimian0626@users.noreply.github.com
672c426b00227461af4202acae1101985b1b794a
e3a37aaf17ec41ddc7051f04b36672db62a7863d
/aggregation/robot/src/main/java/com/iot/robot/rabbit/consumer/device/DeviceDeleteConsumer.java
c9a7e70e14e0809f13daa8201ec9a0efcc119407
[]
no_license
github4n/cloud
68477a7ecf81d1526b1b08876ca12cfe575f7788
7974042dca1ee25b433177e2fe6bda1de28d909a
refs/heads/master
2020-04-18T02:04:33.509889
2019-01-13T02:19:32
2019-01-13T02:19:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,935
java
package com.iot.robot.rabbit.consumer.device; import com.iot.common.mq.core.AbsPoolConsumer; import com.iot.common.mq.enums.ExchangeTypeEnum; import com.iot.common.mq.process.AbsMessageProcess; import com.iot.robot.rabbit.constant.DeviceQueueConstant; import com.iot.shcs.device.queue.bean.DeviceDeleteMessage; import com.iot.shcs.device.queue.utils.DeviceQueueConstants; import lombok.extern.slf4j.Slf4j; import org.springframework.amqp.rabbit.connection.ConnectionFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import javax.annotation.PostConstruct; /** * @Descrpiton: 订阅 设备删除 队列 * @Author: yuChangXing * @Date: 2018/10/13 13:54 * @Modify by: */ @Slf4j @Component public class DeviceDeleteConsumer extends AbsPoolConsumer<DeviceDeleteMessage> { @Autowired ConnectionFactory connectionFactory; @Autowired DeviceDeleteProcess deviceDeleteProcess; @Override public Class<DeviceDeleteMessage> initClazz() { return DeviceDeleteMessage.class; } @Override public int setThreadCount() { return 10; } @Override public int setIntervalMils() { return 0; } @Override public AbsMessageProcess<DeviceDeleteMessage> messageProcess() { return deviceDeleteProcess; } @Override public ConnectionFactory connectionFactory() { return connectionFactory; } @Override public String exchange() { return DeviceQueueConstants.DEVICE_DELETE_EXCHANGE; } @Override public String routing() { return ""; } @Override public String queue() { return DeviceQueueConstant.DEVICE_DELETE_QUEUE; } @Override public ExchangeTypeEnum type() { return ExchangeTypeEnum.FANOUT; } @Override @PostConstruct public void init() { super.preInit(); } }
[ "qizhiyong@LDS-Z-C5497.LEEDARSON.LOCAL" ]
qizhiyong@LDS-Z-C5497.LEEDARSON.LOCAL
5e45dc2d78377e7ff27367eb51c294dde28d5d91
b3a694913d943bdb565fbf828d6ab8a08dd7dd12
/sources/p365r/p368b/C4426a.java
f9be8bbbc9911b3f045bb608fa99279f26061b8c
[]
no_license
v1ckxy/radar-covid
feea41283bde8a0b37fbc9132c9fa5df40d76cc4
8acb96f8ccd979f03db3c6dbfdf162d66ad6ac5a
refs/heads/master
2022-12-06T11:29:19.567919
2020-08-29T08:00:19
2020-08-29T08:00:19
294,198,796
1
0
null
2020-09-09T18:39:43
2020-09-09T18:39:43
null
UTF-8
Java
false
false
1,572
java
package p365r.p368b; import p390t.p391a.C4547a; /* renamed from: r.b.a */ public final class C4426a<T> implements C4547a<T> { /* renamed from: c */ public static final Object f10525c = new Object(); /* renamed from: a */ public volatile C4547a<T> f10526a; /* renamed from: b */ public volatile Object f10527b = f10525c; public C4426a(C4547a<T> aVar) { this.f10526a = aVar; } /* renamed from: a */ public static Object m10002a(Object obj, Object obj2) { if (!(obj != f10525c) || obj == obj2) { return obj2; } StringBuilder sb = new StringBuilder(); sb.append("Scoped provider was invoked recursively returning different results: "); sb.append(obj); sb.append(" & "); sb.append(obj2); sb.append(". This is likely due to a circular dependency."); throw new IllegalStateException(sb.toString()); } /* renamed from: a */ public static <P extends C4547a<T>, T> C4547a<T> m10003a(P p) { if (p != null) { return p instanceof C4426a ? p : new C4426a(p); } throw null; } public T get() { T t = this.f10527b; if (t == f10525c) { synchronized (this) { t = this.f10527b; if (t == f10525c) { t = this.f10526a.get(); m10002a(this.f10527b, t); this.f10527b = t; this.f10526a = null; } } } return t; } }
[ "josemmoya@outlook.com" ]
josemmoya@outlook.com
c2b4829981caf2bcc4e596d69ca4b0be6a624451
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/18/18_684f9493e484265962eb722f9e45338a5f9db1da/LauncherUpdateDialog/18_684f9493e484265962eb722f9e45338a5f9db1da_LauncherUpdateDialog_s.java
7637ebb4d0302a54181cc9765d00807ca1ad35d1
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,513
java
/** * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 3 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ package truelauncher.launcher; import java.awt.Color; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.BorderFactory; import javax.swing.JDialog; import javax.swing.JPanel; import javax.swing.JProgressBar; import truelauncher.config.AllSettings; import truelauncher.gcomponents.TButton; import truelauncher.gcomponents.TLabel; import truelauncher.main.GUI; @SuppressWarnings("serial") public class LauncherUpdateDialog extends JDialog { private String labelimage = "images/labelbar.png"; Object result; int w = 250; int h = 90; public TButton ldownload; public JProgressBar lpbar; public TLabel lstatus; TButton later; JPanel panel; GUI parent; private LauncherUpdateDialog thisclass = this; public LauncherUpdateDialog(GUI parent) { super(parent.f, true); this.parent = parent; this.setUndecorated(true); this.setLayout(null); } public void open() { setResizable(false); setSize(w,h); setLocationRelativeTo(parent); initUI(); setVisible(true); } private void initUI() { panel = new JPanel(); panel.setBounds(0, 0, this.w, this.h); panel.setLayout(null); panel.setBorder(BorderFactory.createEtchedBorder(Color.GRAY, Color.GRAY)); this.add(panel); lstatus = new TLabel(); lstatus.setBounds(2,2,w-4,24); lstatus.setBackgroundImage(GUI.class.getResourceAsStream(labelimage)); lstatus.setText("Доступно обновление лаунчера"); lstatus.setHorizontalAlignment(TLabel.CENTER); panel.add(lstatus); lpbar = new JProgressBar(); lpbar.setBounds(2,26,w-4, 14); panel.add(lpbar); ldownload = new TButton(); ldownload.setText("Обновить"); ldownload.setBounds(2, 40, w-4, 25); ldownload.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { lstatus.setText("Скачиваем обновление"); ldownload.setEnabled(false); later.setEnabled(false); new LauncherUpdateThread(thisclass, AllSettings.getLauncherWebUpdateURLFolder()+"Launcher.jar").start(); } }); panel.add(ldownload); later = new TButton(); later.setText("Позже"); later.setBounds(2,65,w-4,23); later.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { parent.f.getGlassPane().setVisible(false); thisclass.dispose(); } }); panel.add(later); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
3209df5f06d046c7cd00f76a67114b17daffe6a5
bbfa56cfc81b7145553de55829ca92f3a97fce87
/plugins/org.ifc4emf.metamodel.ifc/src/IFC2X3/IfcGeometricCurveSet.java
59a2573e0db706038bba3b254fe370f3d6839058
[]
no_license
patins1/raas4emf
9e24517d786a1225344a97344777f717a568fdbe
33395d018bc7ad17a0576033779dbdf70fa8f090
refs/heads/master
2021-08-16T00:27:12.859374
2021-07-30T13:01:48
2021-07-30T13:01:48
87,889,951
1
0
null
null
null
null
UTF-8
Java
false
false
587
java
/** * <copyright> * </copyright> * * $Id$ */ package IFC2X3; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import IFC2X3.jaxb.IfcGeometricCurveSetImplAdapter; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Ifc Geometric Curve Set</b></em>'. * <!-- end-user-doc --> * * * @see IFC2X3.IFC2X3Package#getIfcGeometricCurveSet() * @model * @generated */ @XmlJavaTypeAdapter(IfcGeometricCurveSetImplAdapter.class) public interface IfcGeometricCurveSet extends IfcGeometricSet { } // IfcGeometricCurveSet
[ "patins@f81cfaeb-dc96-476f-bd6d-b0d16e38694e" ]
patins@f81cfaeb-dc96-476f-bd6d-b0d16e38694e
90914339ee6bd17fa399ddfa449ad5259b3287a2
7b12f67da8c10785efaebe313547a15543a39c77
/jjg-common-db/src/main/java/com/jjg/trade/model/form/EsWxMobileLoginForm.java
5f6d3adfa9da3a4e7be04558e89e01cf76c6270a
[]
no_license
liujinguo1994/xdl-jjg
071eaa5a8fb566db6b47dbe046daf85dd2b9bcd8
051da0a0dba18e6e5021ecb4ef3debca16b01a93
refs/heads/master
2023-01-06T09:11:30.487559
2020-11-06T14:42:45
2020-11-06T14:42:45
299,525,315
1
3
null
null
null
null
UTF-8
Java
false
false
761
java
package com.jjg.trade.model.form; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import javax.validation.constraints.NotBlank; import java.io.Serializable; /** * applet登录表单 */ @Data @ApiModel public class EsWxMobileLoginForm implements Serializable { private static final long serialVersionUID = 3781140078146967600L; /** * 手机号 */ @ApiModelProperty(required = true,value = "手机号") @NotBlank(message = "手机号不能为空") private String mobile; /** * 临时登录凭证 */ @ApiModelProperty(required = true,value = "临时登录凭证") @NotBlank(message = "临时登录凭证不能为空") private String code; }
[ "344009799@qq.com" ]
344009799@qq.com
c8d8a26752edc634fcdb7559e38a133706bb7d1e
8f5f662ecfc5b6b786cedae54bc89809bdc7367a
/Afw/src/main/java/yuku/afw/widget/EasyAdapter.java
1c94f4f1e8e288f64128f1d1f21026463ed87932
[ "Apache-2.0", "LicenseRef-scancode-free-unknown" ]
permissive
mpmysight/androidbible
5296a1221e6f207b24e4a4630dd950ed79969ad0
9b97277511bb89d8828c7a60c135ac5a499c0113
refs/heads/develop
2021-01-17T23:03:51.343495
2018-05-16T17:07:55
2018-05-16T17:07:55
56,931,582
0
0
Apache-2.0
2018-05-16T17:07:56
2016-04-23T17:22:15
Java
UTF-8
Java
false
false
1,230
java
package yuku.afw.widget; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; public abstract class EasyAdapter extends BaseAdapter { public static final String TAG = EasyAdapter.class.getSimpleName(); @Override public Object getItem(int position) { return null; } @Override public long getItemId(int position) { return position; } @Override public View getView(int position, View convertView, ViewGroup parent) { if (convertView == null) { convertView = newView(position, parent); } bindView(convertView, position, parent); return convertView; } @Override public View getDropDownView(int position, View convertView, ViewGroup parent) { if (convertView == null) { convertView = newDropDownView(position, parent); } bindDropDownView(convertView, position, parent); return convertView; } public View newDropDownView(int position, ViewGroup parent) { return newView(position, parent); } public void bindDropDownView(View view, int position, ViewGroup parent) { bindView(view, position, parent); } public abstract View newView(int position, ViewGroup parent); public abstract void bindView(View view, int position, ViewGroup parent); }
[ "yukuku@gmail.com" ]
yukuku@gmail.com
bcddb46da35c0181854739b1baee552985fdbf9b
a85d2dccd5eab048b22b2d66a0c9b8a3fba4d6c2
/rebellion_h5_realm/java/l2r/gameserver/network/clientpackets/RequestExMoveToLocationAirShip.java
ad5c444ca0e53c213517ac895cc9049c45a7359e
[]
no_license
netvirus/reb_h5_storm
96d29bf16c9068f4d65311f3d93c8794737d4f4e
861f7845e1851eb3c22d2a48135ee88f3dd36f5c
refs/heads/master
2023-04-11T18:23:59.957180
2021-04-18T02:53:10
2021-04-18T02:53:10
252,070,605
0
0
null
2021-04-18T02:53:11
2020-04-01T04:19:39
HTML
UTF-8
Java
false
false
1,662
java
package l2r.gameserver.network.clientpackets; import l2r.gameserver.model.Player; import l2r.gameserver.model.entity.boat.ClanAirShip; /** * Format: d d|dd */ public class RequestExMoveToLocationAirShip extends L2GameClientPacket { private int _moveType; private int _param1, _param2; @Override protected void readImpl() { _moveType = readD(); switch(_moveType) { case 4: // AirShipTeleport _param1 = readD() + 1; break; case 0: // Free move _param1 = readD(); _param2 = readD(); break; case 2: // Up readD(); //? readD(); //? break; case 3: //Down readD(); //? readD(); //? break; } } @Override protected void runImpl() { Player player = getClient().getActiveChar(); if(player == null || player.getBoat() == null || !player.getBoat().isClanAirShip()) return; ClanAirShip airship = (ClanAirShip) player.getBoat(); if(airship.getDriver() == player) switch(_moveType) { case 4: // AirShipTeleport airship.addTeleportPoint(player, _param1); break; case 0: // Free move if(!airship.isCustomMove()) break; if (_param1 > -166168) // only gracia allowed break; airship.moveToLocation(airship.getLoc().setX(_param1).setY(_param2), 0, false); break; case 2: // Up if(!airship.isCustomMove()) break; airship.moveToLocation(airship.getLoc().changeZ(100), 0, false); break; case 3: // Down if(!airship.isCustomMove()) break; airship.moveToLocation(airship.getLoc().changeZ(-100), 0, false); break; } } }
[ "l2agedev@gmail.com" ]
l2agedev@gmail.com
23b2e1225bf66da79a73bb9cd49a584711e52efe
005fcf8ac7bb289b0f97f842dcb4d07581eaedc0
/src/day06_arithmetic_operators/CalculateAge.java
7cd55d8f20ad2dc00444933b0a0230a90d4c6e81
[]
no_license
VladislavShekhovsev/java-programming
6b780641a4243071716d1fdebe9ce3689c56d4de
f2e3f87a8aee3e465e78deac741957ace794e164
refs/heads/master
2023-05-27T00:09:03.613616
2021-06-20T15:23:40
2021-06-20T15:23:40
365,674,623
0
0
null
2021-05-28T02:16:23
2021-05-09T05:27:57
Java
UTF-8
Java
false
false
282
java
package day06_arithmetic_operators; public class CalculateAge { public static void main(String[] args) { int yearOfBirth = 1988; int currentYear = 2020; int age = currentYear - yearOfBirth; System.out.println("i am "+age+" years old"); } }
[ "vladislav13457@gmail.com" ]
vladislav13457@gmail.com
ba31a59acd8ab580c327597064c8e6e593cf7464
ca135cefb9097e57f648d8f7ebf17238c658bd33
/basex-core/src/main/java/org/basex/query/value/item/Dummy.java
5cf3435571d163edc9d98d68c4a4f110b71b8744
[ "BSD-3-Clause" ]
permissive
ra2003/basex
2afc7d9fe7f9d21c59c5282748e6c3dea4a202de
47a38a644b3dca585418b68dbc8bc63165a7697a
refs/heads/master
2022-08-12T01:14:24.710154
2020-05-20T08:46:09
2020-05-20T08:46:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,767
java
package org.basex.query.value.item; import org.basex.data.*; import org.basex.query.*; import org.basex.query.util.collation.*; import org.basex.query.value.type.*; import org.basex.util.*; /** * Dummy item (only used at compile time). * * @author BaseX Team 2005-20, BSD License * @author Christian Gruen */ public final class Dummy extends Item { /** Data reference (can be {@code null}). */ private final Data data; /** * Constructor. * @param type type * @param data data reference (can be {@code null}) */ public Dummy(final Type type, final Data data) { super(type); this.data = data; } @Override public Data data() { return data; } @Override public byte[] string(final InputInfo ii) { throw Util.notExpected(); } @Override public boolean bool(final InputInfo ii) { throw Util.notExpected(); } @Override public boolean eq(final Item item, final Collation coll, final StaticContext sc, final InputInfo ii) { throw Util.notExpected(); } @Override public boolean sameKey(final Item item, final InputInfo ii) { throw Util.notExpected(); } @Override public int diff(final Item item, final Collation coll, final InputInfo ii) { throw Util.notExpected(); } @Override public String toJava() { throw Util.notExpected(); } @Override public boolean equals(final Object obj) { throw Util.notExpected(); } @Override public void plan(final QueryPlan plan) { throw Util.notExpected(); } @Override public String toString() { final StringBuilder sb = new StringBuilder(Util.className(this)).append('(').append(type); if(data != null) sb.append(", db: ").append(data.meta.name); return sb.append(')').toString(); } }
[ "christian.gruen@gmail.com" ]
christian.gruen@gmail.com
db12dad0d7b25d9786fa71c9d17c38617ba9299e
c46304a8d962b6bea66bc6e4ef04b908bdb0dc97
/src/main/java8/net/finmath/timeseries/models/parametric/package-info.java
a58457cf4011574765a438202a27de9bf075a0ce
[ "Apache-2.0", "LicenseRef-scancode-mit-old-style", "LicenseRef-scancode-warranty-disclaimer", "LGPL-2.0-or-later" ]
permissive
finmath/finmath-lib
93f0f67e7914e76bbdc4e32c6dddce9eba4f50a4
b80aba56bdf6b93551d966503d5b399409c36bff
refs/heads/master
2023-08-04T09:28:21.146535
2023-07-26T17:18:45
2023-07-26T17:18:45
8,832,601
459
211
Apache-2.0
2023-07-21T13:28:03
2013-03-17T10:00:22
Java
UTF-8
Java
false
false
137
java
/** * Classes related to estimation of time series. * * @author Christian Fries */ package net.finmath.timeseries.models.parametric;
[ "email@christian-fries.de" ]
email@christian-fries.de
f1b40fa91b7c3310d9d46a46ada019b15e829b89
0adcb787c2d7b3bbf81f066526b49653f9c8db40
/src/main/java/com/alipay/api/domain/AlisisReportRow.java
559fe941891d73bb965b9f0903a6efa5f019608b
[ "Apache-2.0" ]
permissive
yikey/alipay-sdk-java-all
1cdca570c1184778c6f3cad16fe0bcb6e02d2484
91d84898512c5a4b29c707b0d8d0cd972610b79b
refs/heads/master
2020-05-22T13:40:11.064476
2019-04-11T14:11:02
2019-04-11T14:11:02
186,365,665
1
0
null
2019-05-13T07:16:09
2019-05-13T07:16:08
null
UTF-8
Java
false
false
773
java
package com.alipay.api.domain; import java.util.List; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; /** * 报表行对象 * * @author auto create * @since 1.0, 2016-10-28 10:26:15 */ public class AlisisReportRow extends AlipayObject { private static final long serialVersionUID = 3511116392452128386L; /** * 报表行信息,每个对象是一列的数据 */ @ApiListField("row_data") @ApiField("alisis_report_column") private List<AlisisReportColumn> rowData; public List<AlisisReportColumn> getRowData() { return this.rowData; } public void setRowData(List<AlisisReportColumn> rowData) { this.rowData = rowData; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
e4c11bfd10da9f5fbcda4616db3829f26d84cc24
2e03da8505fba2f5fba0aa96096240cfe1584490
/crunchyroll/crunchyroll2-0-3/com/google/common/base/Charsets.java
864a640b9693034401f41a60c5fb8100b9d5c93d
[]
no_license
JairoBm13/crunchywomod
c00f8535a76ee7a5e0554d766ddc08b608e57f9b
90ad43cdf12e41fc6ff2323ec5d6d94cc45a1c52
refs/heads/master
2021-01-20T14:48:30.312526
2017-05-08T21:37:16
2017-05-08T21:37:16
90,674,385
2
0
null
null
null
null
UTF-8
Java
false
false
696
java
// // Decompiled by Procyon v0.5.30 // package com.google.common.base; import java.nio.charset.Charset; public final class Charsets { public static final Charset ISO_8859_1; public static final Charset US_ASCII; public static final Charset UTF_16; public static final Charset UTF_16BE; public static final Charset UTF_16LE; public static final Charset UTF_8; static { US_ASCII = Charset.forName("US-ASCII"); ISO_8859_1 = Charset.forName("ISO-8859-1"); UTF_8 = Charset.forName("UTF-8"); UTF_16BE = Charset.forName("UTF-16BE"); UTF_16LE = Charset.forName("UTF-16LE"); UTF_16 = Charset.forName("UTF-16"); } }
[ "j.bautista.m13@outlook.com" ]
j.bautista.m13@outlook.com
58b699073743aafa8c4d6ea93dc063145c23637f
07e4aff946b260f9d66e1d9799b727726a3b79d6
/src/com/jabava/service/hro/ChangeService.java
4a65c4967b8bb1f320209e20961483ce162aa26c
[]
no_license
hellnxue/My-Jabava
8ee83ad452759604ef05f37bf8f7821f0cdbfacb
55b42a78dadfd46a472b402951275ab22fd7746a
refs/heads/master
2020-12-09T02:56:23.531507
2016-10-17T06:28:12
2016-10-17T06:28:12
55,762,958
0
0
null
null
null
null
UTF-8
Java
false
false
694
java
/** * */ package com.jabava.service.hro; import java.util.List; import java.util.Map; import com.jabava.pojo.hro.HroOrderSend; import com.jabava.utils.Page; /** * * * @version $Id: ChangeService.java, * v 0.1 2016年1月11日 下午4:38:58 * <pre> * @author steven.chen * @date 2016年1月11日 下午4:38:58 * </pre> */ public interface ChangeService { public HroOrderSend selectOrderSendById(Long id) ; public String addChange(HroOrderSend hroOrderSend,Long companyId)throws Exception ; List<HroOrderSend> findChangePage(Page<HroOrderSend> page, HroOrderSend hroOrderSend); List<Map<String,Object>> loadDetail(HroOrderSend hos, String type) throws Exception; }
[ "1032755304@qq.com" ]
1032755304@qq.com
f828d4a1d9ea7fbe61d1fec6ca69e831084dd257
b047e35706a15d5ae2b9dcfc1384e93920ec9a6a
/src/pl/froger/hellointents/MainActivity.java
258e7c5d6f2bd8800f66c900bcf04b173ffdacce
[]
no_license
krasnoludkolo/HelloIntents
beccc5358bae4bd902deb1a6ec3ccf0e5eadbe64
e716115b614df178c97120a4a4f22a27e2d11f1f
refs/heads/master
2020-04-28T01:32:47.510951
2011-07-25T14:41:07
2011-07-25T14:41:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,258
java
package pl.froger.hellointents; import java.util.List; import android.app.Activity; import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.net.Uri; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.TextView; import android.widget.Toast; public class MainActivity extends Activity { private static final int THIRD_ACTIVITY_REQUEST_CODE = 1; private Button btnOpenActivity; private Button btnOpenActivityForResponse; private Button btnOpenUrl; private Button btnOpenGeo; private TextView tvResult; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); btnOpenActivity = (Button) findViewById(R.id.btnOpenActivity); btnOpenActivityForResponse = (Button) findViewById(R.id.btnOpenActivityForResponse); btnOpenGeo = (Button) findViewById(R.id.btnOpenGeo); btnOpenUrl = (Button) findViewById(R.id.btnOpenUrl); tvResult = (TextView) findViewById(R.id.tvResult); initButtonsOnClickListeners(); } private void initButtonsOnClickListeners() { btnOpenActivity.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { openSecondActivity(); } }); btnOpenActivityForResponse.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { openActivityForResult(); } }); btnOpenGeo.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { openGeoUriAddress(); } }); btnOpenUrl.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { openUrlAddress(); } }); } private void openSecondActivity() { Intent intent = new Intent(getApplicationContext(), SecondActivity.class); startActivity(intent); } private void openActivityForResult() { Intent intent = new Intent(getApplicationContext(), ThirdActivity.class); startActivityForResult(intent, THIRD_ACTIVITY_REQUEST_CODE); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (THIRD_ACTIVITY_REQUEST_CODE == requestCode) { String response = data.getStringExtra(ThirdActivity.RESPONSE); insertResponse(response); } } private void insertResponse(String response) { tvResult.setText(response); } private void openUrlAddress() { Uri url = Uri.parse("http://www.google.com"); Intent intent = new Intent(Intent.ACTION_VIEW, url); startActivity(intent); } private void openGeoUriAddress() { Uri geoUri = Uri.parse("geo:50.07,19.97"); Intent intent = new Intent(Intent.ACTION_VIEW, geoUri); if(isIntentAvailable(intent)) { startActivity(intent); } else { Toast.makeText(getApplicationContext(), "Your system hasn't necessary application for this intent", Toast.LENGTH_LONG) .show(); } } private boolean isIntentAvailable(Intent intent) { PackageManager packageManager = getApplicationContext().getPackageManager(); List<ResolveInfo> resolveInfo = packageManager.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY); return resolveInfo.size() > 0; } }
[ "froger.mcs@gmail.com" ]
froger.mcs@gmail.com
d0dd617eb8d795d1967c4679d61a33a8f5d36d63
e34f5f7c63bfb57a4d4e60bd3c7fea36008b580e
/service/src/main/java/au/com/project/sample/services/admin/getcountry/GetCountryManager.java
1e308c70834f254206f97d0cc319b1c6b48b15d5
[]
no_license
bennettjosephb/practice
6e7b0e29a43780d773b930f6c611a39d92e39c1d
1e85de95ac827aae436b2c017de39f82b7882af8
refs/heads/master
2021-01-19T10:03:20.219300
2014-03-01T04:33:59
2014-03-01T04:33:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,472
java
package au.com.project.sample.services.admin.getcountry; import java.util.ArrayList; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import au.com.project.sample.process.CountryController; import au.com.project.sample.process.impl.dto.CountryDTO; import au.com.project.sample.services.model.CountryInfo; public class GetCountryManager { @Autowired private CountryController countryController; private List<CountryInfo> updateCountryInfo(List<CountryDTO> getCountryRequest) { List<CountryInfo> countryInfo = new ArrayList<CountryInfo>(); // CountryInfo country = getCountryRequest.getMessage().getCountryInfo(); // countryDTO.setCode(country.getCode()); // countryDTO.setName(country.getName()); return countryInfo; } public GetCountryResponse getCountryResponse( GetCountryRequest getCountryRequest) { GetCountryResponse getCountryResponse = new GetCountryResponse(); getCountryResponse.setMessage(new GetCountryResponse.Message()); // updateCountryInfo(countryController.findAllCountry()); getCountryResponse.getMessage().getCountryInfo().addAll(updateCountryInfo(countryController.findAllCountry())); // getCountryResponse.getMessage().setStatus(true); return getCountryResponse; } public CountryController getCountryController() { return countryController; } public void setCountryController(CountryController countryController) { this.countryController = countryController; } }
[ "bennettjosephb@gmail.com" ]
bennettjosephb@gmail.com
77df19e06a65857804e5323f40038c333f297319
a5dbeadebfd268a529d6a012fb23dc0b635f9b8c
/core/src/main/java/ru/mipt/cybersecurity/pqc/asn1/XMSSKeyParams.java
6b6aff34a7120bea286d8b121ddf792dca172174
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
skhvostyuk/CyberSecurity
22f6a272e38b56bfb054aae0dd7aa03bc96b6d06
33ea483df41973984d0edbe47a20201b204150aa
refs/heads/master
2021-08-29T04:44:31.041415
2017-12-13T12:15:29
2017-12-13T12:15:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,940
java
package ru.mipt.cybersecurity.pqc.asn1; import ru.mipt.cybersecurity.asn1.ASN1EncodableVector; import ru.mipt.cybersecurity.asn1.ASN1Integer; import ru.mipt.cybersecurity.asn1.ASN1Object; import ru.mipt.cybersecurity.asn1.ASN1Primitive; import ru.mipt.cybersecurity.asn1.ASN1Sequence; import ru.mipt.cybersecurity.asn1.DERSequence; import ru.mipt.cybersecurity.asn1.x509.AlgorithmIdentifier; /** * XMSSKeyParams * <pre> * XMSSKeyParams ::= SEQUENCE { * version INTEGER -- 0 * height INTEGER * treeDigest AlgorithmIdentifier * } * </pre> */ public class XMSSKeyParams extends ASN1Object { private final ASN1Integer version; private final int height; private final AlgorithmIdentifier treeDigest; public XMSSKeyParams(int height, AlgorithmIdentifier treeDigest) { this.version = new ASN1Integer(0); this.height = height; this.treeDigest = treeDigest; } private XMSSKeyParams(ASN1Sequence sequence) { this.version = ASN1Integer.getInstance(sequence.getObjectAt(0)); this.height = ASN1Integer.getInstance(sequence.getObjectAt(1)).getValue().intValue(); this.treeDigest = AlgorithmIdentifier.getInstance(sequence.getObjectAt(2)); } public static XMSSKeyParams getInstance(Object o) { if (o instanceof XMSSKeyParams) { return (XMSSKeyParams)o; } else if (o != null) { return new XMSSKeyParams(ASN1Sequence.getInstance(o)); } return null; } public int getHeight() { return height; } public AlgorithmIdentifier getTreeDigest() { return treeDigest; } public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(version); v.add(new ASN1Integer(height)); v.add(treeDigest); return new DERSequence(v); } }
[ "hvostuksergey@gmail.com" ]
hvostuksergey@gmail.com
aaf1acf8874533a5208777f87c2d90ffd7f892cd
a744882fb7cf18944bd6719408e5a9f2f0d6c0dd
/sourcecode7/src/java/awt/ColorPaintContext.java
c79e2b30eeca83ae08f97693a4442fe374833958
[ "Apache-2.0" ]
permissive
hanekawasann/learn
a39b8d17fd50fa8438baaa5b41fdbe8bd299ab33
eef678f1b8e14b7aab966e79a8b5a777cfc7ab14
refs/heads/master
2022-09-13T02:18:07.127489
2020-04-26T07:58:35
2020-04-26T07:58:35
176,686,231
0
0
Apache-2.0
2022-09-01T23:21:38
2019-03-20T08:16:05
Java
UTF-8
Java
false
false
2,784
java
/* * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code 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 * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package java.awt; import java.awt.image.ColorModel; import java.awt.image.Raster; import java.awt.image.WritableRaster; import sun.awt.image.IntegerComponentRaster; import java.util.Arrays; class ColorPaintContext implements PaintContext { int color; WritableRaster savedTile; protected ColorPaintContext(int color, ColorModel cm) { this.color = color; } public void dispose() { } /* * Returns the RGB value representing the color in the default sRGB * {@link ColorModel}. * (Bits 24-31 are alpha, 16-23 are red, 8-15 are green, 0-7 are * blue). * @return the RGB value of the color in the default sRGB * <code>ColorModel</code>. * @see java.awt.image.ColorModel#getRGBdefault * @see #getRed * @see #getGreen * @see #getBlue */ int getRGB() { return color; } public ColorModel getColorModel() { return ColorModel.getRGBdefault(); } public synchronized Raster getRaster(int x, int y, int w, int h) { WritableRaster t = savedTile; if (t == null || w > t.getWidth() || h > t.getHeight()) { t = getColorModel().createCompatibleWritableRaster(w, h); IntegerComponentRaster icr = (IntegerComponentRaster) t; Arrays.fill(icr.getDataStorage(), color); // Note - markDirty is probably unnecessary since icr is brand new icr.markDirty(); if (w <= 64 && h <= 64) { savedTile = t; } } return t; } }
[ "763803382@qq.com" ]
763803382@qq.com
1e60b9d1c176e815f1e8e86997a366d6ec1dfb19
e9d1b2db15b3ae752d61ea120185093d57381f73
/mytcuml-src/src/java/components/xmi_writer_uml_model_plugin/trunk/src/java/tests/com/topcoder/uml/xmi/writer/transformers/model/Reference.java
6074049a07555fe87fb50db70a3d53bcc4141dd1
[]
no_license
kinfkong/mytcuml
9c65804d511ad997e0c4ba3004e7b831bf590757
0786c55945510e0004ff886ff01f7d714d7853ab
refs/heads/master
2020-06-04T21:34:05.260363
2014-10-21T02:31:16
2014-10-21T02:31:16
25,495,964
1
0
null
null
null
null
UTF-8
Java
false
false
380
java
/* * Copyright (C) 2006 TopCoder Inc., All Rights Reserved. */ package com.topcoder.uml.xmi.writer.transformers.model; /** * This is a simple interface used to do unit test of the component. * * @author TCSDEVELOPER * @version 1.0 */ public class Reference implements ReferenceInterface { /** * Empty constructor. * */ public Reference() { } }
[ "kinfkong@126.com" ]
kinfkong@126.com