blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
132 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
ee6f071e487ed8de202adea4917ab1e58eee0b29
4283a45e5ca2dd83810a5b41433f0779eac21995
/app/src/main/java/com/droidtitan/volleyexamples/rest/util/HttpResponseEvent.java
cdf342a03598b7e40e3b5ac53c2470b6a7dffa42
[]
no_license
friederbluemle/volley-examples
7673941d71f93f03826a553b11786cbb93009161
948b2c2feb1336bfaa27e416182488237f2efed2
refs/heads/master
2020-04-06T03:43:11.623979
2014-08-17T16:55:04
2014-08-17T16:55:04
26,377,153
1
0
null
null
null
null
UTF-8
Java
false
false
572
java
package com.droidtitan.volleyexamples.rest.util; import com.android.volley.VolleyError; public class HttpResponseEvent<T> { private T response; private VolleyError volleyError; public T getResponse() { return response; } public HttpResponseEvent<T> setResponse(T response) { this.response = response; return this; } public VolleyError getVolleyError() { return volleyError; } public HttpResponseEvent<T> setVolleyError(VolleyError error) { volleyError = error; return this; } }
[ "marsucsb@gmail.com" ]
marsucsb@gmail.com
4e38d86c71d355b3eb8e9edd621c650995787949
a744882fb7cf18944bd6719408e5a9f2f0d6c0dd
/sourcecode7/src/java/beans/PropertyDescriptor.java
112ce6756f98db102847709a556ea5e3f83da854
[ "Apache-2.0" ]
permissive
hanekawasann/learn
a39b8d17fd50fa8438baaa5b41fdbe8bd299ab33
eef678f1b8e14b7aab966e79a8b5a777cfc7ab14
refs/heads/master
2022-09-13T02:18:07.127489
2020-04-26T07:58:35
2020-04-26T07:58:35
176,686,231
0
0
Apache-2.0
2022-09-01T23:21:38
2019-03-20T08:16:05
Java
UTF-8
Java
false
false
26,380
java
/* * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package java.beans; import java.lang.ref.Reference; import java.lang.reflect.Method; import java.lang.reflect.Constructor; /** * A PropertyDescriptor describes one property that a Java Bean * exports via a pair of accessor methods. */ public class PropertyDescriptor extends FeatureDescriptor { private Reference<Class> propertyTypeRef; private Reference<Method> readMethodRef; private Reference<Method> writeMethodRef; private Reference<Class> propertyEditorClassRef; private boolean bound; private boolean constrained; // The base name of the method name which will be prefixed with the // read and write method. If name == "foo" then the baseName is "Foo" private String baseName; private String writeMethodName; private String readMethodName; /** * Constructs a PropertyDescriptor for a property that follows * the standard Java convention by having getFoo and setFoo * accessor methods. Thus if the argument name is "fred", it will * assume that the writer method is "setFred" and the reader method * is "getFred" (or "isFred" for a boolean property). Note that the * property name should start with a lower case character, which will * be capitalized in the method names. * * @param propertyName The programmatic name of the property. * @param beanClass The Class object for the target bean. For * example sun.beans.OurButton.class. * @throws IntrospectionException if an exception occurs during * introspection. */ public PropertyDescriptor(String propertyName, Class<?> beanClass) throws IntrospectionException { this(propertyName, beanClass, Introspector.IS_PREFIX + NameGenerator.capitalize(propertyName), Introspector.SET_PREFIX + NameGenerator.capitalize(propertyName)); } /** * This constructor takes the name of a simple property, and method * names for reading and writing the property. * * @param propertyName The programmatic name of the property. * @param beanClass The Class object for the target bean. For * example sun.beans.OurButton.class. * @param readMethodName The name of the method used for reading the property * value. May be null if the property is write-only. * @param writeMethodName The name of the method used for writing the property * value. May be null if the property is read-only. * @throws IntrospectionException if an exception occurs during * introspection. */ public PropertyDescriptor(String propertyName, Class<?> beanClass, String readMethodName, String writeMethodName) throws IntrospectionException { if (beanClass == null) { throw new IntrospectionException("Target Bean class is null"); } if (propertyName == null || propertyName.length() == 0) { throw new IntrospectionException("bad property name"); } if ("".equals(readMethodName) || "".equals(writeMethodName)) { throw new IntrospectionException("read or write method name should not be the empty string"); } setName(propertyName); setClass0(beanClass); this.readMethodName = readMethodName; if (readMethodName != null && getReadMethod() == null) { throw new IntrospectionException("Method not found: " + readMethodName); } this.writeMethodName = writeMethodName; if (writeMethodName != null && getWriteMethod() == null) { throw new IntrospectionException("Method not found: " + writeMethodName); } // If this class or one of its base classes allow PropertyChangeListener, // then we assume that any properties we discover are "bound". // See Introspector.getTargetPropertyInfo() method. Class[] args = { PropertyChangeListener.class }; this.bound = null != Introspector.findMethod(beanClass, "addPropertyChangeListener", args.length, args); } /** * This constructor takes the name of a simple property, and Method * objects for reading and writing the property. * * @param propertyName The programmatic name of the property. * @param readMethod The method used for reading the property value. * May be null if the property is write-only. * @param writeMethod The method used for writing the property value. * May be null if the property is read-only. * @throws IntrospectionException if an exception occurs during * introspection. */ public PropertyDescriptor(String propertyName, Method readMethod, Method writeMethod) throws IntrospectionException { if (propertyName == null || propertyName.length() == 0) { throw new IntrospectionException("bad property name"); } setName(propertyName); setReadMethod(readMethod); setWriteMethod(writeMethod); } /** * Creates <code>PropertyDescriptor</code> for the specified bean * with the specified name and methods to read/write the property value. * * @param bean the type of the target bean * @param base the base name of the property (the rest of the method name) * @param read the method used for reading the property value * @param write the method used for writing the property value * @throws IntrospectionException if an exception occurs during introspection * @since 1.7 */ PropertyDescriptor(Class<?> bean, String base, Method read, Method write) throws IntrospectionException { if (bean == null) { throw new IntrospectionException("Target Bean class is null"); } setClass0(bean); setName(Introspector.decapitalize(base)); setReadMethod(read); setWriteMethod(write); this.baseName = base; } /** * Returns the Java type info for the property. * Note that the {@code Class} object may describe * primitive Java types such as {@code int}. * This type is returned by the read method * or is used as the parameter type of the write method. * Returns {@code null} if the type is an indexed property * that does not support non-indexed access. * * @return the {@code Class} object that represents the Java type info, * or {@code null} if the type cannot be determined */ public synchronized Class<?> getPropertyType() { Class type = getPropertyType0(); if (type == null) { try { type = findPropertyType(getReadMethod(), getWriteMethod()); setPropertyType(type); } catch (IntrospectionException ex) { // Fall } } return type; } private void setPropertyType(Class type) { this.propertyTypeRef = getWeakReference(type); } private Class getPropertyType0() { return (this.propertyTypeRef != null) ? this.propertyTypeRef.get() : null; } /** * Gets the method that should be used to read the property value. * * @return The method that should be used to read the property value. * May return null if the property can't be read. */ public synchronized Method getReadMethod() { Method readMethod = getReadMethod0(); if (readMethod == null) { Class cls = getClass0(); if (cls == null || (readMethodName == null && readMethodRef == null)) { // The read method was explicitly set to null. return null; } if (readMethodName == null) { Class type = getPropertyType0(); if (type == boolean.class || type == null) { readMethodName = Introspector.IS_PREFIX + getBaseName(); } else { readMethodName = Introspector.GET_PREFIX + getBaseName(); } } // Since there can be multiple write methods but only one getter // method, find the getter method first so that you know what the // property type is. For booleans, there can be "is" and "get" // methods. If an "is" method exists, this is the official // reader method so look for this one first. readMethod = Introspector.findMethod(cls, readMethodName, 0); if (readMethod == null) { readMethodName = Introspector.GET_PREFIX + getBaseName(); readMethod = Introspector.findMethod(cls, readMethodName, 0); } try { setReadMethod(readMethod); } catch (IntrospectionException ex) { // fall } } return readMethod; } /** * Sets the method that should be used to read the property value. * * @param readMethod The new read method. */ public synchronized void setReadMethod(Method readMethod) throws IntrospectionException { if (readMethod == null) { readMethodName = null; readMethodRef = null; return; } // The property type is determined by the read method. setPropertyType(findPropertyType(readMethod, getWriteMethod0())); setClass0(readMethod.getDeclaringClass()); readMethodName = readMethod.getName(); this.readMethodRef = getSoftReference(readMethod); setTransient(readMethod.getAnnotation(Transient.class)); } /** * Gets the method that should be used to write the property value. * * @return The method that should be used to write the property value. * May return null if the property can't be written. */ public synchronized Method getWriteMethod() { Method writeMethod = getWriteMethod0(); if (writeMethod == null) { Class cls = getClass0(); if (cls == null || (writeMethodName == null && writeMethodRef == null)) { // The write method was explicitly set to null. return null; } // We need the type to fetch the correct method. Class type = getPropertyType0(); if (type == null) { try { // Can't use getPropertyType since it will lead to recursive loop. type = findPropertyType(getReadMethod(), null); setPropertyType(type); } catch (IntrospectionException ex) { // Without the correct property type we can't be guaranteed // to find the correct method. return null; } } if (writeMethodName == null) { writeMethodName = Introspector.SET_PREFIX + getBaseName(); } Class[] args = (type == null) ? null : new Class[] { type }; writeMethod = Introspector.findMethod(cls, writeMethodName, 1, args); if (writeMethod != null) { if (!writeMethod.getReturnType().equals(void.class)) { writeMethod = null; } } try { setWriteMethod(writeMethod); } catch (IntrospectionException ex) { // fall through } } return writeMethod; } /** * Sets the method that should be used to write the property value. * * @param writeMethod The new write method. */ public synchronized void setWriteMethod(Method writeMethod) throws IntrospectionException { if (writeMethod == null) { writeMethodName = null; writeMethodRef = null; return; } // Set the property type - which validates the method setPropertyType(findPropertyType(getReadMethod(), writeMethod)); setClass0(writeMethod.getDeclaringClass()); writeMethodName = writeMethod.getName(); this.writeMethodRef = getSoftReference(writeMethod); setTransient(writeMethod.getAnnotation(Transient.class)); } private Method getReadMethod0() { return (this.readMethodRef != null) ? this.readMethodRef.get() : null; } private Method getWriteMethod0() { return (this.writeMethodRef != null) ? this.writeMethodRef.get() : null; } /** * Overridden to ensure that a super class doesn't take precedent */ void setClass0(Class clz) { if (getClass0() != null && clz.isAssignableFrom(getClass0())) { // dont replace a subclass with a superclass return; } super.setClass0(clz); } /** * Updates to "bound" properties will cause a "PropertyChange" event to * get fired when the property is changed. * * @return True if this is a bound property. */ public boolean isBound() { return bound; } /** * Updates to "bound" properties will cause a "PropertyChange" event to * get fired when the property is changed. * * @param bound True if this is a bound property. */ public void setBound(boolean bound) { this.bound = bound; } /** * Attempted updates to "Constrained" properties will cause a "VetoableChange" * event to get fired when the property is changed. * * @return True if this is a constrained property. */ public boolean isConstrained() { return constrained; } /** * Attempted updates to "Constrained" properties will cause a "VetoableChange" * event to get fired when the property is changed. * * @param constrained True if this is a constrained property. */ public void setConstrained(boolean constrained) { this.constrained = constrained; } /** * Normally PropertyEditors will be found using the PropertyEditorManager. * However if for some reason you want to associate a particular * PropertyEditor with a given property, then you can do it with * this method. * * @param propertyEditorClass The Class for the desired PropertyEditor. */ public void setPropertyEditorClass(Class<?> propertyEditorClass) { this.propertyEditorClassRef = getWeakReference(propertyEditorClass); } /** * Gets any explicit PropertyEditor Class that has been registered * for this property. * * @return Any explicit PropertyEditor Class that has been registered * for this property. Normally this will return "null", * indicating that no special editor has been registered, * so the PropertyEditorManager should be used to locate * a suitable PropertyEditor. */ public Class<?> getPropertyEditorClass() { return (this.propertyEditorClassRef != null) ? this.propertyEditorClassRef.get() : null; } /** * Constructs an instance of a property editor using the current * property editor class. * <p> * If the property editor class has a public constructor that takes an * Object argument then it will be invoked using the bean parameter * as the argument. Otherwise, the default constructor will be invoked. * * @param bean the source object * @return a property editor instance or null if a property editor has * not been defined or cannot be created * @since 1.5 */ public PropertyEditor createPropertyEditor(Object bean) { Object editor = null; Class cls = getPropertyEditorClass(); if (cls != null) { Constructor ctor = null; if (bean != null) { try { ctor = cls.getConstructor(Object.class); } catch (Exception ex) { // Fall through } } try { if (ctor == null) { editor = cls.newInstance(); } else { editor = ctor.newInstance(bean); } } catch (Exception ex) { // A serious error has occured. // Proably due to an invalid property editor. throw new RuntimeException("PropertyEditor not instantiated", ex); } } return (PropertyEditor) editor; } /** * Compares this <code>PropertyDescriptor</code> against the specified object. * Returns true if the objects are the same. Two <code>PropertyDescriptor</code>s * are the same if the read, write, property types, property editor and * flags are equivalent. * * @since 1.4 */ public boolean equals(Object obj) { if (this == obj) { return true; } if (obj != null && obj instanceof PropertyDescriptor) { PropertyDescriptor other = (PropertyDescriptor) obj; Method otherReadMethod = other.getReadMethod(); Method otherWriteMethod = other.getWriteMethod(); if (!compareMethods(getReadMethod(), otherReadMethod)) { return false; } if (!compareMethods(getWriteMethod(), otherWriteMethod)) { return false; } return getPropertyType() == other.getPropertyType() && getPropertyEditorClass() == other.getPropertyEditorClass() && bound == other.isBound() && constrained == other.isConstrained() && writeMethodName == other.writeMethodName && readMethodName == other.readMethodName; } return false; } /** * Package private helper method for Descriptor .equals methods. * * @param a first method to compare * @param b second method to compare * @return boolean to indicate that the methods are equivalent */ boolean compareMethods(Method a, Method b) { // Note: perhaps this should be a protected method in FeatureDescriptor if ((a == null) != (b == null)) { return false; } if (a != null && b != null) { return a.equals(b); } return true; } /** * Package-private constructor. * Merge two property descriptors. Where they conflict, give the * second argument (y) priority over the first argument (x). * * @param x The first (lower priority) PropertyDescriptor * @param y The second (higher priority) PropertyDescriptor */ PropertyDescriptor(PropertyDescriptor x, PropertyDescriptor y) { super(x, y); if (y.baseName != null) { baseName = y.baseName; } else { baseName = x.baseName; } if (y.readMethodName != null) { readMethodName = y.readMethodName; } else { readMethodName = x.readMethodName; } if (y.writeMethodName != null) { writeMethodName = y.writeMethodName; } else { writeMethodName = x.writeMethodName; } if (y.propertyTypeRef != null) { propertyTypeRef = y.propertyTypeRef; } else { propertyTypeRef = x.propertyTypeRef; } // Figure out the merged read method. Method xr = x.getReadMethod(); Method yr = y.getReadMethod(); // Normally give priority to y's readMethod. try { if (yr != null && yr.getDeclaringClass() == getClass0()) { setReadMethod(yr); } else { setReadMethod(xr); } } catch (IntrospectionException ex) { // fall through } // However, if both x and y reference read methods in the same class, // give priority to a boolean "is" method over a boolean "get" method. if (xr != null && yr != null && xr.getDeclaringClass() == yr.getDeclaringClass() && getReturnType(getClass0(), xr) == boolean.class && getReturnType(getClass0(), yr) == boolean.class && xr.getName().indexOf(Introspector.IS_PREFIX) == 0 && yr.getName().indexOf(Introspector.GET_PREFIX) == 0) { try { setReadMethod(xr); } catch (IntrospectionException ex) { // fall through } } Method xw = x.getWriteMethod(); Method yw = y.getWriteMethod(); try { if (yw != null && yw.getDeclaringClass() == getClass0()) { setWriteMethod(yw); } else { setWriteMethod(xw); } } catch (IntrospectionException ex) { // Fall through } if (y.getPropertyEditorClass() != null) { setPropertyEditorClass(y.getPropertyEditorClass()); } else { setPropertyEditorClass(x.getPropertyEditorClass()); } bound = x.bound | y.bound; constrained = x.constrained | y.constrained; } /* * Package-private dup constructor. * This must isolate the new object from any changes to the old object. */ PropertyDescriptor(PropertyDescriptor old) { super(old); propertyTypeRef = old.propertyTypeRef; readMethodRef = old.readMethodRef; writeMethodRef = old.writeMethodRef; propertyEditorClassRef = old.propertyEditorClassRef; writeMethodName = old.writeMethodName; readMethodName = old.readMethodName; baseName = old.baseName; bound = old.bound; constrained = old.constrained; } /** * Returns the property type that corresponds to the read and write method. * The type precedence is given to the readMethod. * * @return the type of the property descriptor or null if both * read and write methods are null. * @throws IntrospectionException if the read or write method is invalid */ private Class findPropertyType(Method readMethod, Method writeMethod) throws IntrospectionException { Class propertyType = null; try { if (readMethod != null) { Class[] params = getParameterTypes(getClass0(), readMethod); if (params.length != 0) { throw new IntrospectionException("bad read method arg count: " + readMethod); } propertyType = getReturnType(getClass0(), readMethod); if (propertyType == Void.TYPE) { throw new IntrospectionException("read method " + readMethod.getName() + " returns void"); } } if (writeMethod != null) { Class[] params = getParameterTypes(getClass0(), writeMethod); if (params.length != 1) { throw new IntrospectionException("bad write method arg count: " + writeMethod); } if (propertyType != null && propertyType != params[0]) { throw new IntrospectionException("type mismatch between read and write methods"); } propertyType = params[0]; } } catch (IntrospectionException ex) { throw ex; } return propertyType; } /** * Returns a hash code value for the object. * See {@link java.lang.Object#hashCode} for a complete description. * * @return a hash code value for this object. * @since 1.5 */ public int hashCode() { int result = 7; result = 37 * result + ((getPropertyType() == null) ? 0 : getPropertyType().hashCode()); result = 37 * result + ((getReadMethod() == null) ? 0 : getReadMethod().hashCode()); result = 37 * result + ((getWriteMethod() == null) ? 0 : getWriteMethod().hashCode()); result = 37 * result + ((getPropertyEditorClass() == null) ? 0 : getPropertyEditorClass().hashCode()); result = 37 * result + ((writeMethodName == null) ? 0 : writeMethodName.hashCode()); result = 37 * result + ((readMethodName == null) ? 0 : readMethodName.hashCode()); result = 37 * result + getName().hashCode(); result = 37 * result + ((bound == false) ? 0 : 1); result = 37 * result + ((constrained == false) ? 0 : 1); return result; } // Calculate once since capitalize() is expensive. String getBaseName() { if (baseName == null) { baseName = NameGenerator.capitalize(getName()); } return baseName; } void appendTo(StringBuilder sb) { appendTo(sb, "bound", this.bound); appendTo(sb, "constrained", this.constrained); appendTo(sb, "propertyEditorClass", this.propertyEditorClassRef); appendTo(sb, "propertyType", this.propertyTypeRef); appendTo(sb, "readMethod", this.readMethodRef); appendTo(sb, "writeMethod", this.writeMethodRef); } }
[ "763803382@qq.com" ]
763803382@qq.com
42923cc5668f3e918af9f2b1229a0205ef7c7f27
40287b63b35e2f4f834347e6f4537ed91f44e55e
/app/src/main/java/cn/hodi/jpushdemo/jpush/JPushUtil.java
7d92fc48e5d364c5a7ab1cd6d36d6ec8eea80498
[]
no_license
lidc-lee/JPushDemo
e0ef8513364d52dd243ece7d36faf7ad510d1344
4707b0411b9163e2481677f63b3e43429d1ee534
refs/heads/master
2021-01-19T05:53:21.881945
2016-07-02T01:14:17
2016-07-02T01:14:17
62,374,906
0
0
null
null
null
null
UTF-8
Java
false
false
3,284
java
package cn.hodi.jpushdemo.jpush; import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.os.Bundle; import android.os.Looper; import android.telephony.TelephonyManager; import android.util.Log; import android.widget.Toast; import java.util.regex.Matcher; import java.util.regex.Pattern; public class JPushUtil { public static final String PREFS_NAME = "JPUSH_EXAMPLE"; public static final String PREFS_DAYS = "JPUSH_EXAMPLE_DAYS"; public static final String PREFS_START_TIME = "PREFS_START_TIME"; public static final String PREFS_END_TIME = "PREFS_END_TIME"; public static final String KEY_APP_KEY = "JPUSH_APPKEY"; public static boolean isEmpty(String s) { if (null == s) return true; if (s.length() == 0) return true; if (s.trim().length() == 0) return true; return false; } // 校验Tag Alias 只能是数字,英文字母和中文 public static boolean isValidTagAndAlias(String s) { Pattern p = Pattern.compile("^[\u4E00-\u9FA50-9a-zA-Z_-]{0,}$"); Matcher m = p.matcher(s); return m.matches(); } // 取得AppKey public static String getAppKey(Context context) { Bundle metaData = null; String appKey = null; try { ApplicationInfo ai = context.getPackageManager().getApplicationInfo( context.getPackageName(), PackageManager.GET_META_DATA); if (null != ai) metaData = ai.metaData; if (null != metaData) { appKey = metaData.getString(KEY_APP_KEY); if ((null == appKey) || appKey.length() != 24) { appKey = null; } } } catch (NameNotFoundException e) { } return appKey; } // 取得版本号 public static String GetVersion(Context context) { try { PackageInfo manager = context.getPackageManager().getPackageInfo( context.getPackageName(), 0); return manager.versionName; } catch (NameNotFoundException e) { return "Unknown"; } } public static void showToast(final String toast, final Context context) { new Thread(new Runnable() { @Override public void run() { Looper.prepare(); Toast.makeText(context, toast, Toast.LENGTH_SHORT).show(); Looper.loop(); } }).start(); } public static boolean isConnected(Context context) { ConnectivityManager conn = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo info = conn.getActiveNetworkInfo(); return (info != null && info.isConnected()); } public static String getImei(Context context, String imei) { try { TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); imei = telephonyManager.getDeviceId(); } catch (Exception e) { Log.e(JPushUtil.class.getSimpleName(), e.getMessage()); } return imei; } }
[ "1499117534@qq.com" ]
1499117534@qq.com
1a64219405c9794641753f818711ad7809f4b947
cd73733881f28e2cd5f1741fbe2d32dafc00f147
/libs/base/src/main/java/com/hjhq/teamface/basis/bean/ViewDataAuthBean.java
f714f218b0fc7a394f610e8fab7149a0781421ab
[]
no_license
XiaoJon/20180914
45cfac9f7068ad85dee26e570acd2900796cbcb1
6c0759d8abd898f1f5dba77eee45cbc3d218b2e0
refs/heads/master
2020-03-28T16:48:36.275700
2018-09-14T04:10:27
2018-09-14T04:10:27
148,730,363
0
1
null
null
null
null
UTF-8
Java
false
false
1,203
java
package com.hjhq.teamface.basis.bean; /** * 小助手信息 */ public class ViewDataAuthBean extends BaseBean { /** * data : {"del_status":"0","moduleId":2,"readAuth":0} */ private DataBean data; public DataBean getData() { return data; } public void setData(DataBean data) { this.data = data; } public static class DataBean { /** * del_status : 0 * moduleId : 2 * readAuth : 0 */ //1已删除,0存在 private String del_status; private String moduleId; //0有权限,1无权限 private String readAuth; public String getDel_status() { return del_status; } public void setDel_status(String del_status) { this.del_status = del_status; } public String getModuleId() { return moduleId; } public void setModuleId(String moduleId) { this.moduleId = moduleId; } public String getReadAuth() { return readAuth; } public void setReadAuth(String readAuth) { this.readAuth = readAuth; } } }
[ "xiaojun6909@gmail.com" ]
xiaojun6909@gmail.com
37837235d11092979030e7424e0ffd74d38cf098
595e81006d568c0af6bf770646520845f113e607
/our_subs_java/save/com/amlibtech/util/Boolean_Plus.java
30b635886844259f81e32d38741810aed51463c0
[]
no_license
TheDoctorDan/glsn_my_projects
8224dfacde95f1cbffe4f009cbe105a0aacaaa9e
72af4b1a3a63249f6234f7337c94ac189f842ca3
refs/heads/master
2023-02-14T15:51:28.524818
2021-01-07T18:32:23
2021-01-07T18:32:23
327,695,629
0
0
null
null
null
null
UTF-8
Java
false
false
526
java
/* Boolean_Plus.java */ /** * * Copyright (c) 1985 thru 1998, 1999, 2000, 2001, 2002, 2003, 2004 * American Liberator Technologies * All Rights Reserved * * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF * American Liberator Technologies * The copyright notice above does not evidence any * actual or intended publication of such source code. * **/ package com.amlibtech.util; public class Boolean_Plus { public static String get_Yes_Or_No(Boolean b){ if(b.booleanValue()) return "yes"; else return "no"; } }
[ "dgleeson1721@gmail.com" ]
dgleeson1721@gmail.com
4434e16f745d7236edd3c520321f0c3cf5029bd2
a198c02e537286f4994fc365ebf49763d73fc2a5
/src/main/java/com/appium/manager/StringsManager.java
7d78487ad16db259611437fe22db4a7d3d9db11a
[]
no_license
aravindanath/MasterAppiumFramework
e9eafbfc1619ba988a7b5b9504a9e9357deccad1
ffd73c5281907a43e6f1b17c2f7e8b6abcfbcdd4
refs/heads/master
2023-08-25T07:10:01.308659
2021-11-01T09:48:36
2021-11-01T09:48:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
470
java
package com.appium.manager; import java.util.HashMap; public final class StringsManager { private StringsManager() { } private static ThreadLocal<HashMap<String, String>> strings = new ThreadLocal<HashMap<String, String>>(); public static HashMap<String, String> getStrings() { return strings.get(); } public static void setStrings(HashMap<String, String> driverref) { strings.set(driverref); } public static void unload() { strings.remove(); } }
[ "rajatvermaa95@gmail.com" ]
rajatvermaa95@gmail.com
a1a8f46e979ff05d442f758d392b05b333a7e2b0
cb26d1677a16d3bf62c34a06869212b2388d462f
/app/src/main/java/video/com/relavideodemo/surface/TestActivity.java
12ffa6e247950d3dd4595ebf844631eb290845f5
[]
no_license
xianchuangwu/RelaVideo
1acd1fb63a7851352bb3e892085d4ca2ae74fdde
6c602679bf772bf926d1ffd7bad3dd7c7f6600b8
refs/heads/master
2021-06-03T14:50:26.583716
2019-12-04T11:46:29
2019-12-04T11:46:29
113,161,711
1
0
null
null
null
null
UTF-8
Java
false
false
892
java
package video.com.relavideodemo.surface; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import com.thel.R; import video.com.relavideolibrary.camera.CameraView; public class TestActivity extends AppCompatActivity { private CameraView cameraView; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_test); cameraView = findViewById(R.id.cameraView); } @Override protected void onResume() { super.onResume(); cameraView.onResume(); } @Override protected void onPause() { super.onPause(); cameraView.onPause(); } @Override protected void onDestroy() { super.onDestroy(); cameraView.onDestroy(); } }
[ "xianchuang.wu@thel.co" ]
xianchuang.wu@thel.co
579cf45efb96d0887bb81339d35de9f4cd96803e
a858f5380a269f96f8d7f0933ce00f49090ff8ae
/ipmi-protocol/src/test/java/org/anarres/ipmi/protocol/packet/ipmi/payload/RmcpPacketIpmiOpenSessionRequestTest.java
f6d330bdf892a76171622f930082f940045d4aff
[ "Apache-2.0" ]
permissive
xtwxy/ipmi4j
c9b95293cf07f992b6e7970cb3b42cb1e1a6f6b9
a860ab515a47a70ee379008a503c9c07e9662348
refs/heads/master
2021-01-22T22:34:37.850996
2017-04-24T02:52:50
2017-04-24T02:52:50
85,554,167
0
0
null
2017-03-20T08:48:28
2017-03-20T08:48:28
null
UTF-8
Java
false
false
3,393
java
package org.anarres.ipmi.protocol.packet.ipmi.payload; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; import java.net.InetSocketAddress; import java.nio.ByteBuffer; import org.anarres.ipmi.protocol.client.session.IpmiPacketContext; import org.anarres.ipmi.protocol.client.session.IpmiSession; import org.anarres.ipmi.protocol.client.session.IpmiSessionManager; import org.anarres.ipmi.protocol.packet.ipmi.Ipmi20SessionWrapper; import org.anarres.ipmi.protocol.packet.ipmi.security.IpmiAuthenticationAlgorithm; import org.anarres.ipmi.protocol.packet.ipmi.security.IpmiConfidentialityAlgorithm; import org.anarres.ipmi.protocol.packet.ipmi.security.IpmiIntegrityAlgorithm; import org.anarres.ipmi.protocol.packet.rmcp.RmcpMessageClass; import org.anarres.ipmi.protocol.packet.rmcp.RmcpMessageRole; import org.anarres.ipmi.protocol.packet.rmcp.RmcpPacket; import org.junit.After; import org.junit.Before; import org.junit.Test; public class RmcpPacketIpmiOpenSessionRequestTest { private static final String host = "192.168.0.69"; private static final int port = 8007; private static final int WIRE_LENGTH = 48; private static final byte[] byteSequence = { 0x06, 0x00, 0x00, 0x07, 0x06, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00 }; private IpmiPacketContext context; @Before public void setUp() throws Exception { context = new IpmiSessionManager(); } @After public void tearDown() throws Exception { } @Test public void testMarshal() throws Exception { RmcpPacket packet = new RmcpPacket(); packet.withSequenceNumber((byte)0); packet.withRemoteAddress(new InetSocketAddress(host, port)); Ipmi20SessionWrapper data = new Ipmi20SessionWrapper(); IpmiSession session = new IpmiSession(0); session.setAuthenticationAlgorithm(IpmiAuthenticationAlgorithm.RAKP_NONE); session.setConfidentialityAlgorithm(IpmiConfidentialityAlgorithm.NONE); session.setIntegrityAlgorithm(IpmiIntegrityAlgorithm.NONE); data.setIpmiPayload( new IpmiOpenSessionRequest( session, RequestedMaximumPrivilegeLevel.ADMINISTRATOR ) ); data.setIpmiSessionId(0); data.setIpmiSessionSequenceNumber(0); data.setEncrypted(false); packet.withData(data); final int wireLength = packet.getWireLength(context); assertEquals(WIRE_LENGTH, wireLength); ByteBuffer buf = ByteBuffer.allocate(wireLength); packet.toWire(context, buf); buf.flip(); assertArrayEquals(byteSequence, buf.array()); } @Test public void testUnmarshal() { RmcpPacket packet = new RmcpPacket(); ByteBuffer buf = ByteBuffer.allocate(WIRE_LENGTH); buf.put(byteSequence); buf.flip(); packet.fromWire(context, buf); assertEquals(0, packet.getSequenceNumber()); assertEquals(RmcpMessageClass.IPMI, packet.getMessageClass()); assertEquals(RmcpMessageRole.REQ, packet.getMessageRole()); assertEquals(IpmiPayloadType.RMCPOpenSessionRequest, ((Ipmi20SessionWrapper)(packet.getData())).getIpmiPayload().getPayloadType()); } }
[ "xtwxy@hotmail.com" ]
xtwxy@hotmail.com
e8caa24b1acf7cbfe0c0f8461b98e77d8e137ea2
dc7f8a5affc388c0c6bbe0a8ab4ed3efe00eb34d
/creational/com/designpattern/abstractfactory/FactoryMaker.java
b0f2e85f3505723adc6fb1f14c164fc4116bc377
[]
no_license
ayushchoukse1/Design-Patterns
5c7776935c2f879ac97619858c256f2c902fe2d2
693742e5ac62fd726fab8787c24152fba38c64f1
refs/heads/master
2021-01-17T17:46:38.970947
2020-03-07T18:46:16
2020-03-07T18:46:16
64,610,853
0
0
null
null
null
null
UTF-8
Java
false
false
311
java
package com.designpattern.abstractfactory; public class FactoryMaker { private static WidgetFactory wf = null; static WidgetFactory getFactory(String choice){ if(choice.equals("windows")){ wf = new WindowsFactory(); }else if(choice.equals("linux")){ wf = new LinuxFactory(); } return wf; } }
[ "ayush.choukse@sjsu.edu" ]
ayush.choukse@sjsu.edu
8e93fd33a1f7fbba4e359f9748ee4a9a412c7879
ad4b8e9922563710d81b109910aa09245f981419
/app/src/main/java/com/example/mtalh/hijinnks/Models/Model_Comments.java
a031e4b1d27868beb50de34a493d5ea8e5d8cb96
[]
no_license
mtalhashafiq/Hijinnks
88b60115cec906549f1e3530baba1ad4d7351365
14ca0060a60e4f7d5869a28e3412760c4d2a18c3
refs/heads/master
2021-09-07T09:52:11.044303
2018-02-21T07:29:52
2018-02-21T07:30:00
111,659,314
0
0
null
null
null
null
UTF-8
Java
false
false
702
java
package com.example.mtalh.hijinnks.Models; public class Model_Comments { public String name; public String Date; public String Comment; public Model_Comments(String name, String date, String comment) { this.name = name; Date = date; Comment = comment; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDate() { return Date; } public void setDate(String date) { Date = date; } public String getComment() { return Comment; } public void setComment(String comment) { Comment = comment; } }
[ "m.talha.shafiq95@github.com" ]
m.talha.shafiq95@github.com
0143a650fe584c28394144ff6cbbbce0d9332c5b
681d8aca436d62ef13eff314b17471d92ba8ad09
/data-plane-api/src/main/java/com/google/api/expr/v1alpha1/SyntaxProto.java
d2f292b7b395c73b50d6f4b9926c75cda55b03cf
[]
no_license
ayeminoosc/java-grpc-ratelimiter
48a34e2f4ef1f74a3eb10715e77e738fd0e7f047
e84c8b3062dbb58cd40b67f5f52cc3f031b16593
refs/heads/master
2023-06-14T23:11:18.337256
2021-07-11T19:34:01
2021-07-11T19:34:01
380,716,276
2
0
null
null
null
null
UTF-8
Java
false
true
16,449
java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/api/expr/v1alpha1/syntax.proto package com.google.api.expr.v1alpha1; public final class SyntaxProto { private SyntaxProto() {} public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { registerAllExtensions( (com.google.protobuf.ExtensionRegistryLite) registry); } static final com.google.protobuf.Descriptors.Descriptor internal_static_google_api_expr_v1alpha1_ParsedExpr_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_api_expr_v1alpha1_ParsedExpr_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_api_expr_v1alpha1_Expr_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_api_expr_v1alpha1_Expr_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_api_expr_v1alpha1_Expr_Ident_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_api_expr_v1alpha1_Expr_Ident_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_api_expr_v1alpha1_Expr_Select_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_api_expr_v1alpha1_Expr_Select_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_api_expr_v1alpha1_Expr_Call_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_api_expr_v1alpha1_Expr_Call_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_api_expr_v1alpha1_Expr_CreateList_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_api_expr_v1alpha1_Expr_CreateList_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_api_expr_v1alpha1_Expr_CreateStruct_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_api_expr_v1alpha1_Expr_CreateStruct_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_api_expr_v1alpha1_Expr_CreateStruct_Entry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_api_expr_v1alpha1_Expr_CreateStruct_Entry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_api_expr_v1alpha1_Expr_Comprehension_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_api_expr_v1alpha1_Expr_Comprehension_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_api_expr_v1alpha1_Constant_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_api_expr_v1alpha1_Constant_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_api_expr_v1alpha1_SourceInfo_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_api_expr_v1alpha1_SourceInfo_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_api_expr_v1alpha1_SourceInfo_PositionsEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_api_expr_v1alpha1_SourceInfo_PositionsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_api_expr_v1alpha1_SourcePosition_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_api_expr_v1alpha1_SourcePosition_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { java.lang.String[] descriptorData = { "\n%google/api/expr/v1alpha1/syntax.proto\022" + "\030google.api.expr.v1alpha1\032\036google/protob" + "uf/duration.proto\032\034google/protobuf/struc" + "t.proto\032\037google/protobuf/timestamp.proto" + "\"u\n\nParsedExpr\022,\n\004expr\030\002 \001(\0132\036.google.ap" + "i.expr.v1alpha1.Expr\0229\n\013source_info\030\003 \001(" + "\0132$.google.api.expr.v1alpha1.SourceInfo\"" + "\305\n\n\004Expr\022\n\n\002id\030\002 \001(\003\0228\n\nconst_expr\030\003 \001(\013" + "2\".google.api.expr.v1alpha1.ConstantH\000\022:" + "\n\nident_expr\030\004 \001(\0132$.google.api.expr.v1a" + "lpha1.Expr.IdentH\000\022<\n\013select_expr\030\005 \001(\0132" + "%.google.api.expr.v1alpha1.Expr.SelectH\000" + "\0228\n\tcall_expr\030\006 \001(\0132#.google.api.expr.v1" + "alpha1.Expr.CallH\000\022>\n\tlist_expr\030\007 \001(\0132)." + "google.api.expr.v1alpha1.Expr.CreateList" + "H\000\022B\n\013struct_expr\030\010 \001(\0132+.google.api.exp" + "r.v1alpha1.Expr.CreateStructH\000\022J\n\022compre" + "hension_expr\030\t \001(\0132,.google.api.expr.v1a" + "lpha1.Expr.ComprehensionH\000\032\025\n\005Ident\022\014\n\004n" + "ame\030\001 \001(\t\032[\n\006Select\022/\n\007operand\030\001 \001(\0132\036.g" + "oogle.api.expr.v1alpha1.Expr\022\r\n\005field\030\002 " + "\001(\t\022\021\n\ttest_only\030\003 \001(\010\032v\n\004Call\022.\n\006target" + "\030\001 \001(\0132\036.google.api.expr.v1alpha1.Expr\022\020" + "\n\010function\030\002 \001(\t\022,\n\004args\030\003 \003(\0132\036.google." + "api.expr.v1alpha1.Expr\032>\n\nCreateList\0220\n\010" + "elements\030\001 \003(\0132\036.google.api.expr.v1alpha" + "1.Expr\032\201\002\n\014CreateStruct\022\024\n\014message_name\030" + "\001 \001(\t\022B\n\007entries\030\002 \003(\01321.google.api.expr" + ".v1alpha1.Expr.CreateStruct.Entry\032\226\001\n\005En" + "try\022\n\n\002id\030\001 \001(\003\022\023\n\tfield_key\030\002 \001(\tH\000\0221\n\007" + "map_key\030\003 \001(\0132\036.google.api.expr.v1alpha1" + ".ExprH\000\022-\n\005value\030\004 \001(\0132\036.google.api.expr" + ".v1alpha1.ExprB\n\n\010key_kind\032\265\002\n\rComprehen" + "sion\022\020\n\010iter_var\030\001 \001(\t\0222\n\niter_range\030\002 \001" + "(\0132\036.google.api.expr.v1alpha1.Expr\022\020\n\010ac" + "cu_var\030\003 \001(\t\0221\n\taccu_init\030\004 \001(\0132\036.google" + ".api.expr.v1alpha1.Expr\0226\n\016loop_conditio" + "n\030\005 \001(\0132\036.google.api.expr.v1alpha1.Expr\022" + "1\n\tloop_step\030\006 \001(\0132\036.google.api.expr.v1a" + "lpha1.Expr\022.\n\006result\030\007 \001(\0132\036.google.api." + "expr.v1alpha1.ExprB\013\n\texpr_kind\"\315\002\n\010Cons" + "tant\0220\n\nnull_value\030\001 \001(\0162\032.google.protob" + "uf.NullValueH\000\022\024\n\nbool_value\030\002 \001(\010H\000\022\025\n\013" + "int64_value\030\003 \001(\003H\000\022\026\n\014uint64_value\030\004 \001(" + "\004H\000\022\026\n\014double_value\030\005 \001(\001H\000\022\026\n\014string_va" + "lue\030\006 \001(\tH\000\022\025\n\013bytes_value\030\007 \001(\014H\000\0227\n\016du" + "ration_value\030\010 \001(\0132\031.google.protobuf.Dur" + "ationB\002\030\001H\000\0229\n\017timestamp_value\030\t \001(\0132\032.g" + "oogle.protobuf.TimestampB\002\030\001H\000B\017\n\rconsta" + "nt_kind\"\344\002\n\nSourceInfo\022\026\n\016syntax_version" + "\030\001 \001(\t\022\020\n\010location\030\002 \001(\t\022\024\n\014line_offsets" + "\030\003 \003(\005\022F\n\tpositions\030\004 \003(\01323.google.api.e" + "xpr.v1alpha1.SourceInfo.PositionsEntry\022I" + "\n\013macro_calls\030\005 \003(\01324.google.api.expr.v1" + "alpha1.SourceInfo.MacroCallsEntry\0320\n\016Pos" + "itionsEntry\022\013\n\003key\030\001 \001(\003\022\r\n\005value\030\002 \001(\005:" + "\0028\001\032Q\n\017MacroCallsEntry\022\013\n\003key\030\001 \001(\003\022-\n\005v" + "alue\030\002 \001(\0132\036.google.api.expr.v1alpha1.Ex" + "pr:\0028\001\"P\n\016SourcePosition\022\020\n\010location\030\001 \001" + "(\t\022\016\n\006offset\030\002 \001(\005\022\014\n\004line\030\003 \001(\005\022\016\n\006colu" + "mn\030\004 \001(\005Bn\n\034com.google.api.expr.v1alpha1" + "B\013SyntaxProtoP\001Z<google.golang.org/genpr" + "oto/googleapis/api/expr/v1alpha1;expr\370\001\001" + "b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); internal_static_google_api_expr_v1alpha1_ParsedExpr_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_google_api_expr_v1alpha1_ParsedExpr_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_api_expr_v1alpha1_ParsedExpr_descriptor, new java.lang.String[] { "Expr", "SourceInfo", }); internal_static_google_api_expr_v1alpha1_Expr_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_google_api_expr_v1alpha1_Expr_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_api_expr_v1alpha1_Expr_descriptor, new java.lang.String[] { "Id", "ConstExpr", "IdentExpr", "SelectExpr", "CallExpr", "ListExpr", "StructExpr", "ComprehensionExpr", "ExprKind", }); internal_static_google_api_expr_v1alpha1_Expr_Ident_descriptor = internal_static_google_api_expr_v1alpha1_Expr_descriptor.getNestedTypes().get(0); internal_static_google_api_expr_v1alpha1_Expr_Ident_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_api_expr_v1alpha1_Expr_Ident_descriptor, new java.lang.String[] { "Name", }); internal_static_google_api_expr_v1alpha1_Expr_Select_descriptor = internal_static_google_api_expr_v1alpha1_Expr_descriptor.getNestedTypes().get(1); internal_static_google_api_expr_v1alpha1_Expr_Select_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_api_expr_v1alpha1_Expr_Select_descriptor, new java.lang.String[] { "Operand", "Field", "TestOnly", }); internal_static_google_api_expr_v1alpha1_Expr_Call_descriptor = internal_static_google_api_expr_v1alpha1_Expr_descriptor.getNestedTypes().get(2); internal_static_google_api_expr_v1alpha1_Expr_Call_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_api_expr_v1alpha1_Expr_Call_descriptor, new java.lang.String[] { "Target", "Function", "Args", }); internal_static_google_api_expr_v1alpha1_Expr_CreateList_descriptor = internal_static_google_api_expr_v1alpha1_Expr_descriptor.getNestedTypes().get(3); internal_static_google_api_expr_v1alpha1_Expr_CreateList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_api_expr_v1alpha1_Expr_CreateList_descriptor, new java.lang.String[] { "Elements", }); internal_static_google_api_expr_v1alpha1_Expr_CreateStruct_descriptor = internal_static_google_api_expr_v1alpha1_Expr_descriptor.getNestedTypes().get(4); internal_static_google_api_expr_v1alpha1_Expr_CreateStruct_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_api_expr_v1alpha1_Expr_CreateStruct_descriptor, new java.lang.String[] { "MessageName", "Entries", }); internal_static_google_api_expr_v1alpha1_Expr_CreateStruct_Entry_descriptor = internal_static_google_api_expr_v1alpha1_Expr_CreateStruct_descriptor.getNestedTypes().get(0); internal_static_google_api_expr_v1alpha1_Expr_CreateStruct_Entry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_api_expr_v1alpha1_Expr_CreateStruct_Entry_descriptor, new java.lang.String[] { "Id", "FieldKey", "MapKey", "Value", "KeyKind", }); internal_static_google_api_expr_v1alpha1_Expr_Comprehension_descriptor = internal_static_google_api_expr_v1alpha1_Expr_descriptor.getNestedTypes().get(5); internal_static_google_api_expr_v1alpha1_Expr_Comprehension_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_api_expr_v1alpha1_Expr_Comprehension_descriptor, new java.lang.String[] { "IterVar", "IterRange", "AccuVar", "AccuInit", "LoopCondition", "LoopStep", "Result", }); internal_static_google_api_expr_v1alpha1_Constant_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_google_api_expr_v1alpha1_Constant_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_api_expr_v1alpha1_Constant_descriptor, new java.lang.String[] { "NullValue", "BoolValue", "Int64Value", "Uint64Value", "DoubleValue", "StringValue", "BytesValue", "DurationValue", "TimestampValue", "ConstantKind", }); internal_static_google_api_expr_v1alpha1_SourceInfo_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_google_api_expr_v1alpha1_SourceInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_api_expr_v1alpha1_SourceInfo_descriptor, new java.lang.String[] { "SyntaxVersion", "Location", "LineOffsets", "Positions", "MacroCalls", }); internal_static_google_api_expr_v1alpha1_SourceInfo_PositionsEntry_descriptor = internal_static_google_api_expr_v1alpha1_SourceInfo_descriptor.getNestedTypes().get(0); internal_static_google_api_expr_v1alpha1_SourceInfo_PositionsEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_api_expr_v1alpha1_SourceInfo_PositionsEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry_descriptor = internal_static_google_api_expr_v1alpha1_SourceInfo_descriptor.getNestedTypes().get(1); internal_static_google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_google_api_expr_v1alpha1_SourcePosition_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_google_api_expr_v1alpha1_SourcePosition_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_api_expr_v1alpha1_SourcePosition_descriptor, new java.lang.String[] { "Location", "Offset", "Line", "Column", }); com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) }
[ "ayeminoosc@gmail.com" ]
ayeminoosc@gmail.com
f03a2b5b0f8202b4b1062dbc64707c2d41dd4c92
a3c4e6b2a0b690ba8142d5f0b6eaca50c15d1b17
/Session 4 - CI5/src/controllers/CollsionPool.java
603c43e57f2d2ea9733738589192fe2bdd45ccca
[]
no_license
phungthanh172/PhungThanh-PiKa-CI5
e3487948dc6a3ab1e5b58ce43b0d5c8a0aea554b
3cc68d77c6a03c6d01809c56234d3c8c68926093
refs/heads/master
2020-04-06T07:07:32.026064
2016-09-10T16:07:45
2016-09-10T16:07:45
64,209,647
1
0
null
null
null
null
UTF-8
Java
false
false
1,488
java
package controllers; import models.GameObject; import java.awt.*; import java.util.Iterator; import java.util.Vector; /** * Created by KhacThanh on 8/3/2016. */ public class CollsionPool implements iBaseController { Vector<iColliable> colliableVector; private CollsionPool() { colliableVector = new Vector<>(); } public void add(iColliable colliable) { this.colliableVector.add(colliable); } public int size() { return colliableVector.size(); } @Override public void draw(Graphics g) { } @Override public void run() { for (int i = 0; i < colliableVector.size() - 1; i++) { for (int j = i + 1; j < colliableVector.size(); j++) { iColliable ci = colliableVector.get(i); iColliable cj = colliableVector.get(j); GameObject gi = ci.getGameObject(); GameObject gj = cj.getGameObject(); if (gi.overlap(gj)) { ci.onCollide(cj); cj.onCollide(ci); } } } Iterator<iColliable> colliableIterator = colliableVector.iterator(); while (colliableIterator.hasNext()) { iColliable colliable = colliableIterator.next(); if (!colliable.getGameObject().isAlive()) { colliableIterator.remove(); } } } public static final CollsionPool instance = new CollsionPool(); }
[ "phungthanh172@gmail.com" ]
phungthanh172@gmail.com
43967e600ef9641ec0dac0d80fddad48ee853701
8435787e0d819ff20bb84486facb03be28118696
/src/main/java/br/com/touros/punterbot/api/scrapper/estatisticas/gol/periodo/PrimeiroTempoGolsEstatistica.java
a5b9de2fcc66bdbf23f1e44fc0b4eccef9b6af55
[]
no_license
romeubessadev/api-punterbot
ee43e524b5ac2052c84a13f1a2881457be3d1fcb
7629df45553d5992170c900f16846a2e4d6c2a70
refs/heads/master
2023-03-17T05:37:28.031912
2021-03-09T20:38:16
2021-03-09T20:38:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
551
java
package br.com.touros.punterbot.api.scrapper.estatisticas.gol.periodo; import br.com.touros.punterbot.api.scrapper.estatisticas.interfaces.gol.IGolEstatistica; public class PrimeiroTempoGolsEstatistica implements IGolEstatistica { @Override public Integer minutoMaximo() { return 45; } @Override public Integer minutoMinimo() { return 0; } @Override public String nome() { return "Gols Média 1 Tempo"; } @Override public String chave() { return "GOL_1_TEMPO"; } }
[ "=" ]
=
4df71c615179d236254bc8f6f004e8c0e914bf32
028b7527646e070d7dca254e17fdce6e5cd318e3
/pratice/src/com/jbk/StatiMethod_Demo.java
2016f16a4e0b4d995fc42c36e750241a0512c96d
[]
no_license
Diyu2806/jbk
3c5ce500db8f6525c3b51ee57115a0904adeca85
9ba500d0f642c4ab38ae2d560b6ebbd673dd80f0
refs/heads/master
2020-04-30T00:08:08.257990
2019-03-19T11:40:52
2019-03-19T11:40:52
176,495,493
0
0
null
null
null
null
UTF-8
Java
false
false
343
java
package com.jbk; public class StatiMethod_Demo { public static void copyArg(String str1,String str2) { str2=str1; System.out.println("First String arg is:"+str1); System.out.println("Second String arg is:"+str2); } public static void main(String[] args) { StatiMethod_Demo.copyArg("PQR","DEF"); copyArg("XYZ","ABC"); } }
[ "Divya@DESKTOP-6CH5CBA" ]
Divya@DESKTOP-6CH5CBA
1a6761a2c8ab4b5223a17fab60ad0f32a75983f3
d3c873bbdd336cd836b6a3be290f0bdf9f152c7c
/CRMA/src/main/java/com/scott/crm/domain/Customer.java
467c27729023623d2f73dc5809b69daaa228f861
[]
no_license
ScottChowZ/Bos
e52bbbbf0ef460d5d8a4cdd50db00b545feee20f
65ed0e61d92c145ceb0425de7e16efa595f4687a
refs/heads/master
2021-04-06T00:53:34.574795
2018-04-01T08:55:04
2018-04-01T08:55:04
124,731,084
0
0
null
null
null
null
UTF-8
Java
false
false
3,634
java
package com.scott.crm.domain; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; import javax.xml.bind.annotation.XmlRootElement; /** * @description:客户信息表 * */ @Entity @Table(name = "T_CUSTOMER") @XmlRootElement(name="customer") public class Customer { @Id @GeneratedValue() @Column(name = "C_ID") private Long id; // 主键id @Column(name = "C_USERNAME") private String username; // 用户名 @Column(name = "C_PASSWORD") private String password; // 密码 @Column(name = "C_TYPE") private Integer type; // 类型 @Column(name = "C_BRITHDAY") @Temporal(TemporalType.DATE) private Date birthday; // 生日 @Column(name = "C_SEX") private Integer sex; // 性别 @Column(name = "C_TELEPHONE") private String telephone; // 手机 @Column(name = "C_COMPANY") private String company; // 公司 @Column(name = "C_DEPARTMENT") private String department; // 部门 @Column(name = "C_POSITION") private String position; // 职位 @Column(name = "C_ADDRESS") private String address; // 地址 @Column(name = "C_MOBILEPHONE") private String mobilePhone; // 座机 @Column(name = "C_EMAIL") private String email; // 邮箱 @Column(name = "C_Fixed_AREA_ID") private String fixedAreaId; // 定区编码 public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public Integer getType() { return type; } public void setType(Integer type) { this.type = type; } public Date getBirthday() { return birthday; } public void setBirthday(Date birthday) { this.birthday = birthday; } public Integer getSex() { return sex; } public void setSex(Integer sex) { this.sex = sex; } public String getTelephone() { return telephone; } public void setTelephone(String telephone) { this.telephone = telephone; } public String getCompany() { return company; } public void setCompany(String company) { this.company = company; } public String getDepartment() { return department; } public void setDepartment(String department) { this.department = department; } public String getPosition() { return position; } public void setPosition(String position) { this.position = position; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public String getMobilePhone() { return mobilePhone; } public void setMobilePhone(String mobilePhone) { this.mobilePhone = mobilePhone; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getFixedAreaId() { return fixedAreaId; } public void setFixedAreaId(String fixedAreaId) { this.fixedAreaId = fixedAreaId; } }
[ "1014261476@qq.com" ]
1014261476@qq.com
a4a4be6f34e01a174138c541ea9c374899ebc9d5
da0ef5e631392b3a706b6ca82debe0b81a80fcbb
/app/src/main/java/com/hivee2/widget/pullableview/PullableGridView.java
04de96211181e0a2cc8f0903a86893997f921766
[]
no_license
shanghaif/Hive2
069a275276a9e82defc26844fb10017b096e52db
1556286481a5dffe8bc80b905ef7762e0f6f0655
refs/heads/master
2022-01-05T10:47:45.273086
2019-04-26T09:25:36
2019-04-26T09:25:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,241
java
package com.hivee2.widget.pullableview; import android.content.Context; import android.util.AttributeSet; import android.widget.GridView; public class PullableGridView extends GridView implements Pullable { public PullableGridView(Context context) { super(context); } public PullableGridView(Context context, AttributeSet attrs) { super(context, attrs); } public PullableGridView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } @Override public boolean canPullDown() { if (getCount() == 0) { // 没有item的时候也可以下拉刷新 return true; } else if (getFirstVisiblePosition() == 0 && getChildAt(0).getTop() >= 0) { // 滑到顶部了 return true; } else return false; } @Override public boolean canPullUp() { if (getCount() == 0) { // 没有item的时候也可以上拉加载 return true; } else if (getLastVisiblePosition() == (getCount() - 1)) { // 滑到底部了 if (getChildAt(getLastVisiblePosition() - getFirstVisiblePosition()) != null && getChildAt( getLastVisiblePosition() - getFirstVisiblePosition()).getBottom() <= getMeasuredHeight()) return true; } return false; } }
[ "1312667058@qq.com" ]
1312667058@qq.com
ac685eebd23349f04d58aa3c37cf7fcc4b1c591c
7634efe6d102da2e70eb91d4389e46aa1fb71e50
/app/src/main/java/com/secure/letschat/Models/User.java
858d8ce75cca982bd899fa0bfaae97f5acde0311
[]
no_license
SatyamSoni23/Lets-Chat
4073657d50130eb77845f890163a4e50ab0c154f
701450822ba2fa86a16109a99897a71f65b35334
refs/heads/master
2023-04-21T00:58:59.264172
2021-05-22T20:35:32
2021-05-22T20:35:32
260,138,863
4
1
null
null
null
null
UTF-8
Java
false
false
556
java
package com.secure.letschat.Models; import com.stfalcon.chatkit.commons.models.IUser; public class User implements IUser { public String id; public String name; public String avatar; public User(String id, String name, String avatar) { this.id = id; this.name = name; this.avatar = avatar; } @Override public String getId() { return id; } @Override public String getName() { return name; } @Override public String getAvatar() { return null; } }
[ "2018kucp1121@iiitkota.ac.in" ]
2018kucp1121@iiitkota.ac.in
00beb19b0d6856ad9df43027edf18912f08d093e
df72e56f61b1e6f68e57960e0f4ed52c2b27238f
/code/com/jivesoftware/os/tasmo/tasmo-reference-lib/src/main/java/com/jivesoftware/os/tasmo/reference/lib/B_IdsStreamer.java
e1c3c253d5431a6f9d8e39827ebc8b2e9fbb440f
[ "Apache-2.0" ]
permissive
pmatern/tasmo
50af1f43af6779cc3eb2d8ea5157669a4da7b3b3
828583d7db573098de945206ec365291050d6d92
refs/heads/master
2021-01-18T02:07:24.169510
2014-01-22T16:40:02
2014-01-22T16:40:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
945
java
/* * $Revision$ * $Date$ * * Copyright (C) 1999-$year$ Jive Software. All rights reserved. * * This software is the proprietary information of Jive Software. Use is subject to license terms. */ package com.jivesoftware.os.tasmo.reference.lib; import com.jivesoftware.os.jive.utils.base.interfaces.CallbackStream; import com.jivesoftware.os.tasmo.id.TenantIdAndCentricId; import java.util.Collections; /** * */ public class B_IdsStreamer extends BaseRefStreamer { public B_IdsStreamer(ReferenceStore referenceStore, String referringFieldName) { super(referenceStore, Collections.<String>emptySet(), referringFieldName); } @Override public void stream(TenantIdAndCentricId tenantIdAndCentricId, Reference aId, final CallbackStream<Reference> bdIdsStream) throws Exception { referenceStore.get_bIds(tenantIdAndCentricId, aId.getObjectId().getClassName(), referringFieldName, aId, bdIdsStream); } }
[ "jonathan.colt@jivesoftware.com" ]
jonathan.colt@jivesoftware.com
38597b718023bb52111553ec9354109d5a9e5f1f
39a707b2e598a987f3dbadc9cb30e3d839db5213
/CZJW_SQ/src/main/java/com/alphasta/model/SysParam.java
7b7c0145e2afc82117cb87f92539eab841088d91
[ "Apache-2.0" ]
permissive
cxl20171104/Project
5e77f112916359265722e2a69d835ec835a31e47
105e80f8df7ea80b6015d5d23e843b6a5c2739a0
refs/heads/master
2022-12-25T14:21:47.652377
2020-03-04T09:20:06
2020-03-04T09:20:06
244,593,729
0
0
Apache-2.0
2022-12-16T08:01:09
2020-03-03T09:26:45
JavaScript
UTF-8
Java
false
false
869
java
package com.alphasta.model; import java.io.Serializable; /** * 系统参数 * * @author LiYunhao * */ public class SysParam implements Serializable { private static final long serialVersionUID = -1723785871249514149L; private Long id; private String name; private String key; private String value; private String remark; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getKey() { return key; } public void setKey(String key) { this.key = key; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } }
[ "1290973212@qq.com" ]
1290973212@qq.com
3075d14c302d2f8147f5119fb121eee69e2a5597
f0793fc4c139347c5cbc60318bf4f0e194edd48a
/WeixinFoMiteno/src/com/cn/weixin/common/WXBizMsgCrypt.java
94382b1269ec12f16360e2fd03a924592b726ee7
[]
no_license
cuixiaowei1991/wechat-open-api
774878c0290e626b9a2542ee2f70540d0f7bdb6f
39fab3f1ba2a581855061ecb5159ac9204cf048a
refs/heads/master
2021-01-22T13:23:57.104009
2017-08-18T02:02:01
2017-08-18T02:02:01
100,662,374
0
0
null
null
null
null
UTF-8
Java
false
false
12,140
java
/** * 对公众平台发送给公众账号的消息加解密示例代码. * * @copyright Copyright (c) 1998-2014 Tencent Inc. */ // ------------------------------------------------------------------------ /** * 针对org.apache.commons.codec.binary.Base64, * 需要导入架包commons-codec-1.9(或commons-codec-1.8等其他版本) * 官方下载地址:http://commons.apache.org/proper/commons-codec/download_codec.cgi */ package com.cn.weixin.common; import java.io.UnsupportedEncodingException; import java.nio.charset.Charset; import java.util.Arrays; import java.util.Random; import javax.crypto.Cipher; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.SecretKeySpec; import com.qq.weixin.mp.aes.*; /*import com.qq.weixin.mp.aes.PKCS7Encoder; import com.qq.weixin.mp.aes.SHA1; import com.qq.weixin.mp.aes.XMLParse;*/ import org.apache.commons.codec.binary.Base64; /** * 提供接收和推送给公众平台消息的加解密接口(UTF8编码的字符串). * <ol> * <li>第三方回复加密消息给公众平台</li> * <li>第三方收到公众平台发送的消息,验证消息的安全性,并对消息进行解密。</li> * </ol> * 说明:异常java.security.InvalidKeyException:illegal Key Size的解决方案 * <ol> * <li>在官方网站下载JCE无限制权限策略文件(JDK7的下载地址: * http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html</li> * <li>下载后解压,可以看到local_policy.jar和US_export_policy.jar以及readme.txt</li> * <li>如果安装了JRE,将两个jar文件放到%JRE_HOME%\lib\security目录下覆盖原来的文件</li> * <li>如果安装了JDK,将两个jar文件放到%JDK_HOME%\jre\lib\security目录下覆盖原来文件</li> * </ol> */ public class WXBizMsgCrypt { static Charset CHARSET = Charset.forName("utf-8"); Base64 base64 = new Base64(); byte[] aesKey; String token; String appId; /** * 构造函数 * @param token 公众平台上,开发者设置的token * @param encodingAesKey 公众平台上,开发者设置的EncodingAESKey * @param appId 公众平台appid * * @throws com.qq.weixin.mp.aes.AesException 执行失败,请查看该异常的错误码和具体的错误信息 */ public WXBizMsgCrypt(String token, String encodingAesKey, String appId) throws com.qq.weixin.mp.aes.AesException, AesException { try { if(encodingAesKey.equals( new String(encodingAesKey.getBytes("iso-8859-1"), "iso-8859-1"))) { String aa = new String(encodingAesKey.getBytes("iso-8859-1"), "UTF-8"); System.out.println("iso--------------->"+aa); //logger.debug("BusinessService------转码之后——————————jsonStr:" + jsonStr); } if(encodingAesKey.equals( new String(encodingAesKey.getBytes("GBK"), "GBK"))) { encodingAesKey = new String(encodingAesKey.getBytes("GBK"), "UTF-8"); System.out.println("GBK--------------->"+encodingAesKey); //logger.debug("BusinessService------转码之后——————————jsonStr:" + jsonStr); } } catch (UnsupportedEncodingException e) { e.printStackTrace(); } int aa=encodingAesKey.length(); System.out.println("key的长度------------"+aa); System.out.println("key------------"+encodingAesKey); if (encodingAesKey.length() != 43) { throw new com.cn.weixin.common.AesException(com.qq.weixin.mp.aes.AesException.IllegalAesKey); } this.token = token; this.appId = appId; aesKey = Base64.decodeBase64(encodingAesKey + "="); } // 生成4个字节的网络字节序 byte[] getNetworkBytesOrder(int sourceNumber) { byte[] orderBytes = new byte[4]; orderBytes[3] = (byte) (sourceNumber & 0xFF); orderBytes[2] = (byte) (sourceNumber >> 8 & 0xFF); orderBytes[1] = (byte) (sourceNumber >> 16 & 0xFF); orderBytes[0] = (byte) (sourceNumber >> 24 & 0xFF); return orderBytes; } // 还原4个字节的网络字节序 int recoverNetworkBytesOrder(byte[] orderBytes) { int sourceNumber = 0; for (int i = 0; i < 4; i++) { sourceNumber <<= 8; sourceNumber |= orderBytes[i] & 0xff; } return sourceNumber; } // 随机生成16位字符串 String getRandomStr() { String base = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; Random random = new Random(); StringBuffer sb = new StringBuffer(); for (int i = 0; i < 16; i++) { int number = random.nextInt(base.length()); sb.append(base.charAt(number)); } return sb.toString(); } /** * 对明文进行加密. * * @param text 需要加密的明文 * @return 加密后base64编码的字符串 * @throws com.qq.weixin.mp.aes.AesException aes加密失败 */ String encrypt(String randomStr, String text) throws com.qq.weixin.mp.aes.AesException, AesException { com.cn.weixin.common.ByteGroup byteCollector = new com.cn.weixin.common.ByteGroup(); byte[] randomStrBytes = randomStr.getBytes(CHARSET); byte[] textBytes = text.getBytes(CHARSET); byte[] networkBytesOrder = getNetworkBytesOrder(textBytes.length); byte[] appidBytes = appId.getBytes(CHARSET); // randomStr + networkBytesOrder + text + appid byteCollector.addBytes(randomStrBytes); byteCollector.addBytes(networkBytesOrder); byteCollector.addBytes(textBytes); byteCollector.addBytes(appidBytes); // ... + pad: 使用自定义的填充方式对明文进行补位填充 byte[] padBytes = com.cn.weixin.common.PKCS7Encoder.encode(byteCollector.size()); byteCollector.addBytes(padBytes); // 获得最终的字节流, 未加密 byte[] unencrypted = byteCollector.toBytes(); try { // 设置加密模式为AES的CBC模式 Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding"); SecretKeySpec keySpec = new SecretKeySpec(aesKey, "AES"); IvParameterSpec iv = new IvParameterSpec(aesKey, 0, 16); cipher.init(Cipher.ENCRYPT_MODE, keySpec, iv); // 加密 byte[] encrypted = cipher.doFinal(unencrypted); // 使用BASE64对加密后的字符串进行编码 String base64Encrypted = base64.encodeToString(encrypted); return base64Encrypted; } catch (Exception e) { e.printStackTrace(); throw new com.cn.weixin.common.AesException(com.qq.weixin.mp.aes.AesException.EncryptAESError); } } /** * 对密文进行解密. * * @param text 需要解密的密文 * @return 解密得到的明文 * @throws com.qq.weixin.mp.aes.AesException aes解密失败 */ String decrypt(String text) throws com.qq.weixin.mp.aes.AesException, AesException { byte[] original; try { // 设置解密模式为AES的CBC模式 Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding"); SecretKeySpec key_spec = new SecretKeySpec(aesKey, "AES"); System.out.println("aesKey-------------------------->"+aesKey); System.out.println("key_spec-------------------------->"+key_spec); IvParameterSpec iv = new IvParameterSpec(Arrays.copyOfRange(aesKey, 0, 16)); cipher.init(Cipher.DECRYPT_MODE, key_spec, iv); // 使用BASE64对密文进行解码 byte[] encrypted = Base64.decodeBase64(text); // 解密 original = cipher.doFinal(encrypted); } catch (Exception e) { e.printStackTrace(); throw new com.cn.weixin.common.AesException(com.qq.weixin.mp.aes.AesException.DecryptAESError); } String xmlContent, from_appid; try { // 去除补位字符 byte[] bytes = com.cn.weixin.common.PKCS7Encoder.decode(original); // 分离16位随机字符串,网络字节序和AppId byte[] networkOrder = Arrays.copyOfRange(bytes, 16, 20); int xmlLength = recoverNetworkBytesOrder(networkOrder); xmlContent = new String(Arrays.copyOfRange(bytes, 20, 20 + xmlLength), CHARSET); from_appid = new String(Arrays.copyOfRange(bytes, 20 + xmlLength, bytes.length), CHARSET); } catch (Exception e) { e.printStackTrace(); throw new com.cn.weixin.common.AesException(com.qq.weixin.mp.aes.AesException.IllegalBuffer); } // appid不相同的情况 if (!from_appid.equals(appId)) { throw new com.cn.weixin.common.AesException(com.qq.weixin.mp.aes.AesException.ValidateAppidError); } return xmlContent; } /** * 将公众平台回复用户的消息加密打包. * <ol> * <li>对要发送的消息进行AES-CBC加密</li> * <li>生成安全签名</li> * <li>将消息密文和安全签名打包成xml格式</li> * </ol> * * @param replyMsg 公众平台待回复用户的消息,xml格式的字符串 * @param timeStamp 时间戳,可以自己生成,也可以用URL参数的timestamp * @param nonce 随机串,可以自己生成,也可以用URL参数的nonce * * @return 加密后的可以直接回复用户的密文,包括msg_signature, timestamp, nonce, encrypt的xml格式的字符串 * @throws com.qq.weixin.mp.aes.AesException 执行失败,请查看该异常的错误码和具体的错误信息 */ public String encryptMsg(String replyMsg, String timeStamp, String nonce) throws com.qq.weixin.mp.aes.AesException, AesException { // 加密 String encrypt = encrypt(getRandomStr(), replyMsg); // 生成安全签名 if (timeStamp == "") { timeStamp = Long.toString(System.currentTimeMillis()); } String signature = com.cn.weixin.common.SHA1.getSHA1(token, timeStamp, nonce, encrypt); // System.out.println("发送给平台的签名是: " + signature[1].toString()); // 生成发送的xml String result = com.cn.weixin.common.XMLParse.generate(encrypt, signature, timeStamp, nonce); return result; } /** * 检验消息的真实性,并且获取解密后的明文. * <ol> * <li>利用收到的密文生成安全签名,进行签名验证</li> * <li>若验证通过,则提取xml中的加密消息</li> * <li>对消息进行解密</li> * </ol> * * @param msgSignature 签名串,对应URL参数的msg_signature * @param timeStamp 时间戳,对应URL参数的timestamp * @param nonce 随机串,对应URL参数的nonce * @param postData 密文,对应POST请求的数据 * * @return 解密后的原文 * @throws com.qq.weixin.mp.aes.AesException 执行失败,请查看该异常的错误码和具体的错误信息 */ public String decryptMsg(String msgSignature, String timeStamp, String nonce, String postData) throws com.qq.weixin.mp.aes.AesException, AesException { // 密钥,公众账号的app secret // 提取密文 Object[] encrypt = com.cn.weixin.common.XMLParse.extract(postData); // 验证安全签名 String signature = com.cn.weixin.common.SHA1.getSHA1(token, timeStamp, nonce, encrypt[1].toString()); // 和URL中的签名比较是否相等 // System.out.println("第三方收到URL中的签名:" + msg_sign); // System.out.println("第三方校验签名:" + signature); if (!signature.equals(msgSignature)) { throw new com.cn.weixin.common.AesException(com.qq.weixin.mp.aes.AesException.ValidateSignatureError); } // 解密 String result = decrypt(encrypt[1].toString()); return result; } /** * 验证URL * @param msgSignature 签名串,对应URL参数的msg_signature * @param timeStamp 时间戳,对应URL参数的timestamp * @param nonce 随机串,对应URL参数的nonce * @param echoStr 随机串,对应URL参数的echostr * * @return 解密之后的echostr * @throws com.qq.weixin.mp.aes.AesException 执行失败,请查看该异常的错误码和具体的错误信息 */ public String verifyUrl(String msgSignature, String timeStamp, String nonce, String echoStr) throws com.qq.weixin.mp.aes.AesException, AesException { String signature = com.cn.weixin.common.SHA1.getSHA1(token, timeStamp, nonce, echoStr); if (!signature.equals(msgSignature)) { throw new com.cn.weixin.common.AesException(AesException.ValidateSignatureError); } String result = decrypt(echoStr); return result; } }
[ "cui.xiaowei@miteno.com" ]
cui.xiaowei@miteno.com
18ecdfe92c7cb4f9c0ccc9e42a10c1aaa09636f9
44c49d3ddaa3344f9a78c758752d96fb77180175
/src/main/java/com/luban/demo13/Container5.java
f0767f37cdec66b11e051e843f097e269a55bfdd
[]
no_license
booleanlikai/testlikai
f32a8cd3f5f5128801db1cc2d2d76d91b360923c
54a0262a63cb5186327e61e724af680bee6d20bb
refs/heads/master
2022-12-22T23:13:14.360250
2019-12-13T09:07:28
2019-12-13T09:07:28
196,120,122
0
0
null
2022-12-16T08:02:40
2019-07-10T02:57:57
Java
UTF-8
Java
false
false
1,563
java
package com.luban.demo13; import java.util.ArrayList; import java.util.List; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; /** * 一道面试题:实现一个容器,提供两个方法,add,size * 写两个线程,线程1添加10个元素到容器中,线程2实现监控元素的个数,当个数到5个时,线程2给出提示并结束 * latch(门闩) */ public class Container5 { volatile List lists = new ArrayList(); public void add(Object o){ lists.add(o); } public int size(){ return lists.size(); } public static void main(String[] args) { Container5 c = new Container5(); CountDownLatch latch = new CountDownLatch(5); new Thread(()->{ System.out.println("t2启动"); if (c.size() != 5) { try { latch.await();//准备 } catch (Exception e) { e.printStackTrace(); } System.out.println("t2结束"); } }," t2").start(); new Thread(()->{ System.out.println("t1启动"); for (int i = 0; i < 10; i++) { c.add(new Object()); System.out.println("add " + i); if (c.size() == 5) { } try { TimeUnit.SECONDS.sleep(1); } catch (Exception e) { e.printStackTrace(); } } }, "t1").start(); } }
[ "aa" ]
aa
ba893f5fdd30903f2f07cfe2537c6ec53aafcbce
798bb53adeb2f028b5734f5ff537e77204a0aa6c
/oysterhut-db/src/main/java/com/memuli/oysterhutdb/bo/Booking.java
9e7cd0e5f7c45ca2395acd604929e74dc514f2b2
[]
no_license
xxwygj3/oysterhut
881d3faa65c26254251d38a0881cc4db7573c1d8
f504cb9d9f9689965cb2043359e4c4ff7289a17a
refs/heads/master
2021-01-24T10:27:14.354910
2018-03-31T17:20:01
2018-03-31T17:20:01
123,052,413
0
0
null
null
null
null
UTF-8
Java
false
false
1,860
java
package com.memuli.oysterhutdb.bo; import com.memuli.oysterhutcommon.BaseEntity; /* 消息通知表 */ public class Booking extends BaseEntity { private static final long serialVersionUID = 1L; /** 预约ID **/ private Integer bookId; /** 预约产品类型1 利融宝、2 利保宝、3 利担保 **/ private String prdType; /** 预约人手机号 **/ private String bookMobile; /** 所在城市 **/ private String city; /** 预约公司 **/ private Integer bookCompany; /** 预约日期 **/ private String bookDate; /** 预约时间 **/ private String bookTime; /** 客户编号 **/ private String cusCode; /** 用户名 **/ private String userName; public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getCusCode() { return cusCode; } public void setCusCode(String cusCode) { this.cusCode = cusCode; } public Booking() { } public Integer getBookId() { return bookId; } public void setBookId(Integer bookId) { this.bookId = bookId; } public String getPrdType() { return prdType; } public void setPrdType(String prdType) { this.prdType = prdType; } public String getBookMobile() { return bookMobile; } public void setBookMobile(String bookMobile) { this.bookMobile = bookMobile; } public String getCity() { return city; } public void setCity(String city) { this.city = city; } public Integer getBookCompany() { return bookCompany; } public void setBookCompany(Integer bookCompany) { this.bookCompany = bookCompany; } public String getBookDate() { return bookDate; } public void setBookDate(String bookDate) { this.bookDate = bookDate; } public String getBookTime() { return bookTime; } public void setBookTime(String bookTime) { this.bookTime = bookTime; } }
[ "gangjie.ye@joinwe.com.cn" ]
gangjie.ye@joinwe.com.cn
e92e829523be83bdbf85d3b06177067169f58eb5
6978130a51bd32f499f5e759c9ea290d02a538bb
/core/src/main/java/de/upb/soot/jimple/interpreter/InterpretException.java
addfe618df421c248cbe5d5a743fa80af025d1a0
[ "Apache-2.0" ]
permissive
secure-software-engineering/Jimple-Interpreter
ed4089c141327f9e8031c94c83742e1ea6d2d0be
269d54a94f0f1ea0f99b08e4539aa6047f3dcb04
refs/heads/develop
2021-06-03T03:27:13.586562
2019-08-05T11:33:03
2019-08-05T11:33:03
138,055,593
12
2
Apache-2.0
2021-03-31T19:22:12
2018-06-20T16:00:44
Java
UTF-8
Java
false
false
1,109
java
package de.upb.soot.jimple.interpreter; import soot.SootMethod; import soot.Unit; import soot.Value; import soot.jimple.Stmt; /** * @author Manuel Benz created on 21.07.18 */ public class InterpretException extends RuntimeException { public InterpretException(String message) { super(message); } public InterpretException(String message, Throwable cause) { super(message, cause); } public InterpretException(Throwable cause) { super(cause); } public InterpretException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { super(message, cause, enableSuppression, writableStackTrace); } public InterpretException(SootMethod method, Unit unit, InterpretException e) { super(msg(method, unit), e); } public InterpretException(Value v, String msg) { super(msg(v, msg)); } private static String msg(Value v, String msg) { return String.format("Val ‘%s‘: %s", v, msg); } private static String msg(SootMethod method, Unit unit) { return String.format("Method '%s', Stmt ‘%s‘", method, unit); } }
[ "manuelf.benz@gmail.com" ]
manuelf.benz@gmail.com
720fdba6b2523e669727246b67a5e8200255b5b8
7263c7f68fd789b211c74a8b4067c492c0452c61
/src/main/java/trunk/social/p2p/p2p/builder/SignatureBuilder.java
1c867f9f5c4cabc089871548eeb476996e6072a9
[]
no_license
huaweihulk/tomp2plearn
5ffebc2563cfcca663c1ad038026d0314dd7ff39
8d4f7cf78247cb1c52d6a5be389798c2875fa00b
refs/heads/master
2021-01-09T06:23:42.111372
2017-02-06T14:46:38
2017-02-06T14:46:38
80,970,640
2
0
null
null
null
null
UTF-8
Java
false
false
1,193
java
package trunk.social.p2p.p2p.builder; import java.security.KeyPair; public interface SignatureBuilder<K extends SignatureBuilder<K>> { /** * Indicates whether a message should be signed or not. * @return */ public abstract boolean isSign(); /** * Sets whether a message should be signed or not. * For protecting an entry, this needs to be set to true. * @param signMessage * True, if the message should be signed. * @return This instance */ public abstract K sign(boolean signMessage); /** * Sets the message to be signed. * @return This instance */ public abstract K sign(); /** * Sets the key pair to sing the message. The key will be attached to the message and stored * potentially with a data object (if there is such an object in the message). * @param keyPair * The key pair to be used for signing. * @return This instance */ public abstract K keyPair(KeyPair keyPair); /** * Gets the current key pair used to sign the message. If null, no signature is applied. * @return */ public abstract KeyPair keyPair(); }
[ "15637681569@163.com" ]
15637681569@163.com
a30f699af7c7163ed7b1fdf98cc0faaf04a9283a
157d06ef259e5084aeebbe9a18bcbde34aa98c10
/src/main/java/io/github/hapjava/accessories/CameraAccessory.java
664020704d3df477be8ae13e2683d50e34a1aa84
[ "MIT" ]
permissive
multilotto/HAP-Java
56d8870b69ea13f358282ae5e055ca79ac892376
b7d71175d82c3e69fecf10493af5f262d067a982
refs/heads/master
2023-01-20T09:59:45.235511
2020-11-29T18:20:09
2020-11-29T18:20:09
308,074,612
0
0
MIT
2020-12-01T20:51:56
2020-10-28T16:20:26
Java
UTF-8
Java
false
false
1,635
java
package io.github.hapjava.accessories; import io.github.hapjava.characteristics.HomekitCharacteristicChangeCallback; import io.github.hapjava.services.Service; import io.github.hapjava.services.impl.CameraControlService; import io.github.hapjava.services.impl.CameraRTPService; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.concurrent.CompletableFuture; public interface CameraAccessory extends HomekitAccessory { /** * Retrieves the current binary state of the light. * * @return a future that will contain the binary state */ CompletableFuture<Boolean> getCameraActiveState(); /** * Sets the binary state of the light * * @param activeState the binary state to set * @return a future that completes when the change is made * @throws Exception when the change cannot be made */ CompletableFuture<Void> setCameraActiveState(boolean activeState) throws Exception; /** * Subscribes to changes in the binary state of the light. * * @param callback the function to call when the state changes. */ void subscribeCameraActiveState(HomekitCharacteristicChangeCallback callback); /** Unsubscribes from changes in the binary state of the light. */ void unsubscribeCameraActiveState(); List<CameraRTPService> getCameraRTPServices(); @Override default Collection<Service> getServices() { ArrayList<Service> services = new ArrayList<>(); services.add(new CameraControlService(this)); services.addAll(getCameraRTPServices()); return Collections.unmodifiableList(services); } }
[ "koushd@gmail.com" ]
koushd@gmail.com
27b1014e85f037deff3977aad7e4798d54760019
ec4628c879ad1a91ff7ccca13516eef1fbc16f09
/src/main/java/com/codetest/command/CreateCanvasCommand.java
daa2b2bdde527da28ffc02dad327606ae000106b
[]
no_license
yashodeepv/paint-brush-console
4a435a62f6a69778daa0f5becd6f4d90a62288ea
64c2c1e9857d8b7d914ec4afde957227e5b080db
refs/heads/master
2021-07-01T05:03:27.907309
2019-08-07T17:39:01
2019-08-07T17:39:01
179,232,238
0
0
null
2020-10-13T12:40:21
2019-04-03T07:14:39
Java
UTF-8
Java
false
false
575
java
package com.codetest.command; import com.codetest.entity.DrawingCanvas; import java.util.List; public class CreateCanvasCommand implements ConsoleCommand { @Override public void execute(List<String> params, DrawingCanvas drawingCanvas) { if(params.size() != 2) { throw new IllegalArgumentException("Invalid parameters. Usage : c w h "); } int width = Integer.parseInt(params.get(0)); int height = Integer.parseInt(params.get(1)); drawingCanvas.createCanvas(width, height); drawingCanvas.show(); } }
[ "yashodeepv@gmail.com" ]
yashodeepv@gmail.com
05926d9f8cf6d438b66da7008f7cad4538468379
48d57ae3be70964679833edccc51d64b547a53bb
/app/src/main/java/com/junior/dwan/primechat/utils/PrimeChatApplication.java
aed5ae46cd801912109cf0a2ef8c73814c970649
[]
no_license
dwanmight/PrimeChat
913c490be3916163c9c7febd11bab94786336824
8e2dea78fc4e89e06049aee2c3809125be91b9ed
refs/heads/master
2020-06-27T21:48:05.840777
2016-11-22T21:04:40
2016-11-22T21:04:40
74,513,036
0
0
null
null
null
null
UTF-8
Java
false
false
579
java
package com.junior.dwan.primechat.utils; import android.app.Application; import android.content.SharedPreferences; import android.preference.PreferenceManager; /** * Created by Might on 18.11.2016. */ public class PrimeChatApplication extends Application { public static SharedPreferences sSharedPreferences; @Override public void onCreate() { super.onCreate(); sSharedPreferences=PreferenceManager.getDefaultSharedPreferences(this); } public static SharedPreferences getSharedPreferences() { return sSharedPreferences; } }
[ "dwanmight@gmail.com" ]
dwanmight@gmail.com
9ddbb6d3dc8df4395586c1f8171fa6b1d9a1b64b
796dcd727bb7e675310bea2fdd1c3318f3897abe
/ad-service/ad-binlog-common/src/main/java/com/baron/ad/dto/MySqlRowData.java
36cbd5a6d5a3c290baecfa67621c0d3444978b54
[]
no_license
jimmywangking/ad
66cfc3231769b62dceda6b9ecf8343b8a1cc35db
04a21f4e83761644ca32e114ff85799c747739f5
refs/heads/master
2022-12-14T02:48:21.831636
2020-09-20T10:21:11
2020-09-20T10:21:11
291,035,939
0
0
null
null
null
null
UTF-8
Java
false
false
542
java
package com.baron.ad.dto; import com.baron.ad.constant.OpType; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.util.ArrayList; import java.util.List; import java.util.Map; /*** @package com.baron.ad.mysql.dto @author Baron @create 2020-09-05-9:23 PM */ @Data @NoArgsConstructor @AllArgsConstructor public class MySqlRowData { private String tableName; private String level; private OpType opType; private List<Map<String, String>> fieldValueMap = new ArrayList<>(); }
[ "bowangdl@cn.ibm.com" ]
bowangdl@cn.ibm.com
f9817317432a7c4bf170183dcfd15ace10efe652
0cede59a67bf7ff23705160a2fe0258c909bf773
/springboot-zhoutianqi-sdk/src/main/java/spring/boot/zhoutianqi/sdk/TestBean.java
bcbdf29fd0ffc8adbdc6f74bd5e59e2408b1bae2
[]
no_license
Johnnyzhoutq/zhoutianqi-springboot-cloud-demo
99ace0a3db7f854ea3fe672ae390d51e92a15dff
3cb9c27f2776a589409562837256eb339831edb3
refs/heads/master
2021-01-22T02:21:07.687689
2017-12-07T07:05:20
2017-12-07T07:05:20
92,355,121
9
7
null
null
null
null
UTF-8
Java
false
false
309
java
package spring.boot.zhoutianqi.sdk; public class TestBean { /** * @author zhoutianqi * @className TestBean.java * @date 2017年7月3日 上午10:36:23 * @description */ private String name; public String getName() { return name; } public void setName(String name) { this.name = name; } }
[ "johnnyzhoutq@gmail.com" ]
johnnyzhoutq@gmail.com
b8e3b7789ef8ab8efc671f0d9f32edd3bfe837a5
559ea64c50ae629202d0a9a55e9a3d87e9ef2072
/org/codehaus/jackson/annotate/JsonAutoDetect.java
d15dba7fde2533270e7c2fd7afccdeb254908f0c
[]
no_license
CrazyWolf2014/VehicleBus
07872bf3ab60756e956c75a2b9d8f71cd84e2bc9
450150fc3f4c7d5d7230e8012786e426f3ff1149
refs/heads/master
2021-01-03T07:59:26.796624
2016-06-10T22:04:02
2016-06-10T22:04:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,127
java
package org.codehaus.jackson.annotate; import com.google.protobuf.DescriptorProtos.FieldOptions; import com.google.protobuf.DescriptorProtos.MessageOptions; import com.google.protobuf.DescriptorProtos.UninterpretedOption; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import java.lang.reflect.Member; import java.lang.reflect.Modifier; @JacksonAnnotation @Target({ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) public @interface JsonAutoDetect { /* renamed from: org.codehaus.jackson.annotate.JsonAutoDetect.1 */ static /* synthetic */ class C09311 { static final /* synthetic */ int[] f1671x87517c95; static { f1671x87517c95 = new int[Visibility.values().length]; try { f1671x87517c95[Visibility.ANY.ordinal()] = 1; } catch (NoSuchFieldError e) { } try { f1671x87517c95[Visibility.NONE.ordinal()] = 2; } catch (NoSuchFieldError e2) { } try { f1671x87517c95[Visibility.NON_PRIVATE.ordinal()] = 3; } catch (NoSuchFieldError e3) { } try { f1671x87517c95[Visibility.PROTECTED_AND_PUBLIC.ordinal()] = 4; } catch (NoSuchFieldError e4) { } try { f1671x87517c95[Visibility.PUBLIC_ONLY.ordinal()] = 5; } catch (NoSuchFieldError e5) { } } } public enum Visibility { ANY, NON_PRIVATE, PROTECTED_AND_PUBLIC, PUBLIC_ONLY, NONE, DEFAULT; public boolean isVisible(Member m) { switch (C09311.f1671x87517c95[ordinal()]) { case MessageOptions.MESSAGE_SET_WIRE_FORMAT_FIELD_NUMBER /*1*/: return true; case MessageOptions.NO_STANDARD_DESCRIPTOR_ACCESSOR_FIELD_NUMBER /*2*/: return false; case FieldOptions.DEPRECATED_FIELD_NUMBER /*3*/: if (Modifier.isPrivate(m.getModifiers())) { return false; } return true; case UninterpretedOption.POSITIVE_INT_VALUE_FIELD_NUMBER /*4*/: if (Modifier.isProtected(m.getModifiers())) { return true; } break; case UninterpretedOption.NEGATIVE_INT_VALUE_FIELD_NUMBER /*5*/: break; default: return false; } return Modifier.isPublic(m.getModifiers()); } } Visibility creatorVisibility() default Visibility.DEFAULT; Visibility fieldVisibility() default Visibility.DEFAULT; Visibility getterVisibility() default Visibility.DEFAULT; Visibility isGetterVisibility() default Visibility.DEFAULT; Visibility setterVisibility() default Visibility.DEFAULT; JsonMethod[] value() default {JsonMethod.ALL}; }
[ "ahhmedd16@hotmail.com" ]
ahhmedd16@hotmail.com
3e3e36c53c6a7bd93eb03b1d04e31ae8f17ebab9
3551eb8c62482efb628f1628004cbf50dce1980c
/src/main/java/com/Thymeleaf/demo/User.java
f63edc9944ef35a0a2d1efd39f906291f5e58ae5
[]
no_license
Selsdeepika/Thymeleaf-
478c4802c5110dd1d00101a1e574cccd1fb76559
c25d686d5a0ef43a6eb129f7fdc17b4f4c8f5c44
refs/heads/master
2020-07-14T21:39:55.713712
2019-08-30T16:01:29
2019-08-30T16:01:29
205,408,916
0
0
null
null
null
null
UTF-8
Java
false
false
388
java
package com.Thymeleaf.demo; public class User { String name; String email; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } }
[ "selva.deepu24@gmail.com" ]
selva.deepu24@gmail.com
3036ec9f61ca3f25c44cc7e423ea4d3a645031be
884557ac73eff99ccb985febe0ed1c5a46a9969c
/Platforms/BM/src/main/java/com/smilecoms/bm/unitcredits/filters/AllowAllFilterClass.java
73872cc10afd2d52220cf53047d92420af560e1b
[]
no_license
vikaspshelar/SMILE
732ef4b80655f246b43997d8407653cf7ffddad0
7ffc19eafef4d53a33e3d4bc658a1266b1087b27
refs/heads/master
2023-07-17T14:21:28.863986
2021-08-28T07:08:39
2021-08-28T07:08:39
400,570,564
0
0
null
null
null
null
UTF-8
Java
false
false
1,721
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.smilecoms.bm.unitcredits.filters; import com.smilecoms.bm.charging.IAccount; import com.smilecoms.bm.db.model.ServiceInstance; import com.smilecoms.bm.db.model.UnitCreditInstance; import com.smilecoms.bm.db.model.UnitCreditSpecification; import com.smilecoms.bm.rating.RatingResult; import com.smilecoms.bm.unitcredits.wrappers.IUnitCredit; import com.smilecoms.xml.schema.bm.RatingKey; import java.util.Date; import java.util.List; import javax.persistence.EntityManager; /** * * @author paul */ public class AllowAllFilterClass implements IUCFilterClass{ @Override public boolean isUCApplicable( EntityManager em, IAccount acc, String sessionId, ServiceInstance serviceInstance, RatingResult ratingResult, RatingKey ratingKey, String srcDevice, String description, Date eventTimestamp, UnitCreditSpecification ucs, UnitCreditInstance uci, String location) { return true; } @Override public boolean isUCApplicableInContext(EntityManager em, IAccount acc, String sessionId, ServiceInstance serviceInstance, RatingResult ratingResult, RatingKey ratingKey, String srcDevice, String description, Date eventTimestamp, UnitCreditSpecification ucs, IUnitCredit uci, List<IUnitCredit> unitCreditsInList, String location) { return true; } }
[ "sbaranwal@futurerx.com" ]
sbaranwal@futurerx.com
8324496c931dda8d30adae2918c11a436259fc7c
77f07548847b474594de3d032958910a6371552b
/tdt4250.spo.model/src/tdt4250/spo/impl/ArtistImpl.java
9a236c11268eb02527316cab0aaa8b363a971e36
[]
no_license
RullendeRobin/tdt4250-project
b6c6a3d8671c7a7ca3cea7d61bddc799ba7c192f
3deceaa9b4eec981fd4c99a6c654e8d97538bf9a
refs/heads/main
2023-02-01T16:20:46.702495
2020-12-21T15:41:41
2020-12-21T15:41:41
320,253,673
0
0
null
null
null
null
UTF-8
Java
false
false
4,385
java
/** */ package tdt4250.spo.impl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; import tdt4250.spo.Artist; import tdt4250.spo.SpoPackage; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Artist</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * </p> * <ul> * <li>{@link tdt4250.spo.impl.ArtistImpl#getName <em>Name</em>}</li> * <li>{@link tdt4250.spo.impl.ArtistImpl#getUri <em>Uri</em>}</li> * </ul> * * @generated */ public class ArtistImpl extends MinimalEObjectImpl.Container implements Artist { /** * The default value of the '{@link #getName() <em>Name</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getName() * @generated * @ordered */ protected static final String NAME_EDEFAULT = null; /** * The cached value of the '{@link #getName() <em>Name</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getName() * @generated * @ordered */ protected String name = NAME_EDEFAULT; /** * The default value of the '{@link #getUri() <em>Uri</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getUri() * @generated * @ordered */ protected static final String URI_EDEFAULT = null; /** * The cached value of the '{@link #getUri() <em>Uri</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getUri() * @generated * @ordered */ protected String uri = URI_EDEFAULT; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected ArtistImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return SpoPackage.Literals.ARTIST; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getName() { return name; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setName(String newName) { String oldName = name; name = newName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, SpoPackage.ARTIST__NAME, oldName, name)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getUri() { return uri; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setUri(String newUri) { String oldUri = uri; uri = newUri; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, SpoPackage.ARTIST__URI, oldUri, uri)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case SpoPackage.ARTIST__NAME: return getName(); case SpoPackage.ARTIST__URI: return getUri(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case SpoPackage.ARTIST__NAME: setName((String)newValue); return; case SpoPackage.ARTIST__URI: setUri((String)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case SpoPackage.ARTIST__NAME: setName(NAME_EDEFAULT); return; case SpoPackage.ARTIST__URI: setUri(URI_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case SpoPackage.ARTIST__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); case SpoPackage.ARTIST__URI: return URI_EDEFAULT == null ? uri != null : !URI_EDEFAULT.equals(uri); } return super.eIsSet(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @NOTgenerated */ @Override public String toString() { return "Test"; } } //ArtistImpl
[ "irafaf@me.com" ]
irafaf@me.com
ac99b3897fd281d5d867c0c021645bc9eb99ef3d
ea7d6049592fe6f118a44bda2e724926d01c0d44
/team-01/src/main/java/ubc/cosc322/ArrayTester.java
04e276e8b77adcaf71c73cf19dc8a629d8e4234c
[ "MIT" ]
permissive
cosc-322-main-team/322GameOfAmazons
b0dd6662b3c26f37313276ac0032fea290a04502
7d3ff936baec290392193b74cdb7ac10a15643c6
refs/heads/main
2023-03-26T16:38:01.664548
2021-03-22T10:29:05
2021-03-22T10:29:05
328,754,594
0
0
MIT
2021-03-22T10:29:06
2021-01-11T18:22:05
Java
UTF-8
Java
false
false
1,144
java
package ubc.cosc322; import java.util.ArrayList; import java.util.Arrays; import java.util.Hashtable; import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; public class ArrayTester { Hashtable<Integer, List<Integer>> cache = new Hashtable<>(); public void testAsListOverloaded(int n) { ArrayList<ArrayList<Integer>> tempArray = new ArrayList<>(); for (int i = 0; i < n; i++) { tempArray.add(new ArrayList<>(Arrays.asList(1, 2))); } } public void testAsList(int n) { ArrayList<List<Integer>> tempArray = new ArrayList<>(); for (int i = 0; i < n; i++) { tempArray.add(Arrays.asList(1, 2)); } } public void testStream(int n) { ArrayList<List<Integer>> tempArray = new ArrayList<>(); for (int i = 0; i < n; i++) { tempArray.add(Stream.of(1, 2).collect(Collectors.toList())); } } public void testCache(int n) { for (int i = 0; i < 100; i++) { cache.put(i, Arrays.asList(1, 2)); } ArrayList<List<Integer>> tempArray = new ArrayList<>(); for (int i = 0; i < n; i++) { tempArray.add(cache.get(0)); } } }
[ "jadenbalogh@gmail.com" ]
jadenbalogh@gmail.com
a8cacfc0b973d583d7ad37d01c47d86a10878016
dd643ffab9ef29db123cb6496e81978d7963aada
/mcoakley_Checkpoint3_V1/absyn/OpExp.java
8ae5cf1f5aff0218219f5c57e5a44d0c3f98eda3
[]
no_license
Mitch-Co/Compilers
171ec07273a41a113b5263ec1a5e561d881756eb
99f632562df3abe6246cd2b8affb9ec627bcc4e9
refs/heads/master
2023-04-05T06:05:18.457542
2021-04-12T13:35:34
2021-04-12T13:35:34
345,484,671
0
0
null
null
null
null
UTF-8
Java
false
false
768
java
package absyn; public class OpExp extends Exp { public Exp left; public int op; public Exp right; public static int PLUS = 1; public static int MINUS = 2; public static int MUL = 3; public static int DIV = 4; public static int EQ = 5; public static int NE = 6; public static int LT = 7; public static int LE = 8; public static int GT = 9; public static int GE = 10; public static int ASSIGN = 11; public OpExp(int row, int col, Exp left, int op, Exp right) { this.row = row; this.col = col; this.left = left; this.right = right; this.op = op; } public void accept( AbsynVisitor visitor, int level ) { visitor.visit( this, level ); } }
[ "32877602+Mitch-Co@users.noreply.github.com" ]
32877602+Mitch-Co@users.noreply.github.com
428d0d2cbacc521ca1de4c1c9466bb79c306cca2
06b6264a297330400d2be3fade7374b638051c52
/src/main/java/org/redkale/net/Servlet.java
ab4f8146f00e28fe5774897b970294089742e26d
[]
no_license
ryuhi/redkale-extension
cfd8e4ee8d4c6c1cdbda8550205187eb9f98d69e
cf52e06ec98cc9090c86f6d1edb55412a0d5bc2a
refs/heads/master
2021-04-27T05:12:20.426635
2018-03-02T16:32:22
2018-03-02T16:32:22
122,592,772
0
0
null
null
null
null
UTF-8
Java
false
false
820
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package org.redkale.net; import org.redkale.util.AnyValue; import java.io.IOException; /** * 协议请求处理类 * * <p> * 详情见: https://redkale.org * * @author zhangjx * @param <C> Context的子类型 * @param <R> Request的子类型 * @param <P> Response的子类型 */ public abstract class Servlet<C extends Context, R extends Request<C>, P extends Response<C, R>> { AnyValue _conf; //当前Servlet的配置 public void init(C context, AnyValue config) { } public abstract void execute(R request, P response) throws IOException; public void destroy(C context, AnyValue config) { } }
[ "zhanghui@360shop.cn" ]
zhanghui@360shop.cn
038de93796cdbe0f4e3a7dace7752b9dc5574f6e
0abe691d49bbdd79cef9a51bf003b74d835b2731
/src/Compiler/Codegen/Inst/AsmRet.java
f987470c4fab1071a815831a21dc8065df27cda6
[]
no_license
MintGreenTZ/Mx-Compiler
b3bbc7e2b644ea4a1e4482a4c337ea84fe7f55a8
3ad75bd92cf251a0dff5868e1c271b1b3569d9c3
refs/heads/master
2021-12-29T08:44:57.127156
2021-12-15T14:43:43
2021-12-15T14:43:43
243,000,191
0
0
null
null
null
null
UTF-8
Java
false
false
674
java
package Compiler.Codegen.Inst; import Compiler.Codegen.AsmVisitor; import Compiler.IR.Operand.Register; import java.util.Arrays; import java.util.List; public class AsmRet extends AsmInst{ public AsmRet() { } @Override public Register getDefReg() { return null; } @Override public List<Register> getUseReg() { return Arrays.asList(); } @Override public void replaceDefReg(Register newReg) { assert false; } @Override public void replaceUseReg(Register oldReg, Register newReg) { // do nothing } public void accept(AsmVisitor visitor) { visitor.visit(this); } }
[ "tz2012@126.com" ]
tz2012@126.com
d6bffec4b5640e19f62fd3cd0dcc0daccc44b33d
5ea637b197f3ef9793d349a7356e91cdb34cb3a0
/DoubleProcess/windowheadtoast/src/main/java/com/example/windowheadtoast/RomUtils/FloatWindowManager.java
312d745ef2833af5b27faa2dd4a8596be04956a7
[]
no_license
390301051/Android_plugins
c7b359f2c4be927349d1c6087ac7de835c44f1cb
b95d1005682bdcd1fa52038ffd2152856c4b39ee
refs/heads/master
2022-12-29T08:56:20.168738
2020-10-19T05:36:00
2020-10-19T05:36:00
303,548,267
1
0
null
null
null
null
UTF-8
Java
false
false
3,602
java
/* 2020.9.29 author:jie company:csrd method:权限申请(悬浮窗) * */ package com.example.windowheadtoast.RomUtils; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.net.Uri; import android.os.Build; import android.provider.Settings; public class FloatWindowManager { private static final String TAG = "FloatWindowManager"; private static volatile FloatWindowManager instance; public static FloatWindowManager getInstance() { if (instance == null) { synchronized (FloatWindowManager.class) { if (instance == null) { instance = new FloatWindowManager(); } } } return instance; } public void applyOrShowFloatWindow(Context context) { if (!checkPermission(context)) { showConfirmDialog(context); } } private boolean checkPermission(Context context) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { //6.0 版本之后由于 google 增加了对悬浮窗权限的管理,所以方式就统一了 return Settings.canDrawOverlays(context); } else if (RomUtils.checkIsMiuiRom()) { return MiuiUtils.checkFloatWindowPermission(context); } else if (RomUtils.checkIsMeizuRom()) { return MeizuUtils.checkFloatWindowPermission(context); } else if (RomUtils.checkIsHuaweiRom()) { return HuaweiUtils.checkFloatWindowPermission(context); } else if (RomUtils.checkIs360Rom()) { return QikuUtils.checkFloatWindowPermission(context); } else { return true; } } private void showConfirmDialog(final Context context) { new AlertDialog.Builder(context).setCancelable(true).setTitle("权限请求") .setMessage("您的手机没有授予悬浮窗权限,请开启后再试") .setPositiveButton("现在去开启", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { confirmResult(context, true); dialog.dismiss(); } }).setNegativeButton("暂不开启", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { confirmResult(context, false); dialog.dismiss(); } }) .create() .show(); } private void confirmResult(Context context, boolean bool) { if (!bool) { //do something return; } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION, Uri.parse("package:" + context.getPackageName())); context.startActivity(intent); } else if (RomUtils.checkIsMiuiRom()) { MiuiUtils.applyMiuiPermission(context); } else if (RomUtils.checkIsMeizuRom()) { MeizuUtils.applyPermission(context); } else if (RomUtils.checkIsHuaweiRom()) { HuaweiUtils.applyPermission(context); } else if (RomUtils.checkIs360Rom()) { QikuUtils.applyPermission(context); } } }
[ "390301051@qq.com" ]
390301051@qq.com
fc5613437fad098fbf9d4d4d99a045585c943a45
ca35ab76c5a0dc844bb3ebd49c3a97307dde9bce
/src/main/java/com/example/demo/model/dto/response/CommonResponseDTO.java
fe799246c1953f4b53a38e66ea9ab9aedc809d90
[]
no_license
sadeesha-eranga/spring-boot-demo
d2fe8408431f2e7e898167260068e6b7f7ff4c5c
0027dce64d90073b77450840d84d6d520f3cd90c
refs/heads/main
2023-01-23T17:41:48.367602
2020-11-16T04:38:11
2020-11-16T04:38:11
312,322,331
0
0
null
null
null
null
UTF-8
Java
false
false
317
java
package com.example.demo.model.dto.response; import lombok.*; /** * Created by IntelliJ IDEA. * User: sadeesha * Date: 2020-11-14 */ @NoArgsConstructor @AllArgsConstructor @Getter @Setter @Builder @ToString(callSuper = true) public class CommonResponseDTO { private int code; private String message; }
[ "msadeeshaeranga@gamil.com" ]
msadeeshaeranga@gamil.com
cdeeba97f62f1a9433c5ecb770c38d0b9eeb4ea2
79595075622ded0bf43023f716389f61d8e96e94
/app/src/main/java/android/view/animation/TranslateXAnimation.java
1baa29cd82dcf81f32065c90670b930f520e6606
[]
no_license
dstmath/OppoR15
96f1f7bb4d9cfad47609316debc55095edcd6b56
b9a4da845af251213d7b4c1b35db3e2415290c96
refs/heads/master
2020-03-24T16:52:14.198588
2019-05-27T02:24:53
2019-05-27T02:24:53
142,840,716
7
4
null
null
null
null
UTF-8
Java
false
false
774
java
package android.view.animation; public class TranslateXAnimation extends TranslateAnimation { float[] mTmpValues; public TranslateXAnimation(float fromXDelta, float toXDelta) { super(fromXDelta, toXDelta, 0.0f, 0.0f); this.mTmpValues = new float[9]; } public TranslateXAnimation(int fromXType, float fromXValue, int toXType, float toXValue) { super(fromXType, fromXValue, toXType, toXValue, 0, 0.0f, 0, 0.0f); this.mTmpValues = new float[9]; } protected void applyTransformation(float interpolatedTime, Transformation t) { t.getMatrix().getValues(this.mTmpValues); t.getMatrix().setTranslate(this.mFromXDelta + ((this.mToXDelta - this.mFromXDelta) * interpolatedTime), this.mTmpValues[5]); } }
[ "toor@debian.toor" ]
toor@debian.toor
32201e6097734baf7201595ca834144f94abbf78
98eee96ff49336e8b0e4fb5d5e487fcb40e31080
/web-digger/src/main/java/org/digger/spider/entity/OutputModel.java
fbc251961fed389e0d1bf85434a25fbbf6be95ab
[]
no_license
jierzh/WebDigger
74e16c4c87a9a9bec500145d2b349e701e420814
32314475ba1223cae006af69edbdd10f4fb79c13
refs/heads/master
2021-01-20T23:44:34.503884
2016-07-07T04:54:37
2016-07-07T04:54:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
198
java
package org.digger.spider.entity; import java.io.Serializable; public class OutputModel implements Serializable{ /** * */ private static final long serialVersionUID = 1L; }
[ "haifeng0730@126.com" ]
haifeng0730@126.com
da3c2774296cb5038ffdbfa50581e61684dec315
94665dec7c0dba97cd95b05c9c753e80a214c90c
/src/main/java/cdt/repositories/PollRepositoryIf.java
d4824f713b2e67318a51db6dc56ff91a763b02cc
[]
no_license
pepoospina/CDT-webapp-compiled
dc57db328a9a0660a7724234a79afc54d1a4ba05
9a0e65bf78c5c65d3643c10892a8c6966e14179b
refs/heads/master
2021-04-06T10:46:09.305269
2018-04-14T13:48:28
2018-04-14T13:48:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,463
java
package cdt.repositories; import java.util.List; import java.util.UUID; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.CrudRepository; import cdt.entities.Poll; import cdt.entities.PollStatus; public interface PollRepositoryIf extends CrudRepository<Poll, UUID> { public Poll findById(UUID id); @Query("SELECT COUNT(po) FROM Poll po WHERE (po.isTemplate = TRUE AND po.organization.id = ?1) OR po.isPublicTemplate = TRUE") public Integer countNTemplatesInternal(UUID orgId); @Query("SELECT po FROM Poll po WHERE po.organization.id = ?1 AND po.status != ?2 ORDER BY po.creationDate DESC") public List<Poll> findByOrganization_IdAndNotInStatus(UUID orgId, PollStatus status); public List<Poll> findByOrganization_Id(UUID orgId); default Boolean hasTemplates(UUID orgId) { Integer res = countNTemplatesInternal(orgId); return res == null ? false : res.intValue() > 0; } @Query("SELECT org.id FROM Poll po JOIN po.organization org WHERE po.id = ?1") public UUID getOrganizationIdFromPollId(UUID pollId); @Query("SELECT po FROM Poll po WHERE (po.isTemplate = TRUE AND po.organization.id = ?1) OR po.isPublicTemplate = ?2 ORDER BY po.creationDate DESC") public List<Poll> getTemplates(UUID orgId, Boolean searchPublic); @Query("SELECT po FROM Poll po JOIN po.config conf WHERE conf.audience = 'ANY_MEMBER' AND conf.notificationsSent = FALSE") public List<Poll> findNotSent(); }
[ "pepo.ospina@gmail.com" ]
pepo.ospina@gmail.com
35c6643835d3755e73a767b281f9b274140007eb
e3414b38c18c0295f5fa56aefbed1fe331de13a5
/src/split.java
87bb6ef7749d65985d92ddddb8bfc5dc3a1095c8
[]
no_license
takeshitamakoto/sss
757459b76d0ebe62a693338b2f3792f1bf34bfa1
9c17ab7f2462df08f5bac87a90ea0dfe29a72c12
refs/heads/master
2021-01-10T21:52:08.839723
2015-11-15T06:36:50
2015-11-15T06:36:50
23,190,358
0
0
null
null
null
null
UTF-8
Java
false
false
526
java
/* # What Is This: programming samples # Author: Makoto Takeshita <takeshita.sample@gmail.com> # URL: http://simplesandsamples.com # Version: UNBORN # # Usage: # 1. git clone https://github.com/takeshitamakoto/sss.git # 2. change the directory name to easy-to-use name. (e.g. sss -> sample) # 3. open sss/src/filename when you need any help. # */ import java.io.*; class Test{ public static void main(String args[]){ String str="ABC DEF GHI JKL"; String[] dst=str.split(" "); System.out.println(""+dst[1]); } }
[ "takeshita.sample@gmail.com" ]
takeshita.sample@gmail.com
9e5928d2fca38def007af4ae2e945d9f6d43dc89
91cb527707103b7f826089efe0f3de286fde28f1
/src/main/java/com/team/cypher/moviemadness/User.java
38e1c0056a33b351445a1f9ffbea240c75420572
[]
no_license
AnilAbeyasekera/team-cypher-movie-db
61febe515090c6fe6cebabe3016c91ebc8ce5e0c
c15447a8249e20cd553b0514bef8f1ea0221ae97
refs/heads/master
2022-02-03T11:52:03.161797
2019-06-10T10:44:59
2019-06-10T10:44:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,172
java
package com.team.cypher.moviemadness; import java.util.ArrayList; public class User { private int userId; private String username; private String password; private String userFullName; private int userAge; private String userEmail; private String userJoinDate; private String isAdmin; static InitialiseDB initDB = new InitialiseDB(); public User() { } public User(int userId, String username, String password, String userFullName, int userAge, String userEmail, String userJoinDate, String isAdmin) { this.userId = userId; this.username = username; this.password = password; this.userFullName = userFullName; this.userAge = userAge; this.userEmail = userEmail; this.userJoinDate = userJoinDate; this.isAdmin = isAdmin; } public int getUserId() { return userId; } public void setUserId(int userId) { this.userId = userId; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getUserFullName() { return userFullName; } public void setUserFullName(String userFullName) { this.userFullName = userFullName; } public int getUserAge() { return userAge; } public void setUserAge(int userAge) { this.userAge = userAge; } public String getUserEmail() { return userEmail; } public void setUserEmail(String userEmail) { this.userEmail = userEmail; } public String getUserJoinDate() { return userJoinDate; } public void setUserJoinDate(String userJoinDate) { this.userJoinDate = userJoinDate; } public static ArrayList<User> users = new ArrayList<>(); public static ArrayList<User> movieReviewAuthor = new ArrayList<>(users); public ArrayList<User> getAllUsers() { users = initDB.getUsers(initDB.getDBConnection()); return users; } public String getIsAdmin() { return isAdmin; } public void setIsAdmin(String isAdmin) { this.isAdmin = isAdmin; } public boolean authenticateAdmin(User user) { ArrayList<User> users = user.getAllUsers(); boolean result = true; String checkUsername = user.getUsername(); String checkPassword = user.getPassword(); for (User u : users) { boolean username = u.getUsername().equals(user.getUsername()); boolean password = u.getPassword().equals(user.getPassword()); boolean admin = u.getIsAdmin().equalsIgnoreCase("yes"); if (u.getUsername().equals(user.getUsername()) && u.getPassword().equals(user.getPassword()) && u.getIsAdmin().equalsIgnoreCase("yes")) { result = true; break; } else { result = false; } } return result; } }
[ "matthewclark86@gmail.com" ]
matthewclark86@gmail.com
09c3f1e37fc7ec7749b2893f657f048b6ddc47b4
1dcd430c8a10c8db39f0e0530effc9f53dc84ade
/src/main/java/br/edu/ifpb/mestrado/openplanner/api/infrastructure/service/exception/MailException.java
c16cad3fde1b6c3415b435f30a0b8d4b3e2e5b68
[]
no_license
open-planner/open-planner-api
fa6484103c5cce8b50f4fa454320701b241dae37
b4f0401f5b8bcc21e2bdd9e13da984aead5cfe8b
refs/heads/master
2022-11-07T09:34:07.198519
2020-06-23T23:23:43
2020-06-23T23:23:43
259,776,198
1
1
null
null
null
null
UTF-8
Java
false
false
282
java
package br.edu.ifpb.mestrado.openplanner.api.infrastructure.service.exception; public class MailException extends RuntimeException { private static final long serialVersionUID = 3414306611667430223L; public MailException(Throwable cause) { super(cause); } }
[ "contato@fagnerlima.pro.br" ]
contato@fagnerlima.pro.br
c1156f6c8b782c75b1bb55eb9a2f57b12b47576d
4e6ce7b60cc8c3b4d9ee1bdc2888b462a0727ae6
/app/src/demo/java/com/gulu/album/view/PreviewFrameLayout.java
c61e8acf544eb4811f942a0a6387ea3c5936d20b
[]
no_license
kang36897/AnimationAlbum
2a4e86c8bc668a3772ac519af333a83aac8f8625
076ef18457f6937bfb9826627e6dc8ac6ef1d1aa
refs/heads/master
2021-01-23T07:34:13.628539
2015-10-05T02:27:56
2015-10-05T02:27:56
40,071,254
0
0
null
null
null
null
UTF-8
Java
false
false
2,976
java
package com.gulu.album.view; import android.app.Activity; import android.content.Context; import android.util.AttributeSet; import android.util.DisplayMetrics; import android.view.ViewGroup; import android.widget.FrameLayout; import com.gulu.album.R; /** * Created by Administrator on 2015/8/25. */ public class PreviewFrameLayout extends ViewGroup { private static final int MIN_HORIZONTAL_MARGIN = 10; // 10dp /** A callback to be invoked when the preview frame's size changes. */ public interface OnSizeChangedListener { public void onSizeChanged(); } private double mAspectRatio = 4.0 / 3.0; private FrameLayout mFrame; private OnSizeChangedListener mSizeListener; private final DisplayMetrics mMetrics = new DisplayMetrics(); public PreviewFrameLayout(Context context, AttributeSet attrs) { super(context, attrs); if(!isInEditMode()) ((Activity) context).getWindowManager() .getDefaultDisplay().getMetrics(mMetrics); } public void setOnSizeChangedListener(OnSizeChangedListener listener) { mSizeListener = listener; } @Override protected void onFinishInflate() { super.onFinishInflate(); mFrame = (FrameLayout) findViewById(R.id.frame); if (mFrame == null) { throw new IllegalStateException( "must provide child with id as \"frame\""); } } public void setAspectRatio(double ratio) { if (ratio <= 0.0) throw new IllegalArgumentException(); if (mAspectRatio != ratio) { mAspectRatio = ratio; requestLayout(); } } @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { int frameWidth = getWidth(); int frameHeight = getHeight(); FrameLayout f = mFrame; int horizontalPadding = f.getPaddingLeft() + f.getPaddingRight(); int verticalPadding = f.getPaddingBottom() + f.getPaddingTop(); int previewHeight = frameHeight - verticalPadding; int previewWidth = frameWidth - horizontalPadding; // resize frame and preview for aspect ratio /*if (previewWidth > previewHeight * mAspectRatio) { previewWidth = (int) (previewHeight * mAspectRatio + .5); } else { previewHeight = (int) (previewWidth / mAspectRatio + .5); }*/ frameWidth = previewWidth + horizontalPadding; frameHeight = previewHeight + verticalPadding; int hSpace = ((r - l) - frameWidth) / 2; int vSpace = ((b - t) - frameHeight) / 2; mFrame.measure( MeasureSpec.makeMeasureSpec(frameWidth, MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(frameHeight, MeasureSpec.EXACTLY)); mFrame.layout(l + hSpace, t + vSpace, r - hSpace, b - vSpace); if (mSizeListener != null) { mSizeListener.onSizeChanged(); } } }
[ "kang36897@163.com" ]
kang36897@163.com
2dc77f38ccf6ac0ab8893c2fbbc2246bb0b8885c
b205726f58324de51d8be741ff100cf3e74507fe
/app/src/main/java/at/vcity/androidim/tools/XMLHandler.java
996ed31d58f8710f24e6e650d5df1022072d58e1
[]
no_license
zzkuang/AndroidIM-master
1361901126043010fa3c59b9b59bf1c40dedbbda
181029ad85f0c7c4036e47f5a5153fcc5c7e5add
refs/heads/master
2021-01-10T01:49:54.429959
2015-06-10T10:05:17
2015-06-10T10:05:17
36,006,544
0
0
null
null
null
null
UTF-8
Java
false
false
4,151
java
package at.vcity.androidim.tools; import java.util.Vector; import org.xml.sax.Attributes; import org.xml.sax.SAXException; import org.xml.sax.helpers.DefaultHandler; import android.util.Log; import at.vcity.androidim.interfaces.IUpdateData; import at.vcity.androidim.types.FriendInfo; import at.vcity.androidim.types.MessageInfo; import at.vcity.androidim.types.STATUS; /* * Parses the xml data to FriendInfo array * XML Structure * <?xml version="1.0" encoding="UTF-8"?> * * <friends> * <user key="..." /> * <friend username="..." status="..." IP="..." port="..." key="..." expire="..." /> * <friend username="..." status="..." IP="..." port="..." key="..." expire="..." /> * </friends> * * *status == online || status == unApproved * */ public class XMLHandler extends DefaultHandler { private String userKey = new String(); private IUpdateData updater; public XMLHandler(IUpdateData updater) { super(); this.updater = updater; } private Vector<FriendInfo> mFriends = new Vector<FriendInfo>(); private Vector<FriendInfo> mOnlineFriends = new Vector<FriendInfo>(); private Vector<FriendInfo> mUnapprovedFriends = new Vector<FriendInfo>(); private Vector<MessageInfo> mUnreadMessages = new Vector<MessageInfo>(); public void endDocument() throws SAXException { FriendInfo[] friends = new FriendInfo[mFriends.size() + mOnlineFriends.size()]; MessageInfo[] messages = new MessageInfo[mUnreadMessages.size()]; int onlineFriendCount = mOnlineFriends.size(); for (int i = 0; i < onlineFriendCount; i++) { friends[i] = mOnlineFriends.get(i); } int offlineFriendCount = mFriends.size(); for (int i = 0; i < offlineFriendCount; i++) { friends[i + onlineFriendCount] = mFriends.get(i); } int unApprovedFriendCount = mUnapprovedFriends.size(); FriendInfo[] unApprovedFriends = new FriendInfo[unApprovedFriendCount]; for (int i = 0; i < unApprovedFriends.length; i++) { unApprovedFriends[i] = mUnapprovedFriends.get(i); } int unreadMessagecount = mUnreadMessages.size(); //Log.i("MessageLOG", "mUnreadMessages="+unreadMessagecount ); for (int i = 0; i < unreadMessagecount; i++) { messages[i] = mUnreadMessages.get(i); Log.i("MessageLOG", "i="+i ); } this.updater.updateData(messages, friends, unApprovedFriends, userKey); super.endDocument(); } public void startElement(String uri, String localName, String name, Attributes attributes) throws SAXException { if (localName == "friend") { FriendInfo friend = new FriendInfo(); friend.userName = attributes.getValue(FriendInfo.USERNAME); String status = attributes.getValue(FriendInfo.STATUS); friend.ip = attributes.getValue(FriendInfo.IP); friend.port = attributes.getValue(FriendInfo.PORT); friend.userKey = attributes.getValue(FriendInfo.USER_KEY); //friend.expire = attributes.getValue("expire"); if (status != null && status.equals("online")) { friend.status = STATUS.ONLINE; mOnlineFriends.add(friend); } else if (status.equals("unApproved")) { friend.status = STATUS.UNAPPROVED; mUnapprovedFriends.add(friend); } else { friend.status = STATUS.OFFLINE; mFriends.add(friend); } } else if (localName == "user") { this.userKey = attributes.getValue(FriendInfo.USER_KEY); } else if (localName == "message") { MessageInfo message = new MessageInfo(); message.userid = attributes.getValue(MessageInfo.USERID); message.sendt = attributes.getValue(MessageInfo.SENDT); message.content = attributes.getValue(MessageInfo.CONTENT); message.type = attributes.getType(MessageInfo.TYPE); Log.i("MessageLOG", message.userid + message.sendt + message.content); mUnreadMessages.add(message); } super.startElement(uri, localName, name, attributes); } @Override public void startDocument() throws SAXException { this.mFriends.clear(); this.mOnlineFriends.clear(); this.mUnreadMessages.clear(); super.startDocument(); } }
[ "james.kuang@ariagp.com" ]
james.kuang@ariagp.com
89def5082d5d1776687f1a0f4a2d3de00d906d79
6341a4ad056f48382ab0d6e43246084694ecdd2d
/siga-ex/src/main/java/br/gov/jfrj/siga/ex/vo/ExDocumentoVO.java
b012d2794f205d161bad39c9eeee44062bab1f99
[]
no_license
filipeferraz/projeto-siga
0a74d2fd36386c12d9301ef58802353bb5df6848
0c0b1c0f49b761d60ed8567c9907173be48a4b19
refs/heads/master
2021-01-20T21:00:14.070753
2013-11-23T21:41:44
2013-11-23T21:41:44
null
0
0
null
null
null
null
ISO-8859-1
Java
false
false
15,155
java
/******************************************************************************* * Copyright (c) 2006 - 2011 SJRJ. * * This file is part of SIGA. * * SIGA 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. * * SIGA 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 SIGA. If not, see <http://www.gnu.org/licenses/>. ******************************************************************************/ package br.gov.jfrj.siga.ex.vo; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.SortedSet; import br.gov.jfrj.siga.base.Texto; import br.gov.jfrj.siga.dp.DpLotacao; import br.gov.jfrj.siga.dp.DpPessoa; import br.gov.jfrj.siga.ex.ExDocumento; import br.gov.jfrj.siga.ex.ExMobil; import br.gov.jfrj.siga.ex.bl.Ex; import br.gov.jfrj.siga.ex.util.ProcessadorModeloFreemarker; public class ExDocumentoVO extends ExVO { ExDocumento doc; String classe; List<ExMobilVO> mobs = new ArrayList<ExMobilVO>(); String nomeCompleto; String dtDocDDMMYY; String subscritorString; String classificacaoDescricaoCompleta; List<String> tags; String destinatarioString; String descrDocumento; String nmNivelAcesso; String paiSigla; String tipoDocumento; String dtFechamento; String nmArqMod; String conteudoBlobHtmlString; String sigla; String fisicoOuEletronico; boolean fDigital; String dadosComplementares; String forma; String modelo; public ExDocumentoVO(ExDocumento doc, ExMobil mob, DpPessoa titular, DpLotacao lotaTitular, boolean completo) throws Exception { this.doc = doc; this.sigla = doc.getSigla(); this.descrDocumento = doc.getDescrDocumento(); if (!completo) return; this.nomeCompleto = doc.getNomeCompleto(); this.dtDocDDMMYY = doc.getDtDocDDMMYY(); this.subscritorString = doc.getSubscritorString(); if (doc.getExClassificacao() != null) this.classificacaoDescricaoCompleta = doc.getExClassificacao() .getDescricaoCompleta(); this.destinatarioString = doc.getDestinatarioString(); if (doc.getExNivelAcesso() != null) this.nmNivelAcesso = doc.getExNivelAcesso().getNmNivelAcesso(); if (doc.getExMobilPai() != null) this.paiSigla = doc.getExMobilPai().getSigla(); if (doc.getExTipoDocumento() != null) switch (doc.getExTipoDocumento().getId().intValue()) { case 1: this.tipoDocumento = "interno"; break; case 2: this.tipoDocumento = "interno_importado"; break; case 3: this.tipoDocumento = "externo"; break; } this.dtFechamento = doc.getDtFechamentoDDMMYY(); if (doc.getExModelo() != null) this.nmArqMod = doc.getExModelo().getNmArqMod(); this.conteudoBlobHtmlString = doc .getConteudoBlobHtmlStringComReferencias(); if (doc.isEletronico()) { this.classe = "header_eletronico"; this.fisicoOuEletronico = "Documento Eletrônico"; this.fDigital = true; } else { this.classe = "header"; this.fisicoOuEletronico = "Documento Físico"; this.fDigital = false; } this.forma = doc.getExFormaDocumento() != null ? doc .getExFormaDocumento().getDescricao() : ""; this.modelo = doc.getExModelo() != null ? doc.getExModelo().getNmMod() : ""; if (mob != null) { SortedSet<ExMobil> mobsDoc; if (doc.isProcesso()) mobsDoc = doc.getExMobilSetInvertido(); else mobsDoc = doc.getExMobilSet(); for (ExMobil m : mobsDoc) { if (mob.isGeral() || m.isGeral() || mob.getId().equals(m.getId())) mobs.add(new ExMobilVO(m, titular, lotaTitular, completo)); } addAcoes(doc, titular, lotaTitular); } addDadosComplementares(); tags = new ArrayList<String>(); if (doc.getExClassificacao() != null) { String classificacao = doc.getExClassificacao().getDescricao(); if (classificacao != null && classificacao.length() != 0) { String a[] = classificacao.split(": "); for (String s : a) { String ss = "@" + Texto.slugify(s, true, true); if (!tags.contains(ss)) { tags.add(ss); } } } } if (doc.getExModelo() != null) { String ss = "@" + Texto.slugify(doc.getExModelo().getNmMod(), true, true); if (!tags.contains(ss)) { tags.add(ss); } } // if (doc.getExClassificacao() != null) // tags.add("@doc-classe:" + doc.getExClassificacao().getSigla()); // if (doc.getExFormaDocumento() != null) // tags.add("@doc-tipo:" + // Texto.slugify(doc.getExFormaDocumento().getSigla(), true, true)); // if (doc.getExModelo() != null) // tags.add("@doc-modelo:" + Texto.slugify(doc.getExModelo().getNmMod(), // true, true)); } public ExDocumentoVO(ExDocumento doc) throws Exception { this.doc = doc; this.sigla = doc.getSigla(); this.nomeCompleto = doc.getNomeCompleto(); this.dtDocDDMMYY = doc.getDtDocDDMMYY(); this.descrDocumento = doc.getDescrDocumento(); if (doc.isEletronico()) { this.classe = "header_eletronico"; this.fisicoOuEletronico = "Documento Eletrônico"; this.fDigital = true; } else { this.classe = "header"; this.fisicoOuEletronico = "Documento Físico"; this.fDigital = false; } } /** * @param doc * @param titular * @param lotaTitular * @throws Exception */ private void addAcoes(ExDocumento doc, DpPessoa titular, DpLotacao lotaTitular) throws Exception { ExVO vo = this; for (ExMobilVO mobvo : mobs) { if (mobvo.getMob().isGeral()) vo = mobvo; } ExMobil mob = doc.getMobilGeral(); vo.addAcao("folder_magnify", "Visualizar Dossiê", "/expediente/doc", "exibirProcesso", Ex.getInstance().getComp() .podeVisualizarImpressao(titular, lotaTitular, mob)); vo.addAcao( "printer", "Visualizar Impressão", "/arquivo", "exibir", Ex.getInstance().getComp() .podeVisualizarImpressao(titular, lotaTitular, mob), null, "&popup=true&arquivo=" + doc.getReferenciaPDF(), null, null, null); vo.addAcao( "lock", "Finalizar", "/expediente/doc", "fechar", Ex.getInstance().getComp() .podeFinalizar(titular, lotaTitular, mob), "Confirma a finalização do documento?", null, null, null, "once"); // addAcao("Finalizar e Assinar", "/expediente/mov", "fechar_assinar", // podeFinalizarAssinar(titular, lotaTitular, mob), // "Confirma a finalização do documento?", null, null, null); vo.addAcao("pencil", "Editar", "/expediente/doc", "editar", Ex .getInstance().getComp().podeEditar(titular, lotaTitular, mob)); vo.addAcao( "delete", "Excluir", "/expediente/doc", "excluir", Ex.getInstance().getComp() .podeExcluir(titular, lotaTitular, mob), "Confirma a exclusão do documento?", null, null, null, "once"); vo.addAcao("user_add", "Incluir Cossignatário", "/expediente/mov", "incluir_cosignatario", Ex.getInstance().getComp() .podeIncluirCosignatario(titular, lotaTitular, mob)); vo.addAcao( "attach", "Anexar Arquivo", "/expediente/mov", "anexar", Ex.getInstance().getComp() .podeAnexarArquivo(titular, lotaTitular, mob)); vo.addAcao( "tag_yellow", "Fazer Anotação", "/expediente/mov", "anotar", Ex.getInstance().getComp() .podeFazerAnotacao(titular, lotaTitular, mob)); vo.addAcao("folder_user", "Definir Perfil", "/expediente/mov", "vincularPapel", Ex.getInstance().getComp() .podeFazerVinculacaoPapel(titular, lotaTitular, mob)); vo.addAcao( "cd", "Download do Conteúdo", "/expediente/doc", "anexo", Ex.getInstance().getComp() .podeDownloadConteudo(titular, lotaTitular, mob)); vo.addAcao("sitemap_color", "Exibir Todas as Vias", "/expediente/doc", "exibir", doc.isExpediente() && doc.getDtFechamento() != null, null, "&exibirCompleto=false", null, null, null); vo.addAcao("sitemap_color", "Exibir Todos os Volumes", "/expediente/doc", "exibir", doc.isProcesso() && doc.getDtFechamento() != null, null, "&exibirCompleto=false", null, null, "once"); vo.addAcao("add", "Criar Via", "/expediente/doc", "criarVia", Ex .getInstance().getComp() .podeCriarVia(titular, lotaTitular, mob), null, null, null, null, "once"); vo.addAcao( "add", "Abrir Novo Volume", "/expediente/doc", "criarVolume", Ex.getInstance().getComp() .podeCriarVolume(titular, lotaTitular, mob), "Confirma a abertura de um novo volume?", null, null, null, "once"); vo.addAcao( "link_add", "Criar Subprocesso", "/expediente/doc", "editar", Ex.getInstance().getComp() .podeCriarSubprocesso(titular, lotaTitular, mob), null, "mobilPaiSel.sigla=" + getSigla() + "&idForma=" + mob.doc().getExFormaDocumento().getIdFormaDoc(), null, null, null); vo.addAcao( "script_edit", "Registrar Assinatura Manual", "/expediente/mov", "registrar_assinatura", Ex.getInstance().getComp() .podeRegistrarAssinatura(titular, lotaTitular, mob)); vo.addAcao( "script_key", "Assinar Digitalmente", "/expediente/mov", "assinar", Ex.getInstance().getComp() .podeAssinar(titular, lotaTitular, mob)); if (doc.getDtFechamento() != null && doc.getNumExpediente() != null) { // documentos finalizados if (mob.temAnexos()) vo.addAcao("script_key", "Assinar Anexos", "/expediente/mov", "assinar_anexos_geral", true); vo.addAcao( "link_add", "Criar Anexo", "/expediente/doc", "editar", Ex.getInstance() .getComp() .podeAnexarArquivoAlternativo(titular, lotaTitular, mob), null, "criandoAnexo=true&mobilPaiSel.sigla=" + getSigla(), null, null, null); } vo.addAcao("shield", "Redefinir Nível de Acesso", "/expediente/mov", "redefinir_nivel_acesso", Ex.getInstance().getComp() .podeRedefinirNivelAcesso(titular, lotaTitular, mob)); vo.addAcao( "book_add", "Solicitar Publicação no Boletim", "/expediente/mov", "boletim_agendar", Ex.getInstance() .getComp() .podeBotaoAgendarPublicacaoBoletim(titular, lotaTitular, mob)); vo.addAcao( "book_link", "Registrar Publicação do BIE", "/expediente/mov", "boletim_publicar", Ex.getInstance() .getComp() .podeBotaoAgendarPublicacaoBoletim(titular, lotaTitular, mob), null, null, null, null, "once"); vo.addAcao( "error_go", "Refazer", "/expediente/doc", "reabrir", Ex.getInstance().getComp() .podeReabrir(titular, lotaTitular, mob), "Esse documento será cancelado e seus dados serão copiados para um novo expediente em elaboração. Prosseguir?", null, null, null, "once"); vo.addAcao( "arrow_divide", "Duplicar", "/expediente/doc", "duplicar", Ex.getInstance().getComp() .podeDuplicar(titular, lotaTitular, mob), "Esta operação criará um expediente com os mesmos dados do atual. Prosseguir?", null, null, null, "once"); // test="${exibirCompleto != true}" /> vo.addAcao( "eye", "Exibir Informações Completas", "/expediente/doc", "exibir", Ex.getInstance().getComp() .podeDuplicar(titular, lotaTitular, mob), null, "&exibirCompleto=true", null, null, null); vo.addAcao( "report_link", "Agendar Publicação no DJE", "/expediente/mov", "agendar_publicacao", Ex.getInstance().getComp() .podeAgendarPublicacao(titular, lotaTitular, mob)); vo.addAcao( "report_add", "Solicitar Publicação no DJE", "/expediente/mov", "pedir_publicacao", Ex.getInstance().getComp() .podePedirPublicacao(titular, lotaTitular, mob)); // <ww:param name="idFormaDoc">60</ww:param> vo.addAcao( "arrow_undo", "Desfazer Cancelamento", "/expediente/doc", "desfazerCancelamentoDocumento", Ex.getInstance() .getComp() .podeDesfazerCancelamentoDocumento(titular, lotaTitular, mob), "Esta operação anulará o cancelamento do documento e tornará o documento novamente editável. Prosseguir?", null, null, null, "once"); vo.addAcao( "delete", "Cancelar Documento", "/expediente/doc", "tornarDocumentoSemEfeito", Ex.getInstance() .getComp() .podeTornarDocumentoSemEfeito(titular, lotaTitular, mob), "Esta operação tornará esse documento sem efeito. Prosseguir?", null, null, null, "once"); } public void addDadosComplementares() throws Exception { ProcessadorModeloFreemarker p = new ProcessadorModeloFreemarker(); Map attrs = new HashMap(); attrs.put("nmMod", "macro dadosComplementares"); attrs.put("template", "[@dadosComplementares/]"); attrs.put("doc", this.getDoc()); dadosComplementares = p.processarModelo(doc.getOrgaoUsuario(), attrs, null); } public String getClasse() { return classe; } public String getClassificacaoDescricaoCompleta() { return classificacaoDescricaoCompleta; } public String getConteudoBlobHtmlString() { return conteudoBlobHtmlString; } public String getDescrDocumento() { return descrDocumento; } public String getDestinatarioString() { return destinatarioString; } public ExDocumento getDoc() { return doc; } public String getDtDocDDMMYY() { return dtDocDDMMYY; } public String getDtFechamento() { return dtFechamento; } public List<ExMobilVO> getMobs() { return mobs; } public String getNmArqMod() { return nmArqMod; } public String getNmNivelAcesso() { return nmNivelAcesso; } public String getNomeCompleto() { return nomeCompleto; } public String getPaiSigla() { return paiSigla; } public String getSigla() { return sigla; } public String getSiglaCurtaSubProcesso() { if(doc.isProcesso() && doc.getExMobilPai() != null) { try { return sigla.substring(sigla.length() - 3, sigla.length()); } catch (Exception e) { return sigla; } } return ""; } public String getSubscritorString() { return subscritorString; } public String getTipoDocumento() { return tipoDocumento; } public String getFisicoOuEletronico() { return fisicoOuEletronico; } public boolean isDigital() { return fDigital; } @Override public String toString() { String s = getSigla() + "[" + getAcoes() + "]"; for (ExMobilVO m : getMobs()) { s += "\n" + m.toString(); } return s; } public String getDadosComplementares() { return dadosComplementares; } public String getForma() { return forma; } public void setForma(String forma) { this.forma = forma; } public String getModelo() { return modelo; } public void setModelo(String modelo) { this.modelo = modelo; } public List<String> getTags() { return tags; } public void setTags(List<String> tags) { this.tags = tags; } }
[ "filipepferraz@gmail.com" ]
filipepferraz@gmail.com
741b86d879e0981ccf89f9c533db51dff8aa067e
50871b1e943ef1c0709479f5886e87fa647ffd40
/quanlydatcom/src/trong/lixco/com/bean/CommonService.java
8ad7ef337ff43c83f36bd5e5c5577042793df246
[]
no_license
quangthaiuit1/QuanLyDatCom
299909177c36b57757695e7b9ba39520eb157bfe
edddb92fd8041bf9590840dddecedfcf7ad11173
refs/heads/master
2023-04-16T23:27:52.778315
2021-04-28T13:39:16
2021-04-28T13:39:16
286,339,681
0
0
null
null
null
null
UTF-8
Java
false
false
362
java
package trong.lixco.com.bean; import javax.faces.application.FacesMessage; import org.primefaces.PrimeFaces; public class CommonService { static public void successNotify() { FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, "Thông báo", "Cập nhật thành công ."); PrimeFaces.current().dialog().showMessageDynamic(message); } }
[ "quangthaiuit1@gmail.com" ]
quangthaiuit1@gmail.com
7cce8f95cca6df1cc46da4ba21ce2b468cce767e
591184fe8b21134c30b47fa86d5a275edd3a6208
/openejb3/container/openejb-jee/src/main/java/org/openejb/jee/ServiceRef.java
09f02d60a461932489fde3a16f0ec2f80c0b7afc
[]
no_license
codehaus/openejb
41649552c6976bf7d2e1c2fe4bb8a3c2b82f4dcb
c4cd8d75133345a23d5a13b9dda9cb4b43efc251
refs/heads/master
2023-09-01T00:17:38.431680
2006-09-14T07:14:22
2006-09-14T07:14:22
36,228,436
1
0
null
null
null
null
UTF-8
Java
false
false
6,114
java
/** * * Copyright 2006 The Apache Software Foundation or its licensors, as applicable. * * 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.openejb.jee; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlID; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import java.util.ArrayList; import java.util.List; /** * The service-ref element declares a reference to a Web * service. It contains optional description, display name and * icons, a declaration of the required Service interface, * an optional WSDL document location, an optional set * of JAX-RPC mappings, an optional QName for the service element, * an optional set of Service Endpoint Interfaces to be resolved * by the container to a WSDL port, and an optional set of handlers. */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "service-refType", propOrder = { "description", "displayName", "icon", "serviceRefName", "serviceInterface", "serviceRefType", "wsdlFile", "jaxrpcMappingFile", "serviceQname", "portComponentRef", "handler", "handlerChains", "mappedName", "injectionTarget" }) public class ServiceRef { @XmlElement(required = true) protected List<Text> description; @XmlElement(name = "display-name", required = true) protected List<Text> displayName; @XmlElement(required = true) protected List<Icon> icon; @XmlElement(name = "service-ref-name", required = true) protected String serviceRefName; @XmlElement(name = "service-interface", required = true) protected String serviceInterface; @XmlElement(name = "service-ref-type") protected String serviceRefType; @XmlElement(name = "wsdl-file") protected String wsdlFile; @XmlElement(name = "jaxrpc-mapping-file") protected String jaxrpcMappingFile; @XmlElement(name = "service-qname") protected String serviceQname; @XmlElement(name = "port-component-ref", required = true) protected List<PortComponentRef> portComponentRef; @XmlElement(required = true) protected List<ServiceRefHandler> handler; @XmlElement(name = "handler-chains") protected ServiceRefHandlerChains handlerChains; @XmlElement(name = "mapped-name") protected String mappedName; @XmlElement(name = "injection-target", required = true) protected List<InjectionTarget> injectionTarget; @XmlAttribute @XmlJavaTypeAdapter(CollapsedStringAdapter.class) @XmlID protected String id; public List<Text> getDescription() { if (description == null) { description = new ArrayList<Text>(); } return this.description; } public List<Text> getDisplayName() { if (displayName == null) { displayName = new ArrayList<Text>(); } return this.displayName; } public List<Icon> getIcon() { if (icon == null) { icon = new ArrayList<Icon>(); } return this.icon; } public String getServiceRefName() { return serviceRefName; } public void setServiceRefName(String value) { this.serviceRefName = value; } public String getServiceInterface() { return serviceInterface; } public void setServiceInterface(String value) { this.serviceInterface = value; } public String getServiceRefType() { return serviceRefType; } public void setServiceRefType(String value) { this.serviceRefType = value; } public String getWsdlFile() { return wsdlFile; } public void setWsdlFile(String value) { this.wsdlFile = value; } public String getJaxrpcMappingFile() { return jaxrpcMappingFile; } public void setJaxrpcMappingFile(String value) { this.jaxrpcMappingFile = value; } /** * Gets the value of the serviceQname property. */ public String getServiceQname() { return serviceQname; } /** * Sets the value of the serviceQname property. */ public void setServiceQname(String value) { this.serviceQname = value; } public List<PortComponentRef> getPortComponentRef() { if (portComponentRef == null) { portComponentRef = new ArrayList<PortComponentRef>(); } return this.portComponentRef; } public List<ServiceRefHandler> getHandler() { if (handler == null) { handler = new ArrayList<ServiceRefHandler>(); } return this.handler; } public ServiceRefHandlerChains getHandlerChains() { return handlerChains; } public void setHandlerChains(ServiceRefHandlerChains value) { this.handlerChains = value; } public String getMappedName() { return mappedName; } public void setMappedName(String value) { this.mappedName = value; } public List<InjectionTarget> getInjectionTarget() { if (injectionTarget == null) { injectionTarget = new ArrayList<InjectionTarget>(); } return this.injectionTarget; } public String getId() { return id; } public void setId(String value) { this.id = value; } }
[ "dblevins@2b0c1533-c60b-0410-b8bd-89f67432e5c6" ]
dblevins@2b0c1533-c60b-0410-b8bd-89f67432e5c6
2b313a55a09248d6bb5ea493c9d3897cb97874b1
8cc634725bbfccd0ca039319539c3f4d2396cdb7
/Leetcode2/problem792.java
99492b1f3f404df0575a3176961ece17e03d3140
[]
no_license
ZhuChengZhong/algorithm
2c25f2457d4a73d257fd184079590e82cc69917e
8e69c46deb1435d6ae9c8285efd17b7d0cee9acc
refs/heads/master
2018-09-25T21:39:54.530152
2018-09-01T03:58:35
2018-09-01T03:58:35
115,340,050
1
0
null
null
null
null
UTF-8
Java
false
false
1,341
java
package leetcode; /** * 给定字符串 S 和单词字典 words, 求 words[i] 中是 S 的子序列的单词个数。 示例: 输入: S = "abcde" words = ["a", "bb", "acd", "ace"] 输出: 3 解释: 有三个是 S 的子序列的单词: "a", "acd", "ace"。 注意: 所有在words和 S 里的单词都只由小写字母组成。 S 的长度在 [1, 50000]。 words 的长度在 [1, 5000]。 words[i]的长度在[1, 50]。 * @author zhu * */ public class problem792 { public static int numMatchingSubseq(String S, String[] words) { boolean match=false; int []index=new int[words.length]; int res=0; for(int i=0;i<S.length();i++) { char c=S.charAt(i); if(!match&&i>0&&S.charAt(i-1)==c) { continue; } match=false; for(int j=0;j<words.length;j++) { String s=words[j]; if(index[j]==-1||s.charAt(index[j])!=c) { continue; } match=true; if(index[j]==s.length()-1) { index[j]=-1; res++; }else { index[j]+=1; } } } return res; } public static void main(String[] args) { String[]words= {"a", "ba", "acd", "ace"}; System.out.println(numMatchingSubseq("abcde", words)); } }
[ "956281507@qq.com" ]
956281507@qq.com
8e4e50ca7b2b828875a928f6acb907dc2cb62683
89f0d8aad8ffd198732e6323580507b5d704b6c6
/Common/src/main/java/SOATestTool/Common/LinearRandomString.java
7446bc0ec932656d337c771ef14cab061b9557b2
[]
no_license
bannanvitya/SOATestTool
3d9870bbcfdef09363cd9e71f7885d3d6f5e5218
9dd2d3a062ccc600dd4351b1603995c399887b7d
refs/heads/master
2021-01-15T13:49:06.068593
2015-06-10T15:02:04
2015-06-10T15:02:04
29,597,607
0
0
null
null
null
null
UTF-8
Java
false
false
1,036
java
package SOATestTool.Common; import java.util.Random; /** * Created by vkhozhaynov on 08.06.2015. */ public class LinearRandomString { private static final char[] symbols; static { StringBuilder tmp = new StringBuilder(); for (char ch = '0'; ch <= '9'; ++ch) tmp.append(ch); for (char ch = 'a'; ch <= 'z'; ++ch) tmp.append(ch); symbols = tmp.toString().toCharArray(); } private final Random random = new Random(); private final char[] buf; public LinearRandomString(int length) { if (length < 1) throw new IllegalArgumentException("length < 1: " + length); buf = new char[length]; } public String nextString() { random.setSeed(System.currentTimeMillis()); for (int idx = 0; idx < buf.length; ++idx) buf[idx] = symbols[random.nextInt(symbols.length)]; return new String(buf); } }
[ "vkhozhaynov@vkhozhaynov.vrn.dataart.net" ]
vkhozhaynov@vkhozhaynov.vrn.dataart.net
80c6311bcb7d0d86c614d47a34aa889515c60830
3011429df346abc2d1320aa0d3881d7a53e7701e
/后端系列/Java/JavaTest1/src/com/company/DynamicProxyTest.java
3064800e102c99caf50865390b72239cb46b7f68
[]
no_license
1071157808/StudyCodes
8888e2199ab52635aa881c091e7d445e1232c1af
34293da56ffdfeab4bbffb49e2eb85da20417490
refs/heads/master
2022-02-24T14:48:13.986483
2019-06-02T13:52:55
2019-06-02T13:52:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,111
java
package com.company; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; /** * Created by yepeng on 2019/02/09. */ public class DynamicProxyTest { interface IHello { void sayHello(); } static class Hello implements IHello { @Override public void sayHello() { System.out.println("hello world"); } } static class DynamicProxy implements InvocationHandler { Object originalObj; Object bind(Object originalObj) { this.originalObj = originalObj; return Proxy.newProxyInstance(originalObj.getClass().getClassLoader(), originalObj.getClass().getInterfaces(), this); } @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { System.out.println("welcome"); return method.invoke(originalObj, args); } } public static void main(String[] args) { IHello hello = (IHello) new DynamicProxy().bind(new Hello()); hello.sayHello(); } }
[ "ypxf369@163.com" ]
ypxf369@163.com
df00fd8773963afcfdc77bcbc51498774ac8f6b8
e51487cbad6e4d668c68a34af0e3975f80437b0e
/day4/src/edu/skku/java/store/Test6.java
f5a68a69534693dcbcdb76844b63ea0f5d156bab
[]
no_license
jw0712/SWE3019
23daacd71d25e3a6bdb2785f0297bf09c31f172e
568602695ab340c04b78aee90ac718992585cf01
refs/heads/master
2020-03-08T14:41:23.666606
2018-06-07T12:09:27
2018-06-07T12:09:27
128,192,873
0
0
null
null
null
null
UHC
Java
false
false
302
java
package edu.skku.java.store; public class Test6 { public static void main(String[] args) { Pants p=new Pants(1234,100,"검정",5000,4,10); //memory pants와 shirt 모두 다 올라간다 System.out.println(p); // 마지막으로 정의된 pants의 toString을 print 한다 } }
[ "SKKU@115.145.20.133" ]
SKKU@115.145.20.133
190d697de98065f37af63e50a7815a3362acc852
ebddefec1d944341f55835df9deb902621f23297
/src/test/java/eigrp_displayer/CableTest.java
b45b06a70eeb0fa182175d1d1c8f333b733d9355
[]
no_license
SZOBogu/EIGRP_Displayer
eabb61cc586c75b51a4744b661dedbfc6986b962
93cdc29cbd3818c356995e846c802660f792b697
refs/heads/master
2021-05-21T03:21:45.016150
2020-07-06T09:48:24
2020-07-06T09:48:24
252,520,611
0
0
null
null
null
null
UTF-8
Java
false
false
4,238
java
package eigrp_displayer; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.Mockito; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; class CableTest { Cable cable = new Cable(); Cable cable0 = new Cable("Dummy Cable", 10, 11, 12,13); Device device = new EndDevice(); Device device1 = new EndDevice(); DeviceController controller = new DeviceController(device); DeviceController controller0 = new DeviceController(device1); @BeforeEach void init(){ cable.setDevice1(controller); cable.setDevice2(controller0); } @Test void getName() { assertEquals("Ethernet Cable", cable.getName()); assertEquals("Dummy Cable", cable0.getName()); } @Test void setName() { cable.setName("Test"); assertEquals("Test", cable.getName()); } @Test void getBandwidth() { assertEquals(100000, cable.getBandwidth()); assertEquals(10, cable0.getBandwidth()); } @Test void setBandwidth() { cable.setBandwidth(2); assertEquals(2, cable.getBandwidth()); } @Test void getDelay() { assertEquals(100, cable.getDelay()); assertEquals(11, cable0.getDelay()); } @Test void setDelay() { cable.setDelay(3); assertEquals(3, cable.getDelay()); } @Test void getLoad() { assertEquals(10, cable.getLoad()); assertEquals(12, cable0.getLoad()); } @Test void setLoad() { cable.setLoad(4); assertEquals(4, cable.getLoad()); } @Test void getReliability() { assertEquals(10, cable.getReliability()); assertEquals(13, cable0.getReliability()); } @Test void setReliability() { cable.setReliability(5); assertEquals(5, cable.getReliability()); } @Test void getDevice1() { assertEquals(controller ,cable.getDevice1()); } @Test void setDevice1() { cable.setDevice1(controller0); assertEquals(controller0 ,cable.getDevice1()); } @Test void getDevice2() { assertEquals(controller0 ,cable.getDevice2()); } @Test void setDevice2() { cable.setDevice2(controller); assertEquals(controller ,cable.getDevice2()); } @Test void linkDevice(){ assertNull(cable0.getDevice1()); assertNull(cable0.getDevice2()); cable0.linkDevice(controller); assertEquals(controller, cable0.getDevice1()); assertNull(cable0.getDevice2()); assertEquals(cable0, controller.getDevice().getDeviceInterfaces()[0].getConnection()); cable0.linkDevice(controller0); assertEquals(controller, cable0.getDevice1()); assertEquals(controller0, cable0.getDevice2()); assertEquals(cable0, controller0.getDevice().getDeviceInterfaces()[0].getConnection()); } @Test void getOtherDevice() { assertEquals(controller0, cable.getOtherDevice(controller)); assertEquals(controller, cable.getOtherDevice(controller0)); cable.setDevice1(null); assertNull(cable.getOtherDevice(controller)); assertNull(cable.getOtherDevice(controller0)); } @Test void linkDevices() { cable.linkDevices(controller, controller0); assertEquals(controller, cable.getDevice1()); assertEquals(controller0, cable.getDevice2()); assertEquals(cable, controller.getDevice().getDeviceInterfaces()[0].getConnection()); assertEquals(cable, controller0.getDevice().getDeviceInterfaces()[0].getConnection()); } @Test void testToString(){ cable.linkDevices(controller, controller0); IPAddress ip = Mockito.mock(IPAddress.class); IPAddress ip0 = Mockito.mock(IPAddress.class); controller.getDevice().setIp_address(ip); controller0.getDevice().setIp_address(ip0); String string = cable.getName() + " between " + controller.getDevice().toString() + " and " + controller0.getDevice().toString(); assertEquals(string, cable.toString()); } }
[ "adambozek1@gmail.com" ]
adambozek1@gmail.com
cf7878503363eec77a809853acaaadd10f90983d
7b282b0859c247ecac006774f11b854dad46d7e7
/openCVLibrary2410/src/main/java/org/opencv/android/CameraBridgeViewBase.java
3661676f9a26aee095a513b220068fed77edb2a3
[]
no_license
truongluuxuan/KhoMaHi
72e244a4c8621f31400cd218851147af304eb633
74646e096ab308e9ba995a2be657509906bccc08
refs/heads/master
2020-03-17T21:35:49.446824
2018-05-23T10:38:43
2018-05-23T10:38:43
133,962,396
0
0
null
null
null
null
UTF-8
Java
false
false
22,373
java
package org.opencv.android; import java.util.List; import org.opencv.R; import org.opencv.android.Utils; import org.opencv.core.Core; import org.opencv.core.Mat; import org.opencv.core.Point; import org.opencv.core.Size; import org.opencv.highgui.Highgui; import org.opencv.imgproc.Imgproc; import android.app.Activity; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.res.Configuration; import android.content.res.TypedArray; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Matrix; import android.graphics.Paint; import android.graphics.Rect; import android.util.AttributeSet; import android.util.Log; import android.view.Surface; import android.view.SurfaceHolder; import android.view.SurfaceView; /** * This is a basic class, implementing the interaction with Camera and OpenCV library. * The main responsibility of it - is to control when camera can be enabled, process the frame, * call external listener to make any adjustments to the frame and then draw the resulting * frame to the screen. * The clients shall implement CvCameraViewListener. */ public abstract class CameraBridgeViewBase extends SurfaceView implements SurfaceHolder.Callback { private static final String TAG = "CameraBridge"; private static final int MAX_UNSPECIFIED = -1; private static final int STOPPED = 0; private static final int STARTED = 1; private int mState = STOPPED; private Bitmap mCacheBitmap; private CvCameraViewListener2 mListener; private boolean mSurfaceExist; private Object mSyncObject = new Object(); protected int mFrameWidth; protected int mFrameHeight; protected int mMaxHeight; protected int mMaxWidth; protected float mScale = 0; protected int mPreviewFormat = Highgui.CV_CAP_ANDROID_COLOR_FRAME_RGBA; protected int mCameraIndex = CAMERA_ID_ANY; protected boolean mEnabled; protected FpsMeter mFpsMeter = null; public static final int CAMERA_ID_ANY = -1; public static final int CAMERA_ID_BACK = 99; public static final int CAMERA_ID_FRONT = 98; public CameraBridgeViewBase(Context context, int cameraId) { super(context); mCameraIndex = cameraId; getHolder().addCallback(this); mMaxWidth = MAX_UNSPECIFIED; mMaxHeight = MAX_UNSPECIFIED; } public CameraBridgeViewBase(Context context, AttributeSet attrs) { super(context, attrs); int count = attrs.getAttributeCount(); Log.d(TAG, "Attr count: " + Integer.valueOf(count)); TypedArray styledAttrs = getContext().obtainStyledAttributes(attrs, R.styleable.CameraBridgeViewBase); if (styledAttrs.getBoolean(R.styleable.CameraBridgeViewBase_show_fps, false)) enableFpsMeter(); mCameraIndex = styledAttrs.getInt(R.styleable.CameraBridgeViewBase_camera_id, -1); getHolder().addCallback(this); mMaxWidth = MAX_UNSPECIFIED; mMaxHeight = MAX_UNSPECIFIED; styledAttrs.recycle(); } /** * Sets the camera index * @param cameraIndex new camera index */ public void setCameraIndex(int cameraIndex) { this.mCameraIndex = cameraIndex; } public interface CvCameraViewListener { /** * This method is invoked when camera preview has started. After this method is invoked * the frames will start to be delivered to client via the onCameraFrame() callback. * @param width - the width of the frames that will be delivered * @param height - the height of the frames that will be delivered */ public void onCameraViewStarted(int width, int height); /** * This method is invoked when camera preview has been stopped for some reason. * No frames will be delivered via onCameraFrame() callback after this method is called. */ public void onCameraViewStopped(); /** * This method is invoked when delivery of the frame needs to be done. * The returned values - is a modified frame which needs to be displayed on the screen. * TODO: pass the parameters specifying the format of the frame (BPP, YUV or RGB and etc) */ public Mat onCameraFrame(Mat inputFrame); } public interface CvCameraViewListener2 { /** * This method is invoked when camera preview has started. After this method is invoked * the frames will start to be delivered to client via the onCameraFrame() callback. * @param width - the width of the frames that will be delivered * @param height - the height of the frames that will be delivered */ public void onCameraViewStarted(int width, int height); /** * This method is invoked when camera preview has been stopped for some reason. * No frames will be delivered via onCameraFrame() callback after this method is called. */ public void onCameraViewStopped(); /** * This method is invoked when delivery of the frame needs to be done. * The returned values - is a modified frame which needs to be displayed on the screen. * TODO: pass the parameters specifying the format of the frame (BPP, YUV or RGB and etc) */ public Mat onCameraFrame(CvCameraViewFrame inputFrame); }; protected class CvCameraViewListenerAdapter implements CvCameraViewListener2 { public CvCameraViewListenerAdapter(CvCameraViewListener oldStypeListener) { mOldStyleListener = oldStypeListener; } public void onCameraViewStarted(int width, int height) { mOldStyleListener.onCameraViewStarted(width, height); } public void onCameraViewStopped() { mOldStyleListener.onCameraViewStopped(); } public Mat onCameraFrame(CvCameraViewFrame inputFrame) { // Mat result = null; // switch (mPreviewFormat) { // case Highgui.CV_CAP_ANDROID_COLOR_FRAME_RGBA: // result = mOldStyleListener.onCameraFrame(inputFrame.rgba()); // break; // case Highgui.CV_CAP_ANDROID_GREY_FRAME: // result = mOldStyleListener.onCameraFrame(inputFrame.gray()); // break; // default: // Log.e(TAG, "Invalid frame format! Only RGBA and Gray Scale are supported!"); // }; // // return result; Mat mRgba = inputFrame.rgba(); Mat mGray = inputFrame.gray(); Mat rotImage = Imgproc.getRotationMatrix2D(new Point(mRgba.cols()/2, mRgba.rows()/2), -90, 1.0); Imgproc.warpAffine(mRgba, mRgba, rotImage, mRgba.size()); Imgproc.warpAffine(mGray, mGray, rotImage, mRgba.size()); return rotImage; } public void setFrameFormat(int format) { mPreviewFormat = format; } private int mPreviewFormat = Highgui.CV_CAP_ANDROID_COLOR_FRAME_RGBA; private CvCameraViewListener mOldStyleListener; }; /** * This class interface is abstract representation of single frame from camera for onCameraFrame callback * Attention: Do not use objects, that represents this interface out of onCameraFrame callback! */ public interface CvCameraViewFrame { /** * This method returns RGBA Mat with frame */ public Mat rgba(); /** * This method returns single channel gray scale Mat with frame */ public Mat gray(); }; public void surfaceChanged(SurfaceHolder arg0, int arg1, int arg2, int arg3) { Log.d(TAG, "call surfaceChanged event"); synchronized(mSyncObject) { if (!mSurfaceExist) { mSurfaceExist = true; checkCurrentState(); } else { /** Surface changed. We need to stop camera and restart with new parameters */ /* Pretend that old surface has been destroyed */ mSurfaceExist = false; checkCurrentState(); /* Now use new surface. Say we have it now */ mSurfaceExist = true; checkCurrentState(); } } } public void surfaceCreated(SurfaceHolder holder) { /* Do nothing. Wait until surfaceChanged delivered */ } public void surfaceDestroyed(SurfaceHolder holder) { synchronized(mSyncObject) { mSurfaceExist = false; checkCurrentState(); } } /** * This method is provided for clients, so they can enable the camera connection. * The actual onCameraViewStarted callback will be delivered only after both this method is called and surface is available */ public void enableView() { synchronized(mSyncObject) { mEnabled = true; checkCurrentState(); } } /** * This method is provided for clients, so they can disable camera connection and stop * the delivery of frames even though the surface view itself is not destroyed and still stays on the scren */ public void disableView() { synchronized(mSyncObject) { mEnabled = false; checkCurrentState(); } } /** * This method enables label with fps value on the screen */ public void enableFpsMeter() { if (mFpsMeter == null) { mFpsMeter = new FpsMeter(); mFpsMeter.setResolution(mFrameWidth, mFrameHeight); } } public void disableFpsMeter() { mFpsMeter = null; } /** * * @param listener */ public void setCvCameraViewListener(CvCameraViewListener2 listener) { mListener = listener; } public void setCvCameraViewListener(CvCameraViewListener listener) { CvCameraViewListenerAdapter adapter = new CvCameraViewListenerAdapter(listener); adapter.setFrameFormat(mPreviewFormat); mListener = adapter; } /** * This method sets the maximum size that camera frame is allowed to be. When selecting * size - the biggest size which less or equal the size set will be selected. * As an example - we set setMaxFrameSize(200,200) and we have 176x152 and 320x240 sizes. The * preview frame will be selected with 176x152 size. * This method is useful when need to restrict the size of preview frame for some reason (for example for video recording) * @param maxWidth - the maximum width allowed for camera frame. * @param maxHeight - the maximum height allowed for camera frame */ public void setMaxFrameSize(int maxWidth, int maxHeight) { mMaxWidth = maxWidth; mMaxHeight = maxHeight; } public void SetCaptureFormat(int format) { mPreviewFormat = format; if (mListener instanceof CvCameraViewListenerAdapter) { CvCameraViewListenerAdapter adapter = (CvCameraViewListenerAdapter) mListener; adapter.setFrameFormat(mPreviewFormat); } } /** * Called when mSyncObject lock is held */ private void checkCurrentState() { int targetState; if (mEnabled && mSurfaceExist && getVisibility() == VISIBLE) { targetState = STARTED; } else { targetState = STOPPED; } if (targetState != mState) { /* The state change detected. Need to exit the current state and enter target state */ processExitState(mState); mState = targetState; processEnterState(mState); } } private void processEnterState(int state) { switch(state) { case STARTED: onEnterStartedState(); if (mListener != null) { mListener.onCameraViewStarted(mFrameWidth, mFrameHeight); } break; case STOPPED: onEnterStoppedState(); if (mListener != null) { mListener.onCameraViewStopped(); } break; }; } private void processExitState(int state) { switch(state) { case STARTED: onExitStartedState(); break; case STOPPED: onExitStoppedState(); break; }; } private void onEnterStoppedState() { /* nothing to do */ } private void onExitStoppedState() { /* nothing to do */ } // NOTE: The order of bitmap constructor and camera connection is important for android 4.1.x // Bitmap must be constructed before surface private void onEnterStartedState() { /* Connect camera */ if (!connectCamera(getWidth(), getHeight())) { AlertDialog ad = new AlertDialog.Builder(getContext()).create(); ad.setCancelable(false); // This blocks the 'BACK' button ad.setMessage("It seems that you device does not support camera (or it is locked). Application will be closed."); ad.setButton(DialogInterface.BUTTON_NEUTRAL, "OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); ((Activity) getContext()).finish(); } }); ad.show(); } } private void onExitStartedState() { disconnectCamera(); if (mCacheBitmap != null) { mCacheBitmap.recycle(); } } /** * This method shall be called by the subclasses when they have valid * object and want it to be delivered to external client (via callback) and * then displayed on the screen. * @param frame - the current frame to be delivered */ protected void deliverAndDrawFrame(CvCameraViewFrame frame) { Mat modified; if (mListener != null) { modified = mListener.onCameraFrame(frame); } else { modified = frame.rgba(); } boolean bmpValid = true; if (modified != null) { try { Utils.matToBitmap(modified, mCacheBitmap); } catch(Exception e) { Log.e(TAG, "Mat type: " + modified); Log.e(TAG, "Bitmap type: " + mCacheBitmap.getWidth() + "*" + mCacheBitmap.getHeight()); Log.e(TAG, "Utils.matToBitmap() throws an exception: " + e.getMessage()); bmpValid = false; } } if (bmpValid && mCacheBitmap != null) { Canvas canvas = getHolder().lockCanvas(); if (canvas != null) { canvas.drawColor(0, android.graphics.PorterDuff.Mode.CLEAR); Matrix matrix = new Matrix(); matrix.preTranslate((canvas.getWidth() - mCacheBitmap.getWidth()) / 2,(canvas.getHeight() - mCacheBitmap.getHeight()) / 2); matrix.postRotate(-90f,(canvas.getWidth()) / 2,(canvas.getHeight()) / 2); float scale = (float) canvas.getWidth() / (float) mCacheBitmap.getHeight(); matrix.postScale(scale, scale, canvas.getWidth()/2 , canvas.getHeight()/2 ); canvas.drawBitmap(mCacheBitmap, matrix, new Paint()); canvas.rotate(-90f, canvas.getWidth()/2, canvas.getHeight()/2); Log.d(TAG, "mStretch value: " + mScale); if (mScale != 0) { canvas.drawBitmap(mCacheBitmap, new Rect(0,0,mCacheBitmap.getWidth(), mCacheBitmap.getHeight()), new Rect((int)((canvas.getWidth() - mScale*mCacheBitmap.getWidth()) / 2), (int)((canvas.getHeight() - mScale*mCacheBitmap.getHeight()) / 2), (int)((canvas.getWidth() - mScale*mCacheBitmap.getWidth()) / 2 + mScale*mCacheBitmap.getWidth()), (int)((canvas.getHeight() - mScale*mCacheBitmap.getHeight()) / 2 + mScale*mCacheBitmap.getHeight())), null); } else { canvas.drawBitmap(mCacheBitmap, new Rect(0,0,mCacheBitmap.getWidth(), mCacheBitmap.getHeight()), new Rect((canvas.getWidth() - mCacheBitmap.getWidth()) / 2, (canvas.getHeight() - mCacheBitmap.getHeight()) / 2, (canvas.getWidth() - mCacheBitmap.getWidth()) / 2 + mCacheBitmap.getWidth(), (canvas.getHeight() - mCacheBitmap.getHeight()) / 2 + mCacheBitmap.getHeight()), null); } if (mFpsMeter != null) { mFpsMeter.measure(); mFpsMeter.draw(canvas, 20, 30); } getHolder().unlockCanvasAndPost(canvas); } } // Mat modified; // // if (mListener != null) { // modified = mListener.onCameraFrame(frame); // } else { // modified = frame.rgba(); // } // // boolean bmpValid = true; // if (modified != null) { // try { // Utils.matToBitmap(modified, mCacheBitmap); // } catch(Exception e) { // Log.e(TAG, "Mat type: " + modified); // Log.e(TAG, "Bitmap type: " + mCacheBitmap.getWidth() + "*" + mCacheBitmap.getHeight()); // Log.e(TAG, "Utils.matToBitmap() throws an exception: " + e.getMessage()); // bmpValid = false; // } // } // // if (bmpValid && mCacheBitmap != null) { // Canvas canvas = getHolder().lockCanvas(); // if (canvas != null) { // //this is the rotation part // //canvas.save(); // Log.d(TAG,"CAMERAINDEX" + mCameraIndex); // canvas.rotate(-90f, canvas.getWidth()/2, canvas.getHeight()/2); //// if (getDisplay().getRotation() == Surface.ROTATION_0 && mCameraIndex == -1) { //// canvas.rotate(90, (canvas.getWidth()/ 2),(canvas.getHeight()/ 2)); //// } //// //// if(getDisplay().getRotation() == Surface.ROTATION_0 && mCameraIndex == 0){ //// canvas.rotate(90, (canvas.getWidth()/ 2),(canvas.getHeight()/ 2)); //// } //// //// if (getDisplay().getRotation() == Surface.ROTATION_0 && mCameraIndex == 1) { //// canvas.rotate(270, (canvas.getWidth()/ 2),(canvas.getHeight()/ 2)); //// } //// //// //// if (getDisplay().getRotation() == Surface.ROTATION_270) { //// canvas.rotate(180, (canvas.getWidth()/ 2),(canvas.getHeight()/ 2)); //// } // // if (mScale != 0) { // // Rect rect = canvas.getClipBounds(); // // canvas.drawBitmap(mCacheBitmap, new Rect(0,0,mCacheBitmap.getWidth(), mCacheBitmap.getHeight()), rect, null); // // } else { // canvas.drawBitmap(mCacheBitmap, new Rect(0,0,mCacheBitmap.getWidth(), mCacheBitmap.getHeight()), // new Rect((canvas.getWidth() - mCacheBitmap.getWidth()) / 2, // (canvas.getHeight() - mCacheBitmap.getHeight()) / 2, // (canvas.getWidth() - mCacheBitmap.getWidth()) / 2 + mCacheBitmap.getWidth(), // (canvas.getHeight() - mCacheBitmap.getHeight()) / 2 + mCacheBitmap.getHeight()), null); // } // // if (mFpsMeter != null) { // mFpsMeter.measure(); // mFpsMeter.draw(canvas, 20, 30); // } // // //canvas.restore(); // getHolder().unlockCanvasAndPost(canvas); // } // } } /** * This method is invoked shall perform concrete operation to initialize the camera. * CONTRACT: as a result of this method variables mFrameWidth and mFrameHeight MUST be * initialized with the size of the Camera frames that will be delivered to external processor. * @param width - the width of this SurfaceView * @param height - the height of this SurfaceView */ protected abstract boolean connectCamera(int width, int height); /** * Disconnects and release the particular camera object being connected to this surface view. * Called when syncObject lock is held */ protected abstract void disconnectCamera(); // NOTE: On Android 4.1.x the function must be called before SurfaceTextre constructor! protected void AllocateCache() { mCacheBitmap = Bitmap.createBitmap(mFrameWidth, mFrameHeight, Bitmap.Config.ARGB_8888); } public interface ListItemAccessor { public int getWidth(Object obj); public int getHeight(Object obj); }; /** * This helper method can be called by subclasses to select camera preview size. * It goes over the list of the supported preview sizes and selects the maximum one which * fits both values set via setMaxFrameSize() and surface frame allocated for this view * @param supportedSizes * @param surfaceWidth * @param surfaceHeight * @return optimal frame size */ protected Size calculateCameraFrameSize(List<?> supportedSizes, ListItemAccessor accessor, int surfaceWidth, int surfaceHeight) { int calcWidth = 0; int calcHeight = 0; int maxAllowedWidth = (mMaxWidth != MAX_UNSPECIFIED && mMaxWidth < surfaceWidth)? mMaxWidth : surfaceWidth; int maxAllowedHeight = (mMaxHeight != MAX_UNSPECIFIED && mMaxHeight < surfaceHeight)? mMaxHeight : surfaceHeight; for (Object size : supportedSizes) { int width = accessor.getWidth(size); int height = accessor.getHeight(size); if (width <= maxAllowedWidth && height <= maxAllowedHeight) { if (width >= calcWidth && height >= calcHeight) { calcWidth = (int) width; calcHeight = (int) height; } } } return new Size(calcWidth, calcHeight); } }
[ "luuxuantruong90@gmail.com" ]
luuxuantruong90@gmail.com
89dbc47732a2e978cced15d62e4fa50c54e8b69b
04e86440f2ffdabd9e59dd2094ad7a96ffe4d0b4
/src/exercise1/HelloFdiba.java
5a69cf71800a1b4c2812ffd32632382a1e15d184
[]
no_license
fdiba-inf/ubung-1-elizabethbo02
f34778beb053722c158bb203989a5d06344f56d7
2fa32f5e285584ebb15109f2f3f2dfae3c4fb9e8
refs/heads/master
2023-08-16T13:31:17.894244
2021-10-14T08:09:34
2021-10-14T08:09:34
417,034,670
0
0
null
null
null
null
UTF-8
Java
false
false
146
java
package exercise1; public class HelloFdiba { public static void main(String[] args) { System.out.println("Hello FDIBA!"); } }
[ "" ]
4112030e377ed1245bdb98603313f8127d97f08c
0eb219bc9acdcbf08f230c1e00bbad84eb33b649
/Smarket/app/src/main/java/com/example/talit/smarket/ActConsumers/PaginaInicialConsumidor.java
456bb6aff7b9eeeef241c3009d3aceed2f3681b5
[]
no_license
SmarketResource/SmarketAndroid
2d30b64e3cec429852d3b8c1c2eff9ed90fb5f1e
14931b658168962ad2aa60cf9c68c95220d67813
refs/heads/master
2021-05-13T11:52:15.220629
2018-04-01T22:39:12
2018-04-01T22:39:12
117,143,262
0
0
null
null
null
null
UTF-8
Java
false
false
4,398
java
package com.example.talit.smarket.ActConsumers; import android.content.Intent; import android.graphics.drawable.Animatable; import android.graphics.drawable.AnimatedVectorDrawable; import android.graphics.drawable.Drawable; import android.support.design.widget.NavigationView; import android.support.graphics.drawable.AnimatedVectorDrawableCompat; import android.support.v4.view.GravityCompat; import android.support.v4.view.MenuItemCompat; import android.support.v4.widget.DrawerLayout; import android.support.v7.app.ActionBarDrawerToggle; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.text.Editable; import android.text.TextWatcher; import android.view.Gravity; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.widget.Button; import android.widget.EditText; import android.widget.ImageButton; import android.widget.ImageView; import android.widget.RelativeLayout; import com.example.talit.smarket.R; import com.example.talit.smarket.Sqlite.DbConn; public class PaginaInicialConsumidor extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener { private DbConn dbconn; private NavigationView navigationView; private DrawerLayout dl; private ImageView imgBtnMenu; private AnimatedVectorDrawableCompat menuRotation; private Animatable animatable; private EditText edtSearch; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.act_pagina_inicial_consumidor); dbconn = new DbConn(PaginaInicialConsumidor.this); Button btn = findViewById(R.id.button2); imgBtnMenu = findViewById(R.id.img_menu); dl = findViewById(R.id.drawer_layout); navigationView = findViewById(R.id.navigation_view); edtSearch = findViewById(R.id.edt_search); menuRotation = AnimatedVectorDrawableCompat.create(this,R.drawable.ic_menu_animatable); imgBtnMenu.setImageDrawable(menuRotation); animatable= (Animatable)imgBtnMenu.getDrawable(); navigationView.setNavigationItemSelectedListener(this); imgBtnMenu.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { dl.openDrawer(Gravity.LEFT); } }); btn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { dbconn.deleteConsumidor(); } }); edtSearch.addTextChangedListener(new TextWatcher() { @Override public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) { animatable.start(); } @Override public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) { } @Override public void afterTextChanged(Editable editable) { } }); } @SuppressWarnings("StatementWithEmptyBody") public boolean onNavigationItemSelected(MenuItem item) { // Handle navigation view item clicks here. int id = item.getItemId(); if (id == 1) { } else if (id == 1) { /*dbconn = new DbConn(PaginalnicialConsumidor.this); if (dbconn.selectConsumidor().getTpAcesso() == 2) { LoginManager.getInstance().logOut(); dbconn.deleteConsumidor(); dbconn.deleteHistorico(); startActivity(new Intent(getApplicationContext(), WelcomeScreen.class)); finish(); } else { dbconn.deleteConsumidor(); dbconn.deleteHistorico(); if (dbconn.totalItensCarrinho() > 0) { dbconn.deleteSacola(); } startActivity(new Intent(getApplicationContext(), WelcomeScreen.class)); finish(); }*/ } else if (id == 1) { }else if(id == 1){ }else if(id == 1){ } DrawerLayout drawer = findViewById(R.id.drawer_layout); drawer.closeDrawer(GravityCompat.START); return true; } }
[ "talita.santos.castro@gmail.com" ]
talita.santos.castro@gmail.com
7532533c00ea8c7fe8294b7c7e67efbcf0376367
de0f56af90798694d068f46717a75a86a4fd38fc
/app/src/main/java/mx/com/aries/listeners/OnLocationChangedListener.java
2374a6a20b016c8a5a1fe7129962336e10258724
[]
no_license
melitonmx/Aries_Android_Client
2b30f94322e5e6acc653ada41a375d76c3f75f79
2e9d4f11350252a395a37af8b00d74745e3e9a8a
refs/heads/master
2021-06-27T11:03:34.779154
2017-09-15T03:18:01
2017-09-15T03:18:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
162
java
package mx.com.aries.listeners; import android.location.Location; public interface OnLocationChangedListener { void onLocationChanged(Location location); }
[ "met.avila@outlook.com" ]
met.avila@outlook.com
8b4429d56f11a33d9011666952bd201c3adb7242
c3e52510afab4d23939e6f389c89e225e0a02d85
/app/src/main/java/com/example/administrator/wankuoportal/ui/GuZhuWoDe/MyReportActivity.java
e6fc3dc2eb8aafe8124a6a2ad666ea7442571cc2
[]
no_license
flsand/WanKuoportal
ade204fe80e1081812609fdcdde05df72f96c975
daee1c95b6e63cc6ea2fecedc228dd2d15fd4da3
refs/heads/master
2020-03-23T21:29:22.998318
2018-07-24T05:59:02
2018-07-24T05:59:28
142,110,689
0
0
null
null
null
null
UTF-8
Java
false
false
2,124
java
package com.example.administrator.wankuoportal.ui.GuZhuWoDe; import android.os.Bundle; import android.support.design.widget.TabLayout; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentPagerAdapter; import android.support.v4.view.ViewPager; import android.view.View; import android.widget.ImageView; import com.example.administrator.wankuoportal.R; import com.example.administrator.wankuoportal.fragment.jubao.FaJuBao_fragment; import com.example.administrator.wankuoportal.fragment.jubao.ShouJuBao_fragment; import com.example.administrator.wankuoportal.global.BaseActivity; public class MyReportActivity extends BaseActivity { private ImageView back; private TabLayout logintab; private ViewPager viewPagerlogin; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_report); this.viewPagerlogin = (ViewPager) findViewById(R.id.viewPager_login); this.logintab = (TabLayout) findViewById(R.id.login_tab); this.back = (ImageView) findViewById(R.id.back); back.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { finish(); } }); initview(); } private void initview() { viewPagerlogin.setAdapter(new FragmentPagerAdapter(getSupportFragmentManager()) { private String[] mTitles = new String[]{"我发起的举报", "我收到的举报"}; @Override public Fragment getItem(int position) { if (position == 1) { return new ShouJuBao_fragment(); } return new FaJuBao_fragment(); } @Override public int getCount() { return mTitles.length; } @Override public CharSequence getPageTitle(int position) { return mTitles[position]; } }); logintab.setupWithViewPager(viewPagerlogin); } }
[ "1156183505@qq.com" ]
1156183505@qq.com
70a9709658ae19072785eb5490e26c84a4ea2d12
781ffa6d90add1d4e0a83f59a581f78f7c53e061
/wheelview/src/main/java/com/contrarywind/interfaces/IPickerViewData.java
458b9029cb3ef59c6d59dc81a4a3d57f86437b0c
[ "Apache-2.0" ]
permissive
parry-li/PickViewForAndroid
6d9bab135783bc2e5e1f107fff2bb3a9b1837eb8
d543500d38107c765582a2a8f30db9365b2d95ac
refs/heads/master
2021-01-07T20:18:11.898429
2020-02-20T07:04:20
2020-02-20T07:04:20
241,810,252
1
0
null
null
null
null
UTF-8
Java
false
false
108
java
package com.contrarywind.interfaces; public interface IPickerViewData { String getPickerViewText(); }
[ "331940353@qq.com" ]
331940353@qq.com
ecd2f6b6ad6288cbc58defe2304d30293cbcbe2e
34724af49ca93f091be551016adf5ccb110020c6
/microservice1/src/main/java/com/daphne/cloud/microservice1/web/rest/EmployeeResource.java
5653b5399d4f4be9e490bf7e0b5c53d8244c379c
[]
no_license
jf8/spring-cloud
59b0e3143458bdcec3368230a539b2e85d68f1f9
a88d11da3eafc76de83fc2f7d8c1b77edce32a7f
refs/heads/master
2021-01-22T22:44:38.617489
2017-03-20T12:28:12
2017-03-20T12:28:12
85,574,152
0
0
null
null
null
null
UTF-8
Java
false
false
7,562
java
package com.daphne.cloud.microservice1.web.rest; import com.codahale.metrics.annotation.Timed; import com.daphne.cloud.microservice1.domain.Employee; import com.daphne.cloud.microservice1.repository.EmployeeRepository; import com.daphne.cloud.microservice1.repository.search.EmployeeSearchRepository; import com.daphne.cloud.microservice1.web.rest.util.HeaderUtil; import com.daphne.cloud.microservice1.web.rest.util.PaginationUtil; import com.daphne.cloud.microservice1.service.dto.EmployeeDTO; import com.daphne.cloud.microservice1.service.mapper.EmployeeMapper; import io.swagger.annotations.ApiParam; import io.github.jhipster.web.util.ResponseUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import java.net.URI; import java.net.URISyntaxException; import java.util.LinkedList; import java.util.List; import java.util.Optional; import java.util.stream.Collectors; import java.util.stream.StreamSupport; import static org.elasticsearch.index.query.QueryBuilders.*; /** * REST controller for managing Employee. */ @RestController @RequestMapping("/api") public class EmployeeResource { private final Logger log = LoggerFactory.getLogger(EmployeeResource.class); private static final String ENTITY_NAME = "employee"; private final EmployeeRepository employeeRepository; private final EmployeeMapper employeeMapper; private final EmployeeSearchRepository employeeSearchRepository; public EmployeeResource(EmployeeRepository employeeRepository, EmployeeMapper employeeMapper, EmployeeSearchRepository employeeSearchRepository) { this.employeeRepository = employeeRepository; this.employeeMapper = employeeMapper; this.employeeSearchRepository = employeeSearchRepository; } /** * POST /employees : Create a new employee. * * @param employeeDTO the employeeDTO to create * @return the ResponseEntity with status 201 (Created) and with body the new employeeDTO, or with status 400 (Bad Request) if the employee has already an ID * @throws URISyntaxException if the Location URI syntax is incorrect */ @PostMapping("/employees") @Timed public ResponseEntity<EmployeeDTO> createEmployee(@RequestBody EmployeeDTO employeeDTO) throws URISyntaxException { log.debug("REST request to save Employee : {}", employeeDTO); if (employeeDTO.getId() != null) { return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, "idexists", "A new employee cannot already have an ID")).body(null); } Employee employee = employeeMapper.employeeDTOToEmployee(employeeDTO); employee = employeeRepository.save(employee); EmployeeDTO result = employeeMapper.employeeToEmployeeDTO(employee); employeeSearchRepository.save(employee); return ResponseEntity.created(new URI("/api/employees/" + result.getId())) .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString())) .body(result); } /** * PUT /employees : Updates an existing employee. * * @param employeeDTO the employeeDTO to update * @return the ResponseEntity with status 200 (OK) and with body the updated employeeDTO, * or with status 400 (Bad Request) if the employeeDTO is not valid, * or with status 500 (Internal Server Error) if the employeeDTO couldnt be updated * @throws URISyntaxException if the Location URI syntax is incorrect */ @PutMapping("/employees") @Timed public ResponseEntity<EmployeeDTO> updateEmployee(@RequestBody EmployeeDTO employeeDTO) throws URISyntaxException { log.debug("REST request to update Employee : {}", employeeDTO); if (employeeDTO.getId() == null) { return createEmployee(employeeDTO); } Employee employee = employeeMapper.employeeDTOToEmployee(employeeDTO); employee = employeeRepository.save(employee); EmployeeDTO result = employeeMapper.employeeToEmployeeDTO(employee); employeeSearchRepository.save(employee); return ResponseEntity.ok() .headers(HeaderUtil.createEntityUpdateAlert(ENTITY_NAME, employeeDTO.getId().toString())) .body(result); } /** * GET /employees : get all the employees. * * @param pageable the pagination information * @return the ResponseEntity with status 200 (OK) and the list of employees in body * @throws URISyntaxException if there is an error to generate the pagination HTTP headers */ @GetMapping("/employees") @Timed public ResponseEntity<List<EmployeeDTO>> getAllEmployees(@ApiParam Pageable pageable) { log.debug("REST request to get a page of Employees"); Page<Employee> page = employeeRepository.findAll(pageable); HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/api/employees"); return new ResponseEntity<>(employeeMapper.employeesToEmployeeDTOs(page.getContent()), headers, HttpStatus.OK); } /** * GET /employees/:id : get the "id" employee. * * @param id the id of the employeeDTO to retrieve * @return the ResponseEntity with status 200 (OK) and with body the employeeDTO, or with status 404 (Not Found) */ @GetMapping("/employees/{id}") @Timed public ResponseEntity<EmployeeDTO> getEmployee(@PathVariable Long id) { log.debug("REST request to get Employee : {}", id); Employee employee = employeeRepository.findOne(id); EmployeeDTO employeeDTO = employeeMapper.employeeToEmployeeDTO(employee); return ResponseUtil.wrapOrNotFound(Optional.ofNullable(employeeDTO)); } /** * DELETE /employees/:id : delete the "id" employee. * * @param id the id of the employeeDTO to delete * @return the ResponseEntity with status 200 (OK) */ @DeleteMapping("/employees/{id}") @Timed public ResponseEntity<Void> deleteEmployee(@PathVariable Long id) { log.debug("REST request to delete Employee : {}", id); employeeRepository.delete(id); employeeSearchRepository.delete(id); return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build(); } /** * SEARCH /_search/employees?query=:query : search for the employee corresponding * to the query. * * @param query the query of the employee search * @param pageable the pagination information * @return the result of the search * @throws URISyntaxException if there is an error to generate the pagination HTTP headers */ @GetMapping("/_search/employees") @Timed public ResponseEntity<List<EmployeeDTO>> searchEmployees(@RequestParam String query, @ApiParam Pageable pageable) { log.debug("REST request to search for a page of Employees for query {}", query); Page<Employee> page = employeeSearchRepository.search(queryStringQuery(query), pageable); HttpHeaders headers = PaginationUtil.generateSearchPaginationHttpHeaders(query, page, "/api/_search/employees"); return new ResponseEntity<>(employeeMapper.employeesToEmployeeDTOs(page.getContent()), headers, HttpStatus.OK); } }
[ "junfu.chen@outlook.com" ]
junfu.chen@outlook.com
9a96e27d3a30965d5b8540e8af3500f858d885a6
c562909ded05c0e6d7d68deb391eba2793f68ddb
/library/src/main/java/com/blunderer/materialdesignlibrary/activities/ViewPagerActivity.java
241b159975f5aa00db69724ca6967be5ce31fc92
[ "Apache-2.0" ]
permissive
randhika/material-design-library
36aed56c024bfcf6a777476a4357e7d31c118e99
3996eb8c58459f62b17ea45d897e90048b6128e1
refs/heads/master
2021-01-16T20:44:26.520248
2015-03-03T21:12:35
2015-03-03T21:12:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,963
java
package com.blunderer.materialdesignlibrary.activities; import android.os.Bundle; import android.support.v4.view.ViewPager; import android.view.View; import com.blunderer.materialdesignlibrary.R; import com.blunderer.materialdesignlibrary.adapters.ViewPagerWithTabsAdapter; import com.blunderer.materialdesignlibrary.handlers.ViewPagerHandler; import com.blunderer.materialdesignlibrary.models.ViewPagerItem; import com.viewpagerindicator.CirclePageIndicator; import java.util.List; public abstract class ViewPagerActivity extends AActivity { private List<ViewPagerItem> viewPagerItems; private final ViewPager.OnPageChangeListener mOnPageChangeListener = new ViewPager.OnPageChangeListener() { @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { } @Override public void onPageSelected(int position) { replaceTitle(viewPagerItems.get(position).getTitleResource()); } @Override public void onPageScrollStateChanged(int state) { } }; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState, R.layout.activity_view_pager); ViewPagerHandler handler = getViewPagerHandler(); if (handler != null && handler.getViewPagerItems() != null) viewPagerItems = handler.getViewPagerItems(); if (viewPagerItems != null && viewPagerItems.size() > 0) { ViewPager pager = (ViewPager) findViewById(R.id.viewpager); pager.setAdapter(new ViewPagerWithTabsAdapter(this, getSupportFragmentManager(), viewPagerItems)); int defaultViewPagerItemSelectedPosition = defaultViewPagerItemSelectedPosition(); if (defaultViewPagerItemSelectedPosition >= 0 && defaultViewPagerItemSelectedPosition < viewPagerItems.size()) pager.setCurrentItem(defaultViewPagerItemSelectedPosition); if (!showViewPagerIndicator()) { pager.setOnPageChangeListener(mOnPageChangeListener); } else { CirclePageIndicator viewPagerIndicator = (CirclePageIndicator) findViewById(R.id.viewpagerindicator); viewPagerIndicator.setViewPager(pager); viewPagerIndicator.setVisibility(View.VISIBLE); viewPagerIndicator.setOnPageChangeListener(mOnPageChangeListener); } replaceTitle(viewPagerItems.get(0).getTitleResource()); } } private void replaceTitle(int titleResource) { if (replaceActionBarTitleByViewPagerItemTitle()) getSupportActionBar().setTitle(titleResource); } protected abstract ViewPagerHandler getViewPagerHandler(); protected abstract boolean showViewPagerIndicator(); protected abstract boolean replaceActionBarTitleByViewPagerItemTitle(); protected abstract int defaultViewPagerItemSelectedPosition(); }
[ "mondon.denis@gmail.com" ]
mondon.denis@gmail.com
9ebf66b0a6e1bad49de4c6431348372545959b6f
fec0e81a1b936065615121b56241001f0d4424d5
/src/main/org/jhub1/agent/configuration/PropertiesUtils.java
acb4ae2c2f45bc53116cd1be1a0baf06a580e87f
[]
no_license
johnangularjs/jhub1online-agent
aa1b9860b049d33ef69aec149d394b37ee2c293e
e5566062f9d3c029bfbb03f34e39b15397bfb779
refs/heads/master
2021-01-10T10:00:11.097963
2014-07-01T17:19:02
2014-07-01T17:19:02
48,325,727
0
0
null
null
null
null
UTF-8
Java
false
false
1,287
java
/** * $Revision$ * $Date$ * * Copyright 2013 SoftCognito.org. * * All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jhub1.agent.configuration; import java.util.regex.Matcher; import java.util.regex.Pattern; public class PropertiesUtils { private static final String PATTERN = "^([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." + "([01]?\\d\\d?|2[0-4]\\d|25[0-5])$"; public static boolean validateIP(final String ip) { Pattern pattern = Pattern.compile(PATTERN); Matcher matcher = pattern.matcher(ip); return matcher.matches(); } public static boolean validatePort(int port) { if(port > 0 && port <= 65535) { return true; } return false; } }
[ "marek.kaszewski@googlemail.com" ]
marek.kaszewski@googlemail.com
64858a7294ff3b2df2ca5e0b38a0b3e9f2edd7b4
94f4b32a267dd6cd89235fd7c15a3fcce8bb9ec4
/crms/src/main/java/xmu/crms/CrmsApplication.java
bfb4371835bbbc8b85ec0708b1d10f1b21d9ddc2
[]
no_license
Zengnan1997/CourseManagement
b8944bf05f89f2cd449f56fd3236896f5e64c01b
3c4337b3d0a34771361f4d3a3e65c62a59f42c5b
refs/heads/master
2021-08-31T10:32:07.115168
2017-12-21T03:08:23
2017-12-21T03:08:23
114,610,777
1
0
null
null
null
null
UTF-8
Java
false
false
330
java
package xmu.crms; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; /** * @author Auto-generated */ @SpringBootApplication public class CrmsApplication { public static void main(String[] args) { SpringApplication.run(CrmsApplication.class, args); } }
[ "939799295@qq.com" ]
939799295@qq.com
c1d8418168d905b8f21e20587959f1ad1e05e283
da371006a02c6e80b68c32ae3bbdd32bc421c38a
/contribs/taxi/src/main/java/org/matsim/contrib/drt/taxibus/run/examples/RunSharedTaxiExample.java
17b935af3b2399f2e7c611b5b48d5760d54824ae
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
Udacity-repo/matsim
bf994ce83b50798bba6fc9d03f1d74fa6668a58f
7da270848e8b98f5447ed172a5115a1a27c48457
refs/heads/master
2020-12-02T22:08:09.188553
2017-06-27T16:06:40
2017-06-27T16:06:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,178
java
/* *********************************************************************** * * project: org.matsim.* * RunEmissionToolOffline.java * * * *********************************************************************** * * * * copyright : (C) 2009 by the members listed in the COPYING, * * LICENSE and WARRANTY file. * * email : info at matsim dot org * * * * *********************************************************************** * * * * 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. * * See also COPYING, LICENSE and WARRANTY file * * * * *********************************************************************** */ package org.matsim.contrib.drt.taxibus.run.examples; import org.matsim.api.core.v01.Scenario; import org.matsim.contrib.drt.taxibus.run.configuration.ConfigBasedTaxibusLaunchUtils; import org.matsim.contrib.drt.taxibus.run.configuration.TaxibusConfigGroup; import org.matsim.contrib.otfvis.OTFVisLiveModule; import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; import org.matsim.core.config.groups.QSimConfigGroup.SnapshotStyle; import org.matsim.core.controler.Controler; import org.matsim.core.controler.OutputDirectoryHierarchy.OverwriteFileSetting; import org.matsim.core.scenario.ScenarioUtils; import org.matsim.vis.otfvis.OTFVisConfigGroup; /** * @author jbischoff * An example of a shared taxi system using DRT / taxibus infrastructure. * A maximum of two passengers share a trip in this example. * */ public class RunSharedTaxiExample { public static void main(String[] args) { Config config = ConfigUtils.loadConfig("taxibus_example/configShared.xml", new TaxibusConfigGroup()); config.controler().setOverwriteFileSetting(OverwriteFileSetting.deleteDirectoryIfExists) ; config.qsim().setSnapshotStyle(SnapshotStyle.withHoles); OTFVisConfigGroup visConfig = ConfigUtils.addOrGetModule(config, OTFVisConfigGroup.GROUP_NAME, OTFVisConfigGroup.class ) ; visConfig.setAgentSize(250); visConfig.setLinkWidth(5); visConfig.setDrawNonMovingItems(true); visConfig.setDrawTime(true); final Scenario scenario = ScenarioUtils.loadScenario(config); Controler controler = new Controler(scenario); new ConfigBasedTaxibusLaunchUtils(controler).initiateTaxibusses(); //Comment out the following line in case you do not require OTFVis visualisation controler.addOverridingModule( new OTFVisLiveModule() ); controler.run(); } }
[ "bischoff@vsp.tu-berlin.de" ]
bischoff@vsp.tu-berlin.de
57703ed300fbe79f15e44a3adfb9a2b57091184e
e4b1d9b159abebe01b934f0fd3920c60428609ae
/src/main/java/org/proteored/miapeapi/xml/ge/autogenerated/MIAPEAlgorithmType.java
3e5b8e92fffffd96491434bb7c912677e7262c1a
[ "Apache-2.0" ]
permissive
smdb21/java-miape-api
83ba33cc61bf2c43c4049391663732c9cc39a718
5a49b49a3fed97ea5e441e85fe2cf8621b4e0900
refs/heads/master
2022-12-30T15:28:24.384176
2020-12-16T23:48:07
2020-12-16T23:48:07
67,961,174
0
0
Apache-2.0
2022-12-16T03:22:23
2016-09-12T00:01:29
Java
UTF-8
Java
false
false
7,112
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-257 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2011.07.18 at 02:51:38 PM CEST // package org.proteored.miapeapi.xml.ge.autogenerated; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for MIAPE_Algorithm_Type complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="MIAPE_Algorithm_Type"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="Name" type="{}ParamType"/> * &lt;element name="Manufacturer" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="Model" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="Version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="Description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="Parameters" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="Comments" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="Catalog_Number" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="URI" type="{http://www.w3.org/2001/XMLSchema}anyURI" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "MIAPE_Algorithm_Type", propOrder = { "name", "manufacturer", "model", "version", "description", "parameters", "comments", "catalogNumber", "uri" }) public class MIAPEAlgorithmType { @XmlElement(name = "Name", required = true) protected ParamType name; @XmlElement(name = "Manufacturer") protected String manufacturer; @XmlElement(name = "Model") protected String model; @XmlElement(name = "Version") protected String version; @XmlElement(name = "Description") protected String description; @XmlElement(name = "Parameters") protected String parameters; @XmlElement(name = "Comments") protected String comments; @XmlElement(name = "Catalog_Number") protected String catalogNumber; @XmlElement(name = "URI") @XmlSchemaType(name = "anyURI") protected String uri; /** * Gets the value of the name property. * * @return * possible object is * {@link ParamType } * */ public ParamType getName() { return name; } /** * Sets the value of the name property. * * @param value * allowed object is * {@link ParamType } * */ public void setName(ParamType value) { this.name = value; } /** * Gets the value of the manufacturer property. * * @return * possible object is * {@link String } * */ public String getManufacturer() { return manufacturer; } /** * Sets the value of the manufacturer property. * * @param value * allowed object is * {@link String } * */ public void setManufacturer(String value) { this.manufacturer = value; } /** * Gets the value of the model property. * * @return * possible object is * {@link String } * */ public String getModel() { return model; } /** * Sets the value of the model property. * * @param value * allowed object is * {@link String } * */ public void setModel(String value) { this.model = value; } /** * Gets the value of the version property. * * @return * possible object is * {@link String } * */ public String getVersion() { return version; } /** * Sets the value of the version property. * * @param value * allowed object is * {@link String } * */ public void setVersion(String value) { this.version = value; } /** * Gets the value of the description property. * * @return * possible object is * {@link String } * */ public String getDescription() { return description; } /** * Sets the value of the description property. * * @param value * allowed object is * {@link String } * */ public void setDescription(String value) { this.description = value; } /** * Gets the value of the parameters property. * * @return * possible object is * {@link String } * */ public String getParameters() { return parameters; } /** * Sets the value of the parameters property. * * @param value * allowed object is * {@link String } * */ public void setParameters(String value) { this.parameters = value; } /** * Gets the value of the comments property. * * @return * possible object is * {@link String } * */ public String getComments() { return comments; } /** * Sets the value of the comments property. * * @param value * allowed object is * {@link String } * */ public void setComments(String value) { this.comments = value; } /** * Gets the value of the catalogNumber property. * * @return * possible object is * {@link String } * */ public String getCatalogNumber() { return catalogNumber; } /** * Sets the value of the catalogNumber property. * * @param value * allowed object is * {@link String } * */ public void setCatalogNumber(String value) { this.catalogNumber = value; } /** * Gets the value of the uri property. * * @return * possible object is * {@link String } * */ public String getURI() { return uri; } /** * Sets the value of the uri property. * * @param value * allowed object is * {@link String } * */ public void setURI(String value) { this.uri = value; } }
[ "salvador@scripps.edu" ]
salvador@scripps.edu
c7b6cb83b3185d1b3e828f3bfce4e07adc69e249
43de94b0b89862bea12ac8f3dfddf0d5308febed
/loan-entity/src/main/java/com/zsy/loan/bean/exception/ParamException.java
4fcc68f2105535fd3672036ec0be4b61c962a699
[]
no_license
jn1981/loan
e75177099b6b9cc72a9898fd3a8d778a53abf003
499cad5fdf443a259c09d286a277f439232b3dd9
refs/heads/master
2021-04-07T17:41:20.867453
2020-03-23T06:19:10
2020-03-23T06:19:10
248,694,415
0
0
null
2020-03-20T07:33:31
2020-03-20T07:33:30
null
UTF-8
Java
false
false
222
java
package com.zsy.loan.bean.exception; public class ParamException extends Exception { public ParamException(String msg) { super(msg); } public ParamException(String msg, Throwable e) { super(msg, e); } }
[ "zhangxuehong@msjfkg.com" ]
zhangxuehong@msjfkg.com
f6f911c05fd88cecabda0ffa90c1f5c305ad0154
d32e45d74c318d76bb14c35380d4eeb65c4de7ef
/src/main/java/seava/bpet/home/dao/callback/OwnCallbacks.java
3b1b86a358ff137ebd3de564ac964460c09f5f58
[]
no_license
bpet0/bpet-home
9b9935ef23f2f2dbd13c9199ae5d3bc5f39a65fd
93bd8abcf06dc79cf7407b5d89abc1fdc5152d85
refs/heads/master
2021-05-06T02:17:40.328611
2018-01-07T14:32:34
2018-01-07T14:32:34
114,532,291
0
0
null
null
null
null
UTF-8
Java
false
false
974
java
package seava.bpet.home.dao.callback; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import org.nutz.dao.sql.Sql; import org.nutz.dao.sql.SqlCallback; /** * 自己实现的rs与meta类的转换 * @author WaterHsu * */ public class OwnCallbacks { public static SqlCallback object(final Rs2ObjectConverter<?> roc) { return new SqlCallback() { public Object invoke(Connection conn, ResultSet rs, Sql sql) throws SQLException { if (null != rs && rs.next()) { return roc.invoke(rs); } return null; } }; } public static SqlCallback objects(final Rs2ObjectConverter<?> roc) { return new SqlCallback() { public Object invoke(Connection conn, ResultSet rs, Sql sql) throws SQLException { List<Object> list = new ArrayList<Object>(); while (rs.next()) { list.add(roc.invoke(rs)); } return list; } }; } }
[ "hsupangfei1989@gmail.com" ]
hsupangfei1989@gmail.com
1d410f5f70bff5d00fe0f0b5b1024203ccac416f
0fd37dcf7b4e72bcbdf98bf2b620c0cc33a96677
/src/test/java/com/qiyan/utilities/ExcelReader.java
509d9bb6e75f8ee387f34a1020b3b82aeb0c774b
[ "Apache-2.0" ]
permissive
aidenbear06/Selenium
58f1ac512ee95164f91378747ee412783b5ae924
9b39c1af78515ee9a974cae1d67c7d1e33fbe632
refs/heads/master
2023-08-03T23:44:05.207749
2019-12-05T21:46:48
2019-12-05T21:46:48
209,864,982
0
0
Apache-2.0
2023-07-22T16:44:58
2019-09-20T19:19:38
HTML
UTF-8
Java
false
false
12,786
java
package com.qiyan.utilities; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.util.Calendar; import org.apache.poi.hssf.usermodel.HSSFCellStyle; import org.apache.poi.hssf.usermodel.HSSFDateUtil; import org.apache.poi.hssf.util.HSSFColor; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.CellStyle; import org.apache.poi.ss.usermodel.IndexedColors; import org.apache.poi.xssf.usermodel.XSSFCell; import org.apache.poi.xssf.usermodel.XSSFCellStyle; import org.apache.poi.xssf.usermodel.XSSFCreationHelper; import org.apache.poi.xssf.usermodel.XSSFFont; import org.apache.poi.xssf.usermodel.XSSFHyperlink; import org.apache.poi.xssf.usermodel.XSSFRow; import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook; public class ExcelReader { public String path; public FileInputStream fis = null; public FileOutputStream fileOut =null; private XSSFWorkbook workbook = null; private XSSFSheet sheet = null; private XSSFRow row =null; private XSSFCell cell = null; public ExcelReader(String path) { this.path=path; try { fis = new FileInputStream(path); workbook = new XSSFWorkbook(fis); sheet = workbook.getSheetAt(0); fis.close(); } catch (Exception e) { e.printStackTrace(); } } // returns the row count in a sheet public int getRowCount(String sheetName){ int index = workbook.getSheetIndex(sheetName); if(index==-1) return 0; else{ sheet = workbook.getSheetAt(index); int number=sheet.getLastRowNum()+1; return number; } } // returns the data from a cell public String getCellData(String sheetName,String colName,int rowNum){ try{ if(rowNum <=0) return ""; int index = workbook.getSheetIndex(sheetName); int col_Num=-1; if(index==-1) return ""; sheet = workbook.getSheetAt(index); row=sheet.getRow(0); for(int i=0;i<row.getLastCellNum();i++){ //System.out.println(row.getCell(i).getStringCellValue().trim()); if(row.getCell(i).getStringCellValue().trim().equals(colName.trim())) col_Num=i; } if(col_Num==-1) return ""; sheet = workbook.getSheetAt(index); row = sheet.getRow(rowNum-1); if(row==null) return ""; cell = row.getCell(col_Num); if(cell==null) return ""; if(cell.getCellType()==Cell.CELL_TYPE_STRING) return cell.getStringCellValue(); else if(cell.getCellType()==Cell.CELL_TYPE_NUMERIC || cell.getCellType()==Cell.CELL_TYPE_FORMULA ){ String cellText = String.valueOf(cell.getNumericCellValue()); if (HSSFDateUtil.isCellDateFormatted(cell)) { double d = cell.getNumericCellValue(); Calendar cal =Calendar.getInstance(); cal.setTime(HSSFDateUtil.getJavaDate(d)); cellText = (String.valueOf(cal.get(Calendar.YEAR))).substring(2); cellText = cal.get(Calendar.DAY_OF_MONTH) + "/" + cal.get(Calendar.MONTH)+1 + "/" + cellText; } return cellText; }else if(cell.getCellType()==Cell.CELL_TYPE_BLANK) return ""; else return String.valueOf(cell.getBooleanCellValue()); } catch(Exception e){ e.printStackTrace(); return "row "+rowNum+" or column "+colName +" does not exist in xls"; } } // returns the data from a cell public String getCellData(String sheetName,int colNum,int rowNum){ try{ if(rowNum <=0) return ""; int index = workbook.getSheetIndex(sheetName); if(index==-1) return ""; sheet = workbook.getSheetAt(index); row = sheet.getRow(rowNum-1); if(row==null) return ""; cell = row.getCell(colNum); if(cell==null) return ""; if(cell.getCellType()==Cell.CELL_TYPE_STRING) return cell.getStringCellValue(); else if(cell.getCellType()==Cell.CELL_TYPE_NUMERIC || cell.getCellType()==Cell.CELL_TYPE_FORMULA ){ String cellText = String.valueOf(cell.getNumericCellValue()); if (HSSFDateUtil.isCellDateFormatted(cell)) { // format in form of M/D/YY double d = cell.getNumericCellValue(); Calendar cal =Calendar.getInstance(); cal.setTime(HSSFDateUtil.getJavaDate(d)); cellText = (String.valueOf(cal.get(Calendar.YEAR))).substring(2); cellText = cal.get(Calendar.MONTH)+1 + "/" + cal.get(Calendar.DAY_OF_MONTH) + "/" + cellText; } return cellText; }else if(cell.getCellType()==Cell.CELL_TYPE_BLANK) return ""; else return String.valueOf(cell.getBooleanCellValue()); } catch(Exception e){ e.printStackTrace(); return "row "+rowNum+" or column "+colNum +" does not exist in xls"; } } // returns true if data is set successfully else false public boolean setCellData(String sheetName,String colName,int rowNum, String data){ try{ fis = new FileInputStream(path); workbook = new XSSFWorkbook(fis); if(rowNum<=0) return false; int index = workbook.getSheetIndex(sheetName); int colNum=-1; if(index==-1) return false; sheet = workbook.getSheetAt(index); row=sheet.getRow(0); for(int i=0;i<row.getLastCellNum();i++){ //System.out.println(row.getCell(i).getStringCellValue().trim()); if(row.getCell(i).getStringCellValue().trim().equals(colName)) colNum=i; } if(colNum==-1) return false; sheet.autoSizeColumn(colNum); row = sheet.getRow(rowNum-1); if (row == null) row = sheet.createRow(rowNum-1); cell = row.getCell(colNum); if (cell == null) cell = row.createCell(colNum); cell.setCellValue(data); fileOut = new FileOutputStream(path); workbook.write(fileOut); fileOut.close(); } catch(Exception e){ e.printStackTrace(); return false; } return true; } // returns true if data is set successfully else false public boolean setCellData(String sheetName,String colName,int rowNum, String data,String url){ try{ fis = new FileInputStream(path); workbook = new XSSFWorkbook(fis); if(rowNum<=0) return false; int index = workbook.getSheetIndex(sheetName); int colNum=-1; if(index==-1) return false; sheet = workbook.getSheetAt(index); row=sheet.getRow(0); for(int i=0;i<row.getLastCellNum();i++){ if(row.getCell(i).getStringCellValue().trim().equalsIgnoreCase(colName)) colNum=i; } if(colNum==-1) return false; sheet.autoSizeColumn(colNum); row = sheet.getRow(rowNum-1); if (row == null) row = sheet.createRow(rowNum-1); cell = row.getCell(colNum); if (cell == null) cell = row.createCell(colNum); cell.setCellValue(data); XSSFCreationHelper createHelper = workbook.getCreationHelper(); //cell style for hyperlinks CellStyle hlink_style = workbook.createCellStyle(); XSSFFont hlink_font = workbook.createFont(); hlink_font.setUnderline(XSSFFont.U_SINGLE); hlink_font.setColor(IndexedColors.BLUE.getIndex()); hlink_style.setFont(hlink_font); //hlink_style.setWrapText(true); XSSFHyperlink link = createHelper.createHyperlink(XSSFHyperlink.LINK_FILE); link.setAddress(url); cell.setHyperlink(link); cell.setCellStyle(hlink_style); fileOut = new FileOutputStream(path); workbook.write(fileOut); fileOut.close(); } catch(Exception e){ e.printStackTrace(); return false; } return true; } // returns true if sheet is created successfully else false public boolean addSheet(String sheetname){ FileOutputStream fileOut; try { workbook.createSheet(sheetname); fileOut = new FileOutputStream(path); workbook.write(fileOut); fileOut.close(); } catch (Exception e) { e.printStackTrace(); return false; } return true; } // returns true if sheet is removed successfully else false if sheet does not exist public boolean removeSheet(String sheetName){ int index = workbook.getSheetIndex(sheetName); if(index==-1) return false; FileOutputStream fileOut; try { workbook.removeSheetAt(index); fileOut = new FileOutputStream(path); workbook.write(fileOut); fileOut.close(); } catch (Exception e) { e.printStackTrace(); return false; } return true; } // returns true if column is created successfully public boolean addColumn(String sheetName,String colName){ try{ fis = new FileInputStream(path); workbook = new XSSFWorkbook(fis); int index = workbook.getSheetIndex(sheetName); if(index==-1) return false; XSSFCellStyle style = workbook.createCellStyle(); style.setFillForegroundColor(HSSFColor.GREY_40_PERCENT.index); style.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND); sheet=workbook.getSheetAt(index); row = sheet.getRow(0); if (row == null) row = sheet.createRow(0); if(row.getLastCellNum() == -1) cell = row.createCell(0); else cell = row.createCell(row.getLastCellNum()); cell.setCellValue(colName); cell.setCellStyle(style); fileOut = new FileOutputStream(path); workbook.write(fileOut); fileOut.close(); }catch(Exception e){ e.printStackTrace(); return false; } return true; } // removes a column and all the contents public boolean removeColumn(String sheetName, int colNum) { try{ if(!isSheetExist(sheetName)) return false; fis = new FileInputStream(path); workbook = new XSSFWorkbook(fis); sheet=workbook.getSheet(sheetName); XSSFCellStyle style = workbook.createCellStyle(); style.setFillForegroundColor(HSSFColor.GREY_40_PERCENT.index); XSSFCreationHelper createHelper = workbook.getCreationHelper(); style.setFillPattern(HSSFCellStyle.NO_FILL); for(int i =0;i<getRowCount(sheetName);i++){ row=sheet.getRow(i); if(row!=null){ cell=row.getCell(colNum); if(cell!=null){ cell.setCellStyle(style); row.removeCell(cell); } } } fileOut = new FileOutputStream(path); workbook.write(fileOut); fileOut.close(); } catch(Exception e){ e.printStackTrace(); return false; } return true; } // find whether sheets exists public boolean isSheetExist(String sheetName){ int index = workbook.getSheetIndex(sheetName); if(index==-1){ index=workbook.getSheetIndex(sheetName.toUpperCase()); if(index==-1) return false; else return true; } else return true; } // returns number of columns in a sheet public int getColumnCount(String sheetName){ // check if sheet exists if(!isSheetExist(sheetName)) return -1; sheet = workbook.getSheet(sheetName); row = sheet.getRow(0); if(row==null) return -1; return row.getLastCellNum(); } //String sheetName, String testCaseName,String keyword ,String URL,String message public boolean addHyperLink(String sheetName,String screenShotColName,String testCaseName,int index,String url,String message){ url=url.replace('\\', '/'); if(!isSheetExist(sheetName)) return false; sheet = workbook.getSheet(sheetName); for(int i=2;i<=getRowCount(sheetName);i++){ if(getCellData(sheetName, 0, i).equalsIgnoreCase(testCaseName)){ setCellData(sheetName, screenShotColName, i+index, message,url); break; } } return true; } public int getCellRowNum(String sheetName,String colName,String cellValue){ for(int i=2;i<=getRowCount(sheetName);i++){ if(getCellData(sheetName,colName , i).equalsIgnoreCase(cellValue)){ return i; } } return -1; } // to run this on stand alone public static void main(String arg[]) throws IOException{ ExcelReader datatable = null; datatable = new ExcelReader("C:\\CM3.0\\app\\test\\Framework\\AutomationBvt\\src\\config\\xlfiles\\Controller.xlsx"); for(int col=0 ;col< datatable.getColumnCount("TC5"); col++){ System.out.println(datatable.getCellData("TC5", col, 1)); } } }
[ "zqiyanx@gmail.com" ]
zqiyanx@gmail.com
c7e09085bb3e0b381eacfd165a202d44e08758a6
1243d5a11431ab24747ca8e8989810385e476607
/springwebapp/src/main/java/com/codaconsultancy/repository/User.java
28fe347df8846616bd73f3a32249349e69f100cb
[]
no_license
SteveBlance/springcb
538bc6b4bc1ebdfdb88c8c6f5b1343cafe311714
e3b3de68fd2a34fa7c8b9397bcd6cd5a2652ff0b
refs/heads/master
2021-01-11T14:44:02.410680
2017-03-14T15:34:32
2017-03-14T15:34:32
80,200,846
0
0
null
null
null
null
UTF-8
Java
false
false
1,093
java
package com.codaconsultancy.repository; import javax.persistence.*; import java.util.ArrayList; import java.util.List; @Entity public class User { @Id @GeneratedValue private Long id; @Column(name = "first_name") private String firstName; @Column(name = "age") private Integer age; @OneToMany(mappedBy = "user") private List<Post> posts = new ArrayList<Post>(); public User(String firstName, Integer age) { this.firstName = firstName; this.age = age; } public User() { } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public Integer getAge() { return age; } public void setAge(Integer age) { this.age = age; } public List<Post> getPosts() { return posts; } public void setPosts(List<Post> posts) { this.posts = posts; } }
[ "stephen.blance@gmail.com" ]
stephen.blance@gmail.com
dc6bdf6d6dbf4b177bd749458b72e1f10ba53598
bbdb7c1d6e024fedb8cd13252a69b1cad489ca10
/src/main/java/za/ac/cput/CollectionClass.java
3e18e73f21fa416716c9bfd7166625c36e38146e
[]
no_license
Hlombekazi/DataStructure
f105233dc29b4c7fb0c69c31b39e84428ccb788f
31cc600d2f09b59f89e6c729950f863742e61804
refs/heads/master
2023-04-24T20:22:19.222672
2021-05-16T20:12:32
2021-05-16T20:12:32
367,977,489
0
0
null
null
null
null
UTF-8
Java
false
false
533
java
package za.ac.cput; import java.util.*; public class CollectionClass { private Collection<Integer> runner = new ArrayList<Integer>() ; public int addRunner(int number) { runner.add(number); return number; } public int removerRunner(int number) { runner.remove(number); return number; } public int findRunner(int number) { runner.contains(number); return number; } public int sizeOfArray() { return runner.size(); } }
[ "hlombekazimbelu@gmail.com" ]
hlombekazimbelu@gmail.com
91f2fa007602616a5f98b36dbc3115f9f65181cb
28be1c2636a47771e061ded2b5b8721a431ed8e7
/lab5/src/Heap.java
0a6f3597ee7b3befbfd737c86f09d901f66632b7
[]
no_license
joannasroka/AiSD
6156f4ef719e269be090553ec331e16cc05b246c
700c8a96a43b3b804abc81f0f76bb2583c3a0670
refs/heads/master
2022-01-09T08:54:19.004106
2019-06-06T02:09:37
2019-06-06T02:09:37
175,266,096
0
0
null
null
null
null
UTF-8
Java
false
false
2,694
java
import java.util.ArrayList; import java.util.NoSuchElementException; public class Heap { private int lastIndex; private ArrayList<Integer> heap; public Heap() { heap = new ArrayList<>(); lastIndex = -1; // czyli tyle zmiesci } public void repairUp(int index) { // po dodaniu elementu, idzie w gore if (index == 0) return; if (heap.get((index - 1) / 2) < heap.get(index)) { int temp = heap.get((index - 1) / 2); heap.set((index - 1) / 2, heap.get(index)); heap.set(index, temp); repairUp((index - 1) / 2); } } public void repairDown(int index) { // po usunieciu szczytu, idzie w dol if (index == lastIndex) return; if (index * 2 + 1 > lastIndex) return; // nie ma lewego i prawego int left = heap.get(index*2+1); int right = heap.get(index*2+2); if (index * 2 + 2 <= lastIndex) { // ma lewe i prawe if(left>right){ if (heap.get(index) < left) { int temp = heap.get(index); heap.set(index, heap.get(index * 2 + 1)); heap.set(index * 2 + 1, temp); repairDown(index * 2 + 1); } } else { if (heap.get(index) < right) { int temp = heap.get(index); heap.set(index, heap.get(index * 2 + 2)); heap.set(index * 2 + 2, temp); repairDown(index * 2 + 2); } } } else { //ma tylko lewe if (heap.get(index) < left) { int temp = heap.get(index); heap.set(index, heap.get(index * 2 + 1)); heap.set(index * 2 + 1, temp); repairDown(index * 2 + 1); } } } public void add(int element) { heap.add(element); lastIndex++; repairUp(lastIndex); } public void add(ArrayList<Integer> sequences){ for (Integer element : sequences) { add(element); } } public void remove() throws NoSuchElementException { // usuwa korzen, czyli z najwieksza wartoscia if (heap.size() == 0) throw new NoSuchElementException(); System.out.println(" Usunieto: " + heap.get(0)); heap.set(0, heap.get(lastIndex)); heap.remove(lastIndex); lastIndex--; repairDown(0); } public void show (){ System.out.println(""); for (Integer element : heap) { System.out.print(element+" "); } } }
[ "joannasroka98@gmail.com" ]
joannasroka98@gmail.com
26d64ecba85cb103723c4e37297146639be62dce
cfafebee95b0e1ddc50c9e1edded3e3ee89b8cae
/servers/src/main/java/com/dreamy/enums/IndexSourceEnums.java
800a287041666297e559e8bb3fb2f05dfe2e27b8
[]
no_license
dreamyteam/dreamy_ip
88bc1b006abb5f1489ac6e70a8aa0969f18fb498
b7a1abf3dadaab94f6de901d98f884f03ca158e0
refs/heads/master
2021-01-21T04:41:07.791275
2016-06-23T07:17:42
2016-06-23T07:17:42
55,125,586
1
1
null
null
null
null
UTF-8
Java
false
false
1,200
java
package com.dreamy.enums; /** * Created with IntelliJ IDEA. * User: yujianfu (yujianfu@duotin.com) * Date: 16/4/28 * Time: 下午4:18 */ public enum IndexSourceEnums { baidu(1, "百度", "baidu", 0.5), s360(2, "360", "360", 0.35), weibo(3, "微博", "weibo", 0.15); private Integer type; private String description; private String name; private Double percent; IndexSourceEnums(Integer type, String description, String name, Double percent) { this.type = type; this.description = description; this.name = name; this.percent = percent; } public Double getPercent() { return percent; } public void setPercent(Double percent) { this.percent = percent; } public Integer getType() { return type; } public void setType(Integer type) { this.type = type; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
[ "jeff@dreamy.live" ]
jeff@dreamy.live
44ac666d0115c2a61e9095e1537c0aea2e3efbc4
b85e8152e924382bd59e23024ffee7b02e793a5f
/app/src/main/java/com/android/timesheet/user/weekly/WeeklyService.java
373e937b3129c60f0603beb93422b58c00c9001d
[]
no_license
prisaminfotech/TSAndroid
2753e4c5baa76926b3279f7ed613d52fb2a15973
ba3ebdbcc99d47796f5a7bb2fbe3107491dc287b
refs/heads/master
2021-06-25T21:53:39.911166
2017-09-12T06:14:31
2017-09-12T06:14:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
588
java
package com.android.timesheet.user.weekly; import com.android.timesheet.shared.models.User; import com.android.timesheet.shared.services.BaseService; import com.android.timesheet.shared.services.rest.IUserService; import rx.Observable; /** * Created by vamsikonanki on 8/23/2017. */ public class WeeklyService extends BaseService<IUserService>{ @Override protected IUserService prepare() { return super.prepare(IUserService.class); } public Observable getWeekReport(User user) { return observe(prepare().getWeekReport(user.empCode,"","")); } }
[ "konanki.vamsi7@gmail.com" ]
konanki.vamsi7@gmail.com
ee6631d8b330fbf0123fd7317939efb4d405daf6
45a50191e2ab03db4f2dc8311a0417bee9b51958
/sushe/src-instru/com/action/MyLog.java
aaea02ff9e55da94cbf0f3d9f447101408a83e43
[]
no_license
haolei126/myproject
80ce866fce65007c3fc3ea9114befb7860e29349
fb65ed9badeda6ad188fb30cf855632dfad94652
refs/heads/master
2021-05-18T10:07:36.796706
2020-03-30T04:58:31
2020-03-30T04:58:31
251,204,209
0
0
null
null
null
null
UTF-8
Java
false
false
2,474
java
// ZOA_CREATED! DO NOT EDIT IT! -- package com.action; import java.io.PrintWriter; import java.util.List; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.apache.struts2.ServletActionContext; import com.opensymphony.xwork2.ActionSupport; import com.bean.*; import com.dao.*; import com.process.ZoaExp; import com.process.ZoaThreadLocal; public class MyLog extends ActionSupport { //下面是Action内用于封装用户请求参数的属性 private List<TBBean> list; public List<TBBean> getList() { ZoaExp.N(ZoaThreadLocal.G_Ins().G_CInf() + " 1001 17 0 10368195"); return list; } public void setList(List<TBBean> list) { ZoaExp.N(ZoaThreadLocal.G_Ins().G_CInf() + " 1001 17 1 10368195"); this.list = list; } //处理用户请求的execute方法 public String execute() throws Exception { ZoaExp.N(ZoaThreadLocal.G_Ins().G_CInf() + " 1001 17 2 10368195"); ZoaExp.S(ZoaThreadLocal.G_Ins().G_CInf(),"ActionSupport","MyLog","10368195"); //解决乱码,用于页面输出 HttpServletResponse response=null; response=ServletActionContext.getResponse(); response.setContentType("text/html;charset=UTF-8"); response.setCharacterEncoding("UTF-8"); PrintWriter out = response.getWriter(); //创建session对象 HttpSession session = ServletActionContext.getRequest().getSession(); //验证是否正常登录 if((ZoaExp.N(ZoaThreadLocal.G_Ins().G_CInf() + " 1000 17 3 10368195")|| true) && (session.getAttribute("id")==null? (ZoaExp.ZoaMCDC(ZoaThreadLocal.G_Ins().G_CInf() + " 17 0 0 1 0 ","10368195",true,1) || true): (ZoaExp.ZoaMCDC(ZoaThreadLocal.G_Ins().G_CInf() + " 17 0 0 0 0 ","10368195",false,0) && false))){ZoaExp.N(ZoaThreadLocal.G_Ins().G_CInf() + " 1000 17 4 10368195");{ out.print("<script language='javascript'>alert('请重新登录!');window.location='Login.jsp';</script>"); out.flush();out.close();return null; } } ZoaExp.N(ZoaThreadLocal.G_Ins().G_CInf() + " 1000 17 6 10368195"); //查询所有 list=new TBDao().GetList("TB_TeacherID="+session.getAttribute("id"),"Building_Name"); return SUCCESS; } //判断是否空值 private boolean isInvalid(String value) { ZoaExp.N(ZoaThreadLocal.G_Ins().G_CInf() + " 1001 17 7 10368195"); return (value == null || value.length() == 0); } //测试 public static void main(String[] args) { ZoaExp.N(ZoaThreadLocal.G_Ins().G_CInf() + " 1001 17 8 10368195"); System.out.println(); } }
[ "370540665@qq.com" ]
370540665@qq.com
efe40128a145747f2b3551d36ab398f7df5a3864
ba7607c0ec7a90f12b7baf7b38a0e66a193df7e8
/src/org/usfirst/frc/team2890/robot/commands/WaitForBall.java
5fcd5c506fb7c008c50642350a8d3f4f98f9f3c2
[]
no_license
pvictorio/PacGoat-ps3
4a1138bd6da105f0a6ad70a25b56aa0fc024ff54
e04a0df0ece4bb2f6f9c2b4b6a50a7bbf1b7f6a1
refs/heads/master
2020-04-10T02:34:04.887563
2018-12-07T00:55:29
2018-12-07T00:55:29
160,747,362
0
0
null
null
null
null
UTF-8
Java
false
false
576
java
package org.usfirst.frc.team2890.robot.commands; import edu.wpi.first.wpilibj.command.Command; import org.usfirst.frc.team2890.robot.Robot; /** * Wait until the collector senses that it has the ball. This command does * nothing and is intended to be used in command groups to wait for this * condition. */ public class WaitForBall extends Command { public WaitForBall() { requires(Robot.collector); } // Make this return true when this Command no longer needs to run execute() @Override protected boolean isFinished() { return Robot.collector.hasBall(); } }
[ "patrick.victorio@gmail.com" ]
patrick.victorio@gmail.com
9725431827ef3b166fc41741ed7923838f46ba14
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
/Code Snippet Repository/Spring/Spring4299.java
34bfce4488b950d9747b3fce234d25972dabe47e
[]
no_license
saber13812002/DeepCRM
3336a244d4852a364800af3181e03e868cf6f9f5
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
refs/heads/master
2023-03-16T00:08:06.473699
2018-04-18T05:29:50
2018-04-18T05:29:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
427
java
protected static int findParameterIndex(Parameter parameter) { Executable executable = parameter.getDeclaringExecutable(); Parameter[] allParams = executable.getParameters(); for (int i = 0; i < allParams.length; i++) { if (parameter == allParams[i]) { return i; } } throw new IllegalArgumentException("Given parameter [" + parameter + "] does not match any parameter in the declaring executable"); }
[ "Qing.Mi@my.cityu.edu.hk" ]
Qing.Mi@my.cityu.edu.hk
ef30e5fb604cb8ca1f3c429d57b1984073552643
05e5bee54209901d233f4bfa425eb6702970d6ab
/net/minecraft/util/gnu/trove/list/TFloatList.java
1d705d5927d861a980e7fbb13fe7f1658014353f
[]
no_license
TheShermanTanker/PaperSpigot-1.7.10
23f51ff301e7eb05ef6a3d6999dd2c62175c270f
ea9d33bcd075e00db27b7f26450f9dc8e6d18262
refs/heads/master
2022-12-24T10:32:09.048106
2020-09-25T15:43:22
2020-09-25T15:43:22
298,614,646
0
1
null
null
null
null
UTF-8
Java
false
false
2,677
java
package net.minecraft.util.gnu.trove.list; import java.util.Random; import net.minecraft.util.gnu.trove.TFloatCollection; import net.minecraft.util.gnu.trove.function.TFloatFunction; import net.minecraft.util.gnu.trove.procedure.TFloatProcedure; public interface TFloatList extends TFloatCollection { float getNoEntryValue(); int size(); boolean isEmpty(); boolean add(float paramFloat); void add(float[] paramArrayOffloat); void add(float[] paramArrayOffloat, int paramInt1, int paramInt2); void insert(int paramInt, float paramFloat); void insert(int paramInt, float[] paramArrayOffloat); void insert(int paramInt1, float[] paramArrayOffloat, int paramInt2, int paramInt3); float get(int paramInt); float set(int paramInt, float paramFloat); void set(int paramInt, float[] paramArrayOffloat); void set(int paramInt1, float[] paramArrayOffloat, int paramInt2, int paramInt3); float replace(int paramInt, float paramFloat); void clear(); boolean remove(float paramFloat); float removeAt(int paramInt); void remove(int paramInt1, int paramInt2); void transformValues(TFloatFunction paramTFloatFunction); void reverse(); void reverse(int paramInt1, int paramInt2); void shuffle(Random paramRandom); TFloatList subList(int paramInt1, int paramInt2); float[] toArray(); float[] toArray(int paramInt1, int paramInt2); float[] toArray(float[] paramArrayOffloat); float[] toArray(float[] paramArrayOffloat, int paramInt1, int paramInt2); float[] toArray(float[] paramArrayOffloat, int paramInt1, int paramInt2, int paramInt3); boolean forEach(TFloatProcedure paramTFloatProcedure); boolean forEachDescending(TFloatProcedure paramTFloatProcedure); void sort(); void sort(int paramInt1, int paramInt2); void fill(float paramFloat); void fill(int paramInt1, int paramInt2, float paramFloat); int binarySearch(float paramFloat); int binarySearch(float paramFloat, int paramInt1, int paramInt2); int indexOf(float paramFloat); int indexOf(int paramInt, float paramFloat); int lastIndexOf(float paramFloat); int lastIndexOf(int paramInt, float paramFloat); boolean contains(float paramFloat); TFloatList grep(TFloatProcedure paramTFloatProcedure); TFloatList inverseGrep(TFloatProcedure paramTFloatProcedure); float max(); float min(); float sum(); } /* Location: D:\Paper-1.7.10\PaperSpigot-1.7.10-R0.1-SNAPSHOT-latest.jar!\net\minecraf\\util\gnu\trove\list\TFloatList.class * Java compiler version: 5 (49.0) * JD-Core Version: 1.1.3 */
[ "tanksherman27@gmail.com" ]
tanksherman27@gmail.com
78f7ddbdb2d742019547d9542b074c89a4269858
59f45fa39a3a741a65cffacea08cbece11c1e1b4
/src/Practice/ArrayLista.java
b46517e6c5ac15cfb359bbe4e9354917a8be5e5c
[]
no_license
rmehetre87/javaprogramms
15d9bfb8adaa0a5e18aeaea3015b8310ab52e27e
0a2e6a51015086f14374e0cc4234bd15de081205
refs/heads/master
2023-02-23T19:36:28.483251
2021-01-29T07:26:22
2021-01-29T07:26:22
326,078,312
0
0
null
null
null
null
UTF-8
Java
false
false
814
java
package Practice; import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; import javax.xml.transform.Templates; public class ArrayLista { public static void main(String[] args) { /*ArrayList<Integer> digits = new ArrayList<>(Arrays.asList(1,2,3,4,5,6)); Iterator<Integer> itr = digits.iterator(); while(itr.hasNext()) { System.out.println(itr.next()); }*/ // for loop ArrayList<Integer> digits1 = new ArrayList<>(Arrays.asList(1,2,3,4)); ArrayList<Integer> digits2 = new ArrayList<>(Arrays.asList(5,6,7,8)); //System.out.println( "Arralist size: "+digits.size()); for(Integer d1 : digits1) { for(Integer d2 : digits2) { int temp = digits1.get(1) + digits2.get(1); } } } }
[ "rahulmehetre21@gmail.com" ]
rahulmehetre21@gmail.com
771f977342f327f0e011afe3316d45b825db3c89
5e34243e2c87d136566f9403465277c3ffd5417d
/google-plus/ios/src/main/java/org/robovm/pods/google/plus/GPPDeepLinkDelegateAdapter.java
670d063400dce2cfc76508e8575b5b16a844794a
[]
no_license
ipsumgames/ipsum-robovm-robopods
6003ed38cf1d2167860fe6b61dd2ffcb34df1902
5ddc062d0ca561b018998ede4a78b541168bec92
refs/heads/master
2016-09-06T21:52:32.337362
2015-10-23T08:44:30
2015-10-23T08:44:48
41,791,776
2
0
null
null
null
null
UTF-8
Java
false
false
1,776
java
/* * Copyright (C) 2013-2015 RoboVM AB * * 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.robovm.pods.google.plus; /*<imports>*/ import java.io.*; import java.nio.*; import java.util.*; import org.robovm.objc.*; import org.robovm.objc.annotation.*; import org.robovm.objc.block.*; import org.robovm.rt.*; import org.robovm.rt.annotation.*; import org.robovm.rt.bro.*; import org.robovm.rt.bro.annotation.*; import org.robovm.rt.bro.ptr.*; import org.robovm.apple.foundation.*; import org.robovm.apple.uikit.*; import org.robovm.apple.coregraphics.*; import org.robovm.pods.google.opensource.*; /*</imports>*/ /*<javadoc>*/ /*</javadoc>*/ /*<annotations>*//*</annotations>*/ /*<visibility>*/public/*</visibility>*/ class /*<name>*/GPPDeepLinkDelegateAdapter/*</name>*/ extends /*<extends>*/NSObject/*</extends>*/ /*<implements>*/implements GPPDeepLinkDelegate/*</implements>*/ { /*<ptr>*/ /*</ptr>*/ /*<bind>*/ /*</bind>*/ /*<constants>*//*</constants>*/ /*<constructors>*//*</constructors>*/ /*<properties>*/ /*</properties>*/ /*<members>*//*</members>*/ /*<methods>*/ @NotImplemented("didReceiveDeepLink:") public void didReceiveDeepLink(GPPDeepLink deepLink) {} /*</methods>*/ }
[ "blueriverteam@gmail.com" ]
blueriverteam@gmail.com
227a4ad0607ecc8a1b3511bf0cb879840012e787
f7770e21f34ef093eb78dae21fd9bde99b6e9011
/src/main/java/com/hengyuan/hicash/service/validate/query/JxlOrgApiApplicationsVal.java
0cc6ebe326c4d1404291d1298bca9adf32561628
[]
no_license
webvul/HicashAppService
9ac8e50c00203df0f4666cd81c108a7f14a3e6e0
abf27908f537979ef26dfac91406c1869867ec50
refs/heads/master
2020-03-22T19:58:41.549565
2017-12-26T08:30:04
2017-12-26T08:30:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,894
java
package com.hengyuan.hicash.service.validate.query; import com.hengyuan.hicash.constant.ResultCodes; import com.hengyuan.hicash.parameters.request.user.JxlOrgApiApplicationsReq; import com.hengyuan.hicash.utils.RegexValidate; /** * @author blianke.qin * 2017年1月11日 下午6:51:13 * 类说明 */ public class JxlOrgApiApplicationsVal { private JxlOrgApiApplicationsReq Req; public JxlOrgApiApplicationsVal(JxlOrgApiApplicationsReq jxlOrgApiApplicationsReq){ this.Req=jxlOrgApiApplicationsReq; } /* *//** 用户名不能为空*//* public static final String USERNAME_ISNULL= "37510"; *//** time不能为空*//* public static final String TIME_ISNULL= "37511"; *//** 行业代码不能为空*//* public static final String IDDUSTRYCODE_ISNULL= "37512"; *//** 网站英文名称不能为空*//* public static final String WEBSITE_ISNULL= "37513"; *//** 服务密码不能为空*//* public static final String PASSWORD_ISNULL= "37514"; *//** 短信验证码不能为空*//* public static final String MESSAGE_ISNULL= "37515"; *//** 认证流水token不能为空*//* public static final String SEQ_NO_ISNULL= "37516"; *//** 短信类型不能为空*//* public static final String CURRENTMAGType_ISNULL= "37517";*/ public String validate(){ if (RegexValidate.isNull(Req.getIndustryCode())) { return ResultCodes.IDDUSTRYCODE_ISNULL; } if (RegexValidate.isNull(Req.getTime())) { return ResultCodes.TIME_ISNULL; } if(!Req.getTime().equals("1") && !Req.getTime().equals("2") && !Req.getTime().equals("3") && !Req.getTime().equals("4")){ return ResultCodes.TIME_EXCEPTION; } if ("2".equals(Req.getTime())) { if (RegexValidate.isNull(Req.getPassword())) { return ResultCodes.PASSWORD_ISNULL; } if (RegexValidate.isNull(Req.getSeq_no())) { return ResultCodes.SEQ_NO_ISNULL; } } else if ("3".equals(Req.getTime())) { if (RegexValidate.isNull(Req.getPassword())) { return ResultCodes.PASSWORD_ISNULL; } if (RegexValidate.isNull(Req.getMessage())) { return ResultCodes.MESSAGE_ISNULL; } if (RegexValidate.isNull(Req.getSeq_no())) { return ResultCodes.SEQ_NO_ISNULL; } if (RegexValidate.isNull(Req.getCurrentMsgType())) { return ResultCodes.CURRENTMAGType_ISNULL; } } else if ("4".equals(Req.getTime())) { if (RegexValidate.isNull(Req.getPassword())) { return ResultCodes.PASSWORD_ISNULL; } if (RegexValidate.isNull(Req.getSeq_no())) { return ResultCodes.SEQ_NO_ISNULL; } } if("SJZL".equals(Req.getIndustryCode())){ if (RegexValidate.isNull(Req.getMobile())) { return ResultCodes.SENDAMOUNTCODE_MOBILE_ISNULL; } if (RegexValidate.isNull(Req.getIdCard())) { return ResultCodes.REGISTER_IDCARD_ISNULL; } if (RegexValidate.isNull(Req.getName())) { return ResultCodes.REGISTER_REALNAME_ISNULL; } if (RegexValidate.isNull(Req.getFamilyName())) { return ResultCodes.STU_CONTACTS_FAMILY_NAME_NOTNULL; } if (RegexValidate.isNull(Req.getFamilyMobile())) { return ResultCodes.STU_CONTACTS_FAMILY_PHONE_NOTNULL; } if (RegexValidate.isNull(Req.getFamilyRelation())) { return ResultCodes.STU_CONTACTS_FAMILY_RELATION_NOTNULL; } if (RegexValidate.isNull(Req.getRelaName())) { return ResultCodes.STU_CONTACTS_CONTACT_NAME_NOTNULL; } if (RegexValidate.isNull(Req.getRelation())) { return ResultCodes.STU_CONTACTS_CONTACT_RELATION_NOTNULL; } if (RegexValidate.isNull(Req.getRelaMobile())) { return ResultCodes.STU_CONTACTS_CONTACT_PHONE_NOTNULL; } }else{ if (RegexValidate.isNull(Req.getUsername())) { return ResultCodes.USERNAME_ISNULL; } } return ResultCodes.NORMAL; } public JxlOrgApiApplicationsReq getReq() { return Req; } public void setReq(JxlOrgApiApplicationsReq req) { Req = req; } }
[ "hanlu@dpandora.cn" ]
hanlu@dpandora.cn
84f4dc94dcf351b31df4c7d7afd6be8f59b5f6a7
a8212151a11cbd6d48c20f86e21d6df441b5a95c
/BMI/BMI.Android/obj/Debug/81/android/src/md5d99125103e89c4bd4bca5aa8e739de5e/MainActivity.java
9f683fad40860441e933e48da1df6827bc36c17f
[]
no_license
Paulohers/BMI-XAMARIN
42e8c3e9cb058d861bb66a6da83a82b8d8e022ea
b4b4c25c67ac52af21229f8998ea519665f382e4
refs/heads/master
2020-11-24T10:35:16.465495
2019-12-15T02:25:13
2019-12-15T02:25:13
228,109,136
0
0
null
null
null
null
UTF-8
Java
false
false
1,077
java
package md5d99125103e89c4bd4bca5aa8e739de5e; public class MainActivity extends md51558244f76c53b6aeda52c8a337f2c37.FormsAppCompatActivity implements mono.android.IGCUserPeer { /** @hide */ public static final String __md_methods; static { __md_methods = "n_onCreate:(Landroid/os/Bundle;)V:GetOnCreate_Landroid_os_Bundle_Handler\n" + ""; mono.android.Runtime.register ("BMI.Droid.MainActivity, BMI.Android", MainActivity.class, __md_methods); } public MainActivity () { super (); if (getClass () == MainActivity.class) mono.android.TypeManager.Activate ("BMI.Droid.MainActivity, BMI.Android", "", this, new java.lang.Object[] { }); } public void onCreate (android.os.Bundle p0) { n_onCreate (p0); } private native void n_onCreate (android.os.Bundle p0); private java.util.ArrayList refList; public void monodroidAddReference (java.lang.Object obj) { if (refList == null) refList = new java.util.ArrayList (); refList.add (obj); } public void monodroidClearReferences () { if (refList != null) refList.clear (); } }
[ "rl_1998@hotmail.com" ]
rl_1998@hotmail.com
3ff8f54bd6e756e95e6e9b873125f749006a556c
dfb8b54fa16a4c0532b7863723c661258f21f2bb
/src/main/java/com/tong/thinking/chapter14/s02/p319/Initable.java
57986988e9f84d51b1e726cd7dc3dd0c6332449b
[]
no_license
Tong-c/javaBasic
86c52e2bb5b9e0eabe7f77ed675cda999cc32255
6cfb9e0e8f43d74fd5c2677cd251fec3cce799c4
refs/heads/master
2021-06-01T11:53:53.672254
2021-01-05T03:58:10
2021-01-05T03:58:10
130,291,741
2
0
null
2020-10-13T02:37:08
2018-04-20T01:28:16
Java
UTF-8
Java
false
false
261
java
package com.tong.thinking.chapter14.s02.p319; public class Initable { static final int staticFinal = 47; static final int staticFinal2 = ClassInitialization.rand.nextInt(1000); static { System.out.println("Initializing Initable"); } }
[ "1972376180@qq.com" ]
1972376180@qq.com
fa8dc74f7e7d8ccdfacbfc8d4417caa87640cbc0
08a2e765c0b1002c16a3d930fb912f9f377a80b8
/part-07/05.Searching/Searching.java
323fa66b2d6646df9a8f9ec5b1ac45cda6541fcc
[]
no_license
Podesta/mooc-java
618e76c67d3d4c4751cbb8caf305ba95af87fb1e
391da4d3b5995e10a20533f9c85a3cb48ce9add0
refs/heads/master
2023-07-09T10:41:22.191907
2021-08-15T00:05:55
2021-08-15T00:05:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,696
java
import java.util.ArrayList; import java.util.Scanner; public class Searching { public static void main(String[] args) { // The program below is meant for testing the search algorithms you'll write Scanner scanner = new Scanner(System.in); ArrayList<Book> books = new ArrayList<>(); System.out.println("How many books to create?"); int numberOfBooks = Integer.valueOf(scanner.nextLine()); for (int i = 0; i < numberOfBooks; i++) { books.add(new Book(i, "name for the book " + i)); } System.out.println("Id of the book to search for?"); int idToSearchFor = Integer.valueOf(scanner.nextLine()); System.out.println(""); System.out.println("Searching with linear search:"); long start = System.currentTimeMillis(); int linearSearchId = linearSearch(books, idToSearchFor); System.out.println("The search took " + (System.currentTimeMillis() - start) + " milliseconds."); if (linearSearchId < 0) { System.out.println("Book not found"); } else { System.out.println("Found it! " + books.get(linearSearchId)); } System.out.println(""); System.out.println(""); System.out.println("Seaching with binary search:"); start = System.currentTimeMillis(); int binarySearchId = binarySearch(books, idToSearchFor); System.out.println("The search took " + (System.currentTimeMillis() - start) + " milliseconds."); if (binarySearchId < 0) { System.out.println("Book not found"); } else { System.out.println("Found it! " + books.get(binarySearchId)); } } public static int linearSearch(ArrayList<Book> books, int searchedId) { int index = 0; for (Book book : books) { if (book.getId() == searchedId) { return index; } ++index; } return -1; } public static int binarySearch(ArrayList<Book> books, long searchedId) { int sizeOfList = books.size(); int beginning = 0; int end = sizeOfList - 1; int middle = (beginning + end) / 2; while (beginning <= end) { if (searchedId == books.get(middle).getId()) { return middle; } else if (searchedId > books.get(middle).getId()) { beginning = middle + 1; middle = (beginning + end) / 2; } else if (searchedId < books.get(middle).getId()) { end = middle - 1; middle = (beginning + end) / 2; } } return -1; } }
[ "11512008+Podesta@users.noreply.github.com" ]
11512008+Podesta@users.noreply.github.com
ac71e7544d657007b82b6d40c2f9c70864c556b3
4346327015eff0c73d75dc352179d97857a99e3f
/quickfixj-spring-boot-starter/src/main/java/ch/voulgarakis/spring/boot/starter/quickfixj/fix/session/FixSession.java
ab46fc7ae4a624d2819cc91e3cd73b2e70495834
[ "Apache-2.0" ]
permissive
gevoulga/spring-boot-quickfixj
104881abe36f60f312d09aa4cbfa259b6a28eb33
fa8b135bd32a1bc88e440ba6b170254bd07d8147
refs/heads/master
2021-11-22T13:51:54.528720
2021-10-12T11:15:33
2021-10-12T11:15:33
211,918,659
9
1
Apache-2.0
2020-11-12T20:34:44
2019-09-30T17:42:37
Java
UTF-8
Java
false
false
3,833
java
/* * Copyright (c) 2020 Georgios Voulgarakis * * 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 ch.voulgarakis.spring.boot.starter.quickfixj.fix.session; import ch.voulgarakis.spring.boot.starter.quickfixj.FixSessionInterface; import ch.voulgarakis.spring.boot.starter.quickfixj.session.utils.RefIdSelector; import quickfix.Message; import java.util.function.Consumer; import java.util.function.Function; import java.util.function.Predicate; public interface FixSession extends FixSessionInterface { /** * Send a message to the fix session. * * @param message the message that is to be sent. * @return the actual message that was sent by quickfixj engine (which incl. session tags etc.). */ Message send(Message message); /** * Subscribe to a stream of message in the Fix Session, with the specified scope-filter (selector). * Remember to close the subscription when the messages received from stream are no longer needed. * * @param messageSelector the scope filter that will check which messages received are relevant to this subscription. * @param onResponse the callback that will be invoked when a response FIX message is received by quickfixj. * @param onError the callback that will be invoked when an error is received by quickfixj. * @return AutoCloseable of the subscription to the fix messages, that match the filter criteria. */ Disposable subscribe(Predicate<Message> messageSelector, Consumer<Message> onResponse, Consumer<Throwable> onError); /** * Convenient method that allows to send a message to the fix session and then subscribe to the response(s) received for this message. * The responses are associated with the requests based on the requestId tag in the FIX messages. * * @param message the message that is to be sent. * @param onResponse the callback that will be invoked when a response FIX message is received by quickfixj. * @param onError the callback that will be invoked when an error is received by quickfixj. * @return AutoCloseable of the subscription to the fix messages received by the session associated with the request message, (based on requestId). */ default Disposable sendAndSubscribe(Message message, Consumer<Message> onResponse, Consumer<Throwable> onError) { return sendAndSubscribe(message, RefIdSelector::new, onResponse, onError); } /** * Convenient method that allows to send a message to the fix session and then subscribe to the response(s) received for this message. * The responses are associated with the requests based on the requestId tag in the FIX messages, using the {@link ch.voulgarakis.spring.boot.starter.quickfixj.session.utils.RefIdSelector}. * * @param message the message that is to be sent. * @param refIdSelectorSupplier a RefIdSelector that will associate a request with a response. * @return AutoCloseable of the subscription to the fix messages received by the session associated with the request message. */ Disposable sendAndSubscribe(Message message, Function<Message, RefIdSelector> refIdSelectorSupplier, Consumer<Message> onResponse, Consumer<Throwable> onError ); }
[ "mail@voulgarakis.ch" ]
mail@voulgarakis.ch
c554b4b34057617b139f19a917251b55c79ffe32
66f2678d0eab14c90bb1ed8708557bd138f46d59
/app/src/main/java/com/example/mymangacollection/models/Editora.java
81b17b246cbc4d3d7bb8d944acbd3ab234405ac1
[]
no_license
AdamsEric/MyMangaCollectionApp
ac9330e1c5d80d35e4cd79ad2f7217457dd1fe54
fbb875392a61713cc78db1a3a3e802ed8391d268
refs/heads/master
2022-12-30T21:44:09.256689
2020-10-20T23:30:32
2020-10-20T23:30:32
299,507,186
1
0
null
null
null
null
UTF-8
Java
false
false
525
java
package com.example.mymangacollection.models; import java.io.Serializable; public class Editora implements Serializable { private String id; private String nome; public Editora() { } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getNome() { return nome; } public void setNome(String nome) { this.nome = nome; } @Override public String toString() { return nome; } }
[ "eric.adsbrito@live.com" ]
eric.adsbrito@live.com
f074c49ca45d46cdcad9c6b3b514447da05c6709
aa058d511e38816436a6c34fbf27a1a35b405f74
/src/Link.java
80244363ef995c78a0d0c7756460e55eda68742b
[]
no_license
nggolu/Management-Information-System
102103f8934b59209085f8f571245996f73e0818
845b1403d7da37809b8eeaf0b3b31db803832f70
refs/heads/master
2021-07-01T05:38:11.371671
2017-09-20T08:22:26
2017-09-20T08:22:26
104,186,964
0
1
null
null
null
null
UTF-8
Java
false
false
2,412
java
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; /** * Servlet implementation class Link */ @WebServlet("/Link") public class Link extends HttpServlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#HttpServlet() */ public Link() { super(); // TODO Auto-generated constructor stub } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub } /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub String action = request.getParameter("action"); if("viewfaculty".equals(action)) { System.out.println("view faculty information: "); System.out.println("it's faculty view time"); } else if("viewurself".equals(action)) { System.out.println("view your information:"); System.out.println("it's user's view time"); } else if("viewfee".equals(action)) { System.out.println("view your fee details:"); System.out.println("it's fee time"); } else if("viewhistory".equals(action)) { System.out.println("view your HISTORY :p"); System.out.println("it's user's history time"); } else if("register".equals(action)) { System.out.println("view your Registered Courses:"); System.out.println("it's user's courses"); } else if("update".equals(action)) { System.out.println("do updates"); System.out.println("it's user's update time"); } else if("viewcourse".equals(action)) { System.out.println("view courses"); System.out.println("it's user's courses time"); } else if("logout".equals(action)) { System.out.println("logout"); HttpSession s =request.getSession(); //System.out.println(s.getAttribute("roll_no")); s.removeAttribute("roll_no"); response.sendRedirect("login.jsp"); } doGet(request, response); } }
[ "nishantgarg021294@gmail.com" ]
nishantgarg021294@gmail.com
ae63786caf8dbe2991ea6d8c0f8af14b2924c45b
22b5c3f1068f1f5018a2ae02a12d7065a3b91554
/Algorithms.Structures/src/SystemsOfDisjointSets/AutomaticProgramAnalysis.java
eaf2673824725dd7f678386c66a8aa15c1855b55
[]
no_license
malchkate/StepikTasks
8bbb93dbcfcf5fc886c008f33e8db46bdd81d0bf
dd15bc8577934ed5d0399351fe2aa484546cc397
refs/heads/master
2020-03-09T12:15:50.442505
2018-10-09T10:34:27
2018-10-09T10:34:27
128,781,506
0
0
null
null
null
null
UTF-8
Java
false
false
2,138
java
package SystemsOfDisjointSets; import java.util.ArrayList; import java.util.List; import java.util.Scanner; /** * Created by Katerina on 30.05.2018. */ public class AutomaticProgramAnalysis { public static class Set{ List<Integer> rank; int[] parents; int n; Set(int n){ this.n = n; this.rank = new ArrayList<>(); parents = new int[n]; } public void makeSet(int i){ parents[i] = i; rank.add(i,0); } public int find(int i){ if (parents[i] != i){ parents[i] = find(parents[i]); } return parents[i]; } public void union(int i, int j){ int i_id = find(i); int j_id = find(j); if (i_id == j_id) return; if (rank.get(i_id) > rank.get(j_id)){ parents[j_id] = i_id; } else{ parents[i_id] = j_id; if (rank.get(i_id) == rank.get(j_id)){ int r = rank.get(j_id); rank.set(j_id, r+1); } } } public boolean check(int i, int j){ int i_id = find(i); int j_id = find(j); return !(i_id == j_id); } } public void run(){ Scanner scIn = new Scanner(System.in); int n = scIn.nextInt(); int e = scIn.nextInt(); int d = scIn.nextInt(); Set set = new Set(n); int result = 1; for (int k = 0; k < n; k++){ set.makeSet(k); } for (int i = 0; i < e; i++){ int a1 = scIn.nextInt()-1; int a2 = scIn.nextInt()-1; set.union(a1, a2); } for (int j = 0; j < d && (result != 0); j++){ int a1 = scIn.nextInt()-1; int a2 = scIn.nextInt()-1; if (!set.check(a1, a2)){ result = 0; } } System.out.println(result); } public static void main(String[] args) { new AutomaticProgramAnalysis().run(); } }
[ "katerina.malch@gmail.com" ]
katerina.malch@gmail.com
4975f3ec4f87e0dd6e26cdaec5f84bf1fd21331e
5602e799404a28fe3512d8e3254b5c20f8209a0b
/test-time/src/main/java/com/example/demo/TestTimeApplication.java
034d81ff615b01ccd223dacd1d25a47d9b92498d
[]
no_license
intune-jerry/shimmyungbo
6348a668147f2d4cdd4784300f85f504fd68eeb9
3d24dad551060a66818d0a591d44b6ba04ef7dda
refs/heads/master
2021-03-02T23:21:02.307267
2020-03-27T08:53:25
2020-03-27T08:53:25
245,914,347
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
1,041
java
package com.example.demo; import java.util.Date; import java.util.TimeZone; import javax.annotation.PostConstruct; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; import org.springframework.data.jpa.repository.config.EnableJpaRepositories; @SpringBootApplication @EnableJpaRepositories(basePackages = "com.example.demo") public class TestTimeApplication extends SpringBootServletInitializer{ @PostConstruct public void started() { TimeZone.setDefault(TimeZone.getTimeZone("UTC")); System.out.println("ÇöÀç½Ã°¢: " + new Date()); } @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { return application.sources(TestTimeApplication.class); } public static void main(String[] args) { SpringApplication.run(TestTimeApplication.class, args); } }
[ "mugbo1410@gmail.com" ]
mugbo1410@gmail.com
f2ad77e8ee483d2f4c3f4a14225a346913e011fd
753b81b02f1de676ca4e62e5dae64519f0b83f68
/app/src/main/java/es/vinhnb/ttht/server/TthtHnApiInterface.java
5395b8af36d77950878f927408d0ee9aad661294
[]
no_license
vinhnb90/ES_TTHT_HN
a198278ae858b133cdf35deb09e348f5abbe9e07
b9234c31df3981918b006abf5bcc9f957b4132a6
refs/heads/master
2021-09-06T03:32:43.880924
2018-01-04T02:08:47
2018-01-04T02:08:47
116,202,232
0
0
null
null
null
null
UTF-8
Java
false
false
4,028
java
package es.vinhnb.ttht.server; import android.os.AsyncTask; import android.os.Bundle; import android.util.Log; import java.util.List; import es.vinhnb.ttht.entity.api.CHUNG_LOAI_CONGTO; import es.vinhnb.ttht.entity.api.D_DVIQLYModel; import es.vinhnb.ttht.entity.api.D_LY_DO_MODEL; import es.vinhnb.ttht.entity.api.MTBModelNew; import es.vinhnb.ttht.entity.api.MTB_ResultModel_NEW; import es.vinhnb.ttht.entity.api.MTB_TuTiModel; import es.vinhnb.ttht.entity.api.MtbBbanModel; import es.vinhnb.ttht.entity.api.MtbBbanTutiModel; import es.vinhnb.ttht.entity.api.MtbCtoModel; import es.vinhnb.ttht.entity.api.ResponseGetSuccessPostRequest; import es.vinhnb.ttht.entity.api.TRAMVIEW; import es.vinhnb.ttht.entity.api.UpdateStatus; import es.vinhnb.ttht.entity.api.UserMtb; import retrofit2.Call; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.POST; import retrofit2.http.Query; import static android.content.ContentValues.TAG; public interface TthtHnApiInterface { @GET("Get_LoginMTB") Call<UserMtb> Get_LoginMTB(@Query("madonvi") String madonvi, @Query("username") String username, @Query("password") String password, @Query("imei") String imei); @GET("Get_d_dviqly") Call<List<D_DVIQLYModel>> Get_d_dviqly(); @GET("LayDuLieuCmis") Call<List<UpdateStatus>> LayDuLieuCmis(@Query("maDonVi") String maDonVi, @Query("maNhanVien") String maNhanVien); @GET("GeT_BBAN") Call<List<MtbBbanModel>> GeT_BBAN(@Query("maDonVi") String maDonVi, @Query("maNhanVien") String maNhanVien); @GET("Get_cto") Call<Object> Get_cto(@Query("maDonVi") String maDonVi, @Query("idBienBan") String idBienBan); @GET("Get_bban_TUTI") Call<List<MtbBbanTutiModel>> Get_bban_TUTI(@Query("maDonVi") String maDonVi, @Query("maNhanVien") String maNhanVien); @GET("Get_TUTI") Call<List<MTB_TuTiModel>> Get_TUTI(@Query("maDonVi") String maDonVi, @Query("idTuTi") String idTuTi); @GET("GetTram") Call<List<TRAMVIEW>> GetTram(@Query("maDonViQuanLy") String maDonViQuanLy); @GET("LayDuLieuLoaiCongTo") Call<List<CHUNG_LOAI_CONGTO>> LayDuLieuLoaiCongTo(); @GET("GET_LY_DO_TREO_THAO") Call<List<D_LY_DO_MODEL>> GET_LY_DO_TREO_THAO(@Query("maDonVi") String maDonVi); @POST("PostMTBWithImage") Call<List<MTB_ResultModel_NEW>> PostMTBWithImage(@Body List<MTBModelNew> list); @POST("ResponseGetSuccess") Call<Boolean> ResponseGetSuccess(@Body ResponseGetSuccessPostRequest request); public static class AsyncApi extends AsyncTask<Void, Void, Bundle> { IAsync iAsync; public AsyncApi(IAsync iAsync) { this.iAsync = iAsync; } @Override protected void onPreExecute() { super.onPreExecute(); try { iAsync.onPreExecute(); } catch (Exception e) { e.printStackTrace(); Log.e(TAG, "onPreExecute: " + e.getMessage()); this.cancel(true); } } @Override protected Bundle doInBackground(Void... voids) { return iAsync.doInBackground(); } @Override protected void onPostExecute(Bundle result) { super.onPostExecute(result); // iAsync.onPostExecute(result); } } abstract class IAsync { public static final String STATUS_CODE = "STATUS_CODE"; public static final String BUNDLE_DATA = "BUNDLE_DATA"; public static final String ERROR_BODY = "ERROR_BODY"; public abstract void onPreExecute() throws Exception; public abstract Bundle doInBackground(); // public abstract void onPostExecute(Bundle result); } // @POST("/api/users") // Call<User> createUser(@Body User user); // // @GET("/api/users?") // Call<UserList> doGetUserList(@Query("page") String page); // // @FormUrlEncoded // @POST("/api/users?") // Call<UserList> doCreateUserWithField(@Field("name") String name, @Field("job") String job); }
[ "nbvinh.it@gmail.com" ]
nbvinh.it@gmail.com
2339323c88c9e376b78ea744992f2fd5a7434b96
10fc2fdfd75ef763c216b960365b6ae5bfd80015
/app/src/main/java/com/cmexpertise/beautyapp/revalAnimation/animation/SupportAnimatorLollipop.java
1f766ff438f850ef0b5e536407e59c8d879ce263
[]
no_license
dream5535/mvvmandroiddream
648c87c15d15b3dec32e8f520b131045611990bd
043f53682c56e2008f52f0b06297e292ada8830d
refs/heads/master
2020-05-30T06:04:27.390224
2019-05-31T10:32:09
2019-05-31T10:32:09
189,571,741
0
1
null
null
null
null
UTF-8
Java
false
false
2,856
java
package com.cmexpertise.beautyapp.revalAnimation.animation; import android.animation.Animator; import android.annotation.TargetApi; import android.os.Build; import android.view.animation.Interpolator; import java.lang.ref.WeakReference; @TargetApi(Build.VERSION_CODES.HONEYCOMB) final class SupportAnimatorLollipop extends SupportAnimator{ WeakReference<Animator> mAnimator; SupportAnimatorLollipop(Animator animator, RevealAnimator target) { super(target); mAnimator = new WeakReference<>(animator); } @Override public boolean isNativeAnimator() { return true; } @Override public Object get() { return mAnimator.get(); } @Override public void start() { Animator a = mAnimator.get(); if(a != null) { a.start(); } } @Override public void setDuration(int duration) { Animator a = mAnimator.get(); if(a != null) { a.setDuration(duration); } } @Override public void setInterpolator(Interpolator value) { Animator a = mAnimator.get(); if(a != null) { a.setInterpolator(value); } } @Override public void addListener(final AnimatorListener listener) { Animator a = mAnimator.get(); if(a == null) { return; } if(listener == null){ a.addListener(null); return; } a.addListener(new Animator.AnimatorListener() { @Override public void onAnimationStart(Animator animation) { listener.onAnimationStart(); } @Override public void onAnimationEnd(Animator animation) { listener.onAnimationEnd(); } @Override public void onAnimationCancel(Animator animation) { listener.onAnimationCancel(); } @Override public void onAnimationRepeat(Animator animation) { listener.onAnimationRepeat(); } }); } @Override public boolean isRunning() { Animator a = mAnimator.get(); return a != null && a.isRunning(); } @Override public void cancel() { Animator a = mAnimator.get(); if(a != null){ a.cancel(); } } @Override public void end() { Animator a = mAnimator.get(); if(a != null){ a.end(); } } @Override public void setupStartValues() { Animator a = mAnimator.get(); if(a != null){ a.setupStartValues(); } } @Override public void setupEndValues() { Animator a = mAnimator.get(); if(a != null){ a.setupEndValues(); } } }
[ "skywevasinfo@gmail.com" ]
skywevasinfo@gmail.com
134ebd2771723972d20c9da1893d6ea066dd77ff
2e92c2677283da64a06fa83220fa84fe4aa8675e
/src/main/java/controller/MainApp.java
9fac324c1e2fe3dcf6e0f4cfa683100b383b3928
[]
no_license
kisfiu/CGame
428e0e4a6164b683074011229330473adb5ebe1e
36f9fdfbd02fa5ab8feceb5b2b79965b363497ac
refs/heads/master
2021-01-22T08:47:29.228614
2017-05-30T11:12:31
2017-05-30T11:12:31
92,632,248
0
0
null
null
null
null
UTF-8
Java
false
false
1,315
java
package controller; import java.io.IOException; import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.scene.Scene; import javafx.scene.layout.AnchorPane; import javafx.stage.Stage; import javafx.scene.Parent; public class MainApp extends Application { private Stage primaryStage; private AnchorPane menu; @Override public void start(Stage primaryStage) { this.primaryStage = primaryStage; this.primaryStage.setTitle("ColorGame"); showmenu(); } /** * Initializes the root layout. */ public void showmenu() { try { // Load root layout from fxml file. FXMLLoader loader = new FXMLLoader(); loader.setLocation(MainApp.class.getResource("/view/Menu.fxml")); menu = (AnchorPane) loader.load(); // Show the scene containing the root layout. Scene scene = new Scene(menu); primaryStage.setScene(scene); primaryStage.show(); } catch (IOException e) { e.printStackTrace(); } } /** * Returns the main stage. * @return */ public Stage getPrimaryStage() { return primaryStage; } public static void main(String[] args) { launch(args); } }
[ "kristofkovacs25@gmail.com" ]
kristofkovacs25@gmail.com
4002ae037c80b12b379de8aabf205e926c9d0a66
548476b8e2a55747f29411f8daf400f8a8153161
/src/main/java/ru/geekbrains/java/oop/at/Robot.java
88160379447b2e68b2914b05900baa29777d51aa
[]
no_license
Slava62/MavenProj
464d056ce32abd1f2d249201e2c1b602336f749e
1c5c6ab3be3d154df4c419033080f33a1afa1b4e
refs/heads/master
2023-03-19T20:09:11.618390
2021-03-10T14:37:26
2021-03-10T14:37:26
278,434,083
0
0
null
2021-03-10T13:29:02
2020-07-09T17:54:07
Java
UTF-8
Java
false
false
1,055
java
package ru.geekbrains.java.oop.at; public class Robot extends Sportsman{ public static final String OBJECT_CLASS = "Робот"; public static final String SUCCESFULL_RUN_RESULT = " пробежал смешную для робота дистанцию "; public static final String BAD_RUN_RESULT = " устал, приуныл и выбывает из соревнований."; public static final String SUCCESFULL_JUMP_RESULT = " легко перепрыгнул стенку высотой "; public static final String BAD_JUMP_RESULT = " не смог преодолеть это препятствие, поэтому выбывает."; Robot(String name, int maxdistance, double maxheight) { super(name,maxdistance,maxheight); super.info= OBJECT_CLASS + " с названием " + name; super.succesfulrunresult=SUCCESFULL_RUN_RESULT; super.badrunresult=BAD_RUN_RESULT; super.succesfuljumpresult=SUCCESFULL_JUMP_RESULT; super.badjumpresult=BAD_JUMP_RESULT; } }
[ "57189338+Slava62@users.noreply.github.com" ]
57189338+Slava62@users.noreply.github.com
f17b329262afa8309f549f639b4f0d4872624ca0
a9006426f15505d2e0f454d5b95a60e551e66dac
/app/src/androidTest/java/com/example/mypegasus/connectservice/ApplicationTest.java
157786aa5179e38a80e0c03601eef30b3ae6980f
[]
no_license
MyPegasus/ConnectService
412cb7ad54634a0aab93b4b52742b5a2c72f55ce
f1cf44dc8e3e71dc7719ab3dc38c049eecad5c54
refs/heads/master
2021-01-19T06:35:39.245512
2015-07-29T08:31:10
2015-07-29T08:31:10
39,845,534
0
0
null
null
null
null
UTF-8
Java
false
false
367
java
package com.example.mypegasus.connectservice; import android.app.Application; import android.test.ApplicationTestCase; /** * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a> */ public class ApplicationTest extends ApplicationTestCase<Application> { public ApplicationTest() { super(Application.class); } }
[ "flying_hbt@163.com" ]
flying_hbt@163.com
443d96c0fced84adad868cbff561b39577380579
1a31cf96fcb9434dbe05381b0e8756bd71193478
/gremlin/src/test/java/com/arcadedb/gremlin/structure/ArcadeGraphStructureIT.java
4628c853d25bdbdd07dad9a43a8d9bdd5c5fbea3
[ "Apache-2.0" ]
permissive
ArcadeData/arcadedb
82de7bd0e8ada14272b8fb003a84263204de6116
6a6dcdba30713c544f47558e8ef55781520ef080
refs/heads/main
2023-08-30T21:45:20.921231
2023-08-30T20:13:37
2023-08-30T20:13:37
396,867,188
353
52
Apache-2.0
2023-09-14T21:16:33
2021-08-16T16:01:29
Java
UTF-8
Java
false
false
1,350
java
/* * Copyright 2023 Arcade Data Ltd * * 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 com.arcadedb.gremlin.structure; import com.arcadedb.gremlin.ArcadeGraph; import com.arcadedb.gremlin.ArcadeGraphProvider; import org.apache.tinkerpop.gremlin.GraphProviderClass; import org.apache.tinkerpop.gremlin.structure.StructureStandardSuite; import org.junit.runner.RunWith; /** * Created by Enrico Risa on 30/07/2018. */ @RunWith(StructureStandardSuite.class) @GraphProviderClass(provider = ArcadeGraphProvider.class, graph = ArcadeGraph.class) public class ArcadeGraphStructureIT { }
[ "lvca@users.noreply.github.com" ]
lvca@users.noreply.github.com
5fbb7a4fe1033e52504dc6090fadcb4ea242fa12
214c454359cdbd80301998424ba660f2d609a780
/scrimage-filters/src/main/java/thirdparty/marvin/image/halftone/Rylanders.java
c60fb83e84220a8c7ee29280356616af77b60abf
[ "Apache-2.0" ]
permissive
sksamuel/scrimage
124d695e1e42c3054ca9f6c85661c6c3e16b478a
28170bd27472ec8026543d8fe8277aaf1344f2ad
refs/heads/master
2023-09-06T07:10:06.828981
2023-08-12T08:18:43
2023-08-12T08:18:43
10,459,209
902
140
Apache-2.0
2023-08-12T08:18:44
2013-06-03T16:40:25
Java
UTF-8
Java
false
false
3,509
java
/** Marvin Project <2007-2009> Initial version by: Danilo Rosetto Munoz Fabio Andrijauskas Gabriel Ambrosio Archanjo site: http://marvinproject.sourceforge.net GPL Copyright (C) <2007> 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 any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ package thirdparty.marvin.image.halftone; import thirdparty.marvin.image.*; import thirdparty.marvin.image.grayScale.GrayScale; /** * Halftone Rylanders implementation. * * @author Gabriel Ambr�sio Archanjo * @version 1.0 02/28/2008 */ public class Rylanders extends MarvinAbstractImagePlugin { private static final int DOT_AREA = 4; private static final int arrPattern[] = {1, 9, 3, 11, 5, 13, 7, 15, 4, 12, 2, 10, 8, 16, 6, 14 }; public void process(MarvinImage a_imageIn, MarvinImage a_imageOut, MarvinAttributes a_attributesOut, MarvinImageMask a_mask, boolean a_previewMode) { double l_intensity; // Gray MarvinImagePlugin l_filter = new GrayScale(); l_filter.process(a_imageIn, a_imageIn, a_attributesOut, a_mask, a_previewMode); boolean[][] l_arrMask = a_mask.getMaskArray(); for (int x = 0; x < a_imageIn.getWidth(); x += DOT_AREA) { for (int y = 0; y < a_imageIn.getHeight(); y += DOT_AREA) { if (l_arrMask != null && !l_arrMask[x][y]) { continue; } l_intensity = getSquareIntensity(x, y, a_imageIn); drawTone(x, y, a_imageIn, a_imageOut, l_intensity); } } } private void drawTone(int a_x, int a_y, MarvinImage a_imageIn, MarvinImage a_imageOut, double a_intensity) { double l_factor = 1.0 / 15; int l_toneIntensity = (int) Math.floor(a_intensity / l_factor); int l_x; int l_y; for (int x = 0; x < DOT_AREA * DOT_AREA; x++) { l_x = x % DOT_AREA; l_y = x / DOT_AREA; if (a_x + l_x < a_imageIn.getWidth() && a_y + l_y < a_imageIn.getHeight()) { if (l_toneIntensity >= arrPattern[x]) { a_imageOut.setIntColor(a_x + l_x, a_y + l_y, 0, 0, 0); } else { a_imageOut.setIntColor(a_x + l_x, a_y + l_y, 255, 255, 255); } } } } private double getSquareIntensity(int a_x, int a_y, MarvinImage image) { double l_totalValue = 0; for (int y = 0; y < DOT_AREA; y++) { for (int x = 0; x < DOT_AREA; x++) { if (a_x + x < image.getWidth() && a_y + y < image.getHeight()) { l_totalValue += 255 - (image.getIntComponent0(a_x + x, a_y + y)); } } } return (l_totalValue / (DOT_AREA * DOT_AREA * 255)); } }
[ "sam@sksamuel.com" ]
sam@sksamuel.com
6fe82aeb9293b20426fd8d8c6b78b70c405a4731
7527660a74e280755b4f57dc4643ab6f2b1fd8a3
/erp-domain/src/main/java/com/capgemini/cn/erp/domain/ProductGroup.java
91344bc782a7654849b0f2633b1965dfc039616a
[]
no_license
lancefreestyle/erpservice
bc16e556dc2eee61efdcacef1ad56a5c243ee677
c1365999437597335bbe09fdfa9c8a5236aec5de
refs/heads/master
2023-08-14T11:52:59.992381
2019-10-10T13:01:37
2019-10-10T13:01:37
213,797,724
0
0
null
2023-07-22T18:15:24
2019-10-09T02:02:42
Java
UTF-8
Java
false
false
2,069
java
package com.capgemini.cn.erp.domain; import javax.persistence.*; import java.util.Date; import java.util.List; /** * Created By hongqi * Date: * Description: */ @Entity @Table(name="product_group") @NamedQuery(name="ProductGroup.findAll", query="SELECT p FROM ProductGroup p") public class ProductGroup { @Id private String id; @Column(name="product_group_name") private String productGroupName; private String Description; @Temporal(TemporalType.TIMESTAMP) @Column(name="create_date") private Date createDate; @Temporal(TemporalType.TIMESTAMP) @Column(name="update_date") private Date updateDate; @OneToMany(mappedBy="productGroup", cascade = CascadeType.ALL, orphanRemoval = true) private List<ProductGroupItem> productGroupItem; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getProductGroupName() { return productGroupName; } public void setProductGroupName(String productGroupName) { this.productGroupName = productGroupName; } public String getDescription() { return Description; } public void setDescription(String description) { Description = description; } public Date getCreateDate() { return createDate; } public void setCreateDate(Date createDate) { this.createDate = createDate; } public Date getUpdateDate() { return updateDate; } public void setUpdateDate(Date updateDate) { this.updateDate = updateDate; } public List<ProductGroupItem> getProductGroupItem() { return productGroupItem; } public void setProductGroupItem(List<ProductGroupItem> productGroupItem) { this.productGroupItem = productGroupItem; } public ProductGroupItem addProductGroupItem(ProductGroupItem productGroupItem) { getProductGroupItem().add(productGroupItem); productGroupItem.setProductGroup(this); return productGroupItem; } }
[ "liufreestyle@163.com" ]
liufreestyle@163.com
bbd527fb5849f60bfa363cb08cd63f3312247448
18117b7906e2152c5db477d473e7f9910d5e5ef1
/app/src/main/java/com/xiaoyuan54/child/edu/app/bean/base/ResultBean.java
031d40da418f0672ff64c309fa8cabf1d266428f
[]
no_license
LIJFU/AQing
39b849ca61081b575fdbffd0a4d66c1eebba8d53
ac3abd72116ab79193b76a5e747b1df711aea02a
refs/heads/master
2020-06-13T15:18:23.979126
2017-09-06T01:18:28
2017-09-06T01:18:28
75,367,127
0
0
null
null
null
null
UTF-8
Java
false
false
669
java
package com.xiaoyuan54.child.edu.app.bean.base; /** * Created by L.QING on 2016-11-28. */ public class ResultBean<T> { T item; private String stamsg; private int stacode; public boolean isSuccess() { return 200==stacode; } public T getItem() { return item; } public void setItem(T item) { this.item = item; } public String getStamsg() { return stamsg; } public void setStamsg(String stamsg) { this.stamsg = stamsg; } public int getStacode() { return stacode; } public void setStacode(int stacode) { this.stacode = stacode; } }
[ "15111365748@qq.com" ]
15111365748@qq.com
37e95e56a5d4bbd63d59199a241791115c84bcb4
1e32fb500b91236ab48f2d6f1bb4c81916c23625
/testsuite/model/src/test/java/org/keycloak/testsuite/model/UserSessionInitializerTest.java
04eda55caa4906336fd8a070cbf43f5df85a7a27
[ "Apache-2.0" ]
permissive
jbuechele/keycloak
8623cbb8bf55f7c3129a34ecd176d9948e1f06c1
2c09f4d2058d1270bca3d1f536dca21541304769
refs/heads/master
2023-04-22T18:17:16.083855
2021-04-29T13:16:15
2021-04-29T15:49:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
10,073
java
/* * Copyright 2016 Red Hat, Inc. and/or its affiliates * and other contributors as indicated by the @author tags. * * 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.keycloak.testsuite.model; import org.junit.Assert; import org.junit.Test; import org.keycloak.common.util.Time; import org.keycloak.connections.infinispan.InfinispanConnectionProvider; import org.keycloak.models.AuthenticatedClientSessionModel; import org.keycloak.models.ClientModel; import org.keycloak.models.Constants; import org.keycloak.models.KeycloakSession; import org.keycloak.models.RealmModel; import org.keycloak.models.RealmProvider; import org.keycloak.models.UserManager; import org.keycloak.models.UserModel; import org.keycloak.models.UserProvider; import org.keycloak.models.UserSessionModel; import org.keycloak.models.UserSessionProvider; import org.keycloak.models.session.UserSessionPersisterProvider; import org.keycloak.models.sessions.infinispan.InfinispanUserSessionProvider; import org.keycloak.services.managers.UserSessionManager; import java.util.List; import java.util.stream.Collectors; import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertThat; /** * @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a> * @author <a href="mailto:mabartos@redhat.com">Martin Bartos</a> * @author <a href="mailto:mkanis@redhat.com">Martin Kanis</a> */ @RequireProvider(UserSessionPersisterProvider.class) @RequireProvider(UserSessionProvider.class) @RequireProvider(UserProvider.class) @RequireProvider(RealmProvider.class) public class UserSessionInitializerTest extends KeycloakModelTest { private String realmId; @Override public void createEnvironment(KeycloakSession s) { RealmModel realm = s.realms().createRealm("test"); realm.setOfflineSessionIdleTimeout(Constants.DEFAULT_OFFLINE_SESSION_IDLE_TIMEOUT); realm.setDefaultRole(s.roles().addRealmRole(realm, Constants.DEFAULT_ROLES_ROLE_PREFIX + "-" + realm.getName())); realm.setSsoSessionIdleTimeout(1800); realm.setSsoSessionMaxLifespan(36000); this.realmId = realm.getId(); s.users().addUser(realm, "user1").setEmail("user1@localhost"); s.users().addUser(realm, "user2").setEmail("user2@localhost"); UserSessionPersisterProviderTest.createClients(s, realm); } @Override public void cleanEnvironment(KeycloakSession s) { RealmModel realm = s.realms().getRealm(realmId); s.sessions().removeUserSessions(realm); UserModel user1 = s.users().getUserByUsername(realm, "user1"); UserModel user2 = s.users().getUserByUsername(realm, "user2"); UserManager um = new UserManager(s); if (user1 != null) { um.removeUser(realm, user1); } if (user2 != null) { um.removeUser(realm, user2); } s.realms().removeRealm(realmId); } @Test public void testUserSessionInitializer() { String[] origSessionIds = createSessionsInPersisterOnly(); int started = Time.currentTime(); reinitializeKeycloakSessionFactory(); inComittedTransaction(session -> { RealmModel realm = session.realms().getRealm(realmId); // Assert sessions are in ClientModel testApp = realm.getClientByClientId("test-app"); ClientModel thirdparty = realm.getClientByClientId("third-party"); assertThat("Count of offline sesions for client 'test-app'", session.sessions().getOfflineSessionsCount(realm, testApp), is((long) 3)); assertThat("Count of offline sesions for client 'third-party'", session.sessions().getOfflineSessionsCount(realm, thirdparty), is((long) 1)); List<UserSessionModel> loadedSessions = session.sessions().getOfflineUserSessionsStream(realm, testApp, 0, 10) .collect(Collectors.toList()); UserSessionPersisterProviderTest.assertSessions(loadedSessions, origSessionIds); assertSessionLoaded(loadedSessions, origSessionIds[0], session.users().getUserByUsername(realm, "user1"), "127.0.0.1", started, started, "test-app", "third-party"); assertSessionLoaded(loadedSessions, origSessionIds[1], session.users().getUserByUsername(realm, "user1"), "127.0.0.2", started, started, "test-app"); assertSessionLoaded(loadedSessions, origSessionIds[2], session.users().getUserByUsername(realm, "user2"), "127.0.0.3", started, started, "test-app"); }); } @Test public void testUserSessionInitializerWithDeletingClient() { String[] origSessionIds = createSessionsInPersisterOnly(); int started = Time.currentTime(); inComittedTransaction(session -> { RealmModel realm = session.realms().getRealm(realmId); // Delete one of the clients now ClientModel testApp = realm.getClientByClientId("test-app"); realm.removeClient(testApp.getId()); }); reinitializeKeycloakSessionFactory(); inComittedTransaction(session -> { RealmModel realm = session.realms().getRealm(realmId); // Assert sessions are in ClientModel thirdparty = realm.getClientByClientId("third-party"); assertThat("Count of offline sesions for client 'third-party'", session.sessions().getOfflineSessionsCount(realm, thirdparty), is((long) 1)); List<UserSessionModel> loadedSessions = session.sessions().getOfflineUserSessionsStream(realm, thirdparty, 0, 10) .collect(Collectors.toList()); assertThat("Size of loaded Sessions", loadedSessions.size(), is(1)); assertSessionLoaded(loadedSessions, origSessionIds[0], session.users().getUserByUsername(realm, "user1"), "127.0.0.1", started, started, "third-party"); // Revert client realm.addClient("test-app"); }); } // Create sessions in persister + infinispan, but then delete them from infinispan cache. This is to allow later testing of initializer. Return the list of "origSessions" private String[] createSessionsInPersisterOnly() { UserSessionModel[] origSessions = inComittedTransaction(session -> { return UserSessionPersisterProviderTest.createSessions(session, realmId); }); String[] res = new String[origSessions.length]; inComittedTransaction(session -> { RealmModel realm = session.realms().getRealm(realmId); UserSessionManager sessionManager = new UserSessionManager(session); int i = 0; for (UserSessionModel origSession : origSessions) { UserSessionModel userSession = session.sessions().getUserSession(realm, origSession.getId()); for (AuthenticatedClientSessionModel clientSession : userSession.getAuthenticatedClientSessions().values()) { sessionManager.createOrUpdateOfflineSession(clientSession, userSession); } String cs = userSession.getNote(UserSessionModel.CORRESPONDING_SESSION_ID); res[i] = cs == null ? userSession.getId() : cs; i++; } }); inComittedTransaction(session -> { RealmModel realm = session.realms().getRealm(realmId); // Delete local user cache (persisted sessions are still kept) UserSessionProvider provider = session.getProvider(UserSessionProvider.class); if (provider instanceof InfinispanUserSessionProvider) { // Remove in-memory representation of the offline sessions ((InfinispanUserSessionProvider) provider).removeLocalUserSessions(realm.getId(), true); // Clear ispn cache to ensure initializerState is removed as well InfinispanConnectionProvider infinispan = session.getProvider(InfinispanConnectionProvider.class); if (infinispan != null) { infinispan.getCache(InfinispanConnectionProvider.WORK_CACHE_NAME).clear(); } } }); inComittedTransaction(session -> { // This is only valid in infinispan provider where the offline session is loaded upon start and never reloaded UserSessionProvider provider = session.getProvider(UserSessionProvider.class); if (provider instanceof InfinispanUserSessionProvider) { RealmModel realm = session.realms().getRealm(realmId); ClientModel testApp = realm.getClientByClientId("test-app"); ClientModel thirdparty = realm.getClientByClientId("third-party"); assertThat("Count of offline sessions for client 'test-app'", session.sessions().getOfflineSessionsCount(realm, testApp), is((long) 0)); assertThat("Count of offline sessions for client 'third-party'", session.sessions().getOfflineSessionsCount(realm, thirdparty), is((long) 0)); } }); return res; } private void assertSessionLoaded(List<UserSessionModel> sessions, String id, UserModel user, String ipAddress, int started, int lastRefresh, String... clients) { for (UserSessionModel session : sessions) { if (session.getId().equals(id)) { UserSessionPersisterProviderTest.assertSession(session, user, ipAddress, started, lastRefresh, clients); return; } } Assert.fail("Session with ID " + id + " not found in the list"); } }
[ "hmlnarik@users.noreply.github.com" ]
hmlnarik@users.noreply.github.com