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
5b2dc08351cb3ac349e9d71c923f48de379a5435
8cec6dd3a664f4029c129a4d8784918682db280d
/src/main/java/org/raylab/sample1/config/LoggingConfiguration.java
714afd2b39036b5515f72cd55fc781bde734ca5c
[]
no_license
dray17/jhipster-sample-application
4fabdd438eeef8677011f87d6e60f485ea7ce4b3
217ca874d541302af10d970367120430886b69d4
refs/heads/master
2020-04-01T10:29:56.583900
2018-10-15T13:42:53
2018-10-15T13:42:53
153,120,180
0
0
null
null
null
null
UTF-8
Java
false
false
6,581
java
package org.raylab.sample1.config; import java.net.InetSocketAddress; import java.util.Iterator; import io.github.jhipster.config.JHipsterProperties; import ch.qos.logback.classic.AsyncAppender; import ch.qos.logback.classic.Level; import ch.qos.logback.classic.LoggerContext; import ch.qos.logback.classic.boolex.OnMarkerEvaluator; import ch.qos.logback.classic.spi.ILoggingEvent; import ch.qos.logback.classic.spi.LoggerContextListener; import ch.qos.logback.core.Appender; import ch.qos.logback.core.filter.EvaluatorFilter; import ch.qos.logback.core.spi.ContextAwareBase; import ch.qos.logback.core.spi.FilterReply; import net.logstash.logback.appender.LogstashTcpSocketAppender; import net.logstash.logback.encoder.LogstashEncoder; import net.logstash.logback.stacktrace.ShortenedThrowableConverter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Configuration; @Configuration public class LoggingConfiguration { private static final String LOGSTASH_APPENDER_NAME = "LOGSTASH"; private static final String ASYNC_LOGSTASH_APPENDER_NAME = "ASYNC_LOGSTASH"; private final Logger log = LoggerFactory.getLogger(LoggingConfiguration.class); private LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); private final String appName; private final String serverPort; private final JHipsterProperties jHipsterProperties; public LoggingConfiguration(@Value("${spring.application.name}") String appName, @Value("${server.port}") String serverPort, JHipsterProperties jHipsterProperties) { this.appName = appName; this.serverPort = serverPort; this.jHipsterProperties = jHipsterProperties; if (jHipsterProperties.getLogging().getLogstash().isEnabled()) { addLogstashAppender(context); addContextListener(context); } if (jHipsterProperties.getMetrics().getLogs().isEnabled()) { setMetricsMarkerLogbackFilter(context); } } private void addContextListener(LoggerContext context) { LogbackLoggerContextListener loggerContextListener = new LogbackLoggerContextListener(); loggerContextListener.setContext(context); context.addListener(loggerContextListener); } private void addLogstashAppender(LoggerContext context) { log.info("Initializing Logstash logging"); LogstashTcpSocketAppender logstashAppender = new LogstashTcpSocketAppender(); logstashAppender.setName(LOGSTASH_APPENDER_NAME); logstashAppender.setContext(context); String customFields = "{\"app_name\":\"" + appName + "\",\"app_port\":\"" + serverPort + "\"}"; // More documentation is available at: https://github.com/logstash/logstash-logback-encoder LogstashEncoder logstashEncoder = new LogstashEncoder(); // Set the Logstash appender config from JHipster properties logstashEncoder.setCustomFields(customFields); // Set the Logstash appender config from JHipster properties logstashAppender.addDestinations(new InetSocketAddress(jHipsterProperties.getLogging().getLogstash().getHost(), jHipsterProperties.getLogging().getLogstash().getPort())); ShortenedThrowableConverter throwableConverter = new ShortenedThrowableConverter(); throwableConverter.setRootCauseFirst(true); logstashEncoder.setThrowableConverter(throwableConverter); logstashEncoder.setCustomFields(customFields); logstashAppender.setEncoder(logstashEncoder); logstashAppender.start(); // Wrap the appender in an Async appender for performance AsyncAppender asyncLogstashAppender = new AsyncAppender(); asyncLogstashAppender.setContext(context); asyncLogstashAppender.setName(ASYNC_LOGSTASH_APPENDER_NAME); asyncLogstashAppender.setQueueSize(jHipsterProperties.getLogging().getLogstash().getQueueSize()); asyncLogstashAppender.addAppender(logstashAppender); asyncLogstashAppender.start(); context.getLogger("ROOT").addAppender(asyncLogstashAppender); } // Configure a log filter to remove "metrics" logs from all appenders except the "LOGSTASH" appender private void setMetricsMarkerLogbackFilter(LoggerContext context) { log.info("Filtering metrics logs from all appenders except the {} appender", LOGSTASH_APPENDER_NAME); OnMarkerEvaluator onMarkerMetricsEvaluator = new OnMarkerEvaluator(); onMarkerMetricsEvaluator.setContext(context); onMarkerMetricsEvaluator.addMarker("metrics"); onMarkerMetricsEvaluator.start(); EvaluatorFilter<ILoggingEvent> metricsFilter = new EvaluatorFilter<>(); metricsFilter.setContext(context); metricsFilter.setEvaluator(onMarkerMetricsEvaluator); metricsFilter.setOnMatch(FilterReply.DENY); metricsFilter.start(); for (ch.qos.logback.classic.Logger logger : context.getLoggerList()) { for (Iterator<Appender<ILoggingEvent>> it = logger.iteratorForAppenders(); it.hasNext();) { Appender<ILoggingEvent> appender = it.next(); if (!appender.getName().equals(ASYNC_LOGSTASH_APPENDER_NAME)) { log.debug("Filter metrics logs from the {} appender", appender.getName()); appender.setContext(context); appender.addFilter(metricsFilter); appender.start(); } } } } /** * Logback configuration is achieved by configuration file and API. * When configuration file change is detected, the configuration is reset. * This listener ensures that the programmatic configuration is also re-applied after reset. */ class LogbackLoggerContextListener extends ContextAwareBase implements LoggerContextListener { @Override public boolean isResetResistant() { return true; } @Override public void onStart(LoggerContext context) { addLogstashAppender(context); } @Override public void onReset(LoggerContext context) { addLogstashAppender(context); } @Override public void onStop(LoggerContext context) { // Nothing to do. } @Override public void onLevelChange(ch.qos.logback.classic.Logger logger, Level level) { // Nothing to do. } } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
43573f9d5e547f48d93919db6223c058a6474d3a
d944234f35651bd5a23f8d14b77555390c729926
/java-core/src/main/java/core/containers/TypeForSets.java
92af0e1a5e56c64581f8f7d21430da967d765a95
[]
no_license
LJJ1994/Java-Learn
4f2d5981c291da24b4be11afa9506e3665d45d6d
1932dfc8416f7e4498c848671f59e2a816b1316b
refs/heads/master
2022-11-06T09:34:32.841582
2020-08-01T05:00:09
2020-08-01T05:00:09
247,892,292
0
0
null
2022-10-12T20:44:53
2020-03-17T06:06:00
Java
UTF-8
Java
false
false
2,318
java
package main.java.core.containers; import sun.reflect.generics.tree.Tree; import java.util.HashSet; import java.util.LinkedHashSet; import java.util.Set; import java.util.TreeSet; /** * @Author: LJJ * @Program: java-core * @Description: * @Create: 2020-04-23 21:54:54 * @Modified By: */ class SetType{ int i; public SetType(int n){ i = n; } @Override public boolean equals(Object obj) { return obj instanceof SetType && (((SetType) obj).i == i); } public String toString(){ return Integer.toString(i); } } class HashType extends SetType{ public HashType(int n){ super(n); } @Override public int hashCode() { return i; } } class TreeType extends SetType implements Comparable<TreeType>{ public TreeType(int n){ super(n); } @Override public int compareTo(TreeType arg) { return (arg.i < i ? -1 : (arg.i == i ? 0 : 1)); } } public class TypeForSets { public static <T> Set<T> fill(Set<T> set, Class<T> type){ try{ for (int i = 0; i < 10; i++) { set.add(type.getConstructor(int.class).newInstance(i)); } } catch (Exception e){ throw new RuntimeException(e); } return set; } public static <T> void test(Set<T> set, Class<T> type){ fill(set, type); fill(set, type); fill(set, type); System.out.println(set); } public static void main(String[] args) { test(new HashSet<HashType>(), HashType.class); test(new LinkedHashSet<HashType>(), HashType.class); test(new TreeSet<TreeType>(), TreeType.class); System.out.println("================================"); test(new HashSet<SetType>(), SetType.class); test(new HashSet<TreeType>(), TreeType.class); test(new LinkedHashSet<SetType>(), SetType.class); test(new LinkedHashSet<TreeType>(), TreeType.class); try{ test(new TreeSet<SetType>(), SetType.class); } catch (Exception e){ System.out.println(e.getMessage()); } try{ test(new TreeSet<HashType>(), HashType.class); } catch (Exception e){ System.out.println(e.getMessage()); } } }
[ "optionsci111@gmail.com" ]
optionsci111@gmail.com
687f06653bfc753d9da752af342ab8221526a225
2cf1e5a7e3532b1db2d28074f57123c9f75619ef
/src/main/java/practice/problem/BalanceBinaryTree.java
fadab3f76ff9c15630e322d7bf1e2dec9d11eff7
[]
no_license
jimty0511/algorithmPractice
33f15c828a1463d7a1ea247b424e577fde37e1dd
dd524388e9d5c70ee97869b63465f3cd171f9460
refs/heads/master
2020-03-20T14:57:01.722957
2020-02-19T19:43:39
2020-02-19T19:43:39
137,497,450
0
0
null
null
null
null
UTF-8
Java
false
false
525
java
package practice.problem; import practice.domain.TreeNode; // 110. Balanced Binary Tree public class BalanceBinaryTree { public boolean isBalanced(TreeNode root) { return isBalancedDepth(root) != -1; } private int isBalancedDepth(TreeNode root) { if (root == null) return 0; int l = isBalancedDepth(root.left); int r = isBalancedDepth(root.right); if (l == -1 || r == -1) return -1; if (Math.abs(l - r) > 1) return -1; return 1 + Math.max(l, r); } }
[ "ty90511@gmail.com" ]
ty90511@gmail.com
eea0f0331ba3a7c1ee856c55bfb57a236c67b251
ee461488c62d86f729eda976b421ac75a964114c
/tags/HtmlUnit-2.2/src/main/java/com/gargoylesoftware/htmlunit/javascript/MethodWrapper.java
d60481253002e2d1dd1e7a7127ecd1893548680e
[ "Apache-2.0" ]
permissive
svn2github/htmlunit
2c56f7abbd412e6d9e0efd0934fcd1277090af74
6fc1a7d70c08fb50fef1800673671fd9cada4899
refs/heads/master
2023-09-03T10:35:41.987099
2015-07-26T13:12:45
2015-07-26T13:12:45
37,107,064
0
1
null
null
null
null
UTF-8
Java
false
false
5,518
java
/* * Copyright (c) 2002-2008 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.gargoylesoftware.htmlunit.javascript; import java.lang.reflect.Method; import org.apache.commons.lang.ArrayUtils; import org.mozilla.javascript.Context; import org.mozilla.javascript.Function; import org.mozilla.javascript.FunctionObject; import org.mozilla.javascript.Scriptable; import org.mozilla.javascript.ScriptableObject; /** * Wraps a java method to make it available as a JavaScript function * (more flexible than Rhino's {@link FunctionObject}. * * @version $Revision$ * @author Marc Guillemot */ public class MethodWrapper extends ScriptableObject implements Function { private static final long serialVersionUID = 6106771000496895783L; private final Class< ? > clazz_; private final Method method_; private final int[] jsTypeTags_; /** * Facility constructor to wrap a method without arguments * @param methodName the name of the method to wrap * @param clazz the class declaring the method * @throws NoSuchMethodException if the method is no found */ MethodWrapper(final String methodName, final Class< ? > clazz) throws NoSuchMethodException { this(methodName, clazz, ArrayUtils.EMPTY_CLASS_ARRAY); } /** * Wraps a method as a JavaScript function. * @param methodName the name of the method to wrap * @param clazz the class declaring the method * @param parameterTypes the types of the method's parameter * @throws NoSuchMethodException if the method is no found */ MethodWrapper(final String methodName, final Class< ? > clazz, final Class< ? >[] parameterTypes) throws NoSuchMethodException { clazz_ = clazz; method_ = clazz.getMethod(methodName, parameterTypes); jsTypeTags_ = new int[parameterTypes.length]; int i = 0; for (final Class< ? > klass : parameterTypes) { jsTypeTags_[i++] = FunctionObject.getTypeTag(klass); } } /** * @see org.mozilla.javascript.ScriptableObject#getClassName() * @return a name based on the method name */ @Override public String getClassName() { return "function " + method_.getName(); } /** * @see org.mozilla.javascript.Function#call(Context, Scriptable, Scriptable, Object[]) * {@inheritDoc} */ public Object call(final Context context, final Scriptable scope, final Scriptable thisObj, final Object[] args) { final Object javaResp; if (thisObj instanceof ScriptableWrapper) { final ScriptableWrapper wrapper = (ScriptableWrapper) thisObj; final Object wrappedObject = wrapper.getWrappedObject(); if (clazz_.isInstance(wrappedObject)) { // convert arguments final Object[] javaArgs = convertJSArgsToJavaArgs(context, scope, args); try { javaResp = method_.invoke(wrappedObject, javaArgs); } catch (final Exception e) { throw Context.reportRuntimeError("Exception calling wrapped function " + method_.getName() + ": " + e.getMessage()); } } else { throw buildInvalidCallException(thisObj); } } else { throw buildInvalidCallException(thisObj); } final Object jsResp = Context.javaToJS(javaResp, ScriptableObject.getTopLevelScope(scope)); return jsResp; } private RuntimeException buildInvalidCallException(final Scriptable thisObj) { return Context.reportRuntimeError("Function " + method_.getName() + " called on incompatible object: " + thisObj); } /** * Converts js arguments to java arguments * @param context the current context * @param scope the current scope * @param jsArgs the JavaScript arguments * @return the java arguments */ Object[] convertJSArgsToJavaArgs(final Context context, final Scriptable scope, final Object[] jsArgs) { if (jsArgs.length != jsTypeTags_.length) { throw Context.reportRuntimeError("Bad number of parameters for function " + method_.getName() + ": expected " + jsTypeTags_.length + " got " + jsArgs.length); } final Object[] javaArgs = new Object[jsArgs.length]; int i = 0; for (final Object object : jsArgs) { javaArgs[i] = FunctionObject.convertArg(context, scope, object, jsTypeTags_[i++]); } return javaArgs; } /** * @see org.mozilla.javascript.Function#construct(Context, Scriptable, Object[]) * {@inheritDoc} */ public Scriptable construct(final Context context, final Scriptable scope, final Object[] args) { throw Context.reportRuntimeError("Function " + method_.getName() + " can't be used as a constructor"); } }
[ "mguillem@5f5364db-9458-4db8-a492-e30667be6df6" ]
mguillem@5f5364db-9458-4db8-a492-e30667be6df6
f566a40bd69c8807a9dea0da91d0a67e9c5cb95b
183f640b0ab6a6da85da1b09290965618083d874
/samples/helloworld-ws-service/src/main/java/helloworld/HelloWorldServer.java
c37bfcda65eeb6119cc7ac74290b51c36e22802a
[]
no_license
apache/tuscany-sca-1.x
8543e4434f4d8650630bddf26b040d48aee789e9
3eb5a6521521398d167f32da995c868ac545163b
refs/heads/trunk
2023-09-04T10:37:39.056392
2011-12-14T12:09:11
2011-12-14T12:09:11
390,001
4
18
null
2023-08-29T21:44:23
2009-11-30T09:00:10
Java
UTF-8
Java
false
false
1,588
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 helloworld; import java.io.IOException; import org.apache.tuscany.sca.host.embedded.SCADomain; /** * This server program shows how to create an SCA runtime, and start it which * activates the helloworld Web service endpoint. */ public class HelloWorldServer { public static void main(String[] args) { SCADomain scaDomain = SCADomain.newInstance("META-INF/sca-deployables/helloworldws.composite"); try { System.out.println("HelloWorld server started (press enter to shutdown)"); System.in.read(); } catch (IOException e) { e.printStackTrace(); } scaDomain.close(); System.out.println("HelloWorld server stopped"); } }
[ "slaws@apache.org" ]
slaws@apache.org
5498684205b62083e225fe4ef9af3667b792e2dd
504e7fbe35cd2dc9f9924312e84540018880de56
/code/app/src/main/java/cn/fizzo/hub/fitness/network/MyRequestParams.java
0908c2137c9ee0ec8b52cee86cd7db29b9107c8b
[]
no_license
RaulFan2019/FitnessHub
c16bcad794197b175a0a5b2fc611ddd1ddbbfc0e
41755b81a077d5db38e95697708cd4a790e5741c
refs/heads/master
2020-05-17T05:59:31.939185
2020-03-30T02:15:02
2020-03-30T02:15:02
183,548,074
0
1
null
null
null
null
UTF-8
Java
false
false
2,163
java
package cn.fizzo.hub.fitness.network; import android.content.Context; import org.xutils.common.util.LogUtil; import org.xutils.http.RequestParams; import org.xutils.http.app.DefaultParamsBuilder; import java.security.cert.X509Certificate; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLSocketFactory; import javax.net.ssl.TrustManager; import javax.net.ssl.X509TrustManager; import cn.fizzo.hub.fitness.LocalApp; /** * Created by Raul.fan on 2018/1/23 0023. * Mail:raul.fan@139.com * QQ: 35686324 */ public class MyRequestParams extends RequestParams { public MyRequestParams(Context context, String url) { super(url); //创建头信息 this.setSslSocketFactory(trustAllSSlSocketFactory); } private static SSLSocketFactory trustAllSSlSocketFactory; public static SSLSocketFactory getTrustAllSSLSocketFactory() { if (trustAllSSlSocketFactory == null) { synchronized (DefaultParamsBuilder.class) { if (trustAllSSlSocketFactory == null) { // 信任所有证书 TrustManager[] trustAllCerts = new TrustManager[]{new X509TrustManager() { @Override public X509Certificate[] getAcceptedIssuers() { return null; } @Override public void checkClientTrusted(X509Certificate[] certs, String authType) { } @Override public void checkServerTrusted(X509Certificate[] certs, String authType) { } }}; try { SSLContext sslContext = SSLContext.getInstance("TLS"); sslContext.init(null, trustAllCerts, null); trustAllSSlSocketFactory = sslContext.getSocketFactory(); } catch (Throwable ex) { LogUtil.e(ex.getMessage(), ex); } } } } return trustAllSSlSocketFactory; } }
[ "raul.fan@fizzo.cn" ]
raul.fan@fizzo.cn
6ff5409fda4f7f20beb0c3d8e9d04fd6312d2e28
86a4f4a2dc3f38c0b3188d994950f4c79f036484
/src/com/d/a/b/e/d.java
6538da00a3c011e4f529df476418735dc762fb6e
[]
no_license
reverseengineeringer/com.cbs.app
8f6f3532f119898bfcb6d7ddfeb465eae44d5cd4
7e588f7156f36177b0ff8f7dc13151c451a65051
refs/heads/master
2021-01-10T05:08:31.000287
2016-03-19T20:39:17
2016-03-19T20:39:17
54,283,808
0
0
null
null
null
null
UTF-8
Java
false
false
3,176
java
package com.d.a.b.e; import android.graphics.Bitmap; import android.graphics.drawable.Drawable; import android.os.Looper; import android.view.View; import android.view.ViewGroup.LayoutParams; import com.d.a.b.a.h; import com.d.a.c.c; import java.lang.ref.Reference; import java.lang.ref.WeakReference; public abstract class d implements a { protected Reference<View> a; protected boolean b; public d(View paramView) { this(paramView, (byte)0); } private d(View paramView, byte paramByte) { if (paramView == null) { throw new IllegalArgumentException("view must not be null"); } a = new WeakReference(paramView); b = true; } public int a() { View localView = (View)a.get(); ViewGroup.LayoutParams localLayoutParams; if (localView != null) { localLayoutParams = localView.getLayoutParams(); if ((!b) || (localLayoutParams == null) || (width == -2)) { break label71; } } label71: for (int i = localView.getWidth();; i = 0) { int j = i; if (i <= 0) { j = i; if (localLayoutParams != null) { j = width; } } return j; return 0; } } protected abstract void a(Bitmap paramBitmap, View paramView); protected abstract void a(Drawable paramDrawable, View paramView); public final boolean a(Bitmap paramBitmap) { if (Looper.myLooper() == Looper.getMainLooper()) { View localView = (View)a.get(); if (localView != null) { a(paramBitmap, localView); return true; } } else { c.c("Can't set a bitmap into view. You should call ImageLoader on UI thread for it.", new Object[0]); } return false; } public final boolean a(Drawable paramDrawable) { if (Looper.myLooper() == Looper.getMainLooper()) { View localView = (View)a.get(); if (localView != null) { a(paramDrawable, localView); return true; } } else { c.c("Can't set a drawable into view. You should call ImageLoader on UI thread for it.", new Object[0]); } return false; } public int b() { View localView = (View)a.get(); ViewGroup.LayoutParams localLayoutParams; if (localView != null) { localLayoutParams = localView.getLayoutParams(); if ((!b) || (localLayoutParams == null) || (height == -2)) { break label71; } } label71: for (int i = localView.getHeight();; i = 0) { int j = i; if (i <= 0) { j = i; if (localLayoutParams != null) { j = height; } } return j; return 0; } } public h c() { return h.b; } public View d() { return (View)a.get(); } public final boolean e() { return a.get() == null; } public final int f() { View localView = (View)a.get(); if (localView == null) { return super.hashCode(); } return localView.hashCode(); } } /* Location: * Qualified Name: com.d.a.b.e.d * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
3181c83bfd01096033a275463bf65adbfc7bdb4e
77fb90c41fd2844cc4350400d786df99e14fa4ca
/support/android/asm/p.java
b2f681ba7c490783542636c506948f529a5ab20d
[]
no_license
highnes7/umaang_decompiled
341193b25351188d69b4413ebe7f0cde6525c8fb
bcfd90dffe81db012599278928cdcc6207632c56
refs/heads/master
2020-06-19T07:47:18.630455
2019-07-12T17:16:13
2019-07-12T17:16:13
196,615,053
0
0
null
null
null
null
UTF-8
Java
false
false
1,052
java
package support.android.asm; import android.os.Build.VERSION; import android.support.transition.ChangeBounds; import android.support.transition.Transition; import android.view.ViewGroup; public class p extends f { public boolean e = false; public p(ChangeBounds paramChangeBounds, ViewGroup paramViewGroup) {} public void a(Transition paramTransition) { if (!e) { ViewGroup localViewGroup = a; int i = Build.VERSION.SDK_INT; MethodWriter.a(localViewGroup, false); } paramTransition.removeListener(this); } public void b(Transition paramTransition) { paramTransition = a; int i = Build.VERSION.SDK_INT; MethodWriter.a(paramTransition, false); } public void c(Transition paramTransition) { paramTransition = a; int i = Build.VERSION.SDK_INT; MethodWriter.a(paramTransition, true); } public void d(Transition paramTransition) { paramTransition = a; int i = Build.VERSION.SDK_INT; MethodWriter.a(paramTransition, false); e = true; } }
[ "highnes.7@gmail.com" ]
highnes.7@gmail.com
80227988ecabf84a92fa98389814e5704a39d881
0020de1cabbaedf327d5b746b6d2ddfe17c7a9ab
/src/test/java/jpa/single/Create.java
e2f0acb48d655d6f188adb7bbf5f1e9fc68648b2
[]
no_license
vincenttuan/SpringBasic1102
50830728249f6136a94a3ae3b84040f65eaf84fe
2ab38e54dfdca38bfe2b8cdf922535d062739d15
refs/heads/master
2023-01-22T00:12:42.148548
2020-12-04T13:47:42
2020-12-04T13:47:42
309,378,922
2
1
null
null
null
null
UTF-8
Java
false
false
436
java
package jpa.single; import com.mycompany.springbasic1102.jpa.entities.many2one.Customer; import jpa.JPATemplate; import org.junit.Test; public class Create extends JPATemplate { @Test public void t1() { Customer customer = new Customer(); customer.setLastName("Tom"); // 新增 customer 物件資料到 CUSTOMER 資料表中建立一筆紀錄 session.persist(customer); } }
[ "teacher@192.168.1.180" ]
teacher@192.168.1.180
22e9b2251d0f70e139547d517a169a3c891b8ab7
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-ws/results/XWIKI-14227-9-27-Single_Objective_GGA-WeightedSum/com/xpn/xwiki/store/migration/AbstractDataMigrationManager_ESTest.java
b4ff2d03bf7676ab061a48c330d7924b6078f1a8
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
592
java
/* * This file was automatically generated by EvoSuite * Fri Jan 17 20:24:41 UTC 2020 */ package com.xpn.xwiki.store.migration; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class AbstractDataMigrationManager_ESTest extends AbstractDataMigrationManager_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
2f19c573de0aedfab2586616f24793adbd2d16a3
1bcafa1038081ee55d57402f88d8ced0f0b76470
/src/main/java/org/gnsg/gms/repository/search/FileSearchRepository.java
19099515eeeaf2bcc9babeb4633c7f12e3f26377
[]
no_license
harjeet-me/gnsg-app
3ddf9ab5f5256314c024c4c3f0bcd1c1698b173d
1c3b480a63f961d652145b8763dc164c6a722212
refs/heads/master
2022-12-31T00:26:12.693979
2020-04-08T21:41:13
2020-04-08T21:41:13
235,002,128
0
0
null
2022-12-16T04:43:30
2020-01-20T02:20:15
Java
UTF-8
Java
false
false
320
java
package org.gnsg.gms.repository.search; import org.gnsg.gms.domain.File; import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; /** * Spring Data Elasticsearch repository for the {@link File} entity. */ public interface FileSearchRepository extends ElasticsearchRepository<File, Long> { }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
99ad062ac334e1ead4a650ef8d7d78fb4e8e5aaf
ca030864a3a1c24be6b9d1802c2353da4ca0d441
/classes9.dex_source_from_JADX/com/facebook/video/videohome/views/VideoHomeLiveVideoHScrollEmptyCardView.java
24d6b8801224221e3c96de37df11906b051b02f1
[]
no_license
pxson001/facebook-app
87aa51e29195eeaae69adeb30219547f83a5b7b1
640630f078980f9818049625ebc42569c67c69f7
refs/heads/master
2020-04-07T20:36:45.758523
2018-03-07T09:04:57
2018-03-07T09:04:57
124,208,458
4
0
null
null
null
null
UTF-8
Java
false
false
1,903
java
package com.facebook.video.videohome.views; import android.content.Context; import android.util.AttributeSet; import android.view.View; import android.widget.FrameLayout; import com.facebook.loom.logger.LogEntry.EntryType; import com.facebook.loom.logger.Logger; import com.facebook.widget.RecyclableView; import com.facebook.widget.pageritemwrapper.PagerItemWrapperLayout; import com.facebook.widget.recyclerview.keepattached.RecyclerViewKeepAttached; /* compiled from: show_entry_points */ public class VideoHomeLiveVideoHScrollEmptyCardView extends PagerItemWrapperLayout implements RecyclableView, RecyclerViewKeepAttached { public boolean f3351a; private FrameLayout f3352b; public VideoHomeLiveVideoHScrollEmptyCardView(Context context) { this(context, null); } private VideoHomeLiveVideoHScrollEmptyCardView(Context context, AttributeSet attributeSet) { super(context, attributeSet); setContentView(2130907718); this.f3352b = (FrameLayout) c(2131568430); } public FrameLayout getContainer() { return this.f3352b; } public final boolean m3180a() { return this.f3351a; } protected void onAttachedToWindow() { int a = Logger.a(2, EntryType.LIFECYCLE_VIEW_START, 1692585852); super.onAttachedToWindow(); this.f3351a = true; Logger.a(2, EntryType.LIFECYCLE_VIEW_END, 526546922, a); } protected void onDetachedFromWindow() { int a = Logger.a(2, EntryType.LIFECYCLE_VIEW_START, -1514635255); super.onDetachedFromWindow(); this.f3351a = false; Logger.a(2, EntryType.LIFECYCLE_VIEW_END, -1469125113, a); } public void addView(View view) { this.f3352b.addView(view); } public void removeAllViews() { this.f3352b.removeAllViews(); } public final boolean gK_() { return false; } }
[ "son.pham@jmango360.com" ]
son.pham@jmango360.com
957248dadfaebe5963118493ce3125cc01be4686
5714e16fd17e6329504d9e43ac8e2f1501906b14
/scmbhc/trunk/src/com/mining/app/zxing/camera/FlashlightManager.java
31a8abaed4abca69e08c9982d87fd18a0b33e866
[]
no_license
lizhling/scAndroid_project
688c2de23bc0eeae7fae9275dba406e01df940c4
452f762638cbad6a25ecb130baf3b3d3af7f20b2
refs/heads/master
2021-01-21T12:16:44.528698
2017-05-19T10:06:41
2017-05-19T10:06:41
91,785,146
4
0
null
null
null
null
UTF-8
Java
false
false
4,940
java
/* * Copyright (C) 2010 ZXing 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 com.mining.app.zxing.camera; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import android.os.IBinder; import com.sunrise.scmbhc.utils.LogUtlis; /** * This class is used to activate the weak light on some camera phones (not flash) * in order to illuminate surfaces for scanning. There is no official way to do this, * but, classes which allow access to this function still exist on some devices. * This therefore proceeds through a great deal of reflection. * * See <a href="http://almondmendoza.com/2009/01/05/changing-the-screen-brightness-programatically/"> * http://almondmendoza.com/2009/01/05/changing-the-screen-brightness-programatically/</a> and * <a href="http://code.google.com/p/droidled/source/browse/trunk/src/com/droidled/demo/DroidLED.java"> * http://code.google.com/p/droidled/source/browse/trunk/src/com/droidled/demo/DroidLED.java</a>. * Thanks to Ryan Alford for pointing out the availability of this class. */ final class FlashlightManager { private static final String TAG = FlashlightManager.class.getSimpleName(); private static final Object iHardwareService; private static final Method setFlashEnabledMethod; static { iHardwareService = getHardwareService(); setFlashEnabledMethod = getSetFlashEnabledMethod(iHardwareService); if (iHardwareService == null) { LogUtlis.v(TAG, "This device does supports control of a flashlight"); } else { LogUtlis.v(TAG, "This device does not support control of a flashlight"); } } private FlashlightManager() { } /** * �����������ƿ��� */ //FIXME static void enableFlashlight() { setFlashlight(false); } static void disableFlashlight() { setFlashlight(false); } private static Object getHardwareService() { Class<?> serviceManagerClass = maybeForName("android.os.ServiceManager"); if (serviceManagerClass == null) { return null; } Method getServiceMethod = maybeGetMethod(serviceManagerClass, "getService", String.class); if (getServiceMethod == null) { return null; } Object hardwareService = invoke(getServiceMethod, null, "hardware"); if (hardwareService == null) { return null; } Class<?> iHardwareServiceStubClass = maybeForName("android.os.IHardwareService$Stub"); if (iHardwareServiceStubClass == null) { return null; } Method asInterfaceMethod = maybeGetMethod(iHardwareServiceStubClass, "asInterface", IBinder.class); if (asInterfaceMethod == null) { return null; } return invoke(asInterfaceMethod, null, hardwareService); } private static Method getSetFlashEnabledMethod(Object iHardwareService) { if (iHardwareService == null) { return null; } Class<?> proxyClass = iHardwareService.getClass(); return maybeGetMethod(proxyClass, "setFlashlightEnabled", boolean.class); } private static Class<?> maybeForName(String name) { try { return Class.forName(name); } catch (ClassNotFoundException cnfe) { // OK return null; } catch (RuntimeException re) { LogUtlis.w(TAG, "Unexpected error while finding class " + name, re); return null; } } private static Method maybeGetMethod(Class<?> clazz, String name, Class<?>... argClasses) { try { return clazz.getMethod(name, argClasses); } catch (NoSuchMethodException nsme) { // OK return null; } catch (RuntimeException re) { LogUtlis.w(TAG, "Unexpected error while finding method " + name, re); return null; } } private static Object invoke(Method method, Object instance, Object... args) { try { return method.invoke(instance, args); } catch (IllegalAccessException e) { LogUtlis.w(TAG, "Unexpected error while invoking " + method, e); return null; } catch (InvocationTargetException e) { LogUtlis.w(TAG, "Unexpected error while invoking " + method, e.getCause()); return null; } catch (RuntimeException re) { LogUtlis.w(TAG, "Unexpected error while invoking " + method, re); return null; } } private static void setFlashlight(boolean active) { if (iHardwareService != null) { invoke(setFlashEnabledMethod, iHardwareService, active); } } }
[ "licolin@qq.com" ]
licolin@qq.com
62b0be2ad2a1a8aa31ab27783d35a47979cce387
bc4d06b821f6d92d300e920cec2a95c997d45b80
/src/main/java/com/github/jakz/romlib/parsers/XMDBHandler.java
1439212c935fe6581814af2ce46c0f6e08c94ea0
[]
no_license
Jakz/romlib
069e660c4879111b843ffd1f7b0312eb77ce5e24
ee355a13d3131c2f2813f2465109490b154ae541
refs/heads/master
2023-08-09T07:12:50.699695
2023-07-21T11:24:30
2023-07-21T11:24:30
105,722,079
1
1
null
null
null
null
UTF-8
Java
false
false
5,175
java
package com.github.jakz.romlib.parsers; import java.io.IOException; import java.lang.invoke.MethodHandles; import java.nio.file.Path; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.NoSuchElementException; import org.xml.sax.Attributes; import org.xml.sax.SAXException; import com.github.jakz.romlib.data.game.Game; import com.github.jakz.romlib.data.game.GameClone; import com.github.jakz.romlib.data.game.Location; import com.github.jakz.romlib.data.set.CloneSet; import com.github.jakz.romlib.data.set.GameMap; import com.pixbits.lib.io.xml.XMLEmbeddedDTD; import com.pixbits.lib.io.xml.XMLHandler; import com.pixbits.lib.io.xml.XMLParser; import com.pixbits.lib.lang.Pair; import com.pixbits.lib.log.Log; import com.pixbits.lib.log.Logger; public class XMDBHandler extends XMLHandler<CloneSet> { private final static Map<String, Location> zoneMap = new HashMap<>(); static { zoneMap.put("J", Location.JAPAN); zoneMap.put("U", Location.USA); zoneMap.put("E", Location.EUROPE); zoneMap.put("S", Location.SPAIN); zoneMap.put("G", Location.GERMANY); zoneMap.put("F", Location.FRANCE); zoneMap.put("I", Location.ITALY); zoneMap.put("A", Location.AUSTRALIA); zoneMap.put("Ne", Location.NETHERLANDS); zoneMap.put("Da", Location.DENMARK); zoneMap.put("Sw", Location.SWEDEN); zoneMap.put("K", Location.KOREA); zoneMap.put("Cn", Location.CHINA); zoneMap.put("Ca", Location.CANADA); zoneMap.put("Br", Location.BRASIL); zoneMap.put("As", Location.ASIA); zoneMap.put("Th", Location.TAIWAN); zoneMap.put("No", Location.NORWAY); zoneMap.put("Hr", Location.CROATIA); zoneMap.put("Pr", Location.PORTUGAL); zoneMap.put("Ru", Location.RUSSIA); zoneMap.put("Pl", Location.POLAND); zoneMap.put("Gr", Location.GREECE); } private final static Logger logger = Log.getLogger(XMDBHandler.class); List<GameClone> clones; GameMap list; List<Game> clone; Map<String, String> attributes; List<Pair<Location,String>> biases; public XMDBHandler(GameMap list) { this.list = list; } @Override protected void init() { } @Override protected void end(String ns, String name) { if (name.equals("zoned")) { /* if there is only a bias zone then we expect the name to be the same for the only clone */ if (biases.size() == 1) { Pair<Location, String> entry = biases.get(0); if (clone.size() != 1) { logger.w("Clone %s with a single bias zone which doesn't have a single game specified", entry.second); return; } else if (!clone.get(0).getTitle().equals(entry.second)) { logger.w("Single bias zone requires that the clone has exactly the same name (%s != %s)", entry.second, clone.get(0).getTitle()); return; } clones.add(new GameClone(clone.get(0), entry.first, entry.second)); } else { String[] zones = new String[Location.values().length]; for (Pair<Location, String> entry : biases) zones[entry.first.ordinal()] = entry.second; clones.add(new GameClone(clone, zones)); } } } @Override protected void start(String ns, String name, Attributes attr) throws SAXException { if (name.equals("set")) { attributes = new HashMap<>(); if (attr.getValue("name") != null) attributes.put("name", attr.getValue("name")); if (attr.getValue("version") != null) attributes.put("version", attr.getValue("version")); } else if (name.equals("parents")) { clones = new ArrayList<>(); } else if (name.equals("zoned")) { clone = new ArrayList<>(); biases = new ArrayList<>(); } else if (name.equals("bias")) { Location zone = zoneMap.get(attrString("zone")); if (zone == null) throw new NoSuchElementException("zone found in zoned rom '"+attrString("name")+"' is not valid: "+attrString("zone")); biases.add(new Pair<>(zone, attrString("name"))); } else if (name.equals("clone")) { Game game = list.get(attrString("name")); if (game == null) { logger.w("Game clone '"+attrString("name")+"' is not present in corresponding game set"); return; } clone.add(game); } } @Override public CloneSet get() { return new CloneSet(clones.toArray(new GameClone[clones.size()]), attributes); } public static CloneSet loadCloneSet(GameMap list, Path path) throws IOException, SAXException { final String dtdName = "GoodMerge.dtd"; final String packageName = MethodHandles.lookup().lookupClass().getPackage().getName().replaceAll("\\.", "/"); XMLEmbeddedDTD resolver = new XMLEmbeddedDTD(dtdName, packageName + "/" + dtdName); XMDBHandler xparser = new XMDBHandler(list); XMLParser<CloneSet> xmdbParser = new XMLParser<>(xparser, resolver); CloneSet cloneSet = xmdbParser.load(path); return cloneSet; } }
[ "jack@pixbits.com" ]
jack@pixbits.com
85d83a0a0d7bd07d0bbcc5ce61c78c27e4791f95
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/hibernate-orm/2015/4/CustomSql.java
bcdc768454c9639545ae2c53d2cdd9549297db9d
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
1,796
java
/* * Hibernate, Relational Persistence for Idiomatic Java * * Copyright (c) 2014, 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.boot.model; import org.hibernate.engine.spi.ExecuteUpdateResultCheckStyle; /** * Models the information for custom SQL execution defined as part of * the mapping for a primary/secondary table * * @author Steve Ebersole */ public class CustomSql { private final String sql; private final boolean isCallable; private final ExecuteUpdateResultCheckStyle checkStyle; public CustomSql(String sql, boolean callable, ExecuteUpdateResultCheckStyle checkStyle) { this.sql = sql; this.isCallable = callable; this.checkStyle = checkStyle; } public String getSql() { return sql; } public boolean isCallable() { return isCallable; } public ExecuteUpdateResultCheckStyle getCheckStyle() { return checkStyle; } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
55791b4f5cf0e82a5e5cdd134a98aa23e6f32aef
86505462601eae6007bef6c9f0f4eeb9fcdd1e7b
/bin/modules/integration-apis/odata2services/src/de/hybris/platform/odata2services/odata/persistence/populator/processor/AbstractCollectionPropertyProcessor.java
9b0a4475d42f2b8aac3b146f187ed12f521abe42
[]
no_license
jp-developer0/hybrisTrail
82165c5b91352332a3d471b3414faee47bdb6cee
a0208ffee7fee5b7f83dd982e372276492ae83d4
refs/heads/master
2020-12-03T19:53:58.652431
2020-01-02T18:02:34
2020-01-02T18:02:34
231,430,332
0
4
null
2020-08-05T22:46:23
2020-01-02T17:39:15
null
UTF-8
Java
false
false
1,795
java
/* * [y] hybris Platform * * Copyright (c) 2018 SAP SE or an SAP affiliate company. * All rights reserved. * * This software is the confidential and proprietary information of SAP * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with SAP. */ package de.hybris.platform.odata2services.odata.persistence.populator.processor; import static de.hybris.platform.odata2services.odata.persistence.ODataFeedBuilder.oDataFeedBuilder; import de.hybris.platform.odata2services.odata.persistence.ItemConversionRequest; import java.util.Collection; import java.util.List; import org.apache.olingo.odata2.api.edm.EdmException; import org.apache.olingo.odata2.api.ep.entry.ODataEntry; import org.apache.olingo.odata2.api.ep.feed.ODataFeed; /** * Base implementation for property processors dealing with properties of collection type. */ public abstract class AbstractCollectionPropertyProcessor extends AbstractPropertyProcessor { @Override protected void processEntityInternal( final ODataEntry oDataEntry, final String propertyName, final Object value, final ItemConversionRequest request) throws EdmException { if (canHandleEntityValue(value)) { final List<ODataEntry> entries = deriveDataFeedEntries(request, propertyName, value); final ODataFeed feed = oDataFeedBuilder().withEntries(entries).build(); oDataEntry.getProperties().putIfAbsent(propertyName, feed); } } protected boolean canHandleEntityValue(final Object value) { return value instanceof Collection; } protected abstract List<ODataEntry> deriveDataFeedEntries(ItemConversionRequest request, String propertyName, Object value) throws EdmException; }
[ "juan.gonzalez.working@gmail.com" ]
juan.gonzalez.working@gmail.com
c04cc3cdc1421c7506614b5a86b6915d1f03d7c3
75926e14358681746744136370519aa7ae6f9dad
/NavigationBarDemo/app/src/main/java/com/example/yuyu/navigationbardemo/Util.java
04a41fb341efc80e063f35c4ebbd318b90727b0c
[ "Apache-2.0" ]
permissive
luyang14/BlogDemo
525bbf16999f7ad0c3cd64c98372fc5c7b8007e0
ee0a4c87104b28b6924708d6694d3da530a41f52
refs/heads/master
2022-03-12T20:32:02.874930
2019-11-21T07:53:08
2019-11-21T07:53:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
326
java
package com.example.yuyu.navigationbardemo; import android.content.res.Resources; /** * Created by yuyu on 2015/12/17. */ public class Util { private static final float DENSITY = Resources.getSystem().getDisplayMetrics().density; public static int dp2px(int dp) { return Math.round(dp * DENSITY); } }
[ "511455842@qq.com" ]
511455842@qq.com
00dad7b77b6d8d3efa3a528a342981fd4a821b57
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project99/src/main/java/org/gradle/test/performance99_2/Production99_147.java
f79f157338b20f632606608686edef4d90450cb9
[]
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
305
java
package org.gradle.test.performance99_2; public class Production99_147 extends org.gradle.test.performance17_2.Production17_147 { private final String property; public Production99_147() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
ae6c47ffa905ff9331a2fa23b23b40984d201beb
547025855263b509de0ff0686207c3c029e239cc
/core/roboconf-dm-rest-commons/src/main/java/net/roboconf/dm/rest/commons/json/MapWrapper.java
bb25ad055fadb89902dede5cc73830a291be528d
[ "Apache-2.0" ]
permissive
roboconf/roboconf-platform
87a17329fbc659d30f0f6e657958be4241c82f06
c78fdf89491d5347f04eaa03a7368047231cfe73
refs/heads/master
2023-08-25T00:38:24.288653
2022-05-05T13:37:21
2022-05-05T13:37:21
17,637,707
26
13
Apache-2.0
2023-08-15T17:43:20
2014-03-11T16:29:42
Java
UTF-8
Java
false
false
1,614
java
/** * Copyright 2015-2017 Linagora, Université Joseph Fourier, Floralis * * The present code is developed in the scope of the joint LINAGORA - * Université Joseph Fourier - Floralis research program and is designated * as a "Result" pursuant to the terms and conditions of the LINAGORA * - Université Joseph Fourier - Floralis research program. Each copyright * holder of Results enumerated here above fully & independently holds complete * ownership of the complete Intellectual Property rights applicable to the whole * of said Results, and may freely exploit it in any manner which does not infringe * the moral rights of the other copyright holders. * * 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 net.roboconf.dm.rest.commons.json; import java.util.Map; /** * @author Vincent Zurczak - Linagora */ public class MapWrapper { private final Map<String,String> map; /** * Constructor. * @param map */ public MapWrapper( Map<String,String> map ) { this.map = map; } /** * @return the map */ public Map<String,String> getMap() { return this.map; } }
[ "vincent.zurczak@gmail.com" ]
vincent.zurczak@gmail.com
f5428477d42ae0847991bb929e0bd447eb705e40
ee1fc12feef20f8ebe734911acdd02b1742e417c
/android-wms/app/src/main/java/com/akan/wms/mvp/adapter/home/TransferAddAdapter.java
24f1fe4f13342e82fdf2b9c1a7eb5a6c0a51c956
[ "MIT" ]
permissive
xiaozhangxin/test
aee7aae01478a06741978e7747614956508067ed
aeda4d6958f8bf7af54f87bc70ad33d81545c5b3
refs/heads/master
2021-07-15T21:52:28.171542
2020-03-09T14:30:45
2020-03-09T14:30:45
126,810,840
0
0
null
null
null
null
UTF-8
Java
false
false
2,272
java
package com.akan.wms.mvp.adapter.home; import android.content.Context; import android.support.annotation.LayoutRes; import android.text.TextUtils; import android.view.View; import android.view.ViewGroup; import android.widget.EditText; import android.widget.TextView; import com.akan.wms.R; import com.akan.wms.bean.ItemWhQohBean; import com.jude.easyrecyclerview.adapter.BaseViewHolder; import com.jude.easyrecyclerview.adapter.RecyclerArrayAdapter; import java.util.List; public class TransferAddAdapter extends RecyclerArrayAdapter<ItemWhQohBean> { public TransferAddAdapter(Context context, List<ItemWhQohBean> list) { super(context, list); } @Override public BaseViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { return new TransferAddAdapter.ViewHolder(parent, viewType); } public class ViewHolder extends BaseViewHolder<ItemWhQohBean> { private TextView tvOne, tvTwo, tvMfc; private EditText tvThree; public ViewHolder(ViewGroup parent, @LayoutRes int res) { super(parent, R.layout.item_transfer); tvOne = $(R.id.tvOne); tvTwo = $(R.id.tvTwo); tvThree = $(R.id.tvThree); tvMfc = $(R.id.tvMfc); } @Override public void setData(final ItemWhQohBean data) { super.setData(data); tvOne.setText(data.getItem_name()); if (TextUtils.isEmpty(data.getItem_spec())) { tvTwo.setText("暂无"); } else { tvTwo.setText(data.getItem_spec()); } tvThree.setText(data.getNum() + ""); tvMfc.setText(data.getSupplier_name()); tvMfc.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { onStockListener.onChooseMfc(getDataPosition(), data.getItem_id()); } }); } } public interface OnSelectClickListener { void onChooseMfc(int position, String itemId); } private OnSelectClickListener onStockListener; public void setOnStockListener(OnSelectClickListener onStockListener) { this.onStockListener = onStockListener; } }
[ "xiaozhangxin@shifuhelp.com" ]
xiaozhangxin@shifuhelp.com
2814c679fd0da16abdbbef026315d8dd01dee1c6
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/10/10_574361410c676e608a270fb066c31370b0c5bb9a/ModernAppListenerException/10_574361410c676e608a270fb066c31370b0c5bb9a_ModernAppListenerException_t.java
8f527abda1c7173ff44137ab116507de662300ea
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
6,742
java
package railo.runtime.listener; import java.io.PrintStream; import java.io.PrintWriter; import railo.runtime.PageContext; import railo.runtime.PageSource; import railo.runtime.config.Config; import railo.runtime.dump.DumpData; import railo.runtime.dump.DumpProperties; import railo.runtime.engine.ThreadLocalPageContext; import railo.runtime.err.ErrorPage; import railo.runtime.exp.PageException; import railo.runtime.exp.PageExceptionImpl; import railo.runtime.type.Collection; import railo.runtime.type.KeyImpl; import railo.runtime.type.Struct; public final class ModernAppListenerException extends PageException { private static final Collection.Key DETAIL = KeyImpl.getInstance("detail"); private static final Collection.Key ROOT_CAUSE = KeyImpl.getInstance("rootCause"); private static final Collection.Key CAUSE = KeyImpl.getInstance("cause"); private static final Collection.Key NAME = KeyImpl.getInstance("name"); private PageException rootCause; private String eventName; /** * Constructor of the class * @param pe * @param eventName */ public ModernAppListenerException(PageException pe, String eventName) { super(pe.getMessage()); setStackTrace(pe.getStackTrace()); this.rootCause=pe; this.eventName=eventName; } /** * * @see railo.runtime.exp.IPageException#addContext(railo.runtime.PageSource, int, int) */ public void addContext(PageSource pageSource, int line, int column, StackTraceElement ste) { rootCause.addContext(pageSource, line, column,ste); } /** * * @see railo.runtime.exp.IPageException#getAdditional() */ public Struct getAdditional() { return rootCause.getAddional(); } public Struct getAddional() { return rootCause.getAddional(); } /** * @see railo.runtime.exp.IPageException#getCatchBlock() */ public Struct getCatchBlock() { return getCatchBlock(ThreadLocalPageContext.get()); } /** * @see railo.runtime.exp.IPageException#getCatchBlock(railo.runtime.PageContext) */ public Struct getCatchBlock(PageContext pc) { Struct cb=rootCause.getCatchBlock(pc); Collection cause = cb.duplicate(false); //rtn.setEL("message", getMessage()); if(!cb.containsKey(DETAIL))cb.setEL(DETAIL, "Exception throwed while invoking function ["+eventName+"] from Application.cfc"); cb.setEL(ROOT_CAUSE, cause); cb.setEL(CAUSE, cause); //cb.setEL("stacktrace", getStackTraceAsString()); //rtn.setEL("tagcontext", new ArrayImpl()); //rtn.setEL("type", getTypeAsString()); cb.setEL(NAME, eventName); return cb; } /** * * @see railo.runtime.exp.IPageException#getCustomTypeAsString() */ public String getCustomTypeAsString() { return rootCause.getCustomTypeAsString(); } /** * * @see railo.runtime.exp.IPageException#getDetail() */ public String getDetail() { return rootCause.getDetail(); } /** * * @see railo.runtime.exp.IPageException#getErrorBlock(railo.runtime.PageContext, railo.runtime.err.ErrorPage) */ public Struct getErrorBlock(PageContext pc, ErrorPage ep) { return rootCause.getErrorBlock(pc, ep); } /** * * @see railo.runtime.exp.IPageException#getErrorCode() */ public String getErrorCode() { return rootCause.getErrorCode(); } /** * * @see railo.runtime.exp.IPageException#getExtendedInfo() */ public String getExtendedInfo() { return rootCause.getExtendedInfo(); } /* * * * @see railo.runtime.exp.IPageException#getLine() * / public String getLine() { return rootCause.getLine(); }*/ /** * * @see railo.runtime.exp.IPageException#getStackTraceAsString() */ public String getStackTraceAsString() { return rootCause.getStackTraceAsString(); /*StringWriter sw=new StringWriter(); PrintWriter pw=new PrintWriter(sw); printStackTrace(pw); pw.flush(); return sw.toString();*/ } /** * * @see railo.runtime.exp.IPageException#getTracePointer() */ public int getTracePointer() { return rootCause.getTracePointer(); } /** * * @see railo.runtime.exp.IPageException#getTypeAsString() */ public String getTypeAsString() { return rootCause.getTypeAsString(); } /** * * @see railo.runtime.exp.IPageException#setDetail(java.lang.String) */ public void setDetail(String detail) { rootCause.setDetail(detail); } /** * * @see railo.runtime.exp.IPageException#setErrorCode(java.lang.String) */ public void setErrorCode(String errorCode) { rootCause.setErrorCode(errorCode); } /** * * @see railo.runtime.exp.IPageException#setExtendedInfo(java.lang.String) */ public void setExtendedInfo(String extendedInfo) { rootCause.setExtendedInfo(extendedInfo); } /** * * @see railo.runtime.exp.IPageException#setTracePointer(int) */ public void setTracePointer(int tracePointer) { rootCause.setTracePointer(tracePointer); } /** * * @see railo.runtime.exp.IPageException#typeEqual(java.lang.String) */ public boolean typeEqual(String type) { return rootCause.equals(type); } /** * @see railo.runtime.dump.Dumpable#toDumpData(railo.runtime.PageContext, int) */ public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp) { return rootCause.toDumpData(pageContext,maxlevel,dp); } /** * @return the eventName */ public String getEventName() { return eventName; } /** * * @see railo.runtime.exp.PageExceptionImpl#getLine(railo.runtime.PageContext) */ public String getLine(Config config) { return ((PageExceptionImpl)rootCause).getLine(config); } /** * * @see railo.runtime.exp.PageExceptionImpl#getRootCause() */ public Throwable getRootCause() { return rootCause.getRootCause(); } /** * * @see railo.runtime.exp.PageExceptionImpl#getStackTrace() */ public StackTraceElement[] getStackTrace() { return rootCause.getStackTrace(); } /** * * @see railo.runtime.exp.PageExceptionImpl#printStackTrace() */ public void printStackTrace() { rootCause.printStackTrace(); } /** * * @see railo.runtime.exp.PageExceptionImpl#printStackTrace(java.io.PrintStream) */ public void printStackTrace(PrintStream s) { rootCause.printStackTrace(s); } /** * * @see railo.runtime.exp.PageExceptionImpl#printStackTrace(java.io.PrintWriter) */ public void printStackTrace(PrintWriter s) { rootCause.printStackTrace(s); } /** * @see railo.runtime.exp.PageExceptionBox#getPageException() */ public PageException getPageException() { return rootCause; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
196c16762a1f7c2ffaf37fdd18807e892d4e16e0
27ccd0bd64d4ec2809ad5245c01729f7144c3f1b
/learnbigdata/src/main/java/com/undergrowth/learnbigdata/mapreduce/WordCount.java
b4c00824d8e506834af0528d1d8227bbc2e7538b
[ "MIT" ]
permissive
undergrowthlinear/learntest
1c3df37e5cdb065ea542aeb0b1fbc30e72008e8c
c04358b6c7bdcedb085d36b58964e138253a5c31
refs/heads/master
2021-01-21T13:04:15.471006
2016-05-26T08:34:25
2016-05-26T08:34:25
45,017,141
0
0
null
null
null
null
UTF-8
Java
false
false
2,013
java
package com.undergrowth.learnbigdata.mapreduce; import java.io.IOException; import java.util.*; import org.apache.hadoop.fs.Path; import org.apache.hadoop.conf.*; import org.apache.hadoop.io.*; import org.apache.hadoop.mapreduce.*; import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; import org.apache.hadoop.mapreduce.lib.input.TextInputFormat; import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; import org.apache.hadoop.mapreduce.lib.output.TextOutputFormat; public class WordCount { public static class Map extends Mapper<LongWritable, Text, Text, IntWritable> { private final static IntWritable one = new IntWritable(1); private Text word = new Text(); public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException { String line = value.toString(); StringTokenizer tokenizer = new StringTokenizer(line); while (tokenizer.hasMoreTokens()) { word.set(tokenizer.nextToken()); context.write(word, one); } } } public static class Reduce extends Reducer<Text, IntWritable, Text, IntWritable> { public void reduce(Text key, Iterable<IntWritable> values, Context context) throws IOException, InterruptedException { int sum = 0; for (IntWritable val : values) { sum += val.get(); } context.write(key, new IntWritable(sum)); } } public static void main(String[] args) throws Exception { Configuration conf = new Configuration(); Job job = new Job(conf, "wordcount"); job.setOutputKeyClass(Text.class); job.setOutputValueClass(IntWritable.class); job.setMapperClass(Map.class); job.setReducerClass(Reduce.class); job.setInputFormatClass(TextInputFormat.class); job.setOutputFormatClass(TextOutputFormat.class); FileInputFormat.addInputPath(job, new Path(args[0])); FileOutputFormat.setOutputPath(job, new Path(args[1])); job.waitForCompletion(true); } }
[ "undergrowth@126.com" ]
undergrowth@126.com
0248a0a7ef82dccab4759c08bbad1ebe4139cfdb
5ca3901b424539c2cf0d3dda52d8d7ba2ed91773
/src_fernflower/org/jfree/data/xy/WindDataItem.java
9e97121e8df4e86cb8a158b54a9789511b230a2d
[]
no_license
fjh658/bindiff
c98c9c24b0d904be852182ecbf4f81926ce67fb4
2a31859b4638404cdc915d7ed6be19937d762743
refs/heads/master
2021-01-20T06:43:12.134977
2016-06-29T17:09:03
2016-06-29T17:09:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,223
java
package org.jfree.data.xy; import java.io.Serializable; class WindDataItem implements Serializable, Comparable { private Number x; private Number windDir; private Number windForce; public WindDataItem(Number var1, Number var2, Number var3) { this.x = var1; this.windDir = var2; this.windForce = var3; } public Number getX() { return this.x; } public Number getWindDirection() { return this.windDir; } public Number getWindForce() { return this.windForce; } public int compareTo(Object var1) { if(var1 instanceof WindDataItem) { WindDataItem var2 = (WindDataItem)var1; return this.x.doubleValue() > var2.x.doubleValue()?1:(this.x.equals(var2.x)?0:-1); } else { throw new ClassCastException("WindDataItem.compareTo(error)"); } } public boolean equals(Object var1) { if(this == var1) { return false; } else if(!(var1 instanceof WindDataItem)) { return false; } else { WindDataItem var2 = (WindDataItem)var1; return !this.x.equals(var2.x)?false:(!this.windDir.equals(var2.windDir)?false:this.windForce.equals(var2.windForce)); } } }
[ "manouchehri@riseup.net" ]
manouchehri@riseup.net
a57efff634d677a43788cc1ad474c1806d90ac19
6d60a8adbfdc498a28f3e3fef70366581aa0c5fd
/codebase/dataset/t1/730_frag2.java
b9a00fc062062d2810d6e755261bd700da8e5fc2
[]
no_license
rayhan-ferdous/code2vec
14268adaf9022d140a47a88129634398cd23cf8f
c8ca68a7a1053d0d09087b14d4c79a189ac0cf00
refs/heads/master
2022-03-09T08:40:18.035781
2022-02-27T23:57:44
2022-02-27T23:57:44
140,347,552
0
1
null
null
null
null
UTF-8
Java
false
false
412
java
public void setMatrix(int i0, int i1, int[] c, Matrix X) { try { for (int i = i0; i <= i1; i++) { for (int j = 0; j < c.length; j++) { A[i][c[j]] = X.get(i - i0, j); } } } catch (ArrayIndexOutOfBoundsException e) { throw new ArrayIndexOutOfBoundsException("Submatrix indices"); } }
[ "aaponcseku@gmail.com" ]
aaponcseku@gmail.com
4e1a6e843b094324173a5e5d30f9153ef11c5540
51043993069829c6d944fa4a20b586786c1a5bf6
/src/ru/javawebinar/webapp/WebAppConfig.java
32a44d4403aa7ca507f22c2b7d3366c67d5eed39
[]
no_license
barba-dorada/webapp5
7c08b8169a4d74d05f9217d29f905565260f0783
8f9a41d77426c79053b54d96fdd9887c37a6734c
refs/heads/master
2016-09-06T08:05:36.849606
2015-02-20T08:37:11
2015-02-20T08:37:11
29,125,925
0
1
null
null
null
null
UTF-8
Java
false
false
893
java
package ru.javawebinar.webapp; import ru.javawebinar.webapp.storage.IStorage; import ru.javawebinar.webapp.storage.XmlFileStorage; import java.io.InputStream; import java.util.logging.LogManager; /** * GKislin * 01.02.2015. */ public class WebAppConfig { private static final WebAppConfig INSTANCE = new WebAppConfig(); private IStorage storage; public static WebAppConfig get() { return INSTANCE; } public IStorage getStorage() { return storage; } private WebAppConfig() { try (InputStream is = getClass().getClassLoader().getResourceAsStream("logging.properties")) { LogManager.getLogManager().readConfiguration(is); storage = new XmlFileStorage("C:\\dev\\projects\\basejava\\webapp5\\datastore\\xml.web"); } catch (Exception e) { throw new IllegalStateException(e); } } }
[ "vad.tishenko@gmail.com" ]
vad.tishenko@gmail.com
37e9ac62b8adfbc596b22696c1e2e77aa8917f64
33d641955177aae577ecf75862ae9ef54f86c0f6
/gateway/engine/policies/src/main/java/io/apiman/gateway/engine/policies/caching/CacheConnectorInterceptor.java
de57bbf1de75058b80f32bd7f5adf1983e2588fb
[ "Apache-2.0" ]
permissive
A-Joshi/apiman
27cab3ffc61420936bf78a5d5c035ea07da9ea6b
35a751fcd5492b45dfb3e701f5b1b6d6144a3dc1
refs/heads/master
2021-01-16T19:30:27.545184
2016-02-02T21:29:37
2016-02-02T21:29:37
50,505,831
0
0
null
2016-01-27T12:29:11
2016-01-27T12:29:11
null
UTF-8
Java
false
false
5,058
java
/* * Copyright 2015 JBoss Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.apiman.gateway.engine.policies.caching; import io.apiman.gateway.engine.IApiConnection; import io.apiman.gateway.engine.IApiConnectionResponse; import io.apiman.gateway.engine.IApiConnector; import io.apiman.gateway.engine.async.AsyncResultImpl; import io.apiman.gateway.engine.async.IAsyncHandler; import io.apiman.gateway.engine.async.IAsyncResultHandler; import io.apiman.gateway.engine.beans.ApiRequest; import io.apiman.gateway.engine.beans.ApiResponse; import io.apiman.gateway.engine.beans.exceptions.ConnectorException; import io.apiman.gateway.engine.io.IApimanBuffer; import io.apiman.gateway.engine.io.ISignalReadStream; import io.apiman.gateway.engine.policy.IConnectorInterceptor; /** * A connector interceptor responsible for skipping the invokation to the * back end API. Instead of connecting to the real back-end, this * simply provides the previously-cached back-end response. * * @author eric.wittmann@redhat.com */ public class CacheConnectorInterceptor implements IConnectorInterceptor, IApiConnector, IApiConnection, IApiConnectionResponse { private ISignalReadStream<ApiResponse> cacheEntry; private IAsyncResultHandler<IApiConnectionResponse> handler; private boolean finished = false; private boolean connected = false; /** * Constructor. * @param cacheEntry */ public CacheConnectorInterceptor(ISignalReadStream<ApiResponse> cacheEntry) { this.cacheEntry = cacheEntry; } /** * @see io.apiman.gateway.engine.policy.IConnectorInterceptor#createConnector() */ @Override public IApiConnector createConnector() { return this; } /** * @see io.apiman.gateway.engine.IApiConnector#connect(io.apiman.gateway.engine.beans.ApiRequest, io.apiman.gateway.engine.async.IAsyncResultHandler) */ @Override public IApiConnection connect(ApiRequest request, IAsyncResultHandler<IApiConnectionResponse> handler) throws ConnectorException { this.handler = handler; this.connected = true; return this; } /** * @see io.apiman.gateway.engine.io.IWriteStream#write(io.apiman.gateway.engine.io.IApimanBuffer) */ @Override public void write(IApimanBuffer chunk) { // Don't care about the payload sent. } /** * @see io.apiman.gateway.engine.io.IWriteStream#end() */ @Override public void end() { // Called when the upload to the 'API' is complete. This is when we // need to response with the connection response. handler.handle(AsyncResultImpl.<IApiConnectionResponse>create(this)); } /** * @see io.apiman.gateway.engine.io.IStream#isFinished() */ @Override public boolean isFinished() { return finished; } /** * @see io.apiman.gateway.engine.io.IAbortable#abort() */ @Override public void abort() { if (!finished) { finished = true; connected = false; cacheEntry.abort(); } } /** * @see io.apiman.gateway.engine.IApiConnection#isConnected() */ @Override public boolean isConnected() { return connected; } /** * @see io.apiman.gateway.engine.io.ISignalReadStream#transmit() */ @Override public void transmit() { cacheEntry.transmit(); } /** * @see io.apiman.gateway.engine.io.IReadStream#bodyHandler(io.apiman.gateway.engine.async.IAsyncHandler) */ @Override public void bodyHandler(final IAsyncHandler<IApimanBuffer> bodyHandler) { cacheEntry.bodyHandler(bodyHandler); } /** * @see io.apiman.gateway.engine.io.IReadStream#endHandler(io.apiman.gateway.engine.async.IAsyncHandler) */ @Override public void endHandler(final IAsyncHandler<Void> endHandler) { cacheEntry.endHandler(new IAsyncHandler<Void>() { @Override public void handle(Void result) { endHandler.handle(result); connected = false; finished = true; } }); } /** * @see io.apiman.gateway.engine.io.IReadStream#getHead() */ @Override public ApiResponse getHead() { return cacheEntry.getHead(); } }
[ "eric.wittmann@gmail.com" ]
eric.wittmann@gmail.com
16563d29ab7fa99027cfa5c823d6c80fdf4e14e6
13cbb329807224bd736ff0ac38fd731eb6739389
/com/sun/org/apache/xalan/internal/xsltc/compiler/SimpleAttributeValue.java
7832ba706439a373b99edb92bcea7eea8aa54788
[]
no_license
ZhipingLi/rt-source
5e2537ed5f25d9ba9a0f8009ff8eeca33930564c
1a70a036a07b2c6b8a2aac6f71964192c89aae3c
refs/heads/master
2023-07-14T15:00:33.100256
2021-09-01T04:49:04
2021-09-01T04:49:04
401,933,858
0
0
null
null
null
null
UTF-8
Java
false
false
1,497
java
package com.sun.org.apache.xalan.internal.xsltc.compiler; import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen; import com.sun.org.apache.bcel.internal.generic.InstructionList; import com.sun.org.apache.bcel.internal.generic.PUSH; import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator; import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator; import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type; import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError; final class SimpleAttributeValue extends AttributeValue { private String _value; public SimpleAttributeValue(String paramString) { this._value = paramString; } public Type typeCheck(SymbolTable paramSymbolTable) throws TypeCheckError { return this._type = Type.String; } public String toString() { return this._value; } protected boolean contextDependent() { return false; } public void translate(ClassGenerator paramClassGenerator, MethodGenerator paramMethodGenerator) { ConstantPoolGen constantPoolGen = paramClassGenerator.getConstantPool(); InstructionList instructionList = paramMethodGenerator.getInstructionList(); instructionList.append(new PUSH(constantPoolGen, this._value)); } } /* Location: D:\software\jd-gui\jd-gui-windows-1.6.3\rt.jar!\com\sun\org\apache\xalan\internal\xsltc\compiler\SimpleAttributeValue.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.0.7 */
[ "michael__lee@yeah.net" ]
michael__lee@yeah.net
5b36b3acacb90f645b05f50955e0d4d3dd069a23
138c5dd54e57f498380c4c59e3ddabf939f1964a
/lcloud-library/lcloud-circulate-service/src/main/java/com/szcti/lcloud/circulate/entity/TReaderCredit.java
f142eeb7b137c09ddc79fa245c0346b106a19c31
[]
no_license
JIANLAM/zt-project
4d249f4b504789395a335df21fcf1cf009e07d78
50318c9296485d3a97050e307b3a8ab3e12510e7
refs/heads/master
2020-03-31T12:40:36.269261
2018-10-09T09:42:36
2018-10-09T09:42:36
152,225,516
1
0
null
null
null
null
UTF-8
Java
false
false
3,616
java
package com.szcti.lcloud.circulate.entity; import com.baomidou.mybatisplus.enums.IdType; import java.util.Date; import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.activerecord.Model; import com.baomidou.mybatisplus.annotations.TableName; import java.io.Serializable; /** * <p> * * </p> * * @author dw * @since 2018-07-25 */ @TableName("t_reader_credit") public class TReaderCredit extends Model<TReaderCredit> { private static final long serialVersionUID = 1L; @TableId(value = "id", type = IdType.AUTO) private Long id; /** * 读者id */ @TableField("reader_id") private Long readerId; /** * 扣分前分数 */ @TableField("before_deduct_credit_value") private Integer beforeDeductCreditValue; /** * 备注 */ private String remark; /** * 扣分时间 */ @TableField("deduct_score_time") private Date deductScoreTime; /** * 扣分数量 */ @TableField("deduct_score") private Integer deductScore; /** * 扣分原因 */ @TableField("deduct_score_reason") private String deductScoreReason; /** * 扣分后分数 */ @TableField("after_deduct_credit_value") private Integer afterDeductCreditValue; /** * 状态0禁用1启用 */ private Integer status; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Long getReaderId() { return readerId; } public void setReaderId(Long readerId) { this.readerId = readerId; } public Integer getBeforeDeductCreditValue() { return beforeDeductCreditValue; } public void setBeforeDeductCreditValue(Integer beforeDeductCreditValue) { this.beforeDeductCreditValue = beforeDeductCreditValue; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } public Date getDeductScoreTime() { return deductScoreTime; } public void setDeductScoreTime(Date deductScoreTime) { this.deductScoreTime = deductScoreTime; } public Integer getDeductScore() { return deductScore; } public void setDeductScore(Integer deductScore) { this.deductScore = deductScore; } public String getDeductScoreReason() { return deductScoreReason; } public void setDeductScoreReason(String deductScoreReason) { this.deductScoreReason = deductScoreReason; } public Integer getAfterDeductCreditValue() { return afterDeductCreditValue; } public void setAfterDeductCreditValue(Integer afterDeductCreditValue) { this.afterDeductCreditValue = afterDeductCreditValue; } public Integer getStatus() { return status; } public void setStatus(Integer status) { this.status = status; } @Override protected Serializable pkVal() { return this.id; } @Override public String toString() { return "TReaderCredit{" + ", id=" + id + ", readerId=" + readerId + ", beforeDeductCreditValue=" + beforeDeductCreditValue + ", remark=" + remark + ", deductScoreTime=" + deductScoreTime + ", deductScore=" + deductScore + ", deductScoreReason=" + deductScoreReason + ", afterDeductCreditValue=" + afterDeductCreditValue + ", status=" + status + "}"; } }
[ "mrkinlam@163.com" ]
mrkinlam@163.com
b85d0d6bafb3d81ec6460b8ba018bdec788a189c
95c49f466673952b465e19a5ee3ae6eff76bee00
/src/main/java/com/zhihu/android/videox/fragment/liveroom/live/LiveFunction.java
88ced4fc6b508938db5bb1c58bdb800652c26917
[]
no_license
Phantoms007/zhihuAPK
58889c399ae56b16a9160a5f48b807e02c87797e
dcdbd103436a187f9c8b4be8f71bdf7813b6d201
refs/heads/main
2023-01-24T01:34:18.716323
2020-11-25T17:14:55
2020-11-25T17:14:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,766
java
package com.zhihu.android.videox.fragment.liveroom.live; import android.content.Context; import androidx.lifecycle.ViewModel; import androidx.lifecycle.ViewModelProviders; import com.secneo.apkwrapper.C6969H; import com.zhihu.android.videox.api.model.Theater; import com.zhihu.android.videox.fragment.liveroom.LiveRoomFragment; import com.zhihu.android.videox.fragment.liveroom.functional_division.topic_live.role.TopicAnchor; import com.zhihu.android.videox.fragment.liveroom.functional_division.topic_live.role.TopicAudience; import com.zhihu.android.videox.fragment.liveroom.live.role.Anchor; import com.zhihu.android.videox.fragment.liveroom.live.role.Audience; import com.zhihu.android.videox.fragment.liveroom.live.role.IBaseRole; import com.zhihu.android.videox.utils.UserIdentityUtils; import kotlin.Metadata; import kotlin.NoWhenBranchMatchedException; import kotlin.p2243e.p2245b.C32569u; @Metadata /* renamed from: com.zhihu.android.videox.fragment.liveroom.live.b */ /* compiled from: LiveFunction.kt */ public final class LiveFunction { /* renamed from: a */ private IBaseRole f99506a; /* renamed from: b */ private LiveViewModel f99507b; /* renamed from: c */ private Context f99508c; /* renamed from: d */ private LiveRoomFragment f99509d; public LiveFunction(Context context, LiveRoomFragment liveRoomFragment) { C32569u.m150519b(context, C6969H.m41409d("G6A8CDB0EBA28BF")); C32569u.m150519b(liveRoomFragment, C6969H.m41409d("G6F91D41DB235A53D")); this.f99508c = context; this.f99509d = liveRoomFragment; ViewModel a = ViewModelProviders.m2839a(this.f99509d).mo7064a(LiveViewModel.class); C32569u.m150513a((Object) a, "ViewModelProviders.of(fr…iveViewModel::class.java]"); this.f99507b = (LiveViewModel) a; } /* renamed from: a */ public final void mo120344a(Theater theater) { IBaseRole aVar; if (theater != null) { StaticProperty.f99549a.mo120386a(theater); StaticProperty.f99549a.mo120387a(this.f99509d); if (StaticProperty.f99549a.mo120391e()) { aVar = m137401e(); } else { aVar = m137400d(); } this.f99506a = aVar; IBaseRole aVar2 = this.f99506a; if (aVar2 != null) { aVar2.mo120093b(theater); } } } /* renamed from: a */ public final void mo120343a() { IBaseRole aVar = this.f99506a; if (aVar != null) { aVar.mo120108m(); } } /* renamed from: b */ public final void mo120345b() { IBaseRole aVar = this.f99506a; if (aVar != null) { aVar.mo120109n(); } StaticProperty.f99549a.mo120389c(); } /* renamed from: c */ public final IBaseRole mo120346c() { return this.f99506a; } /* renamed from: d */ private final IBaseRole m137400d() { switch (C29016c.f99516a[UserIdentityUtils.f101652a.mo122114a().getUserStatus().ordinal()]) { case 1: return new Anchor(this.f99509d, this.f99507b); case 2: return new Audience(this.f99509d, this.f99507b); default: throw new NoWhenBranchMatchedException(); } } /* renamed from: e */ private final IBaseRole m137401e() { switch (C29016c.f99517b[UserIdentityUtils.f101652a.mo122114a().getUserStatus().ordinal()]) { case 1: return new TopicAnchor(this.f99509d); case 2: return new TopicAudience(this.f99509d); default: throw new NoWhenBranchMatchedException(); } } }
[ "seasonpplp@qq.com" ]
seasonpplp@qq.com
944103ac51d05b891c0cb4a698480da5ca625388
ad5cd983fa810454ccbb8d834882856d7bf6faca
/modules/cds-integration/profiletagaddon/gensrc/com/hybris/yprofile/profiletagaddon/jalo/GeneratedProfiletagaddonManager.java
e25c72bda3a873fd58e52cfad1ac2fbbdc963341
[]
no_license
amaljanan/my-hybris
2ea57d1a4391c9a81c8f4fef7c8ab977b48992b8
ef9f254682970282cf8ad6d26d75c661f95500dd
refs/heads/master
2023-06-12T17:20:35.026159
2021-07-09T04:33:13
2021-07-09T04:33:13
384,177,175
0
0
null
null
null
null
UTF-8
Java
false
false
2,730
java
/* * ---------------------------------------------------------------- * --- WARNING: THIS FILE IS GENERATED AND WILL BE OVERWRITTEN! --- * --- Generated at 06-Jul-2021, 12:04:41 PM --- * ---------------------------------------------------------------- */ package com.hybris.yprofile.profiletagaddon.jalo; import com.hybris.yprofile.profiletagaddon.constants.ProfiletagaddonConstants; import com.hybris.yprofile.profiletagaddon.jalo.ProfileTagScriptComponent; import de.hybris.platform.jalo.Item; import de.hybris.platform.jalo.Item.AttributeMode; import de.hybris.platform.jalo.JaloBusinessException; import de.hybris.platform.jalo.JaloSystemException; import de.hybris.platform.jalo.SessionContext; import de.hybris.platform.jalo.extension.Extension; import de.hybris.platform.jalo.type.ComposedType; import de.hybris.platform.jalo.type.JaloGenericCreationException; import java.util.HashMap; import java.util.Map; /** * Generated class for type <code>ProfiletagaddonManager</code>. */ @SuppressWarnings({"deprecation","unused","cast"}) public abstract class GeneratedProfiletagaddonManager extends Extension { protected static final Map<String, Map<String, AttributeMode>> DEFAULT_INITIAL_ATTRIBUTES; static { final Map<String, Map<String, AttributeMode>> ttmp = new HashMap(); DEFAULT_INITIAL_ATTRIBUTES = ttmp; } @Override public Map<String, AttributeMode> getDefaultAttributeModes(final Class<? extends Item> itemClass) { Map<String, AttributeMode> ret = new HashMap<>(); final Map<String, AttributeMode> attr = DEFAULT_INITIAL_ATTRIBUTES.get(itemClass.getName()); if (attr != null) { ret.putAll(attr); } return ret; } public ProfileTagScriptComponent createProfileTagScriptComponent(final SessionContext ctx, final Map attributeValues) { try { ComposedType type = getTenant().getJaloConnection().getTypeManager().getComposedType( ProfiletagaddonConstants.TC.PROFILETAGSCRIPTCOMPONENT ); return (ProfileTagScriptComponent)type.newInstance( ctx, attributeValues ); } catch( JaloGenericCreationException e) { final Throwable cause = e.getCause(); throw (cause instanceof RuntimeException ? (RuntimeException)cause : new JaloSystemException( cause, cause.getMessage(), e.getErrorCode() ) ); } catch( JaloBusinessException e ) { throw new JaloSystemException( e ,"error creating ProfileTagScriptComponent : "+e.getMessage(), 0 ); } } public ProfileTagScriptComponent createProfileTagScriptComponent(final Map attributeValues) { return createProfileTagScriptComponent( getSession().getSessionContext(), attributeValues ); } @Override public String getName() { return ProfiletagaddonConstants.EXTENSIONNAME; } }
[ "amaljanan333@gmail.com" ]
amaljanan333@gmail.com
faa1be3125ebf2b1f4d3a19752e431a473eefe33
ae2e9c79a797263f1e9d0e0a71e24da2b2c64ee0
/org.eclipse.jt.core/src/org/eclipse/jt/core/impl/SQLServerSubQueryRefBuffer.java
8b482d5da1bc9840c9507feb72a0ef8a43866f1d
[]
no_license
JeffTang139/jtcore
6330762d6716a31a0c0f5e11b7a890949774470b
827c2267b7e39c5a6321f342e5916dfd00d51989
refs/heads/master
2021-01-18T14:36:41.142947
2012-03-27T03:16:34
2012-03-27T03:16:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
737
java
package org.eclipse.jt.core.impl; import java.util.List; import org.eclipse.jt.core.def.table.TableJoinType; class SQLServerSubQueryRefBuffer extends SQLServerRelationRefBuffer implements ISqlJoinedQueryRefBuffer { SQLServerSelectBuffer select; public SQLServerSubQueryRefBuffer(String alias) { super(alias); } public SQLServerSubQueryRefBuffer(String alias, TableJoinType type) { super(alias, type); } public ISqlSelectBuffer select() { if (this.select == null) { this.select = new SQLServerSelectBuffer(); } return this.select; } @Override protected void writeRefTextTo(SqlStringBuffer sql, List<ParameterReserver> args) { sql.append('('); this.select.writeTo(sql, args); sql.append(')'); } }
[ "jefftang139@hotmail.com" ]
jefftang139@hotmail.com
24af4a38e9e6f35284bbfe2aa24ec2681ba165fa
d16724e97358f301e99af0687f5db82d9ac4ff7e
/rawdata/java/snippets/26.java
77ba3a1f61265db99dec8cd14933d2f739349cb1
[]
no_license
kaushik-rohit/code2seq
39b562f79e9555083c18c73c05ffc4f379d1f3b8
c942b95d7d5997e5b2d45ed8c3161ca9296ddde3
refs/heads/master
2022-11-29T11:46:43.105591
2020-01-04T02:04:04
2020-01-04T02:04:04
225,870,854
0
0
null
2022-11-16T09:21:10
2019-12-04T13:12:59
C#
UTF-8
Java
false
false
192
java
@Deprecated public void cliDisconnect(String cause) throws ExecutionException, InterruptedException { checkPermission(DISCONNECT); disconnect(new ByCLI(cause)).get(); }
[ "kaushikrohit325@gmail.com" ]
kaushikrohit325@gmail.com
0e6f46140507b463c571d6acec14d1f43e254bf6
8d8624f6d98312e0fa2b6d9079035de7a8b449dc
/ramler-java/src/test/java/org/ops4j/ramler/generator/BracketArrayTest.java
1e2b9f0d746dfc4ab058d4b16bb60d7ac76d382f
[ "Apache-2.0" ]
permissive
pkaul/org.ops4j.ramler
22a614caa1cd61dff9b814c7106164957ad3adff
9e652ffe07b896a2931e649dc09eea2084e0e2bc
refs/heads/master
2021-01-01T19:12:53.805840
2017-07-26T16:52:36
2017-07-26T16:52:36
98,538,158
0
0
null
2017-07-27T13:19:14
2017-07-27T13:19:14
null
UTF-8
Java
false
false
2,446
java
/* * Copyright 2017 OPS4J Contributors * * 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.ops4j.ramler.generator; import org.junit.Test; public class BracketArrayTest extends AbstractGeneratorTest { @Override public String getBasename() { return "bracketArray"; } @Test public void shouldFindModelClasses() { assertClasses("BooleanList", "DigitList", "NameList", "ObjectList", "Person", "PersonList", "StringList", "Employee", "EmployeeList"); } @Test public void shouldFindBooleanListMembers() { expectClass("BooleanList"); assertProperty(klass, "list", "List<Boolean>", "getList", "setList"); verifyClass(); } @Test public void shouldFindDigitListMembers() { expectClass("DigitList"); assertProperty(klass, "list", "List<Integer>", "getList", "setList"); verifyClass(); } @Test public void shouldFindNameListMembers() { expectClass("NameList"); assertProperty(klass, "list", "List<String>", "getList", "setList"); verifyClass(); } @Test public void shouldFindObjectListMembers() { expectClass("ObjectList"); assertProperty(klass, "list", "List<Map<String,Object>>", "getList", "setList"); verifyClass(); } @Test public void shouldFindPersonListMembers() { expectClass("PersonList"); assertProperty(klass, "list", "List<Person>", "getList", "setList"); verifyClass(); } @Test public void shouldFindEmployeeListMembers() { expectClass("EmployeeList"); assertProperty(klass, "list", "List<Employee>", "getList", "setList"); verifyClass(); } @Test public void shouldFindStringListMembers() { expectClass("StringList"); assertProperty(klass, "list", "List<String>", "getList", "setList"); verifyClass(); } }
[ "harald.wellmann@gmx.de" ]
harald.wellmann@gmx.de
43ec16dd8fa6c9e9b19faf67592ecf64fbde21f9
2c103f10d9601ad41da8dd48535bbfbbba989a80
/mobile/collect_app/src/main/java/org/sdrc/dgacg/collect/android/external/ExternalSelectChoice.java
c88e5ff2b2f5b6d8d2dfd7d07355e7a3ddb25429
[ "Apache-2.0" ]
permissive
SDRC-India/dga
85f74f4a0b1e9135c17b20c384e199392570bcfb
bae223b94117f8f8248f39a866dd4853f246d392
refs/heads/master
2023-01-14T02:10:32.582236
2019-10-10T07:54:48
2019-10-10T07:54:48
96,404,569
1
1
null
2023-01-05T23:18:18
2017-07-06T08:01:41
Java
UTF-8
Java
false
false
1,208
java
/* * Copyright (C) 2014 University of Washington * * Originally developed by Dobility, Inc. (as part of SurveyCTO) * * 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.sdrc.dgacg.collect.android.external; import org.javarosa.core.model.SelectChoice; /** * Author: Meletis Margaritis * Date: 18/11/2013 * Time: 2:08 μμ */ public class ExternalSelectChoice extends SelectChoice { String image; public ExternalSelectChoice(String labelOrID, String value, boolean isLocalizable) { super(labelOrID, value, isLocalizable); } public String getImage() { return image; } public void setImage(String image) { this.image = image; } }
[ "ratikanta@sdrc.co.in" ]
ratikanta@sdrc.co.in
7fba160984509817d28213feefa0625168330682
db45ce4a6c32636728d6528315d315cc880e1f28
/src/main/java/com/barust/application/service/util/RandomUtil.java
2d67e8eb743fa4971b05b07128ecf8b0872e87db
[]
no_license
barust/MyFirstMonolithicApp
ff54ede0422593a5eebdc4fa83f1db05f8b21471
f6fab9444f937c2fde7099d3a5c9b277c1d2e157
refs/heads/master
2021-04-18T19:44:38.703459
2018-03-25T06:14:38
2018-03-25T06:14:38
126,670,029
0
0
null
null
null
null
UTF-8
Java
false
false
1,467
java
package com.barust.application.service.util; import org.apache.commons.lang3.RandomStringUtils; /** * Utility class for generating random Strings. */ public final class RandomUtil { private static final int DEF_COUNT = 20; private RandomUtil() { } /** * Generate a password. * * @return the generated password */ public static String generatePassword() { return RandomStringUtils.randomAlphanumeric(DEF_COUNT); } /** * Generate an activation key. * * @return the generated activation key */ public static String generateActivationKey() { return RandomStringUtils.randomNumeric(DEF_COUNT); } /** * Generate a reset key. * * @return the generated reset key */ public static String generateResetKey() { return RandomStringUtils.randomNumeric(DEF_COUNT); } /** * Generate a unique series to validate a persistent token, used in the * authentication remember-me mechanism. * * @return the generated series data */ public static String generateSeriesData() { return RandomStringUtils.randomAlphanumeric(DEF_COUNT); } /** * Generate a persistent token, used in the authentication remember-me mechanism. * * @return the generated token data */ public static String generateTokenData() { return RandomStringUtils.randomAlphanumeric(DEF_COUNT); } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
fd1750f0f7381c0b566dfb6e5a6c624b87a79f56
4af46c51990059c509ed9278e8708f6ec2067613
/java/l2server/gameserver/network/serverpackets/MonRaceInfo.java
befb6fae50f48ea328df7eae4ce07ee73d368f33
[]
no_license
bahamus007/l2helios
d1519d740c11a66f28544075d9e7c628f3616559
228cf88db1981b1169ea5705eb0fab071771a958
refs/heads/master
2021-01-12T13:17:19.204718
2017-11-15T02:16:52
2017-11-15T02:16:52
72,180,803
1
2
null
null
null
null
UTF-8
Java
false
false
2,579
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, see <http://www.gnu.org/licenses/>. */ package l2server.gameserver.network.serverpackets; import l2server.gameserver.model.actor.L2Npc; /** * sample * 06 8f19904b 2522d04b 00000000 80 950c0000 4af50000 08f2ffff 0000 - 0 damage (missed 0x80) * 06 85071048 bc0e504b 32000000 10 fc41ffff fd240200 a6f5ffff 0100 bc0e504b 33000000 10 3.... * <p> * format * dddc dddh (ddc) * * @version $Revision: 1.1.6.2 $ $Date: 2005/03/27 15:29:39 $ */ public class MonRaceInfo extends L2GameServerPacket { private int _unknown1; private int _unknown2; private L2Npc[] _monsters; private int[][] _speeds; public MonRaceInfo(int unknown1, int unknown2, L2Npc[] monsters, int[][] speeds) { /* * -1 0 to initial the race * 0 15322 to start race * 13765 -1 in middle of race * -1 0 to end the race */ _unknown1 = unknown1; _unknown2 = unknown2; _monsters = monsters; _speeds = speeds; } // 0xf3;EtcStatusUpdatePacket;ddddd @Override protected final void writeImpl() { writeD(_unknown1); writeD(_unknown2); writeD(8); for (int i = 0; i < 8; i++) { //Logozo.info("MOnster "+(i+1)+" npcid "+_monsters[i].getNpcTemplate().getNpcId()); writeD(_monsters[i].getObjectId()); //npcObjectID writeD(_monsters[i].getTemplate().NpcId + 1000000); //npcID writeD(14107); //origin X writeD(181875 + 58 * (7 - i)); //origin Y writeD(-3566); //origin Z writeD(12080); //end X writeD(181875 + 58 * (7 - i)); //end Y writeD(-3566); //end Z writeF(_monsters[i].getTemplate().fCollisionHeight); //coll. height writeF(_monsters[i].getTemplate().fCollisionRadius); //coll. radius writeD(120); // ?? unknown for (int j = 0; j < 20; j++) { if (_unknown1 == 0) { writeC(_speeds[i][j]); } else { writeC(0); } } writeD(0); writeD(0); // CT2.3 special effect } } }
[ "singto52@hotmail.com" ]
singto52@hotmail.com
aa31f04920ca704663679c68ed6ee1997279db58
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/neo4j/2017/12/ReplayableCommitProcessTest.java
d8bddeaf30a7671aac6aaf2f2841bae1cd3c3d54
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
4,512
java
/* * Copyright (c) 2002-2017 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.causalclustering.core.state.machines.tx; import org.junit.Test; import org.neo4j.kernel.api.exceptions.TransactionFailureException; import org.neo4j.kernel.impl.api.TransactionCommitProcess; import org.neo4j.kernel.impl.api.TransactionToApply; import org.neo4j.kernel.impl.transaction.tracing.CommitEvent; import org.neo4j.kernel.lifecycle.LifecycleAdapter; import org.neo4j.storageengine.api.TransactionApplicationMode; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.neo4j.kernel.impl.transaction.tracing.CommitEvent.NULL; import static org.neo4j.storageengine.api.TransactionApplicationMode.EXTERNAL; public class ReplayableCommitProcessTest { @Test public void shouldCommitTransactions() throws Exception { // given TransactionToApply newTx1 = mock( TransactionToApply.class ); TransactionToApply newTx2 = mock( TransactionToApply.class ); TransactionToApply newTx3 = mock( TransactionToApply.class ); StubLocalDatabase localDatabase = new StubLocalDatabase( 1 ); final ReplayableCommitProcess txListener = new ReplayableCommitProcess( localDatabase, localDatabase ); // when txListener.commit( newTx1, NULL, EXTERNAL ); txListener.commit( newTx2, NULL, EXTERNAL ); txListener.commit( newTx3, NULL, EXTERNAL ); // then verify( localDatabase.commitProcess, times( 3 ) ).commit( any( TransactionToApply.class ), any( CommitEvent.class ), any( TransactionApplicationMode.class ) ); } @Test public void shouldNotCommitTransactionsThatAreAlreadyCommittedLocally() throws Exception { // given TransactionToApply alreadyCommittedTx1 = mock( TransactionToApply.class ); TransactionToApply alreadyCommittedTx2 = mock( TransactionToApply.class ); TransactionToApply newTx = mock( TransactionToApply.class ); StubLocalDatabase localDatabase = new StubLocalDatabase( 3 ); final ReplayableCommitProcess txListener = new ReplayableCommitProcess( localDatabase, localDatabase ); // when txListener.commit( alreadyCommittedTx1, NULL, EXTERNAL ); txListener.commit( alreadyCommittedTx2, NULL, EXTERNAL ); txListener.commit( newTx, NULL, EXTERNAL ); // then verify( localDatabase.commitProcess, times( 1 ) ).commit( eq( newTx ), any( CommitEvent.class ), any( TransactionApplicationMode.class ) ); verifyNoMoreInteractions( localDatabase.commitProcess ); } private static class StubLocalDatabase extends LifecycleAdapter implements TransactionCounter, TransactionCommitProcess { long lastCommittedTransactionId; TransactionCommitProcess commitProcess = mock( TransactionCommitProcess.class ); StubLocalDatabase( long lastCommittedTransactionId ) { this.lastCommittedTransactionId = lastCommittedTransactionId; } @Override public long lastCommittedTransactionId() { return lastCommittedTransactionId; } @Override public long commit( TransactionToApply tx, CommitEvent commitEvent, TransactionApplicationMode mode ) throws TransactionFailureException { lastCommittedTransactionId++; return commitProcess.commit( tx, commitEvent, mode ); } } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
7136bee33bb43a512159563123e7c1166277f882
34b9e07759f74da99763a2617e5ae1b9c88957c8
/server/src/main/java/info/xiaomo/server/protocol/message/gm/ReqCloseServerMessage.java
1fb0f11b5150487aa12c3b23c938ae2db83ef7f1
[ "Apache-2.0" ]
permissive
yj173055792/GameServer
c6c0925dda4f3b10a55ec56e678e104df7d81ae4
1d3fdb0db0cf882422ae18997d95e44f3a31dd59
refs/heads/master
2021-01-20T13:03:29.839398
2017-08-24T12:40:25
2017-08-24T12:40:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
445
java
package info.xiaomo.server.protocol.message.gm; import info.xiaomo.server.back.BackManager; import info.xiaomo.server.server.AbstractMessage; public class ReqCloseServerMessage extends AbstractMessage { public ReqCloseServerMessage() { this.queueId = 2; } @Override public void doAction() { BackManager.getInstance().closeServer(); } @Override public int getId() { return 201; } }
[ "xiaomo@xiaomo.info" ]
xiaomo@xiaomo.info
33e7d3f436eb11ea52ece98c492b879d8e6a7d8d
0679664b8044ddfe70618d74870850275fcae4c8
/Venice/Venice-Utilities/src/main/java/com/gdn/venice/exception/ProductCategoryNotFoundException.java
d3b2a4d9876fe2b42cac86cbd96a038c2ff47f89
[]
no_license
yauritux/venice
794205613dffda43e1204eee6257b6146d7b837a
69858691832e4511b14cb3e1fe082eecf7717d4f
refs/heads/master
2021-01-13T07:53:36.936705
2014-05-14T05:01:28
2014-05-14T05:01:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
430
java
package com.gdn.venice.exception; import com.gdn.venice.constants.VeniceExceptionConstants; /** * * @author yauritux * */ public class ProductCategoryNotFoundException extends VeniceInternalException { private static final long serialVersionUID = -3778446722488344655L; public ProductCategoryNotFoundException(String message, VeniceExceptionConstants errorCode) { super(message); this.errorCode = errorCode; } }
[ "yauritux@gmail.com" ]
yauritux@gmail.com
de8dbabb9af58ac477533a5dd67ee84217a47622
806f76edfe3b16b437be3eb81639d1a7b1ced0de
/src/com/amap/api/services/route/C3479j.java
d638cb0b91dacf2964810bc079ef2f1085382245
[]
no_license
magic-coder/huawei-wear-re
1bbcabc807e21b2fe8fe9aa9d6402431dfe3fb01
935ad32f5348c3d8c8d294ed55a5a2830987da73
refs/heads/master
2021-04-15T18:30:54.036851
2018-03-22T07:16:50
2018-03-22T07:16:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
597
java
package com.amap.api.services.route; import android.os.Parcel; import android.os.Parcelable.Creator; /* compiled from: RouteBusLineItem */ final class C3479j implements Creator<RouteBusLineItem> { C3479j() { } public /* synthetic */ Object createFromParcel(Parcel parcel) { return m17139a(parcel); } public /* synthetic */ Object[] newArray(int i) { return m17140a(i); } public RouteBusLineItem m17139a(Parcel parcel) { return new RouteBusLineItem(parcel); } public RouteBusLineItem[] m17140a(int i) { return null; } }
[ "lebedev1537@gmail.com" ]
lebedev1537@gmail.com
a4505f9b9e0eeb7dfcc11913c6b776b57a23708b
d98de110431e5124ec7cc70d15906dac05cfa61a
/public/source/ors/src/main/java/org/marketcetera/ors/brokers/SpringSelector.java
31b5a16a3c4b21e892be1f3b781b15c7402ae783
[]
no_license
dhliu3/marketcetera
367f6df815b09f366eb308481f4f53f928de4c49
4a81e931a044ba19d8f35bdadd4ab081edd02f5f
refs/heads/master
2020-04-06T04:39:55.389513
2012-01-30T06:49:25
2012-01-30T06:49:25
29,947,427
0
1
null
2015-01-28T02:54:39
2015-01-28T02:54:39
null
UTF-8
Java
false
false
1,602
java
package org.marketcetera.ors.brokers; import java.util.List; import org.marketcetera.util.misc.ClassVersion; /** * The Spring-based configuration of the selector. * * @author tlerios@marketcetera.com * @since 1.0.0 * @version $Id: SpringSelector.java 10480 2009-04-13 20:31:09Z tlerios $ */ /* $License$ */ @ClassVersion("$Id: SpringSelector.java 10480 2009-04-13 20:31:09Z tlerios $") public class SpringSelector { // INSTANCE DATA. private List<SpringSelectorEntry> mEntries; private SpringBroker mDefaultBroker; // INSTANCE METHODS. /** * Sets the configurations of the receiver's entries to the given * ones. * * @param entries The configurations. It may be null. */ public void setEntries (List<SpringSelectorEntry> entries) { mEntries=entries; } /** * Returns the configurations of the receiver's entries. * * @return The configurations. It may be null. */ public List<SpringSelectorEntry> getEntries() { return mEntries; } /** * Sets the receiver's default broker to the given one. * * @param defaultBroker The broker. It may be null. */ public void setDefaultBroker (SpringBroker defaultBroker) { mDefaultBroker=defaultBroker; } /** * Returns the receiver's default broker. * * @return The broker. It may be null. */ public SpringBroker getDefaultBroker() { return mDefaultBroker; } }
[ "stevenshack@stevenshack.com" ]
stevenshack@stevenshack.com
03b81645d472ace9c270c1face9d987da3ff7933
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
/ast_results/tjg1_nori/app/src/main/java/io/github/tjg1/nori/TagFilterSettingsActivity.java
5f17b432b217f56f6f24487a7981eb65e0201855
[]
no_license
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
0564143d92f8024ff5fa6b659c2baebf827582b1
refs/heads/master
2020-07-13T13:53:40.297493
2019-01-11T11:51:18
2019-01-11T11:51:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,539
java
// isComment package io.github.tjg1.nori; import android.content.SharedPreferences; import android.os.Bundle; import android.preference.PreferenceManager; import android.support.v4.app.DialogFragment; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageButton; import android.widget.ListView; import android.widget.TextView; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import io.github.tjg1.nori.fragment.AddTagFilterDialogFragment; import io.github.tjg1.nori.util.StringUtils; /** * isComment */ public class isClassOrIsInterface extends AppCompatActivity implements View.OnClickListener, AddTagFilterDialogFragment.AddTagListener { // isComment /** * isComment */ private SharedPreferences isVariable; /** * isComment */ private List<String> isVariable = new ArrayList<>(); /** * isComment */ private BaseAdapter isVariable = new BaseAdapter() { @Override public int isMethod() { return isNameExpr.isMethod(); } @Override public String isMethod(int isParameter) { return isNameExpr.isMethod(isNameExpr); } @Override public long isMethod(int isParameter) { return isNameExpr; } @Override public View isMethod(int isParameter, View isParameter, ViewGroup isParameter) { // isComment View isVariable = isNameExpr; if (isNameExpr == null) { final LayoutInflater isVariable = isMethod(); isNameExpr = isNameExpr.isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr, true); } // isComment final TextView isVariable = (TextView) isNameExpr.isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr); isNameExpr.isMethod(isMethod(isNameExpr)); final ImageButton isVariable = (ImageButton) isNameExpr.isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr); isNameExpr.isMethod(isNameExpr); isNameExpr.isMethod(isNameExpr.this); return isNameExpr; } }; // isComment // isComment @Override protected void isMethod(Bundle isParameter) { super.isMethod(isNameExpr); // isComment isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr); // isComment isNameExpr = isNameExpr.isMethod(this); // isComment if (isNameExpr.isMethod(isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr))) { final String isVariable = isNameExpr.isMethod(isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr), "isStringConstant").isMethod(); if (!isNameExpr.isMethod(isNameExpr)) { isNameExpr.isMethod(isNameExpr.isMethod(isNameExpr.isMethod("isStringConstant"))); } } // isComment Toolbar isVariable = (Toolbar) isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr); isMethod(isNameExpr); // isComment final ActionBar isVariable = isMethod(); if (isNameExpr != null) { isNameExpr.isMethod(true); isNameExpr.isMethod(true); isNameExpr.isMethod(true); } // isComment final ListView isVariable = (ListView) isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr.isFieldAccessExpr); isNameExpr.isMethod(isNameExpr); } @Override public boolean isMethod(Menu isParameter) { // isComment final MenuInflater isVariable = isMethod(); isNameExpr.isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr); return true; } @Override public boolean isMethod(MenuItem isParameter) { // isComment switch(isNameExpr.isMethod()) { case isNameExpr.isFieldAccessExpr.isFieldAccessExpr.isFieldAccessExpr: isMethod(); return true; case isNameExpr.isFieldAccessExpr.isFieldAccessExpr: isMethod(); return true; default: return super.isMethod(isNameExpr); } } // isComment // isComment @Override public void isMethod(View isParameter) { // isComment final int isVariable = (int) isNameExpr.isMethod(); isNameExpr.isMethod(isNameExpr); isMethod(); } // isComment // isComment @Override public void isMethod(String isParameter) { isNameExpr.isMethod(isNameExpr); isMethod(); } // isComment // isComment /** * isComment */ private void isMethod() { DialogFragment isVariable = new AddTagFilterDialogFragment(); isNameExpr.isMethod(isMethod(), "isStringConstant"); } // isComment // isComment /** * isComment */ private void isMethod() { isNameExpr.isMethod().isMethod(isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr), isNameExpr.isMethod(isNameExpr.isMethod(new String[isNameExpr.isMethod()]), "isStringConstant").isMethod()).isMethod(); isNameExpr.isMethod(); } }
[ "matheus@melsolucoes.net" ]
matheus@melsolucoes.net
81adfcf3aaf8aa016ca48fd6e6c19b1fc69cce2d
225011bbc304c541f0170ef5b7ba09b967885e95
/org/telegram/messenger/exoplayer2/metadata/MetadataDecoderFactory.java
0fae8321dddcb4bca52184e0b7ffb2efddfa8983
[]
no_license
sebaudracco/bubble
66536da5367f945ca3318fecc4a5f2e68c1df7ee
e282cda009dfc9422594b05c63e15f443ef093dc
refs/heads/master
2023-08-25T09:32:04.599322
2018-08-14T15:27:23
2018-08-14T15:27:23
140,444,001
1
1
null
null
null
null
UTF-8
Java
false
false
2,110
java
package org.telegram.messenger.exoplayer2.metadata; import org.telegram.messenger.exoplayer2.Format; import org.telegram.messenger.exoplayer2.metadata.emsg.EventMessageDecoder; import org.telegram.messenger.exoplayer2.metadata.id3.Id3Decoder; import org.telegram.messenger.exoplayer2.metadata.scte35.SpliceInfoDecoder; public interface MetadataDecoderFactory { public static final MetadataDecoderFactory DEFAULT = new C52591(); static class C52591 implements MetadataDecoderFactory { C52591() { } public boolean supportsFormat(Format format) { String mimeType = format.sampleMimeType; return "application/id3".equals(mimeType) || "application/x-emsg".equals(mimeType) || "application/x-scte35".equals(mimeType); } public MetadataDecoder createDecoder(Format format) { String str = format.sampleMimeType; Object obj = -1; switch (str.hashCode()) { case -1248341703: if (str.equals("application/id3")) { obj = null; break; } break; case 1154383568: if (str.equals("application/x-emsg")) { obj = 1; break; } break; case 1652648887: if (str.equals("application/x-scte35")) { obj = 2; break; } break; } switch (obj) { case null: return new Id3Decoder(); case 1: return new EventMessageDecoder(); case 2: return new SpliceInfoDecoder(); default: throw new IllegalArgumentException("Attempted to create decoder for unsupported format"); } } } MetadataDecoder createDecoder(Format format); boolean supportsFormat(Format format); }
[ "sebaudracco@gmail.com" ]
sebaudracco@gmail.com
2eb65017b2e6f1b6d122efcd0d77ec6c027cc3e1
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/tencent/mm/plugin/wallet/balance/a/a/ad.java
7aba09e17facc19aa1e2c3ac0abcd254518c89c5
[]
no_license
0jinxing/wechat-apk-source
544c2d79bfc10261eb36389c1edfdf553d8f312a
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
refs/heads/master
2020-06-07T20:06:03.580028
2019-06-21T09:17:26
2019-06-21T09:17:26
193,069,132
9
4
null
null
null
null
UTF-8
Java
false
false
2,524
java
package com.tencent.mm.plugin.wallet.balance.a.a; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.ai.b; import com.tencent.mm.ai.b.a; import com.tencent.mm.ai.b.b; import com.tencent.mm.ai.b.c; import com.tencent.mm.ai.f; import com.tencent.mm.ai.m; import com.tencent.mm.network.e; import com.tencent.mm.network.k; import com.tencent.mm.network.q; import com.tencent.mm.protocal.protobuf.bhc; import com.tencent.mm.protocal.protobuf.bhd; public final class ad extends m implements k { private f ehi; private b gme; private bhc tgv; public bhd tgw; public ad(String paramString1, String paramString2) { AppMethodBeat.i(45332); b.a locala = new b.a(); locala.fsJ = new bhc(); locala.fsK = new bhd(); locala.fsI = 2996; locala.uri = "/cgi-bin/mmpay-bin/openlqbaccount"; locala.fsL = 0; locala.fsM = 0; this.gme = locala.acD(); this.tgv = ((bhc)this.gme.fsG.fsP); this.tgv.vKZ = paramString1; this.tgv.wKu = paramString2; this.tgv.tgu = ab.cMM(); com.tencent.mm.sdk.platformtools.ab.i("MicroMsg.NetSceneOpenLqbAccount", "NetSceneOpenLqbAccount, eCardType: %s, extraData: %s", new Object[] { paramString1, paramString2 }); AppMethodBeat.o(45332); } public final int a(e parame, f paramf) { AppMethodBeat.i(45333); this.ehi = paramf; int i = a(parame, this.gme, this); AppMethodBeat.o(45333); return i; } public final void a(int paramInt1, int paramInt2, int paramInt3, String paramString, q paramq, byte[] paramArrayOfByte) { AppMethodBeat.i(45334); com.tencent.mm.sdk.platformtools.ab.i("MicroMsg.NetSceneOpenLqbAccount", "onGYNetEnd, errType: %s, errCode: %s", new Object[] { Integer.valueOf(paramInt2), Integer.valueOf(paramInt3) }); this.tgw = ((bhd)((b)paramq).fsH.fsP); com.tencent.mm.sdk.platformtools.ab.i("MicroMsg.NetSceneOpenLqbAccount", "onGYNetEnd, retcode: %s, retmsg: %s", new Object[] { Integer.valueOf(this.tgw.kdT), this.tgw.kdU }); if (this.tgw.kdT == 0) ab.ach(this.tgw.tgu); if (this.ehi != null) this.ehi.onSceneEnd(paramInt2, paramInt3, paramString, this); AppMethodBeat.o(45334); } public final int getType() { return 2996; } } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes2-dex2jar.jar * Qualified Name: com.tencent.mm.plugin.wallet.balance.a.a.ad * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
883e36156a2812f9b9fdc080fc3e8763d0e911f7
a03ddb4111faca852088ea25738bc8b3657e7b5c
/TestTransit/src/jp/co/yahoo/applicot/CrashReportFinder$1.java
6398a11db2e57412b6ee23031151328e7c12f84d
[]
no_license
randhika/TestMM
5f0de3aee77b45ca00f59cac227450e79abc801f
4278b34cfe421bcfb8c4e218981069a7d7505628
refs/heads/master
2020-12-26T20:48:28.446555
2014-09-29T14:37:51
2014-09-29T14:37:51
24,874,176
2
0
null
null
null
null
UTF-8
Java
false
false
615
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package jp.co.yahoo.applicot; import java.io.File; import java.io.FilenameFilter; // Referenced classes of package jp.co.yahoo.applicot: // CrashReportFinder class this._cls0 implements FilenameFilter { final CrashReportFinder this$0; public boolean accept(File file, String s) { return s.endsWith(".stacktrace"); } () { this$0 = CrashReportFinder.this; super(); } }
[ "metromancn@gmail.com" ]
metromancn@gmail.com
49c2a33dd5709d1bbd5624dabe078d979692201b
249bd1badcdd1451bcfb268d40720f4cd5da13cb
/app/src/main/java/com/as/demo_ok27/provice/PcAdapter.java
fe47d107d0182e3c312d558f24bcc118637f67c9
[]
no_license
zhangqifan1/Demo_ok27
41e9e2488da7ab8735f0c7c8384a3ba1eaa049e1
4d5f4ce81fdac2d612f0b244a9bf0a7fe1cdf5b3
refs/heads/master
2020-06-03T20:48:26.966410
2019-06-13T08:49:18
2019-06-13T08:49:18
191,725,819
0
0
null
null
null
null
UTF-8
Java
false
false
665
java
package com.as.demo_ok27.provice; import android.support.annotation.Nullable; import com.as.demo_ok27.R; import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseViewHolder; import java.util.List; /** * ----------------------------- * Created by zqf on 2019/6/11. * --------------------------- */ public class PcAdapter extends BaseQuickAdapter<String, BaseViewHolder> { public PcAdapter(int layoutResId, @Nullable List<String> data) { super(layoutResId, data); } @Override protected void convert(BaseViewHolder helper, String item) { helper.setText(R.id.item_pc_text, item); } }
[ "852780161@qq.com" ]
852780161@qq.com
2ebd7a9380c36f9774c3ecf05c51fa2a0e121e83
c4cff1d479ee5cfa132e4a81269ad0efbf28c205
/src/main/java/dev/itboot/mb/mapper/StaffMapper.java
3fed451387417b9fc9b64ecbd29d51c0dfa70ee6
[]
no_license
noikedan/springmybatisRest
f9159f27542e322ddb9e6d0a6956b18ad86d514b
f125000a692b5fc90f625ef2bb67866f9eb743ce
refs/heads/main
2023-06-02T13:18:48.455296
2021-06-21T07:57:24
2021-06-21T07:57:24
378,817,976
0
0
null
null
null
null
UTF-8
Java
false
false
887
java
package dev.itboot.mb.mapper; import java.util.List; import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Update; import dev.itboot.mb.model.Staff; @Mapper public interface StaffMapper { @Select("SELECT * FROM staff") List<Staff> selectAll(); // 以下を追加 @Select({ "SELECT * FROM staff", "WHERE id = #{id}" }) Staff selectByPrimaryKey(Long id); @Insert({ "INSERT INTO staff(name, email, status, registration)", "VALUES(#{name}, #{email}, 't' ,sysdate)" }) int insert(Staff record); @Update({ "UPDATE staff", "SET name = #{name}, email = #{email}", "WHERE id = #{id}" }) int updateByPrimaryKey(Staff record); @Delete({ "DELETE FROM staff", "WHERE id = #{id}" }) int deleteByPrimaryKey(Long id); }
[ "you@example.com" ]
you@example.com
c6a2d73e9286b0a69328f31ebb0baf9b72af3333
3d2423c1487e7b269ed32e4f9e9a389e88965608
/micro-consumer/src/main/java/cn/hcnet2006/blog/microconsumer/service/SysMenuService.java
5410b145ceed8f048a4213192757d83d20e41b95
[]
no_license
lidengyin/micro-blog
79b5fea9bf52bcfd12609d3b04de48de60ae7121
be112647a2e036cd594908ea0c937e2f83967542
refs/heads/master
2022-06-23T08:52:18.673051
2020-03-27T14:05:55
2020-03-27T14:05:55
243,299,945
0
1
null
2022-06-21T02:59:34
2020-02-26T15:43:19
JavaScript
UTF-8
Java
false
false
1,246
java
package cn.hcnet2006.blog.microconsumer.service; import cn.hcnet2006.blog.microconsumer.bean.SysMenu; import cn.hcnet2006.blog.microconsumer.http.HttpResult; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.*; import java.io.IOException; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; @FeignClient(name = "hcnet-website-1",contextId = "d") @RequestMapping("/menu") public interface SysMenuService { @PostMapping("/register") public HttpResult upload(@RequestParam String name, @RequestParam Long parentId, @RequestParam String perms); @PutMapping("/update/list") public HttpResult update(@RequestBody List<SysMenu> sysMenus); @PostMapping("/find/page") public HttpResult find(@RequestParam int pageNum, @RequestParam int pageSize, @RequestParam Long id , @RequestParam String name,@RequestParam Long parentId, @RequestParam String perms, @RequestParam Byte delFlag); }
[ "2743853037@qq.com" ]
2743853037@qq.com
0f83ac4240104b14b82f8ff8fd6954850d22ce8c
a280aa9ac69d3834dc00219e9a4ba07996dfb4dd
/regularexpress/home/weilaidb/work/app/hadoop-2.7.3-src/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/HdfsFileStatus.java
6adfa7543b1d44df5f4aca436cc60c0807dc47ea
[]
no_license
weilaidb/PythonExample
b2cc6c514816a0e1bfb7c0cbd5045cf87bd28466
798bf1bdfdf7594f528788c4df02f79f0f7827ce
refs/heads/master
2021-01-12T13:56:19.346041
2017-07-22T16:30:33
2017-07-22T16:30:33
68,925,741
4
2
null
null
null
null
UTF-8
Java
false
false
479
java
package org.apache.hadoop.hdfs.protocol; import java.net.URI; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability; import org.apache.hadoop.fs.FileEncryptionInfo; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.permission.FsPermission; import org.apache.hadoop.hdfs.DFSUtil; @InterfaceAudience.Private @InterfaceStability.Evolving public class HdfsFileStatus
[ "weilaidb@localhost.localdomain" ]
weilaidb@localhost.localdomain
c91aceb82b81d2243cbdfab7c8f9015aaa3ea066
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13372-17-25-PESA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/extension/job/internal/InstallJob_ESTest.java
26173bb006aae07691fd98b6271a04e25f400536
[]
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
559
java
/* * This file was automatically generated by EvoSuite * Fri Apr 03 05:06:11 UTC 2020 */ package org.xwiki.extension.job.internal; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class InstallJob_ESTest extends InstallJob_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
8268e10e348070321ae4e0c4c8762774a66fe1cc
2da87d8ef7afa718de7efa72e16848799c73029f
/ikep4-collpack/src/main/java/com/lgcns/ikep4/collpack/kms/qna/model/QnaRecommend.java
cbf214ff6d9f3dee3243769b3211d40dfca07836
[]
no_license
haifeiforwork/ehr-moo
d3ee29e2cae688f343164384958f3560255e52b2
921ff597b316a9a0111ed4db1d5b63b88838d331
refs/heads/master
2020-05-03T02:34:00.078388
2018-04-05T00:54:04
2018-04-05T00:54:04
178,373,434
0
1
null
2019-03-29T09:21:01
2019-03-29T09:21:01
null
UTF-8
Java
false
false
753
java
/* * Copyright (C) 2011 LG CNS Inc. * All rights reserved. * * 모든 권한은 LG CNS(http://www.lgcns.com)에 있으며, * LG CNS의 허락없이 소스 및 이진형식으로 재배포, 사용하는 행위를 금지합니다. */ package com.lgcns.ikep4.collpack.kms.qna.model; import java.util.Date; /** * 게시글 추천 모델 클래스 * * @author ${user} * @version $$Id: BoardRecommend.java 16240 2011-08-18 04:08:15Z giljae $$ */ public class QnaRecommend extends QnaRecommendPK { private static final long serialVersionUID = 1L; /** * 등록일자 */ private Date registDate; public Date getRegistDate() { return registDate; } public void setRegistDate(Date registDate) { this.registDate = registDate; } }
[ "haneul9@gmail.com" ]
haneul9@gmail.com
a7a49ac0eb1b79abd8dee8b97fd88e25d27b09e6
e307eba673d1568c33ddc1bce02dede4386f1a22
/kafka-gs/src/main/java/poc/kafka/service/ExternalizableService.java
8054db779bf43d4285a285710c84f3347b7f9aa7
[]
no_license
ashishb888/kafka-poc
28e74866364b54c06eae13875ab34a0a8f360b9c
9c0ec9fdf34424a099651cdedd261842b9157634
refs/heads/master
2020-07-10T00:25:05.515156
2020-03-04T06:14:52
2020-03-04T06:14:52
204,118,651
2
1
null
2023-09-05T22:02:03
2019-08-24T06:30:13
Java
UTF-8
Java
false
false
5,464
java
package poc.kafka.service; import java.time.Duration; import java.util.Arrays; import java.util.Properties; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.stream.IntStream; import org.apache.kafka.clients.consumer.Consumer; import org.apache.kafka.clients.consumer.ConsumerRecord; import org.apache.kafka.clients.consumer.ConsumerRecords; import org.apache.kafka.clients.consumer.KafkaConsumer; import org.apache.kafka.clients.producer.KafkaProducer; import org.apache.kafka.clients.producer.Producer; import org.apache.kafka.clients.producer.ProducerRecord; import org.apache.kafka.common.TopicPartition; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import lombok.extern.java.Log; import poc.kafka.domain.Animal; import poc.kafka.domain.Cat; import poc.kafka.domain.Dog; import poc.kafka.domain.Employee; import poc.kafka.domain.serialization.EmployeeDeserializer; import poc.kafka.domain.serialization.EmployeeSerializer; import poc.kafka.properties.KafkaProperties; @Service @Log @SuppressWarnings({ "unused", "resource" }) public class ExternalizableService { @Autowired private KafkaProperties kp; private void sendDiffTypes() { log.info("sendDiffTypes service"); Producer<Integer, Animal> producer = animalProducer(); IntStream.iterate(0, i -> i + 1).limit(10).forEach(i -> { if (i % 2 == 0) producer.send(new ProducerRecord<Integer, Animal>("gs4", i, new Dog(i))); else producer.send(new ProducerRecord<Integer, Animal>("gs4", i, new Cat(i))); }); } private void consumeDiffTypes() { log.info("consumeDiffTypes service"); Consumer<Integer, Animal> consumer = animalConsumer(); TopicPartition tp = new TopicPartition("gs3", 0); consumer.assign(Arrays.asList(tp)); while (true) { ConsumerRecords<Integer, Animal> records = consumer.poll(Duration.ofMillis(10)); records.forEach(r -> { log.info("r: " + r); }); } } private void produce() { log.info("produce service"); Producer<Integer, Employee> producer = producer(); IntStream.iterate(0, i -> i + 1).limit(10).forEach(i -> { producer.send(new ProducerRecord<Integer, Employee>("gs1", i, new Employee(String.valueOf(i), i))); }); } private Producer<Integer, Animal> animalProducer() { Properties kafkaProps = new Properties(); kp.getKafkaProducer().forEach((k, v) -> { // log.info("k: " + k + ", v: " + v); kafkaProps.put(k, v); }); return new KafkaProducer<>(kafkaProps); } private Consumer<Integer, Animal> animalConsumer() { Properties kafkaProps = new Properties(); kp.getKafkaConsumer().forEach((k, v) -> { // log.info("k: " + k + ", v: " + v); kafkaProps.put(k, v); }); return new KafkaConsumer<>(kafkaProps); } private Producer<Integer, Employee> producer() { Properties kafkaProps = new Properties(); kp.getKafkaProducer().forEach((k, v) -> { // log.info("k: " + k + ", v: " + v); kafkaProps.put(k, v); }); return new KafkaProducer<>(kafkaProps); } private void consume() { log.info("consume service"); Consumer<Integer, Employee> consumer = consumer(); TopicPartition tp = new TopicPartition("gs1", 0); consumer.assign(Arrays.asList(tp)); consumer.seekToBeginning(Arrays.asList(tp)); while (true) { ConsumerRecords<Integer, Employee> records = consumer.poll(Duration.ofMillis(10)); for (ConsumerRecord<Integer, Employee> record : records) { log.info("record: " + record); } } } private Consumer<Integer, Employee> consumer() { Properties kafkaProps = new Properties(); kp.getKafkaConsumer().forEach((k, v) -> { // log.info("k: " + k + ", v: " + v); kafkaProps.put(k, v); }); return new KafkaConsumer<>(kafkaProps); } private void produceToMultiPartitions() { log.info("produceToMultiPartitions service"); Producer<Integer, Employee> producer = producer(); IntStream.iterate(0, i -> i + 1).limit(10).forEach(i -> { producer.send(new ProducerRecord<Integer, Employee>("gs2", i, i, new Employee(String.valueOf(i), i))); }); } private void consumeByGroup() { log.info("consumeByGroup service"); final int partitions = 10; ExecutorService es = Executors.newFixedThreadPool(partitions); for (int i = 0; i < partitions; i++) { int localI = i; es.submit(() -> { Consumer<Integer, Employee> consumer = consumer(); TopicPartition tp = new TopicPartition("gs2", localI); consumer.assign(Arrays.asList(tp)); consumer.seekToBeginning(Arrays.asList(tp)); while (true) { ConsumerRecords<Integer, Employee> records = consumer.poll(Duration.ofMillis(10)); for (ConsumerRecord<Integer, Employee> record : records) { log.info("record: " + record); } } }); } } private void produceConsume() { log.info("produceConsume service"); sendDiffTypes(); consumeDiffTypes(); // produceToMultiPartitions(); // consumeByGroup(); // produce(); // consume(); } private void serialization() { log.info("serialization service"); Employee emp = new Employee("Ashish", 21); log.info("emp: " + emp); byte[] empBytes = new EmployeeSerializer().serialize("", emp); log.info("empBytes: " + empBytes); Employee emp1 = new EmployeeDeserializer().deserialize("", empBytes); log.info("emp1: " + emp1); } public void main() { log.info("main service"); // serialization(); produceConsume(); } }
[ "ashish.bhosle008@gmail.com" ]
ashish.bhosle008@gmail.com
7d0015d13f29b8b442387d3232fd37cd62dc8269
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
/project447/src/main/java/org/gradle/test/performance/largejavamultiproject/project447/p2236/Production44733.java
0e2ecd03c7a9ded60908a79cabe4ec58be233ae3
[]
no_license
big-guy/largeJavaMultiProject
405cc7f55301e1fd87cee5878a165ec5d4a071aa
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
refs/heads/main
2023-03-17T10:59:53.226128
2021-03-04T01:01:39
2021-03-04T01:01:39
344,307,977
0
0
null
null
null
null
UTF-8
Java
false
false
1,971
java
package org.gradle.test.performance.largejavamultiproject.project447.p2236; public class Production44733 { private Production44730 property0; public Production44730 getProperty0() { return property0; } public void setProperty0(Production44730 value) { property0 = value; } private Production44731 property1; public Production44731 getProperty1() { return property1; } public void setProperty1(Production44731 value) { property1 = value; } private Production44732 property2; public Production44732 getProperty2() { return property2; } public void setProperty2(Production44732 value) { property2 = value; } private String property3; public String getProperty3() { return property3; } public void setProperty3(String value) { property3 = value; } private String property4; public String getProperty4() { return property4; } public void setProperty4(String value) { property4 = value; } private String property5; public String getProperty5() { return property5; } public void setProperty5(String value) { property5 = value; } private String property6; public String getProperty6() { return property6; } public void setProperty6(String value) { property6 = value; } private String property7; public String getProperty7() { return property7; } public void setProperty7(String value) { property7 = value; } private String property8; public String getProperty8() { return property8; } public void setProperty8(String value) { property8 = value; } private String property9; public String getProperty9() { return property9; } public void setProperty9(String value) { property9 = value; } }
[ "sterling.greene@gmail.com" ]
sterling.greene@gmail.com
497c2ddb5724619d8dfd6fb6e5e18b515fe709b7
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
/eclipseswt_cluster/11665/src_1.java
b9842989317f0e80696b26e6b3046c0ac10ceb3d
[]
no_license
martinezmatias/GenPat-data-C3
63cfe27efee2946831139747e6c20cf952f1d6f6
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
refs/heads/master
2022-04-25T17:59:03.905613
2020-04-15T14:41:34
2020-04-15T14:41:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,375
java
/******************************************************************************* * Copyright (c) 2000, 2003 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.swt.examples.controlexample; import org.eclipse.swt.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.widgets.*; import org.eclipse.swt.layout.*; class TextTab extends ScrollableTab { /* Example widgets and groups that contain them */ Text text; Group textGroup; /* Style widgets added to the "Style" group */ Button wrapButton, readOnlyButton; /** * Creates the Tab within a given instance of ControlExample. */ TextTab(ControlExample instance) { super(instance); } /** * Creates a bitmap image. */ Image createBitmapImage (Display display, String name) { ImageData source = new ImageData(ControlExample.class.getResourceAsStream(name + ".bmp")); ImageData mask = new ImageData(ControlExample.class.getResourceAsStream(name + "_mask.bmp")); return new Image (display, source, mask); } /** * Creates the "Example" group. */ void createExampleGroup () { super.createExampleGroup (); /* Create a group for the text widget */ textGroup = new Group (exampleGroup, SWT.NONE); textGroup.setLayout (new GridLayout ()); textGroup.setLayoutData (new GridData (GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL)); textGroup.setText ("Text"); } /** * Creates the "Example" widgets. */ void createExampleWidgets () { /* Compute the widget style */ int style = SWT.NONE; if (singleButton.getSelection ()) style |= SWT.SINGLE; if (multiButton.getSelection ()) style |= SWT.MULTI; if (horizontalButton.getSelection ()) style |= SWT.H_SCROLL; if (verticalButton.getSelection ()) style |= SWT.V_SCROLL; if (wrapButton.getSelection ()) style |= SWT.WRAP; if (readOnlyButton.getSelection ()) style |= SWT.READ_ONLY; if (borderButton.getSelection ()) style |= SWT.BORDER; /* Create the example widgets */ text = new Text (textGroup, style); text.setText (ControlExample.getResourceString("Example_string") + Text.DELIMITER + ControlExample.getResourceString("One_Two_Three")); } /** * Creates the "Style" group. */ void createStyleGroup() { super.createStyleGroup(); /* Create the extra widgets */ wrapButton = new Button (styleGroup, SWT.CHECK); wrapButton.setText ("SWT.WRAP"); readOnlyButton = new Button (styleGroup, SWT.CHECK); readOnlyButton.setText ("SWT.READ_ONLY"); } /** * Gets the "Example" widget children. */ Control [] getExampleWidgets () { return new Control [] {text}; } /** * Gets the text for the tab folder item. */ String getTabText () { return "Text"; } /** * Sets the state of the "Example" widgets. */ void setExampleWidgetState () { super.setExampleWidgetState (); wrapButton.setSelection ((text.getStyle () & SWT.WRAP) != 0); readOnlyButton.setSelection ((text.getStyle () & SWT.READ_ONLY) != 0); } }
[ "375833274@qq.com" ]
375833274@qq.com
63b2606c53b3d9d002e35f431add545fb267c1e7
fff0f953e83aa827f08adcf5119d1b73218c4cc8
/src/main/java/com/asamioffice/goldenport/util/MultiUniqueValueMap.java
40a677db031f9a2a6080395604925620216cd4a7
[]
no_license
asami/goldenport-java-library
62e0f6b985223e181bd304147cd3afc6b798f388
4867039c1b018d8bf5442784685a6ba5d0f6620f
refs/heads/master
2020-04-29T03:36:15.269492
2020-02-29T07:23:11
2020-02-29T07:23:11
2,091,229
0
1
null
null
null
null
UTF-8
Java
false
false
1,414
java
/* * The JabaJaba class library * Copyright (C) 1997-2004 ASAMI, Tomoharu (tasami@ibm.net) * * 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 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.asamioffice.goldenport.util; import java.util.ArrayList; import java.util.List; /** * MultiUniqueValueMap * * @since Dec. 1, 2006 * @version Dec. 1, 2006 * @author ASAMI, Tomoharu (asami@asamioffice.com) */ public class MultiUniqueValueMap<K, V> extends MultiValueMap<K, V> { public void add(K key, V value) { List<V> list = map_.get(key); if (list == null) { list = new ArrayList<V>(); } if (!list.contains(value)) { list.add(value); map_.put(key, list); } } }
[ "asami.tomoharu@gmail.com" ]
asami.tomoharu@gmail.com
899dad5e04500a0ae7d70a2aaa6af6b49283523a
ff7e107a5068b07436342353dbf912d587c3840b
/resflow-master0925/resflow-intf/src/main/java/com/zres/project/localnet/portal/resourceInitiate/service/ResSupplementDealServiceIntf.java
9b686b27aa2b6cbe2986b810def22ce7a323fe3b
[]
no_license
lichao20000/resflow-master
0f0668c7a6cb03cafaca153b9e9b882b2891b212
78217aa31f17dd5c53189e695a3a0194fced0d0a
refs/heads/master
2023-01-27T19:15:40.752341
2020-12-10T02:07:32
2020-12-10T02:07:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,668
java
package com.zres.project.localnet.portal.resourceInitiate.service; import java.util.List; import java.util.Map; /** * 资源补录模块 */ public interface ResSupplementDealServiceIntf { /** * 启流程 * @param paramsMap * @return */ public Map<String, Object> createOrderResSup(Map<String, Object> paramsMap) throws Exception; /** * 环节回单方法 * @param params * @return * @throws Exception */ public Map<String, Object> submitOrderResSup(Map<String, Object> params) throws Exception; /** * 第一个环节自动提交 * @param orderId * @return */ public Map<String, Object> firstTacheAutoSubmit(String orderId) throws Exception; /** * 根据实例ID查询srvOrdId * @param instanceId * @return */ public String qrySrvOrdIdByInstanceId(String instanceId); /** * 资源配置 * @param param * @return */ public Map<String, Object> resConfigSupplement(Map<String, Object> param); /** * 汇总归档 * @param param * @return */ public Map<String,Object> resArchive(Map<String,Object> param); /** * 撤销资源补录流程 * @param param */ public Map<String,Object> cancelOrderResSupplement(Map<String,Object> param); /** * 正常单来单时,资源补录单的相应操作 * 1.如果不是拆机单,那么挂起补录单 * 2.如果是拆机单,那么归档已配置的补录资源,并且撤销补录流程 * @param param * @return */ public Map<String,Object> supplementStop(Map<String,Object> param); }
[ "2832383563@qq.com" ]
2832383563@qq.com
05b45fd20649b9f0964db3fea577f8c3378e5316
3d16ef09f16596e6bb767f6c328057d2453d9e7a
/reactor-tcp/src/test/java/reactor/tcp/syslog/test/SyslogMessageParser.java
965d7143392ec3a5680b7551266b97bc3b54a1f8
[ "Apache-2.0" ]
permissive
normanmaurer/reactor
47451209613aa7119fb53e59b8cd1c4788364636
eb9e8cd5b8f8f04af46382033a6aa9c066aacf1e
refs/heads/master
2021-01-17T23:42:43.305627
2013-06-08T02:22:21
2013-06-08T02:22:21
10,569,820
0
1
null
null
null
null
UTF-8
Java
false
false
1,443
java
package reactor.tcp.syslog.test; import java.util.Calendar; class SyslogMessageParser { private static final int MAXIMUM_SEVERITY = 7; private static final int MAXIMUM_FACILITY = 23; private static final int MINIMUM_PRI = 0; private static final int MAXIMUM_PRI = (MAXIMUM_FACILITY * 8) + MAXIMUM_SEVERITY; private static final int DEFAULT_PRI = 13; public static SyslogMessage parse(String raw) { if (null == raw || raw.isEmpty()) { return null; } int pri = DEFAULT_PRI; Timestamp timestamp = null; String host = null; int index = 0; if (raw.indexOf('<') == 0) { int endPri = raw.indexOf('>'); if (endPri >= 2 && endPri <= 4) { int candidatePri = Integer.parseInt(raw.substring(1, endPri)); if (candidatePri >= MINIMUM_PRI && candidatePri <= MAXIMUM_PRI) { pri = candidatePri; index = endPri + 1; timestamp = new Timestamp(raw.substring(index, index + 15)); index += 16; int endHostnameIndex = raw.indexOf(' ', index); host = raw.substring(index, endHostnameIndex); index = endHostnameIndex + 1; } } } if (host == null) { // TODO Need a way to populate host with client's IP address } int facility = pri / 8; Severity severity = Severity.values()[pri % 8]; if (timestamp == null) { timestamp = new Timestamp(Calendar.getInstance()); } return new SyslogMessage(facility, severity, timestamp, host, raw.substring(index)); } }
[ "jon@jbrisbin.com" ]
jon@jbrisbin.com
fe007cc9e505584675734cb55465987d0b734496
e6e3a865f1bba98335afa8761c3ed5d96071a3ab
/jrJava/practice6/BackAndForthCricle.java
71a7aa4d249d6576e9bcf93f764e4c9d36321de8
[]
no_license
adhvik-kannan/Projects
c5e4b1f58bd30c040a11267a5f6721242e4ba53d
2e659206e98637b1fe4084d36ccc2186f8c0327e
refs/heads/master
2023-08-23T20:12:04.390935
2021-10-23T19:35:44
2021-10-23T19:35:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
650
java
package jrJava.practice6; import java.awt.Color; import java.awt.Graphics; import resources.DrawingBoard; import resources.Timer; public class BackAndForthCricle { public static void main(String[] args) { DrawingBoard board = new DrawingBoard(50, 50, 800, 600); Graphics g = board.getCanvas(); Timer timer = new Timer(); int x = 100; int change = 5; int i; for (i = 1; i < 1000; i++) { if (x <= 0 || x >= 700) { change = -change; // it changes the sign of the value. } x = x + change; board.clear(); g.setColor(Color.RED); g.fillOval(x, 250, 100, 100); board.repaint(); timer.pause(5); } } }
[ "90004955+adhvik-kannan@users.noreply.github.com" ]
90004955+adhvik-kannan@users.noreply.github.com
b057a6410ed80d8d8bfc2d41e61ee03a7811ca0a
e42afd54dcc0add3d2b8823ee98a18c50023a396
/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/src/main/java/com/google/cloud/baremetalsolution/v2/ListLunsResponseOrBuilder.java
d59395142be262c526acd71191ddcbd17de703c6
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
degloba/google-cloud-java
eea41ebb64f4128583533bc1547e264e730750e2
b1850f15cd562c659c6e8aaee1d1e65d4cd4147e
refs/heads/master
2022-07-07T17:29:12.510736
2022-07-04T09:19:33
2022-07-04T09:19:33
180,201,746
0
0
Apache-2.0
2022-07-04T09:17:23
2019-04-08T17:42:24
Java
UTF-8
Java
false
false
3,661
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. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/baremetalsolution/v2/baremetalsolution.proto package com.google.cloud.baremetalsolution.v2; public interface ListLunsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.ListLunsResponse) com.google.protobuf.MessageOrBuilder { /** * * * <pre> * The list of luns. * </pre> * * <code>repeated .google.cloud.baremetalsolution.v2.Lun luns = 1;</code> */ java.util.List<com.google.cloud.baremetalsolution.v2.Lun> getLunsList(); /** * * * <pre> * The list of luns. * </pre> * * <code>repeated .google.cloud.baremetalsolution.v2.Lun luns = 1;</code> */ com.google.cloud.baremetalsolution.v2.Lun getLuns(int index); /** * * * <pre> * The list of luns. * </pre> * * <code>repeated .google.cloud.baremetalsolution.v2.Lun luns = 1;</code> */ int getLunsCount(); /** * * * <pre> * The list of luns. * </pre> * * <code>repeated .google.cloud.baremetalsolution.v2.Lun luns = 1;</code> */ java.util.List<? extends com.google.cloud.baremetalsolution.v2.LunOrBuilder> getLunsOrBuilderList(); /** * * * <pre> * The list of luns. * </pre> * * <code>repeated .google.cloud.baremetalsolution.v2.Lun luns = 1;</code> */ com.google.cloud.baremetalsolution.v2.LunOrBuilder getLunsOrBuilder(int index); /** * * * <pre> * A token identifying a page of results from the server. * </pre> * * <code>string next_page_token = 2;</code> * * @return The nextPageToken. */ java.lang.String getNextPageToken(); /** * * * <pre> * A token identifying a page of results from the server. * </pre> * * <code>string next_page_token = 2;</code> * * @return The bytes for nextPageToken. */ com.google.protobuf.ByteString getNextPageTokenBytes(); /** * * * <pre> * Locations that could not be reached. * </pre> * * <code>repeated string unreachable = 3;</code> * * @return A list containing the unreachable. */ java.util.List<java.lang.String> getUnreachableList(); /** * * * <pre> * Locations that could not be reached. * </pre> * * <code>repeated string unreachable = 3;</code> * * @return The count of unreachable. */ int getUnreachableCount(); /** * * * <pre> * Locations that could not be reached. * </pre> * * <code>repeated string unreachable = 3;</code> * * @param index The index of the element to return. * @return The unreachable at the given index. */ java.lang.String getUnreachable(int index); /** * * * <pre> * Locations that could not be reached. * </pre> * * <code>repeated string unreachable = 3;</code> * * @param index The index of the value to return. * @return The bytes of the unreachable at the given index. */ com.google.protobuf.ByteString getUnreachableBytes(int index); }
[ "neenushaji@google.com" ]
neenushaji@google.com
2c215cd586f3f33cf399fa0c9091578776768cbe
1f65e87983cb2f9e9a5683bd11259b1283784d43
/app/src/main/java/com/skypremiuminternational/app/domain/models/feature/FeatureCustomAttribute.java
981716ad10e231ddd1ba830ccf36947f81ddc115
[]
no_license
tonyanangel/Skypremium2
c40f8339be4f43e8b307e7654af7e788f36df575
7b510e184d23a16297b25ce77938ce9ba5e4624a
refs/heads/master
2023-02-16T23:37:42.088375
2021-01-20T04:08:06
2021-01-20T04:08:06
331,189,329
0
0
null
null
null
null
UTF-8
Java
false
false
723
java
package com.skypremiuminternational.app.domain.models.feature; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; import java.io.Serializable; /** * Created by sandi on 11/17/17. */ public class FeatureCustomAttribute implements Serializable { @SerializedName("attribute_code") @Expose private String attributeCode; @SerializedName("value") @Expose private String value; public String getAttributeCode() { return attributeCode; } public void setAttributeCode(String attributeCode) { this.attributeCode = attributeCode; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } }
[ "phuqnvn111@gmail.com" ]
phuqnvn111@gmail.com
c87023f6f27925789837a24ddaba3074f60004d7
cf52b3064d536af626339ddd30b28c0b8e15aaee
/gameserver/src/main/java/org/l2junity/gameserver/model/stats/finalizers/PEvasionRateFinalizer.java
1e003ada69037a0dcd37f0411d9c8f75f74721b3
[]
no_license
LegacyofAden/emu-ungp
7aaa7d9fd60698cb784d8c2c1eaaa20ef0a8d59b
b76dc91157e43d67f886b6926afd11b110ed5dce
refs/heads/master
2021-01-01T18:21:03.529671
2017-04-08T23:08:37
2017-04-08T23:08:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,513
java
/* * Copyright (C) 2004-2015 L2J Unity * * This file is part of L2J Unity. * * L2J Unity 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. * * L2J Unity is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.l2junity.gameserver.model.stats.finalizers; import org.l2junity.core.configs.PlayerConfig; import org.l2junity.gameserver.model.actor.Creature; import org.l2junity.gameserver.model.items.ItemTemplate; import org.l2junity.gameserver.model.stats.DoubleStat; import org.l2junity.gameserver.model.stats.IStatsFunction; import java.util.OptionalDouble; /** * @author UnAfraid */ public class PEvasionRateFinalizer implements IStatsFunction { @Override public double calc(Creature creature, OptionalDouble base, DoubleStat stat) { throwIfPresent(base); double baseValue = calcEquippedItemsBaseValue(creature, stat); final int level = creature.getLevel(); if (creature.isPlayer()) { // [Square(DEX)] * 5 + lvl; baseValue += (Math.sqrt(creature.getDEX()) * 5) + level; if (level > 69) { baseValue += level - 69; } if (level > 77) { baseValue += 1; } if (level > 80) { baseValue += 2; } if (level > 87) { baseValue += 2; } if (level > 92) { baseValue += 1; } if (level > 97) { baseValue += 1; } // Enchanted helm bonus baseValue += calcEnchantBodyPart(creature, ItemTemplate.SLOT_HEAD); } else { // [Square(DEX)] * 5 + lvl; baseValue += (Math.sqrt(creature.getDEX()) * 5) + level; if (level > 69) { baseValue += (level - 69) + 2; } } return validateValue(creature, DoubleStat.defaultValue(creature, stat, baseValue), Double.NEGATIVE_INFINITY, PlayerConfig.MAX_EVASION); } @Override public double calcEnchantBodyPartBonus(int enchantLevel, boolean isBlessed) { if (isBlessed) { return (0.3 * Math.max(enchantLevel - 3, 0)) + (0.3 * Math.max(enchantLevel - 6, 0)); } return (0.2 * Math.max(enchantLevel - 3, 0)) + (0.2 * Math.max(enchantLevel - 6, 0)); } }
[ "RaaaGEE@users.noreply.github.com" ]
RaaaGEE@users.noreply.github.com
69853d8f0a176a7d98441d2ad7364e18dd1e358a
7cab112a472df702c9b616c760b8940d50324550
/aionxemu-master/GameServer/src/gameserver/dao/GameTimeDAO.java
672185b1771f027de5ec2526b307af5e03851c37
[]
no_license
luckychenheng/server_demo
86d31c939fd895c7576156b643ce89354e102209
97bdcb1f6cd614fd360cfed800c479fbdb695cd3
refs/heads/master
2020-05-15T02:59:07.396818
2019-05-09T10:30:47
2019-05-09T10:30:47
182,059,222
2
0
null
null
null
null
UTF-8
Java
false
false
1,313
java
/** * This file is part of alpha team <alpha-team.com>. * * alpha team is pryvate 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. * * alpha team 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 alpha team. If not, see <http://www.gnu.org/licenses/>. */ package gameserver.dao; import com.aionemu.commons.database.dao.DAO; /** * @author Ben */ public abstract class GameTimeDAO implements DAO { /** * {@inheritDoc} */ @Override public final String getClassName() { return GameTimeDAO.class.getName(); } /** * Loads the game time stored in the database * * @returns Time stored in database */ public abstract int load(); /** * Stores the given time in the database as the GameTime */ public abstract boolean store(int time); }
[ "seemac@seedeMacBook-Pro.local" ]
seemac@seedeMacBook-Pro.local
2f423aa2cc6b78a2126415f1a3be5f4360f8027b
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_420/Testnull_41968.java
88589c7e3511995a861859bc15efab082b5db21b
[]
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_420; import static org.junit.Assert.*; public class Testnull_41968 { private final Productionnull_41968 production = new Productionnull_41968("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
627af15f185fa61c4c11ba023ea6b20759a05fac
95bec0a704bc60b42842c9cefb270804011f9d8a
/Manager-Template/src/main/java/cn/org/rapid_framework/generator/GeneratorMain.java
44c33251ad5da5a2df48fa8a329bcd11520d58d1
[ "Apache-2.0" ]
permissive
lizhou828/GenCode
79cfaf2c6cc00c93cee657ea9fdbaa23faaa0f50
c6fa2ab97c69f1206522988ad376841e37ea6ef6
refs/heads/master
2021-01-19T18:50:47.682875
2018-10-26T03:10:27
2018-10-26T03:10:27
88,383,840
0
0
null
null
null
null
UTF-8
Java
false
false
1,034
java
package cn.org.rapid_framework.generator; import java.io.File; /** * * @author badqiu * @email badqiu(a)gmail.com */ public class GeneratorMain { /** * 请直接修改以下代码调用不同的方法以执行相关生成任务. */ public static void main(String[] args) throws Exception { String genCodeDirName = GeneratorUtil.getGenCodeDirFileName(); System.out.println(genCodeDirName); GeneratorFacade g = new GeneratorFacade(); // g.printAllTableNames(); //打印数据库中的表名称 g.clean(); //删除生成器的输出目录 g.generateByTable("t_illegal_words"); //通过数据库表生成文件,注意: oracle 需要指定schema及注意表名的大小写. // g.generateByTable("table_name","TableName"); //通过数据库表生成文件,并可以自定义类名 // g.generateByAllTable(); //自动搜索数据库中的所有表并生成文件 // g.generateByClass(Blog.class); // //打开文件夹 Runtime.getRuntime().exec("cmd.exe /c start " + genCodeDirName ); } }
[ "lizhou828@126.com" ]
lizhou828@126.com
e60c220d78372328f1d124155c1657378af7fae7
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-new-fitness/results/LANG-1b-1-19-Single_Objective_GGA-WeightedSum-BasicBlockCoverage-opt/org/apache/commons/lang3/math/NumberUtils_ESTest.java
58665e57bb0192fa22660cc2ee5640eb9e85d826
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
762
java
/* * This file was automatically generated by EvoSuite * Tue Oct 26 20:36:08 UTC 2021 */ package org.apache.commons.lang3.math; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import org.apache.commons.lang3.math.NumberUtils; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class NumberUtils_ESTest extends NumberUtils_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { NumberUtils numberUtils0 = new NumberUtils(); // Undeclared exception! NumberUtils.createInteger("xW:"); } }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
30a27b482a0e505e1a66d60a8ec70ad94c6a1cc7
154261dadf12b23772622f653f856a20f1b7eecb
/src/com/facebook/buck/features/project/intellij/DefaultIjLibraryFactoryResolver.java
9a26556a12f8ab000ece663f2f61aa7750307aef
[ "Apache-2.0" ]
permissive
xmfan/buck
db91b5f8376f113d3cb713cac8b7584e2c9ec262
1e755494263bfa4b68e62fd61d86a711b9febc3a
refs/heads/master
2020-09-16T08:57:10.480410
2019-11-23T02:23:40
2019-11-23T03:39:30
223,717,003
0
0
Apache-2.0
2019-11-24T08:57:38
2019-11-24T08:57:37
null
UTF-8
Java
false
false
3,909
java
/* * Copyright 2015-present Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ package com.facebook.buck.features.project.intellij; import com.facebook.buck.android.AndroidPrebuiltAarDescription; import com.facebook.buck.core.description.BaseDescription; import com.facebook.buck.core.model.BuildTarget; import com.facebook.buck.core.model.impl.BuildTargetPaths; import com.facebook.buck.core.model.targetgraph.TargetNode; import com.facebook.buck.core.sourcepath.BuildTargetSourcePath; import com.facebook.buck.core.sourcepath.ExplicitBuildTargetSourcePath; import com.facebook.buck.core.sourcepath.SourcePath; import com.facebook.buck.core.sourcepath.resolver.SourcePathResolverAdapter; import com.facebook.buck.features.project.intellij.model.IjLibraryFactoryResolver; import com.facebook.buck.io.filesystem.ProjectFilesystem; import java.nio.file.Path; import java.util.Optional; import java.util.Set; class DefaultIjLibraryFactoryResolver implements IjLibraryFactoryResolver { private final ProjectFilesystem projectFilesystem; private final SourcePathResolverAdapter sourcePathResolver; private final Optional<Set<BuildTarget>> requiredBuildTargets; DefaultIjLibraryFactoryResolver( ProjectFilesystem projectFilesystem, IjProjectSourcePathResolver sourcePathResolver, Optional<Set<BuildTarget>> requiredBuildTargets) { this.projectFilesystem = projectFilesystem; this.sourcePathResolver = new SourcePathResolverAdapter(sourcePathResolver); this.requiredBuildTargets = requiredBuildTargets; } @Override public Path getPath(SourcePath path) { if (path instanceof BuildTargetSourcePath) { requiredBuildTargets.ifPresent( requiredTargets -> requiredTargets.add(((BuildTargetSourcePath) path).getTarget())); } return projectFilesystem.getRootPath().relativize(sourcePathResolver.getAbsolutePath(path)); } @Override public Optional<SourcePath> getPathIfJavaLibrary(TargetNode<?> targetNode) { BuildTarget buildTarget = targetNode.getBuildTarget(); Optional<SourcePath> toReturn; BaseDescription<?> description = targetNode.getDescription(); if (description instanceof AndroidPrebuiltAarDescription) { // From the constructor of UnzipAar.java // This is the output path of the classes.jar which buck extracts from the AAR archive // so that it can be passed to `javac`. We also use it to provide IntelliJ with a jar // so we can reference it as a library. Path scratchPath = BuildTargetPaths.getScratchPath( targetNode.getFilesystem(), buildTarget, "__uber_classes_%s__/classes.jar"); toReturn = Optional.of( ExplicitBuildTargetSourcePath.of( buildTarget.withFlavors(AndroidPrebuiltAarDescription.AAR_UNZIP_FLAVOR), scratchPath)); } else if (IjProjectSourcePathResolver.isJvmLanguageTargetNode(targetNode)) { toReturn = IjProjectSourcePathResolver.getOutputPathFromJavaTargetNode( targetNode, buildTarget, targetNode.getFilesystem()) .map(path -> ExplicitBuildTargetSourcePath.of(buildTarget, path)); } else { toReturn = Optional.empty(); } if (toReturn.isPresent()) { requiredBuildTargets.ifPresent(requiredTargets -> requiredTargets.add(buildTarget)); } return toReturn; } }
[ "facebook-github-bot@users.noreply.github.com" ]
facebook-github-bot@users.noreply.github.com
fa44465ecb9f81ab56d80ec6da6d0e28b8473a3d
101872318af2dead82831e6d7a5149897a37144f
/synergynet2.5/src/main/java/synergynetframework/appsystem/contentsystem/items/RoundWindow.java
2e5278fb658fd59a244c7aee39ce0c8228e84344
[]
no_license
synergynet/synergynet2.5
d99e1241e46a381af8e2dbf77930ff19dbe944ed
cadb0f6fa87a9eee1c13bd853f2911c2e62998f8
refs/heads/master
2021-01-18T23:25:36.775096
2017-07-07T16:54:33
2017-07-07T16:54:33
32,217,300
1
1
null
null
null
null
UTF-8
Java
false
false
3,440
java
/* * Copyright (c) 2008 University of Durham, England All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * Redistributions in binary * form must reproduce the above copyright notice, this list of conditions and * the following disclaimer in the documentation and/or other materials provided * with the distribution. * Neither the name of 'SynergyNet' nor the names of * its contributors may be used to endorse or promote products derived from this * software without specific prior written permission. THIS SOFTWARE IS PROVIDED * BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package synergynetframework.appsystem.contentsystem.items; import synergynetframework.appsystem.contentsystem.ContentSystem; import synergynetframework.appsystem.contentsystem.items.implementation.interfaces.IRoundWindowImplementation; /** * The Class RoundWindow. */ public class RoundWindow extends OrthoContainer implements IRoundWindowImplementation { /** The Constant serialVersionUID. */ private static final long serialVersionUID = 1632594088675731017L; /** The radius. */ private int radius = 30; /** * Instantiates a new round window. * * @param contentSystem * the content system * @param name * the name */ public RoundWindow(ContentSystem contentSystem, String name) { super(contentSystem, name); } /* * (non-Javadoc) * @see * synergynetframework.appsystem.contentsystem.items.implementation.interfaces * .IRoundWindowImplementation#getBackgroundFrame() */ public RoundFrame getBackgroundFrame() { return ((IRoundWindowImplementation) this.contentItemImplementation) .getBackgroundFrame(); } /** * Gets the radius. * * @return the radius */ public int getRadius() { return radius; } /* * (non-Javadoc) * @see synergynetframework.appsystem.contentsystem.items.OrthoContentItem# * makeFlickable(float) */ @Override public void makeFlickable(float deceleration) { super.makeFlickable(deceleration); this.getBackgroundFrame().makeFlickable(deceleration); } /* * (non-Javadoc) * @see * synergynetframework.appsystem.contentsystem.items.implementation.interfaces * .IRoundWindowImplementation#setRadius(int) */ public void setRadius(int radius) { this.radius = radius; ((IRoundWindowImplementation) this.contentItemImplementation) .setRadius(radius); } }
[ "james.andrew.mcnaughton@gmail.com" ]
james.andrew.mcnaughton@gmail.com
9bbb024d1c0b9c305e7f3901ede566cb08cc810a
22cd38be8bf986427361079a2f995f7f0c1edeab
/src/main/java/core/erp/fam/web/FAMF0010Controller.java
3947a2fe404e0d02f5387d5498b27bda7f73117f
[]
no_license
shaorin62/MIS
97f51df344ab303c85acb2e7f90bb69944f85e0f
a188b02a73f668948246c133cd202fe091aa29c7
refs/heads/master
2021-04-05T23:46:52.422434
2018-03-09T06:41:04
2018-03-09T06:41:04
124,497,033
0
0
null
null
null
null
UTF-8
Java
false
false
2,346
java
/** * core.erp.fam.web.FAMF0010Controller.java - <Created by Code Template generator> */ package core.erp.fam.web; import java.util.Map; import javax.annotation.Resource; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; import core.erp.fam.service.FAMF0010Service; import core.ifw.cmm.request.CoreRequest; import core.ifw.cmm.result.CoreResultData; /** * <pre> * FAMF0010Controller - 합계잔액시산표 조회 프로그램 컨트롤러 클래스 * </pre> * * @author 양현덕 * @since 2016.07.14 * @version 1.0 * * <pre> * == Modification Information == * Date Modifier Comment * ==================================================== * 2016.07.14 양현덕 Initial Created. * ==================================================== * </pre> * * Copyright INBUS.(C) All right reserved. */ @Controller public class FAMF0010Controller { /** * Logger init. */ private static final Logger logger = LoggerFactory.getLogger(FAMF0010Controller.class); /** * 합계잔액시산표 조회 메뉴 서비스 클래스 */ @Resource(name="FAMF0010Service") private FAMF0010Service service; /** * 합계잔액시산표 목록을 조회한다. * @param param - 조회할 정보가 담긴 Map 객체 * @return "/FAMF0010/SEARCH00" * @exception Exception - 조회시 발생한 예외 */ @RequestMapping(value = "/core/erp/fam/FAMF0010_SEARCH00.do") @SuppressWarnings("rawtypes") public ModelAndView processSEARCH00(CoreRequest coreRequest, ModelMap model) throws Exception { ModelAndView mav = new ModelAndView("coreReturnView"); CoreResultData coreResultData = new CoreResultData(coreRequest.getCALL_TYPE()); try { Map searchVo = coreRequest.getMapVariableList(); logger.info("searchVo : " + searchVo.toString()); coreResultData.setReturnDataMap((Map<String, Object>) service.processSEARCH00(searchVo)); coreResultData.setResultMessageSuccessSelect(); } catch(Exception e) { logger.error("processSEARCH00 : " + e.getMessage()); coreResultData.setResultMessageFailSave(e); } mav.addObject("FORM_DATA", coreResultData); return mav; } }
[ "imosh@nate.com" ]
imosh@nate.com
0bf6798d3e87c3447b53548d7414bcc8a9d12e1d
b01332bd1b0eac2adb901ce121b0ba481e82a126
/beike/ops-order/src/main/java/com/meitianhui/order/dao/OrderTradeLogDao.java
70a2c57851656c8916f5cef195c54b76390c1f95
[]
no_license
xlh198593/resin
5783690411bd23723c27f942b9ebaa6b992c4c3b
9632d32feaeeac3792118269552d3ff5ba976b39
refs/heads/master
2022-12-21T00:17:43.048802
2019-07-17T02:13:54
2019-07-17T02:13:54
81,401,320
0
2
null
2022-12-16T05:02:24
2017-02-09T02:49:12
Java
UTF-8
Java
false
false
1,123
java
package com.meitianhui.order.dao; import java.util.Map; import com.meitianhui.order.entity.BeikeMallOrderTardeLog; import com.meitianhui.order.entity.BeikeStreetOrderTardeLog; import com.meitianhui.order.entity.HongBaoOrderTardeLog; public interface OrderTradeLogDao { /** * 插入贝壳商城订单日志 */ Integer insertBeikeMallOrderTradeLog(BeikeMallOrderTardeLog orderTardeLog) throws Exception; /** * 插入贝壳街市订单日志 */ Integer insertBeikeStreetOrderTardeLog(BeikeStreetOrderTardeLog orderTardeLog) throws Exception; /** * 插入红包兑订单日志 */ Integer insertHongBaoOrderTardeLog(HongBaoOrderTardeLog orderTardeLog) throws Exception; /** * 修改贝壳商城订单交易日志状态 */ Integer beikeMallOrderTradeLogUpdate(Map<String, Object> paramsMap) throws Exception; /** * 修改贝壳兑订单交易日志状态 */ Integer hongBaoOrderTradeLogUpdate(Map<String, Object> paramsMap) throws Exception; /** * 修改贝壳街市订单交易日志状态 */ Integer beikeStreetOrderTradeLogUpdate(Map<String, Object> paramsMap) throws Exception; }
[ "longjiangxia@la-inc.cn" ]
longjiangxia@la-inc.cn
c6597c66f713604ed60803facc4f50b1d50a648e
cfd7fa4cc57a4b2d7f9c3bb91ea9d7117f1e60ec
/OA/src/main/java/jpa/repository/RentUnitRepository.java
05347d91be05d6ec23492a94c96ca6a966263f77
[]
no_license
fcfc20050545/OOExapmle
055082e3b2b59b52477d051ffefb700dadf58675
4f0f982e5193189cb0821d212eaad816972bf149
refs/heads/master
2020-11-24T22:11:52.021353
2019-12-02T02:11:38
2019-12-02T02:11:38
228,360,550
1
0
null
2019-12-16T10:23:45
2019-12-16T10:23:45
null
UTF-8
Java
false
false
299
java
package jpa.repository; import jpa.domain.RentUnit; import jpa.domain.RentUnitContractItem; import org.springframework.data.jpa.repository.JpaRepository; /** * Created on 2018/2/5. * * @author zlf * @since 1.0 */ public interface RentUnitRepository extends JpaRepository<RentUnit, Long> { }
[ "xiongchengwei@yofish.com" ]
xiongchengwei@yofish.com
56ac2aeb09745a1ddae16cce2fbcbbaafdf6d55b
9549b6ca938e060bc5eac393fb406655384a932e
/TongRen/src/com/tr/ui/organization/create_clientele/FindProjectAdapter.java
57aa3327f1510a3eb773fe4e5a41a163c1ebb220
[]
no_license
JTAndroid/JTAndroid
1d66a35c73b786e94a6d57c1d5b8dede111c6e3f
de125ab12e9e979511933234cf4edb22106cda50
refs/heads/master
2021-01-10T16:27:26.388155
2016-03-31T03:44:16
2016-03-31T03:44:16
52,493,595
1
3
null
null
null
null
UTF-8
Java
false
false
3,665
java
package com.tr.ui.organization.create_clientele; import java.util.List; import android.content.Context; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.TextView; import com.tr.R; import com.tr.model.demand.Metadata; import com.tr.ui.demand.FindProjectActivity; /** * @ClassName: FindProjectAdapter.java * @author zcs * @Date 2015年3月29日 上午11:21:41 * @Description: TODO(用一句话描述该文件做什么) */ public class FindProjectAdapter extends BaseAdapter { private FindProjectActivity.TypeItem typeItem; private int selectItem = 0; private Context cxt; List<Metadata> list; public FindProjectAdapter(FindProjectActivity.TypeItem typeItem, List<Metadata> list,Context cxt) { this.typeItem = typeItem; this.list = list; this.cxt = cxt; } @Override public int getCount() { return list == null || list.size() == 0 ? 0 : list.size(); } /** * 选中时的item */ public void setSelectItem(int itenIndex) { selectItem = itenIndex; notifyDataSetChanged(); } @Override public Object getItem(int position) { return null; } @Override public long getItemId(int position) { return 0; } @Override public View getView(int position, View convertView, ViewGroup parent) { ViewHoulder vh; if (convertView == null) { convertView = View.inflate(cxt, R.layout.demand_find_project_item_area, null); vh = new ViewHoulder(); vh.division_line = convertView.findViewById(R.id.divisionLine); vh.tv_content = (TextView) convertView.findViewById(R.id.tv_content); convertView.setTag(vh); } vh = (ViewHoulder) convertView.getTag(); //TextView tv_content = vh.get(convertView, R.id.tv_content); vh.tv_content.setText(list.get(position).name); vh.tv_content.setTag(list.get(position)); switch (typeItem) { case item1: vh.division_line.setVisibility(View.VISIBLE); if (selectItem == position) { convertView.setBackgroundResource(R.color.find_project_view_bg); vh.division_line .setBackgroundResource(R.color.find_project_txt_orange); } else { convertView .setBackgroundResource(R.color.find_project_white_bg); vh.division_line.setBackgroundResource(R.color.find_project_bg); } break; case item2: vh.division_line.setVisibility(View.VISIBLE); if (selectItem == position) {// 如果选中提当前 convertView .setBackgroundResource(R.color.find_project_white_bg); vh.division_line .setBackgroundResource(R.color.find_project_txt_orange); vh.tv_content.setTextColor(cxt.getResources() .getColor(R.color.find_project_txt_orange)); } else { vh.tv_content.setTextColor(cxt.getResources() .getColor(R.color.find_project_txt_black)); vh.division_line.setBackgroundResource(R.color.find_project_bg); convertView.setBackgroundResource(R.color.find_project_view_bg); } break; case item3: vh.division_line.setVisibility(View.VISIBLE); convertView.setBackgroundResource(R.color.find_project_white_bg); if (selectItem == position) { vh.tv_content.setTextColor(cxt.getResources() .getColor(R.color.find_project_txt_orange)); vh.division_line .setBackgroundResource(R.color.find_project_txt_orange); } else { vh.tv_content.setTextColor(cxt.getResources() .getColor(R.color.find_project_txt_black)); vh.division_line .setBackgroundResource(R.color.find_project_txt); } /* * else{ inflate.setBackgroundResource(R.color.merchant_details_bg); * } */ break; } return convertView; } class ViewHoulder { View division_line; TextView tv_content; } }
[ "chang@example.com" ]
chang@example.com
54589adb0afffbff1ddf8381c4c7c4500d62628f
3b91ed788572b6d5ac4db1bee814a74560603578
/com/tencent/mm/plugin/fav/b/a/a.java
67ca8e5504ba5b13f0788298e9becea5c113a8f6
[]
no_license
linsir6/WeChat_java
a1deee3035b555fb35a423f367eb5e3e58a17cb0
32e52b88c012051100315af6751111bfb6697a29
refs/heads/master
2020-05-31T05:40:17.161282
2018-08-28T02:07:02
2018-08-28T02:07:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,710
java
package com.tencent.mm.plugin.fav.b.a; import com.tencent.mm.plugin.fts.a.d; import com.tencent.mm.sdk.platformtools.bi; import com.tencent.mm.sdk.platformtools.x; import com.tencent.wcdb.database.SQLiteException; import com.tencent.wcdb.database.SQLiteStatement; public final class a extends com.tencent.mm.plugin.fts.a.a { private SQLiteStatement iXn; protected final void BR() { if (BS()) { this.jpT.t(-106, 4); } this.iXn = this.jpT.compileStatement(String.format("INSERT INTO %s (docid, type, subtype, entity_id, aux_index, timestamp, fav_type) VALUES (last_insert_rowid(), ?, ?, ?, ?, ?, ?);", new Object[]{aPU()})); } protected final boolean BS() { return !cE(-106, 4); } protected final String getTableName() { return "Favorite"; } public final String getName() { return "FTS5FavoriteStorage"; } public final int getType() { return 256; } public final int getPriority() { return 256; } protected final String aLZ() { return String.format("CREATE TABLE IF NOT EXISTS %s (docid INTEGER PRIMARY KEY, type INT, subtype INT DEFAULT 0, entity_id INTEGER, aux_index TEXT, timestamp INTEGER, status INT DEFAULT 0, fav_type INT DEFAULT 0);", new Object[]{aPU()}); } public final void a(int i, long j, String str, long j2, String str2, int i2) { String Cu = d.Cu(str2); if (!bi.oW(Cu)) { boolean inTransaction = this.jpT.inTransaction(); if (!inTransaction) { this.jpT.beginTransaction(); } try { this.jpU.bindString(1, Cu); this.jpU.execute(); this.iXn.bindLong(1, 196608); this.iXn.bindLong(2, (long) i); this.iXn.bindLong(3, j); this.iXn.bindString(4, str); this.iXn.bindLong(5, j2); this.iXn.bindLong(6, (long) i2); this.iXn.execute(); if (!inTransaction) { this.jpT.commit(); } } catch (SQLiteException e) { x.e("MicroMsg.FTS.FTS5FavoriteStorage", String.format("Failed inserting index: 0x%x, %d, %d, %s, %d", new Object[]{Integer.valueOf(196608), Integer.valueOf(i), Long.valueOf(j), str, Long.valueOf(j2)})); String simpleQueryForString = this.jqb.simpleQueryForString(); if (simpleQueryForString != null && simpleQueryForString.length() > 0) { x.e("MicroMsg.FTS.FTS5FavoriteStorage", ">> " + simpleQueryForString); } throw e; } } } }
[ "707194831@qq.com" ]
707194831@qq.com
5e29daccfb5c9e500c1897e28e772a34e429a712
a0728a167e1cb883255a34e055cac4ac60309f20
/docu/hana_AtoJ/workspace_hanabio/hana_groupware/src/com/hanaph/gw/pe/member/service/MemberServiceImpl.java
721756c87f20731561584b472ee6c917b6943c76
[]
no_license
jingug1004/pythonBasic
3d3c6c091830215c8be49cc6280b7467fd19dc76
554e3d1a9880b4f74872145dc4adaf0b099b0845
refs/heads/master
2023-03-06T06:24:05.671015
2022-03-09T08:16:58
2022-03-09T08:16:58
179,009,504
0
0
null
2023-03-03T13:09:01
2019-04-02T06:02:44
Java
UTF-8
Java
false
false
1,593
java
/** * Hana Project * Copyright 2014 iRush Co., * */ package com.hanaph.gw.pe.member.service; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.hanaph.gw.pe.member.dao.MemberDAO; import com.hanaph.gw.pe.member.vo.MemberVO; /** * <pre> * Class Name : MemberServiceImpl.java * 설명 : 회원정보 Service 구현한 class * * Modification Information * 수정일 수정자 수정 내용 * ------------ -------------- -------------------------------- * 2014. 10. 16. CHOIILJI * </pre> * * @version : * @author : CHOIILJI(choiilji@irush.co.kr) * @since : 2014. 10. 16. */ @Service(value="memberService") public class MemberServiceImpl implements MemberService { @Autowired private MemberDAO memberDao; /* (non-Javadoc) * @see com.hanaph.gw.myPage.service.MemberService#getMemberList(java.util.Map) */ @Override public List<MemberVO> getMemberList(Map<String, String> paramMap) { return memberDao.getMemberList(paramMap); } /* * (non-Javadoc) * @see com.hanaph.gw.member.service.MemberService#getMemberDetail(java.util.Map) */ @Override public MemberVO getMemberDetail(Map<String, String> paramMap) { return memberDao.getMemberDetail(paramMap); } /* * (non-Javadoc) * @see com.hanaph.gw.member.service.MemberService#getMemberPhoto(java.util.Map) */ @Override public MemberVO getMemberPhoto(Map<String, String> paramMap) { return memberDao.getMemberPhoto(paramMap); } }
[ "jingug1004@gmail.com" ]
jingug1004@gmail.com
4ceef70f975130ee479c76835a1fc085eea01f92
4572bcab49eec6a44dfe97cfceb6c96232093fa2
/j360-trace-core/src/main/java/me/j360/trace/core/internal/Node.java
3b6727c9327b22b974cc56e20378834fb49b9ef5
[]
no_license
hhhcommon/j360-trace
24d014e81f06c34e2a7f322407d22ab3031c18ce
b2378a39af13edbfea3e13fe2b67413decb36379
refs/heads/master
2020-03-30T00:41:51.681189
2017-04-27T10:17:06
2017-04-27T10:17:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,442
java
/** * Copyright 2015-2016 The OpenZipkin 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 me.j360.trace.core.internal; import me.j360.trace.core.Span; import java.util.*; /** * Convenience type representing a tree. This is here because multiple facets in zipkin require * traversing the trace tree. For example, looking at network boundaries to correct clock skew, or * counting requests imply visiting the tree. * * @param <V> the node's value. Ex a full span or a tuple like {@code (serviceName, isLocal)} */ public final class Node<V> { /** Set via {@link #addChild(Node)} */ private Node<V> parent; /** mutable as some transformations, such as clock skew, adjust this. */ private V value; /** mutable to avoid allocating lists for childless nodes */ private List<Node<V>> children = Collections.emptyList(); /** Returns the parent, or null if root */ @Nullable public Node<V> parent() { return parent; } public V value() { return value; } public Node<V> value(V newValue) { this.value = newValue; return this; } public Node<V> addChild(Node<V> child) { child.parent = this; if (children.equals(Collections.emptyList())) children = new LinkedList<Node<V>>(); children.add(child); return this; } /** Returns the children of this node. */ public Collection<Node<V>> children() { return children; } /** Traverses the tree, breadth-first. */ public Iterator<Node<V>> traverse() { return new BreadthFirstIterator<V>(this); } static final class BreadthFirstIterator<V> implements Iterator<Node<V>> { private final Queue<Node<V>> queue = new ArrayDeque<Node<V>>(); BreadthFirstIterator(Node<V> root) { queue.add(root); } @Override public boolean hasNext() { return !queue.isEmpty(); } @Override public Node<V> next() { Node<V> result = queue.remove(); queue.addAll(result.children); return result; } @Override public void remove() { throw new UnsupportedOperationException("remove"); } } /** * @param trace spans that belong to the same {@link Span#traceId trace}, in any order. */ static Node<Span> constructTree(List<Span> trace) { TreeBuilder<Span> treeBuilder = new TreeBuilder<Span>(); for (Span s : trace) { treeBuilder.addNode(s.parentId, s.id, s); } return treeBuilder.build(); } /** * Some operations do not require the entire span object. This creates a tree given (parent id, * id) pairs. * * @param <V> same type as {@link Node#value} */ public static final class TreeBuilder<V> { Node<V> rootNode = null; // Nodes representing the trace tree Map<Long, Node<V>> idToNode = new LinkedHashMap<Long, Node<V>>(); // Collect the parent-child relationships between all spans. Map<Long, Long> idToParent = new LinkedHashMap<Long, Long>(idToNode.size()); public void addNode(Long parentId, long id, @Nullable V value) { Node<V> node = new Node<V>().value(value); if (parentId == null) { // special-case root rootNode = node; } else { idToNode.put(id, node); idToParent.put(id, parentId); } } /** Builds a tree from calls to {@link #addNode}, or returns an empty tree. */ public Node<V> build() { // Materialize the tree using parent - child relationships for (Map.Entry<Long, Long> entry : idToParent.entrySet()) { Node<V> node = idToNode.get(entry.getKey()); Node<V> parent = idToNode.get(entry.getValue()); if (parent == null && rootNode == null) { // handle headless trace rootNode = node; } else if (parent == null) { // attribute missing parents to root rootNode.addChild(node); } else { parent.addChild(node); } } return rootNode != null ? rootNode : new Node<V>(); } } }
[ "xumin_wlt@163.com" ]
xumin_wlt@163.com
fe21f7d95ed82c561d298ed8e512911ddf0ffed4
640bedd453d226723ea1ae2bf6192e97dbe19c22
/boogieamp_tests/src/boogieamp_tests/TestParseSmack.java
f695cfee5835ec02cd7b8d491cc06f687a18e497
[]
no_license
chubbymaggie/boogieamp
202a498b681ee714b669c40efcad5f38a5be45c1
6d102a5b3d2c5be4644db1322ffc91c3c22b2b83
refs/heads/master
2021-01-15T23:51:17.659899
2015-10-01T20:21:14
2015-10-01T20:21:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,156
java
/** * */ package boogieamp_tests; import java.io.File; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedList; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import typechecker.TypeChecker; import boogie.ProgramFactory; import boogie.controlflow.BasicBlock; import boogie.controlflow.CfgProcedure; import boogie.controlflow.CfgVariable; import boogie.controlflow.DefaultControlFlowFactory; import boogie.controlflow.expression.CfgExpression; import boogie.controlflow.expression.CfgIdentifierExpression; import boogie.controlflow.statement.CfgAssertStatement; import boogie.controlflow.statement.CfgAssumeStatement; import boogie.controlflow.statement.CfgCallStatement; import boogie.controlflow.statement.CfgHavocStatement; import boogie.controlflow.statement.CfgStatement; /** * @author schaef * */ @RunWith(Parameterized.class) public class TestParseSmack { @Parameterized.Parameters (name = "{index}: parse({1})") public static Collection<Object[]> data() { LinkedList<Object[]> filenames = new LinkedList<Object[]>(); String dirname = System.getProperty("user.dir")+"/regression/smack"; File dir = new File(dirname); File[] directoryListing = dir.listFiles(); if (directoryListing != null) { for (File child : directoryListing) { if (child.getName().endsWith(".bpl")) { filenames.add(new Object[] {child.getAbsolutePath(), child.getName()}); } else { //Ignore } } } else { // Handle the case where dir is not really a directory. // Checking dir.isDirectory() above would not be sufficient // to avoid race conditions with another process that deletes // directories. } return filenames; } private String input; private String shortname; public TestParseSmack(String input, String shortname) { this.input = input; this.shortname = shortname; } @Test public void test() { ProgramFactory pf = null; System.out.println("TEST: "+this.shortname); try { pf = new ProgramFactory(this.input); } catch (Exception e) { e.printStackTrace(); org.junit.Assert.assertTrue("Parse error: " + e.toString(), false); return; } TypeChecker tc = new TypeChecker(pf.getASTRoot(), false); try { DefaultControlFlowFactory cff = new DefaultControlFlowFactory(pf.getASTRoot(), tc); for (CfgProcedure p : cff.getProcedureCFGs()) { unwindCalls(p); } } catch (Exception e) { e.printStackTrace(); org.junit.Assert.assertTrue(false); } org.junit.Assert.assertTrue(!tc.hasTypeError()); } /** * helper method to test the substitute procedures * @param p */ private void unwindCalls(CfgProcedure p) { BasicBlock root = p.getRootNode(); if (root==null) return; LinkedList<BasicBlock> todo = new LinkedList<BasicBlock>(); LinkedList<BasicBlock> done = new LinkedList<BasicBlock>(); todo.add(root); while (!todo.isEmpty()) { BasicBlock current = todo.pop(); done.add(current); /* * For each BasicBlock, iterate over the statements. If a statement * is a call, collect all variables in the modifies clause and in * the LHS of the call statement and replace the call by a Havoc for * all these variables. */ LinkedList<CfgStatement> statements = current.getStatements(); //shallow copy for iteration ... needed because we're modifying "statements" LinkedList<CfgStatement> iterlist = new LinkedList<CfgStatement>(statements); for (CfgStatement stmt : iterlist) { if (stmt instanceof CfgCallStatement) { CfgCallStatement call = (CfgCallStatement)stmt; int offset = 0; LinkedList<CfgStatement> callcontract = new LinkedList<CfgStatement>(); //insert the assert statements that are enforced by the "requires" clauses //of the callee. HashMap<CfgVariable, CfgExpression> substitutes = new HashMap<CfgVariable, CfgExpression>(); for (int j=offset; j<call.getCallee().getInParams().length; j++) { substitutes.put(call.getCallee().getInParams()[j], call.getArguments()[j]); } for (CfgExpression xp : call.getCallee().getRequires()) { callcontract.add(new CfgAssertStatement(call.getLocation(), xp.substitute(substitutes))); } //create the havoc statement for the modifies clause. HashSet<CfgVariable> modifies = new HashSet<CfgVariable>(); modifies.addAll(call.getCallee().getModifies()); for (CfgIdentifierExpression lhs : call.getLeftHandSide()) { modifies.add(lhs.getVariable()); } CfgHavocStatement havoc = new CfgHavocStatement( call.getLocation(), modifies.toArray(new CfgVariable[modifies.size()])); // Log.error(" call: "+ call.toString()); // Log.error(" becomes: "+ havoc.toString()); havoc.setReplacedStatement(call); callcontract.add(havoc); //insert the assume statements that are guaranteed by the "ensures" clauses //of the callee. substitutes = new HashMap<CfgVariable, CfgExpression>(); for (int j=offset; j<call.getCallee().getOutParams().length; j++) { substitutes.put(call.getCallee().getOutParams()[j], call.getLeftHandSide()[j]); } for (CfgExpression xp : call.getCallee().getEnsures()) { if (statements.indexOf(stmt)<statements.size()-1) { statements.add(new CfgAssumeStatement(call.getLocation(), xp.substitute(substitutes))); } else { callcontract.add(new CfgAssumeStatement(call.getLocation(), xp.substitute(substitutes))); } } //now merge callcontract back into statements at and replace the original call stmt. statements.addAll(statements.indexOf(stmt), callcontract); //and now remove the old call statement. statements.remove(stmt); } else { //TODO } } current.setStatements(statements); for (BasicBlock next : current.getSuccessors()) { if (!todo.contains(next) && !done.contains(next)) { todo.add(next); } } } } }
[ "martinschaef@gmail.com" ]
martinschaef@gmail.com
1eee80ad7dfac407ac70bb60d49f9178cb3b4a02
df7e555a682a03e57c3a6d2219798db760fbcc6a
/Tests/com/drew/metadata/AgeTest.java
22fcb7cbb86e3bae62c6f064690db9666574d24d
[ "Apache-2.0" ]
permissive
CodeAlligator/metadata-extractor
fbc1f173f4d8b7478fd609964c6dfb3a17e644c9
b85d3b83bd6e3d28b5c1ca07a71d34259f007e74
refs/heads/master
2021-01-18T17:52:25.900258
2015-10-28T19:54:33
2015-10-28T19:54:33
45,355,149
1
0
null
2015-11-01T19:55:49
2015-11-01T19:55:49
null
UTF-8
Java
false
false
2,272
java
/* * Copyright 2002-2015 Drew Noakes * * 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. * * More information about this project is available at: * * https://drewnoakes.com/code/exif/ * https://github.com/drewnoakes/metadata-extractor */ package com.drew.metadata; import org.junit.Test; import static org.junit.Assert.*; /** * @author Drew Noakes https://drewnoakes.com */ public class AgeTest { @Test public void testParse() { Age age = Age.fromPanasonicString("0031:07:15 00:00:00"); assertNotNull(age); assertEquals(31, age.getYears()); assertEquals(7, age.getMonths()); assertEquals(15, age.getDays()); assertEquals(0, age.getHours()); assertEquals(0, age.getMinutes()); assertEquals(0, age.getSeconds()); assertEquals("0031:07:15 00:00:00", age.toString()); assertEquals("31 years 7 months 15 days", age.toFriendlyString()); } @SuppressWarnings({ "ObjectEqualsNull", "EqualsBetweenInconvertibleTypes", "NullableProblems" }) @Test public void testEqualsAndHashCode() { Age age1 = new Age(10, 11, 12, 13, 14, 15); Age age2 = new Age(10, 11, 12, 13, 14, 15); Age age3 = new Age(0, 0, 0, 0, 0, 0); assertEquals(age1, age1); assertEquals(age1, age2); assertEquals(age2, age1); assertTrue(age1.equals(age1)); assertTrue(age1.equals(age2)); assertFalse(age1.equals(age3)); assertFalse(age1.equals(null)); assertFalse(age1.equals("Hello")); assertEquals(age1.hashCode(), age1.hashCode()); assertEquals(age1.hashCode(), age2.hashCode()); assertFalse(age1.hashCode() == age3.hashCode()); } }
[ "git@drewnoakes.com" ]
git@drewnoakes.com
41c1a880e25c430f9b6698e27e2b463ffbfff5a4
2a3f19a4a2b91d9d715378aadb0b1557997ffafe
/sources/com/google/android/gms/measurement/internal/zzf.java
add20ab9a43e13451f59ee990d6b79ffe5c8948f
[]
no_license
amelieko/McDonalds-java
ce5062f863f7f1cbe2677938a67db940c379d0a9
2fe00d672caaa7b97c4ff3acdb0e1678669b0300
refs/heads/master
2022-01-09T22:10:40.360630
2019-04-21T14:47:20
2019-04-21T14:47:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,823
java
package com.google.android.gms.measurement.internal; import android.os.Handler; import android.os.Looper; import com.google.android.gms.common.internal.zzaa; abstract class zzf { private static volatile Handler zzXx; private volatile long zzXy; private final zzx zzbbl; private boolean zzbcc = true; private final Runnable zzw = new C26731(); /* renamed from: com.google.android.gms.measurement.internal.zzf$1 */ class C26731 implements Runnable { C26731() { } public void run() { if (Looper.myLooper() == Looper.getMainLooper()) { zzf.this.zzbbl.zzFl().zzg(this); return; } boolean zzbW = zzf.this.zzbW(); zzf.this.zzXy = 0; if (zzbW && zzf.this.zzbcc) { zzf.this.run(); } } } zzf(zzx zzx) { zzaa.zzz(zzx); this.zzbbl = zzx; } private Handler getHandler() { if (zzXx != null) { return zzXx; } Handler handler; synchronized (zzf.class) { if (zzXx == null) { zzXx = new Handler(this.zzbbl.getContext().getMainLooper()); } handler = zzXx; } return handler; } public void cancel() { this.zzXy = 0; getHandler().removeCallbacks(this.zzw); } public abstract void run(); public boolean zzbW() { return this.zzXy != 0; } public void zzv(long j) { cancel(); if (j >= 0) { this.zzXy = this.zzbbl.zzlQ().currentTimeMillis(); if (!getHandler().postDelayed(this.zzw, j)) { this.zzbbl.zzFm().zzFE().zzj("Failed to schedule delayed post. time", Long.valueOf(j)); } } } }
[ "makfc1234@gmail.com" ]
makfc1234@gmail.com
82788cf61a3aae046cd535d2d1021393a1e8e3b3
ee1244b10de45679f053293e366f192af307be74
/sources/com/google/android/exoplayer2/extractor/GaplessInfoHolder.java
87e19e2d03758b58a126400012d98f3d3da83878
[]
no_license
scarletstuff/Turbogram
a086e50b3f4d7036526075199616682a0d7c9c45
21b8862573953add9260f1eb586f0985d2c71e8e
refs/heads/master
2021-09-23T14:34:23.323880
2018-09-24T17:48:43
2018-09-24T17:48:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,255
java
package com.google.android.exoplayer2.extractor; import com.google.android.exoplayer2.metadata.Metadata; import com.google.android.exoplayer2.metadata.Metadata.Entry; import com.google.android.exoplayer2.metadata.id3.CommentFrame; import com.google.android.exoplayer2.metadata.id3.Id3Decoder.FramePredicate; import com.google.android.exoplayer2.metadata.id3.InternalFrame; import java.util.regex.Matcher; import java.util.regex.Pattern; public final class GaplessInfoHolder { private static final Pattern GAPLESS_COMMENT_PATTERN = Pattern.compile("^ [0-9a-fA-F]{8} ([0-9a-fA-F]{8}) ([0-9a-fA-F]{8})"); private static final String GAPLESS_DESCRIPTION = "iTunSMPB"; private static final String GAPLESS_DOMAIN = "com.apple.iTunes"; public static final FramePredicate GAPLESS_INFO_ID3_FRAME_PREDICATE = new C02741(); public int encoderDelay = -1; public int encoderPadding = -1; /* renamed from: com.google.android.exoplayer2.extractor.GaplessInfoHolder$1 */ static class C02741 implements FramePredicate { C02741() { } public boolean evaluate(int majorVersion, int id0, int id1, int id2, int id3) { return id0 == 67 && id1 == 79 && id2 == 77 && (id3 == 77 || majorVersion == 2); } } public boolean setFromXingHeaderValue(int value) { int encoderDelay = value >> 12; int encoderPadding = value & 4095; if (encoderDelay <= 0 && encoderPadding <= 0) { return false; } this.encoderDelay = encoderDelay; this.encoderPadding = encoderPadding; return true; } public boolean setFromMetadata(Metadata metadata) { for (int i = 0; i < metadata.length(); i++) { Entry entry = metadata.get(i); if (entry instanceof CommentFrame) { CommentFrame commentFrame = (CommentFrame) entry; if (GAPLESS_DESCRIPTION.equals(commentFrame.description) && setFromComment(commentFrame.text)) { return true; } } else if (entry instanceof InternalFrame) { InternalFrame internalFrame = (InternalFrame) entry; if (GAPLESS_DOMAIN.equals(internalFrame.domain) && GAPLESS_DESCRIPTION.equals(internalFrame.description) && setFromComment(internalFrame.text)) { return true; } } else { continue; } } return false; } private boolean setFromComment(String data) { Matcher matcher = GAPLESS_COMMENT_PATTERN.matcher(data); if (matcher.find()) { try { int encoderDelay = Integer.parseInt(matcher.group(1), 16); int encoderPadding = Integer.parseInt(matcher.group(2), 16); if (encoderDelay > 0 || encoderPadding > 0) { this.encoderDelay = encoderDelay; this.encoderPadding = encoderPadding; return true; } } catch (NumberFormatException e) { } } return false; } public boolean hasGaplessInfo() { return (this.encoderDelay == -1 || this.encoderPadding == -1) ? false : true; } }
[ "root@linuxhub.it" ]
root@linuxhub.it
76ba8ad31f5f52fa3cb53e7a4da7ba5f3c97fc2e
90cf9a4c00d665588dd6a6b913f820f047644620
/openwire-core/src/main/java/io/openwire/codec/v9/JournalTransactionMarshaller.java
13578c31e00819ab60ed61f1b0de7f81e0b31207
[ "Apache-2.0" ]
permissive
PlumpMath/OpenWire
ec1381f7167fc0680125ad8c3fbc56ae1431a567
b46eacb71c140d3c118d9eee52b5d34f138fb59a
refs/heads/master
2021-01-19T23:13:03.036246
2014-09-10T18:30:14
2014-09-10T18:30:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,697
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.openwire.codec.v9; import io.openwire.codec.BaseDataStreamMarshaller; import io.openwire.codec.BooleanStream; import io.openwire.codec.OpenWireFormat; import io.openwire.commands.DataStructure; import io.openwire.commands.JournalTransaction; import io.openwire.commands.TransactionId; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; public class JournalTransactionMarshaller extends BaseDataStreamMarshaller { /** * Return the type of Data Structure we marshal * * @return short representation of the type data structure */ @Override public byte getDataStructureType() { return JournalTransaction.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ @Override public DataStructure createObject() { return new JournalTransaction(); } /** * Un-marshal an object instance from the data input stream * * @param o * the object to un-marshal * @param dataIn * the data input stream to build the object from * @throws IOException */ @Override public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); JournalTransaction info = (JournalTransaction) o; info.setTransactionId((TransactionId) tightUnmarsalNestedObject(wireFormat, dataIn, bs)); info.setType(dataIn.readByte()); info.setWasPrepared(bs.readBoolean()); } /** * Write the booleans that this object uses to a BooleanStream */ @Override public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { JournalTransaction info = (JournalTransaction) o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalNestedObject1(wireFormat, info.getTransactionId(), bs); bs.writeBoolean(info.getWasPrepared()); return rc + 1; } /** * Write a object instance to data output stream * * @param o * the instance to be marshaled * @param dataOut * the output stream * @throws IOException * thrown if an error occurs */ @Override public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); JournalTransaction info = (JournalTransaction) o; tightMarshalNestedObject2(wireFormat, info.getTransactionId(), dataOut, bs); dataOut.writeByte(info.getType()); bs.readBoolean(); } /** * Un-marshal an object instance from the data input stream * * @param o * the object to un-marshal * @param dataIn * the data input stream to build the object from * @throws IOException */ @Override public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); JournalTransaction info = (JournalTransaction) o; info.setTransactionId((TransactionId) looseUnmarsalNestedObject(wireFormat, dataIn)); info.setType(dataIn.readByte()); info.setWasPrepared(dataIn.readBoolean()); } /** * Write the booleans that this object uses to a BooleanStream */ @Override public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { JournalTransaction info = (JournalTransaction) o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalNestedObject(wireFormat, info.getTransactionId(), dataOut); dataOut.writeByte(info.getType()); dataOut.writeBoolean(info.getWasPrepared()); } }
[ "tabish121@gmail.com" ]
tabish121@gmail.com
2dd0497f1a0c3e5bc3e09343673f6776a461dbff
0175a417f4b12b80cc79edbcd5b7a83621ee97e5
/flexodesktop/modules/flexoworkfloweditor/src/main/java/org/openflexo/wkf/swleditor/gr/PortGR.java
e52d46d6f7de1433e7af9cfa130defe0858de63d
[]
no_license
agilebirds/openflexo
c1ea42996887a4a171e81ddbd55c7c1e857cbad0
0250fc1061e7ae86c9d51a6f385878df915db20b
refs/heads/master
2022-08-06T05:42:04.617144
2013-05-24T13:15:58
2013-05-24T13:15:58
2,372,131
11
6
null
2022-07-06T19:59:55
2011-09-12T15:44:45
Java
UTF-8
Java
false
false
3,743
java
/* * (c) Copyright 2010-2011 AgileBirds * * This file is part of OpenFlexo. * * OpenFlexo 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. * * OpenFlexo 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 OpenFlexo. If not, see <http://www.gnu.org/licenses/>. * */ package org.openflexo.wkf.swleditor.gr; import java.awt.Color; import org.openflexo.fge.geom.area.FGEArea; import org.openflexo.fge.graphics.BackgroundStyle; import org.openflexo.fge.graphics.ForegroundStyle; import org.openflexo.fge.graphics.TextStyle; import org.openflexo.fge.shapes.Shape.ShapeType; import org.openflexo.foundation.wkf.ws.FlexoPort; import org.openflexo.icon.WKFIconLibrary; import org.openflexo.wkf.WKFPreferences; import org.openflexo.wkf.swleditor.SwimmingLaneRepresentation; public class PortGR extends AbstractNodeGR<FlexoPort> { private final BackgroundStyle.BackgroundImage background; private FGEArea locationConstrainedArea; public PortGR(FlexoPort port, SwimmingLaneRepresentation aDrawing) { super(port, ShapeType.SQUARE, aDrawing); setWidth(30); setHeight(30); setLayer(EMBEDDED_ACTIVITY_LAYER); // setText(getPort().getName()); // setAbsoluteTextX(getPort().getNodeLabelPosX()); // setAbsoluteTextY(getPort().getNodeLabelPosY()); setIsFloatingLabel(true); background = BackgroundStyle.makeImageBackground(WKFIconLibrary.getImageIconForFlexoPort(getPort())); // System.out.println("width="+getPort().getImageIcon().getIconWidth()+" height="+getPort().getImageIcon().getIconHeight()); background.setScaleX(1); background.setScaleY(1); background.setDeltaX(0); background.setDeltaY(0); setForeground(ForegroundStyle.makeNone()); setBackground(background); setLocationConstraints(LocationConstraints.AREA_CONSTRAINED); // TODO handle layer !!! // if (operatorNode.getParentPetriGraph()) setDimensionConstraints(DimensionConstraints.UNRESIZABLE); updatePropertiesFromWKFPreferences(); } int getTopBorder() { return REQUIRED_SPACE_ON_TOP_FOR_CLOSING_BOX; } int getBottomBorder() { return REQUIRED_SPACE_ON_BOTTOM; } int getLeftBorder() { return REQUIRED_SPACE_ON_LEFT; } int getRightBorder() { return REQUIRED_SPACE_ON_RIGHT; } @Override public void updatePropertiesFromWKFPreferences() { super.updatePropertiesFromWKFPreferences(); setBorder(new ShapeBorder(getTopBorder(), getBottomBorder(), getLeftBorder(), getRightBorder())); setTextStyle(TextStyle.makeTextStyle(Color.BLACK, getWorkflow() != null ? getWorkflow().getActivityFont(WKFPreferences.getActivityNodeFont()).getFont() : WKFPreferences .getActivityNodeFont().getFont())); getShadowStyle().setShadowDepth(1); getShadowStyle().setShadowBlur(3); } public FlexoPort getPort() { return getDrawable(); } /** * Overriden to implement defaut automatic layout */ @Override public double getDefaultX() { return getPort().getIndex() * 80 + 20; } /** * Overriden to implement defaut automatic layout */ @Override public double getDefaultY() { return 20; } /** * Overriden to implement defaut automatic layout */ @Override public double getDefaultLabelX() { return 25; } /** * Overriden to implement defaut automatic layout */ @Override public double getDefaultLabelY() { return 0; } }
[ "guillaume.polet@gmail.com" ]
guillaume.polet@gmail.com
d45a524ee24c197ba4201a51b781eaa0274765bb
fba8af31d5d36d8a6cf0c341faed98b6cd5ec0cb
/src/main/java/com/alipay/api/domain/EbppBillKey.java
44baa7a3eea39e9f777053f8b6f45eaac3ac990e
[ "Apache-2.0" ]
permissive
planesweep/alipay-sdk-java-all
b60ea1437e3377582bd08c61f942018891ce7762
637edbcc5ed137c2b55064521f24b675c3080e37
refs/heads/master
2020-12-12T09:23:19.133661
2020-01-09T11:04:31
2020-01-09T11:04:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,578
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 账单业务户号 * * @author auto create * @since 1.0, 2017-08-21 17:20:20 */ public class EbppBillKey extends AlipayObject { private static final long serialVersionUID = 3614444774812565628L; /** * 户号 */ @ApiField("bill_key") private String billKey; /** * 业务类型缩写: JF-缴费 */ @ApiField("biz_type") private String bizType; /** * 出账机构缩写 */ @ApiField("charge_inst") private String chargeInst; /** * 脱敏的户主姓名 */ @ApiField("owner_name") private String ownerName; /** * 子业务类型英文名称: ELECTRIC-电力 GAS-燃气 WATER-水 */ @ApiField("sub_biz_type") private String subBizType; public String getBillKey() { return this.billKey; } public void setBillKey(String billKey) { this.billKey = billKey; } public String getBizType() { return this.bizType; } public void setBizType(String bizType) { this.bizType = bizType; } public String getChargeInst() { return this.chargeInst; } public void setChargeInst(String chargeInst) { this.chargeInst = chargeInst; } public String getOwnerName() { return this.ownerName; } public void setOwnerName(String ownerName) { this.ownerName = ownerName; } public String getSubBizType() { return this.subBizType; } public void setSubBizType(String subBizType) { this.subBizType = subBizType; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
802809ae0e93c1b25d6976ecf76219d6a5c02ba5
c0fa6552970c01e31b0e9836e68d415940527945
/005-start-restfull-json/src/test/java/com/zyf/springboot/controller/sys/UserControllerTest.java
3f3cec6107e9f6381cc833b19fa0fc6cbc7920b0
[]
no_license
zengyufei/springboot-zyf
275c7b9fd95674307dc7445b2fc4127ee2cb3b51
566326d6ae3bb5c6da11a82e69b4dabef4174495
refs/heads/master
2021-09-14T21:40:56.282893
2018-05-20T01:40:35
2018-05-20T01:40:35
125,204,364
0
0
null
null
null
null
UTF-8
Java
false
false
714
java
package com.zyf.springboot.controller.sys; import com.zyf.springboot.Demo5ApplicationTests; import org.junit.Test; public class UserControllerTest extends Demo5ApplicationTests { @Test public void get() { String result = testRestTemplate.getForObject(getHost() + "/user/get/1", String.class); System.out.println(result); } @Test public void list() { String result = testRestTemplate.getForObject(getHost() + "/user/list/admin", String.class); System.out.println(result); } @Test public void login() { String result = testRestTemplate.getForObject(getHost() + "/user/login?id=2", String.class); System.out.println(result); } }
[ "zengyufei@evergrande.com" ]
zengyufei@evergrande.com
e1039b06016183be9681204ec510e1a1fa21a3d3
5f5890eeedbdd4eba568fea18276aa695b9cc9b0
/so-common/src/main/java/so/a56140651/FinancialCalculator.java
6e11282d00d71a4a22c0c9c7ee247c1b039a8489
[]
no_license
marco-ruiz/stackoverflow-qa
15d0002db4ab76b6bbf0ddd6d86c89df4ca2c6d2
751afc6914060b279570c6a03a94dc33e8985cf7
refs/heads/master
2021-06-21T00:17:54.883259
2021-04-17T16:41:52
2021-04-17T16:41:52
208,671,695
2
2
null
null
null
null
UTF-8
Java
false
false
1,567
java
package so.a56140651; import java.util.Arrays; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.stream.Collectors; public class FinancialCalculator { static class MonthlyExpense { private String type; private double amount; public MonthlyExpense(String type, double amount) { this.type = type; this.amount = amount; } public String getType() { return type; } public double getAmount() { return amount; } public String toString() { return String.format("%s: %.2f", type, amount); } } private static List<MonthlyExpense> createMonthlyExpenses(List<MonthlyExpense> expenses) { Map<String, Double> sums = expenses.stream() .collect(Collectors.groupingBy( MonthlyExpense::getType, Collectors.summingDouble(MonthlyExpense::getAmount)) ); return sums.entrySet().stream() .map(entry -> new MonthlyExpense(entry.getKey(), entry.getValue())) // .map(entry -> createMonthlyExpense(entry.getKey(), entry.getValue())) .sorted(Comparator.comparing(MonthlyExpense::getType)) .collect(Collectors.toList()); } public static void main(String[] args) { MonthlyExpense[] expenses = new MonthlyExpense[] { new MonthlyExpense("UTILITIES", 75), new MonthlyExpense("CREDIT", 1000), new MonthlyExpense("AUTO", 7500), new MonthlyExpense("UTILITIES", 50), new MonthlyExpense("CREDIT", 2000), new MonthlyExpense("UTILITIES", 150), new MonthlyExpense("CAR", 344) }; System.out.println(createMonthlyExpenses(Arrays.asList(expenses))); } }
[ "marco.a.ruiz@gmail.com" ]
marco.a.ruiz@gmail.com
0efe71a5d1db714ef928c81adfd5a60de8606dd2
c146d97cb7a839e7d115ab1e4905ab25b7bc4c29
/src/main/java/com/berzellius/integrations/elkarniz/businesslogic/processes/websiteevents/WebsiteEventsServiceImpl.java
da3ba405a50d22e9ecd2fc2960d7a4dec88f1341
[]
no_license
berzellius/com.berzellius.integration.elkarniz
f67b6b8c5be8d01235a8d2ee5c6372d1e2ccd969
5b9571028ee24ad321940de2c79b60838c530d74
refs/heads/master
2020-03-27T01:48:38.247369
2018-08-24T22:45:32
2018-08-24T22:45:32
145,744,337
0
0
null
null
null
null
UTF-8
Java
false
false
3,879
java
package com.berzellius.integrations.elkarniz.businesslogic.processes.websiteevents; import com.berzellius.integrations.basic.exception.APIAuthException; import com.berzellius.integrations.elkarniz.dmodel.LeadFromSite; import com.berzellius.integrations.elkarniz.dmodel.Site; import com.berzellius.integrations.elkarniz.dto.site.Lead; import com.berzellius.integrations.elkarniz.dto.site.LeadRequest; import com.berzellius.integrations.elkarniz.dto.site.Result; import com.berzellius.integrations.elkarniz.repository.LeadFromSiteRepository; import com.berzellius.integrations.elkarniz.repository.SiteRepository; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Service; import org.springframework.util.Assert; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.function.Consumer; @Service public class WebsiteEventsServiceImpl implements WebsiteEventsService { @Autowired private SiteRepository siteRepository; @Autowired private LeadFromSiteRepository leadFromSiteRepository; @Autowired private WebsiteEventsBusinessProcess websiteEventsBusinessProcess; private static final Logger log = LoggerFactory.getLogger(WebsiteEventsService.class); @Override public Result newLeadsFromWebsite(LeadRequest leadRequest) { Assert.notNull(leadRequest); Assert.notNull(leadRequest.getOrigin()); Assert.notNull(leadRequest.getPassword()); String url = leadRequest.getOrigin(); String password = leadRequest.getPassword(); List<Site> sites = siteRepository.findByUrlAndPassword(url, password); if(sites.size() == 0){ return new Result("error"); } Site site = sites.get(0); List<LeadFromSite> leadFromSiteList = new ArrayList<>(); for(Lead lead : leadRequest.getLeads()){ LeadFromSite leadFromSite = new LeadFromSite(); leadFromSite.setDtmCreate(new Date()); leadFromSite.setSite(site); leadFromSite.setLead(lead); leadFromSite.setState(LeadFromSite.State.NEW); leadFromSiteList.add(leadFromSite); } leadFromSiteRepository.save(leadFromSiteList); this.runProcessingNewLeadsFromSite(); return new Result("success"); } @Scheduled(fixedDelay = 60000) protected void runProcessingNewLeadsFromSite(){ leadFromSiteRepository.findByState(LeadFromSite.State.NEW).forEach( new Consumer<LeadFromSite>() { @Override public void accept(LeadFromSite leadFromSite) { try { websiteEventsBusinessProcess.processLeadFromSite(leadFromSite); } catch (APIAuthException e) { log.error( "Authentification error while processing LeadFromSite:" + leadFromSite.getLead().toString() + "/id=" + leadFromSite.getId() + " :: " + e.getMessage()); } catch (RuntimeException e) { log.error("Runtime Exception while processing LeadFromSite:" + leadFromSite.getLead().toString() + "id=" + leadFromSite.getId() + " :: " + e.getMessage()); } finally { LeadFromSite leadFromSite1 = leadFromSiteRepository.findOne(leadFromSite.getId()); leadFromSite1.setLastProcessed(new Date()); leadFromSiteRepository.save(leadFromSite1); } } } ); } }
[ "berzellius@gmail.com" ]
berzellius@gmail.com
e581276ef83705a416d3710b5978aae8d40d149a
a63ca52ff22ff2a4d44f62cf5dfc505593a6ab8c
/src/main/java/pattern/demo/factorymethod/product/ChicagoStyleCheesePizza.java
960f767297c389f95c735a112bcc81eb6b038a12
[]
no_license
EastmanJian/pattern_demo
5df40e5b512c96810b17424b22f5f4a365c29273
5c0cf94cd1ed1e50a8729136a474efe7977da831
refs/heads/master
2021-05-10T20:41:19.371671
2018-01-22T04:05:50
2018-01-22T04:05:50
118,203,537
0
0
null
null
null
null
UTF-8
Java
false
false
430
java
package pattern.demo.factorymethod.product; public class ChicagoStyleCheesePizza extends Pizza { public ChicagoStyleCheesePizza() { name = "Chicago Style Deep Dish Cheese Pizza"; dough = "Extra Thick Crust Dough"; sauce = "Plum Tomato Sauce"; toppings.add("Shredded Mozzarella Cheese"); } public void cut() { System.out.println("Cutting the pizza into square slices"); } }
[ "50935@qq.com" ]
50935@qq.com
fbdaff48fa60aac2b8d7725d56901b9b504bbacb
7f298c2bf9ff5a61eeb87e3929e072c9a04c8832
/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/UndertowSockJsIntegrationTests.java
fea8b63458df881a8ff074cecbc8eef8f405a361
[ "Apache-2.0" ]
permissive
stwen/my-spring5
1ca1e85786ba1b5fdb90a583444a9c030fe429dd
d44be68874b8152d32403fe87c39ae2a8bebac18
refs/heads/master
2023-02-17T19:51:32.686701
2021-01-15T05:39:14
2021-01-15T05:39:14
322,756,105
0
0
null
null
null
null
UTF-8
Java
false
false
2,020
java
/* * Copyright 2002-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.web.socket.sockjs.client; import java.io.IOException; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.socket.UndertowTestServer; import org.springframework.web.socket.WebSocketTestServer; import org.springframework.web.socket.client.standard.StandardWebSocketClient; import org.springframework.web.socket.server.RequestUpgradeStrategy; import org.springframework.web.socket.server.standard.UndertowRequestUpgradeStrategy; /** * @author Brian Clozel */ public class UndertowSockJsIntegrationTests extends AbstractSockJsIntegrationTests { @Override protected Class<?> upgradeStrategyConfigClass() { return UndertowTestConfig.class; } @Override protected WebSocketTestServer createWebSocketTestServer() { return new UndertowTestServer(); } @Override protected Transport createWebSocketTransport() { return new WebSocketTransport(new StandardWebSocketClient()); } @Override protected AbstractXhrTransport createXhrTransport() { try { return new UndertowXhrTransport(); } catch (IOException ex) { throw new IllegalStateException("Could not create UndertowXhrTransport"); } } @Configuration static class UndertowTestConfig { @Bean public RequestUpgradeStrategy upgradeStrategy() { return new UndertowRequestUpgradeStrategy(); } } }
[ "xianhao_gan@qq.com" ]
xianhao_gan@qq.com
2729d019dc897bf8b150ba4af5791013cf11adb4
233e63710e871ef841ff3bc44d3660a0c8f8564d
/trunk/commons/src/slf4j/filters/AutoGroupFilter.java
30b12d3b28e8e5b400f9f9a00137c38c6f6769c6
[]
no_license
Wankers/Project
733b6a4aa631a18d28a1b5ba914c02eb34a9f4f6
da6db42f127d5970522038971a8bebb76baa595d
refs/heads/master
2016-09-06T10:46:13.768097
2012-08-01T23:19:49
2012-08-01T23:19:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,584
java
/* * This file is part of Aion Extreme Emulator <aion-core.net>. * * Aion-Extreme Emulator is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Aion-Extreme Emulator is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Aion-Extreme Emulator. If not, see <http://www.gnu.org/licenses/>. */ package slf4j.filters; import ch.qos.logback.classic.spi.ILoggingEvent; import ch.qos.logback.core.filter.Filter; import ch.qos.logback.core.spi.FilterReply; /** * @author xTz * */ public class AutoGroupFilter extends Filter<ILoggingEvent> { /** * Decides what to do with logging event.<br> * This method accepts only log events that contain exceptions. * * @param loggingEvent * log event that is going to be filtred. * @return {@link org.apache.log4j.spi.Filter#ACCEPT} if admin command, {@link org.apache.log4j.spi.Filter#DENY} * otherwise */ @Override public FilterReply decide(ILoggingEvent loggingEvent) { Object message = loggingEvent.getMessage(); if (((String) message).startsWith("[AUTOGROUPSERVICE]")) { return FilterReply.ACCEPT; } return FilterReply.DENY; } }
[ "sylvanodu14gmail.com" ]
sylvanodu14gmail.com
5e84e2823f38d4ae04084b7a0e35cb760b9d7fd9
efa2ac92aea13b38272da7bce1309d9d4c40b476
/EmployeeTask1/Aliyew/src/Mobile.java
e530f9c965bc22ba30b22d30c2c27c033e92a936
[]
no_license
ChFaizan009/OOP-PROJECTS
95f69f61d890c7934327e760534833d3f7222034
43bea5b4737110c93118a3264790f7be1cb2d61b
refs/heads/master
2023-08-07T03:01:07.870487
2021-09-23T06:53:22
2021-09-23T06:53:22
294,663,010
0
0
null
null
null
null
UTF-8
Java
false
false
2,343
java
import java.util.Scanner; public abstract class Mobile { private String Mobile_Name; private String Mobile_RegNo; private String Mobile_Model; private String Mobile_Colour; private String Mobile_BatryCapacity; private String Mobile_Storage; public String getMobile_Name() { return Mobile_Name; } public void setMobile_Name(String mobile_Name) { Mobile_Name = mobile_Name; } public String getMobile_RegNo() { return Mobile_RegNo; } public void setMobile_RegNo(String mobile_RegNo) { Mobile_RegNo = mobile_RegNo; } public String getMobile_Model() { return Mobile_Model; } public void setMobile_Model(String mobile_Model) { Mobile_Model = mobile_Model; } public String getMobile_Colour() { return Mobile_Colour; } public void setMobile_Colour(String mobile_Colour) { Mobile_Colour = mobile_Colour; } public String getMobile_BatryCapacity() { return Mobile_BatryCapacity; } public void setMobile_BatryCapacity(String mobile_BatryCapacity) { Mobile_BatryCapacity = mobile_BatryCapacity; } public String getMobile_Storage() { return Mobile_Storage; } public void setMobile_Storage(String mobile_Storage) { Mobile_Storage = mobile_Storage; } public void disp() { System.out.println("<<<......This is Information about Mobile..............>>>>>>"); } public void display() { Scanner sc=new Scanner(System.in); System.out.println("Enter The Name of Mobile "); Mobile_Name=sc.nextLine(); System.out.println("Enter The Registration Number of Mobile "); Mobile_RegNo=sc.nextLine(); System.out.println("Enter The Model of Mobile "); Mobile_Model=sc.nextLine(); System.out.println("Enter The Colour of Mobile "); Mobile_Colour=sc.nextLine(); System.out.println("Enter The Batery Capcity of Mobile "); Mobile_BatryCapacity=sc.nextLine(); System.out.println("Enter The Storage of Mobile "); Mobile_Storage=sc.nextLine(); } public void Show() { System.out.println("The Name of Mobile is "+Mobile_Name); System.out.println("The Registration Number of Mobile is "+Mobile_RegNo); System.out.println("The Model of Mobile is "+Mobile_Model); System.out.println("The Colour of Mobile is "+Mobile_Colour); System.out.println("The Batery Capcity of Mobile is "+Mobile_BatryCapacity); System.out.println("The Storage of Mobile is "+Mobile_Storage); } }
[ "chfaizansadwal@gmail.com" ]
chfaizansadwal@gmail.com
0eea8538cf1b442be3ef48014ed5bcaaa560907e
e6a2708c4c6483f6d0b51518cfe25d927b815c9e
/app/src/main/java/com/android/mb/schedule/entitys/ReportAdminBean.java
e9d7197e7373949299cacbd66dc25cb93f21d65f
[]
no_license
cgy529387306/Schedule
cdeefacb88a499288ddfedf90710b9130e71266a
9b34e04c7b6faf8be5ad35b66dd567b5a0a3a936
refs/heads/master
2021-06-19T04:49:18.380852
2019-08-05T06:19:17
2019-08-05T06:19:17
145,403,976
0
1
null
null
null
null
UTF-8
Java
false
false
2,378
java
package com.android.mb.schedule.entitys; import java.io.Serializable; /** * Created by cgy on 18/11/19. */ public class ReportAdminBean implements Serializable{ /** * week_num : 45 * worker_num : 1559 * use_num : 4 * start_time_stamp : 1541347200 * end_time_stamp : 1541865600 * start_time : 2018-11-05 * end_time : 2018-11-11 * un_use_num : 1555 * use_pre : 25% * ring_ratio : 下降 */ private int week_num; private int worker_num; private int use_num; private long start_time_stamp; private long end_time_stamp; private String start_time; private String end_time; private int un_use_num; private String use_pre; private String ring_ratio; public int getWeek_num() { return week_num; } public void setWeek_num(int week_num) { this.week_num = week_num; } public int getWorker_num() { return worker_num; } public void setWorker_num(int worker_num) { this.worker_num = worker_num; } public int getUse_num() { return use_num; } public void setUse_num(int use_num) { this.use_num = use_num; } public long getStart_time_stamp() { return start_time_stamp; } public void setStart_time_stamp(long start_time_stamp) { this.start_time_stamp = start_time_stamp; } public long getEnd_time_stamp() { return end_time_stamp; } public void setEnd_time_stamp(long end_time_stamp) { this.end_time_stamp = end_time_stamp; } public String getStart_time() { return start_time; } public void setStart_time(String start_time) { this.start_time = start_time; } public String getEnd_time() { return end_time; } public void setEnd_time(String end_time) { this.end_time = end_time; } public int getUn_use_num() { return un_use_num; } public void setUn_use_num(int un_use_num) { this.un_use_num = un_use_num; } public String getUse_pre() { return use_pre; } public void setUse_pre(String use_pre) { this.use_pre = use_pre; } public String getRing_ratio() { return ring_ratio; } public void setRing_ratio(String ring_ratio) { this.ring_ratio = ring_ratio; } }
[ "529387306@qq.com" ]
529387306@qq.com
9a8609281099eb3f31764e9ecf6971fe286c1db1
98190bc4c561b1f610c4633be23020cfd3e13391
/src/test/java/mailer/EmailSenderTest.java
978029cdc3aea9cd7b9facef4d5f425fd48789e0
[ "Apache-2.0" ]
permissive
debmalya/emailer
0b36f771e3ea719436480c7d47dcc07a5b612e59
83f88ff4737a72abb821edba328df28c9c0e3a03
refs/heads/master
2020-03-27T13:09:37.655966
2018-08-29T23:43:12
2018-08-29T23:43:12
146,593,462
0
0
null
null
null
null
UTF-8
Java
false
false
349
java
package mailer; import org.junit.Assert; import org.junit.Test; public class EmailSenderTest { EmailSender emailSender; @Test public void testSendEmail() { emailSender = new EmailSender("Mailer.properties"); Assert.assertTrue(emailSender.sendEmail("<sender1>,<sender2>", "This is for testing email", "Test")); } }
[ "debmalya.jash@gmail.com" ]
debmalya.jash@gmail.com
548c2ee6d2829aee74be910415c469e43d07565d
13b18312663652c283ed4ef703215eb0c3312e4c
/com.eixox/src/main/java/com/eixox/data/entities/Persistent.java
254bda8503a1b2477938d1359f7a896abf5be55e
[ "MIT", "Apache-2.0" ]
permissive
B4AGroup/jetfuel-java
4b6ca021b047cfe7b50aff7188fb60c642b88f6b
2e3c7e7b553cae6df33c23b0422e697177bd35f2
refs/heads/master
2023-03-17T08:02:06.519953
2023-03-10T17:29:07
2023-03-10T17:29:07
217,397,408
0
0
Apache-2.0
2019-10-24T21:21:14
2019-10-24T21:21:13
null
UTF-8
Java
false
false
531
java
package com.eixox.data.entities; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import com.eixox.data.ColumnType; @Retention(RetentionPolicy.RUNTIME) @Target({ ElementType.FIELD, ElementType.TYPE }) public @interface Persistent { public String name() default ""; public ColumnType value() default ColumnType.REGULAR; public boolean readonly() default false; public boolean nullable() default false; ; }
[ "rodrigo.portela@gmail.com" ]
rodrigo.portela@gmail.com
4654b3aebca75b39552b8af22740a6997c703f4e
df72d2a31adf86da1e2355a5879a57b1e7d0f3d9
/Santiago/zulutrade/src/zulutrade/grafica/AnalisisG.java
4b3804f9d73d9b8176d522067a061f3d8939c602
[]
no_license
in-silico/in-silico
81c79a973f202a7cf604707ccc7c78804179634e
042a8bbcadfb70354506b2855e16a06f9e8831c3
refs/heads/master
2020-04-13T14:11:00.745975
2015-06-19T17:13:52
2015-06-19T17:13:52
37,735,182
0
0
null
null
null
null
UTF-8
Java
false
false
6,282
java
package zulutrade.grafica; import java.awt.image.BufferedImage; import java.io.IOException; import java.text.DecimalFormat; import java.text.NumberFormat; import java.util.ArrayList; import org.jfree.chart.ChartFactory; import org.jfree.chart.ChartUtilities; import org.jfree.chart.JFreeChart; import org.jfree.chart.annotations.XYAnnotation; import org.jfree.chart.annotations.XYPointerAnnotation; import org.jfree.chart.plot.PlotOrientation; import org.jfree.data.xy.XYSeries; import org.jfree.data.xy.XYSeriesCollection; import zulutrade.analizador.ProveedorDuplicado; import com.trolltech.qt.core.QModelIndex; import com.trolltech.qt.core.Qt; import com.trolltech.qt.gui.*; public class AnalisisG extends QWidget { private Ui_AnalisisG ui = new Ui_AnalisisG(); private QStandardItemModel modelo; private ProveedorDuplicado proveedor; private byte imgPNG[]; private int lotes; public AnalisisG(ProveedorDuplicado proveedor, int lotes) { ui.setupUi(this); this.proveedor = proveedor; this.lotes = lotes; crearAnalisis(); this.setWindowTitle("Analisis"); } public AnalisisG(QWidget parent) { super(parent); ui.setupUi(this); } public void crearAnalisis() { QTableView tabla = ui.tableView; crearModelo(); tabla.setModel(modelo); tabla.horizontalHeader().resizeSection(0, 50); tabla.horizontalHeader().resizeSection(1, 50); tabla.horizontalHeader().resizeSection(2, 50); tabla.horizontalHeader().resizeSection(3, 50); tabla.horizontalHeader().resizeSection(4, 50); this.setPalette(new QPalette(QColor.white)); ui.toolButton.clicked.connect(this, "crearGrafica1()"); ui.tableView.doubleClicked.connect(this,"crearGrafica2(QModelIndex)"); ui.nombre.setText(proveedor.darNombre()); ui.bajo.setText(proveedor.darPromedioBajo(lotes)); ui.alto.setText(proveedor.darPromedioAlto(lotes)); ui.cierre.setText(proveedor.darPromedioCierre(lotes)); ui.cierred.setText(proveedor.darDesviacionPromedioCierre(lotes)); } public void crearGrafica1() { int[] ganancia = proveedor.darGanancia(lotes); XYSeries series = new XYSeries("Stop"); for(int i = 0; i < ganancia.length; i++) { series.add(i, ganancia[i]); } XYSeriesCollection xySeriesCollection = new XYSeriesCollection(series); JFreeChart chart = ChartFactory.createXYAreaChart("Stop vs ganancia", "Stop", "Ganancia", xySeriesCollection, PlotOrientation.VERTICAL, false, false, false); String[][] mejores = proveedor.darTablaMejores(lotes); for(int i = 0; i < 5; i++) { int y = Integer.parseInt(mejores[2][i].replace("$", "")); int x = Integer.parseInt(mejores[1][i]); XYAnnotation sga = new XYPointerAnnotation(" " + x, x, y, 0); chart.getXYPlot().addAnnotation(sga); } BufferedImage img = chart.createBufferedImage(1000, 800); try { imgPNG = ChartUtilities.encodeAsPNG(img); } catch(IOException e) { } QPixmap qPix = new QPixmap(1000, 800); qPix.loadFromData(imgPNG); QDialog dialogo = new QDialog(this); dialogo.resize(1000, 800); QLabel label = new QLabel(dialogo); label.resize(1000, 800); label.setPixmap(qPix); dialogo.setWindowTitle("Grafica"); dialogo.show(); } public void crearGrafica2(QModelIndex indice) { int[] ganancia = proveedor.darAnalisisStop(lotes, indice.row()); XYSeries series = new XYSeries("Stop"); for(int i = 0; i < ganancia.length; i++) { series.add(i, ganancia[i]); } XYSeriesCollection xySeriesCollection = new XYSeriesCollection(series); JFreeChart chart = ChartFactory.createXYAreaChart("Acumulado vs tiempo", "Tiempo", "Acumulado", xySeriesCollection, PlotOrientation.VERTICAL, false, false, false); BufferedImage img = chart.createBufferedImage(1000, 800); try { imgPNG = ChartUtilities.encodeAsPNG(img); } catch(IOException e) { } QPixmap qPix = new QPixmap(1000, 800); qPix.loadFromData(imgPNG); QDialog dialogo = new QDialog(this); dialogo.resize(1000, 800); QLabel label = new QLabel(dialogo); label.resize(1000, 800); label.setPixmap(qPix); dialogo.setWindowTitle("Grafica"); dialogo.show(); } public void crearModelo() { String[][] tabla = proveedor.darTablaMejores(lotes); modelo = new QStandardItemModel(5, 4, this); modelo.setHeaderData(0, Qt.Orientation.Horizontal,"Hasta"); modelo.setHeaderData(1, Qt.Orientation.Horizontal,"Stop"); modelo.setHeaderData(2, Qt.Orientation.Horizontal, "$"); modelo.setHeaderData(3, Qt.Orientation.Horizontal,"Z"); for(int i = 0; i < 5; i++) { QStandardItem mejorHasta = new QStandardItem(); QStandardItem stop = new QStandardItem(); QStandardItem ganancia = new QStandardItem(); QStandardItem z = new QStandardItem(); mejorHasta.setText(tabla[0][i]); stop.setText(tabla[1][i]); ganancia.setText(tabla[2][i].replaceAll(" ", "")); NumberFormat formateador = new DecimalFormat("#0.0000"); z.setText(formateador.format(Double.parseDouble(tabla[3][i]))); mejorHasta.setEditable(false); stop.setEditable(false); ganancia.setEditable(false); z.setEditable(false); mejorHasta.setTextAlignment(Qt.AlignmentFlag.AlignCenter); stop.setTextAlignment(Qt.AlignmentFlag.AlignCenter); ganancia.setTextAlignment(Qt.AlignmentFlag.AlignCenter); z.setTextAlignment(Qt.AlignmentFlag.AlignCenter); ArrayList <QStandardItem> fila = new ArrayList <QStandardItem> (); fila.add(mejorHasta); fila.add(stop); fila.add(ganancia); fila.add(z); modelo.insertRow(i, fila); } modelo.setRowCount(5); } }
[ "santigutierrez1@gmail.com" ]
santigutierrez1@gmail.com
4740b36618f64ee943f2d5066569f032b3524c0c
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/12/12_5e9006b42c7ecee2df4b7ffa982e79165f3843b9/MultiThreadedIntentService/12_5e9006b42c7ecee2df4b7ffa982e79165f3843b9_MultiThreadedIntentService_s.java
1cedfedf14fb3110719e7faf99faea8e643c0c65
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
6,138
java
/** * 2011 Foxykeep (http://datadroid.foxykeep.com) * <p> * Licensed under the Beerware License : <br /> * As long as you retain this notice you can do whatever you want with this stuff. If we meet some * day, and you think this stuff is worth it, you can buy me a beer in return */ package com.foxykeep.datadroid.service; import android.app.Service; import android.content.Context; import android.content.Intent; import android.os.Handler; import android.os.IBinder; import android.os.Looper; import java.util.ArrayList; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; /** * MultiThreadIntentService is a base class for {@link Service}s that handle asynchronous requests * (expressed as {@link Intent}s) on demand. Clients send requests through * {@link android.content.Context#startService(Intent)} calls; the service is started as needed, * handles each Intent in turn using a worker thread, and stops itself when it runs out of work. * <p> * This "work queue processor" pattern is commonly used to offload tasks from an application's main * thread. The MultiThreadedIntentService class exists to simplify this pattern and take care of the * mechanics. To use it, extend MultiThreadedIntentService and implement * {@link #onHandleIntent(Intent)}. MultiThreadedIntentService will receive the Intents, launch a * worker thread, and stop the service as appropriate. * <p> * All requests are handled on multiple worker threads -- they may take as long as necessary (and * will not block the application's main loop). By default only one concurrent worker thread is * used. You can modify the number of current worker threads by overriding * {@link #getNumberOfThreads()}. * * @author Foxykeep */ public abstract class MultiThreadedIntentService extends Service { private ExecutorService mThreadPool; private boolean mRedelivery; private ArrayList<Future<?>> mFutureList; private Handler mHandler; private final Runnable mWorkDoneRunnable = new Runnable() { @Override public void run() { if (Looper.getMainLooper().getThread() != Thread.currentThread()) { throw new IllegalStateException( "This runnable can only be called in the Main thread!"); } final ArrayList<Future<?>> futureList = mFutureList; for (int i = 0; i < futureList.size(); i++) { if (futureList.get(i).isDone()) { futureList.remove(i); i--; } } if (futureList.isEmpty()) { stopSelf(); } } }; /** * Sets intent redelivery preferences. Usually called from the constructor with your preferred * semantics. * <p> * If enabled is true, {@link #onStartCommand(Intent, int, int)} will return * {@link Service#START_REDELIVER_INTENT}, so if this process dies before * {@link #onHandleIntent(Intent)} returns, the process will be restarted and the intent * redelivered. If multiple Intents have been sent, only the most recent one is guaranteed to be * redelivered. * <p> * If enabled is false (the default), {@link #onStartCommand(Intent, int, int)} will return * {@link Service#START_NOT_STICKY}, and if the process dies, the Intent dies along with it. */ public void setIntentRedelivery(boolean enabled) { mRedelivery = enabled; } @Override public void onCreate() { super.onCreate(); mThreadPool = Executors.newFixedThreadPool(getMaximumNumberOfThreads()); mHandler = new Handler(); mFutureList = new ArrayList<Future<?>>(); } @Override public void onStart(final Intent intent, final int startId) { IntentRunnable runnable = new IntentRunnable(intent); mFutureList.add(mThreadPool.submit(runnable)); } @Override public int onStartCommand(final Intent intent, final int flags, final int startId) { onStart(intent, startId); return mRedelivery ? START_REDELIVER_INTENT : START_NOT_STICKY; } @Override public void onDestroy() { super.onDestroy(); mThreadPool.shutdown(); } /** * Unless you provide binding for your service, you don't need to implement this method, because * the default implementation returns null. * * @see android.app.Service#onBind */ @Override public IBinder onBind(final Intent intent) { return null; } /** * Define the maximum number of concurrent worker threads used to execute the incoming Intents. * <p> * By default only one concurrent worker thread is used at the same time. Overrides this method * in subclasses to change this number. * <p> * This method is called once in the {@link #onCreate()}. Modifying the value returned after the * {@link #onCreate()} is called will have no effect. * * @return */ protected int getMaximumNumberOfThreads() { return 1; } private class IntentRunnable implements Runnable { private Intent mIntent; public IntentRunnable(final Intent intent) { mIntent = intent; } public void run() { onHandleIntent(mIntent); mHandler.removeCallbacks(mWorkDoneRunnable); mHandler.post(mWorkDoneRunnable); } } /** * This method is invoked on the worker thread with a request to process. The processing happens * on a worker thread that runs independently from other application logic. When all requests * have been handled, the IntentService stops itself, so you should not call {@link #stopSelf}. * * @param intent The value passed to {@link Context#startService(Intent)}. */ abstract protected void onHandleIntent(Intent intent); }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
de82408084fae55907726a02f7d9355c03bb7407
ab618e598da85b8554a79fbf07d936977ca4495a
/AttendanceMonitoringSystem/backend-trading/api/src/ph/com/bpi/api/impl/LogoffApiServiceImpl.java
5b5d0dfbeffe140ec1fcc23c99ce289f4e84ca49
[]
no_license
chrisjeriel/AttendanceMonitoringSystem
1108c55f71dbbb31e09191e47c8035d3f01da467
7ce4ee398c091435eefcf4311bc25b0bdc96d22e
refs/heads/master
2021-01-20T07:09:56.217032
2017-05-19T11:46:17
2017-05-19T11:46:17
89,969,174
0
0
null
null
null
null
UTF-8
Java
false
false
742
java
package ph.com.bpi.api.impl; import ph.com.bpi.api.*; import ph.com.bpi.model.*; import ph.com.bpi.model.ObjectResponse; import java.util.List; import ph.com.bpi.api.NotFoundException; import java.io.InputStream; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2016-11-24T17:10:55.097+08:00") public class LogoffApiServiceImpl extends LogoffApiService { @Override public Response logoffGet(SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } }
[ "Christopher Jeriel Sarsonas" ]
Christopher Jeriel Sarsonas
3994ef9d70d1b72358e88b75a26c1cff45072367
16cee9537c176c4b463d1a6b587c7417cb8e0622
/src/main/java/classstructureintegrate/BankAccountMain.java
16a77d005579507ebeafa2f0b83b8e2d89805ada
[]
no_license
ipp203/training-solutions
23c1b615965326e6409fee2e3b9616d6bc3818bb
8f36a831d25f1d12097ec4dfb089128aa6a02998
refs/heads/master
2023-03-17T10:01:32.154321
2021-03-04T22:54:12
2021-03-04T22:54:12
308,043,249
0
0
null
null
null
null
UTF-8
Java
false
false
1,970
java
package classstructureintegrate; import java.util.Scanner; public class BankAccountMain { public static void main(String[] args) { Scanner scn = new Scanner(System.in); System.out.println("What is the number of the first account?"); String accountNumber = scn.nextLine(); System.out.println("What is the name of the owner?"); String owner = scn.nextLine(); System.out.println("How much money is in the bank account?"); int amount = scn.nextInt(); scn.nextLine(); BankAccount account1 = new BankAccount(accountNumber,owner,amount); System.out.println("What is the number of the second account?"); accountNumber = scn.nextLine(); System.out.println("What is the name of the owner?"); owner = scn.nextLine(); System.out.println("How much money is in the bank account?"); amount = scn.nextInt(); scn.nextLine(); BankAccount account2 = new BankAccount(accountNumber,owner,amount); System.out.println("Account1: " + account1.getInfo()); System.out.println("Account2: " + account2.getInfo()); System.out.println("How much money do you like to deposit in the account1?"); amount = scn.nextInt(); scn.nextLine(); account1.deposit(amount); System.out.println("Account1: " + account1.getInfo()); System.out.println("How much money do you like to withdraw from the account2?"); amount = scn.nextInt(); scn.nextLine(); account2.withdraw(amount); System.out.println("Account2: " + account2.getInfo()); System.out.println("How much money do you like to transfer from account1 to account2?"); amount = scn.nextInt(); scn.nextLine(); account1.transfer(account2,amount); System.out.println("Account1: " + account1.getInfo()); System.out.println("Account2: " + account2.getInfo()); } }
[ "ipp203@freemail.hu" ]
ipp203@freemail.hu
44d5ed33e2b7698d9c52f56f4a659b7a462b860f
c2d8181a8e634979da48dc934b773788f09ffafb
/storyteller/output/mazdasalestool/SetWeeklyProccessPlanNewclientsintroductionAction.java
d739bc4dcd67303ac09bd09656043a4857a23a17
[]
no_license
toukubo/storyteller
ccb8281cdc17b87758e2607252d2d3c877ffe40c
6128b8d275efbf18fd26d617c8503a6e922c602d
refs/heads/master
2021-05-03T16:30:14.533638
2016-04-20T12:52:46
2016-04-20T12:52:46
9,352,300
0
0
null
null
null
null
UTF-8
Java
false
false
1,777
java
package net.mazdasalestool.web; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import net.mazdasalestool.model.*; import net.mazdasalestool.model.crud.*; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.hibernate.Criteria; import org.hibernate.Transaction; import org.hibernate.Session; import org.hibernate.Transaction; import org.hibernate.SessionFactory; import org.hibernate.criterion.Restrictions; import org.springframework.beans.factory.BeanFactory; import org.springframework.web.context.support.WebApplicationContextUtils; import net.enclosing.util.HibernateSession; import net.enclosing.util.HTTPGetRedirection; public class SetWeeklyProccessPlanNewclientsintroductionAction extends Action{ public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res) throws Exception{ Session session = new HibernateSession().currentSession(this .getServlet().getServletContext()); Transaction transaction = session.beginTransaction(); Criteria criteria = session.createCriteria(WeeklyProccessPlan.class); criteria.add(Restrictions.idEq(Integer.valueOf(req.getParameter("id")))); WeeklyProccessPlan weeklyProccessPlan = (WeeklyProccessPlan) criteria.uniqueResult(); weeklyProccessPlan.setNewclientsintroduction(true); session.saveOrUpdate(weeklyProccessPlan); transaction.commit(); session.flush(); new HTTPGetRedirection(req, res, "WeeklyProccessPlans.do", weeklyProccessPlan.getId().toString()); return null; } }
[ "toukubo@gmail.com" ]
toukubo@gmail.com
e716bda4ea5778a1dffe444c6920c94f1f97eb87
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.minihd.qq/assets/exlibs.1.jar/classes.jar/ADV_REPORT/mobile_adv_report_req.java
f3d780ed63f1c276ccb4ebd5a5fc8e7e42f9a555
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
3,364
java
package ADV_REPORT; import com.qq.taf.jce.JceInputStream; import com.qq.taf.jce.JceOutputStream; import com.qq.taf.jce.JceStruct; import java.util.HashMap; import java.util.Map; public final class mobile_adv_report_req extends JceStruct { static s_anti_cheat cache_anti_cheat; static Map cache_cookie; public int action_expectation = 0; public int action_type = 0; public s_anti_cheat anti_cheat = null; public long client_time = 0L; public Map cookie = null; public long feed_index = 0L; public boolean is_impression = true; public boolean is_installed = false; public int report_posi = 0; public int write_return_code = 0; public mobile_adv_report_req() {} public mobile_adv_report_req(Map paramMap, int paramInt1, int paramInt2, long paramLong1, long paramLong2, s_anti_cheat params_anti_cheat, int paramInt3, int paramInt4, boolean paramBoolean1, boolean paramBoolean2) { this.cookie = paramMap; this.report_posi = paramInt1; this.write_return_code = paramInt2; this.client_time = paramLong1; this.feed_index = paramLong2; this.anti_cheat = params_anti_cheat; this.action_type = paramInt3; this.action_expectation = paramInt4; this.is_impression = paramBoolean1; this.is_installed = paramBoolean2; } public void readFrom(JceInputStream paramJceInputStream) { if (cache_cookie == null) { cache_cookie = new HashMap(); cache_cookie.put(Integer.valueOf(0), ""); } this.cookie = ((Map)paramJceInputStream.read(cache_cookie, 0, false)); this.report_posi = paramJceInputStream.read(this.report_posi, 1, false); this.write_return_code = paramJceInputStream.read(this.write_return_code, 2, false); this.client_time = paramJceInputStream.read(this.client_time, 3, false); this.feed_index = paramJceInputStream.read(this.feed_index, 4, false); if (cache_anti_cheat == null) { cache_anti_cheat = new s_anti_cheat(); } this.anti_cheat = ((s_anti_cheat)paramJceInputStream.read(cache_anti_cheat, 5, false)); this.action_type = paramJceInputStream.read(this.action_type, 6, false); this.action_expectation = paramJceInputStream.read(this.action_expectation, 7, false); this.is_impression = paramJceInputStream.read(this.is_impression, 8, false); this.is_installed = paramJceInputStream.read(this.is_installed, 9, false); } public void writeTo(JceOutputStream paramJceOutputStream) { if (this.cookie != null) { paramJceOutputStream.write(this.cookie, 0); } paramJceOutputStream.write(this.report_posi, 1); paramJceOutputStream.write(this.write_return_code, 2); paramJceOutputStream.write(this.client_time, 3); paramJceOutputStream.write(this.feed_index, 4); if (this.anti_cheat != null) { paramJceOutputStream.write(this.anti_cheat, 5); } paramJceOutputStream.write(this.action_type, 6); paramJceOutputStream.write(this.action_expectation, 7); paramJceOutputStream.write(this.is_impression, 8); paramJceOutputStream.write(this.is_installed, 9); } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.minihd.qq\assets\exlibs.1.jar\classes.jar * Qualified Name: ADV_REPORT.mobile_adv_report_req * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
60509bb47cee27b4072c620c8af0bde07ed0b5b9
ef98dcfab6ff2c19cd1aae537e26594a08a24ffa
/lib_common/src/main/java/com/d/lib/common/utils/keyboard/KeyboardPlusManager.java
3d19f1a977e82e1da181c859176966d19c560fba
[ "Apache-2.0" ]
permissive
wljie2008/DMusic
c704c030cb6706f04f9dc19ebe7f2e8b001b8a68
5ac8ca67889472de3062207b2429d9398431e628
refs/heads/master
2020-04-24T03:37:19.088099
2019-02-15T03:44:24
2019-02-15T06:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,081
java
package com.d.lib.common.utils.keyboard; import android.app.Activity; import android.graphics.Rect; import android.widget.EditText; /** * 软键盘管理+ * Created by D on 2017/8/16. */ public class KeyboardPlusManager extends AbsKeyboardManager { public KeyboardPlusManager(Activity activity, EditText commonInput) { super(commonInput); init(activity); } private void init(Activity activity) { KeyboardHelper.setOnKeyboardEventListener(activity, new KeyboardHelper.OnKeyboardEventListener() { @Override public void onScroll(Rect rect) { if (listener != null) { listener.onScroll(rect); } } @Override public void onPop() { if (listener != null) { listener.onPop(); } } @Override public void onClose() { if (listener != null) { listener.onClose(); } } }); } }
[ "s90789@outlook.com" ]
s90789@outlook.com
17e19b8524c823db6ce46ea39e9bc3859ae64da0
24f26275ffcd9324998d7570ea9fda82578eeb9e
/chrome/android/java/src/org/chromium/chrome/browser/compositor/scene_layer/ScrollingBottomViewSceneLayer.java
61419c0a5f4154336530ef590504cb1ce58f4aaa
[ "BSD-3-Clause" ]
permissive
Vizionnation/chromenohistory
70a51193c8538d7b995000a1b2a654e70603040f
146feeb85985a6835f4b8826ad67be9195455402
refs/heads/master
2022-12-15T07:02:54.461083
2019-10-25T15:07:06
2019-10-25T15:07:06
217,557,501
2
1
BSD-3-Clause
2022-11-19T06:53:07
2019-10-25T14:58:54
null
UTF-8
Java
false
false
6,414
java
// Copyright 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.chrome.browser.compositor.scene_layer; import android.graphics.RectF; import android.view.View; import org.chromium.base.annotations.JNINamespace; import org.chromium.base.annotations.NativeMethods; import org.chromium.chrome.browser.compositor.LayerTitleCache; import org.chromium.chrome.browser.compositor.layouts.components.VirtualView; import org.chromium.chrome.browser.compositor.layouts.eventfilter.EventFilter; import org.chromium.chrome.browser.compositor.overlays.SceneOverlay; import org.chromium.chrome.browser.ui.widget.ViewResourceFrameLayout; import org.chromium.ui.resources.ResourceManager; import java.util.List; /** * A composited view that sits at the bottom of the screen and listens to changes in the browser * controls. When visible, the view will mimic the behavior of the top browser controls when * scrolling. */ @JNINamespace("android") public class ScrollingBottomViewSceneLayer extends SceneOverlayLayer implements SceneOverlay { /** Handle to the native side of this class. */ private long mNativePtr; /** The resource ID used to reference the view bitmap in native. */ private int mResourceId; /** The height of the view's top shadow. */ private int mTopShadowHeightPx; /** The current Y offset of the bottom view in px. */ private int mCurrentYOffsetPx; /** The current X offset of the bottom view in px. */ private int mCurrentXOffsetPx; /** Whether the {@link SceneLayer}is visible. */ private boolean mIsVisible; /** The {@link ViewResourceFrameLayout} that this scene layer represents. */ private ViewResourceFrameLayout mBottomView; /** * Build a composited bottom view layer. * @param bottomView The view used to generate the composited version. * @param topShadowHeightPx The height of the shadow on the top of the view in px if it exists. */ public ScrollingBottomViewSceneLayer( ViewResourceFrameLayout bottomView, int topShadowHeightPx) { mBottomView = bottomView; mResourceId = mBottomView.getId(); mTopShadowHeightPx = topShadowHeightPx; mIsVisible = true; } /** * Build a copy of an existing {@link ScrollingBottomViewSceneLayer}. * @param sceneLayer The existing scene layer to copy. This only copies the source view, * resource ID, and shadow height. All other state is ignored. */ public ScrollingBottomViewSceneLayer(ScrollingBottomViewSceneLayer sceneLayer) { this(sceneLayer.mBottomView, sceneLayer.mTopShadowHeightPx); } /** * Set the view's offset from the bottom of the screen in px. An offset of 0 means the view is * completely visible. An increasing offset will move the view down. * @param offsetPx The view's offset in px. */ public void setYOffset(int offsetPx) { mCurrentYOffsetPx = offsetPx; } /** * @param offsetPx The view's X translation in px. */ public void setXOffset(int offsetPx) { mCurrentXOffsetPx = offsetPx; } /** * @param visible Whether this {@link SceneLayer} is visible. */ public void setIsVisible(boolean visible) { mIsVisible = visible; } @Override protected void initializeNative() { if (mNativePtr == 0) { mNativePtr = ScrollingBottomViewSceneLayerJni.get().init(ScrollingBottomViewSceneLayer.this); } assert mNativePtr != 0; } @Override public void setContentTree(SceneLayer contentTree) { ScrollingBottomViewSceneLayerJni.get().setContentTree( mNativePtr, ScrollingBottomViewSceneLayer.this, contentTree); } @Override public SceneOverlayLayer getUpdatedSceneOverlayTree(RectF viewport, RectF visibleViewport, LayerTitleCache layerTitleCache, ResourceManager resourceManager, float yOffset) { // The composited shadow should be visible if the Android toolbar's isn't. boolean isShadowVisible = mBottomView.getVisibility() != View.VISIBLE; ScrollingBottomViewSceneLayerJni.get().updateScrollingBottomViewLayer(mNativePtr, ScrollingBottomViewSceneLayer.this, resourceManager, mResourceId, mTopShadowHeightPx, mCurrentXOffsetPx, viewport.height() + mCurrentYOffsetPx, isShadowVisible); return this; } @Override public boolean isSceneOverlayTreeShowing() { // If the offset is greater than the toolbar's height, don't draw the layer. return mIsVisible && mCurrentYOffsetPx < mBottomView.getHeight() - mTopShadowHeightPx; } @Override public EventFilter getEventFilter() { return null; } @Override public boolean shouldHideAndroidBrowserControls() { return false; } @Override public boolean updateOverlay(long time, long dt) { return false; } @Override public boolean onBackPressed() { return false; } @Override public boolean handlesTabCreating() { return false; } @Override public void onSizeChanged( float width, float height, float visibleViewportOffsetY, int orientation) {} @Override public void onHideLayout() {} @Override public void getVirtualViews(List<VirtualView> views) {} @Override public void tabTitleChanged(int tabId, String title) {} @Override public void tabStateInitialized() {} @Override public void tabModelSwitched(boolean incognito) {} @Override public void tabCreated(long time, boolean incognito, int id, int prevId, boolean selected) {} @NativeMethods interface Natives { long init(ScrollingBottomViewSceneLayer caller); void setContentTree(long nativeScrollingBottomViewSceneLayer, ScrollingBottomViewSceneLayer caller, SceneLayer contentTree); void updateScrollingBottomViewLayer(long nativeScrollingBottomViewSceneLayer, ScrollingBottomViewSceneLayer caller, ResourceManager resourceManager, int viewResourceId, int shadowHeightPx, float xOffset, float yOffset, boolean showShadow); } }
[ "rjkroege@chromium.org" ]
rjkroege@chromium.org
f084a1b5cae0b3b76f6114cedbf6f7cd2508c574
904fa537f8c568389676088163d788849ec5052d
/sparrow-server-spring-boot-common/src/main/java/com/github/thierrysquirrel/sparrow/server/common/netty/domain/builder/PageSparrowMessageBuilder.java
34f3eaf6906e92b79db19db0930ae088ef7a28fd
[ "Apache-2.0" ]
permissive
15662664518/sparrow-server-spring-boot-starter
de99901baa2f6b9d956bce67b50dff04dbb8ef57
8feedd19e62d54715bb5d66f5d570908c38f3a32
refs/heads/master
2022-10-08T01:39:38.060297
2020-06-11T04:58:53
2020-06-11T04:58:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,725
java
/** * Copyright 2020 the original author or authors. * <p> * 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * 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.github.thierrysquirrel.sparrow.server.common.netty.domain.builder; import com.github.thierrysquirrel.sparrow.server.common.netty.domain.PageSparrowMessage; import com.github.thierrysquirrel.sparrow.server.common.netty.domain.SparrowMessage; import java.util.List; /** * ClassName: PageSparrowMessageBuilder * Description: * date: 2020/6/10 5:19 * * @author ThierrySquirrel * @since JDK 1.8 */ public class PageSparrowMessageBuilder { private PageSparrowMessageBuilder() { } private static PageSparrowMessage createPageSparrowMessage() { return new PageSparrowMessage (); } public static PageSparrowMessage builderPullMessageResponse(int pageIndex, int pageTotal, List<SparrowMessage> sparrowMessageList) { PageSparrowMessage pageSparrowMessage = createPageSparrowMessage (); pageSparrowMessage.setPageIndex (pageIndex); pageSparrowMessage.setPageTotal (pageTotal); pageSparrowMessage.setSparrowMessageList (sparrowMessageList); return pageSparrowMessage; } }
[ "2161271173@qq.com" ]
2161271173@qq.com